Patches contributed by Eötvös Lorand University


commit 2179bab7d431ab8ed539e19e029b1f6a231f4ed3
Author: Ingo Molnar <mingo@elte.hu>
Date:   Thu Jul 10 10:59:59 2008 +0200

    Revert "x86: fix IO APIC breakage on HP nx6325, v2"
    
    This reverts commit a74a1cc3df0be89658bc735c8aed80c8392e2c15.
    
    This was just temporary diagnostics commit - not needed now that we've
    got the final fix.
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

diff --git a/arch/x86/kernel/io_apic_64.c b/arch/x86/kernel/io_apic_64.c
index 0494cdb270c5..83c953af9cd8 100644
--- a/arch/x86/kernel/io_apic_64.c
+++ b/arch/x86/kernel/io_apic_64.c
@@ -373,26 +373,6 @@ static void add_pin_to_irq(unsigned int irq, int apic, int pin)
 	entry->pin = pin;
 }
 
-/*
- * Reroute an IRQ to a different pin.
- */
-static void __init replace_pin_at_irq(unsigned int irq,
-				      int oldapic, int oldpin,
-				      int newapic, int newpin)
-{
-	struct irq_pin_list *entry = irq_2_pin + irq;
-
-	while (1) {
-		if (entry->apic == oldapic && entry->pin == oldpin) {
-			entry->apic = newapic;
-			entry->pin = newpin;
-		}
-		if (!entry->next)
-			break;
-		entry = irq_2_pin + entry->next;
-	}
-}
-
 
 #define DO_ACTION(name,R,ACTION, FINAL)					\
 									\
@@ -1724,11 +1704,6 @@ static inline void __init check_timer(void)
 		apic2 = apic1;
 	}
 
