diff options
Diffstat (limited to 'include/asm-i386')
-rw-r--r-- | include/asm-i386/apic.h | 3 | ||||
-rw-r--r-- | include/asm-i386/desc.h | 8 | ||||
-rw-r--r-- | include/asm-i386/hw_irq.h | 1 | ||||
-rw-r--r-- | include/asm-i386/mach-default/smpboot_hooks.h | 15 | ||||
-rw-r--r-- | include/asm-i386/mach-es7000/mach_mpparse.h | 2 | ||||
-rw-r--r-- | include/asm-i386/mach-visws/smpboot_hooks.h | 7 | ||||
-rw-r--r-- | include/asm-i386/pgtable-2level.h | 5 | ||||
-rw-r--r-- | include/asm-i386/pgtable-3level.h | 5 | ||||
-rw-r--r-- | include/asm-i386/pgtable.h | 7 | ||||
-rw-r--r-- | include/asm-i386/semaphore.h | 3 | ||||
-rw-r--r-- | include/asm-i386/system.h | 33 | ||||
-rw-r--r-- | include/asm-i386/unistd.h | 1 |
12 files changed, 44 insertions, 46 deletions
diff --git a/include/asm-i386/apic.h b/include/asm-i386/apic.h index 8c454aa58ac6..a515e2aed829 100644 --- a/include/asm-i386/apic.h +++ b/include/asm-i386/apic.h | |||
@@ -118,7 +118,8 @@ extern void release_lapic_nmi(void); | |||
118 | extern void disable_timer_nmi_watchdog(void); | 118 | extern void disable_timer_nmi_watchdog(void); |
119 | extern void enable_timer_nmi_watchdog(void); | 119 | extern void enable_timer_nmi_watchdog(void); |
120 | extern void nmi_watchdog_tick (struct pt_regs * regs); | 120 | extern void nmi_watchdog_tick (struct pt_regs * regs); |
121 | extern int APIC_init_uniprocessor (void); | 121 | extern int APIC_init(void); |
122 | extern void APIC_late_time_init(void); | ||
122 | extern void disable_APIC_timer(void); | 123 | extern void disable_APIC_timer(void); |
123 | extern void enable_APIC_timer(void); | 124 | extern void enable_APIC_timer(void); |
124 | 125 | ||
diff --git a/include/asm-i386/desc.h b/include/asm-i386/desc.h index 6df1a53c190e..29b851a18c6e 100644 --- a/include/asm-i386/desc.h +++ b/include/asm-i386/desc.h | |||
@@ -17,6 +17,8 @@ | |||
17 | extern struct desc_struct cpu_gdt_table[GDT_ENTRIES]; | 17 | extern struct desc_struct cpu_gdt_table[GDT_ENTRIES]; |
18 | DECLARE_PER_CPU(struct desc_struct, cpu_gdt_table[GDT_ENTRIES]); | 18 | DECLARE_PER_CPU(struct desc_struct, cpu_gdt_table[GDT_ENTRIES]); |
19 | 19 | ||
20 | #define get_cpu_gdt_table(_cpu) (per_cpu(cpu_gdt_table,_cpu)) | ||
21 | |||
20 | DECLARE_PER_CPU(unsigned char, cpu_16bit_stack[CPU_16BIT_STACK_SIZE]); | 22 | DECLARE_PER_CPU(unsigned char, cpu_16bit_stack[CPU_16BIT_STACK_SIZE]); |
21 | 23 | ||
22 | struct Xgt_desc_struct { | 24 | struct Xgt_desc_struct { |
@@ -60,7 +62,7 @@ __asm__ __volatile__ ("movw %w3,0(%2)\n\t" \ | |||
60 | 62 | ||
61 | static inline void __set_tss_desc(unsigned int cpu, unsigned int entry, void *addr) | 63 | static inline void __set_tss_desc(unsigned int cpu, unsigned int entry, void *addr) |
62 | { | 64 | { |
63 | _set_tssldt_desc(&per_cpu(cpu_gdt_table, cpu)[entry], (int)addr, | 65 | _set_tssldt_desc(&get_cpu_gdt_table(cpu)[entry], (int)addr, |
64 | offsetof(struct tss_struct, __cacheline_filler) - 1, 0x89); | 66 | offsetof(struct tss_struct, __cacheline_filler) - 1, 0x89); |
65 | } | 67 | } |
66 | 68 | ||
@@ -68,7 +70,7 @@ static inline void __set_tss_desc(unsigned int cpu, unsigned int entry, void *ad | |||
68 | 70 | ||
69 | static inline void set_ldt_desc(unsigned int cpu, void *addr, unsigned int size) | 71 | static inline void set_ldt_desc(unsigned int cpu, void *addr, unsigned int size) |
70 | { | 72 | { |
71 | _set_tssldt_desc(&per_cpu(cpu_gdt_table, cpu)[GDT_ENTRY_LDT], (int)addr, ((size << 3)-1), 0x82); | 73 | _set_tssldt_desc(&get_cpu_gdt_table(cpu)[GDT_ENTRY_LDT], (int)addr, ((size << 3)-1), 0x82); |
72 | } | 74 | } |
73 | 75 | ||
74 | #define LDT_entry_a(info) \ | 76 | #define LDT_entry_a(info) \ |
@@ -109,7 +111,7 @@ static inline void write_ldt_entry(void *ldt, int entry, __u32 entry_a, __u32 en | |||
109 | 111 | ||
110 | static inline void load_TLS(struct thread_struct *t, unsigned int cpu) | 112 | static inline void load_TLS(struct thread_struct *t, unsigned int cpu) |
111 | { | 113 | { |
112 | #define C(i) per_cpu(cpu_gdt_table, cpu)[GDT_ENTRY_TLS_MIN + i] = t->tls_array[i] | 114 | #define C(i) get_cpu_gdt_table(cpu)[GDT_ENTRY_TLS_MIN + i] = t->tls_array[i] |
113 | C(0); C(1); C(2); | 115 | C(0); C(1); C(2); |
114 | #undef C | 116 | #undef C |
115 | } | 117 | } |
diff --git a/include/asm-i386/hw_irq.h b/include/asm-i386/hw_irq.h index 622815bf3243..9139b89497a1 100644 --- a/include/asm-i386/hw_irq.h +++ b/include/asm-i386/hw_irq.h | |||
@@ -55,6 +55,7 @@ void init_8259A(int aeoi); | |||
55 | void FASTCALL(send_IPI_self(int vector)); | 55 | void FASTCALL(send_IPI_self(int vector)); |
56 | void init_VISWS_APIC_irqs(void); | 56 | void init_VISWS_APIC_irqs(void); |
57 | void setup_IO_APIC(void); | 57 | void setup_IO_APIC(void); |
58 | void IO_APIC_late_time_init(void); | ||
58 | void disable_IO_APIC(void); | 59 | void disable_IO_APIC(void); |
59 | void print_IO_APIC(void); | 60 | void print_IO_APIC(void); |
60 | int IO_APIC_get_PCI_irq_vector(int bus, int slot, int fn); | 61 | int IO_APIC_get_PCI_irq_vector(int bus, int slot, int fn); |
diff --git a/include/asm-i386/mach-default/smpboot_hooks.h b/include/asm-i386/mach-default/smpboot_hooks.h index 7f45f6311059..d7c70c144f9f 100644 --- a/include/asm-i386/mach-default/smpboot_hooks.h +++ b/include/asm-i386/mach-default/smpboot_hooks.h | |||
@@ -1,11 +1,6 @@ | |||
1 | /* two abstractions specific to kernel/smpboot.c, mainly to cater to visws | 1 | /* two abstractions specific to kernel/smpboot.c, mainly to cater to visws |
2 | * which needs to alter them. */ | 2 | * which needs to alter them. */ |
3 | 3 | ||
4 | static inline void smpboot_clear_io_apic_irqs(void) | ||
5 | { | ||
6 | io_apic_irqs = 0; | ||
7 | } | ||
8 | |||
9 | static inline void smpboot_setup_warm_reset_vector(unsigned long start_eip) | 4 | static inline void smpboot_setup_warm_reset_vector(unsigned long start_eip) |
10 | { | 5 | { |
11 | CMOS_WRITE(0xa, 0xf); | 6 | CMOS_WRITE(0xa, 0xf); |
@@ -32,13 +27,3 @@ static inline void smpboot_restore_warm_reset_vector(void) | |||
32 | 27 | ||
33 | *((volatile long *) phys_to_virt(0x467)) = 0; | 28 | *((volatile long *) phys_to_virt(0x467)) = 0; |
34 | } | 29 | } |
35 | |||
36 | static inline void smpboot_setup_io_apic(void) | ||
37 | { | ||
38 | /* | ||
39 | * Here we can be sure that there is an IO-APIC in the system. Let's | ||
40 | * go and set it up: | ||
41 | */ | ||
42 | if (!skip_ioapic_setup && nr_ioapics) | ||
43 | setup_IO_APIC(); | ||
44 | } | ||
diff --git a/include/asm-i386/mach-es7000/mach_mpparse.h b/include/asm-i386/mach-es7000/mach_mpparse.h index 28a84f6185a7..4a0637a3e208 100644 --- a/include/asm-i386/mach-es7000/mach_mpparse.h +++ b/include/asm-i386/mach-es7000/mach_mpparse.h | |||
@@ -16,7 +16,7 @@ static inline void mpc_oem_pci_bus(struct mpc_config_bus *m, | |||
16 | 16 | ||
17 | extern int parse_unisys_oem (char *oemptr); | 17 | extern int parse_unisys_oem (char *oemptr); |
18 | extern int find_unisys_acpi_oem_table(unsigned long *oem_addr); | 18 | extern int find_unisys_acpi_oem_table(unsigned long *oem_addr); |
19 | extern void setup_unisys(); | 19 | extern void setup_unisys(void); |
20 | 20 | ||
21 | static inline int mps_oem_check(struct mp_config_table *mpc, char *oem, | 21 | static inline int mps_oem_check(struct mp_config_table *mpc, char *oem, |
22 | char *productid) | 22 | char *productid) |
diff --git a/include/asm-i386/mach-visws/smpboot_hooks.h b/include/asm-i386/mach-visws/smpboot_hooks.h index d926471fa359..14d8e0375f7a 100644 --- a/include/asm-i386/mach-visws/smpboot_hooks.h +++ b/include/asm-i386/mach-visws/smpboot_hooks.h | |||
@@ -11,14 +11,7 @@ static inline void smpboot_setup_warm_reset_vector(unsigned long start_eip) | |||
11 | 11 | ||
12 | /* for visws do nothing for any of these */ | 12 | /* for visws do nothing for any of these */ |
13 | 13 | ||
14 | static inline void smpboot_clear_io_apic_irqs(void) | ||
15 | { | ||
16 | } | ||
17 | |||
18 | static inline void smpboot_restore_warm_reset_vector(void) | 14 | static inline void smpboot_restore_warm_reset_vector(void) |
19 | { | 15 | { |
20 | } | 16 | } |
21 | 17 | ||
22 | static inline void smpboot_setup_io_apic(void) | ||
23 | { | ||
24 | } | ||
diff --git a/include/asm-i386/pgtable-2level.h b/include/asm-i386/pgtable-2level.h index fa07bd6c7529..74ef721b534d 100644 --- a/include/asm-i386/pgtable-2level.h +++ b/include/asm-i386/pgtable-2level.h | |||
@@ -26,11 +26,6 @@ | |||
26 | #define pfn_pte(pfn, prot) __pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot)) | 26 | #define pfn_pte(pfn, prot) __pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot)) |
27 | #define pfn_pmd(pfn, prot) __pmd(((pfn) << PAGE_SHIFT) | pgprot_val(prot)) | 27 | #define pfn_pmd(pfn, prot) __pmd(((pfn) << PAGE_SHIFT) | pgprot_val(prot)) |
28 | 28 | ||
29 | #define pmd_page(pmd) (pfn_to_page(pmd_val(pmd) >> PAGE_SHIFT)) | ||
30 | |||
31 | #define pmd_page_kernel(pmd) \ | ||
32 | ((unsigned long) __va(pmd_val(pmd) & PAGE_MASK)) | ||
33 | |||
34 | /* | 29 | /* |
35 | * All present user pages are user-executable: | 30 | * All present user pages are user-executable: |
36 | */ | 31 | */ |
diff --git a/include/asm-i386/pgtable-3level.h b/include/asm-i386/pgtable-3level.h index 2e3f4a344a2d..f1a8b454920a 100644 --- a/include/asm-i386/pgtable-3level.h +++ b/include/asm-i386/pgtable-3level.h | |||
@@ -74,11 +74,6 @@ static inline void set_pte(pte_t *ptep, pte_t pte) | |||
74 | */ | 74 | */ |
75 | static inline void pud_clear (pud_t * pud) { } | 75 | static inline void pud_clear (pud_t * pud) { } |
76 | 76 | ||
77 | #define pmd_page(pmd) (pfn_to_page(pmd_val(pmd) >> PAGE_SHIFT)) | ||
78 | |||
79 | #define pmd_page_kernel(pmd) \ | ||
80 | ((unsigned long) __va(pmd_val(pmd) & PAGE_MASK)) | ||
81 | |||
82 | #define pud_page(pud) \ | 77 | #define pud_page(pud) \ |
83 | ((struct page *) __va(pud_val(pud) & PAGE_MASK)) | 78 | ((struct page *) __va(pud_val(pud) & PAGE_MASK)) |
84 | 79 | ||
diff --git a/include/asm-i386/pgtable.h b/include/asm-i386/pgtable.h index 0e3ec809352d..03f3c8ac6383 100644 --- a/include/asm-i386/pgtable.h +++ b/include/asm-i386/pgtable.h | |||
@@ -323,8 +323,6 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) | |||
323 | return pte; | 323 | return pte; |
324 | } | 324 | } |
325 | 325 | ||
326 | #define page_pte(page) page_pte_prot(page, __pgprot(0)) | ||
327 | |||
328 | #define pmd_large(pmd) \ | 326 | #define pmd_large(pmd) \ |
329 | ((pmd_val(pmd) & (_PAGE_PSE|_PAGE_PRESENT)) == (_PAGE_PSE|_PAGE_PRESENT)) | 327 | ((pmd_val(pmd) & (_PAGE_PSE|_PAGE_PRESENT)) == (_PAGE_PSE|_PAGE_PRESENT)) |
330 | 328 | ||
@@ -369,6 +367,11 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) | |||
369 | #define pte_offset_kernel(dir, address) \ | 367 | #define pte_offset_kernel(dir, address) \ |
370 | ((pte_t *) pmd_page_kernel(*(dir)) + pte_index(address)) | 368 | ((pte_t *) pmd_page_kernel(*(dir)) + pte_index(address)) |
371 | 369 | ||
370 | #define pmd_page(pmd) (pfn_to_page(pmd_val(pmd) >> PAGE_SHIFT)) | ||
371 | |||
372 | #define pmd_page_kernel(pmd) \ | ||
373 | ((unsigned long) __va(pmd_val(pmd) & PAGE_MASK)) | ||
374 | |||
372 | /* | 375 | /* |
373 | * Helper function that returns the kernel pagetable entry controlling | 376 | * Helper function that returns the kernel pagetable entry controlling |
374 | * the virtual address 'address'. NULL means no pagetable entry present. | 377 | * the virtual address 'address'. NULL means no pagetable entry present. |
diff --git a/include/asm-i386/semaphore.h b/include/asm-i386/semaphore.h index ea563da63e24..6a42b2142fd6 100644 --- a/include/asm-i386/semaphore.h +++ b/include/asm-i386/semaphore.h | |||
@@ -55,9 +55,6 @@ struct semaphore { | |||
55 | .wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \ | 55 | .wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \ |
56 | } | 56 | } |
57 | 57 | ||
58 | #define __MUTEX_INITIALIZER(name) \ | ||
59 | __SEMAPHORE_INITIALIZER(name,1) | ||
60 | |||
61 | #define __DECLARE_SEMAPHORE_GENERIC(name,count) \ | 58 | #define __DECLARE_SEMAPHORE_GENERIC(name,count) \ |
62 | struct semaphore name = __SEMAPHORE_INITIALIZER(name,count) | 59 | struct semaphore name = __SEMAPHORE_INITIALIZER(name,count) |
63 | 60 | ||
diff --git a/include/asm-i386/system.h b/include/asm-i386/system.h index acd5c26b69ba..97d52ac49e46 100644 --- a/include/asm-i386/system.h +++ b/include/asm-i386/system.h | |||
@@ -167,6 +167,8 @@ struct __xchg_dummy { unsigned long a[100]; }; | |||
167 | #define __xg(x) ((struct __xchg_dummy *)(x)) | 167 | #define __xg(x) ((struct __xchg_dummy *)(x)) |
168 | 168 | ||
169 | 169 | ||
170 | #ifdef CONFIG_X86_CMPXCHG64 | ||
171 | |||
170 | /* | 172 | /* |
171 | * The semantics of XCHGCMP8B are a bit strange, this is why | 173 | * The semantics of XCHGCMP8B are a bit strange, this is why |
172 | * there is a loop and the loading of %%eax and %%edx has to | 174 | * there is a loop and the loading of %%eax and %%edx has to |
@@ -221,6 +223,8 @@ static inline void __set_64bit_var (unsigned long long *ptr, | |||
221 | __set_64bit(ptr, (unsigned int)(value), (unsigned int)((value)>>32ULL) ) : \ | 223 | __set_64bit(ptr, (unsigned int)(value), (unsigned int)((value)>>32ULL) ) : \ |
222 | __set_64bit(ptr, ll_low(value), ll_high(value)) ) | 224 | __set_64bit(ptr, ll_low(value), ll_high(value)) ) |
223 | 225 | ||
226 | #endif | ||
227 | |||
224 | /* | 228 | /* |
225 | * Note: no "lock" prefix even on SMP: xchg always implies lock anyway | 229 | * Note: no "lock" prefix even on SMP: xchg always implies lock anyway |
226 | * Note 2: xchg has side effect, so that attribute volatile is necessary, | 230 | * Note 2: xchg has side effect, so that attribute volatile is necessary, |
@@ -259,7 +263,6 @@ static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int siz | |||
259 | 263 | ||
260 | #ifdef CONFIG_X86_CMPXCHG | 264 | #ifdef CONFIG_X86_CMPXCHG |
261 | #define __HAVE_ARCH_CMPXCHG 1 | 265 | #define __HAVE_ARCH_CMPXCHG 1 |
262 | #endif | ||
263 | 266 | ||
264 | static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old, | 267 | static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old, |
265 | unsigned long new, int size) | 268 | unsigned long new, int size) |
@@ -275,13 +278,13 @@ static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old, | |||
275 | case 2: | 278 | case 2: |
276 | __asm__ __volatile__(LOCK_PREFIX "cmpxchgw %w1,%2" | 279 | __asm__ __volatile__(LOCK_PREFIX "cmpxchgw %w1,%2" |
277 | : "=a"(prev) | 280 | : "=a"(prev) |
278 | : "q"(new), "m"(*__xg(ptr)), "0"(old) | 281 | : "r"(new), "m"(*__xg(ptr)), "0"(old) |
279 | : "memory"); | 282 | : "memory"); |
280 | return prev; | 283 | return prev; |
281 | case 4: | 284 | case 4: |
282 | __asm__ __volatile__(LOCK_PREFIX "cmpxchgl %1,%2" | 285 | __asm__ __volatile__(LOCK_PREFIX "cmpxchgl %1,%2" |
283 | : "=a"(prev) | 286 | : "=a"(prev) |
284 | : "q"(new), "m"(*__xg(ptr)), "0"(old) | 287 | : "r"(new), "m"(*__xg(ptr)), "0"(old) |
285 | : "memory"); | 288 | : "memory"); |
286 | return prev; | 289 | return prev; |
287 | } | 290 | } |
@@ -291,6 +294,30 @@ static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old, | |||
291 | #define cmpxchg(ptr,o,n)\ | 294 | #define cmpxchg(ptr,o,n)\ |
292 | ((__typeof__(*(ptr)))__cmpxchg((ptr),(unsigned long)(o),\ | 295 | ((__typeof__(*(ptr)))__cmpxchg((ptr),(unsigned long)(o),\ |
293 | (unsigned long)(n),sizeof(*(ptr)))) | 296 | (unsigned long)(n),sizeof(*(ptr)))) |
297 | |||
298 | #endif | ||
299 | |||
300 | #ifdef CONFIG_X86_CMPXCHG64 | ||
301 | |||
302 | static inline unsigned long long __cmpxchg64(volatile void *ptr, unsigned long long old, | ||
303 | unsigned long long new) | ||
304 | { | ||
305 | unsigned long long prev; | ||
306 | __asm__ __volatile__(LOCK_PREFIX "cmpxchg8b %3" | ||
307 | : "=A"(prev) | ||
308 | : "b"((unsigned long)new), | ||
309 | "c"((unsigned long)(new >> 32)), | ||
310 | "m"(*__xg(ptr)), | ||
311 | "0"(old) | ||
312 | : "memory"); | ||
313 | return prev; | ||
314 | } | ||
315 | |||
316 | #define cmpxchg64(ptr,o,n)\ | ||
317 | ((__typeof__(*(ptr)))__cmpxchg64((ptr),(unsigned long long)(o),\ | ||
318 | (unsigned long long)(n))) | ||
319 | |||
320 | #endif | ||
294 | 321 | ||
295 | #ifdef __KERNEL__ | 322 | #ifdef __KERNEL__ |
296 | struct alt_instr { | 323 | struct alt_instr { |
diff --git a/include/asm-i386/unistd.h b/include/asm-i386/unistd.h index fbaf90a3968c..0f92e78dfea1 100644 --- a/include/asm-i386/unistd.h +++ b/include/asm-i386/unistd.h | |||
@@ -448,7 +448,6 @@ asmlinkage int sys_clone(struct pt_regs regs); | |||
448 | asmlinkage int sys_fork(struct pt_regs regs); | 448 | asmlinkage int sys_fork(struct pt_regs regs); |
449 | asmlinkage int sys_vfork(struct pt_regs regs); | 449 | asmlinkage int sys_vfork(struct pt_regs regs); |
450 | asmlinkage int sys_pipe(unsigned long __user *fildes); | 450 | asmlinkage int sys_pipe(unsigned long __user *fildes); |
451 | asmlinkage int sys_ptrace(long request, long pid, long addr, long data); | ||
452 | asmlinkage long sys_iopl(unsigned long unused); | 451 | asmlinkage long sys_iopl(unsigned long unused); |
453 | struct sigaction; | 452 | struct sigaction; |
454 | asmlinkage long sys_rt_sigaction(int sig, | 453 | asmlinkage long sys_rt_sigaction(int sig, |