Skip to contentSkip to conversation

fix nmi for gcc-4.1

PATCH Applied Jan Kiszka 2 participants 2 messages May 23, 2006

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

PATCH 1/1 fix nmi for gcc-4.1

Hi,

this patch fixes a gcc-4.1 error in the nmi watchdog code on i386.

Jan

arch/i386/nmi.c +9 -6
Index: ksrc/arch/i386/nmi.c
===================================================================
@@ -54,12 +54,15 @@
     (P4_CCCR_OVF_PMI0|P4_CCCR_THRESHOLD(15)|P4_CCCR_COMPLEMENT|         \
      P4_CCCR_COMPARE|P4_CCCR_REQUIRED|P4_CCCR_ESCR_SELECT(4)|P4_CCCR_ENABLE)
 
-typedef struct {
-    /* Xenomai watchdog data. */
-    unsigned armed;
-    unsigned long perfctr_msr;
-    unsigned long long next_linux_check;
-    unsigned int p4_cccr_val;
+typedef union {
+    struct {
+        /* Xenomai watchdog data. */
+        unsigned armed;
+        unsigned long perfctr_msr;
+        unsigned long long next_linux_check;
+        unsigned int p4_cccr_val;
+    };
+    char __pad[SMP_CACHE_BYTES];
 } rthal_nmi_wd_t ____cacheline_aligned;
 
 static rthal_nmi_wd_t rthal_nmi_wds[NR_CPUS];
#1 lore raw
Quoted 3 lines · Jan Kiszka

Hi,

this patch fixes a gcc-4.1 error in the nmi watchdog code on i386.

Applied, thanks.

Signature · 1 line
					    Gilles Chanteperdrix.