-	replace_pin_at_irq(0, 0, 0, apic1, pin1);
-	apic1 = 0;
-	pin1 = 0;
-	setup_timer_IRQ0_pin(apic1, pin1, cfg->vector);
-
 	if (pin1 != -1) {
 		/*
 		 * Ok, does IRQ0 through the IOAPIC work?
@@ -1760,9 +1735,10 @@ static inline void __init check_timer(void)
 		/*
 		 * legacy devices should be connected to IO APIC #0
 		 */
-		replace_pin_at_irq(0, apic1, pin1, apic2, pin2);
+		/* replace_pin_at_irq(0, apic1, pin1, apic2, pin2); */
 		setup_timer_IRQ0_pin(apic2, pin2, cfg->vector);
 		unmask_IO_APIC_irq(0);
+		clear_IO_APIC_pin(apic2, pin2);
 		enable_8259A_irq(0);
 		if (timer_irq_works()) {
 			apic_printk(APIC_VERBOSE," works.\n");

commit 849567b9363dc8b90c369fff8acc245a1b47d94d
Merge: 3d43ecd286e4 8cbfd4f44d5c
Author: Ingo Molnar <mingo@elte.hu>
Date:   Thu Jul 10 10:43:11 2008 +0200

    Merge branch 'x86/gart' into x86/core

commit 9e4144abf8a30ae221311368bbb10690ebdb4b76
Merge: e17ba73b0ee6 6329d3021bcf
Author: Ingo Molnar <mingo@elte.hu>
Date:   Thu Jul 10 08:17:14 2008 +0200

    Merge branch 'linus' into core/printk
    
    Conflicts:
    
            kernel/printk.c
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

commit 4fb3dc2729c22ed1b023475fe28b720460251de1
Author: Ingo Molnar <mingo@elte.hu>
Date:   Wed Jul 9 13:07:23 2008 +0200

    x86: build fix for "x86: fix C1E && nx6325 stability problem"
    
    fix:
    
     arch/x86/kernel/built-in.o: In function `dmi_ignore_irq0_timer_override':
     boot.c:(.init.text+0x3ea4): undefined reference to `force_mask_ioapic_irq_2'
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

diff --git a/include/asm-x86/genapic_32.h b/include/asm-x86/genapic_32.h
index 8d4c8bdb9065..33a73f5ed222 100644
--- a/include/asm-x86/genapic_32.h
+++ b/include/asm-x86/genapic_32.h
@@ -119,6 +119,10 @@ enum uv_system_type {UV_NONE, UV_LEGACY_APIC, UV_X2APIC, UV_NON_UNIQUE_APIC};
 #define is_uv_system()			0
 #define uv_wakeup_secondary(a, b)	1
 
+#ifdef CONFIG_X86_IO_APIC
 extern void force_mask_ioapic_irq_2(void);
+#else
+static inline void force_mask_ioapic_irq_2(void) { }
+#endif
 
 #endif
diff --git a/include/asm-x86/genapic_64.h b/include/asm-x86/genapic_64.h
index 082ad020e412..647e4e5c2580 100644
--- a/include/asm-x86/genapic_64.h
+++ b/include/asm-x86/genapic_64.h
@@ -46,6 +46,10 @@ extern int uv_wakeup_secondary(int phys_apicid, unsigned int start_rip);
 
 extern void setup_apic_routing(void);
 
+#ifdef CONFIG_X86_IO_APIC
 extern void force_mask_ioapic_irq_2(void);
+#else
+static inline void force_mask_ioapic_irq_2(void) { }
+#endif
 
 #endif

commit de989ef093623ab5259f885f30be699c431d4006
Merge: a737abd11ac4 22cac1670786
Author: Ingo Molnar <mingo@elte.hu>
Date:   Wed Jul 9 15:00:48 2008 +0200

    Merge branch 'x86/unify-lib' into x86/core

commit d028203c0446c7f65ed2b22342a56f03c6c4a6c1
Merge: f57e91682d14 183fe065652d
Author: Ingo Molnar <mingo@elte.hu>
Date:   Wed Jul 9 11:39:02 2008 +0200

    Merge branch 'x86/core' into x86/unify-pci

commit 183fe065652dbd64953afa9f389327e23e97967f
Author: Ingo Molnar <mingo@elte.hu>
Date:   Wed Jul 9 11:32:10 2008 +0200

    x86: build fix for "x86: fix C1E && nx6325 stability problem"
    
    fix:
    
    arch/x86/kernel/acpi/boot.c: In function ‘dmi_ignore_irq0_timer_override’:
    arch/x86/kernel/acpi/boot.c:1443: error: implicit declaration of function ‘force_mask_ioapic_irq_2’
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
index e1f01394b681..bf7b4f7f60e1 100644
--- a/arch/x86/kernel/acpi/boot.c
+++ b/arch/x86/kernel/acpi/boot.c
@@ -37,6 +37,7 @@
 #include <asm/pgtable.h>
 #include <asm/io_apic.h>
 #include <asm/apic.h>
+#include <asm/genapic.h>
 #include <asm/io.h>
 #include <asm/mpspec.h>
 #include <asm/smp.h>

commit f8dd0d3c62164160c59034a96eb17d69ac8a0328
Author: Ingo Molnar <mingo@elte.hu>
Date:   Wed Jul 9 09:12:55 2008 +0200

    x86: delay lib unification build fix
    
    fix:
    
    arch/x86/lib/delay.c:93:24: error: macro "use_tsc_delay" passed 1 arguments, but takes just 0
    arch/x86/lib/delay.c:94: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

diff --git a/include/asm-x86/delay.h b/include/asm-x86/delay.h
index bb80880c834b..409a649204aa 100644
--- a/include/asm-x86/delay.h
+++ b/include/asm-x86/delay.h
@@ -26,10 +26,6 @@ extern void __delay(unsigned long loops);
 	((n) > 20000 ? __bad_ndelay() : __const_udelay((n) * 5ul)) : \
 	__ndelay(n))
 
-#ifdef CONFIG_X86_32
 void use_tsc_delay(void);
-#else
-#define use_tsc_delay() {}
-#endif
 
 #endif /* _ASM_X86_DELAY_H */

commit 26e9e57b106445bbd8c965985e4e8af5293ae005
Author: Ingo Molnar <mingo@elte.hu>
Date:   Wed Jul 9 08:02:54 2008 +0200

    x86, uv: build fix #2 for "x86, uv: update x86 mmr list for SGI uv"
    
    fix:
    
     In file included from arch/x86/kernel/tlb_uv.c:14:
     include/asm/uv/uv_mmrs.h:986: error: redefinition of ‘union uvh_rh_gam_cfg_overlay_config_mmr_u’
     include/asm/uv/uv_mmrs.h:988: error: redefinition of ‘struct uvh_rh_gam_cfg_overlay_config_mmr_s’
     include/asm/uv/uv_mmrs.h:1064: error: redefinition of ‘union uvh_rh_gam_mmioh_overlay_config_mmr_u’
     include/asm/uv/uv_mmrs.h:1066: error: redefinition of ‘struct uvh_rh_gam_mmioh_overlay_config_mmr_s’
    
    caused by another duplicate section (cut & paste error) in commit
    5d061e397db1 "x86, uv: update x86 mmr list for SGI uv".
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

diff --git a/include/asm-x86/uv/uv_mmrs.h b/include/asm-x86/uv/uv_mmrs.h
index a8a1ad5c764f..151fd7fcb809 100644
--- a/include/asm-x86/uv/uv_mmrs.h
+++ b/include/asm-x86/uv/uv_mmrs.h
@@ -1027,32 +1027,6 @@ union uvh_rh_gam_mmioh_overlay_config_mmr_u {
     } s;
 };
 
