diff options
Diffstat (limited to 'include/asm-x86_64')
-rw-r--r-- | include/asm-x86_64/futex.h | 27 | ||||
-rw-r--r-- | include/asm-x86_64/kdebug.h | 23 | ||||
-rw-r--r-- | include/asm-x86_64/mmzone.h | 4 | ||||
-rw-r--r-- | include/asm-x86_64/page.h | 3 | ||||
-rw-r--r-- | include/asm-x86_64/processor.h | 7 | ||||
-rw-r--r-- | include/asm-x86_64/smp.h | 1 | ||||
-rw-r--r-- | include/asm-x86_64/topology.h | 2 | ||||
-rw-r--r-- | include/asm-x86_64/unistd.h | 6 |
8 files changed, 51 insertions, 22 deletions
diff --git a/include/asm-x86_64/futex.h b/include/asm-x86_64/futex.h index 8602c09bf89e..9804bf07b092 100644 --- a/include/asm-x86_64/futex.h +++ b/include/asm-x86_64/futex.h | |||
@@ -94,5 +94,32 @@ futex_atomic_op_inuser (int encoded_op, int __user *uaddr) | |||
94 | return ret; | 94 | return ret; |
95 | } | 95 | } |
96 | 96 | ||
97 | static inline int | ||
98 | futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval) | ||
99 | { | ||
100 | if (!access_ok(VERIFY_WRITE, uaddr, sizeof(int))) | ||
101 | return -EFAULT; | ||
102 | |||
103 | __asm__ __volatile__( | ||
104 | "1: " LOCK_PREFIX "cmpxchgl %3, %1 \n" | ||
105 | |||
106 | "2: .section .fixup, \"ax\" \n" | ||
107 | "3: mov %2, %0 \n" | ||
108 | " jmp 2b \n" | ||
109 | " .previous \n" | ||
110 | |||
111 | " .section __ex_table, \"a\" \n" | ||
112 | " .align 8 \n" | ||
113 | " .quad 1b,3b \n" | ||
114 | " .previous \n" | ||
115 | |||
116 | : "=a" (oldval), "=m" (*uaddr) | ||
117 | : "i" (-EFAULT), "r" (newval), "0" (oldval) | ||
118 | : "memory" | ||
119 | ); | ||
120 | |||
121 | return oldval; | ||
122 | } | ||
123 | |||
97 | #endif | 124 | #endif |
98 | #endif | 125 | #endif |
diff --git a/include/asm-x86_64/kdebug.h b/include/asm-x86_64/kdebug.h index b9ed4c0c8783..cf795631d9b4 100644 --- a/include/asm-x86_64/kdebug.h +++ b/include/asm-x86_64/kdebug.h | |||
@@ -5,21 +5,20 @@ | |||
5 | 5 | ||
6 | struct pt_regs; | 6 | struct pt_regs; |
7 | 7 | ||
8 | struct die_args { | 8 | struct die_args { |
9 | struct pt_regs *regs; | 9 | struct pt_regs *regs; |
10 | const char *str; | 10 | const char *str; |
11 | long err; | 11 | long err; |
12 | int trapnr; | 12 | int trapnr; |
13 | int signr; | 13 | int signr; |
14 | }; | 14 | }; |
15 | |||
16 | extern int register_die_notifier(struct notifier_block *); | ||
17 | extern int unregister_die_notifier(struct notifier_block *); | ||
18 | extern struct atomic_notifier_head die_chain; | ||
15 | 19 | ||
16 | /* Note - you should never unregister because that can race with NMIs. | ||
17 | If you really want to do it first unregister - then synchronize_sched - then free. | ||
18 | */ | ||
19 | int register_die_notifier(struct notifier_block *nb); | ||
20 | extern struct notifier_block *die_chain; | ||
21 | /* Grossly misnamed. */ | 20 | /* Grossly misnamed. */ |
22 | enum die_val { | 21 | enum die_val { |
23 | DIE_OOPS = 1, | 22 | DIE_OOPS = 1, |
24 | DIE_INT3, | 23 | DIE_INT3, |
25 | DIE_DEBUG, | 24 | DIE_DEBUG, |
@@ -33,8 +32,8 @@ enum die_val { | |||
33 | DIE_CALL, | 32 | DIE_CALL, |
34 | DIE_NMI_IPI, | 33 | DIE_NMI_IPI, |
35 | DIE_PAGE_FAULT, | 34 | DIE_PAGE_FAULT, |
36 | }; | 35 | }; |
37 | 36 | ||
38 | static inline int notify_die(enum die_val val, const char *str, | 37 | static inline int notify_die(enum die_val val, const char *str, |
39 | struct pt_regs *regs, long err, int trap, int sig) | 38 | struct pt_regs *regs, long err, int trap, int sig) |
40 | { | 39 | { |
@@ -45,7 +44,7 @@ static inline int notify_die(enum die_val val, const char *str, | |||
45 | .trapnr = trap, | 44 | .trapnr = trap, |
46 | .signr = sig | 45 | .signr = sig |
47 | }; | 46 | }; |
48 | return notifier_call_chain(&die_chain, val, &args); | 47 | return atomic_notifier_call_chain(&die_chain, val, &args); |
49 | } | 48 | } |
50 | 49 | ||
51 | extern int printk_address(unsigned long address); | 50 | extern int printk_address(unsigned long address); |
diff --git a/include/asm-x86_64/mmzone.h b/include/asm-x86_64/mmzone.h index 937f99b26883..6b18cd8f293d 100644 --- a/include/asm-x86_64/mmzone.h +++ b/include/asm-x86_64/mmzone.h | |||
@@ -44,12 +44,8 @@ static inline __attribute__((pure)) int phys_to_nid(unsigned long addr) | |||
44 | #define pfn_to_nid(pfn) phys_to_nid((unsigned long)(pfn) << PAGE_SHIFT) | 44 | #define pfn_to_nid(pfn) phys_to_nid((unsigned long)(pfn) << PAGE_SHIFT) |
45 | #define kvaddr_to_nid(kaddr) phys_to_nid(__pa(kaddr)) | 45 | #define kvaddr_to_nid(kaddr) phys_to_nid(__pa(kaddr)) |
46 | 46 | ||
47 | extern struct page *pfn_to_page(unsigned long pfn); | ||
48 | extern unsigned long page_to_pfn(struct page *page); | ||
49 | extern int pfn_valid(unsigned long pfn); | 47 | extern int pfn_valid(unsigned long pfn); |
50 | #endif | 48 | #endif |
51 | 49 | ||
52 | #define local_mapnr(kvaddr) \ | ||
53 | ( (__pa(kvaddr) >> PAGE_SHIFT) - node_start_pfn(kvaddr_to_nid(kvaddr)) ) | ||
54 | #endif | 50 | #endif |
55 | #endif | 51 | #endif |
diff --git a/include/asm-x86_64/page.h b/include/asm-x86_64/page.h index 615e3e494929..408185bac351 100644 --- a/include/asm-x86_64/page.h +++ b/include/asm-x86_64/page.h | |||
@@ -123,8 +123,6 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
123 | #define __boot_va(x) __va(x) | 123 | #define __boot_va(x) __va(x) |
124 | #define __boot_pa(x) __pa(x) | 124 | #define __boot_pa(x) __pa(x) |
125 | #ifdef CONFIG_FLATMEM | 125 | #ifdef CONFIG_FLATMEM |
126 | #define pfn_to_page(pfn) (mem_map + (pfn)) | ||
127 | #define page_to_pfn(page) ((unsigned long)((page) - mem_map)) | ||
128 | #define pfn_valid(pfn) ((pfn) < end_pfn) | 126 | #define pfn_valid(pfn) ((pfn) < end_pfn) |
129 | #endif | 127 | #endif |
130 | 128 | ||
@@ -140,6 +138,7 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
140 | 138 | ||
141 | #endif /* __KERNEL__ */ | 139 | #endif /* __KERNEL__ */ |
142 | 140 | ||
141 | #include <asm-generic/memory_model.h> | ||
143 | #include <asm-generic/page.h> | 142 | #include <asm-generic/page.h> |
144 | 143 | ||
145 | #endif /* _X86_64_PAGE_H */ | 144 | #endif /* _X86_64_PAGE_H */ |
diff --git a/include/asm-x86_64/processor.h b/include/asm-x86_64/processor.h index 8c8d88c036ed..37a3ec433ee5 100644 --- a/include/asm-x86_64/processor.h +++ b/include/asm-x86_64/processor.h | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <asm/mmsegment.h> | 20 | #include <asm/mmsegment.h> |
21 | #include <asm/percpu.h> | 21 | #include <asm/percpu.h> |
22 | #include <linux/personality.h> | 22 | #include <linux/personality.h> |
23 | #include <linux/cpumask.h> | ||
23 | 24 | ||
24 | #define TF_MASK 0x00000100 | 25 | #define TF_MASK 0x00000100 |
25 | #define IF_MASK 0x00000200 | 26 | #define IF_MASK 0x00000200 |
@@ -65,6 +66,9 @@ struct cpuinfo_x86 { | |||
65 | __u32 x86_power; | 66 | __u32 x86_power; |
66 | __u32 extended_cpuid_level; /* Max extended CPUID function supported */ | 67 | __u32 extended_cpuid_level; /* Max extended CPUID function supported */ |
67 | unsigned long loops_per_jiffy; | 68 | unsigned long loops_per_jiffy; |
69 | #ifdef CONFIG_SMP | ||
70 | cpumask_t llc_shared_map; /* cpus sharing the last level cache */ | ||
71 | #endif | ||
68 | __u8 apicid; | 72 | __u8 apicid; |
69 | __u8 booted_cores; /* number of cores as seen by OS */ | 73 | __u8 booted_cores; /* number of cores as seen by OS */ |
70 | } ____cacheline_aligned; | 74 | } ____cacheline_aligned; |
@@ -354,9 +358,6 @@ struct extended_sigtable { | |||
354 | struct extended_signature sigs[0]; | 358 | struct extended_signature sigs[0]; |
355 | }; | 359 | }; |
356 | 360 | ||
357 | /* '6' because it used to be for P6 only (but now covers Pentium 4 as well) */ | ||
358 | #define MICROCODE_IOCFREE _IO('6',0) | ||
359 | |||
360 | 361 | ||
361 | #define ASM_NOP1 K8_NOP1 | 362 | #define ASM_NOP1 K8_NOP1 |
362 | #define ASM_NOP2 K8_NOP2 | 363 | #define ASM_NOP2 K8_NOP2 |
diff --git a/include/asm-x86_64/smp.h b/include/asm-x86_64/smp.h index 9ccbb2cfd5c0..a4fdaeb5c397 100644 --- a/include/asm-x86_64/smp.h +++ b/include/asm-x86_64/smp.h | |||
@@ -56,6 +56,7 @@ extern cpumask_t cpu_sibling_map[NR_CPUS]; | |||
56 | extern cpumask_t cpu_core_map[NR_CPUS]; | 56 | extern cpumask_t cpu_core_map[NR_CPUS]; |
57 | extern u8 phys_proc_id[NR_CPUS]; | 57 | extern u8 phys_proc_id[NR_CPUS]; |
58 | extern u8 cpu_core_id[NR_CPUS]; | 58 | extern u8 cpu_core_id[NR_CPUS]; |
59 | extern u8 cpu_llc_id[NR_CPUS]; | ||
59 | 60 | ||
60 | #define SMP_TRAMPOLINE_BASE 0x6000 | 61 | #define SMP_TRAMPOLINE_BASE 0x6000 |
61 | 62 | ||
diff --git a/include/asm-x86_64/topology.h b/include/asm-x86_64/topology.h index c642f5d9882d..9db54e9d17bb 100644 --- a/include/asm-x86_64/topology.h +++ b/include/asm-x86_64/topology.h | |||
@@ -68,4 +68,6 @@ extern int __node_distance(int, int); | |||
68 | 68 | ||
69 | #include <asm-generic/topology.h> | 69 | #include <asm-generic/topology.h> |
70 | 70 | ||
71 | extern cpumask_t cpu_coregroup_map(int cpu); | ||
72 | |||
71 | #endif | 73 | #endif |
diff --git a/include/asm-x86_64/unistd.h b/include/asm-x86_64/unistd.h index da0341c57949..fcc516353087 100644 --- a/include/asm-x86_64/unistd.h +++ b/include/asm-x86_64/unistd.h | |||
@@ -605,8 +605,12 @@ __SYSCALL(__NR_pselect6, sys_ni_syscall) /* for now */ | |||
605 | __SYSCALL(__NR_ppoll, sys_ni_syscall) /* for now */ | 605 | __SYSCALL(__NR_ppoll, sys_ni_syscall) /* for now */ |
606 | #define __NR_unshare 272 | 606 | #define __NR_unshare 272 |
607 | __SYSCALL(__NR_unshare, sys_unshare) | 607 | __SYSCALL(__NR_unshare, sys_unshare) |
608 | #define __NR_set_robust_list 273 | ||
609 | __SYSCALL(__NR_set_robust_list, sys_set_robust_list) | ||
610 | #define __NR_get_robust_list 274 | ||
611 | __SYSCALL(__NR_get_robust_list, sys_get_robust_list) | ||
608 | 612 | ||
609 | #define __NR_syscall_max __NR_unshare | 613 | #define __NR_syscall_max __NR_get_robust_list |
610 | 614 | ||
611 | #ifndef __NO_STUBS | 615 | #ifndef __NO_STUBS |
612 | 616 | ||