lkml.org 
[lkml]   [2000]   [Jul]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subjectgcc-2.7.2.3 warnings [PATCH]
Date

Hi,

gcc 2.7.2.3 causes a lot of warnings when used for kernel compilation (x86)
with CONFIG_HIGHMEM64G=y .
Are the warnings meaningless ? Or kernel miscompilation may appear ?

The enclosed patch removes the warnings. But I do not know anything of its
potential side effects...


gcc -D__KERNEL__ -I/usr/src/kernel/2.4/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -pipe -fno-strength-reduce -c -o init/main.o init/main.c
/usr/src/kernel/2.4/linux/include/asm/pgtable.h: In function `pte_modify':
In file included from /usr/src/kernel/2.4/linux/include/linux/mm.h:21,
from /usr/src/kernel/2.4/linux/include/linux/slab.h:14,
from /usr/src/kernel/2.4/linux/include/linux/malloc.h:4,
from /usr/src/kernel/2.4/linux/include/linux/proc_fs.h:5,
from init/main.c:15:
/usr/src/kernel/2.4/linux/include/asm/pgtable.h:291: warning: integer overflow in expression
/usr/src/kernel/2.4/linux/include/asm/pgtable.h:291: warning: integer overflow in expression
/usr/src/kernel/2.4/linux/include/asm/pgtable.h:291: warning: integer overflow in expression
/usr/src/kernel/2.4/linux/include/asm/pgtable.h:291: warning: integer overflow in expression
/usr/src/kernel/2.4/linux/include/asm/pgtable.h:291: warning: integer overflow in expression
/usr/src/kernel/2.4/linux/include/asm/pgtable.h:291: warning: integer overflow in expression

...etc

diff -u --recursive linux-2.4test4-6/include/asm-i386/pgtable.h linux/include/asm-i386/pgtable.h
--- linux-2.4test4-6/include/asm-i386/pgtable.h Fri Jul 14 00:11:50 2000
+++ linux/include/asm-i386/pgtable.h Fri Jul 14 00:19:05 2000
@@ -158,7 +158,12 @@

#define _PAGE_TABLE (_PAGE_PRESENT | _PAGE_RW | _PAGE_USER | _PAGE_ACCESSED | _PAGE_DIRTY)
#define _KERNPG_TABLE (_PAGE_PRESENT | _PAGE_RW | _PAGE_ACCESSED | _PAGE_DIRTY)
-#define _PAGE_CHG_MASK (PTE_MASK | _PAGE_ACCESSED | _PAGE_DIRTY)
+
+#ifdef CONFIG_X86_PAE
+# define _PAGE_CHG_MASK (PTE_MASK | (unsigned long long)(_PAGE_ACCESSED | _PAGE_DIRTY))
+#else
+# define _PAGE_CHG_MASK (PTE_MASK | _PAGE_ACCESSED | _PAGE_DIRTY)
+#endif

#define PAGE_NONE __pgprot(_PAGE_PROTNONE | _PAGE_ACCESSED)
#define PAGE_SHARED __pgprot(_PAGE_PRESENT | _PAGE_RW | _PAGE_USER | _PAGE_ACCESSED)
--
=======================================================================
Andrzej M. Krzysztofowicz ankry@mif.pg.gda.pl
phone (48)(58) 347 14 61
Faculty of Applied Phys. & Math., Technical University of Gdansk
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:57    [W:0.091 / U:0.220 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site