public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] trivial, uninline do_trap(), remove get_cr2()
@ 2004-11-17 14:48 Oleg Nesterov
  2004-11-17 17:12 ` Randy.Dunlap
  0 siblings, 1 reply; 2+ messages in thread
From: Oleg Nesterov @ 2004-11-17 14:48 UTC (permalink / raw)
  To: linux-kernel; +Cc: Andrew Morton

Uninlining do_trap() saves 544 bytes in traps.o.
get_cr2() seems to be unused, remove it.

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>

--- 2.6.10-rc2/arch/i386/kernel/traps.c~	Tue Nov 16 14:13:08 2004
+++ 2.6.10-rc2/arch/i386/kernel/traps.c	Wed Nov 17 16:47:41 2004
@@ -358,16 +358,7 @@ static inline void die_if_kernel(const c
 		die(str, regs, err);
 }
 
-static inline unsigned long get_cr2(void)
-{
-	unsigned long address;
-
-	/* get the address */
-	__asm__("movl %%cr2,%0":"=r" (address));
-	return address;
-}
-
-static inline void do_trap(int trapnr, int signr, char *str, int vm86,
+static void do_trap(int trapnr, int signr, char *str, int vm86,
 			   struct pt_regs * regs, long error_code, siginfo_t *info)
 {
 	if (regs->eflags & VM_MASK) {

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

* Re: [PATCH] trivial, uninline do_trap(), remove get_cr2()
  2004-11-17 14:48 [PATCH] trivial, uninline do_trap(), remove get_cr2() Oleg Nesterov
@ 2004-11-17 17:12 ` Randy.Dunlap
  0 siblings, 0 replies; 2+ messages in thread
From: Randy.Dunlap @ 2004-11-17 17:12 UTC (permalink / raw)
  To: Oleg Nesterov; +Cc: linux-kernel, Andrew Morton

Oleg Nesterov wrote:
> Uninlining do_trap() saves 544 bytes in traps.o.
> get_cr2() seems to be unused, remove it.
> 
> Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
> 
> --- 2.6.10-rc2/arch/i386/kernel/traps.c~	Tue Nov 16 14:13:08 2004
> +++ 2.6.10-rc2/arch/i386/kernel/traps.c	Wed Nov 17 16:47:41 2004
> @@ -358,16 +358,7 @@ static inline void die_if_kernel(const c
>  		die(str, regs, err);
>  }
>  
> -static inline unsigned long get_cr2(void)
> -{
> -	unsigned long address;
> -
> -	/* get the address */
> -	__asm__("movl %%cr2,%0":"=r" (address));
> -	return address;
> -}

Looks like it can be removed from arch/x86_64/kernel/traps.c also.

-- 
~Randy

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

end of thread, other threads:[~2004-11-17 17:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-17 14:48 [PATCH] trivial, uninline do_trap(), remove get_cr2() Oleg Nesterov
2004-11-17 17:12 ` Randy.Dunlap

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