aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86_64
diff options
context:
space:
mode:
authorAnton Altaparmakov <aia21@cantab.net>2005-06-25 09:27:27 -0400
committerAnton Altaparmakov <aia21@cantab.net>2005-06-25 09:27:27 -0400
commit38b22b6e9f46ab8f73ef5734f0e0a000766a9258 (patch)
tree2ccc41ef55918d3af43e444bde7648562a031559 /include/asm-x86_64
parent3357d4c75f1fb67e7304998c4ad4e9a9fed66fa4 (diff)
parentb3e112bcc19abd8e9657dca34a87316786e096f3 (diff)
Automerge with /usr/src/ntfs-2.6.git.
Diffstat (limited to 'include/asm-x86_64')
-rw-r--r--include/asm-x86_64/bitops.h2
-rw-r--r--include/asm-x86_64/ia32.h2
-rw-r--r--include/asm-x86_64/io.h5
-rw-r--r--include/asm-x86_64/kprobes.h3
-rw-r--r--include/asm-x86_64/mmzone.h20
-rw-r--r--include/asm-x86_64/msr.h5
-rw-r--r--include/asm-x86_64/page.h4
-rw-r--r--include/asm-x86_64/param.h6
-rw-r--r--include/asm-x86_64/percpu.h2
-rw-r--r--include/asm-x86_64/processor.h8
-rw-r--r--include/asm-x86_64/ptrace.h1
-rw-r--r--include/asm-x86_64/sparsemem.h26
-rw-r--r--include/asm-x86_64/thread_info.h2
-rw-r--r--include/asm-x86_64/timex.h3
-rw-r--r--include/asm-x86_64/topology.h18
15 files changed, 65 insertions, 42 deletions
diff --git a/include/asm-x86_64/bitops.h b/include/asm-x86_64/bitops.h
index 5dd7727c756b..a31bb99be53f 100644
--- a/include/asm-x86_64/bitops.h
+++ b/include/asm-x86_64/bitops.h
@@ -411,8 +411,6 @@ static __inline__ int ffs(int x)
411/* find last set bit */ 411/* find last set bit */
412#define fls(x) generic_fls(x) 412#define fls(x) generic_fls(x)
413 413
414#define ARCH_HAS_ATOMIC_UNSIGNED 1
415
416#endif /* __KERNEL__ */ 414#endif /* __KERNEL__ */
417 415
418#endif /* _X86_64_BITOPS_H */ 416#endif /* _X86_64_BITOPS_H */
diff --git a/include/asm-x86_64/ia32.h b/include/asm-x86_64/ia32.h
index c0a7717923ed..6efa00fe4e7b 100644
--- a/include/asm-x86_64/ia32.h
+++ b/include/asm-x86_64/ia32.h
@@ -94,7 +94,7 @@ typedef struct compat_siginfo{
94 94
95 /* POSIX.1b timers */ 95 /* POSIX.1b timers */
96 struct { 96 struct {
97 int _tid; /* timer id */ 97 compat_timer_t _tid; /* timer id */
98 int _overrun; /* overrun count */ 98 int _overrun; /* overrun count */
99 compat_sigval_t _sigval; /* same as below */ 99 compat_sigval_t _sigval; /* same as below */
100 int _sys_private; /* not to be passed to user */ 100 int _sys_private; /* not to be passed to user */
diff --git a/include/asm-x86_64/io.h b/include/asm-x86_64/io.h
index 94202703fae2..37fc3f149a5a 100644
--- a/include/asm-x86_64/io.h
+++ b/include/asm-x86_64/io.h
@@ -124,12 +124,7 @@ extern inline void * phys_to_virt(unsigned long address)
124/* 124/*
125 * Change "struct page" to physical address. 125 * Change "struct page" to physical address.
126 */ 126 */
127#ifdef CONFIG_DISCONTIGMEM
128#include <asm/mmzone.h>
129#define page_to_phys(page) ((dma_addr_t)page_to_pfn(page) << PAGE_SHIFT) 127#define page_to_phys(page) ((dma_addr_t)page_to_pfn(page) << PAGE_SHIFT)
130#else
131#define page_to_phys(page) ((page - mem_map) << PAGE_SHIFT)
132#endif
133 128
134#include <asm-generic/iomap.h> 129#include <asm-generic/iomap.h>
135 130
diff --git a/include/asm-x86_64/kprobes.h b/include/asm-x86_64/kprobes.h
index bfea52d516f8..6d6d883fdf6d 100644
--- a/include/asm-x86_64/kprobes.h
+++ b/include/asm-x86_64/kprobes.h
@@ -38,6 +38,9 @@ typedef u8 kprobe_opcode_t;
38 : (((unsigned long)current_thread_info()) + THREAD_SIZE - (ADDR))) 38 : (((unsigned long)current_thread_info()) + THREAD_SIZE - (ADDR)))
39 39
40#define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)pentry 40#define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)pentry
41#define ARCH_SUPPORTS_KRETPROBES
42
43void kretprobe_trampoline(void);
41 44
42/* Architecture specific copy of original instruction*/ 45/* Architecture specific copy of original instruction*/
43struct arch_specific_insn { 46struct arch_specific_insn {
diff --git a/include/asm-x86_64/mmzone.h b/include/asm-x86_64/mmzone.h
index d95b7c240831..768413751b34 100644
--- a/include/asm-x86_64/mmzone.h
+++ b/include/asm-x86_64/mmzone.h
@@ -6,7 +6,7 @@
6 6
7#include <linux/config.h> 7#include <linux/config.h>
8 8
9#ifdef CONFIG_DISCONTIGMEM 9#ifdef CONFIG_NUMA
10 10
11#define VIRTUAL_BUG_ON(x) 11#define VIRTUAL_BUG_ON(x)
12 12
@@ -30,27 +30,23 @@ static inline __attribute__((pure)) int phys_to_nid(unsigned long addr)
30 return nid; 30 return nid;
31} 31}
32 32
33#define pfn_to_nid(pfn) phys_to_nid((unsigned long)(pfn) << PAGE_SHIFT)
34
35#define kvaddr_to_nid(kaddr) phys_to_nid(__pa(kaddr))
36#define NODE_DATA(nid) (node_data[nid]) 33#define NODE_DATA(nid) (node_data[nid])
37 34
38#define node_mem_map(nid) (NODE_DATA(nid)->node_mem_map)
39
40#define node_mem_map(nid) (NODE_DATA(nid)->node_mem_map)
41#define node_start_pfn(nid) (NODE_DATA(nid)->node_start_pfn) 35#define node_start_pfn(nid) (NODE_DATA(nid)->node_start_pfn)
42#define node_end_pfn(nid) (NODE_DATA(nid)->node_start_pfn + \ 36#define node_end_pfn(nid) (NODE_DATA(nid)->node_start_pfn + \
43 NODE_DATA(nid)->node_spanned_pages) 37 NODE_DATA(nid)->node_spanned_pages)
44 38
45#define local_mapnr(kvaddr) \ 39#ifdef CONFIG_DISCONTIGMEM
46 ( (__pa(kvaddr) >> PAGE_SHIFT) - node_start_pfn(kvaddr_to_nid(kvaddr)) ) 40
41#define pfn_to_nid(pfn) phys_to_nid((unsigned long)(pfn) << PAGE_SHIFT)
42#define kvaddr_to_nid(kaddr) phys_to_nid(__pa(kaddr))
47 43
48/* AK: this currently doesn't deal with invalid addresses. We'll see 44/* AK: this currently doesn't deal with invalid addresses. We'll see
49 if the 2.5 kernel doesn't pass them 45 if the 2.5 kernel doesn't pass them
50 (2.4 used to). */ 46 (2.4 used to). */
51#define pfn_to_page(pfn) ({ \ 47#define pfn_to_page(pfn) ({ \
52 int nid = phys_to_nid(((unsigned long)(pfn)) << PAGE_SHIFT); \ 48 int nid = phys_to_nid(((unsigned long)(pfn)) << PAGE_SHIFT); \
53 ((pfn) - node_start_pfn(nid)) + node_mem_map(nid); \ 49 ((pfn) - node_start_pfn(nid)) + NODE_DATA(nid)->node_mem_map; \
54}) 50})
55 51
56#define page_to_pfn(page) \ 52#define page_to_pfn(page) \
@@ -60,4 +56,8 @@ static inline __attribute__((pure)) int phys_to_nid(unsigned long addr)
60 ({ u8 nid__ = pfn_to_nid(pfn); \ 56 ({ u8 nid__ = pfn_to_nid(pfn); \
61 nid__ != 0xff && (pfn) >= node_start_pfn(nid__) && (pfn) <= node_end_pfn(nid__); })) 57 nid__ != 0xff && (pfn) >= node_start_pfn(nid__) && (pfn) <= node_end_pfn(nid__); }))
62#endif 58#endif
59
60#define local_mapnr(kvaddr) \
61 ( (__pa(kvaddr) >> PAGE_SHIFT) - node_start_pfn(kvaddr_to_nid(kvaddr)) )
62#endif
63#endif 63#endif
diff --git a/include/asm-x86_64/msr.h b/include/asm-x86_64/msr.h
index 513e52c71821..bc700232728d 100644
--- a/include/asm-x86_64/msr.h
+++ b/include/asm-x86_64/msr.h
@@ -57,11 +57,6 @@
57 (val) = ((unsigned long)__a) | (((unsigned long)__d)<<32); \ 57 (val) = ((unsigned long)__a) | (((unsigned long)__d)<<32); \
58} while(0) 58} while(0)
59 59
60#define rdpmc(counter,low,high) \
61 __asm__ __volatile__("rdpmc" \
62 : "=a" (low), "=d" (high) \
63 : "c" (counter))
64
65#define write_tsc(val1,val2) wrmsr(0x10, val1, val2) 60#define write_tsc(val1,val2) wrmsr(0x10, val1, val2)
66 61
67#define rdpmc(counter,low,high) \ 62#define rdpmc(counter,low,high) \
diff --git a/include/asm-x86_64/page.h b/include/asm-x86_64/page.h
index 9ce338c3a71e..60130f4ca986 100644
--- a/include/asm-x86_64/page.h
+++ b/include/asm-x86_64/page.h
@@ -119,7 +119,9 @@ extern __inline__ int get_order(unsigned long size)
119 __pa(v); }) 119 __pa(v); })
120 120
121#define __va(x) ((void *)((unsigned long)(x)+PAGE_OFFSET)) 121#define __va(x) ((void *)((unsigned long)(x)+PAGE_OFFSET))
122#ifndef CONFIG_DISCONTIGMEM 122#define __boot_va(x) __va(x)
123#define __boot_pa(x) __pa(x)
124#ifdef CONFIG_FLATMEM
123#define pfn_to_page(pfn) (mem_map + (pfn)) 125#define pfn_to_page(pfn) (mem_map + (pfn))
124#define page_to_pfn(page) ((unsigned long)((page) - mem_map)) 126#define page_to_pfn(page) ((unsigned long)((page) - mem_map))
125#define pfn_valid(pfn) ((pfn) < max_mapnr) 127#define pfn_valid(pfn) ((pfn) < max_mapnr)
diff --git a/include/asm-x86_64/param.h b/include/asm-x86_64/param.h
index b707f0568c9e..40b11937180d 100644
--- a/include/asm-x86_64/param.h
+++ b/include/asm-x86_64/param.h
@@ -1,9 +1,11 @@
1#include <linux/config.h>
2
1#ifndef _ASMx86_64_PARAM_H 3#ifndef _ASMx86_64_PARAM_H
2#define _ASMx86_64_PARAM_H 4#define _ASMx86_64_PARAM_H
3 5
4#ifdef __KERNEL__ 6#ifdef __KERNEL__
5# define HZ 1000 /* Internal kernel timer frequency */ 7# define HZ CONFIG_HZ /* Internal kernel timer frequency */
6# define USER_HZ 100 /* .. some user interfaces are in "ticks */ 8# define USER_HZ 100 /* .. some user interfaces are in "ticks */
7#define CLOCKS_PER_SEC (USER_HZ) /* like times() */ 9#define CLOCKS_PER_SEC (USER_HZ) /* like times() */
8#endif 10#endif
9 11
diff --git a/include/asm-x86_64/percpu.h b/include/asm-x86_64/percpu.h
index 415d73f3c8ef..9c71855736fb 100644
--- a/include/asm-x86_64/percpu.h
+++ b/include/asm-x86_64/percpu.h
@@ -39,7 +39,7 @@ extern void setup_per_cpu_areas(void);
39#define DEFINE_PER_CPU(type, name) \ 39#define DEFINE_PER_CPU(type, name) \
40 __typeof__(type) per_cpu__##name 40 __typeof__(type) per_cpu__##name
41 41
42#define per_cpu(var, cpu) (*((void)cpu, &per_cpu__##var)) 42#define per_cpu(var, cpu) (*((void)(cpu), &per_cpu__##var))
43#define __get_cpu_var(var) per_cpu__##var 43#define __get_cpu_var(var) per_cpu__##var
44 44
45#endif /* SMP */ 45#endif /* SMP */
diff --git a/include/asm-x86_64/processor.h b/include/asm-x86_64/processor.h
index 8b55f139968f..106f666517bb 100644
--- a/include/asm-x86_64/processor.h
+++ b/include/asm-x86_64/processor.h
@@ -280,6 +280,14 @@ struct thread_struct {
280 set_fs(USER_DS); \ 280 set_fs(USER_DS); \
281} while(0) 281} while(0)
282 282
283#define get_debugreg(var, register) \
284 __asm__("movq %%db" #register ", %0" \
285 :"=r" (var))
286#define set_debugreg(value, register) \
287 __asm__("movq %0,%%db" #register \
288 : /* no output */ \
289 :"r" (value))
290
283struct task_struct; 291struct task_struct;
284struct mm_struct; 292struct mm_struct;
285 293
diff --git a/include/asm-x86_64/ptrace.h b/include/asm-x86_64/ptrace.h
index 5bbc8d3141c8..ca6f15ff61d4 100644
--- a/include/asm-x86_64/ptrace.h
+++ b/include/asm-x86_64/ptrace.h
@@ -82,6 +82,7 @@ struct pt_regs {
82 82
83#if defined(__KERNEL__) && !defined(__ASSEMBLY__) 83#if defined(__KERNEL__) && !defined(__ASSEMBLY__)
84#define user_mode(regs) (!!((regs)->cs & 3)) 84#define user_mode(regs) (!!((regs)->cs & 3))
85#define user_mode_vm(regs) user_mode(regs)
85#define instruction_pointer(regs) ((regs)->rip) 86#define instruction_pointer(regs) ((regs)->rip)
86extern unsigned long profile_pc(struct pt_regs *regs); 87extern unsigned long profile_pc(struct pt_regs *regs);
87void signal_fault(struct pt_regs *regs, void __user *frame, char *where); 88void signal_fault(struct pt_regs *regs, void __user *frame, char *where);
diff --git a/include/asm-x86_64/sparsemem.h b/include/asm-x86_64/sparsemem.h
new file mode 100644
index 000000000000..dabb16714a71
--- /dev/null
+++ b/include/asm-x86_64/sparsemem.h
@@ -0,0 +1,26 @@
1#ifndef _ASM_X86_64_SPARSEMEM_H
2#define _ASM_X86_64_SPARSEMEM_H 1
3
4#ifdef CONFIG_SPARSEMEM
5
6/*
7 * generic non-linear memory support:
8 *
9 * 1) we will not split memory into more chunks than will fit into the flags
10 * field of the struct page
11 *
12 * SECTION_SIZE_BITS 2^n: size of each section
13 * MAX_PHYSADDR_BITS 2^n: max size of physical address space
14 * MAX_PHYSMEM_BITS 2^n: how much memory we can have in that space
15 *
16 */
17
18#define SECTION_SIZE_BITS 27 /* matt - 128 is convenient right now */
19#define MAX_PHYSADDR_BITS 40
20#define MAX_PHYSMEM_BITS 40
21
22extern int early_pfn_to_nid(unsigned long pfn);
23
24#endif /* CONFIG_SPARSEMEM */
25
26#endif /* _ASM_X86_64_SPARSEMEM_H */
diff --git a/include/asm-x86_64/thread_info.h b/include/asm-x86_64/thread_info.h
index f4b3b249639c..08eb6e4f3737 100644
--- a/include/asm-x86_64/thread_info.h
+++ b/include/asm-x86_64/thread_info.h
@@ -29,7 +29,7 @@ struct thread_info {
29 __u32 flags; /* low level flags */ 29 __u32 flags; /* low level flags */
30 __u32 status; /* thread synchronous flags */ 30 __u32 status; /* thread synchronous flags */
31 __u32 cpu; /* current CPU */ 31 __u32 cpu; /* current CPU */
32 int preempt_count; 32 int preempt_count; /* 0 => preemptable, <0 => BUG */
33 33
34 mm_segment_t addr_limit; 34 mm_segment_t addr_limit;
35 struct restart_block restart_block; 35 struct restart_block restart_block;
diff --git a/include/asm-x86_64/timex.h b/include/asm-x86_64/timex.h
index 34f31a18f90b..24ecf6a637cb 100644
--- a/include/asm-x86_64/timex.h
+++ b/include/asm-x86_64/timex.h
@@ -26,6 +26,9 @@ static inline cycles_t get_cycles (void)
26 26
27extern unsigned int cpu_khz; 27extern unsigned int cpu_khz;
28 28
29extern int read_current_timer(unsigned long *timer_value);
30#define ARCH_HAS_READ_CURRENT_TIMER 1
31
29extern struct vxtime_data vxtime; 32extern struct vxtime_data vxtime;
30 33
31#endif 34#endif
diff --git a/include/asm-x86_64/topology.h b/include/asm-x86_64/topology.h
index 67f24e0ea819..8f77e9f6bc23 100644
--- a/include/asm-x86_64/topology.h
+++ b/include/asm-x86_64/topology.h
@@ -3,7 +3,7 @@
3 3
4#include <linux/config.h> 4#include <linux/config.h>
5 5
6#ifdef CONFIG_DISCONTIGMEM 6#ifdef CONFIG_NUMA
7 7
8#include <asm/mpspec.h> 8#include <asm/mpspec.h>
9#include <asm/bitops.h> 9#include <asm/bitops.h>
@@ -13,8 +13,8 @@
13extern cpumask_t cpu_online_map; 13extern cpumask_t cpu_online_map;
14 14
15extern unsigned char cpu_to_node[]; 15extern unsigned char cpu_to_node[];
16extern unsigned char pci_bus_to_node[];
16extern cpumask_t node_to_cpumask[]; 17extern cpumask_t node_to_cpumask[];
17extern cpumask_t pci_bus_to_cpumask[];
18 18
19#ifdef CONFIG_ACPI_NUMA 19#ifdef CONFIG_ACPI_NUMA
20extern int __node_distance(int, int); 20extern int __node_distance(int, int);
@@ -26,18 +26,9 @@ extern int __node_distance(int, int);
26#define parent_node(node) (node) 26#define parent_node(node) (node)
27#define node_to_first_cpu(node) (__ffs(node_to_cpumask[node])) 27#define node_to_first_cpu(node) (__ffs(node_to_cpumask[node]))
28#define node_to_cpumask(node) (node_to_cpumask[node]) 28#define node_to_cpumask(node) (node_to_cpumask[node])
29#define pcibus_to_node(bus) pci_bus_to_node[(bus)->number]
30#define pcibus_to_cpumask(bus) node_to_cpumask(pcibus_to_node(bus));
29 31
30static inline cpumask_t __pcibus_to_cpumask(int bus)
31{
32 cpumask_t busmask = pci_bus_to_cpumask[bus];
33 cpumask_t online = cpu_online_map;
34 cpumask_t res;
35 cpus_and(res, busmask, online);
36 return res;
37}
38#define pcibus_to_cpumask(bus) __pcibus_to_cpumask(bus->number)
39
40#ifdef CONFIG_NUMA
41/* sched_domains SD_NODE_INIT for x86_64 machines */ 32/* sched_domains SD_NODE_INIT for x86_64 machines */
42#define SD_NODE_INIT (struct sched_domain) { \ 33#define SD_NODE_INIT (struct sched_domain) { \
43 .span = CPU_MASK_NONE, \ 34 .span = CPU_MASK_NONE, \
@@ -59,7 +50,6 @@ static inline cpumask_t __pcibus_to_cpumask(int bus)
59 .balance_interval = 1, \ 50 .balance_interval = 1, \
60 .nr_balance_failed = 0, \ 51 .nr_balance_failed = 0, \
61} 52}
62#endif
63 53
64#endif 54#endif
65 55