diff options
Diffstat (limited to 'include/asm-i386')
-rw-r--r-- | include/asm-i386/futex.h | 27 | ||||
-rw-r--r-- | include/asm-i386/kdebug.h | 10 | ||||
-rw-r--r-- | include/asm-i386/mach-default/mach_time.h | 37 | ||||
-rw-r--r-- | include/asm-i386/mmzone.h | 17 | ||||
-rw-r--r-- | include/asm-i386/page.h | 3 | ||||
-rw-r--r-- | include/asm-i386/processor.h | 7 | ||||
-rw-r--r-- | include/asm-i386/setup.h | 4 | ||||
-rw-r--r-- | include/asm-i386/topology.h | 2 | ||||
-rw-r--r-- | include/asm-i386/unistd.h | 4 |
9 files changed, 56 insertions, 55 deletions
diff --git a/include/asm-i386/futex.h b/include/asm-i386/futex.h index 44b9db806474..7b8ceefd010f 100644 --- a/include/asm-i386/futex.h +++ b/include/asm-i386/futex.h | |||
@@ -104,5 +104,32 @@ futex_atomic_op_inuser (int encoded_op, int __user *uaddr) | |||
104 | return ret; | 104 | return ret; |
105 | } | 105 | } |
106 | 106 | ||
107 | static inline int | ||
108 | futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval) | ||
109 | { | ||
110 | if (!access_ok(VERIFY_WRITE, uaddr, sizeof(int))) | ||
111 | return -EFAULT; | ||
112 | |||
113 | __asm__ __volatile__( | ||
114 | "1: " LOCK_PREFIX "cmpxchgl %3, %1 \n" | ||
115 | |||
116 | "2: .section .fixup, \"ax\" \n" | ||
117 | "3: mov %2, %0 \n" | ||
118 | " jmp 2b \n" | ||
119 | " .previous \n" | ||
120 | |||
121 | " .section __ex_table, \"a\" \n" | ||
122 | " .align 8 \n" | ||
123 | " .long 1b,3b \n" | ||
124 | " .previous \n" | ||
125 | |||
126 | : "=a" (oldval), "=m" (*uaddr) | ||
127 | : "i" (-EFAULT), "r" (newval), "0" (oldval) | ||
128 | : "memory" | ||
129 | ); | ||
130 | |||
131 | return oldval; | ||
132 | } | ||
133 | |||
107 | #endif | 134 | #endif |
108 | #endif | 135 | #endif |
diff --git a/include/asm-i386/kdebug.h b/include/asm-i386/kdebug.h index 316138e89910..96d0828ce096 100644 --- a/include/asm-i386/kdebug.h +++ b/include/asm-i386/kdebug.h | |||
@@ -17,11 +17,9 @@ struct die_args { | |||
17 | int signr; | 17 | int signr; |
18 | }; | 18 | }; |
19 | 19 | ||
20 | /* Note - you should never unregister because that can race with NMIs. | 20 | extern int register_die_notifier(struct notifier_block *); |
21 | If you really want to do it first unregister - then synchronize_sched - then free. | 21 | extern int unregister_die_notifier(struct notifier_block *); |
22 | */ | 22 | extern struct atomic_notifier_head i386die_chain; |
23 | int register_die_notifier(struct notifier_block *nb); | ||
24 | extern struct notifier_block *i386die_chain; | ||
25 | 23 | ||
26 | 24 | ||
27 | /* Grossly misnamed. */ | 25 | /* Grossly misnamed. */ |
@@ -51,7 +49,7 @@ static inline int notify_die(enum die_val val, const char *str, | |||
51 | .trapnr = trap, | 49 | .trapnr = trap, |
52 | .signr = sig | 50 | .signr = sig |
53 | }; | 51 | }; |
54 | return notifier_call_chain(&i386die_chain, val, &args); | 52 | return atomic_notifier_call_chain(&i386die_chain, val, &args); |
55 | } | 53 | } |
56 | 54 | ||
57 | #endif | 55 | #endif |
diff --git a/include/asm-i386/mach-default/mach_time.h b/include/asm-i386/mach-default/mach_time.h index b749aa44a86f..31eb5de6f3dc 100644 --- a/include/asm-i386/mach-default/mach_time.h +++ b/include/asm-i386/mach-default/mach_time.h | |||
@@ -82,21 +82,8 @@ static inline int mach_set_rtc_mmss(unsigned long nowtime) | |||
82 | static inline unsigned long mach_get_cmos_time(void) | 82 | static inline unsigned long mach_get_cmos_time(void) |
83 | { | 83 | { |
84 | unsigned int year, mon, day, hour, min, sec; | 84 | unsigned int year, mon, day, hour, min, sec; |
85 | int i; | ||
86 | 85 | ||
87 | /* The Linux interpretation of the CMOS clock register contents: | 86 | do { |
88 | * When the Update-In-Progress (UIP) flag goes from 1 to 0, the | ||
89 | * RTC registers show the second which has precisely just started. | ||
90 | * Let's hope other operating systems interpret the RTC the same way. | ||
91 | */ | ||
92 | /* read RTC exactly on falling edge of update flag */ | ||
93 | for (i = 0 ; i < 1000000 ; i++) /* may take up to 1 second... */ | ||
94 | if (CMOS_READ(RTC_FREQ_SELECT) & RTC_UIP) | ||
95 | break; | ||
96 | for (i = 0 ; i < 1000000 ; i++) /* must try at least 2.228 ms */ | ||
97 | if (!(CMOS_READ(RTC_FREQ_SELECT) & RTC_UIP)) | ||
98 | break; | ||
99 | do { /* Isn't this overkill ? UIP above should guarantee consistency */ | ||
100 | sec = CMOS_READ(RTC_SECONDS); | 87 | sec = CMOS_READ(RTC_SECONDS); |
101 | min = CMOS_READ(RTC_MINUTES); | 88 | min = CMOS_READ(RTC_MINUTES); |
102 | hour = CMOS_READ(RTC_HOURS); | 89 | hour = CMOS_READ(RTC_HOURS); |
@@ -104,16 +91,18 @@ static inline unsigned long mach_get_cmos_time(void) | |||
104 | mon = CMOS_READ(RTC_MONTH); | 91 | mon = CMOS_READ(RTC_MONTH); |
105 | year = CMOS_READ(RTC_YEAR); | 92 | year = CMOS_READ(RTC_YEAR); |
106 | } while (sec != CMOS_READ(RTC_SECONDS)); | 93 | } while (sec != CMOS_READ(RTC_SECONDS)); |
107 | if (!(CMOS_READ(RTC_CONTROL) & RTC_DM_BINARY) || RTC_ALWAYS_BCD) | 94 | |
108 | { | 95 | if (!(CMOS_READ(RTC_CONTROL) & RTC_DM_BINARY) || RTC_ALWAYS_BCD) { |
109 | BCD_TO_BIN(sec); | 96 | BCD_TO_BIN(sec); |
110 | BCD_TO_BIN(min); | 97 | BCD_TO_BIN(min); |
111 | BCD_TO_BIN(hour); | 98 | BCD_TO_BIN(hour); |
112 | BCD_TO_BIN(day); | 99 | BCD_TO_BIN(day); |
113 | BCD_TO_BIN(mon); | 100 | BCD_TO_BIN(mon); |
114 | BCD_TO_BIN(year); | 101 | BCD_TO_BIN(year); |
115 | } | 102 | } |
116 | if ((year += 1900) < 1970) | 103 | |
104 | year += 1900; | ||
105 | if (year < 1970) | ||
117 | year += 100; | 106 | year += 100; |
118 | 107 | ||
119 | return mktime(year, mon, day, hour, min, sec); | 108 | return mktime(year, mon, day, hour, min, sec); |
diff --git a/include/asm-i386/mmzone.h b/include/asm-i386/mmzone.h index 74f595d80579..e33e9f9e4c66 100644 --- a/include/asm-i386/mmzone.h +++ b/include/asm-i386/mmzone.h | |||
@@ -70,8 +70,6 @@ static inline int pfn_to_nid(unsigned long pfn) | |||
70 | #endif | 70 | #endif |
71 | } | 71 | } |
72 | 72 | ||
73 | #define node_localnr(pfn, nid) ((pfn) - node_data[nid]->node_start_pfn) | ||
74 | |||
75 | /* | 73 | /* |
76 | * Following are macros that each numa implmentation must define. | 74 | * Following are macros that each numa implmentation must define. |
77 | */ | 75 | */ |
@@ -86,21 +84,6 @@ static inline int pfn_to_nid(unsigned long pfn) | |||
86 | /* XXX: FIXME -- wli */ | 84 | /* XXX: FIXME -- wli */ |
87 | #define kern_addr_valid(kaddr) (0) | 85 | #define kern_addr_valid(kaddr) (0) |
88 | 86 | ||
89 | #define pfn_to_page(pfn) \ | ||
90 | ({ \ | ||
91 | unsigned long __pfn = pfn; \ | ||
92 | int __node = pfn_to_nid(__pfn); \ | ||
93 | &NODE_DATA(__node)->node_mem_map[node_localnr(__pfn,__node)]; \ | ||
94 | }) | ||
95 | |||
96 | #define page_to_pfn(pg) \ | ||
97 | ({ \ | ||
98 | struct page *__page = pg; \ | ||
99 | struct zone *__zone = page_zone(__page); \ | ||
100 | (unsigned long)(__page - __zone->zone_mem_map) \ | ||
101 | + __zone->zone_start_pfn; \ | ||
102 | }) | ||
103 | |||
104 | #ifdef CONFIG_X86_NUMAQ /* we have contiguous memory on NUMA-Q */ | 87 | #ifdef CONFIG_X86_NUMAQ /* we have contiguous memory on NUMA-Q */ |
105 | #define pfn_valid(pfn) ((pfn) < num_physpages) | 88 | #define pfn_valid(pfn) ((pfn) < num_physpages) |
106 | #else | 89 | #else |
diff --git a/include/asm-i386/page.h b/include/asm-i386/page.h index 997ca5d17876..30f52a2263ba 100644 --- a/include/asm-i386/page.h +++ b/include/asm-i386/page.h | |||
@@ -126,8 +126,6 @@ extern int page_is_ram(unsigned long pagenr); | |||
126 | #define __va(x) ((void *)((unsigned long)(x)+PAGE_OFFSET)) | 126 | #define __va(x) ((void *)((unsigned long)(x)+PAGE_OFFSET)) |
127 | #define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT) | 127 | #define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT) |
128 | #ifdef CONFIG_FLATMEM | 128 | #ifdef CONFIG_FLATMEM |
129 | #define pfn_to_page(pfn) (mem_map + (pfn)) | ||
130 | #define page_to_pfn(page) ((unsigned long)((page) - mem_map)) | ||
131 | #define pfn_valid(pfn) ((pfn) < max_mapnr) | 129 | #define pfn_valid(pfn) ((pfn) < max_mapnr) |
132 | #endif /* CONFIG_FLATMEM */ | 130 | #endif /* CONFIG_FLATMEM */ |
133 | #define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT) | 131 | #define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT) |
@@ -141,6 +139,7 @@ extern int page_is_ram(unsigned long pagenr); | |||
141 | 139 | ||
142 | #endif /* __KERNEL__ */ | 140 | #endif /* __KERNEL__ */ |
143 | 141 | ||
142 | #include <asm-generic/memory_model.h> | ||
144 | #include <asm-generic/page.h> | 143 | #include <asm-generic/page.h> |
145 | 144 | ||
146 | #endif /* _I386_PAGE_H */ | 145 | #endif /* _I386_PAGE_H */ |
diff --git a/include/asm-i386/processor.h b/include/asm-i386/processor.h index feca5d961e2b..805f0dcda468 100644 --- a/include/asm-i386/processor.h +++ b/include/asm-i386/processor.h | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/config.h> | 20 | #include <linux/config.h> |
21 | #include <linux/threads.h> | 21 | #include <linux/threads.h> |
22 | #include <asm/percpu.h> | 22 | #include <asm/percpu.h> |
23 | #include <linux/cpumask.h> | ||
23 | 24 | ||
24 | /* flag for disabling the tsc */ | 25 | /* flag for disabling the tsc */ |
25 | extern int tsc_disable; | 26 | extern int tsc_disable; |
@@ -67,6 +68,9 @@ struct cpuinfo_x86 { | |||
67 | char pad0; | 68 | char pad0; |
68 | int x86_power; | 69 | int x86_power; |
69 | unsigned long loops_per_jiffy; | 70 | unsigned long loops_per_jiffy; |
71 | #ifdef CONFIG_SMP | ||
72 | cpumask_t llc_shared_map; /* cpus sharing the last level cache */ | ||
73 | #endif | ||
70 | unsigned char x86_max_cores; /* cpuid returned max cores value */ | 74 | unsigned char x86_max_cores; /* cpuid returned max cores value */ |
71 | unsigned char booted_cores; /* number of cores as seen by OS */ | 75 | unsigned char booted_cores; /* number of cores as seen by OS */ |
72 | unsigned char apicid; | 76 | unsigned char apicid; |
@@ -103,6 +107,7 @@ extern struct cpuinfo_x86 cpu_data[]; | |||
103 | 107 | ||
104 | extern int phys_proc_id[NR_CPUS]; | 108 | extern int phys_proc_id[NR_CPUS]; |
105 | extern int cpu_core_id[NR_CPUS]; | 109 | extern int cpu_core_id[NR_CPUS]; |
110 | extern int cpu_llc_id[NR_CPUS]; | ||
106 | extern char ignore_fpu_irq; | 111 | extern char ignore_fpu_irq; |
107 | 112 | ||
108 | extern void identify_cpu(struct cpuinfo_x86 *); | 113 | extern void identify_cpu(struct cpuinfo_x86 *); |
@@ -616,8 +621,6 @@ struct extended_sigtable { | |||
616 | unsigned int reserved[3]; | 621 | unsigned int reserved[3]; |
617 | struct extended_signature sigs[0]; | 622 | struct extended_signature sigs[0]; |
618 | }; | 623 | }; |
619 | /* '6' because it used to be for P6 only (but now covers Pentium 4 as well) */ | ||
620 | #define MICROCODE_IOCFREE _IO('6',0) | ||
621 | 624 | ||
622 | /* REP NOP (PAUSE) is a good thing to insert into busy-wait loops. */ | 625 | /* REP NOP (PAUSE) is a good thing to insert into busy-wait loops. */ |
623 | static inline void rep_nop(void) | 626 | static inline void rep_nop(void) |
diff --git a/include/asm-i386/setup.h b/include/asm-i386/setup.h index 826a8ca50ac8..ee941457b55d 100644 --- a/include/asm-i386/setup.h +++ b/include/asm-i386/setup.h | |||
@@ -6,9 +6,7 @@ | |||
6 | #ifndef _i386_SETUP_H | 6 | #ifndef _i386_SETUP_H |
7 | #define _i386_SETUP_H | 7 | #define _i386_SETUP_H |
8 | 8 | ||
9 | #define PFN_UP(x) (((x) + PAGE_SIZE-1) >> PAGE_SHIFT) | 9 | #include <linux/pfn.h> |
10 | #define PFN_DOWN(x) ((x) >> PAGE_SHIFT) | ||
11 | #define PFN_PHYS(x) ((x) << PAGE_SHIFT) | ||
12 | 10 | ||
13 | /* | 11 | /* |
14 | * Reserved space for vmalloc and iomap - defined in asm/page.h | 12 | * Reserved space for vmalloc and iomap - defined in asm/page.h |
diff --git a/include/asm-i386/topology.h b/include/asm-i386/topology.h index aa958c6ee83e..b94e5eeef917 100644 --- a/include/asm-i386/topology.h +++ b/include/asm-i386/topology.h | |||
@@ -112,4 +112,6 @@ extern unsigned long node_remap_size[]; | |||
112 | 112 | ||
113 | #endif /* CONFIG_NUMA */ | 113 | #endif /* CONFIG_NUMA */ |
114 | 114 | ||
115 | extern cpumask_t cpu_coregroup_map(int cpu); | ||
116 | |||
115 | #endif /* _ASM_I386_TOPOLOGY_H */ | 117 | #endif /* _ASM_I386_TOPOLOGY_H */ |
diff --git a/include/asm-i386/unistd.h b/include/asm-i386/unistd.h index d8afd0e3b81a..014e3562895b 100644 --- a/include/asm-i386/unistd.h +++ b/include/asm-i386/unistd.h | |||
@@ -316,8 +316,10 @@ | |||
316 | #define __NR_pselect6 308 | 316 | #define __NR_pselect6 308 |
317 | #define __NR_ppoll 309 | 317 | #define __NR_ppoll 309 |
318 | #define __NR_unshare 310 | 318 | #define __NR_unshare 310 |
319 | #define __NR_set_robust_list 311 | ||
320 | #define __NR_get_robust_list 312 | ||
319 | 321 | ||
320 | #define NR_syscalls 311 | 322 | #define NR_syscalls 313 |
321 | 323 | ||
322 | /* | 324 | /* |
323 | * user-visible error numbers are in the range -1 - -128: see | 325 | * user-visible error numbers are in the range -1 - -128: see |