Patches contributed by Eötvös Lorand University


commit c17f888f8fc2e47e2b4a51424f8ccf564ae87576
Author: Ingo Molnar <mingo@elte.hu>
Date:   Mon May 5 01:04:06 2008 -0700

    irda: fix !PNP support in drivers/net/irda/nsc-ircc.c
    
    x86.git testing found the following build failure in latest -git:
    
     drivers/built-in.o: In function `nsc_ircc_pnp_probe':
     nsc-ircc.c:(.text+0xdf1b6): undefined reference to `pnp_get_resource'
     nsc-ircc.c:(.text+0xdf1d4): undefined reference to `pnp_get_resource'
     nsc-ircc.c:(.text+0xdf1ee): undefined reference to `pnp_get_resource'
     nsc-ircc.c:(.text+0xdf237): undefined reference to `pnp_get_resource'
     nsc-ircc.c:(.text+0xdf24c): undefined reference to `pnp_get_resource'
     drivers/built-in.o:nsc-ircc.c:(.text+0xdf266): more undefined references to `pnp_get_resource' follow
     make: *** [.tmp_vmlinux1] Error 1
    
    triggered via this config:
    
      http://redhat.com/~mingo/misc/config-Sat_May__3_20_53_13_CEST_2008.bad
    
    while generally most users will have PNP enabled, drivers can support
    non-PNP build mode too - and most drivers implement it. That is typically
    done by providing a dummy pnp_driver structure that will not probe anything.
    
    The fallback routines in the driver will handle this dumber mode of
    operation too.
    
    This patch implements that. I have not tested whether this actually
    works on real hardware so take care. It does resolve the build bug.
    
    [ Another solution that is used by a few drivers is to exclude the driver
      in the Kconfig if PNP is disabled, via "depends on PNP", but this would
      limit the availability of the driver needlessly. ]
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>
    Signed-off-by: David S. Miller <davem@davemloft.net>

diff --git a/drivers/net/irda/nsc-ircc.c b/drivers/net/irda/nsc-ircc.c
index a873d2b315ca..a7714da7c283 100644
--- a/drivers/net/irda/nsc-ircc.c
+++ b/drivers/net/irda/nsc-ircc.c
@@ -100,7 +100,9 @@ static int nsc_ircc_probe_39x(nsc_chip_t *chip, chipio_t *info);
 static int nsc_ircc_init_108(nsc_chip_t *chip, chipio_t *info);
 static int nsc_ircc_init_338(nsc_chip_t *chip, chipio_t *info);
 static int nsc_ircc_init_39x(nsc_chip_t *chip, chipio_t *info);
+#ifdef CONFIG_PNP
 static int nsc_ircc_pnp_probe(struct pnp_dev *dev, const struct pnp_device_id *id);
+#endif
 
 /* These are the known NSC chips */
 static nsc_chip_t chips[] = {
@@ -156,9 +158,11 @@ static const struct pnp_device_id nsc_ircc_pnp_table[] = {
 MODULE_DEVICE_TABLE(pnp, nsc_ircc_pnp_table);
 
 static struct pnp_driver nsc_ircc_pnp_driver = {
+#ifdef CONFIG_PNP
 	.name = "nsc-ircc",
 	.id_table = nsc_ircc_pnp_table,
 	.probe = nsc_ircc_pnp_probe,
+#endif
 };
 
 /* Some prototypes */
@@ -916,6 +920,7 @@ static int nsc_ircc_probe_39x(nsc_chip_t *chip, chipio_t *info)
 	return 0;
 }
 
+#ifdef CONFIG_PNP
 /* PNP probing */
 static int nsc_ircc_pnp_probe(struct pnp_dev *dev, const struct pnp_device_id *id)
 {
@@ -952,6 +957,7 @@ static int nsc_ircc_pnp_probe(struct pnp_dev *dev, const struct pnp_device_id *i
 
 	return 0;
 }
+#endif
 
 /*
  * Function nsc_ircc_setup (info)

commit e73b65f1db7e3baa3db43951476b7d2d2381ba35
Author: Ingo Molnar <mingo@elte.hu>
Date:   Sun May 4 09:29:43 2008 +0200

    sysfs: build fix
    
    x86.git testing found the following build failure on v2.6.26-rc1:
    
      In file included from include/linux/kobject.h:22,
                       from include/linux/module.h:17,
                       from include/linux/crypto.h:22,
                       from arch/x86/kernel/asm-offsets_32.c:8,
                       from arch/x86/kernel/asm-offsets.c:3:
      include/linux/sysfs.h:201: error: redefinition of 'sysfs_update_group'
      include/linux/sysfs.h:195: error: previous definition of 'sysfs_update_group' was here
      make[1]: *** [arch/x86/kernel/asm-offsets.s] Error 1
      make: *** [prepare0] Error 2
    
    with the following config:
    
        http://redhat.com/~mingo/misc/config-Sun_May__4_07_09_30_CEST_2008.bad
    
    the reason for the build failure is the duplicate definition of the
    sysfs_update_group() inline function in include/linux/sysfs.h.
    
    The duplication was a merge error: it was added via -mm by commit
    v2.6.25-7262-g2850699, "sysfs: sysfs_update_group stub for
    CONFIG_SYSFS=n" a day before v2.6.26-rc1, but a day before that the same
    commit was already merged upstream via the sysfs tree, with commit
    v2.6.25-7211-g1cbfb7a.
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h
index 27bad59dae79..7858eac40aa7 100644
--- a/include/linux/sysfs.h
+++ b/include/linux/sysfs.h
@@ -196,12 +196,6 @@ static inline int sysfs_update_group(struct kobject *kobj,
 	return 0;
 }
 
-static inline int sysfs_update_group(struct kobject *kobj,
-				const struct attribute_group *grp)
-{
-	return 0;
-}
-
 static inline void sysfs_remove_group(struct kobject *kobj,
 				      const struct attribute_group *grp)
 {

commit e37ee42caadab46cec277546099fa2a6207fff0b
Author: Ingo Molnar <mingo@elte.hu>
Date:   Sat May 3 22:01:31 2008 +0200

    x86: es7000 build fix
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

diff --git a/arch/x86/kernel/mpparse.c b/arch/x86/kernel/mpparse.c
index 3e2c54dc8b29..404683b94e79 100644
--- a/arch/x86/kernel/mpparse.c
+++ b/arch/x86/kernel/mpparse.c
@@ -794,6 +794,11 @@ void __init find_smp_config(void)
                             ACPI-based MP Configuration
    -------------------------------------------------------------------------- */
 
+/*
+ * Keep this outside and initialized to 0, for !CONFIG_ACPI builds:
+ */
+int es7000_plat;
+
 #ifdef CONFIG_ACPI
 
 #ifdef	CONFIG_X86_IO_APIC
@@ -909,8 +914,6 @@ void __init mp_override_legacy_irq(u8 bus_irq, u8 polarity, u8 trigger, u32 gsi)
 	MP_intsrc_info(&intsrc);
 }
 
-int es7000_plat;
-
 void __init mp_config_acpi_legacy_irqs(void)
 {
 	struct mpc_config_intsrc intsrc;

commit 22eecde2f9034764a3fd095eecfa3adfb8ec9a98
Author: Ingo Molnar <mingo@elte.hu>
Date:   Thu May 1 12:06:54 2008 +0200

    uml: fix gcc problem
    
    this is what caused gcc 4.3 to throw an internal error when
    OPTIMIZE_INLINING was enabled ...
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

diff --git a/arch/um/Makefile b/arch/um/Makefile
index dbeab15e7bb7..01b97c19a8ba 100644
--- a/arch/um/Makefile
+++ b/arch/um/Makefile
@@ -77,7 +77,10 @@ include $(srctree)/$(ARCH_DIR)/Makefile-os-$(OS)
 KERNEL_DEFINES = $(strip -Derrno=kernel_errno -Dsigprocmask=kernel_sigprocmask \
 			 -Dmktime=kernel_mktime $(ARCH_KERNEL_DEFINES))
 KBUILD_CFLAGS += $(KERNEL_DEFINES)
-KBUILD_CFLAGS += $(call cc-option,-fno-unit-at-a-time,)
+# Disable unit-at-a-time mode on pre-gcc-4.0 compilers, it makes gcc use
+# a lot more stack due to the lack of sharing of stacklots:
+KBUILD_CFLAGS += $(shell if [ $(call cc-version) -lt 0400 ] ; then \
+			echo $(call cc-option,-fno-unit-at-a-time); fi ;)
 
 PHONY += linux
 

commit 5045790589bd426b5d515d78fa71f0fc92dd4e83
Author: Ingo Molnar <mingo@elte.hu>
Date:   Thu May 1 04:34:47 2008 -0700

    isdn: hysdn_procconf.c build fix
    
    x86.git randconfig testing found the following build error in latest
    -git:
    
      CC [M]  drivers/isdn/hysdn/hysdn_procconf.o
      CC [M]  drivers/isdn/hysdn/hysdn_init.o
      drivers/isdn/hysdn/hysdn_procconf.c: In function 'hysdn_procconf_init':
      drivers/isdn/hysdn/hysdn_procconf.c:408: error: too few arguments to function 'proc_create'
    
    with the following config:
    
      http://redhat.com/~mingo/misc/config-Wed_Apr_30_15_12_48_CEST_2008.bad
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>
    Cc: "Denis V. Lunev" <den@openvz.org>
    Cc: Karsten Keil <kkeil@suse.de>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

diff --git a/drivers/isdn/hysdn/hysdn_procconf.c b/drivers/isdn/hysdn/hysdn_procconf.c
index 877be9922c3d..15906d005b05 100644
--- a/drivers/isdn/hysdn/hysdn_procconf.c
+++ b/drivers/isdn/hysdn/hysdn_procconf.c
@@ -405,7 +405,8 @@ hysdn_procconf_init(void)
 		sprintf(conf_name, "%s%d", PROC_CONF_BASENAME, card->myid);
 		if ((card->procconf = (void *) proc_create(conf_name,
 						S_IFREG | S_IRUGO | S_IWUSR,
-						hysdn_proc_entry)) != NULL) {
+						hysdn_proc_entry,
+						&conf_fops)) != NULL) {
 			hysdn_proclog_init(card);	/* init the log file entry */
 		}
 		card = card->next;	/* next entry */

commit 895d30935ebe05f192e844792668bf8d19deaae7
Author: Ingo Molnar <mingo@elte.hu>
Date:   Wed Apr 30 23:05:52 2008 +0200

    x86: numaq fix
    
    do not override the existing pci-y rule when adding visws or
    numaq rules.
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

diff --git a/arch/x86/pci/Makefile_32 b/arch/x86/pci/Makefile_32
index 2a1516efb542..7fa519868d70 100644
--- a/arch/x86/pci/Makefile_32
+++ b/arch/x86/pci/Makefile_32
@@ -9,8 +9,8 @@ pci-y				:= fixup.o
 pci-$(CONFIG_ACPI)		+= acpi.o
 pci-y				+= legacy.o irq.o
 
-pci-$(CONFIG_X86_VISWS)		:= visws.o fixup.o
-pci-$(CONFIG_X86_NUMAQ)		:= numa.o irq.o
+pci-$(CONFIG_X86_VISWS)		+= visws.o fixup.o
+pci-$(CONFIG_X86_NUMAQ)		+= numa.o irq.o
 pci-$(CONFIG_NUMA)		+= mp_bus_to_node.o
 
 obj-y				+= $(pci-y) common.o early.o

commit 6b8e1c7ec4af6defa7045ff3c9b266486124d9c5
Author: Ingo Molnar <mingo@elte.hu>
Date:   Wed Apr 30 20:45:40 2008 +0200

    x86: 8K stacks by default
    
    Switch back to 8K stacks as the safer default. Out-of-memory
    situations are less problematic than silent and hard to debug
    stack corruption.
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

diff --git a/arch/x86/Kconfig.debug b/arch/x86/Kconfig.debug
index 84c71c7e62e8..5fc8d0b3191d 100644
--- a/arch/x86/Kconfig.debug
+++ b/arch/x86/Kconfig.debug
@@ -118,7 +118,6 @@ config DEBUG_NX_TEST
 config 4KSTACKS
 	bool "Use 4Kb for kernel stacks instead of 8Kb"
 	depends on X86_32
-	default y
 	help
 	  If you say Y here the kernel will use a 4Kb stacksize for the
 	  kernel stack attached to each process/thread. This facilitates

commit 5de8f68b43229cce3d457ca9ac6dab8372a35f18
Author: Ingo Molnar <mingo@elte.hu>
Date:   Wed Apr 30 10:29:13 2008 +0200

    x86: optimize inlining off
    
    default to inline optimizing off.
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

diff --git a/arch/x86/Kconfig.debug b/arch/x86/Kconfig.debug
index 770397ec476c..84c71c7e62e8 100644
--- a/arch/x86/Kconfig.debug
+++ b/arch/x86/Kconfig.debug
@@ -258,7 +258,6 @@ config CPA_DEBUG
 
 config OPTIMIZE_INLINING
 	bool "Allow gcc to uninline functions marked 'inline'"
-	default y
 	help
 	  This option determines if the kernel forces gcc to inline the functions
 	  developers have marked 'inline'. Doing so takes away freedom from gcc to

commit acbaa93e3d38db0e67b070d97598f87a7a6779da
Author: Ingo Molnar <mingo@elte.hu>
Date:   Wed Apr 30 08:58:27 2008 +0200

    x86: CONFIG_X86_ELAN fix
    
    move the X86_CPU section out of the !X86_ELAN branch.
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

diff --git a/arch/x86/Kconfig.cpu b/arch/x86/Kconfig.cpu
index 7ef18b01f0bc..2ad6301849a1 100644
--- a/arch/x86/Kconfig.cpu
+++ b/arch/x86/Kconfig.cpu
@@ -278,11 +278,6 @@ config GENERIC_CPU
 
 endchoice
 
-config X86_CPU
-	def_bool y
-	select GENERIC_FIND_FIRST_BIT
-	select GENERIC_FIND_NEXT_BIT
-
 config X86_GENERIC
 	bool "Generic x86 support"
 	depends on X86_32
@@ -297,6 +292,11 @@ config X86_GENERIC
 
 endif
 
+config X86_CPU
+	def_bool y
+	select GENERIC_FIND_FIRST_BIT
+	select GENERIC_FIND_NEXT_BIT
+
 #
 # Define implied options from the CPU selection here
 config X86_L1_CACHE_BYTES

commit c9af1e33231912cedae3e49e56621b6c765e57fe
Author: Ingo Molnar <mingo@elte.hu>
Date:   Wed Apr 30 08:48:45 2008 +0200

    x86: Kconfig fix
    
    Andrew noticed that OPTIMIZE_INLINING appeared in the toplevel
    menu - fix it.
    
    Reported-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Ingo Molnar <mingo@elte.hu>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

diff --git a/arch/x86/Kconfig.debug b/arch/x86/Kconfig.debug
index 5b1979a45a1e..770397ec476c 100644
--- a/arch/x86/Kconfig.debug
+++ b/arch/x86/Kconfig.debug
@@ -256,8 +256,6 @@ config CPA_DEBUG
 	help
 	  Do change_page_attr() self-tests every 30 seconds.
 
-endmenu
-
 config OPTIMIZE_INLINING
 	bool "Allow gcc to uninline functions marked 'inline'"
 	default y
@@ -270,3 +268,6 @@ config OPTIMIZE_INLINING
 	  this algorithm is so good that allowing gcc4 to make the decision can
 	  become the default in the future, until then this option is there to
 	  test gcc for this.
+
+endmenu
+