diff options
author | Adrian Bunk <bunk@stusta.de> | 2005-09-12 12:49:24 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-12 13:50:56 -0400 |
commit | 9c0aa0f9a16557a3dd9b7b0d39bc67ddf1fa0b32 (patch) | |
tree | 7f56da5c81c9e8751a0c85ba7e2495e0616971a8 | |
parent | 47e5701e37cf10948c3f2952870d9f18b6e84965 (diff) |
[PATCH] Replace extern inline with static inline in asm-x86_64/*
They should be identical in the kernel now, but this
makes it consistent with other code.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | include/asm-x86_64/desc.h | 2 | ||||
-rw-r--r-- | include/asm-x86_64/fixmap.h | 2 | ||||
-rw-r--r-- | include/asm-x86_64/io.h | 14 | ||||
-rw-r--r-- | include/asm-x86_64/msr.h | 10 | ||||
-rw-r--r-- | include/asm-x86_64/pgalloc.h | 8 | ||||
-rw-r--r-- | include/asm-x86_64/pgtable.h | 6 | ||||
-rw-r--r-- | include/asm-x86_64/processor.h | 4 | ||||
-rw-r--r-- | include/asm-x86_64/signal.h | 10 | ||||
-rw-r--r-- | include/asm-x86_64/smp.h | 2 | ||||
-rw-r--r-- | include/asm-x86_64/system.h | 2 |
10 files changed, 30 insertions, 30 deletions
diff --git a/include/asm-x86_64/desc.h b/include/asm-x86_64/desc.h index c89b58bebee2..594e610f4a1e 100644 --- a/include/asm-x86_64/desc.h +++ b/include/asm-x86_64/desc.h | |||
@@ -191,7 +191,7 @@ static inline void load_TLS(struct thread_struct *t, unsigned int cpu) | |||
191 | /* | 191 | /* |
192 | * load one particular LDT into the current CPU | 192 | * load one particular LDT into the current CPU |
193 | */ | 193 | */ |
194 | extern inline void load_LDT_nolock (mm_context_t *pc, int cpu) | 194 | static inline void load_LDT_nolock (mm_context_t *pc, int cpu) |
195 | { | 195 | { |
196 | int count = pc->size; | 196 | int count = pc->size; |
197 | 197 | ||
diff --git a/include/asm-x86_64/fixmap.h b/include/asm-x86_64/fixmap.h index cf8b16cbe8db..a582cfcf2231 100644 --- a/include/asm-x86_64/fixmap.h +++ b/include/asm-x86_64/fixmap.h | |||
@@ -76,7 +76,7 @@ extern void __this_fixmap_does_not_exist(void); | |||
76 | * directly without translation, we catch the bug with a NULL-deference | 76 | * directly without translation, we catch the bug with a NULL-deference |
77 | * kernel oops. Illegal ranges of incoming indices are caught too. | 77 | * kernel oops. Illegal ranges of incoming indices are caught too. |
78 | */ | 78 | */ |
79 | extern inline unsigned long fix_to_virt(const unsigned int idx) | 79 | static inline unsigned long fix_to_virt(const unsigned int idx) |
80 | { | 80 | { |
81 | /* | 81 | /* |
82 | * this branch gets completely eliminated after inlining, | 82 | * this branch gets completely eliminated after inlining, |
diff --git a/include/asm-x86_64/io.h b/include/asm-x86_64/io.h index 37fc3f149a5a..52ff269fe054 100644 --- a/include/asm-x86_64/io.h +++ b/include/asm-x86_64/io.h | |||
@@ -48,7 +48,7 @@ | |||
48 | * Talk about misusing macros.. | 48 | * Talk about misusing macros.. |
49 | */ | 49 | */ |
50 | #define __OUT1(s,x) \ | 50 | #define __OUT1(s,x) \ |
51 | extern inline void out##s(unsigned x value, unsigned short port) { | 51 | static inline void out##s(unsigned x value, unsigned short port) { |
52 | 52 | ||
53 | #define __OUT2(s,s1,s2) \ | 53 | #define __OUT2(s,s1,s2) \ |
54 | __asm__ __volatile__ ("out" #s " %" s1 "0,%" s2 "1" | 54 | __asm__ __volatile__ ("out" #s " %" s1 "0,%" s2 "1" |
@@ -58,7 +58,7 @@ __OUT1(s,x) __OUT2(s,s1,"w") : : "a" (value), "Nd" (port)); } \ | |||
58 | __OUT1(s##_p,x) __OUT2(s,s1,"w") __FULL_SLOW_DOWN_IO : : "a" (value), "Nd" (port));} \ | 58 | __OUT1(s##_p,x) __OUT2(s,s1,"w") __FULL_SLOW_DOWN_IO : : "a" (value), "Nd" (port));} \ |
59 | 59 | ||
60 | #define __IN1(s) \ | 60 | #define __IN1(s) \ |
61 | extern inline RETURN_TYPE in##s(unsigned short port) { RETURN_TYPE _v; | 61 | static inline RETURN_TYPE in##s(unsigned short port) { RETURN_TYPE _v; |
62 | 62 | ||
63 | #define __IN2(s,s1,s2) \ | 63 | #define __IN2(s,s1,s2) \ |
64 | __asm__ __volatile__ ("in" #s " %" s2 "1,%" s1 "0" | 64 | __asm__ __volatile__ ("in" #s " %" s2 "1,%" s1 "0" |
@@ -68,12 +68,12 @@ __IN1(s) __IN2(s,s1,"w") : "=a" (_v) : "Nd" (port) ,##i ); return _v; } \ | |||
68 | __IN1(s##_p) __IN2(s,s1,"w") __FULL_SLOW_DOWN_IO : "=a" (_v) : "Nd" (port) ,##i ); return _v; } \ | 68 | __IN1(s##_p) __IN2(s,s1,"w") __FULL_SLOW_DOWN_IO : "=a" (_v) : "Nd" (port) ,##i ); return _v; } \ |
69 | 69 | ||
70 | #define __INS(s) \ | 70 | #define __INS(s) \ |
71 | extern inline void ins##s(unsigned short port, void * addr, unsigned long count) \ | 71 | static inline void ins##s(unsigned short port, void * addr, unsigned long count) \ |
72 | { __asm__ __volatile__ ("rep ; ins" #s \ | 72 | { __asm__ __volatile__ ("rep ; ins" #s \ |
73 | : "=D" (addr), "=c" (count) : "d" (port),"0" (addr),"1" (count)); } | 73 | : "=D" (addr), "=c" (count) : "d" (port),"0" (addr),"1" (count)); } |
74 | 74 | ||
75 | #define __OUTS(s) \ | 75 | #define __OUTS(s) \ |
76 | extern inline void outs##s(unsigned short port, const void * addr, unsigned long count) \ | 76 | static inline void outs##s(unsigned short port, const void * addr, unsigned long count) \ |
77 | { __asm__ __volatile__ ("rep ; outs" #s \ | 77 | { __asm__ __volatile__ ("rep ; outs" #s \ |
78 | : "=S" (addr), "=c" (count) : "d" (port),"0" (addr),"1" (count)); } | 78 | : "=S" (addr), "=c" (count) : "d" (port),"0" (addr),"1" (count)); } |
79 | 79 | ||
@@ -110,12 +110,12 @@ __OUTS(l) | |||
110 | * Change virtual addresses to physical addresses and vv. | 110 | * Change virtual addresses to physical addresses and vv. |
111 | * These are pretty trivial | 111 | * These are pretty trivial |
112 | */ | 112 | */ |
113 | extern inline unsigned long virt_to_phys(volatile void * address) | 113 | static inline unsigned long virt_to_phys(volatile void * address) |
114 | { | 114 | { |
115 | return __pa(address); | 115 | return __pa(address); |
116 | } | 116 | } |
117 | 117 | ||
118 | extern inline void * phys_to_virt(unsigned long address) | 118 | static inline void * phys_to_virt(unsigned long address) |
119 | { | 119 | { |
120 | return __va(address); | 120 | return __va(address); |
121 | } | 121 | } |
@@ -130,7 +130,7 @@ extern inline void * phys_to_virt(unsigned long address) | |||
130 | 130 | ||
131 | extern void __iomem *__ioremap(unsigned long offset, unsigned long size, unsigned long flags); | 131 | extern void __iomem *__ioremap(unsigned long offset, unsigned long size, unsigned long flags); |
132 | 132 | ||
133 | extern inline void __iomem * ioremap (unsigned long offset, unsigned long size) | 133 | static inline void __iomem * ioremap (unsigned long offset, unsigned long size) |
134 | { | 134 | { |
135 | return __ioremap(offset, size, 0); | 135 | return __ioremap(offset, size, 0); |
136 | } | 136 | } |
diff --git a/include/asm-x86_64/msr.h b/include/asm-x86_64/msr.h index ba15279a79d0..15a6ef7cf3d3 100644 --- a/include/asm-x86_64/msr.h +++ b/include/asm-x86_64/msr.h | |||
@@ -64,7 +64,7 @@ | |||
64 | : "=a" (low), "=d" (high) \ | 64 | : "=a" (low), "=d" (high) \ |
65 | : "c" (counter)) | 65 | : "c" (counter)) |
66 | 66 | ||
67 | extern inline void cpuid(int op, unsigned int *eax, unsigned int *ebx, | 67 | static inline void cpuid(int op, unsigned int *eax, unsigned int *ebx, |
68 | unsigned int *ecx, unsigned int *edx) | 68 | unsigned int *ecx, unsigned int *edx) |
69 | { | 69 | { |
70 | __asm__("cpuid" | 70 | __asm__("cpuid" |
@@ -90,7 +90,7 @@ static inline void cpuid_count(int op, int count, int *eax, int *ebx, int *ecx, | |||
90 | /* | 90 | /* |
91 | * CPUID functions returning a single datum | 91 | * CPUID functions returning a single datum |
92 | */ | 92 | */ |
93 | extern inline unsigned int cpuid_eax(unsigned int op) | 93 | static inline unsigned int cpuid_eax(unsigned int op) |
94 | { | 94 | { |
95 | unsigned int eax; | 95 | unsigned int eax; |
96 | 96 | ||
@@ -100,7 +100,7 @@ extern inline unsigned int cpuid_eax(unsigned int op) | |||
100 | : "bx", "cx", "dx"); | 100 | : "bx", "cx", "dx"); |
101 | return eax; | 101 | return eax; |
102 | } | 102 | } |
103 | extern inline unsigned int cpuid_ebx(unsigned int op) | 103 | static inline unsigned int cpuid_ebx(unsigned int op) |
104 | { | 104 | { |
105 | unsigned int eax, ebx; | 105 | unsigned int eax, ebx; |
106 | 106 | ||
@@ -110,7 +110,7 @@ extern inline unsigned int cpuid_ebx(unsigned int op) | |||
110 | : "cx", "dx" ); | 110 | : "cx", "dx" ); |
111 | return ebx; | 111 | return ebx; |
112 | } | 112 | } |
113 | extern inline unsigned int cpuid_ecx(unsigned int op) | 113 | static inline unsigned int cpuid_ecx(unsigned int op) |
114 | { | 114 | { |
115 | unsigned int eax, ecx; | 115 | unsigned int eax, ecx; |
116 | 116 | ||
@@ -120,7 +120,7 @@ extern inline unsigned int cpuid_ecx(unsigned int op) | |||
120 | : "bx", "dx" ); | 120 | : "bx", "dx" ); |
121 | return ecx; | 121 | return ecx; |
122 | } | 122 | } |
123 | extern inline unsigned int cpuid_edx(unsigned int op) | 123 | static inline unsigned int cpuid_edx(unsigned int op) |
124 | { | 124 | { |
125 | unsigned int eax, edx; | 125 | unsigned int eax, edx; |
126 | 126 | ||
diff --git a/include/asm-x86_64/pgalloc.h b/include/asm-x86_64/pgalloc.h index deadd146978b..08cad2482bcb 100644 --- a/include/asm-x86_64/pgalloc.h +++ b/include/asm-x86_64/pgalloc.h | |||
@@ -18,12 +18,12 @@ static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd, struct page *p | |||
18 | set_pmd(pmd, __pmd(_PAGE_TABLE | (page_to_pfn(pte) << PAGE_SHIFT))); | 18 | set_pmd(pmd, __pmd(_PAGE_TABLE | (page_to_pfn(pte) << PAGE_SHIFT))); |
19 | } | 19 | } |
20 | 20 | ||
21 | extern __inline__ pmd_t *get_pmd(void) | 21 | static inline pmd_t *get_pmd(void) |
22 | { | 22 | { |
23 | return (pmd_t *)get_zeroed_page(GFP_KERNEL); | 23 | return (pmd_t *)get_zeroed_page(GFP_KERNEL); |
24 | } | 24 | } |
25 | 25 | ||
26 | extern __inline__ void pmd_free(pmd_t *pmd) | 26 | static inline void pmd_free(pmd_t *pmd) |
27 | { | 27 | { |
28 | BUG_ON((unsigned long)pmd & (PAGE_SIZE-1)); | 28 | BUG_ON((unsigned long)pmd & (PAGE_SIZE-1)); |
29 | free_page((unsigned long)pmd); | 29 | free_page((unsigned long)pmd); |
@@ -86,13 +86,13 @@ static inline struct page *pte_alloc_one(struct mm_struct *mm, unsigned long add | |||
86 | /* Should really implement gc for free page table pages. This could be | 86 | /* Should really implement gc for free page table pages. This could be |
87 | done with a reference count in struct page. */ | 87 | done with a reference count in struct page. */ |
88 | 88 | ||
89 | extern __inline__ void pte_free_kernel(pte_t *pte) | 89 | static inline void pte_free_kernel(pte_t *pte) |
90 | { | 90 | { |
91 | BUG_ON((unsigned long)pte & (PAGE_SIZE-1)); | 91 | BUG_ON((unsigned long)pte & (PAGE_SIZE-1)); |
92 | free_page((unsigned long)pte); | 92 | free_page((unsigned long)pte); |
93 | } | 93 | } |
94 | 94 | ||
95 | extern inline void pte_free(struct page *pte) | 95 | static inline void pte_free(struct page *pte) |
96 | { | 96 | { |
97 | __free_page(pte); | 97 | __free_page(pte); |
98 | } | 98 | } |
diff --git a/include/asm-x86_64/pgtable.h b/include/asm-x86_64/pgtable.h index 5e0f2fdab0d3..1dc110ba82d6 100644 --- a/include/asm-x86_64/pgtable.h +++ b/include/asm-x86_64/pgtable.h | |||
@@ -85,7 +85,7 @@ static inline void set_pud(pud_t *dst, pud_t val) | |||
85 | pud_val(*dst) = pud_val(val); | 85 | pud_val(*dst) = pud_val(val); |
86 | } | 86 | } |
87 | 87 | ||
88 | extern inline void pud_clear (pud_t *pud) | 88 | static inline void pud_clear (pud_t *pud) |
89 | { | 89 | { |
90 | set_pud(pud, __pud(0)); | 90 | set_pud(pud, __pud(0)); |
91 | } | 91 | } |
@@ -95,7 +95,7 @@ static inline void set_pgd(pgd_t *dst, pgd_t val) | |||
95 | pgd_val(*dst) = pgd_val(val); | 95 | pgd_val(*dst) = pgd_val(val); |
96 | } | 96 | } |
97 | 97 | ||
98 | extern inline void pgd_clear (pgd_t * pgd) | 98 | static inline void pgd_clear (pgd_t * pgd) |
99 | { | 99 | { |
100 | set_pgd(pgd, __pgd(0)); | 100 | set_pgd(pgd, __pgd(0)); |
101 | } | 101 | } |
@@ -375,7 +375,7 @@ static inline pte_t mk_pte_phys(unsigned long physpage, pgprot_t pgprot) | |||
375 | } | 375 | } |
376 | 376 | ||
377 | /* Change flags of a PTE */ | 377 | /* Change flags of a PTE */ |
378 | extern inline pte_t pte_modify(pte_t pte, pgprot_t newprot) | 378 | static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) |
379 | { | 379 | { |
380 | pte_val(pte) &= _PAGE_CHG_MASK; | 380 | pte_val(pte) &= _PAGE_CHG_MASK; |
381 | pte_val(pte) |= pgprot_val(newprot); | 381 | pte_val(pte) |= pgprot_val(newprot); |
diff --git a/include/asm-x86_64/processor.h b/include/asm-x86_64/processor.h index a8321999448f..c6461c16edbf 100644 --- a/include/asm-x86_64/processor.h +++ b/include/asm-x86_64/processor.h | |||
@@ -375,13 +375,13 @@ struct extended_sigtable { | |||
375 | #define ASM_NOP_MAX 8 | 375 | #define ASM_NOP_MAX 8 |
376 | 376 | ||
377 | /* REP NOP (PAUSE) is a good thing to insert into busy-wait loops. */ | 377 | /* REP NOP (PAUSE) is a good thing to insert into busy-wait loops. */ |
378 | extern inline void rep_nop(void) | 378 | static inline void rep_nop(void) |
379 | { | 379 | { |
380 | __asm__ __volatile__("rep;nop": : :"memory"); | 380 | __asm__ __volatile__("rep;nop": : :"memory"); |
381 | } | 381 | } |
382 | 382 | ||
383 | /* Stop speculative execution */ | 383 | /* Stop speculative execution */ |
384 | extern inline void sync_core(void) | 384 | static inline void sync_core(void) |
385 | { | 385 | { |
386 | int tmp; | 386 | int tmp; |
387 | asm volatile("cpuid" : "=a" (tmp) : "0" (1) : "ebx","ecx","edx","memory"); | 387 | asm volatile("cpuid" : "=a" (tmp) : "0" (1) : "ebx","ecx","edx","memory"); |
diff --git a/include/asm-x86_64/signal.h b/include/asm-x86_64/signal.h index fe9b96d94815..f8d55798535a 100644 --- a/include/asm-x86_64/signal.h +++ b/include/asm-x86_64/signal.h | |||
@@ -143,23 +143,23 @@ typedef struct sigaltstack { | |||
143 | #undef __HAVE_ARCH_SIG_BITOPS | 143 | #undef __HAVE_ARCH_SIG_BITOPS |
144 | #if 0 | 144 | #if 0 |
145 | 145 | ||
146 | extern __inline__ void sigaddset(sigset_t *set, int _sig) | 146 | static inline void sigaddset(sigset_t *set, int _sig) |
147 | { | 147 | { |
148 | __asm__("btsq %1,%0" : "=m"(*set) : "Ir"(_sig - 1) : "cc"); | 148 | __asm__("btsq %1,%0" : "=m"(*set) : "Ir"(_sig - 1) : "cc"); |
149 | } | 149 | } |
150 | 150 | ||
151 | extern __inline__ void sigdelset(sigset_t *set, int _sig) | 151 | static inline void sigdelset(sigset_t *set, int _sig) |
152 | { | 152 | { |
153 | __asm__("btrq %1,%0" : "=m"(*set) : "Ir"(_sig - 1) : "cc"); | 153 | __asm__("btrq %1,%0" : "=m"(*set) : "Ir"(_sig - 1) : "cc"); |
154 | } | 154 | } |
155 | 155 | ||
156 | extern __inline__ int __const_sigismember(sigset_t *set, int _sig) | 156 | static inline int __const_sigismember(sigset_t *set, int _sig) |
157 | { | 157 | { |
158 | unsigned long sig = _sig - 1; | 158 | unsigned long sig = _sig - 1; |
159 | return 1 & (set->sig[sig / _NSIG_BPW] >> (sig & ~(_NSIG_BPW-1))); | 159 | return 1 & (set->sig[sig / _NSIG_BPW] >> (sig & ~(_NSIG_BPW-1))); |
160 | } | 160 | } |
161 | 161 | ||
162 | extern __inline__ int __gen_sigismember(sigset_t *set, int _sig) | 162 | static inline int __gen_sigismember(sigset_t *set, int _sig) |
163 | { | 163 | { |
164 | int ret; | 164 | int ret; |
165 | __asm__("btq %2,%1\n\tsbbq %0,%0" | 165 | __asm__("btq %2,%1\n\tsbbq %0,%0" |
@@ -172,7 +172,7 @@ extern __inline__ int __gen_sigismember(sigset_t *set, int _sig) | |||
172 | __const_sigismember((set),(sig)) : \ | 172 | __const_sigismember((set),(sig)) : \ |
173 | __gen_sigismember((set),(sig))) | 173 | __gen_sigismember((set),(sig))) |
174 | 174 | ||
175 | extern __inline__ int sigfindinword(unsigned long word) | 175 | static inline int sigfindinword(unsigned long word) |
176 | { | 176 | { |
177 | __asm__("bsfq %1,%0" : "=r"(word) : "rm"(word) : "cc"); | 177 | __asm__("bsfq %1,%0" : "=r"(word) : "rm"(word) : "cc"); |
178 | return word; | 178 | return word; |
diff --git a/include/asm-x86_64/smp.h b/include/asm-x86_64/smp.h index de8b57b2b62b..24e32611f0bf 100644 --- a/include/asm-x86_64/smp.h +++ b/include/asm-x86_64/smp.h | |||
@@ -72,7 +72,7 @@ static inline int num_booting_cpus(void) | |||
72 | 72 | ||
73 | #define raw_smp_processor_id() read_pda(cpunumber) | 73 | #define raw_smp_processor_id() read_pda(cpunumber) |
74 | 74 | ||
75 | extern __inline int hard_smp_processor_id(void) | 75 | static inline int hard_smp_processor_id(void) |
76 | { | 76 | { |
77 | /* we don't want to mark this access volatile - bad code generation */ | 77 | /* we don't want to mark this access volatile - bad code generation */ |
78 | return GET_APIC_ID(*(unsigned int *)(APIC_BASE+APIC_ID)); | 78 | return GET_APIC_ID(*(unsigned int *)(APIC_BASE+APIC_ID)); |
diff --git a/include/asm-x86_64/system.h b/include/asm-x86_64/system.h index 8606e170a7dc..d65381194bda 100644 --- a/include/asm-x86_64/system.h +++ b/include/asm-x86_64/system.h | |||
@@ -188,7 +188,7 @@ static inline void write_cr4(unsigned long val) | |||
188 | 188 | ||
189 | #define __xg(x) ((volatile long *)(x)) | 189 | #define __xg(x) ((volatile long *)(x)) |
190 | 190 | ||
191 | extern inline void set_64bit(volatile unsigned long *ptr, unsigned long val) | 191 | static inline void set_64bit(volatile unsigned long *ptr, unsigned long val) |
192 | { | 192 | { |
193 | *ptr = val; | 193 | *ptr = val; |
194 | } | 194 | } |