mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] fixes for building kernel 2.5.45 using Intel compiler (Ta ke 2)
@ 2002-10-31 20:16 Nakajima, Jun
  2002-11-01 13:20 ` Alan Cox
  0 siblings, 1 reply; 3+ messages in thread
From: Nakajima, Jun @ 2002-10-31 20:16 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Linux Kernel Mailing List, Mallick, Asit K, Saxena, Sunil

This is take 2 of the updated patch against 2.5.45. I'm asking the compiler 
team if someone can answer your question:

> Considering that Intel largely wrote iBCS2, I guess some Intel person can 
> know what the standard was ;)

I like Alan's idea: IGNLABEL("HmacRxAccepted")

Jun Nakajima

diff -ur linux-2.5.45.orig/arch/i386/kernel/ioport.c
linux-2.5.45/arch/i386/kernel/ioport.c
--- linux-2.5.45.orig/arch/i386/kernel/ioport.c	Sun Oct 20 12:30:45 2002
+++ linux-2.5.45/arch/i386/kernel/ioport.c	Thu Oct 31 09:36:42 2002
@@ -110,7 +110,7 @@
 
 asmlinkage int sys_iopl(unsigned long unused)
 {
-	struct pt_regs * regs = (struct pt_regs *) &unused;
+	volatile struct pt_regs * regs = (struct pt_regs *) &unused;
 	unsigned int level = regs->ebx;
 	unsigned int old = (regs->eflags >> 12) & 3;
 
diff -ur linux-2.5.45.orig/drivers/net/wireless/airo.c
linux-2.5.45/drivers/net/wireless/airo.c
--- linux-2.5.45.orig/drivers/net/wireless/airo.c	Sun Oct 20 12:30:45
2002
+++ linux-2.5.45/drivers/net/wireless/airo.c	Thu Oct 31 11:42:46 2002
@@ -97,12 +97,12 @@
    infront of the label, that statistic will not be included in the list
    of statistics in the /proc filesystem */
 
-#define IGNLABEL 0&(int)
+#define IGNLABEL(comment) 0
 static char *statsLabels[] = {
 	"RxOverrun",
-	IGNLABEL "RxPlcpCrcErr",
-	IGNLABEL "RxPlcpFormatErr",
-	IGNLABEL "RxPlcpLengthErr",
+	IGNLABEL("RxPlcpCrcErr"),
+	IGNLABEL("RxPlcpFormatErr"),
+	IGNLABEL("RxPlcpLengthErr"),
 	"RxMacCrcErr",
 	"RxMacCrcOk",
 	"RxWepErr",
@@ -146,15 +146,15 @@
 	"HostRxBc",
 	"HostRxUc",
 	"HostRxDiscard",
-	IGNLABEL "HmacTxMc",
-	IGNLABEL "HmacTxBc",
-	IGNLABEL "HmacTxUc",
-	IGNLABEL "HmacTxFail",
-	IGNLABEL "HmacRxMc",
-	IGNLABEL "HmacRxBc",
-	IGNLABEL "HmacRxUc",
-	IGNLABEL "HmacRxDiscard",
-	IGNLABEL "HmacRxAccepted",
+	IGNLABEL("HmacTxMc"),
+	IGNLABEL("HmacTxBc"),
+	IGNLABEL("HmacTxUc"),
+	IGNLABEL("HmacTxFail"),
+	IGNLABEL("HmacRxMc"),
+	IGNLABEL("HmacRxBc"),
+	IGNLABEL("HmacRxUc"),
+	IGNLABEL("HmacRxDiscard"),
+	IGNLABEL("HmacRxAccepted"),
 	"SsidMismatch",
 	"ApMismatch",
 	"RatesMismatch",
@@ -162,26 +162,26 @@
 	"AuthTimeout",
 	"AssocReject",
 	"AssocTimeout",
-	IGNLABEL "ReasonOutsideTable",
-	IGNLABEL "ReasonStatus1",
-	IGNLABEL "ReasonStatus2",
-	IGNLABEL "ReasonStatus3",
-	IGNLABEL "ReasonStatus4",
-	IGNLABEL "ReasonStatus5",
-	IGNLABEL "ReasonStatus6",
-	IGNLABEL "ReasonStatus7",
-	IGNLABEL "ReasonStatus8",
-	IGNLABEL "ReasonStatus9",
-	IGNLABEL "ReasonStatus10",
-	IGNLABEL "ReasonStatus11",
-	IGNLABEL "ReasonStatus12",
-	IGNLABEL "ReasonStatus13",
-	IGNLABEL "ReasonStatus14",
-	IGNLABEL "ReasonStatus15",
-	IGNLABEL "ReasonStatus16",
-	IGNLABEL "ReasonStatus17",
-	IGNLABEL "ReasonStatus18",
-	IGNLABEL "ReasonStatus19",
+	IGNLABEL("ReasonOutsideTable"),
+	IGNLABEL("ReasonStatus1"),
+	IGNLABEL("ReasonStatus2"),
+	IGNLABEL("ReasonStatus3"),
+	IGNLABEL("ReasonStatus4"),
+	IGNLABEL("ReasonStatus5"),
+	IGNLABEL("ReasonStatus6"),
+	IGNLABEL("ReasonStatus7"),
+	IGNLABEL("ReasonStatus8"),
+	IGNLABEL("ReasonStatus9"),
+	IGNLABEL("ReasonStatus10"),
+	IGNLABEL("ReasonStatus11"),
+	IGNLABEL("ReasonStatus12"),
+	IGNLABEL("ReasonStatus13"),
+	IGNLABEL("ReasonStatus14"),
+	IGNLABEL("ReasonStatus15"),
+	IGNLABEL("ReasonStatus16"),
+	IGNLABEL("ReasonStatus17"),
+	IGNLABEL("ReasonStatus18"),
+	IGNLABEL("ReasonStatus19"),
 	"RxMan",
 	"TxMan",
 	"RxRefresh",
diff -ur linux-2.5.45.orig/include/linux/mtd/compatmac.h
linux-2.5.45/include/linux/mtd/compatmac.h
--- linux-2.5.45.orig/include/linux/mtd/compatmac.h	Fri Sep 27 14:50:29
2002
+++ linux-2.5.45/include/linux/mtd/compatmac.h	Thu Oct 31 09:36:42 2002
@@ -193,6 +193,7 @@
 #define spin_lock_bh(lock) do {start_bh_atomic();spin_lock(lock);} while(0)
 #define spin_unlock_bh(lock) do {spin_unlock(lock);end_bh_atomic();}
while(0)
 #else
+#include <linux/interrupt.h>
 #include <asm/softirq.h>
 #include <linux/spinlock.h>
 #endif
diff -ur linux-2.5.45.orig/kernel/module.c linux-2.5.45/kernel/module.c
--- linux-2.5.45.orig/kernel/module.c	Thu Oct 31 09:29:07 2002
+++ linux-2.5.45/kernel/module.c	Thu Oct 31 09:36:42 2002
@@ -425,11 +425,11 @@
 		printk(KERN_ERR "init_module: mod->deps out of bounds.\n");
 		goto err2;
 	}
-	if (mod->init && !mod_bound(mod->init, 0, mod)) {
+	if (mod->init && !mod_bound((unsigned long)mod->init, 0, mod)) {
 		printk(KERN_ERR "init_module: mod->init out of bounds.\n");
 		goto err2;
 	}
-	if (mod->cleanup && !mod_bound(mod->cleanup, 0, mod)) {
+	if (mod->cleanup && !mod_bound((unsigned long)mod->cleanup, 0, mod))
{
 		printk(KERN_ERR "init_module: mod->cleanup out of
bounds.\n");
 		goto err2;
 	}
@@ -449,7 +449,7 @@
 		goto err2;
 	}
 	if (mod_member_present(mod, can_unload)
-	    && mod->can_unload && !mod_bound(mod->can_unload, 0, mod)) {
+	    && mod->can_unload && !mod_bound((unsigned long)mod->can_unload,
0, mod)) {
 		printk(KERN_ERR "init_module: mod->can_unload out of
bounds.\n");
 		goto err2;
 	}


^ permalink raw reply	[flat|nested] 3+ messages in thread
* RE: [PATCH] fixes for building kernel 2.5.45 using Intel compiler (Ta ke 2)
@ 2002-10-31 22:47 Nakajima, Jun
  0 siblings, 0 replies; 3+ messages in thread
From: Nakajima, Jun @ 2002-10-31 22:47 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Linux Kernel Mailing List, Mallick, Asit K, Saxena, Sunil

> From: Nakajima, Jun [mailto:jun.nakajima@intel.com]
> Sent: Thursday, October 31, 2002 12:17 PM
> 
> This is take 2 of the updated patch against 2.5.45. I'm 
> asking the compiler  team if someone can answer your question:
> 
> > Considering that Intel largely wrote iBCS2, I guess some 
> Intel person can 
> > know what the standard was ;)

This is what some Intel person said:
   The optimization the compiler is working around is perfectly legal.
   It isn't legal C/C++ to "use" a parameter after the function has
returned.
   The optimizer knows this, and that is why the code got removed. The
volatile 
   is necessary in order to make this kind of C code work.

The point is that once sys_iopl(unsigned long unused) returns a value,
unused is 
finished. So nobody can do anything with the data associated with it after
that.

Jun

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-11-01 12:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-31 20:16 [PATCH] fixes for building kernel 2.5.45 using Intel compiler (Ta ke 2) Nakajima, Jun
2002-11-01 13:20 ` Alan Cox
2002-10-31 22:47 Nakajima, Jun

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®