x86: traps_xx: shuffle headers and globals

Reorder headers and collect globals in traps_32.c and traps_64.c

Code size and data size are unaffected by the changes. Code
itself is changed due to different ordering of data and bss.
The bss segment changed size due to a change in the packing
of the variables.

Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm>
Acked-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
Alexander van Heukelum 2008-07-02 01:30:30 +02:00 committed by Ingo Molnar
parent a8c1be9d2e
commit badc76527f
2 changed files with 36 additions and 40 deletions

View File

@ -61,8 +61,6 @@
#include "mach_traps.h" #include "mach_traps.h"
int panic_on_unrecovered_nmi;
DECLARE_BITMAP(used_vectors, NR_VECTORS); DECLARE_BITMAP(used_vectors, NR_VECTORS);
EXPORT_SYMBOL_GPL(used_vectors); EXPORT_SYMBOL_GPL(used_vectors);
@ -99,8 +97,11 @@ asmlinkage void alignment_check(void);
asmlinkage void spurious_interrupt_bug(void); asmlinkage void spurious_interrupt_bug(void);
asmlinkage void machine_check(void); asmlinkage void machine_check(void);
int panic_on_unrecovered_nmi;
int kstack_depth_to_print = 24; int kstack_depth_to_print = 24;
static unsigned int code_bytes = 64; static unsigned int code_bytes = 64;
static int ignore_nmis;
static int die_counter;
void printk_address(unsigned long address, int reliable) void printk_address(unsigned long address, int reliable)
{ {
@ -382,8 +383,6 @@ int is_valid_bugaddr(unsigned long ip)
return ud2 == 0x0b0f; return ud2 == 0x0b0f;
} }
static int die_counter;
int __kprobes __die(const char *str, struct pt_regs *regs, long err) int __kprobes __die(const char *str, struct pt_regs *regs, long err)
{ {
unsigned short ss; unsigned short ss;
@ -829,8 +828,6 @@ static notrace __kprobes void default_do_nmi(struct pt_regs *regs)
reassert_nmi(); reassert_nmi();
} }
static int ignore_nmis;
notrace __kprobes void do_nmi(struct pt_regs *regs, long error_code) notrace __kprobes void do_nmi(struct pt_regs *regs, long error_code)
{ {
int cpu; int cpu;

View File

@ -10,49 +10,49 @@
* 'Traps.c' handles hardware traps and faults after we have saved some * 'Traps.c' handles hardware traps and faults after we have saved some
* state in 'entry.S'. * state in 'entry.S'.
*/ */
#include <linux/sched.h> #include <linux/moduleparam.h>
#include <linux/kernel.h>
#include <linux/string.h>
#include <linux/errno.h>
#include <linux/ptrace.h>
#include <linux/timer.h>
#include <linux/mm.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/spinlock.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/kallsyms.h> #include <linux/kallsyms.h>
#include <linux/module.h> #include <linux/spinlock.h>
#include <linux/moduleparam.h>
#include <linux/nmi.h>
#include <linux/kprobes.h> #include <linux/kprobes.h>
#include <linux/kexec.h>
#include <linux/unwind.h>
#include <linux/uaccess.h> #include <linux/uaccess.h>
#include <linux/bug.h>
#include <linux/kdebug.h>
#include <linux/utsname.h> #include <linux/utsname.h>
#include <linux/kdebug.h>
#include <mach_traps.h> #include <linux/kernel.h>
#include <linux/module.h>
#include <linux/ptrace.h>
#include <linux/string.h>
#include <linux/unwind.h>
#include <linux/delay.h>
#include <linux/errno.h>
#include <linux/kexec.h>
#include <linux/sched.h>
#include <linux/timer.h>
#include <linux/init.h>
#include <linux/bug.h>
#include <linux/nmi.h>
#include <linux/mm.h>
#if defined(CONFIG_EDAC) #if defined(CONFIG_EDAC)
#include <linux/edac.h> #include <linux/edac.h>
#endif #endif
#include <asm/system.h> #include <asm/stacktrace.h>
#include <asm/io.h> #include <asm/processor.h>
#include <asm/atomic.h>
#include <asm/debugreg.h> #include <asm/debugreg.h>
#include <asm/atomic.h>
#include <asm/system.h>
#include <asm/unwind.h>
#include <asm/desc.h> #include <asm/desc.h>
#include <asm/i387.h> #include <asm/i387.h>
#include <asm/processor.h>
#include <asm/unwind.h>
#include <asm/smp.h>
#include <asm/pgalloc.h>
#include <asm/pda.h>
#include <asm/proto.h>
#include <asm/nmi.h> #include <asm/nmi.h>
#include <asm/stacktrace.h> #include <asm/smp.h>
#include <asm/io.h>
#include <asm/pgalloc.h>
#include <asm/proto.h>
#include <asm/pda.h>
#include <mach_traps.h>
asmlinkage void divide_error(void); asmlinkage void divide_error(void);
asmlinkage void debug(void); asmlinkage void debug(void);
@ -72,12 +72,14 @@ asmlinkage void page_fault(void);
asmlinkage void coprocessor_error(void); asmlinkage void coprocessor_error(void);
asmlinkage void simd_coprocessor_error(void); asmlinkage void simd_coprocessor_error(void);
asmlinkage void alignment_check(void); asmlinkage void alignment_check(void);
asmlinkage void machine_check(void);
asmlinkage void spurious_interrupt_bug(void); asmlinkage void spurious_interrupt_bug(void);
asmlinkage void machine_check(void);
int panic_on_unrecovered_nmi; int panic_on_unrecovered_nmi;
int kstack_depth_to_print = 12;
static unsigned int code_bytes = 64; static unsigned int code_bytes = 64;
static unsigned ignore_nmis; static int ignore_nmis;
static int die_counter;
static inline void conditional_sti(struct pt_regs *regs) static inline void conditional_sti(struct pt_regs *regs)
{ {
@ -101,8 +103,6 @@ static inline void preempt_conditional_cli(struct pt_regs *regs)
dec_preempt_count(); dec_preempt_count();
} }
int kstack_depth_to_print = 12;
void printk_address(unsigned long address, int reliable) void printk_address(unsigned long address, int reliable)
{ {
#ifdef CONFIG_KALLSYMS #ifdef CONFIG_KALLSYMS
@ -559,7 +559,6 @@ void __kprobes oops_end(unsigned long flags, struct pt_regs *regs, int signr)
int __kprobes __die(const char * str, struct pt_regs * regs, long err) int __kprobes __die(const char * str, struct pt_regs * regs, long err)
{ {
static int die_counter;
printk(KERN_EMERG "%s: %04lx [%u] ", str, err & 0xffff,++die_counter); printk(KERN_EMERG "%s: %04lx [%u] ", str, err & 0xffff,++die_counter);
#ifdef CONFIG_PREEMPT #ifdef CONFIG_PREEMPT
printk("PREEMPT "); printk("PREEMPT ");