diff options
author | Jaswinder Singh Rajput <jaswinder@kernel.org> | 2009-04-10 14:33:10 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-04-12 09:20:16 -0400 |
commit | 2c1b284e4fa260fd922b9a65c99169e2630c6862 (patch) | |
tree | ca3d6283a18e592cff5e74526969a29a6d218c52 /arch/x86 | |
parent | 2de1f33e99cec5fd79542a1d0e26efb9c36a98bb (diff) |
x86: clean up declarations and variables
Impact: cleanup, no code changed
- syscalls.h update declarations due to unifications
- irq.c declare smp_generic_interrupt() before it gets used
- process.c declare sys_fork() and sys_vfork() before they get used
- tsc.c rename tsc_khz shadowed variable
- apic/probe_32.c declare apic_default before it gets used
- apic/nmi.c prev_nmi_count should be unsigned
- apic/io_apic.c declare smp_irq_move_cleanup_interrupt() before it gets used
- mm/init.c declare direct_gbpages and free_initrd_mem before they get used
Signed-off-by: Jaswinder Singh Rajput <jaswinder@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/include/asm/apic.h | 3 | ||||
-rw-r--r-- | arch/x86/include/asm/hw_irq.h | 4 | ||||
-rw-r--r-- | arch/x86/include/asm/pgtable.h | 2 | ||||
-rw-r--r-- | arch/x86/include/asm/pgtable_64.h | 6 | ||||
-rw-r--r-- | arch/x86/include/asm/syscalls.h | 45 | ||||
-rw-r--r-- | arch/x86/kernel/apic/io_apic.c | 1 | ||||
-rw-r--r-- | arch/x86/kernel/apic/nmi.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/apic/probe_32.c | 1 | ||||
-rw-r--r-- | arch/x86/kernel/irq.c | 1 | ||||
-rw-r--r-- | arch/x86/kernel/process.c | 1 | ||||
-rw-r--r-- | arch/x86/kernel/tsc.c | 8 | ||||
-rw-r--r-- | arch/x86/mm/init.c | 1 |
12 files changed, 42 insertions, 33 deletions
diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h index 42f2f8377422..5773660c8cd5 100644 --- a/arch/x86/include/asm/apic.h +++ b/arch/x86/include/asm/apic.h | |||
@@ -478,6 +478,9 @@ static inline unsigned int read_apic_id(void) | |||
478 | extern void default_setup_apic_routing(void); | 478 | extern void default_setup_apic_routing(void); |
479 | 479 | ||
480 | #ifdef CONFIG_X86_32 | 480 | #ifdef CONFIG_X86_32 |
481 | |||
482 | extern struct apic apic_default; | ||
483 | |||
481 | /* | 484 | /* |
482 | * Set up the logical destination ID. | 485 | * Set up the logical destination ID. |
483 | * | 486 | * |
diff --git a/arch/x86/include/asm/hw_irq.h b/arch/x86/include/asm/hw_irq.h index b762ea49bd70..be9ae4111c94 100644 --- a/arch/x86/include/asm/hw_irq.h +++ b/arch/x86/include/asm/hw_irq.h | |||
@@ -78,7 +78,11 @@ extern void eisa_set_level_irq(unsigned int irq); | |||
78 | /* SMP */ | 78 | /* SMP */ |
79 | extern void smp_apic_timer_interrupt(struct pt_regs *); | 79 | extern void smp_apic_timer_interrupt(struct pt_regs *); |
80 | extern void smp_spurious_interrupt(struct pt_regs *); | 80 | extern void smp_spurious_interrupt(struct pt_regs *); |
81 | extern void smp_generic_interrupt(struct pt_regs *); | ||
81 | extern void smp_error_interrupt(struct pt_regs *); | 82 | extern void smp_error_interrupt(struct pt_regs *); |
83 | #ifdef CONFIG_X86_IO_APIC | ||
84 | extern asmlinkage void smp_irq_move_cleanup_interrupt(void); | ||
85 | #endif | ||
82 | #ifdef CONFIG_SMP | 86 | #ifdef CONFIG_SMP |
83 | extern void smp_reschedule_interrupt(struct pt_regs *); | 87 | extern void smp_reschedule_interrupt(struct pt_regs *); |
84 | extern void smp_call_function_interrupt(struct pt_regs *); | 88 | extern void smp_call_function_interrupt(struct pt_regs *); |
diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h index 29d96d168bc0..3f8d09d94eb3 100644 --- a/arch/x86/include/asm/pgtable.h +++ b/arch/x86/include/asm/pgtable.h | |||
@@ -503,6 +503,8 @@ static inline int pgd_none(pgd_t pgd) | |||
503 | 503 | ||
504 | #ifndef __ASSEMBLY__ | 504 | #ifndef __ASSEMBLY__ |
505 | 505 | ||
506 | extern int direct_gbpages; | ||
507 | |||
506 | /* local pte updates need not use xchg for locking */ | 508 | /* local pte updates need not use xchg for locking */ |
507 | static inline pte_t native_local_ptep_get_and_clear(pte_t *ptep) | 509 | static inline pte_t native_local_ptep_get_and_clear(pte_t *ptep) |
508 | { | 510 | { |
diff --git a/arch/x86/include/asm/pgtable_64.h b/arch/x86/include/asm/pgtable_64.h index 6b87bc6d5018..abde308fdb0f 100644 --- a/arch/x86/include/asm/pgtable_64.h +++ b/arch/x86/include/asm/pgtable_64.h | |||
@@ -25,10 +25,6 @@ extern pgd_t init_level4_pgt[]; | |||
25 | 25 | ||
26 | extern void paging_init(void); | 26 | extern void paging_init(void); |
27 | 27 | ||
28 | #endif /* !__ASSEMBLY__ */ | ||
29 | |||
30 | #ifndef __ASSEMBLY__ | ||
31 | |||
32 | #define pte_ERROR(e) \ | 28 | #define pte_ERROR(e) \ |
33 | printk("%s:%d: bad pte %p(%016lx).\n", \ | 29 | printk("%s:%d: bad pte %p(%016lx).\n", \ |
34 | __FILE__, __LINE__, &(e), pte_val(e)) | 30 | __FILE__, __LINE__, &(e), pte_val(e)) |
@@ -135,8 +131,6 @@ static inline int pgd_large(pgd_t pgd) { return 0; } | |||
135 | 131 | ||
136 | #define update_mmu_cache(vma, address, pte) do { } while (0) | 132 | #define update_mmu_cache(vma, address, pte) do { } while (0) |
137 | 133 | ||
138 | extern int direct_gbpages; | ||
139 | |||
140 | /* Encode and de-code a swap entry */ | 134 | /* Encode and de-code a swap entry */ |
141 | #if _PAGE_BIT_FILE < _PAGE_BIT_PROTNONE | 135 | #if _PAGE_BIT_FILE < _PAGE_BIT_PROTNONE |
142 | #define SWP_TYPE_BITS (_PAGE_BIT_FILE - _PAGE_BIT_PRESENT - 1) | 136 | #define SWP_TYPE_BITS (_PAGE_BIT_FILE - _PAGE_BIT_PRESENT - 1) |
diff --git a/arch/x86/include/asm/syscalls.h b/arch/x86/include/asm/syscalls.h index 7043408f6904..372b76edd63f 100644 --- a/arch/x86/include/asm/syscalls.h +++ b/arch/x86/include/asm/syscalls.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * syscalls.h - Linux syscall interfaces (arch-specific) | 2 | * syscalls.h - Linux syscall interfaces (arch-specific) |
3 | * | 3 | * |
4 | * Copyright (c) 2008 Jaswinder Singh | 4 | * Copyright (c) 2008 Jaswinder Singh Rajput |
5 | * | 5 | * |
6 | * This file is released under the GPLv2. | 6 | * This file is released under the GPLv2. |
7 | * See the file COPYING for more details. | 7 | * See the file COPYING for more details. |
@@ -12,50 +12,55 @@ | |||
12 | 12 | ||
13 | #include <linux/compiler.h> | 13 | #include <linux/compiler.h> |
14 | #include <linux/linkage.h> | 14 | #include <linux/linkage.h> |
15 | #include <linux/types.h> | ||
16 | #include <linux/signal.h> | 15 | #include <linux/signal.h> |
16 | #include <linux/types.h> | ||
17 | 17 | ||
18 | /* Common in X86_32 and X86_64 */ | 18 | /* Common in X86_32 and X86_64 */ |
19 | /* kernel/ioport.c */ | 19 | /* kernel/ioport.c */ |
20 | asmlinkage long sys_ioperm(unsigned long, unsigned long, int); | 20 | asmlinkage long sys_ioperm(unsigned long, unsigned long, int); |
21 | 21 | ||
22 | /* kernel/process.c */ | ||
23 | int sys_fork(struct pt_regs *); | ||
24 | int sys_vfork(struct pt_regs *); | ||
25 | |||
22 | /* kernel/ldt.c */ | 26 | /* kernel/ldt.c */ |
23 | asmlinkage int sys_modify_ldt(int, void __user *, unsigned long); | 27 | asmlinkage int sys_modify_ldt(int, void __user *, unsigned long); |
24 | 28 | ||
29 | /* kernel/signal.c */ | ||
30 | long sys_rt_sigreturn(struct pt_regs *); | ||
31 | |||
25 | /* kernel/tls.c */ | 32 | /* kernel/tls.c */ |
26 | asmlinkage int sys_set_thread_area(struct user_desc __user *); | 33 | asmlinkage int sys_set_thread_area(struct user_desc __user *); |
27 | asmlinkage int sys_get_thread_area(struct user_desc __user *); | 34 | asmlinkage int sys_get_thread_area(struct user_desc __user *); |
28 | 35 | ||
29 | /* X86_32 only */ | 36 | /* X86_32 only */ |
30 | #ifdef CONFIG_X86_32 | 37 | #ifdef CONFIG_X86_32 |
38 | /* kernel/ioport.c */ | ||
39 | long sys_iopl(struct pt_regs *); | ||
40 | |||
31 | /* kernel/process_32.c */ | 41 | /* kernel/process_32.c */ |
32 | int sys_fork(struct pt_regs *); | ||
33 | int sys_clone(struct pt_regs *); | 42 | int sys_clone(struct pt_regs *); |
34 | int sys_vfork(struct pt_regs *); | ||
35 | int sys_execve(struct pt_regs *); | 43 | int sys_execve(struct pt_regs *); |
36 | 44 | ||
37 | /* kernel/signal_32.c */ | 45 | /* kernel/signal.c */ |
38 | asmlinkage int sys_sigsuspend(int, int, old_sigset_t); | 46 | asmlinkage int sys_sigsuspend(int, int, old_sigset_t); |
39 | asmlinkage int sys_sigaction(int, const struct old_sigaction __user *, | 47 | asmlinkage int sys_sigaction(int, const struct old_sigaction __user *, |
40 | struct old_sigaction __user *); | 48 | struct old_sigaction __user *); |
41 | int sys_sigaltstack(struct pt_regs *); | 49 | int sys_sigaltstack(struct pt_regs *); |
42 | unsigned long sys_sigreturn(struct pt_regs *); | 50 | unsigned long sys_sigreturn(struct pt_regs *); |
43 | long sys_rt_sigreturn(struct pt_regs *); | ||
44 | |||
45 | /* kernel/ioport.c */ | ||
46 | long sys_iopl(struct pt_regs *); | ||
47 | 51 | ||
48 | /* kernel/sys_i386_32.c */ | 52 | /* kernel/sys_i386_32.c */ |
53 | struct mmap_arg_struct; | ||
54 | struct sel_arg_struct; | ||
55 | struct oldold_utsname; | ||
56 | struct old_utsname; | ||
57 | |||
49 | asmlinkage long sys_mmap2(unsigned long, unsigned long, unsigned long, | 58 | asmlinkage long sys_mmap2(unsigned long, unsigned long, unsigned long, |
50 | unsigned long, unsigned long, unsigned long); | 59 | unsigned long, unsigned long, unsigned long); |
51 | struct mmap_arg_struct; | ||
52 | asmlinkage int old_mmap(struct mmap_arg_struct __user *); | 60 | asmlinkage int old_mmap(struct mmap_arg_struct __user *); |
53 | struct sel_arg_struct; | ||
54 | asmlinkage int old_select(struct sel_arg_struct __user *); | 61 | asmlinkage int old_select(struct sel_arg_struct __user *); |
55 | asmlinkage int sys_ipc(uint, int, int, int, void __user *, long); | 62 | asmlinkage int sys_ipc(uint, int, int, int, void __user *, long); |
56 | struct old_utsname; | ||
57 | asmlinkage int sys_uname(struct old_utsname __user *); | 63 | asmlinkage int sys_uname(struct old_utsname __user *); |
58 | struct oldold_utsname; | ||
59 | asmlinkage int sys_olduname(struct oldold_utsname __user *); | 64 | asmlinkage int sys_olduname(struct oldold_utsname __user *); |
60 | 65 | ||
61 | /* kernel/vm86_32.c */ | 66 | /* kernel/vm86_32.c */ |
@@ -65,29 +70,27 @@ int sys_vm86(struct pt_regs *); | |||
65 | #else /* CONFIG_X86_32 */ | 70 | #else /* CONFIG_X86_32 */ |
66 | 71 | ||
67 | /* X86_64 only */ | 72 | /* X86_64 only */ |
73 | /* kernel/ioport.c */ | ||
74 | asmlinkage long sys_iopl(unsigned int, struct pt_regs *); | ||
75 | |||
68 | /* kernel/process_64.c */ | 76 | /* kernel/process_64.c */ |
69 | asmlinkage long sys_fork(struct pt_regs *); | ||
70 | asmlinkage long sys_clone(unsigned long, unsigned long, | 77 | asmlinkage long sys_clone(unsigned long, unsigned long, |
71 | void __user *, void __user *, | 78 | void __user *, void __user *, |
72 | struct pt_regs *); | 79 | struct pt_regs *); |
73 | asmlinkage long sys_vfork(struct pt_regs *); | ||
74 | asmlinkage long sys_execve(char __user *, char __user * __user *, | 80 | asmlinkage long sys_execve(char __user *, char __user * __user *, |
75 | char __user * __user *, | 81 | char __user * __user *, |
76 | struct pt_regs *); | 82 | struct pt_regs *); |
77 | long sys_arch_prctl(int, unsigned long); | 83 | long sys_arch_prctl(int, unsigned long); |
78 | 84 | ||
79 | /* kernel/ioport.c */ | 85 | /* kernel/signal.c */ |
80 | asmlinkage long sys_iopl(unsigned int, struct pt_regs *); | ||
81 | |||
82 | /* kernel/signal_64.c */ | ||
83 | asmlinkage long sys_sigaltstack(const stack_t __user *, stack_t __user *, | 86 | asmlinkage long sys_sigaltstack(const stack_t __user *, stack_t __user *, |
84 | struct pt_regs *); | 87 | struct pt_regs *); |
85 | long sys_rt_sigreturn(struct pt_regs *); | ||
86 | 88 | ||
87 | /* kernel/sys_x86_64.c */ | 89 | /* kernel/sys_x86_64.c */ |
90 | struct new_utsname; | ||
91 | |||
88 | asmlinkage long sys_mmap(unsigned long, unsigned long, unsigned long, | 92 | asmlinkage long sys_mmap(unsigned long, unsigned long, unsigned long, |
89 | unsigned long, unsigned long, unsigned long); | 93 | unsigned long, unsigned long, unsigned long); |
90 | struct new_utsname; | ||
91 | asmlinkage long sys_uname(struct new_utsname __user *); | 94 | asmlinkage long sys_uname(struct new_utsname __user *); |
92 | 95 | ||
93 | #endif /* CONFIG_X86_32 */ | 96 | #endif /* CONFIG_X86_32 */ |
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index 767fe7e46d68..870c92ddaf9c 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c | |||
@@ -59,6 +59,7 @@ | |||
59 | #include <asm/setup.h> | 59 | #include <asm/setup.h> |
60 | #include <asm/irq_remapping.h> | 60 | #include <asm/irq_remapping.h> |
61 | #include <asm/hpet.h> | 61 | #include <asm/hpet.h> |
62 | #include <asm/hw_irq.h> | ||
62 | #include <asm/uv/uv_hub.h> | 63 | #include <asm/uv/uv_hub.h> |
63 | #include <asm/uv/uv_irq.h> | 64 | #include <asm/uv/uv_irq.h> |
64 | 65 | ||
diff --git a/arch/x86/kernel/apic/nmi.c b/arch/x86/kernel/apic/nmi.c index d6bd62407152..02056310f2f5 100644 --- a/arch/x86/kernel/apic/nmi.c +++ b/arch/x86/kernel/apic/nmi.c | |||
@@ -104,7 +104,7 @@ static __init void nmi_cpu_busy(void *data) | |||
104 | } | 104 | } |
105 | #endif | 105 | #endif |
106 | 106 | ||
107 | static void report_broken_nmi(int cpu, int *prev_nmi_count) | 107 | static void report_broken_nmi(int cpu, unsigned int *prev_nmi_count) |
108 | { | 108 | { |
109 | printk(KERN_CONT "\n"); | 109 | printk(KERN_CONT "\n"); |
110 | 110 | ||
diff --git a/arch/x86/kernel/apic/probe_32.c b/arch/x86/kernel/apic/probe_32.c index 01eda2ac65e4..440a8bccd91a 100644 --- a/arch/x86/kernel/apic/probe_32.c +++ b/arch/x86/kernel/apic/probe_32.c | |||
@@ -160,7 +160,6 @@ extern struct apic apic_summit; | |||
160 | extern struct apic apic_bigsmp; | 160 | extern struct apic apic_bigsmp; |
161 | extern struct apic apic_es7000; | 161 | extern struct apic apic_es7000; |
162 | extern struct apic apic_es7000_cluster; | 162 | extern struct apic apic_es7000_cluster; |
163 | extern struct apic apic_default; | ||
164 | 163 | ||
165 | struct apic *apic = &apic_default; | 164 | struct apic *apic = &apic_default; |
166 | EXPORT_SYMBOL_GPL(apic); | 165 | EXPORT_SYMBOL_GPL(apic); |
diff --git a/arch/x86/kernel/irq.c b/arch/x86/kernel/irq.c index 3aaf7b9e3a8b..2188267f523b 100644 --- a/arch/x86/kernel/irq.c +++ b/arch/x86/kernel/irq.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <asm/io_apic.h> | 12 | #include <asm/io_apic.h> |
13 | #include <asm/irq.h> | 13 | #include <asm/irq.h> |
14 | #include <asm/idle.h> | 14 | #include <asm/idle.h> |
15 | #include <asm/hw_irq.h> | ||
15 | 16 | ||
16 | atomic_t irq_err_count; | 17 | atomic_t irq_err_count; |
17 | 18 | ||
diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c index ca989158e847..3e21e38d7e37 100644 --- a/arch/x86/kernel/process.c +++ b/arch/x86/kernel/process.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <trace/power.h> | 11 | #include <trace/power.h> |
12 | #include <asm/system.h> | 12 | #include <asm/system.h> |
13 | #include <asm/apic.h> | 13 | #include <asm/apic.h> |
14 | #include <asm/syscalls.h> | ||
14 | #include <asm/idle.h> | 15 | #include <asm/idle.h> |
15 | #include <asm/uaccess.h> | 16 | #include <asm/uaccess.h> |
16 | #include <asm/i387.h> | 17 | #include <asm/i387.h> |
diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c index 7a567ebe6361..a8dc0d00b830 100644 --- a/arch/x86/kernel/tsc.c +++ b/arch/x86/kernel/tsc.c | |||
@@ -384,13 +384,13 @@ unsigned long native_calibrate_tsc(void) | |||
384 | { | 384 | { |
385 | u64 tsc1, tsc2, delta, ref1, ref2; | 385 | u64 tsc1, tsc2, delta, ref1, ref2; |
386 | unsigned long tsc_pit_min = ULONG_MAX, tsc_ref_min = ULONG_MAX; | 386 | unsigned long tsc_pit_min = ULONG_MAX, tsc_ref_min = ULONG_MAX; |
387 | unsigned long flags, latch, ms, fast_calibrate, tsc_khz; | 387 | unsigned long flags, latch, ms, fast_calibrate, hv_tsc_khz; |
388 | int hpet = is_hpet_enabled(), i, loopmin; | 388 | int hpet = is_hpet_enabled(), i, loopmin; |
389 | 389 | ||
390 | tsc_khz = get_hypervisor_tsc_freq(); | 390 | hv_tsc_khz = get_hypervisor_tsc_freq(); |
391 | if (tsc_khz) { | 391 | if (hv_tsc_khz) { |
392 | printk(KERN_INFO "TSC: Frequency read from the hypervisor\n"); | 392 | printk(KERN_INFO "TSC: Frequency read from the hypervisor\n"); |
393 | return tsc_khz; | 393 | return hv_tsc_khz; |
394 | } | 394 | } |
395 | 395 | ||
396 | local_irq_save(flags); | 396 | local_irq_save(flags); |
diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c index fd3da1dda1c9..40924e445f57 100644 --- a/arch/x86/mm/init.c +++ b/arch/x86/mm/init.c | |||
@@ -1,3 +1,4 @@ | |||
1 | #include <linux/initrd.h> | ||
1 | #include <linux/ioport.h> | 2 | #include <linux/ioport.h> |
2 | #include <linux/swap.h> | 3 | #include <linux/swap.h> |
3 | 4 | ||