public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Fix implicit declarations in i386 process.c
@ 2006-12-29  6:29 Dave Jones
  0 siblings, 0 replies; only message in thread
From: Dave Jones @ 2006-12-29  6:29 UTC (permalink / raw)
  To: Linux Kernel; +Cc: Andrew Morton, Linus Torvalds

Building the kernel with -Werror-implicit fails pretty fast with this..

arch/i386/kernel/process.c: In function '__switch_to':
arch/i386/kernel/process.c:645: error: implicit declaration of function 'load_user_cs_desc'
arch/i386/kernel/process.c: In function 'arch_add_exec_range':
arch/i386/kernel/process.c:915: error: implicit declaration of function 'set_user_cs'

Signed-off-by: Dave Jones <davej@redhat.com>

--- linux-2.6.19.noarch/include/asm-i386/desc.h~	2006-12-08 06:52:55.000000000 -0500
+++ linux-2.6.19.noarch/include/asm-i386/desc.h	2006-12-08 06:53:14.000000000 -0500
@@ -185,6 +185,20 @@ static inline unsigned long get_desc_bas
 	return base;
 }
 
+static inline void set_user_cs(struct desc_struct *desc, unsigned long limit)
+{
+	limit = (limit - 1) / PAGE_SIZE;
+	desc->a = limit & 0xffff;
+	desc->b = (limit & 0xf0000) | 0x00c0fb00;
+}
+
+#define load_user_cs_desc(cpu, mm) \
+	get_cpu_gdt_table(cpu)[GDT_ENTRY_DEFAULT_USER_CS] = (mm)->context.user_cs
+
+extern void arch_add_exec_range(struct mm_struct *mm, unsigned long limit);
+extern void arch_remove_exec_range(struct mm_struct *mm, unsigned long limit);
+extern void arch_flush_exec_range(struct mm_struct *mm);
+
 #else /* __ASSEMBLY__ */
 
 /*
@@ -208,20 +222,6 @@ static inline unsigned long get_desc_bas
 	shll $16, base; \
 	movw idx*8+2(gdt), lo_w;
 
-static inline void set_user_cs(struct desc_struct *desc, unsigned long limit)
-{
-	limit = (limit - 1) / PAGE_SIZE;
-	desc->a = limit & 0xffff;
-	desc->b = (limit & 0xf0000) | 0x00c0fb00;
-}
-
-#define load_user_cs_desc(cpu, mm) \
-	get_cpu_gdt_table(cpu)[GDT_ENTRY_DEFAULT_USER_CS] = (mm)->context.user_cs
-
-extern void arch_add_exec_range(struct mm_struct *mm, unsigned long limit);
-extern void arch_remove_exec_range(struct mm_struct *mm, unsigned long limit);
-extern void arch_flush_exec_range(struct mm_struct *mm);
-
 #endif /* !__ASSEMBLY__ */
 
 #endif


-- 
http://www.codemonkey.org.uk

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-12-29  6:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-29  6:29 Fix implicit declarations in i386 process.c Dave Jones

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