-/* ========================================================================= */
-/*                   UVH_RH_GAM_MMIOH_OVERLAY_CONFIG_MMR                     */
-/* ========================================================================= */
-#define UVH_RH_GAM_MMIOH_OVERLAY_CONFIG_MMR 0x1600030UL
-
-#define UVH_RH_GAM_MMIOH_OVERLAY_CONFIG_MMR_BASE_SHFT 30
-#define UVH_RH_GAM_MMIOH_OVERLAY_CONFIG_MMR_BASE_MASK 0x00003fffc0000000UL
-#define UVH_RH_GAM_MMIOH_OVERLAY_CONFIG_MMR_M_IO_SHFT 46
-#define UVH_RH_GAM_MMIOH_OVERLAY_CONFIG_MMR_M_IO_MASK 0x000fc00000000000UL
-#define UVH_RH_GAM_MMIOH_OVERLAY_CONFIG_MMR_N_IO_SHFT 52
-#define UVH_RH_GAM_MMIOH_OVERLAY_CONFIG_MMR_N_IO_MASK 0x00f0000000000000UL
-#define UVH_RH_GAM_MMIOH_OVERLAY_CONFIG_MMR_ENABLE_SHFT 63
-#define UVH_RH_GAM_MMIOH_OVERLAY_CONFIG_MMR_ENABLE_MASK 0x8000000000000000UL
-
-union uvh_rh_gam_mmioh_overlay_config_mmr_u {
-    unsigned long	v;
-    struct uvh_rh_gam_mmioh_overlay_config_mmr_s {
-	unsigned long	rsvd_0_29: 30;  /*    */
-	unsigned long	base   : 16;  /* RW */
-	unsigned long	m_io   :  6;  /* RW */
-	unsigned long	n_io   :  4;  /* RW */
-	unsigned long	rsvd_56_62:  7;  /*    */
-	unsigned long	enable :  1;  /* RW */
-    } s;
-};
-
 /* ========================================================================= */
 /*                    UVH_RH_GAM_MMR_OVERLAY_CONFIG_MMR                      */
 /* ========================================================================= */

commit e407dffd17dcb592e1605a2b3dbbb81f9f3cbc21
Author: Ingo Molnar <mingo@elte.hu>
Date:   Wed Jul 9 08:00:15 2008 +0200

    x86, uv: build fix for "x86, uv: update x86 mmr list for SGI uv"
    
    fix:
    
    In file included from arch/x86/kernel/genx2apic_uv_x.c:25:
    include/asm/uv/uv_mmrs.h:986: error: redefinition of ‘union uvh_rh_gam_cfg_overlay_config_mmr_u’
    include/asm/uv/uv_mmrs.h:988: error: redefinition of ‘struct uvh_rh_gam_cfg_overlay_config_mmr_s’
    include/asm/uv/uv_mmrs.h:1064: error: redefinition of ‘union uvh_rh_gam_mmioh_overlay_config_mmr_u’
    include/asm/uv/uv_mmrs.h:1066: error: redefinition of ‘struct uvh_rh_gam_mmioh_overlay_config_mmr_s’
    
    caused by duplicate section (cut & paste error) in commit
    5d061e397db1 "x86, uv: update x86 mmr list for SGI uv".
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

diff --git a/include/asm-x86/uv/uv_mmrs.h b/include/asm-x86/uv/uv_mmrs.h
index eb59201dc012..a8a1ad5c764f 100644
--- a/include/asm-x86/uv/uv_mmrs.h
+++ b/include/asm-x86/uv/uv_mmrs.h
@@ -973,26 +973,6 @@ union uvh_rh_gam_cfg_overlay_config_mmr_u {
     } s;
 };
 
-/* ========================================================================= */
-/*                    UVH_RH_GAM_CFG_OVERLAY_CONFIG_MMR                      */
-/* ========================================================================= */
-#define UVH_RH_GAM_CFG_OVERLAY_CONFIG_MMR 0x1600020UL
-
-#define UVH_RH_GAM_CFG_OVERLAY_CONFIG_MMR_BASE_SHFT 26
-#define UVH_RH_GAM_CFG_OVERLAY_CONFIG_MMR_BASE_MASK 0x00003ffffc000000UL
-#define UVH_RH_GAM_CFG_OVERLAY_CONFIG_MMR_ENABLE_SHFT 63
-#define UVH_RH_GAM_CFG_OVERLAY_CONFIG_MMR_ENABLE_MASK 0x8000000000000000UL
-
-union uvh_rh_gam_cfg_overlay_config_mmr_u {
-    unsigned long	v;
-    struct uvh_rh_gam_cfg_overlay_config_mmr_s {
-	unsigned long	rsvd_0_25: 26;  /*    */
-	unsigned long	base   : 20;  /* RW */
-	unsigned long	rsvd_46_62: 17;  /*    */
-	unsigned long	enable :  1;  /* RW */
-    } s;
-};
-
 /* ========================================================================= */
 /*                    UVH_RH_GAM_GRU_OVERLAY_CONFIG_MMR                      */
 /* ========================================================================= */