## Automatically generated incremental diff ## From: linux-2.5.4-pre4 ## To: linux-2.5.4-pre5 ## Robot: $Id: make-incremental-diff,v 1.9 2001/12/10 00:06:56 hpa Exp $ diff -urN linux-2.5.4-pre4/Documentation/oops-tracing.txt linux/Documentation/oops-tracing.txt --- linux-2.5.4-pre4/Documentation/oops-tracing.txt Sun Sep 30 12:26:08 2001 +++ linux/Documentation/oops-tracing.txt Fri Feb 8 18:56:34 2002 @@ -219,6 +219,11 @@ 2: 'F' if any module was force loaded by insmod -f, ' ' if all modules were loaded normally. + 3: 'S' if the oops occured on an SMP kernel running on hardware that + hasn't been certified as safe to run multiprocessor. + Currently this occurs only on various Athlons that are not + SMP capable. + The primary reason for the 'Tainted: ' string is to tell kernel debuggers if this is a clean kernel or if anything unusual has occurred. Tainting is permanent, even if an offending module is diff -urN linux-2.5.4-pre4/Makefile linux/Makefile --- linux-2.5.4-pre4/Makefile Fri Feb 8 18:56:32 2002 +++ linux/Makefile Fri Feb 8 18:56:34 2002 @@ -1,7 +1,7 @@ VERSION = 2 PATCHLEVEL = 5 SUBLEVEL = 4 -EXTRAVERSION =-pre4 +EXTRAVERSION =-pre5 KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) @@ -332,11 +332,13 @@ @echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))' >>.ver @mv -f .ver $@ +comma := , + init/version.o: init/version.c include/linux/compile.h include/config/MARKER - $(CC) $(CFLAGS) $(CFLAGS_KERNEL) -DUTS_MACHINE='"$(ARCH)"' -c -o init/version.o init/version.c + $(CC) $(CFLAGS) $(CFLAGS_KERNEL) -DUTS_MACHINE='"$(ARCH)"' -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) -c -o init/version.o init/version.c init/main.o: init/main.c include/config/MARKER - $(CC) $(CFLAGS) $(CFLAGS_KERNEL) $(PROFILING) -c -o $*.o $< + $(CC) $(CFLAGS) $(CFLAGS_KERNEL) $(PROFILING) -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) -c -o $*.o $< init/do_mounts.o: init/do_mounts.c include/config/MARKER $(CC) $(CFLAGS) $(CFLAGS_KERNEL) $(PROFILING) -c -o $*.o $< diff -urN linux-2.5.4-pre4/Rules.make linux/Rules.make --- linux-2.5.4-pre4/Rules.make Tue Mar 6 19:31:01 2001 +++ linux/Rules.make Fri Feb 8 18:56:34 2002 @@ -31,6 +31,8 @@ unexport subdir-n unexport subdir- +comma := , + # # Get things started. # @@ -54,7 +56,7 @@ $(CPP) $(CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_$@) $< > $@ %.o: %.c - $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_$@) -c -o $@ $< + $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) $(CFLAGS_$@) -c -o $@ $< @ ( \ echo 'ifeq ($(strip $(subst $(comma),:,$(CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_$@))),$$(strip $$(subst $$(comma),:,$$(CFLAGS) $$(EXTRA_CFLAGS) $$(CFLAGS_$@))))' ; \ echo 'FILES_FLAGS_UP_TO_DATE += $@' ; \ @@ -270,7 +272,7 @@ ifneq "$(strip $(export-objs))" "" $(export-objs): $(export-objs:.o=.c) $(TOPDIR)/include/linux/modversions.h - $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_$@) -DEXPORT_SYMTAB -c $(@:.o=.c) + $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) $(CFLAGS_$@) -DEXPORT_SYMTAB -c $(@:.o=.c) @ ( \ echo 'ifeq ($(strip $(subst $(comma),:,$(CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_$@) -DEXPORT_SYMTAB)),$$(strip $$(subst $$(comma),:,$$(CFLAGS) $$(EXTRA_CFLAGS) $$(CFLAGS_$@) -DEXPORT_SYMTAB)))' ; \ echo 'FILES_FLAGS_UP_TO_DATE += $@' ; \ diff -urN linux-2.5.4-pre4/arch/cris/cris.ld linux/arch/cris/cris.ld --- linux-2.5.4-pre4/arch/cris/cris.ld Wed Jan 23 10:54:42 2002 +++ linux/arch/cris/cris.ld Fri Feb 8 18:56:34 2002 @@ -24,7 +24,6 @@ *(.fixup) *(.text.__*) } - .text.lock : { *(.text.lock) } /* out-of-line lock text */ _etext = . ; /* End of text section */ __etext = .; diff -urN linux-2.5.4-pre4/arch/i386/Config.help linux/arch/i386/Config.help --- linux-2.5.4-pre4/arch/i386/Config.help Fri Jan 25 16:04:31 2002 +++ linux/arch/i386/Config.help Fri Feb 8 18:56:34 2002 @@ -386,7 +386,7 @@ will run on a 386 class machine. - "486" for the AMD/Cyrix/IBM/Intel 486DX/DX2/DX4 or SL/SLC/SLC2/SLC3/SX/SX2 and UMC U5D or U5S. - - "586" for generic Pentium CPUs, possibly lacking the TSC + - "586" for generic Pentium CPUs lacking the TSC (time stamp counter) register. - "Pentium-Classic" for the Intel Pentium. - "Pentium-MMX" for the Intel Pentium MMX. @@ -413,11 +413,68 @@ CONFIG_M586 Select this for an x586 or x686 processor such as the AMD K5, the Intel 5x86 or 6x86, or the Intel 6x86MX. This choice does not - assume the RDTSC instruction. + assume the RDTSC (Read Time Stamp Counter) instruction. CONFIG_M586TSC Select this for a Pentium Classic processor with the RDTSC (Read Time Stamp Counter) instruction for benchmarking. + +CONFIG_M586MMX + Select this for a Pentium with the MMX graphics/multimedia + extended instructions. + +CONFIG_M686 + Select this for a Pro/Celeron/Pentium II. This enables the use of + Pentium Pro extended instructions, and disables the init-time guard + against the f00f bug found in earlier Pentiums. + +CONFIG_MPENTIUMIII + Select this for Intel chips based on the Pentium-III and + Celeron-Coppermine core. Enables use of some extended prefetch + instructions, in addition to the Pentium II extensions. + +CONFIG_MPENTIUM4 + Select this for Intel Pentium 4 chips. Presently these are + treated almost like Pentium IIIs, but with a different cache + shift. + +CONFIG_MCRUSOE + Select this for Transmeta Crusoe processor. Treats the processor + like a 586 with TSC, and sets some GCC optimization flags (like a + Pentium Pro with no alignment requirements). + +CONFIG_MK6 + Select this for an AMD K6-family processor. Enables use of + some extended instructions, and passes appropriate optimization + flags to GCC. + +CONFIG_MK7 + Select this for an AMD Athlon K7-family processor. Enables use of + some extended instructions, and passes appropriate optimization + flags to GCC. + +CONFIG_MCYRIXIII + Select this for a Cyrix III or C3 chip. Presently Linux and GCC + treat this chip as a generic 586. Whilst the CPU is 686 class, + it lacks the cmov extension which gcc assumes is present when + generating 686 code. + +CONFIG_MWINCHIPC6 + Select this for a IDT Winchip C6 chip. Linux and GCC + treat this chip as a 586TSC with some extended instructions + and alignment requirements. + +CONFIG_MWINCHIP2 + Select this for a IDT Winchip-2. Linux and GCC + treat this chip as a 586TSC with some extended instructions + and alignment requirements. + +CONFIG_MWINCHIP3D + Select this for a IDT Winchip-2A or 3. Linux and GCC + treat this chip as a 586TSC with some extended instructions + and alignment reqirements. Development kernels also enable + out of order memory stores for this CPU, which can increase + performance of some operations. CONFIG_VGA_CONSOLE Saying Y here will allow you to use Linux in text mode through a diff -urN linux-2.5.4-pre4/arch/i386/boot/compressed/Makefile linux/arch/i386/boot/compressed/Makefile --- linux-2.5.4-pre4/arch/i386/boot/compressed/Makefile Tue Sep 11 23:08:12 2001 +++ linux/arch/i386/boot/compressed/Makefile Fri Feb 8 18:56:34 2002 @@ -32,8 +32,10 @@ head.o: head.S $(CC) $(AFLAGS) -traditional -c head.S +comma := , + misc.o: misc.c - $(CC) $(CFLAGS) -c misc.c + $(CC) $(CFLAGS) -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) -c misc.c piggy.o: $(SYSTEM) tmppiggy=_tmp_$$$$piggy; \ diff -urN linux-2.5.4-pre4/arch/i386/kernel/head.S linux/arch/i386/kernel/head.S --- linux-2.5.4-pre4/arch/i386/kernel/head.S Fri Feb 8 18:56:32 2002 +++ linux/arch/i386/kernel/head.S Fri Feb 8 18:56:34 2002 @@ -456,12 +456,3 @@ .quad 0x0000000000000000 /* 0x98 not used */ /* Per CPU segments */ .fill NR_CPUS*4,8,0 /* space for TSS's and LDT's */ - -/* - * This is to aid debugging, the various locking macros will be putting - * code fragments here. When an oops occurs we'd rather know that it's - * inside the .text.lock section rather than as some offset from whatever - * function happens to be last in the .text segment. - */ -.section .text.lock -ENTRY(stext_lock) diff -urN linux-2.5.4-pre4/arch/i386/kernel/setup.c linux/arch/i386/kernel/setup.c --- linux-2.5.4-pre4/arch/i386/kernel/setup.c Fri Feb 8 18:56:32 2002 +++ linux/arch/i386/kernel/setup.c Fri Feb 8 18:56:34 2002 @@ -2652,7 +2652,7 @@ /* AMD-defined */ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, "syscall", NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, "mmxext", NULL, + NULL, NULL, NULL, "mp", NULL, NULL, "mmxext", NULL, NULL, NULL, NULL, NULL, NULL, "lm", "3dnowext", "3dnow", /* Transmeta-defined */ diff -urN linux-2.5.4-pre4/arch/i386/kernel/smpboot.c linux/arch/i386/kernel/smpboot.c --- linux-2.5.4-pre4/arch/i386/kernel/smpboot.c Fri Feb 8 18:56:32 2002 +++ linux/arch/i386/kernel/smpboot.c Fri Feb 8 18:56:34 2002 @@ -30,10 +30,12 @@ * Tigran Aivazian : fixed "0.00 in /proc/uptime on SMP" bug. * Maciej W. Rozycki : Bits for genuine 82489DX APICs * Martin J. Bligh : Added support for multi-quad systems + * Dave Jones : Report invalid combinations of Athlon CPUs. */ #include #include +#include #include #include @@ -160,6 +162,35 @@ * Remember we have B step Pentia with bugs */ smp_b_stepping = 1; + + /* + * Certain Athlons might work (for various values of 'work') in SMP + * but they are not certified as MP capable. + */ + if ((c->x86_vendor == X86_VENDOR_AMD) && (c->x86 == 6)) { + + /* Athlon 660/661 is valid. */ + if ((c->x86_model==6) && ((c->x86_mask==0) || (c->x86_mask==1))) + goto valid_k7; + + /* Duron 670 is valid */ + if ((c->x86_model==7) && (c->x86_mask==0)) + goto valid_k7; + + /* Athlon 662, Duron 671, and Athlon >model 7 have capability bit */ + if (((c->x86_model==6) && (c->x86_mask>=2)) || + ((c->x86_model==7) && (c->x86_mask>=1)) || + (c->x86_model> 7)) + if (cpu_has_mp) + goto valid_k7; + + /* If we get here, it's not a certified SMP capable AMD system. */ + printk (KERN_INFO "WARNING: This combination of AMD processors is not suitable for SMP.\n"); + tainted |= TAINT_UNSAFE_SMP; + + } +valid_k7: + } /* diff -urN linux-2.5.4-pre4/arch/i386/vmlinux.lds linux/arch/i386/vmlinux.lds --- linux-2.5.4-pre4/arch/i386/vmlinux.lds Wed Jan 23 10:54:42 2002 +++ linux/arch/i386/vmlinux.lds Fri Feb 8 18:56:34 2002 @@ -13,7 +13,6 @@ *(.fixup) *(.gnu.warning) } = 0x9090 - .text.lock : { *(.text.lock) } /* out-of-line lock text */ _etext = .; /* End of text section */ diff -urN linux-2.5.4-pre4/arch/ia64/sn/fprom/Makefile linux/arch/ia64/sn/fprom/Makefile --- linux-2.5.4-pre4/arch/ia64/sn/fprom/Makefile Thu Apr 5 12:51:47 2001 +++ linux/arch/ia64/sn/fprom/Makefile Fri Feb 8 18:56:34 2002 @@ -18,10 +18,12 @@ fprom: $(OBJ) $(LD) -static -Tfprom.lds -o fprom $(OBJ) $(LIB) +comma := , + .S.o: $(CC) -D__ASSEMBLY__ $(AFLAGS) $(AFLAGS_KERNEL) -c -o $*.o $< .c.o: - $(CC) $(CFLAGS) $(CFLAGS_KERNEL) -c -o $*.o $< + $(CC) $(CFLAGS) -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) $(CFLAGS_KERNEL) -c -o $*.o $< clean: rm -f *.o fprom diff -urN linux-2.5.4-pre4/arch/ia64/tools/Makefile linux/arch/ia64/tools/Makefile --- linux-2.5.4-pre4/arch/ia64/tools/Makefile Mon Oct 9 17:54:57 2000 +++ linux/arch/ia64/tools/Makefile Fri Feb 8 18:56:34 2002 @@ -31,8 +31,10 @@ offsets.h: print_offsets ./print_offsets > offsets.h +comma := , + print_offsets: print_offsets.c FORCE_RECOMPILE - $(CC) $(CFLAGS) print_offsets.c -o $@ + $(CC) $(CFLAGS) -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) print_offsets.c -o $@ FORCE_RECOMPILE: @@ -42,7 +44,7 @@ $(AWK) -f print_offsets.awk $^ > $@ print_offsets.s: print_offsets.c - $(CC) $(CFLAGS) -S print_offsets.c -o $@ + $(CC) $(CFLAGS) -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) -S print_offsets.c -o $@ endif diff -urN linux-2.5.4-pre4/arch/m68k/vmlinux-sun3.lds linux/arch/m68k/vmlinux-sun3.lds --- linux-2.5.4-pre4/arch/m68k/vmlinux-sun3.lds Wed Jan 23 10:54:42 2002 +++ linux/arch/m68k/vmlinux-sun3.lds Fri Feb 8 18:56:34 2002 @@ -10,7 +10,6 @@ *(.head) *(.text) *(.fixup) - *(.text.lock) /* out-of-line lock text */ *(.gnu.warning) } = 0x4e75 .kstrtab : { *(.kstrtab) } diff -urN linux-2.5.4-pre4/arch/m68k/vmlinux.lds linux/arch/m68k/vmlinux.lds --- linux-2.5.4-pre4/arch/m68k/vmlinux.lds Wed Jan 23 10:54:42 2002 +++ linux/arch/m68k/vmlinux.lds Fri Feb 8 18:56:34 2002 @@ -9,7 +9,6 @@ .text : { *(.text) *(.fixup) - *(.text.lock) /* out-of-line lock text */ *(.gnu.warning) } = 0x4e75 .rodata : { *(.rodata) *(.rodata.*) } diff -urN linux-2.5.4-pre4/arch/s390/vmlinux-shared.lds linux/arch/s390/vmlinux-shared.lds --- linux-2.5.4-pre4/arch/s390/vmlinux-shared.lds Wed Jan 23 10:54:42 2002 +++ linux/arch/s390/vmlinux-shared.lds Fri Feb 8 18:56:34 2002 @@ -13,7 +13,6 @@ *(.fixup) *(.gnu.warning) } = 0x0700 - .text.lock : { *(.text.lock) } /* out-of-line lock text */ .rodata : { *(.rodata) } .kstrtab : { *(.kstrtab) } diff -urN linux-2.5.4-pre4/arch/s390/vmlinux.lds linux/arch/s390/vmlinux.lds --- linux-2.5.4-pre4/arch/s390/vmlinux.lds Wed Jan 23 10:54:42 2002 +++ linux/arch/s390/vmlinux.lds Fri Feb 8 18:56:34 2002 @@ -13,7 +13,6 @@ *(.fixup) *(.gnu.warning) } = 0x0700 - .text.lock : { *(.text.lock) } /* out-of-line lock text */ .rodata : { *(.rodata) *(.rodata.*) } .kstrtab : { *(.kstrtab) } diff -urN linux-2.5.4-pre4/arch/s390x/vmlinux-shared.lds linux/arch/s390x/vmlinux-shared.lds --- linux-2.5.4-pre4/arch/s390x/vmlinux-shared.lds Wed Jan 23 10:54:42 2002 +++ linux/arch/s390x/vmlinux-shared.lds Fri Feb 8 18:56:34 2002 @@ -13,7 +13,6 @@ *(.fixup) *(.gnu.warning) } = 0x0700 - .text.lock : { *(.text.lock) } /* out-of-line lock text */ .rodata : { *(.rodata) } .kstrtab : { *(.kstrtab) } diff -urN linux-2.5.4-pre4/arch/s390x/vmlinux.lds linux/arch/s390x/vmlinux.lds --- linux-2.5.4-pre4/arch/s390x/vmlinux.lds Wed Jan 23 10:54:42 2002 +++ linux/arch/s390x/vmlinux.lds Fri Feb 8 18:56:34 2002 @@ -13,7 +13,6 @@ *(.fixup) *(.gnu.warning) } = 0x0700 - .text.lock : { *(.text.lock) } /* out-of-line lock text */ .rodata : { *(.rodata) *(.rodata.*) } .kstrtab : { *(.kstrtab) } diff -urN linux-2.5.4-pre4/arch/sh/vmlinux.lds.S linux/arch/sh/vmlinux.lds.S --- linux-2.5.4-pre4/arch/sh/vmlinux.lds.S Wed Jan 23 10:54:42 2002 +++ linux/arch/sh/vmlinux.lds.S Fri Feb 8 18:56:34 2002 @@ -23,7 +23,6 @@ *(.fixup) *(.gnu.warning) } = 0x0009 - .text.lock : { *(.text.lock) } /* out-of-line lock text */ .rodata : { *(.rodata) *(.rodata.*) } .kstrtab : { *(.kstrtab) } diff -urN linux-2.5.4-pre4/drivers/char/Config.in linux/drivers/char/Config.in --- linux-2.5.4-pre4/drivers/char/Config.in Fri Feb 8 18:56:32 2002 +++ linux/drivers/char/Config.in Fri Feb 8 18:56:34 2002 @@ -208,7 +208,7 @@ dep_tristate '/dev/agpgart (AGP Support)' CONFIG_AGP $CONFIG_DRM_AGP if [ "$CONFIG_AGP" != "n" ]; then - bool ' Intel 440LX/BX/GX and I815/I830M/I840/I850 support' CONFIG_AGP_INTEL + bool ' Intel 440LX/BX/GX and I815/I820/I830M/I840/I845/I850/I860 support' CONFIG_AGP_INTEL bool ' Intel I810/I815/I830M (on-board) support' CONFIG_AGP_I810 bool ' VIA chipset support' CONFIG_AGP_VIA bool ' AMD Irongate, 761, and 762 support' CONFIG_AGP_AMD diff -urN linux-2.5.4-pre4/drivers/char/agp/agp.h linux/drivers/char/agp/agp.h --- linux-2.5.4-pre4/drivers/char/agp/agp.h Tue Nov 27 16:46:57 2001 +++ linux/drivers/char/agp/agp.h Fri Feb 8 18:56:34 2002 @@ -179,6 +179,9 @@ #ifndef PCI_DEVICE_ID_INTEL_820_0 #define PCI_DEVICE_ID_INTEL_820_0 0x2500 #endif +#ifndef PCI_DEVICE_ID_INTEL_820_UP_0 +#define PCI_DEVICE_ID_INTEL_820_UP_0 0x2501 +#endif #ifndef PCI_DEVICE_ID_INTEL_840_0 #define PCI_DEVICE_ID_INTEL_840_0 0x1a21 #endif @@ -189,7 +192,7 @@ #define PCI_DEVICE_ID_INTEL_850_0 0x2530 #endif #ifndef PCI_DEVICE_ID_INTEL_860_0 -#define PCI_DEVICE_ID_INTEL_860_0 0x2532 +#define PCI_DEVICE_ID_INTEL_860_0 0x2531 #endif #ifndef PCI_DEVICE_ID_INTEL_810_DC100_0 #define PCI_DEVICE_ID_INTEL_810_DC100_0 0x7122 @@ -276,6 +279,7 @@ #define I830_RDRAM_ND(x) (((x) & 0x20) >> 5) #define I830_RDRAM_DDT(x) (((x) & 0x18) >> 3) +/* This one is for I830MP w. an external graphic card */ #define INTEL_I830_ERRSTS 0x92 /* intel i820 registers */ diff -urN linux-2.5.4-pre4/drivers/char/agp/agpgart_be.c linux/drivers/char/agp/agpgart_be.c --- linux-2.5.4-pre4/drivers/char/agp/agpgart_be.c Fri Nov 30 08:52:41 2001 +++ linux/drivers/char/agp/agpgart_be.c Fri Feb 8 18:56:34 2002 @@ -409,8 +409,18 @@ * AGP devices and collect their data. */ - while ((device = pci_find_class(PCI_CLASS_DISPLAY_VGA << 8, - device)) != NULL) { + + pci_for_each_dev(device) + { + /* + * Enable AGP devices. Most will be VGA display but + * some may be coprocessors on non VGA devices too + */ + + if((((device->class >> 16) & 0xFF) != PCI_BASE_CLASS_DISPLAY) && + (device->class != (PCI_CLASS_PROCESSOR_CO << 8))) + continue; + pci_read_config_dword(device, 0x04, &scratch); if (!(scratch & 0x00100000)) @@ -1826,7 +1836,7 @@ agp_bridge.needs_scratch_page = FALSE; agp_bridge.configure = intel_820_configure; agp_bridge.fetch_size = intel_8xx_fetch_size; - agp_bridge.cleanup = intel_cleanup; + agp_bridge.cleanup = intel_820_cleanup; agp_bridge.tlb_flush = intel_820_tlbflush; agp_bridge.mask_memory = intel_mask_memory; agp_bridge.agp_enable = agp_generic_agp_enable; @@ -1839,6 +1849,9 @@ agp_bridge.free_by_type = agp_generic_free_by_type; agp_bridge.agp_alloc_page = agp_generic_alloc_page; agp_bridge.agp_destroy_page = agp_generic_destroy_page; + agp_bridge.suspend = agp_generic_suspend; + agp_bridge.resume = agp_generic_resume; + agp_bridge.cant_use_aperture = 0; return 0; @@ -1869,6 +1882,9 @@ agp_bridge.free_by_type = agp_generic_free_by_type; agp_bridge.agp_alloc_page = agp_generic_alloc_page; agp_bridge.agp_destroy_page = agp_generic_destroy_page; + agp_bridge.suspend = agp_generic_suspend; + agp_bridge.resume = agp_generic_resume; + agp_bridge.cant_use_aperture = 0; return 0; @@ -3307,8 +3323,18 @@ * AGP devices and collect their data. */ - while ((device = pci_find_class(PCI_CLASS_DISPLAY_VGA << 8, - device)) != NULL) { + + pci_for_each_dev(device) + { + /* + * Enable AGP devices. Most will be VGA display but + * some may be coprocessors on non VGA devices too + */ + + if((((device->class >> 16) & 0xFF) != PCI_BASE_CLASS_DISPLAY) && + (device->class != (PCI_CLASS_PROCESSOR_CO << 8))) + continue; + pci_read_config_dword(device, 0x04, &scratch); if (!(scratch & 0x00100000)) @@ -3606,6 +3632,12 @@ "i815", intel_generic_setup }, { PCI_DEVICE_ID_INTEL_820_0, + PCI_VENDOR_ID_INTEL, + INTEL_I820, + "Intel", + "i820", + intel_820_setup }, + { PCI_DEVICE_ID_INTEL_820_UP_0, PCI_VENDOR_ID_INTEL, INTEL_I820, "Intel", diff -urN linux-2.5.4-pre4/drivers/char/agp/agpgart_fe.c linux/drivers/char/agp/agpgart_fe.c --- linux-2.5.4-pre4/drivers/char/agp/agpgart_fe.c Tue Jan 15 10:56:35 2002 +++ linux/drivers/char/agp/agpgart_fe.c Fri Feb 8 18:56:34 2002 @@ -301,7 +301,7 @@ agp_memory *memory; memory = agp_allocate_memory(pg_count, type); - printk(KERN_DEBUG "memory : %p\n", memory); + printk(KERN_DEBUG "agp_allocate_memory: %p\n", memory); if (memory == NULL) { return NULL; } diff -urN linux-2.5.4-pre4/drivers/char/ftape/lowlevel/fdc-io.c linux/drivers/char/ftape/lowlevel/fdc-io.c --- linux-2.5.4-pre4/drivers/char/ftape/lowlevel/fdc-io.c Mon Oct 16 12:58:51 2000 +++ linux/drivers/char/ftape/lowlevel/fdc-io.c Fri Feb 8 18:56:34 2002 @@ -928,18 +928,6 @@ set_dma_mode(fdc.dma, mode); set_dma_addr(fdc.dma, virt_to_bus((void*)addr)); set_dma_count(fdc.dma, count); -#ifdef GCC_2_4_5_BUG - /* This seemingly stupid construction confuses the gcc-2.4.5 - * code generator enough to create correct code. - */ - if (1) { - int i; - - for (i = 0; i < 1; ++i) { - ftape_udelay(1); - } - } -#endif enable_dma(fdc.dma); } diff -urN linux-2.5.4-pre4/drivers/char/serial.c linux/drivers/char/serial.c --- linux-2.5.4-pre4/drivers/char/serial.c Mon Jan 7 13:12:34 2002 +++ linux/drivers/char/serial.c Fri Feb 8 18:56:34 2002 @@ -3095,36 +3095,52 @@ sstate = rs_table + line; sstate->count++; - if (sstate->info) { - *ret_info = sstate->info; - return 0; - } + info = sstate->info; + + /* + * If the async_struct is already allocated, do the fastpath. + */ + if (info) + goto out; + info = kmalloc(sizeof(struct async_struct), GFP_KERNEL); if (!info) { sstate->count--; return -ENOMEM; } + memset(info, 0, sizeof(struct async_struct)); init_waitqueue_head(&info->open_wait); init_waitqueue_head(&info->close_wait); init_waitqueue_head(&info->delta_msr_wait); info->magic = SERIAL_MAGIC; info->port = sstate->port; + info->hub6 = sstate->hub6; info->flags = sstate->flags; - info->io_type = sstate->io_type; - info->iomem_base = sstate->iomem_base; - info->iomem_reg_shift = sstate->iomem_reg_shift; info->xmit_fifo_size = sstate->xmit_fifo_size; + info->state = sstate; info->line = line; + info->iomem_base = sstate->iomem_base; + info->iomem_reg_shift = sstate->iomem_reg_shift; + info->io_type = sstate->io_type; info->tqueue.routine = do_softint; info->tqueue.data = info; - info->state = sstate; + if (sstate->info) { kfree(info); - *ret_info = sstate->info; - return 0; + info = sstate->info; + } else { + sstate->info = info; + } + +out: + /* + * If this is the first open, copy over some timeouts. + */ + if (sstate->count == 1) { + info->closing_wait = sstate->closing_wait; } - *ret_info = sstate->info = info; + *ret_info = info; return 0; } diff -urN linux-2.5.4-pre4/drivers/hotplug/pci_hotplug_core.c linux/drivers/hotplug/pci_hotplug_core.c --- linux-2.5.4-pre4/drivers/hotplug/pci_hotplug_core.c Fri Feb 8 18:56:32 2002 +++ linux/drivers/hotplug/pci_hotplug_core.c Fri Feb 8 18:56:34 2002 @@ -396,7 +396,7 @@ static struct file_system_type pcihpfs_type = { owner: THIS_MODULE, - name: "pchihpfs", + name: "pcihpfs", get_sb: pcihpfs_get_sb, fs_flags: FS_LITTER, }; diff -urN linux-2.5.4-pre4/drivers/ide/Config.help linux/drivers/ide/Config.help --- linux-2.5.4-pre4/drivers/ide/Config.help Fri Jan 25 16:04:31 2002 +++ linux/drivers/ide/Config.help Fri Feb 8 18:56:34 2002 @@ -796,3 +796,61 @@ Enable vendor-specific code for TiVo IDE disks. Unless you are the IDE maintainer, you probably do not want to mess with this. +CONFIG_IDEDISK_STROKE + Should you have a system w/ an AWARD Bios and your drives are larger + than 32GB and it will not boot, one is required to perform a few OEM + operations first. The option is called "STROKE" because it allows + one to "soft clip" the drive to work around a barrier limit. For + Maxtor drives it is called "jumpon.exe". Please search Maxtor's + web-site for "JUMPON.EXE". IBM has a similar tool at: + . + + If you are unsure, say N here. + +CONFIG_IDE_TASK_IOCTL + This is a direct raw access to the media. It is a complex but + elegant solution to test and validate the domain of the hardware and + perform below the driver data recovery if needed. This is the most + basic form of media-forensics. + + If you are unsure, say N here. + +CONFIG_BLK_DEV_IDEDMA_FORCED + This is an old piece of lost code from Linux 2.0 Kernels. + + Generally say N here. + +CONFIG_IDEDMA_ONLYDISK + This is used if you know your ATAPI Devices are going to fail DMA + Transfers. + + Generally say N here. + +CONFIG_BLK_DEV_IT8172 + Say Y here to support the on-board IDE controller on the Integrated + Technology Express, Inc. ITE8172 SBC. Vendor page at + ; picture of the + board at . + +CONFIG_IT8172_TUNING + Say Y here to support tuning the ITE8172's IDE interface. This makes + it possible to set DMA channel or PIO opration and the transfer rate. + +CONFIG_IT8172_REVC + Say Y here to support the older, Revision C version of the Integrated + Technology Express, Inc. ITE8172 SBC. Vendor page at + ; picture of the + board at . + +CONFIG_IT8172_SCR0 + Say Y here to support smart-card reader 0 (SCR0) on the Integrated + Technology Express, Inc. ITE8172 SBC. Vendor page at + ; picture of the + board at . + +CONFIG_IT8172_SCR1 + Say Y here to support smart-card reader 1 (SCR1) on the Integrated + Technology Express, Inc. ITE8172 SBC. Vendor page at + ; picture of the + board at . + diff -urN linux-2.5.4-pre4/drivers/input/input.c linux/drivers/input/input.c --- linux-2.5.4-pre4/drivers/input/input.c Fri Feb 8 18:56:32 2002 +++ linux/drivers/input/input.c Fri Feb 8 18:56:34 2002 @@ -472,7 +472,7 @@ while (handler) { if ((id = input_match_device(handler->id_table, dev))) - if ((handle = handler->connect(handler, dev))) + if ((handle = handler->connect(handler, dev, id))) input_link_handle(handle); handler = handler->next; } diff -urN linux-2.5.4-pre4/drivers/media/video/Config.in linux/drivers/media/video/Config.in --- linux-2.5.4-pre4/drivers/media/video/Config.in Fri Nov 9 14:01:22 2001 +++ linux/drivers/media/video/Config.in Fri Feb 8 18:56:34 2002 @@ -22,10 +22,8 @@ fi fi if [ "$CONFIG_PARPORT" != "n" ]; then - if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then - if [ "$CONFIG_PARPORT_1284" != "n" ]; then - dep_tristate ' Winbond W9966CF Webcam Video For Linux (EXPERIMENTAL)' CONFIG_VIDEO_W9966 $CONFIG_VIDEO_DEV $CONFIG_PARPORT - fi + if [ "$CONFIG_PARPORT_1284" != "n" ]; then + dep_tristate ' W9966CF Webcam (FlyCam Supra and others) Video For Linux' CONFIG_VIDEO_W9966 $CONFIG_VIDEO_DEV $CONFIG_PARPORT fi fi dep_tristate ' CPiA Video For Linux' CONFIG_VIDEO_CPIA $CONFIG_VIDEO_DEV diff -urN linux-2.5.4-pre4/drivers/pcmcia/cardbus.c linux/drivers/pcmcia/cardbus.c --- linux-2.5.4-pre4/drivers/pcmcia/cardbus.c Fri Feb 8 18:56:32 2002 +++ linux/drivers/pcmcia/cardbus.c Fri Feb 8 18:56:35 2002 @@ -279,8 +279,7 @@ pci_readw(dev, PCI_DEVICE_ID, &dev->device); dev->hdr_type = hdr & 0x7f; - dev->dev.parent = bus->device; - dev->dev.sysdata = bus->sysdata; + dev->dev.parent = bus->dev; strcpy(dev->dev.name, dev->name); strcpy(dev->dev.bus_id, dev->slot_name); device_register(&dev->dev); diff -urN linux-2.5.4-pre4/drivers/sound/opl3sa2.c linux/drivers/sound/opl3sa2.c --- linux-2.5.4-pre4/drivers/sound/opl3sa2.c Sun Nov 25 09:43:42 2001 +++ linux/drivers/sound/opl3sa2.c Fri Feb 8 18:56:35 2002 @@ -55,6 +55,7 @@ * sb_card.c and awe_wave.c. (Dec 12, 2000) * Scott Murray Some small cleanups to the init code output. * (Jan 7, 2001) + * Zwane Mwaikambo Added PM support. (Dec 4 2001) * */ @@ -62,13 +63,14 @@ #include #include #include - +#include #include "sound_config.h" #include "ad1848.h" #include "mpu401.h" /* Useful control port indexes: */ +#define OPL3SA2_PM 0x01 #define OPL3SA2_SYS_CTRL 0x02 #define OPL3SA2_IRQ_CONFIG 0x03 #define OPL3SA2_DMA_CONFIG 0x06 @@ -86,6 +88,11 @@ #define DEFAULT_MIC 50 #define DEFAULT_TIMBRE 0 +/* Power saving modes */ +#define OPL3SA2_PM_MODE1 0x05 +#define OPL3SA2_PM_MODE2 0x04 +#define OPL3SA2_PM_MODE3 0x03 + /* For checking against what the card returns: */ #define VERSION_UNKNOWN 0 #define VERSION_YMF711 1 @@ -121,6 +128,10 @@ typedef struct opl3sa2_mixerdata_tag { unsigned short cfg_port; unsigned short padding; + unsigned char reg; + unsigned int in_suspend; + struct pm_dev *pmdev; + unsigned int card; unsigned int volume_l; unsigned int volume_r; unsigned int mic; @@ -328,6 +339,20 @@ } +static void opl3sa2_mixer_restore(opl3sa2_mixerdata* devc, int card) +{ + if (devc) { + opl3sa2_set_volume(devc, devc->volume_l, devc->volume_r); + opl3sa2_set_mic(devc, devc->mic); + + if (chipset[card] == CHIPSET_OPL3SA3) { + opl3sa3_set_bass(devc, devc->bass_l, devc->bass_r); + opl3sa3_set_treble(devc, devc->treble_l, devc->treble_r); + } + } +} + + static inline void arg_to_vol_mono(unsigned int vol, int* value) { int left; @@ -892,6 +917,77 @@ /* End of component functions */ +/* Power Management support functions */ +static int opl3sa2_suspend(struct pm_dev *pdev, unsigned char pm_mode) +{ + unsigned long flags; + opl3sa2_mixerdata *p; + + if (!pdev) + return -EINVAL; + + save_flags(flags); + cli(); + + p = (opl3sa2_mixerdata *) pdev->data; + p->in_suspend = 1; + switch (pm_mode) { + case 1: + pm_mode = OPL3SA2_PM_MODE1; + break; + case 2: + pm_mode = OPL3SA2_PM_MODE2; + break; + case 3: + pm_mode = OPL3SA2_PM_MODE3; + break; + default: + pm_mode = OPL3SA2_PM_MODE3; + break; + } + + /* its supposed to automute before suspending, so we wont bother */ + opl3sa2_read(p->cfg_port, OPL3SA2_PM, &p->reg); + opl3sa2_write(p->cfg_port, OPL3SA2_PM, p->reg | pm_mode); + + restore_flags(flags); + return 0; +} + +static int opl3sa2_resume(struct pm_dev *pdev) +{ + unsigned long flags; + opl3sa2_mixerdata *p; + + if (!pdev) + return -EINVAL; + + p = (opl3sa2_mixerdata *) pdev->data; + save_flags(flags); + cli(); + + /* I don't think this is necessary */ + opl3sa2_write(p->cfg_port, OPL3SA2_PM, p->reg); + opl3sa2_mixer_restore(p, p->card); + p->in_suspend = 0; + + restore_flags(flags); + return 0; +} + +static int opl3sa2_pm_callback(struct pm_dev *pdev, pm_request_t rqst, void *data) +{ + unsigned char mode = (unsigned char)data; + + switch (rqst) { + case PM_SUSPEND: + return opl3sa2_suspend(pdev, mode); + + case PM_RESUME: + return opl3sa2_resume(pdev); + } + return 0; +} /* * Install OPL3-SA2 based card(s). @@ -989,6 +1085,12 @@ attach_opl3sa2_mss(&cfg_mss[card]); attach_opl3sa2_mixer(&cfg[card], card); + opl3sa2_data[card].card = card; + /* register our power management capabilities */ + opl3sa2_data[card].pmdev = pm_register(PM_ISA_DEV, card, opl3sa2_pm_callback); + if (opl3sa2_data[card].pmdev) + opl3sa2_data[card].pmdev->data = &opl3sa2_data[card]; + /* * Set the Yamaha 3D enhancement mode (aka Ymersion) if asked to and * it's supported. @@ -1033,6 +1135,9 @@ int card; for(card = 0; card < opl3sa2_cards_num; card++) { + if (opl3sa2_data[card].pmdev) + pm_unregister(opl3sa2_data[card].pmdev); + if(cfg_mpu[card].slots[1] != -1) { unload_opl3sa2_mpu(&cfg_mpu[card]); } diff -urN linux-2.5.4-pre4/drivers/video/Config.in linux/drivers/video/Config.in --- linux-2.5.4-pre4/drivers/video/Config.in Wed Jan 23 15:25:34 2002 +++ linux/drivers/video/Config.in Fri Feb 8 18:56:36 2002 @@ -121,14 +121,14 @@ if [ "$CONFIG_FB_MATROX" != "n" ]; then bool ' Millennium I/II support' CONFIG_FB_MATROX_MILLENIUM bool ' Mystique support' CONFIG_FB_MATROX_MYSTIQUE - bool ' G100/G200/G400/G450 support' CONFIG_FB_MATROX_G100 + bool ' G100/G200/G400/G450/G550 support' CONFIG_FB_MATROX_G100 if [ "$CONFIG_I2C" != "n" ]; then dep_tristate ' Matrox I2C support' CONFIG_FB_MATROX_I2C $CONFIG_FB_MATROX $CONFIG_I2C_ALGOBIT if [ "$CONFIG_FB_MATROX_G100" = "y" ]; then dep_tristate ' G400 second head support' CONFIG_FB_MATROX_MAVEN $CONFIG_FB_MATROX_I2C fi fi - dep_tristate ' G450 second head support' CONFIG_FB_MATROX_G450 $CONFIG_FB_MATROX_G100 + dep_tristate ' G450/G550 second head support' CONFIG_FB_MATROX_G450 $CONFIG_FB_MATROX_G100 bool ' Multihead support' CONFIG_FB_MATROX_MULTIHEAD fi tristate ' ATI Mach64 display support (EXPERIMENTAL)' CONFIG_FB_ATY diff -urN linux-2.5.4-pre4/fs/Config.in linux/fs/Config.in --- linux-2.5.4-pre4/fs/Config.in Tue Jan 29 21:30:41 2002 +++ linux/fs/Config.in Fri Feb 8 18:56:36 2002 @@ -8,9 +8,9 @@ tristate 'Kernel automounter support' CONFIG_AUTOFS_FS tristate 'Kernel automounter version 4 support (also supports v3)' CONFIG_AUTOFS4_FS -dep_tristate 'Reiserfs support' CONFIG_REISERFS_FS $CONFIG_EXPERIMENTAL -dep_mbool ' Have reiserfs do extra internal checking' CONFIG_REISERFS_CHECK $CONFIG_REISERFS_FS $CONFIG_EXPERIMENTAL -dep_mbool ' Stats in /proc/fs/reiserfs' CONFIG_REISERFS_PROC_INFO $CONFIG_REISERFS_FS $CONFIG_EXPERIMENTAL +tristate 'Reiserfs support' CONFIG_REISERFS_FS +dep_mbool ' Have reiserfs do extra internal checking' CONFIG_REISERFS_CHECK $CONFIG_REISERFS_FS +dep_mbool ' Stats in /proc/fs/reiserfs' CONFIG_REISERFS_PROC_INFO $CONFIG_REISERFS_FS dep_tristate 'ADFS file system support' CONFIG_ADFS_FS $CONFIG_EXPERIMENTAL dep_mbool ' ADFS write support (DANGEROUS)' CONFIG_ADFS_FS_RW $CONFIG_ADFS_FS $CONFIG_EXPERIMENTAL diff -urN linux-2.5.4-pre4/fs/inflate_fs/infutil.h linux/fs/inflate_fs/infutil.h --- linux-2.5.4-pre4/fs/inflate_fs/infutil.h Thu Oct 25 13:53:53 2001 +++ linux/fs/inflate_fs/infutil.h Fri Feb 8 18:56:36 2002 @@ -11,7 +11,7 @@ #ifndef _INFUTIL_H #define _INFUTIL_H -#include "zconf.h" +#include #include "inftrees.h" #include "infcodes.h" diff -urN linux-2.5.4-pre4/fs/inflate_fs/zconf.h linux/fs/inflate_fs/zconf.h --- linux-2.5.4-pre4/fs/inflate_fs/zconf.h Thu Oct 25 13:53:53 2001 +++ linux/fs/inflate_fs/zconf.h Wed Dec 31 16:00:00 1969 @@ -1,90 +0,0 @@ -/* zconf.h -- configuration of the zlib compression library - * Copyright (C) 1995-1998 Jean-loup Gailly. - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* @(#) $Id$ */ - -#ifndef _ZCONF_H -#define _ZCONF_H - -#if defined(__GNUC__) || defined(__386__) || defined(i386) -# ifndef __32BIT__ -# define __32BIT__ -# endif -#endif - -#if defined(__STDC__) || defined(__cplusplus) -# ifndef STDC -# define STDC -# endif -#endif - -/* The memory requirements for deflate are (in bytes): - (1 << (windowBits+2)) + (1 << (memLevel+9)) - that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values) - plus a few kilobytes for small objects. For example, if you want to reduce - the default memory requirements from 256K to 128K, compile with - make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7" - Of course this will generally degrade compression (there's no free lunch). - - The memory requirements for inflate are (in bytes) 1 << windowBits - that is, 32K for windowBits=15 (default value) plus a few kilobytes - for small objects. -*/ - -/* Maximum value for memLevel in deflateInit2 */ -#ifndef MAX_MEM_LEVEL -# define MAX_MEM_LEVEL 9 -#endif - -/* Maximum value for windowBits in deflateInit2 and inflateInit2. - * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files - * created by gzip. (Files created by minigzip can still be extracted by - * gzip.) - */ -#ifndef MAX_WBITS -# define MAX_WBITS 15 /* 32K LZ77 window */ -#endif - - /* Type declarations */ - -#ifndef OF /* function prototypes */ -# ifdef STDC -# define OF(args) args -# else -# define OF(args) () -# endif -#endif - -#ifndef ZEXPORT -# define ZEXPORT -#endif -#ifndef ZEXPORTVA -# define ZEXPORTVA -#endif -#ifndef ZEXTERN -# define ZEXTERN extern -#endif -#ifndef FAR -# define FAR -#endif - -typedef unsigned char Byte; /* 8 bits */ -typedef unsigned int uInt; /* 16 bits or more */ -typedef unsigned long uLong; /* 32 bits or more */ - -typedef Byte FAR Bytef; -typedef char FAR charf; -typedef int FAR intf; -typedef uInt FAR uIntf; -typedef uLong FAR uLongf; - -typedef void FAR *voidpf; -typedef void *voidp; - -#include /* for off_t */ -#include /* for SEEK_* and off_t */ -#define z_off_t off_t - -#endif /* _ZCONF_H */ diff -urN linux-2.5.4-pre4/fs/nfsd/export.c linux/fs/nfsd/export.c --- linux-2.5.4-pre4/fs/nfsd/export.c Fri Feb 8 18:56:33 2002 +++ linux/fs/nfsd/export.c Fri Feb 8 18:56:36 2002 @@ -19,6 +19,7 @@ #include #include #include +#include #include #include @@ -71,12 +72,15 @@ svc_export * exp_get(svc_client *clp, kdev_t dev, ino_t ino) { - svc_export * exp; + struct list_head *head, *p; + svc_export *exp = NULL; if (!clp) return NULL; - for (exp = clp->cl_export[EXPORT_HASH(dev)]; exp; exp = exp->ex_next) { + head = &clp->cl_export[EXPORT_HASH(dev)]; + list_for_each(p, head) { + exp = list_entry(p, svc_export, ex_hash); if (exp->ex_ino == ino && kdev_same(exp->ex_dev, dev)) break; } @@ -86,13 +90,16 @@ svc_export * exp_get_by_name(svc_client *clp, struct vfsmount *mnt, struct dentry *dentry) { + struct list_head *head, *p; int hash = EXPORT_HASH(mnt->mnt_sb->s_dev); - svc_export *exp; + svc_export *exp = NULL; if (!clp) return NULL; - for (exp = clp->cl_export[hash]; exp; exp = exp->ex_next) { + head = &clp->cl_export[hash]; + list_for_each(p, head) { + exp = list_entry(p, svc_export, ex_hash); if (exp->ex_dentry == dentry && exp->ex_mnt == mnt) break; } @@ -105,14 +112,15 @@ static svc_export * exp_parent(svc_client *clp, struct super_block *sb, struct dentry *dentry) { - svc_export *exp; + struct list_head *head = &clp->cl_export[EXPORT_HASH(sb->s_dev)]; + struct list_head *p; + svc_export *exp = NULL; - if (clp == NULL) - return NULL; - - for (exp = clp->cl_export[EXPORT_HASH(sb->s_dev)]; exp; exp = exp->ex_next) + list_for_each(p, head) { + exp = list_entry(p, svc_export, ex_hash); if (is_subdir(dentry, exp->ex_dentry)) break; + } return exp; } @@ -124,19 +132,33 @@ static svc_export * exp_child(svc_client *clp, struct super_block *sb, struct dentry *dentry) { - svc_export *exp; - - if (clp == NULL) - return NULL; - - for (exp = clp->cl_export[EXPORT_HASH(sb->s_dev)]; exp; exp = exp->ex_next) { - struct dentry *ndentry = exp->ex_dentry; + struct list_head *head = &clp->cl_export[EXPORT_HASH(sb->s_dev)]; + struct list_head *p; + svc_export *exp = NULL; + struct dentry *ndentry; + + list_for_each(p, head) { + exp = list_entry(p, svc_export, ex_hash); + ndentry = exp->ex_dentry; if (ndentry && is_subdir(ndentry->d_parent, dentry)) break; } return exp; } +/* Update parent pointers of all exports */ +static void exp_change_parents(svc_client *clp, svc_export *old, svc_export *new) +{ + struct list_head *head = &clp->cl_list; + struct list_head *p; + + list_for_each(p, head) { + svc_export *exp = list_entry(p, svc_export, ex_list); + if (exp->ex_parent == old) + exp->ex_parent = new; + } +} + /* * Export a file system. */ @@ -145,10 +167,9 @@ { svc_client *clp; svc_export *exp, *parent; - svc_export **head; struct nameidata nd; struct inode *inode = NULL; - int i, err; + int err; kdev_t dev; ino_t ino; @@ -244,21 +265,11 @@ exp->ex_anon_gid = nxp->ex_anon_gid; /* Update parent pointers of all exports */ - if (parent) { - for (i = 0; i < NFSCLNT_EXPMAX; i++) { - svc_export *temp = clp->cl_export[i]; - - while (temp) { - if (temp->ex_parent == parent) - temp->ex_parent = exp; - temp = temp->ex_next; - } - } - } + if (parent) + exp_change_parents(clp, parent, exp); - head = clp->cl_export + EXPORT_HASH(dev); - exp->ex_next = *head; - *head = exp; + list_add(&exp->ex_hash, clp->cl_export + EXPORT_HASH(dev)); + list_add_tail(&exp->ex_list, &clp->cl_list); err = 0; @@ -281,21 +292,12 @@ static void exp_do_unexport(svc_export *unexp) { - svc_export *exp; - svc_client *clp; struct dentry *dentry; struct vfsmount *mnt; struct inode *inode; - int i; /* Update parent pointers. */ - clp = unexp->ex_client; - for (i = 0; i < NFSCLNT_EXPMAX; i++) { - for (exp = clp->cl_export[i]; exp; exp = exp->ex_next) - if (exp->ex_parent == unexp) - exp->ex_parent = unexp->ex_parent; - } - + exp_change_parents(unexp->ex_client, unexp, unexp->ex_parent); dentry = unexp->ex_dentry; mnt = unexp->ex_mnt; inode = dentry->d_inode; @@ -315,18 +317,15 @@ static void exp_unexport_all(svc_client *clp) { - svc_export *exp; - int i; + struct list_head *p = &clp->cl_list; dprintk("unexporting all fs's for clnt %p\n", clp); - for (i = 0; i < NFSCLNT_EXPMAX; i++) { - exp = clp->cl_export[i]; - clp->cl_export[i] = NULL; - while (exp) { - svc_export *next = exp->ex_next; - exp_do_unexport(exp); - exp = next; - } + + while (!list_empty(p)) { + svc_export *exp = list_entry(p->next, svc_export, ex_list); + list_del(&exp->ex_list); + list_del(&exp->ex_hash); + exp_do_unexport(exp); } } @@ -337,7 +336,6 @@ exp_unexport(struct nfsctl_export *nxp) { svc_client *clp; - svc_export **expp, *exp = NULL; int err; /* Consistency check */ @@ -351,17 +349,12 @@ clp = exp_getclientbyname(nxp->ex_client); if (clp) { kdev_t ex_dev = to_kdev_t(nxp->ex_dev); - expp = clp->cl_export + EXPORT_HASH(ex_dev); - while ((exp = *expp) != NULL) { - if (kdev_same(exp->ex_dev, ex_dev)) { - if (exp->ex_ino == nxp->ex_ino) { - *expp = exp->ex_next; - exp_do_unexport(exp); - err = 0; - break; - } - } - expp = &(exp->ex_next); + svc_export *exp = exp_get(clp, ex_dev, nxp->ex_ino); + if (exp) { + list_del(&exp->ex_hash); + list_del(&exp->ex_list); + exp_do_unexport(exp); + err = 0; } } @@ -522,6 +515,67 @@ return NULL; } +/* Iterator */ + +static void *e_start(struct seq_file *m, loff_t *pos) +{ + loff_t n = *pos; + unsigned client, export; + svc_client *clp; + struct list_head *p; + + exp_readlock(); + if (!n--) + return (void *)1; + client = n >> 32; + export = n & ((1LL<<32) - 1); + for (clp = clients; client && clp; clp = clp->cl_next, client--) + ; + if (!clp) + return NULL; + list_for_each(p, &clp->cl_list) + if (!export--) + return list_entry(p, svc_export, ex_list); + n &= ~((1LL<<32) - 1); + do { + clp = clp->cl_next; + n += 1LL<<32; + } while(clp && list_empty(&clp->cl_list)); + if (!clp) + return NULL; + *pos = n+1; + return list_entry(clp->cl_list.next, svc_export, ex_list); +} + +static void *e_next(struct seq_file *m, void *p, loff_t *pos) +{ + svc_export *exp = p; + svc_client *clp; + + if (p == (void *)1) + clp = clients; + else if (exp->ex_list.next == &exp->ex_client->cl_list) + clp = exp->ex_client->cl_next; + else { + ++*pos; + return list_entry(exp->ex_list.next, svc_export, ex_list); + } + *pos &= ~((1LL<<32) - 1); + while (clp && list_empty(&clp->cl_list)) { + clp = clp->cl_next; + *pos += 1LL<<32; + } + if (!clp) + return NULL; + ++*pos; + return list_entry(clp->cl_list.next, svc_export, ex_list); +} + +static void e_stop(struct seq_file *m, void *p) +{ + exp_unlock(); +} + struct flags { int flag; char *name[2]; @@ -544,128 +598,77 @@ { 0, {"", ""}} }; -static int -exp_flags(char *buffer, int flag) +static void exp_flags(struct seq_file *m, int flag) { - int len = 0, first = 0; - struct flags *flg = expflags; + int first = 0; + struct flags *flg; - for (;flg->flag;flg++) { - int state = (flg->flag & flag)?0:1; - if (!flg->flag) - break; - if (*flg->name[state]) { - len += sprintf(buffer + len, "%s%s", - first++?",":"", flg->name[state]); - } - } - return len; + for (flg = expflags; flg->flag; flg++) { + int state = (flg->flag & flag)?0:1; + if (*flg->name[state]) + seq_printf(m, "%s%s", first++?",":"", flg->name[state]); + } } - - -/* mangling borrowed from fs/super.c */ -/* Use octal escapes, like mount does, for embedded spaces etc. */ -static unsigned char need_escaping[] = { ' ', '\t', '\n', '\\' }; - -static int -mangle(const unsigned char *s, char *buf, int len) { - char *sp; - int n; - - sp = buf; - while(*s && sp-buf < len-3) { - for (n = 0; n < sizeof(need_escaping); n++) { - if (*s == need_escaping[n]) { - *sp++ = '\\'; - *sp++ = '0' + ((*s & 0300) >> 6); - *sp++ = '0' + ((*s & 070) >> 3); - *sp++ = '0' + (*s & 07); - goto next; - } - } - *sp++ = *s; - next: - s++; - } - return sp - buf; /* no trailing NUL */ +static inline void mangle(struct seq_file *m, const char *s) +{ + seq_escape(m, s, " \t\n\\"); } -#define FREEROOM ((int)PAGE_SIZE-200-len) -#define MANGLE(s) len += mangle((s), buffer+len, FREEROOM); - -int -exp_procfs_exports(char *buffer, char **start, off_t offset, - int length, int *eof, void *data) +static int e_show(struct seq_file *m, void *p) { - struct svc_clnthash **hp, **head, *tmp; - struct svc_client *clp; - svc_export *exp; - off_t pos = 0; - off_t begin = 0; - int len = 0; - int i,j; + struct svc_export *exp = p; + struct svc_client *clp; + int j, first = 0; - len += sprintf(buffer, "# Version 1.1\n"); - len += sprintf(buffer+len, "# Path Client(Flags) # IPs\n"); - - for (clp = clients; clp; clp = clp->cl_next) { - for (i = 0; i < NFSCLNT_EXPMAX; i++) { - exp = clp->cl_export[i]; - while (exp) { - int first = 0; - MANGLE(exp->ex_path); - buffer[len++]='\t'; - MANGLE(clp->cl_ident); - buffer[len++]='('; - - len += exp_flags(buffer+len, exp->ex_flags); - len += sprintf(buffer+len, ") # "); - for (j = 0; j < clp->cl_naddr; j++) { - struct in_addr addr = clp->cl_addr[j]; - - head = &clnt_hash[CLIENT_HASH(addr.s_addr)]; - for (hp = head; (tmp = *hp) != NULL; hp = &(tmp->h_next)) { - if (tmp->h_addr.s_addr == addr.s_addr) { - if (first++) len += sprintf(buffer+len, "%s", " "); - if (tmp->h_client != clp) - len += sprintf(buffer+len, "("); - len += sprintf(buffer+len, "%d.%d.%d.%d", - htonl(addr.s_addr) >> 24 & 0xff, - htonl(addr.s_addr) >> 16 & 0xff, - htonl(addr.s_addr) >> 8 & 0xff, - htonl(addr.s_addr) >> 0 & 0xff); - if (tmp->h_client != clp) - len += sprintf(buffer+len, ")"); - break; - } - } - } - exp = exp->ex_next; - - buffer[len++]='\n'; - - pos=begin+len; - if(pos offset + length) - goto done; - } - } + if (p == (void *)1) { + seq_puts(m, "# Version 1.1\n"); + seq_puts(m, "# Path Client(Flags) # IPs\n"); + return 0; } - *eof = 1; + clp = exp->ex_client; -done: - *start = buffer + (offset - begin); - len -= (offset - begin); - if ( len > length ) - len = length; - return len; + mangle(m, exp->ex_path); + seq_putc(m, '\t'); + mangle(m, clp->cl_ident); + seq_putc(m, '('); + exp_flags(m, exp->ex_flags); + seq_puts(m, ") # "); + for (j = 0; j < clp->cl_naddr; j++) { + struct svc_clnthash **hp, **head, *tmp; + struct in_addr addr = clp->cl_addr[j]; + + head = &clnt_hash[CLIENT_HASH(addr.s_addr)]; + for (hp = head; (tmp = *hp) != NULL; hp = &(tmp->h_next)) { + if (tmp->h_addr.s_addr == addr.s_addr) + break; + } + if (tmp) { + if (first++) + seq_putc(m, ' '); + if (tmp->h_client != clp) + seq_putc(m, '('); + seq_printf(m, "%d.%d.%d.%d", + htonl(addr.s_addr) >> 24 & 0xff, + htonl(addr.s_addr) >> 16 & 0xff, + htonl(addr.s_addr) >> 8 & 0xff, + htonl(addr.s_addr) >> 0 & 0xff); + if (tmp->h_client != clp) + seq_putc(m, ')'); + } + } + seq_putc(m, '\n'); + return 0; } +struct seq_operations nfs_exports_op = { + start: e_start, + next: e_next, + stop: e_stop, + show: e_show, +}; + /* * Add or modify a client. * Change requests may involve the list of host addresses. The list of @@ -701,6 +704,9 @@ if (!(clp = kmalloc(sizeof(*clp), GFP_KERNEL))) goto out_unlock; memset(clp, 0, sizeof(*clp)); + for (i = 0; i < NFSCLNT_EXPMAX; i++) + INIT_LIST_HEAD(&clp->cl_export[i]); + INIT_LIST_HEAD(&clp->cl_list); dprintk("created client %s (%p)\n", ncp->cl_ident, clp); diff -urN linux-2.5.4-pre4/fs/nfsd/nfsctl.c linux/fs/nfsd/nfsctl.c --- linux-2.5.4-pre4/fs/nfsd/nfsctl.c Fri Feb 8 18:56:33 2002 +++ linux/fs/nfsd/nfsctl.c Fri Feb 8 18:56:36 2002 @@ -20,6 +20,7 @@ #include #include #include +#include #include #include @@ -45,16 +46,27 @@ static int initialized; -int exp_procfs_exports(char *buffer, char **start, off_t offset, - int length, int *eof, void *data); +extern struct seq_operations nfs_exports_op; +static int exports_open(struct inode *inode, struct file *file) +{ + return seq_open(file, &nfs_exports_op); +} +static struct file_operations exports_operations = { + open: exports_open, + read: seq_read, + llseek: seq_lseek, + release: seq_release, +}; void proc_export_init(void) { + struct proc_dir_entry *entry; if (!proc_mkdir("fs/nfs", 0)) return; - create_proc_read_entry("fs/nfs/exports", 0, 0, exp_procfs_exports,NULL); + entry = create_proc_entry("fs/nfs/exports", 0, NULL); + if (entry) + entry->proc_fops = &exports_operations; } - /* * Initialize nfsd diff -urN linux-2.5.4-pre4/include/asm-i386/cpufeature.h linux/include/asm-i386/cpufeature.h --- linux-2.5.4-pre4/include/asm-i386/cpufeature.h Sun Dec 30 16:54:29 2001 +++ linux/include/asm-i386/cpufeature.h Fri Feb 8 18:56:36 2002 @@ -47,6 +47,7 @@ /* AMD-defined CPU features, CPUID level 0x80000001, word 1 */ /* Don't duplicate feature flags which are redundant with Intel! */ #define X86_FEATURE_SYSCALL (1*32+11) /* SYSCALL/SYSRET */ +#define X86_FEATURE_MP (1*32+19) /* MP Capable. */ #define X86_FEATURE_MMXEXT (1*32+22) /* AMD MMX extensions */ #define X86_FEATURE_LM (1*32+29) /* Long Mode (x86-64) */ #define X86_FEATURE_3DNOWEXT (1*32+30) /* AMD 3DNow! extensions */ diff -urN linux-2.5.4-pre4/include/asm-i386/processor.h linux/include/asm-i386/processor.h --- linux-2.5.4-pre4/include/asm-i386/processor.h Fri Feb 8 18:56:33 2002 +++ linux/include/asm-i386/processor.h Fri Feb 8 18:56:36 2002 @@ -90,6 +90,7 @@ #define cpu_has_xmm (test_bit(X86_FEATURE_XMM, boot_cpu_data.x86_capability)) #define cpu_has_fpu (test_bit(X86_FEATURE_FPU, boot_cpu_data.x86_capability)) #define cpu_has_apic (test_bit(X86_FEATURE_APIC, boot_cpu_data.x86_capability)) +#define cpu_has_mp (test_bit(X86_FEATURE_MP, boot_cpu_data.x86_capability)) extern char ignore_irq13; diff -urN linux-2.5.4-pre4/include/asm-i386/rwlock.h linux/include/asm-i386/rwlock.h --- linux-2.5.4-pre4/include/asm-i386/rwlock.h Fri Sep 22 14:07:43 2000 +++ linux/include/asm-i386/rwlock.h Fri Feb 8 18:56:36 2002 @@ -24,23 +24,23 @@ asm volatile(LOCK "subl $1,(%0)\n\t" \ "js 2f\n" \ "1:\n" \ - ".section .text.lock,\"ax\"\n" \ + LOCK_SECTION_START("") \ "2:\tcall " helper "\n\t" \ "jmp 1b\n" \ - ".previous" \ + LOCK_SECTION_END \ ::"a" (rw) : "memory") #define __build_read_lock_const(rw, helper) \ asm volatile(LOCK "subl $1,%0\n\t" \ "js 2f\n" \ "1:\n" \ - ".section .text.lock,\"ax\"\n" \ + LOCK_SECTION_START("") \ "2:\tpushl %%eax\n\t" \ "leal %0,%%eax\n\t" \ "call " helper "\n\t" \ "popl %%eax\n\t" \ "jmp 1b\n" \ - ".previous" \ + LOCK_SECTION_END \ :"=m" (*(volatile int *)rw) : : "memory") #define __build_read_lock(rw, helper) do { \ @@ -54,23 +54,23 @@ asm volatile(LOCK "subl $" RW_LOCK_BIAS_STR ",(%0)\n\t" \ "jnz 2f\n" \ "1:\n" \ - ".section .text.lock,\"ax\"\n" \ + LOCK_SECTION_START("") \ "2:\tcall " helper "\n\t" \ "jmp 1b\n" \ - ".previous" \ + LOCK_SECTION_END \ ::"a" (rw) : "memory") #define __build_write_lock_const(rw, helper) \ asm volatile(LOCK "subl $" RW_LOCK_BIAS_STR ",(%0)\n\t" \ "jnz 2f\n" \ "1:\n" \ - ".section .text.lock,\"ax\"\n" \ + LOCK_SECTION_START("") \ "2:\tpushl %%eax\n\t" \ "leal %0,%%eax\n\t" \ "call " helper "\n\t" \ "popl %%eax\n\t" \ "jmp 1b\n" \ - ".previous" \ + LOCK_SECTION_END \ :"=m" (*(volatile int *)rw) : : "memory") #define __build_write_lock(rw, helper) do { \ diff -urN linux-2.5.4-pre4/include/asm-i386/rwsem.h linux/include/asm-i386/rwsem.h --- linux-2.5.4-pre4/include/asm-i386/rwsem.h Tue Jan 29 21:41:11 2002 +++ linux/include/asm-i386/rwsem.h Fri Feb 8 18:56:36 2002 @@ -101,7 +101,7 @@ LOCK_PREFIX " incl (%%eax)\n\t" /* adds 0x00000001, returns the old value */ " js 2f\n\t" /* jump if we weren't granted the lock */ "1:\n\t" - ".section .text.lock,\"ax\"\n" + LOCK_SECTION_START("") "2:\n\t" " pushl %%ecx\n\t" " pushl %%edx\n\t" @@ -109,7 +109,7 @@ " popl %%edx\n\t" " popl %%ecx\n\t" " jmp 1b\n" - ".previous" + LOCK_SECTION_END "# ending down_read\n\t" : "+m"(sem->count) : "a"(sem) @@ -130,13 +130,13 @@ " testl %0,%0\n\t" /* was the count 0 before? */ " jnz 2f\n\t" /* jump if we weren't granted the lock */ "1:\n\t" - ".section .text.lock,\"ax\"\n" + LOCK_SECTION_START("") "2:\n\t" " pushl %%ecx\n\t" " call rwsem_down_write_failed\n\t" " popl %%ecx\n\t" " jmp 1b\n" - ".previous\n" + LOCK_SECTION_END "# ending down_write" : "+d"(tmp), "+m"(sem->count) : "a"(sem) @@ -154,7 +154,7 @@ LOCK_PREFIX " xadd %%edx,(%%eax)\n\t" /* subtracts 1, returns the old value */ " js 2f\n\t" /* jump if the lock is being waited upon */ "1:\n\t" - ".section .text.lock,\"ax\"\n" + LOCK_SECTION_START("") "2:\n\t" " decw %%dx\n\t" /* do nothing if still outstanding active readers */ " jnz 1b\n\t" @@ -162,7 +162,7 @@ " call rwsem_wake\n\t" " popl %%ecx\n\t" " jmp 1b\n" - ".previous\n" + LOCK_SECTION_END "# ending __up_read\n" : "+m"(sem->count), "+d"(tmp) : "a"(sem) @@ -180,7 +180,7 @@ LOCK_PREFIX " xaddl %%edx,(%%eax)\n\t" /* tries to transition 0xffff0001 -> 0x00000000 */ " jnz 2f\n\t" /* jump if the lock is being waited upon */ "1:\n\t" - ".section .text.lock,\"ax\"\n" + LOCK_SECTION_START("") "2:\n\t" " decw %%dx\n\t" /* did the active count reduce to 0? */ " jnz 1b\n\t" /* jump back if not */ @@ -188,7 +188,7 @@ " call rwsem_wake\n\t" " popl %%ecx\n\t" " jmp 1b\n" - ".previous\n" + LOCK_SECTION_END "# ending __up_write\n" : "+m"(sem->count) : "a"(sem), "i"(-RWSEM_ACTIVE_WRITE_BIAS) diff -urN linux-2.5.4-pre4/include/asm-i386/semaphore.h linux/include/asm-i386/semaphore.h --- linux-2.5.4-pre4/include/asm-i386/semaphore.h Tue Jan 29 21:41:12 2002 +++ linux/include/asm-i386/semaphore.h Fri Feb 8 18:56:36 2002 @@ -122,10 +122,10 @@ LOCK "decl %0\n\t" /* --sem->count */ "js 2f\n" "1:\n" - ".section .text.lock,\"ax\"\n" + LOCK_SECTION_START("") "2:\tcall __down_failed\n\t" "jmp 1b\n" - ".previous" + LOCK_SECTION_END :"=m" (sem->count) :"c" (sem) :"memory"); @@ -149,10 +149,10 @@ "js 2f\n\t" "xorl %0,%0\n" "1:\n" - ".section .text.lock,\"ax\"\n" + LOCK_SECTION_START("") "2:\tcall __down_failed_interruptible\n\t" "jmp 1b\n" - ".previous" + LOCK_SECTION_END :"=a" (result), "=m" (sem->count) :"c" (sem) :"memory"); @@ -177,10 +177,10 @@ "js 2f\n\t" "xorl %0,%0\n" "1:\n" - ".section .text.lock,\"ax\"\n" + LOCK_SECTION_START("") "2:\tcall __down_failed_trylock\n\t" "jmp 1b\n" - ".previous" + LOCK_SECTION_END :"=a" (result), "=m" (sem->count) :"c" (sem) :"memory"); @@ -203,10 +203,11 @@ LOCK "incl %0\n\t" /* ++sem->count */ "jle 2f\n" "1:\n" - ".section .text.lock,\"ax\"\n" + LOCK_SECTION_START("") "2:\tcall __up_wakeup\n\t" "jmp 1b\n" - ".previous" + LOCK_SECTION_END + ".subsection 0\n" :"=m" (sem->count) :"c" (sem) :"memory"); diff -urN linux-2.5.4-pre4/include/asm-i386/softirq.h linux/include/asm-i386/softirq.h --- linux-2.5.4-pre4/include/asm-i386/softirq.h Tue Jan 29 21:41:15 2002 +++ linux/include/asm-i386/softirq.h Fri Feb 8 18:56:36 2002 @@ -33,12 +33,12 @@ "jnz 2f;" \ "1:;" \ \ - ".section .text.lock,\"ax\";" \ + LOCK_SECTION_START("") \ "2: pushl %%eax; pushl %%ecx; pushl %%edx;" \ "call %c1;" \ "popl %%edx; popl %%ecx; popl %%eax;" \ "jmp 1b;" \ - ".previous;" \ + LOCK_SECTION_END \ \ : /* no output */ \ : "r" (ptr), "i" (do_softirq) \ diff -urN linux-2.5.4-pre4/include/asm-i386/spinlock.h linux/include/asm-i386/spinlock.h --- linux-2.5.4-pre4/include/asm-i386/spinlock.h Tue Jan 29 21:41:09 2002 +++ linux/include/asm-i386/spinlock.h Fri Feb 8 18:56:36 2002 @@ -56,13 +56,13 @@ "\n1:\t" \ "lock ; decb %0\n\t" \ "js 2f\n" \ - ".section .text.lock,\"ax\"\n" \ + LOCK_SECTION_START("") \ "2:\t" \ "cmpb $0,%0\n\t" \ "rep;nop\n\t" \ "jle 2b\n\t" \ "jmp 1b\n" \ - ".previous" + LOCK_SECTION_END /* * This works. Despite all the confusion. diff -urN linux-2.5.4-pre4/include/asm-m68k/semaphore.h linux/include/asm-m68k/semaphore.h --- linux-2.5.4-pre4/include/asm-m68k/semaphore.h Thu Oct 25 13:53:55 2001 +++ linux/include/asm-m68k/semaphore.h Fri Feb 8 18:56:36 2002 @@ -9,6 +9,7 @@ #include #include #include +#include #include #include @@ -94,11 +95,10 @@ "subql #1,%0@\n\t" "jmi 2f\n\t" "1:\n" - ".section .text.lock,\"ax\"\n" - ".even\n" + LOCK_SECTION_START(".even\n\t") "2:\tpea 1b\n\t" "jbra __down_failed\n" - ".previous" + LOCK_SECTION_END : /* no outputs */ : "a" (sem1) : "memory"); @@ -119,11 +119,10 @@ "jmi 2f\n\t" "clrl %0\n" "1:\n" - ".section .text.lock,\"ax\"\n" - ".even\n" + LOCK_SECTION_START(".even\n\t") "2:\tpea 1b\n\t" "jbra __down_failed_interruptible\n" - ".previous" + LOCK_SECTION_END : "=d" (result) : "a" (sem1) : "memory"); @@ -145,11 +144,10 @@ "jmi 2f\n\t" "clrl %0\n" "1:\n" - ".section .text.lock,\"ax\"\n" - ".even\n" + LOCK_SECTION_START(".even\n\t") "2:\tpea 1b\n\t" "jbra __down_failed_trylock\n" - ".previous" + LOCK_SECTION_END : "=d" (result) : "a" (sem1) : "memory"); @@ -175,12 +173,11 @@ "addql #1,%0@\n\t" "jle 2f\n" "1:\n" - ".section .text.lock,\"ax\"\n" - ".even\n" + LOCK_SECTION_START(".even\n\t") "2:\t" "pea 1b\n\t" "jbra __up_wakeup\n" - ".previous" + LOCK_SECTION_END : /* no outputs */ : "a" (sem1) : "memory"); diff -urN linux-2.5.4-pre4/include/asm-parisc/semaphore.h linux/include/asm-parisc/semaphore.h --- linux-2.5.4-pre4/include/asm-parisc/semaphore.h Tue Apr 17 17:19:31 2001 +++ linux/include/asm-parisc/semaphore.h Fri Feb 8 18:56:36 2002 @@ -12,10 +12,6 @@ * */ -/* if you're going to use out-of-line slowpaths, use .section .lock.text, - * not .text.lock or the -ffunction-sections monster will eat you alive - */ - #include #include diff -urN linux-2.5.4-pre4/include/asm-parisc/spinlock.h linux/include/asm-parisc/spinlock.h --- linux-2.5.4-pre4/include/asm-parisc/spinlock.h Tue Dec 5 12:29:39 2000 +++ linux/include/asm-parisc/spinlock.h Fri Feb 8 18:56:36 2002 @@ -3,10 +3,6 @@ #include -/* if you're going to use out-of-line slowpaths, use .section .lock.text, - * not .text.lock or the -ffunction-sections monster will eat you alive - */ - /* we seem to be the only architecture that uses 0 to mean locked - but we * have to. prumpf */ diff -urN linux-2.5.4-pre4/include/linux/kernel.h linux/include/linux/kernel.h --- linux-2.5.4-pre4/include/linux/kernel.h Tue Jan 29 21:41:09 2002 +++ linux/include/linux/kernel.h Fri Feb 8 18:56:36 2002 @@ -91,6 +91,9 @@ extern int tainted; extern const char *print_tainted(void); +#define TAINT_PROPRIETORY_MODULE (1<<0) +#define TAINT_FORCED_MODULE (1<<1) +#define TAINT_UNSAFE_SMP (1<<2) #if DEBUG #define pr_debug(fmt,arg...) \ diff -urN linux-2.5.4-pre4/include/linux/nfsd/export.h linux/include/linux/nfsd/export.h --- linux-2.5.4-pre4/include/linux/nfsd/export.h Fri Feb 8 18:56:33 2002 +++ linux/include/linux/nfsd/export.h Fri Feb 8 18:56:36 2002 @@ -54,11 +54,13 @@ int cl_naddr; struct in_addr cl_addr[NFSCLNT_ADDRMAX]; struct svc_uidmap * cl_umap; - struct svc_export * cl_export[NFSCLNT_EXPMAX]; + struct list_head cl_export[NFSCLNT_EXPMAX]; + struct list_head cl_list; }; struct svc_export { - struct svc_export * ex_next; + struct list_head ex_hash; + struct list_head ex_list; char ex_path[NFS_MAXPATHLEN+1]; struct svc_export * ex_parent; struct svc_client * ex_client; diff -urN linux-2.5.4-pre4/include/linux/serialP.h linux/include/linux/serialP.h --- linux-2.5.4-pre4/include/linux/serialP.h Tue Jan 29 21:42:42 2002 +++ linux/include/linux/serialP.h Fri Feb 8 18:56:36 2002 @@ -70,7 +70,7 @@ int x_char; /* xon/xoff character */ int close_delay; unsigned short closing_wait; - unsigned short closing_wait2; + unsigned short closing_wait2; /* obsolete */ int IER; /* Interrupt Enable Register */ int MCR; /* Modem control register */ int LCR; /* Line control register */ diff -urN linux-2.5.4-pre4/include/linux/spinlock.h linux/include/linux/spinlock.h --- linux-2.5.4-pre4/include/linux/spinlock.h Tue Jan 29 21:41:10 2002 +++ linux/include/linux/spinlock.h Fri Feb 8 18:56:36 2002 @@ -35,6 +35,23 @@ if (!__r) local_bh_enable(); \ __r; }) +/* Must define these before including other files, inline functions need them */ + +#include + +#define LOCK_SECTION_NAME \ + ".text.lock." __stringify(KBUILD_BASENAME) + +#define LOCK_SECTION_START(extra) \ + ".subsection 1\n\t" \ + extra \ + ".ifndef " LOCK_SECTION_NAME "\n\t" \ + LOCK_SECTION_NAME ":\n\t" \ + ".endif\n\t" + +#define LOCK_SECTION_END \ + ".previous\n\t" + #ifdef CONFIG_SMP #include diff -urN linux-2.5.4-pre4/include/linux/stringify.h linux/include/linux/stringify.h --- linux-2.5.4-pre4/include/linux/stringify.h Wed Dec 31 16:00:00 1969 +++ linux/include/linux/stringify.h Fri Feb 8 18:56:36 2002 @@ -0,0 +1,12 @@ +#ifndef __LINUX_STRINGIFY_H +#define __LINUX_STRINGIFY_H + +/* Indirect stringification. Doing two levels allows the parameter to be a + * macro itself. For example, compile with -DFOO=bar, __stringify(FOO) + * converts to "bar". + */ + +#define __stringify_1(x) #x +#define __stringify(x) __stringify_1(x) + +#endif /* !__LINUX_STRINGIFY_H */ diff -urN linux-2.5.4-pre4/init/Config.in linux/init/Config.in --- linux-2.5.4-pre4/init/Config.in Thu Jan 24 12:15:55 2002 +++ linux/init/Config.in Fri Feb 8 18:56:36 2002 @@ -1,16 +1,14 @@ mainmenu_option next_comment -comment 'General setup' +comment 'Code maturity level options' +bool 'Prompt for development and/or incomplete code/drivers' CONFIG_EXPERIMENTAL +endmenu +mainmenu_option next_comment +comment 'General setup' bool 'Networking support' CONFIG_NET bool 'System V IPC' CONFIG_SYSVIPC bool 'BSD Process Accounting' CONFIG_BSD_PROCESS_ACCT bool 'Sysctl support' CONFIG_SYSCTL - -endmenu - -mainmenu_option next_comment -comment 'Code maturity level options' -bool 'Prompt for development and/or incomplete code/drivers' CONFIG_EXPERIMENTAL endmenu mainmenu_option next_comment diff -urN linux-2.5.4-pre4/kernel/panic.c linux/kernel/panic.c --- linux-2.5.4-pre4/kernel/panic.c Sun Sep 30 12:26:08 2001 +++ linux/kernel/panic.c Fri Feb 8 18:56:36 2002 @@ -103,6 +103,10 @@ /** * print_tainted - return a string to represent the kernel taint state. * + * 'P' - Proprietory module has been loaded. + * 'F' - Module has been forcibly loaded. + * 'S' - SMP with CPUs not designed for SMP. + * * The string is overwritten by the next call to print_taint(). */ @@ -110,9 +114,10 @@ { static char buf[20]; if (tainted) { - snprintf(buf, sizeof(buf), "Tainted: %c%c", - tainted & 1 ? 'P' : 'G', - tainted & 2 ? 'F' : ' '); + snprintf(buf, sizeof(buf), "Tainted: %c%c%c", + tainted & TAINT_PROPRIETORY_MODULE ? 'P' : 'G', + tainted & TAINT_FORCED_MODULE ? 'F' : ' ', + tainted & TAINT_UNSAFE_SMP ? 'S' : ' '); } else snprintf(buf, sizeof(buf), "Not tainted"); diff -urN linux-2.5.4-pre4/lib/zlib_inflate/infutil.h linux/lib/zlib_inflate/infutil.h --- linux-2.5.4-pre4/lib/zlib_inflate/infutil.h Tue Jan 29 21:30:41 2002 +++ linux/lib/zlib_inflate/infutil.h Fri Feb 8 18:56:36 2002 @@ -11,7 +11,7 @@ #ifndef _INFUTIL_H #define _INFUTIL_H -#include "zconf.h" +#include #include "inftrees.h" #include "infcodes.h"