From 7087e295543d3f6e161530e07982fd979e2d9efc Mon Sep 17 00:00:00 2001 From: "John W. Linville" Date: Thu, 4 Aug 2005 14:40:25 -0400 Subject: [PATCH] i810_audio: fix release_region misordering in error exit from i810_probe Re-order release_region calls in i810_probe to properly unwind preceding allocations. Signed-off-by: John W. Linville Signed-off-by: Jeff Garzik --- sound/oss/i810_audio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/oss/i810_audio.c b/sound/oss/i810_audio.c index 7e9f667cf7a7..b9a640fe48b1 100644 --- a/sound/oss/i810_audio.c +++ b/sound/oss/i810_audio.c @@ -3430,9 +3430,9 @@ out_iospace: release_mem_region(card->iobase_mmio_phys, 256); } out_pio: - release_region(card->iobase, 64); -out_region2: release_region(card->ac97base, 256); +out_region2: + release_region(card->iobase, 64); out_region1: pci_free_consistent(pci_dev, sizeof(struct i810_channel)*NR_HW_CH, card->channel, card->chandma); -- cgit v1.2.3 From 6885433c25aaca2cb13ee52a94be156163d6aa23 Mon Sep 17 00:00:00 2001 From: Jeff Garzik Date: Tue, 23 Aug 2005 02:53:51 -0400 Subject: libata: release prep (bump versions, etc.) - bump versions where necessary - remove two duplicated+outdated doc comments - add MODULE_VERSION() to AHCI driver --- drivers/scsi/ahci.c | 1 + drivers/scsi/ata_piix.c | 2 +- drivers/scsi/libata-core.c | 25 ------------------------- drivers/scsi/libata.h | 2 +- drivers/scsi/sata_promise.c | 2 +- 5 files changed, 4 insertions(+), 28 deletions(-) diff --git a/drivers/scsi/ahci.c b/drivers/scsi/ahci.c index c5623694d10f..e3b9692b9688 100644 --- a/drivers/scsi/ahci.c +++ b/drivers/scsi/ahci.c @@ -1105,6 +1105,7 @@ MODULE_AUTHOR("Jeff Garzik"); MODULE_DESCRIPTION("AHCI SATA low-level driver"); MODULE_LICENSE("GPL"); MODULE_DEVICE_TABLE(pci, ahci_pci_tbl); +MODULE_VERSION(DRV_VERSION); module_init(ahci_init); module_exit(ahci_exit); diff --git a/drivers/scsi/ata_piix.c b/drivers/scsi/ata_piix.c index a2cfade2c1c6..d96ebf9d2228 100644 --- a/drivers/scsi/ata_piix.c +++ b/drivers/scsi/ata_piix.c @@ -32,7 +32,7 @@ #include #define DRV_NAME "ata_piix" -#define DRV_VERSION "1.03" +#define DRV_VERSION "1.04" enum { PIIX_IOCFG = 0x54, /* IDE I/O configuration register */ diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index 73b1f72b7e43..f4e7dcb6492b 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c @@ -2268,19 +2268,6 @@ void ata_qc_prep(struct ata_queued_cmd *qc) * spin_lock_irqsave(host_set lock) */ - - -/** - * ata_sg_init_one - Prepare a one-entry scatter-gather list. - * @qc: Queued command - * @buf: transfer buffer - * @buflen: length of buf - * - * Builds a single-entry scatter-gather list to initiate a - * transfer utilizing the specified buffer. - * - * LOCKING: - */ void ata_sg_init_one(struct ata_queued_cmd *qc, void *buf, unsigned int buflen) { struct scatterlist *sg; @@ -2312,18 +2299,6 @@ void ata_sg_init_one(struct ata_queued_cmd *qc, void *buf, unsigned int buflen) * spin_lock_irqsave(host_set lock) */ - -/** - * ata_sg_init - Assign a scatter gather list to a queued command - * @qc: Queued command - * @sg: Scatter-gather list - * @n_elem: length of sg list - * - * Attaches a scatter-gather list to a queued command. - * - * LOCKING: - */ - void ata_sg_init(struct ata_queued_cmd *qc, struct scatterlist *sg, unsigned int n_elem) { diff --git a/drivers/scsi/libata.h b/drivers/scsi/libata.h index d90430bbb0de..3e7f4843020f 100644 --- a/drivers/scsi/libata.h +++ b/drivers/scsi/libata.h @@ -26,7 +26,7 @@ #define __LIBATA_H__ #define DRV_NAME "libata" -#define DRV_VERSION "1.11" /* must be exactly four chars */ +#define DRV_VERSION "1.12" /* must be exactly four chars */ struct ata_scsi_args { u16 *id; diff --git a/drivers/scsi/sata_promise.c b/drivers/scsi/sata_promise.c index 5c1d4411457a..919fb314ad10 100644 --- a/drivers/scsi/sata_promise.c +++ b/drivers/scsi/sata_promise.c @@ -40,7 +40,7 @@ #include "sata_promise.h" #define DRV_NAME "sata_promise" -#define DRV_VERSION "1.01" +#define DRV_VERSION "1.02" enum { -- cgit v1.2.3 From c1cc168442a943ed3997f6543db87c061987f9d7 Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Tue, 23 Aug 2005 14:55:32 -0700 Subject: [ROSE]: Fix typo in rose_route_frame() locking fix. Signed-off-by: David S. Miller --- net/rose/rose_route.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/rose/rose_route.c b/net/rose/rose_route.c index 46b23217a353..25da6f699fd0 100644 --- a/net/rose/rose_route.c +++ b/net/rose/rose_route.c @@ -995,7 +995,7 @@ int rose_route_frame(struct sk_buff *skb, ax25_cb *ax25) * 2. It isn't "owned" by any existing route. */ if (frametype != ROSE_CALL_REQUEST) { /* XXX */ - ret = 0; + res = 0; goto out; } -- cgit v1.2.3 From 6df7c994a0090bf1e9604d690cde8e76b2618e4a Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 23 Aug 2005 22:44:50 +0100 Subject: [PATCH] Kconfig fix (alpha NUMA) NUMA is broken on alpha; marked as such Signed-off-by: Al Viro Signed-off-by: Linus Torvalds --- arch/alpha/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig index 083c5df42d35..189d5eababa8 100644 --- a/arch/alpha/Kconfig +++ b/arch/alpha/Kconfig @@ -522,7 +522,7 @@ source "mm/Kconfig" config NUMA bool "NUMA Support (EXPERIMENTAL)" - depends on DISCONTIGMEM + depends on DISCONTIGMEM && BROKEN help Say Y to compile the kernel to support NUMA (Non-Uniform Memory Access). This option is for configuring high-end multiprocessor -- cgit v1.2.3 From ac6babd26ce514e0017ec5809051ea6cdc44c8f6 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 23 Aug 2005 22:44:55 +0100 Subject: [PATCH] Kconfig fix (arm SMP) SMP is broken on arm; marked as such Signed-off-by: Al Viro Signed-off-by: Linus Torvalds --- arch/arm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 7bc4a583f4e1..c65c6eb9810d 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -310,7 +310,7 @@ menu "Kernel Features" config SMP bool "Symmetric Multi-Processing (EXPERIMENTAL)" - depends on EXPERIMENTAL #&& n + depends on EXPERIMENTAL && BROKEN #&& n help This enables support for systems with more than one CPU. If you have a system with only one CPU, like most personal computers, say N. If -- cgit v1.2.3 From e9bcb173dd1747075214a1ccdb65dc6320cae49d Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 23 Aug 2005 22:45:01 +0100 Subject: [PATCH] Kconfig fix (epca on 64bit) epca is broken on 64bit; marked as such Signed-off-by: Al Viro Signed-off-by: Linus Torvalds --- drivers/char/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig index 4f27e5519296..4279304f43cc 100644 --- a/drivers/char/Kconfig +++ b/drivers/char/Kconfig @@ -138,7 +138,7 @@ config CYZ_INTR config DIGIEPCA tristate "Digiboard Intelligent Async Support" - depends on SERIAL_NONSTANDARD && BROKEN_ON_SMP + depends on SERIAL_NONSTANDARD && BROKEN_ON_SMP && (!64BIT || BROKEN) ---help--- This is a driver for Digi International's Xx, Xeve, and Xem series of cards which provide multiple serial ports. You would need -- cgit v1.2.3 From 276bd31ce5af01350465861af7aa6a25864eb108 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 23 Aug 2005 22:45:06 +0100 Subject: [PATCH] Kconfig fix (ISA_DMA_API and sound/*) fixed kconfig dependencies on ISA_DMA_API for parts of sound/* that rely on it. Signed-off-by: Al Viro Signed-off-by: Linus Torvalds --- include/sound/core.h | 2 ++ sound/Kconfig | 2 +- sound/core/Makefile | 2 +- sound/core/sound.c | 2 +- sound/isa/Kconfig | 2 +- sound/oss/Kconfig | 6 +++--- sound/pci/Kconfig | 2 +- 7 files changed, 10 insertions(+), 8 deletions(-) diff --git a/include/sound/core.h b/include/sound/core.h index 38b357fc8958..f72b3ef515e2 100644 --- a/include/sound/core.h +++ b/include/sound/core.h @@ -360,11 +360,13 @@ int snd_device_free_all(snd_card_t *card, snd_device_cmd_t cmd); /* isadma.c */ +#ifdef CONFIG_ISA_DMA_API #define DMA_MODE_NO_ENABLE 0x0100 void snd_dma_program(unsigned long dma, unsigned long addr, unsigned int size, unsigned short mode); void snd_dma_disable(unsigned long dma); unsigned int snd_dma_pointer(unsigned long dma, unsigned int size); +#endif /* misc.c */ diff --git a/sound/Kconfig b/sound/Kconfig index ee794ae06040..b65ee4701f98 100644 --- a/sound/Kconfig +++ b/sound/Kconfig @@ -77,7 +77,7 @@ source "sound/parisc/Kconfig" endmenu menu "Open Sound System" - depends on SOUND!=n && (BROKEN || (!SPARC32 && !SPARC64)) + depends on SOUND!=n config SOUND_PRIME tristate "Open Sound System (DEPRECATED)" diff --git a/sound/core/Makefile b/sound/core/Makefile index 764ac184b223..969d75528bde 100644 --- a/sound/core/Makefile +++ b/sound/core/Makefile @@ -5,7 +5,7 @@ snd-objs := sound.o init.o memory.o info.o control.o misc.o \ device.o wrappers.o -ifeq ($(CONFIG_ISA),y) +ifeq ($(CONFIG_ISA_DMA_API),y) snd-objs += isadma.o endif ifeq ($(CONFIG_SND_OSSEMUL),y) diff --git a/sound/core/sound.c b/sound/core/sound.c index 7612884f530b..3271e9245490 100644 --- a/sound/core/sound.c +++ b/sound/core/sound.c @@ -432,7 +432,7 @@ EXPORT_SYMBOL(snd_device_new); EXPORT_SYMBOL(snd_device_register); EXPORT_SYMBOL(snd_device_free); /* isadma.c */ -#ifdef CONFIG_ISA +#ifdef CONFIG_ISA_DMA_API EXPORT_SYMBOL(snd_dma_program); EXPORT_SYMBOL(snd_dma_disable); EXPORT_SYMBOL(snd_dma_pointer); diff --git a/sound/isa/Kconfig b/sound/isa/Kconfig index 148a856a43ad..be4ea60a3679 100644 --- a/sound/isa/Kconfig +++ b/sound/isa/Kconfig @@ -1,7 +1,7 @@ # ALSA ISA drivers menu "ISA devices" - depends on SND!=n && ISA + depends on SND!=n && ISA && ISA_DMA_API config SND_AD1848_LIB tristate diff --git a/sound/oss/Kconfig b/sound/oss/Kconfig index 7bd95ceab7cc..ada1c6496be8 100644 --- a/sound/oss/Kconfig +++ b/sound/oss/Kconfig @@ -80,7 +80,7 @@ config SOUND_EMU10K1 config MIDI_EMU10K1 bool "Creative SBLive! MIDI (EXPERIMENTAL)" - depends on SOUND_EMU10K1 && EXPERIMENTAL + depends on SOUND_EMU10K1 && EXPERIMENTAL && ISA_DMA_API help Say Y if you want to be able to use the OSS /dev/sequencer interface. This code is still experimental. @@ -503,7 +503,7 @@ config SOUND_VIA82CXXX config MIDI_VIA82CXXX bool "VIA 82C686 MIDI" - depends on SOUND_VIA82CXXX + depends on SOUND_VIA82CXXX && ISA_DMA_API help Answer Y to use the MIDI interface of the Via686. You may need to enable this in the BIOS before it will work. This is for connection @@ -512,7 +512,7 @@ config MIDI_VIA82CXXX config SOUND_OSS tristate "OSS sound modules" - depends on SOUND_PRIME + depends on SOUND_PRIME && ISA_DMA_API help OSS is the Open Sound System suite of sound card drivers. They make sound programming easier since they provide a common API. Say Y or diff --git a/sound/pci/Kconfig b/sound/pci/Kconfig index 6d7a00f34d82..26b42bb20a0a 100644 --- a/sound/pci/Kconfig +++ b/sound/pci/Kconfig @@ -314,7 +314,7 @@ config SND_YMFPCI config SND_ALS4000 tristate "Avance Logic ALS4000" - depends on SND + depends on SND && ISA_DMA_API select SND_OPL3_LIB select SND_MPU401_UART select SND_PCM -- cgit v1.2.3 From c5596b267a95bdea865b966a3d6cc6e52e7feae7 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 23 Aug 2005 22:45:11 +0100 Subject: [PATCH] Kconfig fix (m32r NUMA) NUMA is broken on m32r; marked as such Signed-off-by: Al Viro Signed-off-by: Linus Torvalds --- arch/m32r/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/m32r/Kconfig b/arch/m32r/Kconfig index 7772951df313..de4ade5187b4 100644 --- a/arch/m32r/Kconfig +++ b/arch/m32r/Kconfig @@ -269,7 +269,7 @@ config NR_CPUS # Common NUMA Features config NUMA bool "Numa Memory Allocation Support" - depends on SMP + depends on SMP && BROKEN default n # turning this on wastes a bunch of space. -- cgit v1.2.3 From 253a9c3308dd931e35f8527d9bda7dba591601d3 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 23 Aug 2005 22:45:16 +0100 Subject: [PATCH] Kconfig fix (m32r genrtc) genrtc is not for m32r; marked as such. Probably ought to put that into arch/* - list of "don't build it on " is getting too long. Signed-off-by: Al Viro Signed-off-by: Linus Torvalds --- drivers/char/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig index 4279304f43cc..bb1c94c954e6 100644 --- a/drivers/char/Kconfig +++ b/drivers/char/Kconfig @@ -735,7 +735,7 @@ config SGI_IP27_RTC config GEN_RTC tristate "Generic /dev/rtc emulation" - depends on RTC!=y && !IA64 && !ARM && !PPC64 + depends on RTC!=y && !IA64 && !ARM && !PPC64 && !M32R ---help--- If you say Y here and create a character special file /dev/rtc with major number 10 and minor number 135 using mknod ("man mknod"), you -- cgit v1.2.3 From 6622b8c780366f21c6bfaeebc6db8e591aa9ca2b Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 23 Aug 2005 22:45:21 +0100 Subject: [PATCH] Kconfig fix (HISAX_FRITZPCI on ppc64) HISAX_FRITZPCI is broken on ppc64; marked as such Signed-off-by: Al Viro Signed-off-by: Linus Torvalds --- drivers/isdn/hisax/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/isdn/hisax/Kconfig b/drivers/isdn/hisax/Kconfig index 6c7b8bffc6fd..801c98f30e5c 100644 --- a/drivers/isdn/hisax/Kconfig +++ b/drivers/isdn/hisax/Kconfig @@ -134,6 +134,7 @@ config HISAX_AVM_A1 config HISAX_FRITZPCI bool "AVM PnP/PCI (Fritz!PnP/PCI)" + depends on BROKEN || !PPC64 help This enables HiSax support for the AVM "Fritz!PnP" and "Fritz!PCI". See on how to configure it. -- cgit v1.2.3 From 897874fa9c58898767f081e12d70a1855b66331d Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 23 Aug 2005 22:45:26 +0100 Subject: [PATCH] Kconfig fix (PMAC_BACKLIGHT on ppc64) PMAC_BACKLIGHT is broken on ppc64; marked as such Signed-off-by: Al Viro Signed-off-by: Linus Torvalds --- drivers/macintosh/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/macintosh/Kconfig b/drivers/macintosh/Kconfig index 65ab64c43b3e..bc3e096d84f7 100644 --- a/drivers/macintosh/Kconfig +++ b/drivers/macintosh/Kconfig @@ -103,7 +103,7 @@ config PMAC_MEDIABAY # on non-powerbook machines (but only on PMU based ones AFAIK) config PMAC_BACKLIGHT bool "Backlight control for LCD screens" - depends on ADB_PMU + depends on ADB_PMU && (BROKEN || !PPC64) help Say Y here to build in code to manage the LCD backlight on a Macintosh PowerBook. With this code, the backlight will be turned -- cgit v1.2.3 From c3a0f7718c84737440a621f6a8600f2e7b896a44 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 23 Aug 2005 22:45:31 +0100 Subject: [PATCH] Kconfig fix (PCI on m32r) PCI support is broken on m32r (pci_map_... missing, etc.); marked as such Signed-off-by: Al Viro Signed-off-by: Linus Torvalds --- arch/m32r/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/m32r/Kconfig b/arch/m32r/Kconfig index de4ade5187b4..7622d4ec5f08 100644 --- a/arch/m32r/Kconfig +++ b/arch/m32r/Kconfig @@ -286,6 +286,7 @@ menu "Bus options (PCI, PCMCIA, EISA, MCA, ISA)" config PCI bool "PCI support" + depends on BROKEN default n help Find out whether you have a PCI motherboard. PCI is the name of a -- cgit v1.2.3 From 697ae16ac0482283741f42378108b67b492870e8 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 23 Aug 2005 22:45:36 +0100 Subject: [PATCH] Kconfig fix (DEBUG_PAGEALLOC on m32r) DEBUG_PAGEALLOC is broken on m32r - the option had been blindly copied from i386; kernel_map_pages() had not and that's what is needed for DEBUG_PAGEALLOC to work (or link, while we are at it). Signed-off-by: Al Viro Signed-off-by: Linus Torvalds --- arch/m32r/Kconfig.debug | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/m32r/Kconfig.debug b/arch/m32r/Kconfig.debug index 31039723804f..bbf711bab69e 100644 --- a/arch/m32r/Kconfig.debug +++ b/arch/m32r/Kconfig.debug @@ -20,7 +20,7 @@ config DEBUG_STACK_USAGE config DEBUG_PAGEALLOC bool "Page alloc debugging" - depends on DEBUG_KERNEL + depends on DEBUG_KERNEL && BROKEN help Unmap pages from the kernel linear mapping after free_pages(). This results in a large slowdown, but helps to find certain types -- cgit v1.2.3 From a2b2f45be7e9138bde7fcba3b8e9257fea04d087 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 23 Aug 2005 22:45:41 +0100 Subject: [PATCH] Kconfig fix (infiniband and PCI) infiniband uses PCI helpers all over the place (including the core parts) and won't build without PCI. Signed-off-by: Al Viro Signed-off-by: Linus Torvalds --- drivers/infiniband/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/infiniband/Kconfig b/drivers/infiniband/Kconfig index 79c8e2dd9c33..32cdfb30e9b4 100644 --- a/drivers/infiniband/Kconfig +++ b/drivers/infiniband/Kconfig @@ -1,6 +1,7 @@ menu "InfiniBand support" config INFINIBAND + depends on PCI || BROKEN tristate "InfiniBand support" ---help--- Core support for InfiniBand (IB). Make sure to also select -- cgit v1.2.3 From b545d48ca0e41803a19864c924d2efcdd4839df2 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 23 Aug 2005 22:45:46 +0100 Subject: [PATCH] Kconfig fix (arv) arv uses constants provided only by include/asm-m32r/m32700ut/m32700ut_lan.h It won't build for any subarchitecture other than M32700UT; marked as such. Signed-off-by: Al Viro Signed-off-by: Linus Torvalds --- drivers/media/video/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig index ac81e5e01a9a..3f5742396096 100644 --- a/drivers/media/video/Kconfig +++ b/drivers/media/video/Kconfig @@ -356,7 +356,7 @@ config VIDEO_M32R_AR config VIDEO_M32R_AR_M64278 tristate "Use Colour AR module M64278(VGA)" - depends on VIDEO_M32R_AR + depends on VIDEO_M32R_AR && PLAT_M32700UT ---help--- Say Y here to use the Renesas M64278E-800 camera module, which supports VGA(640x480 pixcels) size of images. -- cgit v1.2.3 From a4d544fdd30111a1183ab92ea25febb8b6460214 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 23 Aug 2005 22:45:51 +0100 Subject: [PATCH] Kconfig fix (tms380tr and ISA_DMA_API) ISA parts of tms380tr are using ISA DMA helpers and should depend on ISA_DMA_API. Signed-off-by: Al Viro Signed-off-by: Linus Torvalds --- drivers/net/tokenring/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/tokenring/Kconfig b/drivers/net/tokenring/Kconfig index 23d0fa4bbceb..7e99e9f8045e 100644 --- a/drivers/net/tokenring/Kconfig +++ b/drivers/net/tokenring/Kconfig @@ -84,7 +84,7 @@ config 3C359 config TMS380TR tristate "Generic TMS380 Token Ring ISA/PCI adapter support" - depends on TR && (PCI || ISA) + depends on TR && (PCI || ISA && ISA_DMA_API) select FW_LOADER ---help--- This driver provides generic support for token ring adapters -- cgit v1.2.3 From ab62c1e1dae0dedfc300c9f8e5c74227a8e26665 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 23 Aug 2005 22:45:56 +0100 Subject: [PATCH] Kconfig fix (airo_cs on m32r) airo_cs is broken on m32r; marked as such. [Proper fix would involve separating PCI-dependent parts and making sure they don't get in the way _and_ arranging for asm/scatterlist.h getting picked on m32r] Signed-off-by: Al Viro Signed-off-by: Linus Torvalds --- drivers/net/wireless/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/Kconfig b/drivers/net/wireless/Kconfig index 1d3231cc471a..ec3f75a030d2 100644 --- a/drivers/net/wireless/Kconfig +++ b/drivers/net/wireless/Kconfig @@ -270,7 +270,7 @@ config PCMCIA_HERMES config AIRO_CS tristate "Cisco/Aironet 34X/35X/4500/4800 PCMCIA cards" - depends on NET_RADIO && PCMCIA + depends on NET_RADIO && PCMCIA && (BROKEN || !M32R) ---help--- This is the standard Linux driver to support Cisco/Aironet PCMCIA 802.11 wireless cards. This driver is the same as the Aironet -- cgit v1.2.3 From 14d891d20374c139acfaa379e61a7091b00df8fa Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 23 Aug 2005 22:46:01 +0100 Subject: [PATCH] Kconfig fix (parport_pc on m32r) parport_pc shouldn't be picked on m32r (no asm/parport.h, for starters) Signed-off-by: Al Viro Signed-off-by: Linus Torvalds --- drivers/parport/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/parport/Kconfig b/drivers/parport/Kconfig index 16a2e6ae37f4..725a14119f2a 100644 --- a/drivers/parport/Kconfig +++ b/drivers/parport/Kconfig @@ -34,7 +34,7 @@ config PARPORT config PARPORT_PC tristate "PC-style hardware" - depends on PARPORT && (!SPARC64 || PCI) && !SPARC32 + depends on PARPORT && (!SPARC64 || PCI) && !SPARC32 && !M32R ---help--- You should say Y here if you have a PC-style parallel port. All IBM PC compatible computers and some Alphas have PC-style -- cgit v1.2.3 From 9ff658589b8549a9142708d34625c7db6e34a672 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 23 Aug 2005 22:46:06 +0100 Subject: [PATCH] Kconfig fix (M32R_PLDSIO dependecies) M32R_PLDSIO depends on subarchitecture providing PLD_ESIO0CR and friends. Signed-off-by: Al Viro Signed-off-by: Linus Torvalds --- drivers/serial/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig index 97034d3937fd..b9378c72a2f5 100644 --- a/drivers/serial/Kconfig +++ b/drivers/serial/Kconfig @@ -819,7 +819,7 @@ config SERIAL_M32R_SIO_CONSOLE config SERIAL_M32R_PLDSIO bool "M32R SIO I/F on a PLD" - depends on SERIAL_M32R_SIO=y + depends on SERIAL_M32R_SIO=y && (PLAT_OPSPUT || PALT_USRV || PLAT_M32700UT) default n help Say Y here if you want to use the M32R serial controller -- cgit v1.2.3 From a838e543db8f65ccbc710548916f20c23e51a363 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 23 Aug 2005 22:46:11 +0100 Subject: [PATCH] Kconfig fix (acornscsi) acornscsi had been broken for a long time; marked as such Signed-off-by: Al Viro Signed-off-by: Linus Torvalds --- drivers/scsi/arm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/arm/Kconfig b/drivers/scsi/arm/Kconfig index 54b32868aaf7..13f23043c8a3 100644 --- a/drivers/scsi/arm/Kconfig +++ b/drivers/scsi/arm/Kconfig @@ -3,7 +3,7 @@ # config SCSI_ACORNSCSI_3 tristate "Acorn SCSI card (aka30) support" - depends on ARCH_ACORN && SCSI + depends on ARCH_ACORN && SCSI && BROKEN help This enables support for the Acorn SCSI card (aka30). If you have an Acorn system with one of these, say Y. If unsure, say N. -- cgit v1.2.3 From 84b6a2323a2b9482958965bc66bbfbd2711cde71 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 23 Aug 2005 22:46:16 +0100 Subject: [PATCH] Kconfig fix (amba on arm/versatile) AMBA_PL010 is broken on arm/versatile; marked as such Signed-off-by: Al Viro Signed-off-by: Linus Torvalds --- drivers/serial/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig index b9378c72a2f5..d5797618a3b9 100644 --- a/drivers/serial/Kconfig +++ b/drivers/serial/Kconfig @@ -211,7 +211,7 @@ comment "Non-8250 serial port support" config SERIAL_AMBA_PL010 tristate "ARM AMBA PL010 serial port support" - depends on ARM_AMBA + depends on ARM_AMBA && (BROKEN || !ARCH_VERSATILE) select SERIAL_CORE help This selects the ARM(R) AMBA(R) PrimeCell PL010 UART. If you have -- cgit v1.2.3 From 51583cf108b27baf81c6db3ec718f932314986ea Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 23 Aug 2005 22:46:21 +0100 Subject: [PATCH] Kconfig fix (VGA console on arm/versatile) VGA console doesn't exist (or build) on arm/versatile; dependency fixed. Signed-off-by: Al Viro Signed-off-by: Linus Torvalds --- drivers/video/console/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/console/Kconfig b/drivers/video/console/Kconfig index cbff98337aa6..5fe182d6e4ab 100644 --- a/drivers/video/console/Kconfig +++ b/drivers/video/console/Kconfig @@ -6,7 +6,7 @@ menu "Console display driver support" config VGA_CONSOLE bool "VGA text console" if EMBEDDED || !X86 - depends on !ARCH_ACORN && !ARCH_EBSA110 && !4xx && !8xx && !SPARC32 && !SPARC64 && !M68K && !PARISC + depends on !ARCH_ACORN && !ARCH_EBSA110 && !4xx && !8xx && !SPARC32 && !SPARC64 && !M68K && !PARISC && !ARCH_VERSATILE default y help Saying Y here will allow you to use Linux in text mode through a -- cgit v1.2.3 From ee449f514d2af21f3422c29702e6b0995c4c2a9c Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 23 Aug 2005 22:46:26 +0100 Subject: [PATCH] Kconfig fix (ppc32 SMP dependencies) ppc SMP is supported only for 6xx/POWER3/POWER4 - i.e. ones that have PPC_STD_MMU. Dependency fixed. Signed-off-by: Al Viro Acked-by: Paul Mackerras Signed-off-by: Linus Torvalds --- arch/ppc/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/ppc/Kconfig b/arch/ppc/Kconfig index f6db3b385fea..f2900f82f898 100644 --- a/arch/ppc/Kconfig +++ b/arch/ppc/Kconfig @@ -911,6 +911,7 @@ config PPCBUG_NVRAM default y if PPC_PREP config SMP + depends on PPC_STD_MMU bool "Symmetric multi-processing support" ---help--- This enables support for systems with more than one CPU. If you have -- cgit v1.2.3 From c4457fb9010765620faebccf4daf83b288295154 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 23 Aug 2005 22:46:31 +0100 Subject: [PATCH] Kconfig fix (IRQ_ALL_CPUS vs. MV64360) MV64360 does not support IRQ_ALL_CPUS - see arch/ppc/kernel/mv64360_pic.c. Signed-off-by: Al Viro Signed-off-by: Linus Torvalds --- arch/ppc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/ppc/Kconfig b/arch/ppc/Kconfig index f2900f82f898..015333033127 100644 --- a/arch/ppc/Kconfig +++ b/arch/ppc/Kconfig @@ -931,7 +931,7 @@ config SMP config IRQ_ALL_CPUS bool "Distribute interrupts on all CPUs by default" - depends on SMP + depends on SMP && !MV64360 help This option gives the kernel permission to distribute IRQs across multiple CPUs. Saying N here will route all IRQs to the first -- cgit v1.2.3 From f08243a491f3e21feabbb04476a03fb0cbc975ff Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 23 Aug 2005 22:46:36 +0100 Subject: [PATCH] Kconfig fix (ppc 4xx and early serial) a bunch of ppc 4xx variants unconditionally calls early_serial_setup() and therefore needs SERIAL_8250 Signed-off-by: Al Viro Signed-off-by: Linus Torvalds --- arch/ppc/platforms/4xx/Kconfig | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/arch/ppc/platforms/4xx/Kconfig b/arch/ppc/platforms/4xx/Kconfig index f7c045764e04..853ee908c6eb 100644 --- a/arch/ppc/platforms/4xx/Kconfig +++ b/arch/ppc/platforms/4xx/Kconfig @@ -3,6 +3,11 @@ config 4xx depends on 40x || 44x default y +config WANT_EARLY_SERIAL + bool + select SERIAL_8250 + default n + menu "IBM 4xx options" depends on 4xx @@ -18,6 +23,7 @@ config ASH config BUBINGA bool "Bubinga" + select WANT_EARLY_SERIAL help This option enables support for the IBM 405EP evaluation board. @@ -70,21 +76,25 @@ choice config BAMBOO bool "Bamboo" + select WANT_EARLY_SERIAL help This option enables support for the IBM PPC440EP evaluation board. config EBONY bool "Ebony" + select WANT_EARLY_SERIAL help This option enables support for the IBM PPC440GP evaluation board. config LUAN bool "Luan" + select WANT_EARLY_SERIAL help This option enables support for the IBM PPC440SP evaluation board. config OCOTEA bool "Ocotea" + select WANT_EARLY_SERIAL help This option enables support for the IBM PPC440GX evaluation board. -- cgit v1.2.3 From 6299afc40c8612a87358ecea80882395fe67111f Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 23 Aug 2005 22:46:41 +0100 Subject: [PATCH] Kconfig fix (CONFIG_PM on 44x) CONFIG_PM is broken on 44x; removed duplicate entry for CONFIG_PM, made the inclusion of generic one conditional on BROKEN || !44x. Signed-off-by: Al Viro Signed-off-by: Linus Torvalds --- arch/ppc/Kconfig | 2 ++ arch/ppc/platforms/4xx/Kconfig | 4 ---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/ppc/Kconfig b/arch/ppc/Kconfig index 015333033127..e6fa1d1cc03a 100644 --- a/arch/ppc/Kconfig +++ b/arch/ppc/Kconfig @@ -1122,7 +1122,9 @@ config PROC_HARDWARE source "drivers/zorro/Kconfig" +if !44x || BROKEN source kernel/power/Kconfig +endif config SECCOMP bool "Enable seccomp to safely compute untrusted bytecode" diff --git a/arch/ppc/platforms/4xx/Kconfig b/arch/ppc/platforms/4xx/Kconfig index 853ee908c6eb..805dd98908a3 100644 --- a/arch/ppc/platforms/4xx/Kconfig +++ b/arch/ppc/platforms/4xx/Kconfig @@ -240,10 +240,6 @@ config PPC_GEN550 depends on 4xx default y -config PM - bool "Power Management support (EXPERIMENTAL)" - depends on 4xx && EXPERIMENTAL - choice prompt "TTYS0 device and default console" depends on 40x -- cgit v1.2.3 From 997183dc2a8992374d93e66f5ea0d58fa1022a47 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 23 Aug 2005 22:46:46 +0100 Subject: [PATCH] Kconfig fix (emac dependencient) emac doesn't build modular; ibm_emac_debug doesn't build at all (missing headers). Signed-off-by: Al Viro Signed-off-by: Linus Torvalds --- drivers/net/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index 8a835eb58808..8edb6936fb9b 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig @@ -1145,7 +1145,7 @@ config IBMVETH be called ibmveth. config IBM_EMAC - tristate "IBM PPC4xx EMAC driver support" + bool "IBM PPC4xx EMAC driver support" depends on 4xx select CRC32 ---help--- @@ -1154,7 +1154,7 @@ config IBM_EMAC config IBM_EMAC_ERRMSG bool "Verbose error messages" - depends on IBM_EMAC + depends on IBM_EMAC && BROKEN config IBM_EMAC_RXB int "Number of receive buffers" -- cgit v1.2.3 From a238b563502a7f458624b9c6404742e441b2f9e8 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 23 Aug 2005 22:46:51 +0100 Subject: [PATCH] Kconfig fix (sparc32 drivers/char dependencies) since sparc32 Kconfig includes drivers/char/Kconfig (instead of duplicating its parts) we need several new dependencies there to exclude the stuff broken on sparc32 and not excluded by existing dependencies. Signed-off-by: Al Viro Signed-off-by: Linus Torvalds --- drivers/char/Kconfig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig index bb1c94c954e6..7333b41d4224 100644 --- a/drivers/char/Kconfig +++ b/drivers/char/Kconfig @@ -80,7 +80,7 @@ config SERIAL_NONSTANDARD config COMPUTONE tristate "Computone IntelliPort Plus serial support" - depends on SERIAL_NONSTANDARD && BROKEN_ON_SMP + depends on SERIAL_NONSTANDARD && BROKEN_ON_SMP && (BROKEN || !SPARC32) ---help--- This driver supports the entire family of Intelliport II/Plus controllers with the exception of the MicroChannel controllers and @@ -208,7 +208,7 @@ config SYNCLINK config SYNCLINKMP tristate "SyncLink Multiport support" - depends on SERIAL_NONSTANDARD + depends on SERIAL_NONSTANDARD && (BROKEN || !SPARC32) help Enable support for the SyncLink Multiport (2 or 4 ports) serial adapter, running asynchronous and HDLC communications up @@ -735,7 +735,7 @@ config SGI_IP27_RTC config GEN_RTC tristate "Generic /dev/rtc emulation" - depends on RTC!=y && !IA64 && !ARM && !PPC64 && !M32R + depends on RTC!=y && !IA64 && !ARM && !PPC64 && !M32R && !SPARC32 ---help--- If you say Y here and create a character special file /dev/rtc with major number 10 and minor number 135 using mknod ("man mknod"), you -- cgit v1.2.3 From 18415e923e90b986db316abd078f6d863cee7b18 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 23 Aug 2005 22:46:56 +0100 Subject: [PATCH] alpha gcc4 warnings on UP smp_call_function() is expanded to expression. Alpha oprofile calls that puppy and ignores the return value. And has -Werror for arch/*... Signed-off-by: Al Viro Signed-off-by: Linus Torvalds --- arch/alpha/oprofile/common.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/alpha/oprofile/common.c b/arch/alpha/oprofile/common.c index 908eb4af8dec..ba788cfdc3c6 100644 --- a/arch/alpha/oprofile/common.c +++ b/arch/alpha/oprofile/common.c @@ -65,7 +65,7 @@ op_axp_setup(void) model->reg_setup(®, ctr, &sys); /* Configure the registers on all cpus. */ - smp_call_function(model->cpu_setup, ®, 0, 1); + (void)smp_call_function(model->cpu_setup, ®, 0, 1); model->cpu_setup(®); return 0; } @@ -86,7 +86,7 @@ op_axp_cpu_start(void *dummy) static int op_axp_start(void) { - smp_call_function(op_axp_cpu_start, NULL, 0, 1); + (void)smp_call_function(op_axp_cpu_start, NULL, 0, 1); op_axp_cpu_start(NULL); return 0; } @@ -101,7 +101,7 @@ op_axp_cpu_stop(void *dummy) static void op_axp_stop(void) { - smp_call_function(op_axp_cpu_stop, NULL, 0, 1); + (void)smp_call_function(op_axp_cpu_stop, NULL, 0, 1); op_axp_cpu_stop(NULL); } -- cgit v1.2.3 From 531e5ca62bd9aabef6bd8340d8ae93bac1b5caa2 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 23 Aug 2005 22:47:01 +0100 Subject: [PATCH] missing include in pcmcia_resource.c missing include of asm/irq.h Signed-off-by: Al Viro Signed-off-by: Linus Torvalds --- drivers/pcmcia/pcmcia_resource.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/pcmcia/pcmcia_resource.c b/drivers/pcmcia/pcmcia_resource.c index 6f9fdb276402..599b116d9747 100644 --- a/drivers/pcmcia/pcmcia_resource.c +++ b/drivers/pcmcia/pcmcia_resource.c @@ -41,6 +41,7 @@ module_param(io_speed, int, 0444); #ifdef CONFIG_PCMCIA_PROBE +#include /* mask of IRQs already reserved by other cards, we should avoid using them */ static u8 pcmcia_used_irq[NR_IRQS]; #endif -- cgit v1.2.3 From 79fb7bdce363685b336e3f0fb8207312fd1f02fc Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 23 Aug 2005 22:47:07 +0100 Subject: [PATCH] alpha xchg fix alpha xchg has to be a macro - alpha disables always_inline and if that puppy does not get inlined, we immediately blow up on undefined reference. Happens even on gcc3; with gcc4 that happens a _lot_. Signed-off-by: Al Viro Signed-off-by: Linus Torvalds --- include/asm-alpha/system.h | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/include/asm-alpha/system.h b/include/asm-alpha/system.h index c08ce970ff8c..bdb4d66418f1 100644 --- a/include/asm-alpha/system.h +++ b/include/asm-alpha/system.h @@ -443,22 +443,19 @@ __xchg_u64(volatile long *m, unsigned long val) if something tries to do an invalid xchg(). */ extern void __xchg_called_with_bad_pointer(void); -static inline unsigned long -__xchg(volatile void *ptr, unsigned long x, int size) -{ - switch (size) { - case 1: - return __xchg_u8(ptr, x); - case 2: - return __xchg_u16(ptr, x); - case 4: - return __xchg_u32(ptr, x); - case 8: - return __xchg_u64(ptr, x); - } - __xchg_called_with_bad_pointer(); - return x; -} +#define __xchg(ptr, x, size) \ +({ \ + unsigned long __xchg__res; \ + volatile void *__xchg__ptr = (ptr); \ + switch (size) { \ + case 1: __xchg__res = __xchg_u8(__xchg__ptr, x); break; \ + case 2: __xchg__res = __xchg_u16(__xchg__ptr, x); break; \ + case 4: __xchg__res = __xchg_u32(__xchg__ptr, x); break; \ + case 8: __xchg__res = __xchg_u64(__xchg__ptr, x); break; \ + default: __xchg_called_with_bad_pointer(); __xchg__res = x; \ + } \ + __xchg__res; \ +}) #define xchg(ptr,x) \ ({ \ -- cgit v1.2.3 From 719e5985cf79bb60f4a28816547efd27dde178f5 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 23 Aug 2005 22:47:12 +0100 Subject: [PATCH] alpha spinlock code and bogus constraints "=m" (lock->lock) / "1" (lock->lock) makes gcc4 unhappy; fixed by s/1/m/, same as in case of i386 rwsem.h where such variant had been accepted by both Linus and rth. Signed-off-by: Al Viro Signed-off-by: Linus Torvalds --- arch/alpha/kernel/smp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/alpha/kernel/smp.c b/arch/alpha/kernel/smp.c index 8f1e78551b1e..e211aa7404e6 100644 --- a/arch/alpha/kernel/smp.c +++ b/arch/alpha/kernel/smp.c @@ -1036,7 +1036,7 @@ debug_spin_lock(spinlock_t * lock, const char *base_file, int line_no) " br 1b\n" ".previous" : "=r" (tmp), "=m" (lock->lock), "=r" (stuck) - : "1" (lock->lock), "2" (stuck) : "memory"); + : "m" (lock->lock), "2" (stuck) : "memory"); if (stuck < 0) { printk(KERN_WARNING @@ -1115,7 +1115,7 @@ void _raw_write_lock(rwlock_t * lock) ".previous" : "=m" (*(volatile int *)lock), "=&r" (regx), "=&r" (regy), "=&r" (stuck_lock), "=&r" (stuck_reader) - : "0" (*(volatile int *)lock), "3" (stuck_lock), "4" (stuck_reader) : "memory"); + : "m" (*(volatile int *)lock), "3" (stuck_lock), "4" (stuck_reader) : "memory"); if (stuck_lock < 0) { printk(KERN_WARNING "write_lock stuck at %p\n", inline_pc); @@ -1153,7 +1153,7 @@ void _raw_read_lock(rwlock_t * lock) " br 1b\n" ".previous" : "=m" (*(volatile int *)lock), "=&r" (regx), "=&r" (stuck_lock) - : "0" (*(volatile int *)lock), "2" (stuck_lock) : "memory"); + : "m" (*(volatile int *)lock), "2" (stuck_lock) : "memory"); if (stuck_lock < 0) { printk(KERN_WARNING "read_lock stuck at %p\n", inline_pc); -- cgit v1.2.3 From e231a9c4fdf402bcfd5a7c27be49050882631a95 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 23 Aug 2005 22:47:17 +0100 Subject: [PATCH] m32r smp.h gcc4 fixes extern on physid_2_cpu[] does not belong in smp.h - the thing is static. Signed-off-by: Al Viro Signed-off-by: Linus Torvalds --- arch/m32r/kernel/smpboot.c | 1 + include/asm-m32r/smp.h | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/m32r/kernel/smpboot.c b/arch/m32r/kernel/smpboot.c index f9a0e723478d..640d592ea072 100644 --- a/arch/m32r/kernel/smpboot.c +++ b/arch/m32r/kernel/smpboot.c @@ -91,6 +91,7 @@ extern struct { /* which physical physical ID maps to which logical CPU number */ static volatile int physid_2_cpu[NR_CPUS]; +#define physid_to_cpu(physid) physid_2_cpu[physid] /* which logical CPU number maps to which physical ID */ volatile int cpu_2_physid[NR_CPUS]; diff --git a/include/asm-m32r/smp.h b/include/asm-m32r/smp.h index b9a20cdad65f..7885b7df84a2 100644 --- a/include/asm-m32r/smp.h +++ b/include/asm-m32r/smp.h @@ -61,9 +61,7 @@ extern physid_mask_t phys_cpu_present_map; * Some lowlevel functions might want to know about * the real CPU ID <-> CPU # mapping. */ -extern volatile int physid_2_cpu[NR_CPUS]; extern volatile int cpu_2_physid[NR_CPUS]; -#define physid_to_cpu(physid) physid_2_cpu[physid] #define cpu_to_physid(cpu_id) cpu_2_physid[cpu_id] #define raw_smp_processor_id() (current_thread_info()->cpu) -- cgit v1.2.3 From c51d9943b11441fd1ea42c7e70cfb5eed33fe97b Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 23 Aug 2005 22:47:22 +0100 Subject: [PATCH] m32r icu_data gcc4 fixes either icu_data declaration for SMP case should be taken out of m32102.h, or its declarations for m32700ut and opsput should not be static for SMP. Patch does the latter - judging by comments in m32102.h it is intended to be non-static. Signed-off-by: Al Viro Signed-off-by: Linus Torvalds --- arch/m32r/kernel/setup_m32700ut.c | 4 +++- arch/m32r/kernel/setup_opsput.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/arch/m32r/kernel/setup_m32700ut.c b/arch/m32r/kernel/setup_m32700ut.c index a146b24a556b..708634b685e4 100644 --- a/arch/m32r/kernel/setup_m32700ut.c +++ b/arch/m32r/kernel/setup_m32700ut.c @@ -30,9 +30,11 @@ typedef struct { unsigned long icucr; /* ICU Control Register */ } icu_data_t; +static icu_data_t icu_data[M32700UT_NUM_CPU_IRQ]; +#else +icu_data_t icu_data[M32700UT_NUM_CPU_IRQ]; #endif /* CONFIG_SMP */ -static icu_data_t icu_data[M32700UT_NUM_CPU_IRQ]; static void disable_m32700ut_irq(unsigned int irq) { diff --git a/arch/m32r/kernel/setup_opsput.c b/arch/m32r/kernel/setup_opsput.c index f0301f58bcce..d7b7ec6d30f8 100644 --- a/arch/m32r/kernel/setup_opsput.c +++ b/arch/m32r/kernel/setup_opsput.c @@ -31,9 +31,11 @@ typedef struct { unsigned long icucr; /* ICU Control Register */ } icu_data_t; +static icu_data_t icu_data[OPSPUT_NUM_CPU_IRQ]; +#else +icu_data_t icu_data[OPSPUT_NUM_CPU_IRQ]; #endif /* CONFIG_SMP */ -static icu_data_t icu_data[OPSPUT_NUM_CPU_IRQ]; static void disable_opsput_irq(unsigned int irq) { -- cgit v1.2.3 From a828b8e4e699b5e3ce0dcbb708ecb099b86f3126 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 23 Aug 2005 22:47:27 +0100 Subject: [PATCH] m32r_sio gcc4 fixes extern declaration followed by static in drivers/serial/m32r_sio.c Signed-off-by: Al Viro Signed-off-by: Linus Torvalds --- drivers/serial/m32r_sio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/serial/m32r_sio.c b/drivers/serial/m32r_sio.c index 0301feacbde4..9b50560b9d16 100644 --- a/drivers/serial/m32r_sio.c +++ b/drivers/serial/m32r_sio.c @@ -1123,7 +1123,7 @@ static int __init m32r_sio_console_setup(struct console *co, char *options) return uart_set_options(port, co, baud, parity, bits, flow); } -extern struct uart_driver m32r_sio_reg; +static struct uart_driver m32r_sio_reg; static struct console m32r_sio_console = { .name = "ttyS", .write = m32r_sio_console_write, -- cgit v1.2.3 From 0cbdff4f7fc642deb1f36bc035cf60b7bdc497d5 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 23 Aug 2005 22:47:32 +0100 Subject: [PATCH] broken inline asm on s390 (misuse of labels) use of explicit labels in inline asm is a Bad Idea(tm), since gcc can decide to inline the function in several places. Fixed by use of 1f/f: instead of .Lfitsin/.Lfitsin: Signed-off-by: Al Viro Signed-off-by: Linus Torvalds --- arch/s390/kernel/cpcmd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/s390/kernel/cpcmd.c b/arch/s390/kernel/cpcmd.c index 20062145e84e..d47fecb42cc5 100644 --- a/arch/s390/kernel/cpcmd.c +++ b/arch/s390/kernel/cpcmd.c @@ -46,9 +46,9 @@ int __cpcmd(const char *cmd, char *response, int rlen, int *response_code) "lra 3,0(%4)\n" "lr 5,%5\n" "diag 2,4,0x8\n" - "brc 8, .Litfits\n" + "brc 8, 1f\n" "ar 5, %5\n" - ".Litfits: \n" + "1: \n" "lr %0,4\n" "lr %1,5\n" : "=d" (return_code), "=d" (return_len) @@ -64,9 +64,9 @@ int __cpcmd(const char *cmd, char *response, int rlen, int *response_code) "sam31\n" "diag 2,4,0x8\n" "sam64\n" - "brc 8, .Litfits\n" + "brc 8, 1f\n" "agr 5, %5\n" - ".Litfits: \n" + "1: \n" "lgr %0,4\n" "lgr %1,5\n" : "=d" (return_code), "=d" (return_len) -- cgit v1.2.3 From 791cdc7c561e2e72596388533f959e6d74dc6231 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 23 Aug 2005 22:47:37 +0100 Subject: [PATCH] vidc gcc4 fix removes an extern for a static variable. Signed-off-by: Al Viro Signed-off-by: Linus Torvalds --- sound/oss/vidc.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sound/oss/vidc.h b/sound/oss/vidc.h index bab7044572d3..d5b8064dc565 100644 --- a/sound/oss/vidc.h +++ b/sound/oss/vidc.h @@ -10,10 +10,6 @@ * VIDC sound function prototypes */ -/* vidc.c */ - -extern int vidc_busy; - /* vidc_fill.S */ /* -- cgit v1.2.3 From 530d8e97384fd2a6805fa4515a4e6828d7b53ee2 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 23 Aug 2005 22:47:42 +0100 Subject: [PATCH] emac netpoll fix netpoll is void(struct net_device *), not int(struct net_device *) Signed-off-by: Al Viro Signed-off-by: Linus Torvalds --- drivers/net/ibm_emac/ibm_emac_core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ibm_emac/ibm_emac_core.c b/drivers/net/ibm_emac/ibm_emac_core.c index 6482d994d489..c7fb3675c09d 100644 --- a/drivers/net/ibm_emac/ibm_emac_core.c +++ b/drivers/net/ibm_emac/ibm_emac_core.c @@ -1712,11 +1712,10 @@ struct mal_commac_ops emac_commac_ops = { }; #ifdef CONFIG_NET_POLL_CONTROLLER -static int emac_netpoll(struct net_device *ndev) +static void emac_netpoll(struct net_device *ndev) { emac_rxeob_dev((void *)ndev, 0); emac_txeob_dev((void *)ndev, 0); - return 0; } #endif -- cgit v1.2.3 From ade31f38f2ef61900e901d26061deff0c4dba085 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 23 Aug 2005 22:47:47 +0100 Subject: [PATCH] typo fix in qdio.c dumb typo: u32 volatile * mistyped as u32 * volatile Signed-off-by: Al Viro Signed-off-by: Linus Torvalds --- drivers/s390/cio/qdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/s390/cio/qdio.c b/drivers/s390/cio/qdio.c index d36258d6665f..533f90c05cdf 100644 --- a/drivers/s390/cio/qdio.c +++ b/drivers/s390/cio/qdio.c @@ -230,7 +230,7 @@ qdio_siga_input(struct qdio_q *q) } /* locked by the locks in qdio_activate and qdio_cleanup */ -static __u32 * volatile +static __u32 volatile * qdio_get_indicator(void) { int i; -- cgit v1.2.3 From 33215652e4a75dfa8adb20f4d741517457b0da2b Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 23 Aug 2005 22:47:52 +0100 Subject: [PATCH] qualifiers in return types - easy cases a bunch of functions switched from volatile to __attribute__((noreturn)) and from const to __attribute_pure__ Signed-off-by: Al Viro Signed-off-by: Linus Torvalds --- arch/arm/kernel/traps.c | 2 +- arch/arm/nwfpe/fpopcode.h | 6 +++--- include/asm-arm/bug.h | 2 +- include/asm-arm/cpu-multi32.h | 2 +- include/asm-arm/cpu-single.h | 2 +- include/asm-ppc/time.h | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c index d571c37ac30c..4554c961251c 100644 --- a/arch/arm/kernel/traps.c +++ b/arch/arm/kernel/traps.c @@ -617,7 +617,7 @@ baddataabort(int code, unsigned long instr, struct pt_regs *regs) notify_die("unknown data abort code", regs, &info, instr, 0); } -volatile void __bug(const char *file, int line, void *data) +void __attribute__((noreturn)) __bug(const char *file, int line, void *data) { printk(KERN_CRIT"kernel BUG at %s:%d!", file, line); if (data) diff --git a/arch/arm/nwfpe/fpopcode.h b/arch/arm/nwfpe/fpopcode.h index 8035f4faafbf..1777e92a88e6 100644 --- a/arch/arm/nwfpe/fpopcode.h +++ b/arch/arm/nwfpe/fpopcode.h @@ -370,20 +370,20 @@ TABLE 5 #define getRoundingMode(opcode) ((opcode & MASK_ROUNDING_MODE) >> 5) #ifdef CONFIG_FPE_NWFPE_XP -static inline const floatx80 getExtendedConstant(const unsigned int nIndex) +static inline __attribute_pure__ floatx80 getExtendedConstant(const unsigned int nIndex) { extern const floatx80 floatx80Constant[]; return floatx80Constant[nIndex]; } #endif -static inline const float64 getDoubleConstant(const unsigned int nIndex) +static inline __attribute_pure__ float64 getDoubleConstant(const unsigned int nIndex) { extern const float64 float64Constant[]; return float64Constant[nIndex]; } -static inline const float32 getSingleConstant(const unsigned int nIndex) +static inline __attribute_pure__ float32 getSingleConstant(const unsigned int nIndex) { extern const float32 float32Constant[]; return float32Constant[nIndex]; diff --git a/include/asm-arm/bug.h b/include/asm-arm/bug.h index 24d11672eb60..7fb02138f585 100644 --- a/include/asm-arm/bug.h +++ b/include/asm-arm/bug.h @@ -5,7 +5,7 @@ #ifdef CONFIG_BUG #ifdef CONFIG_DEBUG_BUGVERBOSE -extern volatile void __bug(const char *file, int line, void *data); +extern void __bug(const char *file, int line, void *data) __attribute__((noreturn)); /* give file/line information */ #define BUG() __bug(__FILE__, __LINE__, NULL) diff --git a/include/asm-arm/cpu-multi32.h b/include/asm-arm/cpu-multi32.h index ff48022e4720..4679f63688e9 100644 --- a/include/asm-arm/cpu-multi32.h +++ b/include/asm-arm/cpu-multi32.h @@ -31,7 +31,7 @@ extern struct processor { /* * Special stuff for a reset */ - volatile void (*reset)(unsigned long addr); + void (*reset)(unsigned long addr) __attribute__((noreturn)); /* * Idle the processor */ diff --git a/include/asm-arm/cpu-single.h b/include/asm-arm/cpu-single.h index b5ec5d54665d..6723e67244fa 100644 --- a/include/asm-arm/cpu-single.h +++ b/include/asm-arm/cpu-single.h @@ -41,4 +41,4 @@ extern int cpu_do_idle(void); extern void cpu_dcache_clean_area(void *, int); extern void cpu_do_switch_mm(unsigned long pgd_phys, struct mm_struct *mm); extern void cpu_set_pte(pte_t *ptep, pte_t pte); -extern volatile void cpu_reset(unsigned long addr); +extern void cpu_reset(unsigned long addr) __attribute__((noreturn)); diff --git a/include/asm-ppc/time.h b/include/asm-ppc/time.h index ce09b47fa819..321fb75b5f22 100644 --- a/include/asm-ppc/time.h +++ b/include/asm-ppc/time.h @@ -58,7 +58,7 @@ static __inline__ void set_dec(unsigned int val) /* Accessor functions for the timebase (RTC on 601) registers. */ /* If one day CONFIG_POWER is added just define __USE_RTC as 1 */ #ifdef CONFIG_6xx -extern __inline__ int const __USE_RTC(void) { +extern __inline__ int __attribute_pure__ __USE_RTC(void) { return (mfspr(SPRN_PVR)>>16) == 1; } #else -- cgit v1.2.3 From eaaece266a78b8f56ade48fe23147b8b933364de Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 23 Aug 2005 22:47:57 +0100 Subject: [PATCH] missing exports on m32r missing exports on m32r Signed-off-by: Al Viro Signed-off-by: Linus Torvalds --- arch/m32r/lib/csum_partial_copy.c | 1 + arch/m32r/mm/discontig.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/arch/m32r/lib/csum_partial_copy.c b/arch/m32r/lib/csum_partial_copy.c index c871b4606b07..ddb16a83a8ce 100644 --- a/arch/m32r/lib/csum_partial_copy.c +++ b/arch/m32r/lib/csum_partial_copy.c @@ -58,3 +58,4 @@ csum_partial_copy_from_user (const unsigned char __user *src, return csum_partial(dst, len-missing, sum); } EXPORT_SYMBOL(csum_partial_copy_from_user); +EXPORT_SYMBOL(csum_partial); diff --git a/arch/m32r/mm/discontig.c b/arch/m32r/mm/discontig.c index 1d1a01e54b3f..08e727955555 100644 --- a/arch/m32r/mm/discontig.c +++ b/arch/m32r/mm/discontig.c @@ -12,12 +12,14 @@ #include #include #include +#include #include extern char _end[]; struct pglist_data *node_data[MAX_NUMNODES]; +EXPORT_SYMBOL(node_data); static bootmem_data_t node_bdata[MAX_NUMNODES] __initdata; pg_data_t m32r_node_data[MAX_NUMNODES]; -- cgit v1.2.3 From 0e6d0d89343ab24ddeb39f8b2ffdd2d4c194427c Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 23 Aug 2005 22:48:02 +0100 Subject: [PATCH] Kconfig fix (missing dependencies on PCI in sound/*) a bunch of PCI-only drivers didn't have the right dependency Signed-off-by: Al Viro Signed-off-by: Linus Torvalds --- sound/oss/Kconfig | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sound/oss/Kconfig b/sound/oss/Kconfig index ada1c6496be8..953e5f3ea03d 100644 --- a/sound/oss/Kconfig +++ b/sound/oss/Kconfig @@ -6,7 +6,7 @@ # Prompt user for primary drivers. config SOUND_BT878 tristate "BT878 audio dma" - depends on SOUND_PRIME + depends on SOUND_PRIME && PCI ---help--- Audio DMA support for bt878 based grabber boards. As you might have already noticed, bt878 is listed with two functions in /proc/pci. @@ -87,7 +87,7 @@ config MIDI_EMU10K1 config SOUND_FUSION tristate "Crystal SoundFusion (CS4280/461x)" - depends on SOUND_PRIME + depends on SOUND_PRIME && PCI help This module drives the Crystal SoundFusion devices (CS4280/46xx series) when wired as native sound drivers with AC97 codecs. If @@ -95,7 +95,7 @@ config SOUND_FUSION config SOUND_CS4281 tristate "Crystal Sound CS4281" - depends on SOUND_PRIME + depends on SOUND_PRIME && PCI help Picture and feature list at . @@ -179,7 +179,7 @@ config SOUND_HARMONY config SOUND_SONICVIBES tristate "S3 SonicVibes" - depends on SOUND_PRIME + depends on SOUND_PRIME && PCI help Say Y or M if you have a PCI sound card utilizing the S3 SonicVibes chipset. To find out if your sound card uses a @@ -226,7 +226,7 @@ config SOUND_AU1550_AC97 config SOUND_TRIDENT tristate "Trident 4DWave DX/NX, SiS 7018 or ALi 5451 PCI Audio Core" - depends on SOUND_PRIME + depends on SOUND_PRIME && PCI ---help--- Say Y or M if you have a PCI sound card utilizing the Trident 4DWave-DX/NX chipset or your mother board chipset has SiS 7018 -- cgit v1.2.3 From fa53bb650e6747628276e3ab6d98f51d9bfb0573 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 23 Aug 2005 22:48:07 +0100 Subject: [PATCH] Kconfig fix (non-modular SCSI drivers) non-modular scsi drivers depend on built-in scsi Signed-off-by: Al Viro Signed-off-by: Linus Torvalds --- drivers/scsi/Kconfig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig index f1e8c4223ed1..12c208fb18c5 100644 --- a/drivers/scsi/Kconfig +++ b/drivers/scsi/Kconfig @@ -1696,7 +1696,7 @@ config TT_DMA_EMUL config MAC_SCSI bool "Macintosh NCR5380 SCSI" - depends on MAC && SCSI + depends on MAC && SCSI=y help This is the NCR 5380 SCSI controller included on most of the 68030 based Macintoshes. If you have one of these say Y and read the @@ -1717,7 +1717,7 @@ config SCSI_MAC_ESP config MVME147_SCSI bool "WD33C93 SCSI driver for MVME147" - depends on MVME147 && SCSI + depends on MVME147 && SCSI=y help Support for the on-board SCSI controller on the Motorola MVME147 single-board computer. @@ -1758,7 +1758,7 @@ config SUN3_SCSI config SUN3X_ESP bool "Sun3x ESP SCSI" - depends on SUN3X && SCSI + depends on SUN3X && SCSI=y help The ESP was an on-board SCSI controller used on Sun 3/80 machines. Say Y here to compile in support for it. -- cgit v1.2.3 From acd3bd82c08d1a399760605706a86821148243d9 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 23 Aug 2005 22:48:12 +0100 Subject: [PATCH] ad1980 makefile fix ac97_plugin_ad1980 should trigger build of ac97_codec Signed-off-by: Al Viro Signed-off-by: Linus Torvalds --- sound/oss/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/oss/Makefile b/sound/oss/Makefile index db9afb61d6ff..9bf3ee544d86 100644 --- a/sound/oss/Makefile +++ b/sound/oss/Makefile @@ -80,7 +80,7 @@ obj-$(CONFIG_SOUND_ALI5455) += ali5455.o ac97_codec.o obj-$(CONFIG_SOUND_IT8172) += ite8172.o ac97_codec.o obj-$(CONFIG_SOUND_FORTE) += forte.o ac97_codec.o -obj-$(CONFIG_SOUND_AD1980) += ac97_plugin_ad1980.o +obj-$(CONFIG_SOUND_AD1980) += ac97_plugin_ad1980.o ac97_codec.o obj-$(CONFIG_SOUND_WM97XX) += ac97_plugin_wm97xx.o ifeq ($(CONFIG_MIDI_EMU10K1),y) -- cgit v1.2.3 From 8032230694ec56c168a1404c67a54d281536cbed Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 23 Aug 2005 22:48:17 +0100 Subject: [PATCH] %t... in vsnprintf handling of %t... (ptrdiff_t) in vsnprintf Signed-off-by: Al Viro Signed-off-by: Linus Torvalds --- lib/vsprintf.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/vsprintf.c b/lib/vsprintf.c index a9bda0a361f3..e4e9031dd9c3 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c @@ -269,6 +269,7 @@ int vsnprintf(char *buf, size_t size, const char *fmt, va_list args) int qualifier; /* 'h', 'l', or 'L' for integer fields */ /* 'z' support added 23/7/1999 S.H. */ /* 'z' changed to 'Z' --davidm 1/25/99 */ + /* 't' added for ptrdiff_t */ /* Reject out-of-range values early */ if (unlikely((int) size < 0)) { @@ -339,7 +340,7 @@ int vsnprintf(char *buf, size_t size, const char *fmt, va_list args) /* get the conversion qualifier */ qualifier = -1; if (*fmt == 'h' || *fmt == 'l' || *fmt == 'L' || - *fmt =='Z' || *fmt == 'z') { + *fmt =='Z' || *fmt == 'z' || *fmt == 't') { qualifier = *fmt; ++fmt; if (qualifier == 'l' && *fmt == 'l') { @@ -467,6 +468,8 @@ int vsnprintf(char *buf, size_t size, const char *fmt, va_list args) num = (signed long) num; } else if (qualifier == 'Z' || qualifier == 'z') { num = va_arg(args, size_t); + } else if (qualifier == 't') { + num = va_arg(args, ptrdiff_t); } else if (qualifier == 'h') { num = (unsigned short) va_arg(args, int); if (flags & SIGN) -- cgit v1.2.3 From 17566c3c5ed3ea8f941a135cf960387214c4f6ac Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 23 Aug 2005 22:48:22 +0100 Subject: [PATCH] s390 __CHECKER__ ifdefs remove the bogus games with explicit ifdefs on __CHECKER__ Signed-off-by: Al Viro Signed-off-by: Linus Torvalds --- drivers/s390/crypto/z90crypt.h | 9 --------- include/asm-s390/uaccess.h | 21 ++------------------- 2 files changed, 2 insertions(+), 28 deletions(-) diff --git a/drivers/s390/crypto/z90crypt.h b/drivers/s390/crypto/z90crypt.h index 82a1d97001d7..0a3bb5a10dd4 100644 --- a/drivers/s390/crypto/z90crypt.h +++ b/drivers/s390/crypto/z90crypt.h @@ -35,15 +35,6 @@ #define z90crypt_RELEASE 3 // 2 = PCIXCC, 3 = rewrite for coding standards #define z90crypt_VARIANT 2 // 2 = added PCIXCC MCL3 and CEX2C support -/** - * If we are not using the sparse checker, __user has no use. - */ -#ifdef __CHECKER__ -# define __user __attribute__((noderef, address_space(1))) -#else -# define __user -#endif - /** * struct ica_rsa_modexpo * diff --git a/include/asm-s390/uaccess.h b/include/asm-s390/uaccess.h index a7f43a251f81..3e3bfe6a8fa8 100644 --- a/include/asm-s390/uaccess.h +++ b/include/asm-s390/uaccess.h @@ -149,11 +149,11 @@ struct exception_table_entry }) #endif -#ifndef __CHECKER__ #define __put_user(x, ptr) \ ({ \ __typeof__(*(ptr)) __x = (x); \ int __pu_err; \ + __chk_user_ptr(ptr); \ switch (sizeof (*(ptr))) { \ case 1: \ case 2: \ @@ -167,14 +167,6 @@ struct exception_table_entry } \ __pu_err; \ }) -#else -#define __put_user(x, ptr) \ -({ \ - void __user *p; \ - p = (ptr); \ - 0; \ -}) -#endif #define put_user(x, ptr) \ ({ \ @@ -213,11 +205,11 @@ extern int __put_user_bad(void) __attribute__((noreturn)); }) #endif -#ifndef __CHECKER__ #define __get_user(x, ptr) \ ({ \ __typeof__(*(ptr)) __x; \ int __gu_err; \ + __chk_user_ptr(ptr); \ switch (sizeof(*(ptr))) { \ case 1: \ case 2: \ @@ -232,15 +224,6 @@ extern int __put_user_bad(void) __attribute__((noreturn)); (x) = __x; \ __gu_err; \ }) -#else -#define __get_user(x, ptr) \ -({ \ - void __user *p; \ - p = (ptr); \ - 0; \ -}) -#endif - #define get_user(x, ptr) \ ({ \ -- cgit v1.2.3 From b1daec3089a129a67169d3ae975985a7480fe17f Mon Sep 17 00:00:00 2001 From: Chuck Ebbert <76306.1226@compuserve.com> Date: Tue, 23 Aug 2005 21:36:40 -0400 Subject: [PATCH] i386: fix incorrect FP signal code i386 floating-point exception handling has a bug that can cause error code 0 to be sent instead of the proper code during signal delivery. This is caused by unconditionally checking the IS and c1 bits from the FPU status word when they are not always relevant. The IS bit tells whether an exception is a stack fault and is only relevant when the exception is IE (invalid operation.) The C1 bit determines whether a stack fault is overflow or underflow and is only relevant when IS and IE are set. Signed-off-by: Chuck Ebbert <76306.1226@compuserve.com> Signed-off-by: Linus Torvalds --- arch/i386/kernel/traps.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/arch/i386/kernel/traps.c b/arch/i386/kernel/traps.c index a61f33d06ea3..cd2d5d5514fe 100644 --- a/arch/i386/kernel/traps.c +++ b/arch/i386/kernel/traps.c @@ -803,15 +803,17 @@ void math_error(void __user *eip) */ cwd = get_fpu_cwd(task); swd = get_fpu_swd(task); - switch (((~cwd) & swd & 0x3f) | (swd & 0x240)) { + switch (swd & ~cwd & 0x3f) { case 0x000: default: break; case 0x001: /* Invalid Op */ - case 0x041: /* Stack Fault */ - case 0x241: /* Stack Fault | Direction */ + /* + * swd & 0x240 == 0x040: Stack Underflow + * swd & 0x240 == 0x240: Stack Overflow + * User must clear the SF bit (0x40) if set + */ info.si_code = FPE_FLTINV; - /* Should we clear the SF or let user space do it ???? */ break; case 0x002: /* Denormalize */ case 0x010: /* Underflow */ -- cgit v1.2.3 From 2bbfb16bf345acd81ab1e6e3d4b35964650517ac Mon Sep 17 00:00:00 2001 From: lepton Date: Mon, 22 Aug 2005 17:06:14 -0700 Subject: [PATCH] usbnet oops fix There's a "return the wrong SKB" error in the GL620A cable minidriver (for "usbnet") which can oops. This would not appear when talking Linux-to-Linux, only Linux-to-Windows (for recent Linuxes). Signed-off-by: David Brownell Signed-off-by: Linus Torvalds --- drivers/usb/net/usbnet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/net/usbnet.c b/drivers/usb/net/usbnet.c index 576f3b852fce..4528a00c45b0 100644 --- a/drivers/usb/net/usbnet.c +++ b/drivers/usb/net/usbnet.c @@ -1922,7 +1922,7 @@ static int genelink_rx_fixup (struct usbnet *dev, struct sk_buff *skb) // copy the packet data to the new skb memcpy(skb_put(gl_skb, size), packet->packet_data, size); - skb_return (dev, skb); + skb_return (dev, gl_skb); } // advance to the next packet -- cgit v1.2.3 From d3813fcf105814d06b47fa586f6b61f3cff1cefc Mon Sep 17 00:00:00 2001 From: Andi Kleen Date: Tue, 23 Aug 2005 03:14:27 +0200 Subject: [PATCH] x86_64: Don't oops at boot when empty Opteron node has IO The code to detect IO links on Opteron would not check if the node had actually memory. This could lead to pci_bus_to_node returning an invalid node, which might cause crashes later when dma_alloc_coherent passes it to page_alloc_node(). The bug has been there forever but for some reason it is causing now crashes. Signed-off-by: Andi Kleen Signed-off-by: Linus Torvalds --- arch/x86_64/pci/k8-bus.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/arch/x86_64/pci/k8-bus.c b/arch/x86_64/pci/k8-bus.c index c2c38b579939..d80c323669e0 100644 --- a/arch/x86_64/pci/k8-bus.c +++ b/arch/x86_64/pci/k8-bus.c @@ -47,13 +47,22 @@ fill_mp_bus_to_cpumask(void) * if there are no busses hanging off of the current * ldt link then both the secondary and subordinate * bus number fields are set to 0. + * + * RED-PEN + * This is slightly broken because it assumes + * HT node IDs == Linux node ids, which is not always + * true. However it is probably mostly true. */ if (!(SECONDARY_LDT_BUS_NUMBER(ldtbus) == 0 && SUBORDINATE_LDT_BUS_NUMBER(ldtbus) == 0)) { for (j = SECONDARY_LDT_BUS_NUMBER(ldtbus); j <= SUBORDINATE_LDT_BUS_NUMBER(ldtbus); - j++) - pci_bus_to_node[j] = NODE_ID(nid); + j++) { + int node = NODE_ID(nid); + if (!node_online(node)) + node = 0; + pci_bus_to_node[j] = node; + } } } } -- cgit v1.2.3 From d10689b68aff7b48e3de1a3f7fcd6567bd2905af Mon Sep 17 00:00:00 2001 From: Paul Jackson Date: Tue, 23 Aug 2005 01:04:27 -0700 Subject: [PATCH] cpu_exclusive sched domains on partial nodes temp fix This keeps the kernel/cpuset.c routine update_cpu_domains() from invoking the sched.c routine partition_sched_domains() if the cpuset in question doesn't fall on node boundaries. I have boot tested this on an SN2, and with the help of a couple of ad hoc printk's, determined that it does indeed avoid calling the partition_sched_domains() routine on partial nodes. I did not directly verify that this avoids setting up bogus sched domains or avoids the oops that Hawkes saw. This patch imposes a silent artificial constraint on which cpusets can be used to define dynamic sched domains. This patch should allow proceeding with this new feature in 2.6.13 for the configurations in which it is useful (node alligned sched domains) while avoiding trying to setup sched domains in the less useful cases that can cause the kernel corruption and oops. Signed-off-by: Paul Jackson Acked-by: Ingo Molnar Acked-by: Dinakar Guniguntala Acked-by: John Hawkes Signed-off-by: Linus Torvalds --- kernel/cpuset.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/kernel/cpuset.c b/kernel/cpuset.c index 21a4e3b2cbda..e0d296c5b302 100644 --- a/kernel/cpuset.c +++ b/kernel/cpuset.c @@ -635,6 +635,23 @@ static void update_cpu_domains(struct cpuset *cur) if (par == NULL || cpus_empty(cur->cpus_allowed)) return; + /* + * Hack to avoid 2.6.13 partial node dynamic sched domain bug. + * Require the 'cpu_exclusive' cpuset to include all (or none) + * of the CPUs on each node, or return w/o changing sched domains. + * Remove this hack when dynamic sched domains fixed. + */ + { + int i, j; + + for_each_cpu_mask(i, cur->cpus_allowed) { + for_each_cpu_mask(j, node_to_cpumask(cpu_to_node(i))) { + if (!cpu_isset(j, cur->cpus_allowed)) + return; + } + } + } + /* * Get all cpus from parent's cpus_allowed not part of exclusive * children -- cgit v1.2.3 From 9138dccbb9f39f12474554ef93dcc24de2e9c8f6 Mon Sep 17 00:00:00 2001 From: Deepak Saxena Date: Tue, 23 Aug 2005 13:30:29 -0700 Subject: [PATCH] Fix IXP4xx CLOCK_TICK_RATE As pointed out in the following thread, the CLOCK_TICK_RATE setting for IXP4xx is incorrect b/c the HW ignores the lowest 2 bits of the LATCH value. http://lists.arm.linux.org.uk/pipermail/linux-arm-kernel/2005-August/030950.html Tnx to George Anziger and Egil Hjelmeland for finding the issue. Signed-off-by: Deepak Saxena Signed-off-by: Linus Torvalds --- include/asm-arm/arch-ixp4xx/timex.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/asm-arm/arch-ixp4xx/timex.h b/include/asm-arm/arch-ixp4xx/timex.h index 38c9d77d3727..3745e35cc030 100644 --- a/include/asm-arm/arch-ixp4xx/timex.h +++ b/include/asm-arm/arch-ixp4xx/timex.h @@ -7,7 +7,9 @@ /* * We use IXP425 General purpose timer for our timer needs, it runs at - * 66.66... MHz + * 66.66... MHz. We do a convulted calculation of CLOCK_TICK_RATE b/c the + * timer register ignores the bottom 2 bits of the LATCH value. */ -#define CLOCK_TICK_RATE (66666666) +#define FREQ 66666666 +#define CLOCK_TICK_RATE (((FREQ / HZ & ~IXP4XX_OST_RELOAD_MASK) + 1) * HZ) -- cgit v1.2.3 From 0572e3da3ff5c3744b2f606ecf296d5f89a4bbdf Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Tue, 23 Aug 2005 20:39:14 -0700 Subject: Linux v2.6.13-rc7 Too many changes to release a final 2.6.13. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 2c1486159d8d..300f61f6f6a2 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ VERSION = 2 PATCHLEVEL = 6 SUBLEVEL = 13 -EXTRAVERSION =-rc6 +EXTRAVERSION =-rc7 NAME=Woozy Numbat # *DOCUMENTATION* -- cgit v1.2.3 From 40bb0c3ef52d872de348e10000eb5432a43a147d Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Wed, 24 Aug 2005 17:36:21 +0200 Subject: [PATCH] m68k: fix broken macros causing compile errors Add parens around macro parameters. Signed-off-by: Andreas Schwab Signed-off-by: Linus Torvalds --- include/asm-m68k/page.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/asm-m68k/page.h b/include/asm-m68k/page.h index 99a516709210..206313e2a817 100644 --- a/include/asm-m68k/page.h +++ b/include/asm-m68k/page.h @@ -138,13 +138,13 @@ extern unsigned long m68k_memoffset; #define __pa(vaddr) ((unsigned long)(vaddr)+m68k_memoffset) #define __va(paddr) ((void *)((unsigned long)(paddr)-m68k_memoffset)) #else -#define __pa(vaddr) virt_to_phys((void *)vaddr) -#define __va(paddr) phys_to_virt((unsigned long)paddr) +#define __pa(vaddr) virt_to_phys((void *)(vaddr)) +#define __va(paddr) phys_to_virt((unsigned long)(paddr)) #endif #else /* !CONFIG_SUN3 */ /* This #define is a horrible hack to suppress lots of warnings. --m */ -#define __pa(x) ___pa((unsigned long)x) +#define __pa(x) ___pa((unsigned long)(x)) static inline unsigned long ___pa(unsigned long x) { if(x == 0) -- cgit v1.2.3 From 3725822f7c7134249addcd4549aff086950c8090 Mon Sep 17 00:00:00 2001 From: Paul Jackson Date: Wed, 24 Aug 2005 04:15:10 -0700 Subject: [PATCH] cpu_exclusive sched domains build fix As reported by Paul Mackerras , the previous patch "cpu_exclusive sched domains fix" broke the ppc64 build with CONFIC_CPUSET, yielding error messages: kernel/cpuset.c: In function 'update_cpu_domains': kernel/cpuset.c:648: error: invalid lvalue in unary '&' kernel/cpuset.c:648: error: invalid lvalue in unary '&' On some arch's, the node_to_cpumask() is a function, returning a cpumask_t. But the for_each_cpu_mask() requires an lvalue mask. The following patch fixes this build failure by making a copy of the cpumask_t on the stack. Signed-off-by: Paul Jackson Signed-off-by: Linus Torvalds --- kernel/cpuset.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kernel/cpuset.c b/kernel/cpuset.c index e0d296c5b302..d7f4d0c95737 100644 --- a/kernel/cpuset.c +++ b/kernel/cpuset.c @@ -645,7 +645,9 @@ static void update_cpu_domains(struct cpuset *cur) int i, j; for_each_cpu_mask(i, cur->cpus_allowed) { - for_each_cpu_mask(j, node_to_cpumask(cpu_to_node(i))) { + cpumask_t mask = node_to_cpumask(cpu_to_node(i)); + + for_each_cpu_mask(j, mask) { if (!cpu_isset(j, cur->cpus_allowed)) return; } -- cgit v1.2.3 From 5477d30e841e0f707fd2daddc8cb6949858476ee Mon Sep 17 00:00:00 2001 From: Benjamin Herrenschmidt Date: Wed, 24 Aug 2005 14:18:53 +1000 Subject: [PATCH] ppc64: Export machine_power_off for therm_pm72 module This patch puts back the export of machine_power_off() that was removed by some janitor as it's used for emergency shutdown by the G5 thermal control driver. Wether that driver should use kernel_power_off() instead is debatable and a post-2.6.13 decision. In the meantime, please commit that patch that fixes the driver for now. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Linus Torvalds --- arch/ppc64/kernel/setup.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/ppc64/kernel/setup.c b/arch/ppc64/kernel/setup.c index 687e85595208..e9c24d2dbd91 100644 --- a/arch/ppc64/kernel/setup.c +++ b/arch/ppc64/kernel/setup.c @@ -706,6 +706,8 @@ void machine_power_off(void) local_irq_disable(); while (1) ; } +/* Used by the G5 thermal driver */ +EXPORT_SYMBOL_GPL(machine_power_off); void machine_halt(void) { -- cgit v1.2.3 From b7561524765a30334bf31c56b523aeb3c1a04c7d Mon Sep 17 00:00:00 2001 From: Andi Kleen Date: Wed, 24 Aug 2005 07:37:37 +0200 Subject: [PATCH] x86_64: update defconfig - reenable fusion I mistakedly disabled fusion support in an earlier update. Fusion is commonly used on many x86-64 systems, so this was a problem. This patch fixes that. Signed-off-by: And Kleen Signed-off-by: Linus Torvalds --- arch/x86_64/defconfig | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/arch/x86_64/defconfig b/arch/x86_64/defconfig index 776f3c866b70..b97a61e1c71c 100644 --- a/arch/x86_64/defconfig +++ b/arch/x86_64/defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.13-rc3 -# Fri Jul 22 16:47:31 2005 +# Linux kernel version: 2.6.13-rc6-git3 +# Fri Aug 12 16:40:34 2005 # CONFIG_X86_64=y CONFIG_64BIT=y @@ -284,10 +284,6 @@ CONFIG_IPV6=y # Network testing # # CONFIG_NET_PKTGEN is not set -CONFIG_NETPOLL=y -# CONFIG_NETPOLL_RX is not set -# CONFIG_NETPOLL_TRAP is not set -CONFIG_NET_POLL_CONTROLLER=y # CONFIG_HAMRADIO is not set # CONFIG_IRDA is not set # CONFIG_BT is not set @@ -463,6 +459,7 @@ CONFIG_AIC79XX_DEBUG_MASK=0 # CONFIG_MEGARAID_NEWGEN is not set # CONFIG_MEGARAID_LEGACY is not set CONFIG_SCSI_SATA=y +# CONFIG_SCSI_SATA_AHCI is not set # CONFIG_SCSI_SATA_SVW is not set CONFIG_SCSI_ATA_PIIX=y # CONFIG_SCSI_SATA_NV is not set @@ -492,6 +489,7 @@ CONFIG_SCSI_QLA2XXX=y # CONFIG_SCSI_QLA2300 is not set # CONFIG_SCSI_QLA2322 is not set # CONFIG_SCSI_QLA6312 is not set +# CONFIG_SCSI_QLA24XX is not set # CONFIG_SCSI_LPFC is not set # CONFIG_SCSI_DC395x is not set # CONFIG_SCSI_DC390T is not set @@ -512,9 +510,11 @@ CONFIG_BLK_DEV_DM=y # # Fusion MPT device support # -# CONFIG_FUSION is not set -# CONFIG_FUSION_SPI is not set +CONFIG_FUSION=y +CONFIG_FUSION_SPI=y # CONFIG_FUSION_FC is not set +CONFIG_FUSION_MAX_SGE=128 +# CONFIG_FUSION_CTL is not set # # IEEE 1394 (FireWire) support @@ -585,6 +585,7 @@ CONFIG_8139TOO=y # CONFIG_ACENIC is not set # CONFIG_DL2K is not set CONFIG_E1000=y +# CONFIG_E1000_NAPI is not set # CONFIG_NS83820 is not set # CONFIG_HAMACHI is not set # CONFIG_YELLOWFIN is not set @@ -624,6 +625,10 @@ CONFIG_S2IO=m # CONFIG_NET_FC is not set # CONFIG_SHAPER is not set CONFIG_NETCONSOLE=y +CONFIG_NETPOLL=y +# CONFIG_NETPOLL_RX is not set +# CONFIG_NETPOLL_TRAP is not set +CONFIG_NET_POLL_CONTROLLER=y # # ISDN subsystem -- cgit v1.2.3 From 41290c14640bc9312bf63202d14ebef075b6171a Mon Sep 17 00:00:00 2001 From: Keith Owens Date: Wed, 24 Aug 2005 16:06:25 +1000 Subject: [PATCH] Export pcibios_bus_to_resource pcibios_bus_to_resource is exported on all architectures except ia64 and sparc. Add exports for the two missing architectures. Needed when Yenta socket support is compiled as a module. Signed-off-by: Keith Owens Signed-off-by: Linus Torvalds --- arch/ia64/pci/pci.c | 1 + arch/sparc64/kernel/pci.c | 1 + 2 files changed, 2 insertions(+) diff --git a/arch/ia64/pci/pci.c b/arch/ia64/pci/pci.c index 54d9ed444e4a..f9472c50ab42 100644 --- a/arch/ia64/pci/pci.c +++ b/arch/ia64/pci/pci.c @@ -380,6 +380,7 @@ void pcibios_bus_to_resource(struct pci_dev *dev, res->start = region->start + offset; res->end = region->end + offset; } +EXPORT_SYMBOL(pcibios_bus_to_resource); static int __devinit is_valid_resource(struct pci_dev *dev, int idx) { diff --git a/arch/sparc64/kernel/pci.c b/arch/sparc64/kernel/pci.c index bba140d98b1b..f21c993f8856 100644 --- a/arch/sparc64/kernel/pci.c +++ b/arch/sparc64/kernel/pci.c @@ -540,6 +540,7 @@ void pcibios_bus_to_resource(struct pci_dev *pdev, struct resource *res, pbm->parent->resource_adjust(pdev, res, root); } +EXPORT_SYMBOL(pcibios_bus_to_resource); char * __init pcibios_setup(char *str) { -- cgit v1.2.3 From 9c2c38a122cc23d6a09b8004d60a33913683eedf Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Wed, 24 Aug 2005 14:57:54 +0200 Subject: [PATCH] cfq-iosched.c: minor fixes One critical fix and two minor fixes for 2.6.13-rc7: - Max depth must currently be 2 to allow barriers to function on SCSI - Prefer sync request over async in choosing the next request - Never allow async request to preempt or disturb the "anticipation" for a single cfq process context. This is as-designed, the code right now is buggy in that area. Signed-off-by: Jens Axboe Signed-off-by: Linus Torvalds --- drivers/block/cfq-iosched.c | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/drivers/block/cfq-iosched.c b/drivers/block/cfq-iosched.c index 2435a7c99b2b..cd056e7e64ec 100644 --- a/drivers/block/cfq-iosched.c +++ b/drivers/block/cfq-iosched.c @@ -47,7 +47,7 @@ static int cfq_slice_idle = HZ / 100; /* * disable queueing at the driver/hardware level */ -static int cfq_max_depth = 1; +static int cfq_max_depth = 2; /* * for the hash of cfqq inside the cfqd @@ -385,9 +385,15 @@ cfq_choose_req(struct cfq_data *cfqd, struct cfq_rq *crq1, struct cfq_rq *crq2) return crq2; if (crq2 == NULL) return crq1; - if (cfq_crq_requeued(crq1)) + + if (cfq_crq_requeued(crq1) && !cfq_crq_requeued(crq2)) return crq1; - if (cfq_crq_requeued(crq2)) + else if (cfq_crq_requeued(crq2) && !cfq_crq_requeued(crq1)) + return crq2; + + if (cfq_crq_is_sync(crq1) && !cfq_crq_is_sync(crq2)) + return crq1; + else if (cfq_crq_is_sync(crq2) && !cfq_crq_is_sync(crq1)) return crq2; s1 = crq1->request->sector; @@ -1769,18 +1775,23 @@ static void cfq_crq_enqueued(struct cfq_data *cfqd, struct cfq_queue *cfqq, struct cfq_rq *crq) { - const int sync = cfq_crq_is_sync(crq); + struct cfq_io_context *cic; cfqq->next_crq = cfq_choose_req(cfqd, cfqq->next_crq, crq); - if (sync) { - struct cfq_io_context *cic = crq->io_context; + /* + * we never wait for an async request and we don't allow preemption + * of an async request. so just return early + */ + if (!cfq_crq_is_sync(crq)) + return; - cfq_update_io_thinktime(cfqd, cic); - cfq_update_idle_window(cfqd, cfqq, cic); + cic = crq->io_context; - cic->last_queue = jiffies; - } + cfq_update_io_thinktime(cfqd, cic); + cfq_update_idle_window(cfqd, cfqq, cic); + + cic->last_queue = jiffies; if (cfqq == cfqd->active_queue) { /* -- cgit v1.2.3