aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86_64
diff options
context:
space:
mode:
authorDmitry Torokhov <dtor_core@ameritech.net>2006-04-29 01:11:23 -0400
committerDmitry Torokhov <dtor_core@ameritech.net>2006-04-29 01:11:23 -0400
commit7b7e394185014e0f3bd8989cac937003f20ef9ce (patch)
tree3beda5f979bba0aa9822534e239cf1b45f3be69c /include/asm-x86_64
parentddc5d3414593e4d7ad7fbd33e7f7517fcc234544 (diff)
parent693f7d362055261882659475d2ef022e32edbff1 (diff)
Merge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'include/asm-x86_64')
-rw-r--r--include/asm-x86_64/cache.h4
-rw-r--r--include/asm-x86_64/cpufeature.h1
-rw-r--r--include/asm-x86_64/e820.h3
-rw-r--r--include/asm-x86_64/hpet.h2
-rw-r--r--include/asm-x86_64/i387.h20
-rw-r--r--include/asm-x86_64/ia32_unistd.h2
-rw-r--r--include/asm-x86_64/io.h2
-rw-r--r--include/asm-x86_64/mce.h7
-rw-r--r--include/asm-x86_64/mmzone.h3
-rw-r--r--include/asm-x86_64/numa.h3
-rw-r--r--include/asm-x86_64/numnodes.h12
-rw-r--r--include/asm-x86_64/percpu.h2
-rw-r--r--include/asm-x86_64/timex.h2
-rw-r--r--include/asm-x86_64/unistd.h10
14 files changed, 48 insertions, 25 deletions
diff --git a/include/asm-x86_64/cache.h b/include/asm-x86_64/cache.h
index c8043a16152e..f8dff1c67538 100644
--- a/include/asm-x86_64/cache.h
+++ b/include/asm-x86_64/cache.h
@@ -20,8 +20,8 @@
20 __attribute__((__section__(".data.page_aligned"))) 20 __attribute__((__section__(".data.page_aligned")))
21#endif 21#endif
22 22
23#define __read_mostly __attribute__((__section__(".data.read_mostly")))
24
25#endif 23#endif
26 24
25#define __read_mostly __attribute__((__section__(".data.read_mostly")))
26
27#endif 27#endif
diff --git a/include/asm-x86_64/cpufeature.h b/include/asm-x86_64/cpufeature.h
index 76bb6193ae91..662964b74e34 100644
--- a/include/asm-x86_64/cpufeature.h
+++ b/include/asm-x86_64/cpufeature.h
@@ -64,6 +64,7 @@
64#define X86_FEATURE_REP_GOOD (3*32+ 4) /* rep microcode works well on this CPU */ 64#define X86_FEATURE_REP_GOOD (3*32+ 4) /* rep microcode works well on this CPU */
65#define X86_FEATURE_CONSTANT_TSC (3*32+5) /* TSC runs at constant rate */ 65#define X86_FEATURE_CONSTANT_TSC (3*32+5) /* TSC runs at constant rate */
66#define X86_FEATURE_SYNC_RDTSC (3*32+6) /* RDTSC syncs CPU core */ 66#define X86_FEATURE_SYNC_RDTSC (3*32+6) /* RDTSC syncs CPU core */
67#define X86_FEATURE_FXSAVE_LEAK (3*32+7) /* FIP/FOP/FDP leaks through FXSAVE */
67 68
68/* Intel-defined CPU features, CPUID level 0x00000001 (ecx), word 4 */ 69/* Intel-defined CPU features, CPUID level 0x00000001 (ecx), word 4 */
69#define X86_FEATURE_XMM3 (4*32+ 0) /* Streaming SIMD Extensions-3 */ 70#define X86_FEATURE_XMM3 (4*32+ 0) /* Streaming SIMD Extensions-3 */
diff --git a/include/asm-x86_64/e820.h b/include/asm-x86_64/e820.h
index 8dcc32665240..93b51df51687 100644
--- a/include/asm-x86_64/e820.h
+++ b/include/asm-x86_64/e820.h
@@ -47,7 +47,8 @@ extern void contig_e820_setup(void);
47extern unsigned long e820_end_of_ram(void); 47extern unsigned long e820_end_of_ram(void);
48extern void e820_reserve_resources(void); 48extern void e820_reserve_resources(void);
49extern void e820_print_map(char *who); 49extern void e820_print_map(char *who);
50extern int e820_mapped(unsigned long start, unsigned long end, unsigned type); 50extern int e820_any_mapped(unsigned long start, unsigned long end, unsigned type);
51extern int e820_all_mapped(unsigned long start, unsigned long end, unsigned type);
51 52
52extern void e820_bootmem_free(pg_data_t *pgdat, unsigned long start,unsigned long end); 53extern void e820_bootmem_free(pg_data_t *pgdat, unsigned long start,unsigned long end);
53extern void e820_setup_gap(void); 54extern void e820_setup_gap(void);
diff --git a/include/asm-x86_64/hpet.h b/include/asm-x86_64/hpet.h
index 08b75c15269a..18ff7ee9e774 100644
--- a/include/asm-x86_64/hpet.h
+++ b/include/asm-x86_64/hpet.h
@@ -51,6 +51,8 @@
51 51
52#define HPET_TN_ROUTE_SHIFT 9 52#define HPET_TN_ROUTE_SHIFT 9
53 53
54#define HPET_TICK_RATE (HZ * 100000UL)
55
54extern int is_hpet_enabled(void); 56extern int is_hpet_enabled(void);
55extern int hpet_rtc_timer_init(void); 57extern int hpet_rtc_timer_init(void);
56extern int oem_force_hpet_timer(void); 58extern int oem_force_hpet_timer(void);
diff --git a/include/asm-x86_64/i387.h b/include/asm-x86_64/i387.h
index 876eb9a2fe78..cba8a3b0cded 100644
--- a/include/asm-x86_64/i387.h
+++ b/include/asm-x86_64/i387.h
@@ -72,6 +72,23 @@ extern int set_fpregs(struct task_struct *tsk,
72#define set_fpu_swd(t,val) ((t)->thread.i387.fxsave.swd = (val)) 72#define set_fpu_swd(t,val) ((t)->thread.i387.fxsave.swd = (val))
73#define set_fpu_fxsr_twd(t,val) ((t)->thread.i387.fxsave.twd = (val)) 73#define set_fpu_fxsr_twd(t,val) ((t)->thread.i387.fxsave.twd = (val))
74 74
75#define X87_FSW_ES (1 << 7) /* Exception Summary */
76
77/* AMD CPUs don't save/restore FDP/FIP/FOP unless an exception
78 is pending. Clear the x87 state here by setting it to fixed
79 values. The kernel data segment can be sometimes 0 and sometimes
80 new user value. Both should be ok.
81 Use the PDA as safe address because it should be already in L1. */
82static inline void clear_fpu_state(struct i387_fxsave_struct *fx)
83{
84 if (unlikely(fx->swd & X87_FSW_ES))
85 asm volatile("fnclex");
86 alternative_input(ASM_NOP8 ASM_NOP2,
87 " emms\n" /* clear stack tags */
88 " fildl %%gs:0", /* load to clear state */
89 X86_FEATURE_FXSAVE_LEAK);
90}
91
75static inline int restore_fpu_checking(struct i387_fxsave_struct *fx) 92static inline int restore_fpu_checking(struct i387_fxsave_struct *fx)
76{ 93{
77 int err; 94 int err;
@@ -119,6 +136,7 @@ static inline int save_i387_checking(struct i387_fxsave_struct __user *fx)
119#endif 136#endif
120 if (unlikely(err)) 137 if (unlikely(err))
121 __clear_user(fx, sizeof(struct i387_fxsave_struct)); 138 __clear_user(fx, sizeof(struct i387_fxsave_struct));
139 /* No need to clear here because the caller clears USED_MATH */
122 return err; 140 return err;
123} 141}
124 142
@@ -149,7 +167,7 @@ static inline void __fxsave_clear(struct task_struct *tsk)
149 "i" (offsetof(__typeof__(*tsk), 167 "i" (offsetof(__typeof__(*tsk),
150 thread.i387.fxsave))); 168 thread.i387.fxsave)));
151#endif 169#endif
152 __asm__ __volatile__("fnclex"); 170 clear_fpu_state(&tsk->thread.i387.fxsave);
153} 171}
154 172
155static inline void kernel_fpu_begin(void) 173static inline void kernel_fpu_begin(void)
diff --git a/include/asm-x86_64/ia32_unistd.h b/include/asm-x86_64/ia32_unistd.h
index eeb2bcd635de..b4f4b172b15a 100644
--- a/include/asm-x86_64/ia32_unistd.h
+++ b/include/asm-x86_64/ia32_unistd.h
@@ -317,6 +317,4 @@
317#define __NR_ia32_ppoll 309 317#define __NR_ia32_ppoll 309
318#define __NR_ia32_unshare 310 318#define __NR_ia32_unshare 310
319 319
320#define IA32_NR_syscalls 315 /* must be > than biggest syscall! */
321
322#endif /* _ASM_X86_64_IA32_UNISTD_H_ */ 320#endif /* _ASM_X86_64_IA32_UNISTD_H_ */
diff --git a/include/asm-x86_64/io.h b/include/asm-x86_64/io.h
index cafdfb37f0d8..a05da8a50bfd 100644
--- a/include/asm-x86_64/io.h
+++ b/include/asm-x86_64/io.h
@@ -177,7 +177,7 @@ static inline __u16 __readw(const volatile void __iomem *addr)
177{ 177{
178 return *(__force volatile __u16 *)addr; 178 return *(__force volatile __u16 *)addr;
179} 179}
180static inline __u32 __readl(const volatile void __iomem *addr) 180static __always_inline __u32 __readl(const volatile void __iomem *addr)
181{ 181{
182 return *(__force volatile __u32 *)addr; 182 return *(__force volatile __u32 *)addr;
183} 183}
diff --git a/include/asm-x86_64/mce.h b/include/asm-x86_64/mce.h
index 5d298b799a9f..7229785094e3 100644
--- a/include/asm-x86_64/mce.h
+++ b/include/asm-x86_64/mce.h
@@ -70,6 +70,9 @@ struct mce_log {
70#define MCE_THRESHOLD_BASE MCE_EXTENDED_BANK + 1 /* MCE_AMD */ 70#define MCE_THRESHOLD_BASE MCE_EXTENDED_BANK + 1 /* MCE_AMD */
71#define MCE_THRESHOLD_DRAM_ECC MCE_THRESHOLD_BASE + 4 71#define MCE_THRESHOLD_DRAM_ECC MCE_THRESHOLD_BASE + 4
72 72
73#ifdef __KERNEL__
74#include <asm/atomic.h>
75
73void mce_log(struct mce *m); 76void mce_log(struct mce *m);
74#ifdef CONFIG_X86_MCE_INTEL 77#ifdef CONFIG_X86_MCE_INTEL
75void mce_intel_feature_init(struct cpuinfo_x86 *c); 78void mce_intel_feature_init(struct cpuinfo_x86 *c);
@@ -87,4 +90,8 @@ static inline void mce_amd_feature_init(struct cpuinfo_x86 *c)
87} 90}
88#endif 91#endif
89 92
93extern atomic_t mce_entry;
94
95#endif
96
90#endif 97#endif
diff --git a/include/asm-x86_64/mmzone.h b/include/asm-x86_64/mmzone.h
index 6b18cd8f293d..6944e7122df5 100644
--- a/include/asm-x86_64/mmzone.h
+++ b/include/asm-x86_64/mmzone.h
@@ -12,7 +12,8 @@
12 12
13#include <asm/smp.h> 13#include <asm/smp.h>
14 14
15#define NODEMAPSIZE 0xfff 15/* Should really switch to dynamic allocation at some point */
16#define NODEMAPSIZE 0x4fff
16 17
17/* Simple perfect hash to map physical addresses to node numbers */ 18/* Simple perfect hash to map physical addresses to node numbers */
18struct memnode { 19struct memnode {
diff --git a/include/asm-x86_64/numa.h b/include/asm-x86_64/numa.h
index f6cbb4cbb5a3..1cc92fe02503 100644
--- a/include/asm-x86_64/numa.h
+++ b/include/asm-x86_64/numa.h
@@ -2,7 +2,6 @@
2#define _ASM_X8664_NUMA_H 1 2#define _ASM_X8664_NUMA_H 1
3 3
4#include <linux/nodemask.h> 4#include <linux/nodemask.h>
5#include <asm/numnodes.h>
6 5
7struct bootnode { 6struct bootnode {
8 u64 start,end; 7 u64 start,end;
@@ -18,6 +17,8 @@ extern void numa_init_array(void);
18extern int numa_off; 17extern int numa_off;
19 18
20extern void numa_set_node(int cpu, int node); 19extern void numa_set_node(int cpu, int node);
20extern void srat_reserve_add_area(int nodeid);
21extern int hotadd_percent;
21 22
22extern unsigned char apicid_to_node[256]; 23extern unsigned char apicid_to_node[256];
23#ifdef CONFIG_NUMA 24#ifdef CONFIG_NUMA
diff --git a/include/asm-x86_64/numnodes.h b/include/asm-x86_64/numnodes.h
deleted file mode 100644
index 32be16b8ae96..000000000000
--- a/include/asm-x86_64/numnodes.h
+++ /dev/null
@@ -1,12 +0,0 @@
1#ifndef _ASM_X8664_NUMNODES_H
2#define _ASM_X8664_NUMNODES_H 1
3
4#include <linux/config.h>
5
6#ifdef CONFIG_NUMA
7#define NODES_SHIFT 6
8#else
9#define NODES_SHIFT 0
10#endif
11
12#endif
diff --git a/include/asm-x86_64/percpu.h b/include/asm-x86_64/percpu.h
index 4405b4adeaba..7f33aaf9f7b1 100644
--- a/include/asm-x86_64/percpu.h
+++ b/include/asm-x86_64/percpu.h
@@ -26,7 +26,7 @@
26#define percpu_modcopy(pcpudst, src, size) \ 26#define percpu_modcopy(pcpudst, src, size) \
27do { \ 27do { \
28 unsigned int __i; \ 28 unsigned int __i; \
29 for_each_cpu(__i) \ 29 for_each_possible_cpu(__i) \
30 memcpy((pcpudst)+__per_cpu_offset(__i), \ 30 memcpy((pcpudst)+__per_cpu_offset(__i), \
31 (src), (size)); \ 31 (src), (size)); \
32} while (0) 32} while (0)
diff --git a/include/asm-x86_64/timex.h b/include/asm-x86_64/timex.h
index f18443fcdf04..b9e5320b7625 100644
--- a/include/asm-x86_64/timex.h
+++ b/include/asm-x86_64/timex.h
@@ -33,7 +33,7 @@ static __always_inline cycles_t get_cycles_sync(void)
33 unsigned eax; 33 unsigned eax;
34 /* Don't do an additional sync on CPUs where we know 34 /* Don't do an additional sync on CPUs where we know
35 RDTSC is already synchronous. */ 35 RDTSC is already synchronous. */
36 alternative_io(ASM_NOP2, "cpuid", X86_FEATURE_SYNC_RDTSC, 36 alternative_io("cpuid", ASM_NOP2, X86_FEATURE_SYNC_RDTSC,
37 "=a" (eax), "0" (1) : "ebx","ecx","edx","memory"); 37 "=a" (eax), "0" (1) : "ebx","ecx","edx","memory");
38 rdtscll(ret); 38 rdtscll(ret);
39 return ret; 39 return ret;
diff --git a/include/asm-x86_64/unistd.h b/include/asm-x86_64/unistd.h
index f21ff2c1e960..feb77cb8c044 100644
--- a/include/asm-x86_64/unistd.h
+++ b/include/asm-x86_64/unistd.h
@@ -611,8 +611,14 @@ __SYSCALL(__NR_set_robust_list, sys_set_robust_list)
611__SYSCALL(__NR_get_robust_list, sys_get_robust_list) 611__SYSCALL(__NR_get_robust_list, sys_get_robust_list)
612#define __NR_splice 275 612#define __NR_splice 275
613__SYSCALL(__NR_splice, sys_splice) 613__SYSCALL(__NR_splice, sys_splice)
614 614#define __NR_tee 276
615#define __NR_syscall_max __NR_splice 615__SYSCALL(__NR_tee, sys_tee)
616#define __NR_sync_file_range 277
617__SYSCALL(__NR_sync_file_range, sys_sync_file_range)
618#define __NR_vmsplice 278
619__SYSCALL(__NR_vmsplice, sys_vmsplice)
620
621#define __NR_syscall_max __NR_vmsplice
616 622
617#ifndef __NO_STUBS 623#ifndef __NO_STUBS
618 624