diff options
Diffstat (limited to 'include/asm-x86_64')
29 files changed, 159 insertions, 167 deletions
diff --git a/include/asm-x86_64/a.out.h b/include/asm-x86_64/a.out.h index 5952914f4121..7255cde06538 100644 --- a/include/asm-x86_64/a.out.h +++ b/include/asm-x86_64/a.out.h | |||
@@ -21,7 +21,7 @@ struct exec | |||
21 | 21 | ||
22 | #ifdef __KERNEL__ | 22 | #ifdef __KERNEL__ |
23 | #include <linux/thread_info.h> | 23 | #include <linux/thread_info.h> |
24 | #define STACK_TOP (test_thread_flag(TIF_IA32) ? IA32_PAGE_OFFSET : TASK_SIZE) | 24 | #define STACK_TOP TASK_SIZE |
25 | #endif | 25 | #endif |
26 | 26 | ||
27 | #endif /* __A_OUT_GNU_H__ */ | 27 | #endif /* __A_OUT_GNU_H__ */ |
diff --git a/include/asm-x86_64/apic.h b/include/asm-x86_64/apic.h index e4b1017b8b2b..16ec82e16b21 100644 --- a/include/asm-x86_64/apic.h +++ b/include/asm-x86_64/apic.h | |||
@@ -77,7 +77,7 @@ static inline void ack_APIC_irq(void) | |||
77 | extern int get_maxlvt (void); | 77 | extern int get_maxlvt (void); |
78 | extern void clear_local_APIC (void); | 78 | extern void clear_local_APIC (void); |
79 | extern void connect_bsp_APIC (void); | 79 | extern void connect_bsp_APIC (void); |
80 | extern void disconnect_bsp_APIC (void); | 80 | extern void disconnect_bsp_APIC (int virt_wire_setup); |
81 | extern void disable_local_APIC (void); | 81 | extern void disable_local_APIC (void); |
82 | extern int verify_local_APIC (void); | 82 | extern int verify_local_APIC (void); |
83 | extern void cache_APIC_registers (void); | 83 | extern void cache_APIC_registers (void); |
diff --git a/include/asm-x86_64/apicdef.h b/include/asm-x86_64/apicdef.h index bfebdb690654..9388062c4f6e 100644 --- a/include/asm-x86_64/apicdef.h +++ b/include/asm-x86_64/apicdef.h | |||
@@ -94,7 +94,7 @@ | |||
94 | #define SET_APIC_DELIVERY_MODE(x,y) (((x)&~0x700)|((y)<<8)) | 94 | #define SET_APIC_DELIVERY_MODE(x,y) (((x)&~0x700)|((y)<<8)) |
95 | #define APIC_MODE_FIXED 0x0 | 95 | #define APIC_MODE_FIXED 0x0 |
96 | #define APIC_MODE_NMI 0x4 | 96 | #define APIC_MODE_NMI 0x4 |
97 | #define APIC_MODE_EXINT 0x7 | 97 | #define APIC_MODE_EXTINT 0x7 |
98 | #define APIC_LVT1 0x360 | 98 | #define APIC_LVT1 0x360 |
99 | #define APIC_LVTERR 0x370 | 99 | #define APIC_LVTERR 0x370 |
100 | #define APIC_TMICT 0x380 | 100 | #define APIC_TMICT 0x380 |
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/io_apic.h b/include/asm-x86_64/io_apic.h index 32573749004c..a8babd2bbe84 100644 --- a/include/asm-x86_64/io_apic.h +++ b/include/asm-x86_64/io_apic.h | |||
@@ -217,4 +217,6 @@ extern int assign_irq_vector(int irq); | |||
217 | 217 | ||
218 | void enable_NMI_through_LVT0 (void * dummy); | 218 | void enable_NMI_through_LVT0 (void * dummy); |
219 | 219 | ||
220 | extern spinlock_t i8259A_lock; | ||
221 | |||
220 | #endif | 222 | #endif |
diff --git a/include/asm-x86_64/irq.h b/include/asm-x86_64/irq.h index 3af50b3c3b05..eb3b7aa9eb9f 100644 --- a/include/asm-x86_64/irq.h +++ b/include/asm-x86_64/irq.h | |||
@@ -52,4 +52,9 @@ struct irqaction; | |||
52 | struct pt_regs; | 52 | struct pt_regs; |
53 | int handle_IRQ_event(unsigned int, struct pt_regs *, struct irqaction *); | 53 | int handle_IRQ_event(unsigned int, struct pt_regs *, struct irqaction *); |
54 | 54 | ||
55 | #ifdef CONFIG_HOTPLUG_CPU | ||
56 | #include <linux/cpumask.h> | ||
57 | extern void fixup_irqs(cpumask_t map); | ||
58 | #endif | ||
59 | |||
55 | #endif /* _ASM_IRQ_H */ | 60 | #endif /* _ASM_IRQ_H */ |
diff --git a/include/asm-x86_64/kdebug.h b/include/asm-x86_64/kdebug.h index 6277f75cbb4b..b90341994d80 100644 --- a/include/asm-x86_64/kdebug.h +++ b/include/asm-x86_64/kdebug.h | |||
@@ -14,7 +14,7 @@ struct die_args { | |||
14 | }; | 14 | }; |
15 | 15 | ||
16 | /* Note - you should never unregister because that can race with NMIs. | 16 | /* Note - you should never unregister because that can race with NMIs. |
17 | If you really want to do it first unregister - then synchronize_kernel - then free. | 17 | If you really want to do it first unregister - then synchronize_sched - then free. |
18 | */ | 18 | */ |
19 | int register_die_notifier(struct notifier_block *nb); | 19 | int register_die_notifier(struct notifier_block *nb); |
20 | extern struct notifier_block *die_chain; | 20 | extern struct notifier_block *die_chain; |
diff --git a/include/asm-x86_64/kexec.h b/include/asm-x86_64/kexec.h new file mode 100644 index 000000000000..42d2ff15c592 --- /dev/null +++ b/include/asm-x86_64/kexec.h | |||
@@ -0,0 +1,33 @@ | |||
1 | #ifndef _X86_64_KEXEC_H | ||
2 | #define _X86_64_KEXEC_H | ||
3 | |||
4 | #include <asm/page.h> | ||
5 | #include <asm/proto.h> | ||
6 | |||
7 | /* | ||
8 | * KEXEC_SOURCE_MEMORY_LIMIT maximum page get_free_page can return. | ||
9 | * I.e. Maximum page that is mapped directly into kernel memory, | ||
10 | * and kmap is not required. | ||
11 | * | ||
12 | * So far x86_64 is limited to 40 physical address bits. | ||
13 | */ | ||
14 | |||
15 | /* Maximum physical address we can use pages from */ | ||
16 | #define KEXEC_SOURCE_MEMORY_LIMIT (0xFFFFFFFFFFUL) | ||
17 | /* Maximum address we can reach in physical address mode */ | ||
18 | #define KEXEC_DESTINATION_MEMORY_LIMIT (0xFFFFFFFFFFUL) | ||
19 | /* Maximum address we can use for the control pages */ | ||
20 | #define KEXEC_CONTROL_MEMORY_LIMIT (0xFFFFFFFFFFUL) | ||
21 | |||
22 | /* Allocate one page for the pdp and the second for the code */ | ||
23 | #define KEXEC_CONTROL_CODE_SIZE (4096UL + 4096UL) | ||
24 | |||
25 | /* The native architecture */ | ||
26 | #define KEXEC_ARCH KEXEC_ARCH_X86_64 | ||
27 | |||
28 | #define MAX_NOTE_BYTES 1024 | ||
29 | typedef u32 note_buf_t[MAX_NOTE_BYTES/4]; | ||
30 | |||
31 | extern note_buf_t crash_notes[]; | ||
32 | |||
33 | #endif /* _X86_64_KEXEC_H */ | ||
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 | |||
43 | void kretprobe_trampoline(void); | ||
41 | 44 | ||
42 | /* Architecture specific copy of original instruction*/ | 45 | /* Architecture specific copy of original instruction*/ |
43 | struct arch_specific_insn { | 46 | struct 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 f43048035a03..431318764af6 100644 --- a/include/asm-x86_64/page.h +++ b/include/asm-x86_64/page.h | |||
@@ -28,6 +28,7 @@ | |||
28 | #define HPAGE_SIZE ((1UL) << HPAGE_SHIFT) | 28 | #define HPAGE_SIZE ((1UL) << HPAGE_SHIFT) |
29 | #define HPAGE_MASK (~(HPAGE_SIZE - 1)) | 29 | #define HPAGE_MASK (~(HPAGE_SIZE - 1)) |
30 | #define HUGETLB_PAGE_ORDER (HPAGE_SHIFT - PAGE_SHIFT) | 30 | #define HUGETLB_PAGE_ORDER (HPAGE_SHIFT - PAGE_SHIFT) |
31 | #define ARCH_HAS_HUGETLB_CLEAN_STALE_PGTABLE | ||
31 | 32 | ||
32 | #ifdef __KERNEL__ | 33 | #ifdef __KERNEL__ |
33 | #ifndef __ASSEMBLY__ | 34 | #ifndef __ASSEMBLY__ |
@@ -63,12 +64,14 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
63 | #define __pgd(x) ((pgd_t) { (x) } ) | 64 | #define __pgd(x) ((pgd_t) { (x) } ) |
64 | #define __pgprot(x) ((pgprot_t) { (x) } ) | 65 | #define __pgprot(x) ((pgprot_t) { (x) } ) |
65 | 66 | ||
66 | #define __START_KERNEL 0xffffffff80100000UL | 67 | #define __PHYSICAL_START ((unsigned long)CONFIG_PHYSICAL_START) |
68 | #define __START_KERNEL (__START_KERNEL_map + __PHYSICAL_START) | ||
67 | #define __START_KERNEL_map 0xffffffff80000000UL | 69 | #define __START_KERNEL_map 0xffffffff80000000UL |
68 | #define __PAGE_OFFSET 0xffff810000000000UL | 70 | #define __PAGE_OFFSET 0xffff810000000000UL |
69 | 71 | ||
70 | #else | 72 | #else |
71 | #define __START_KERNEL 0xffffffff80100000 | 73 | #define __PHYSICAL_START CONFIG_PHYSICAL_START |
74 | #define __START_KERNEL (__START_KERNEL_map + __PHYSICAL_START) | ||
72 | #define __START_KERNEL_map 0xffffffff80000000 | 75 | #define __START_KERNEL_map 0xffffffff80000000 |
73 | #define __PAGE_OFFSET 0xffff810000000000 | 76 | #define __PAGE_OFFSET 0xffff810000000000 |
74 | #endif /* !__ASSEMBLY__ */ | 77 | #endif /* !__ASSEMBLY__ */ |
@@ -118,7 +121,9 @@ extern __inline__ int get_order(unsigned long size) | |||
118 | __pa(v); }) | 121 | __pa(v); }) |
119 | 122 | ||
120 | #define __va(x) ((void *)((unsigned long)(x)+PAGE_OFFSET)) | 123 | #define __va(x) ((void *)((unsigned long)(x)+PAGE_OFFSET)) |
121 | #ifndef CONFIG_DISCONTIGMEM | 124 | #define __boot_va(x) __va(x) |
125 | #define __boot_pa(x) __pa(x) | ||
126 | #ifdef CONFIG_FLATMEM | ||
122 | #define pfn_to_page(pfn) (mem_map + (pfn)) | 127 | #define pfn_to_page(pfn) (mem_map + (pfn)) |
123 | #define page_to_pfn(page) ((unsigned long)((page) - mem_map)) | 128 | #define page_to_pfn(page) ((unsigned long)((page) - mem_map)) |
124 | #define pfn_valid(pfn) ((pfn) < max_mapnr) | 129 | #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/pci.h b/include/asm-x86_64/pci.h index 8712520ca47f..c1961db88fac 100644 --- a/include/asm-x86_64/pci.h +++ b/include/asm-x86_64/pci.h | |||
@@ -123,6 +123,16 @@ pci_dac_dma_sync_single_for_device(struct pci_dev *pdev, dma64_addr_t dma_addr, | |||
123 | flush_write_buffers(); | 123 | flush_write_buffers(); |
124 | } | 124 | } |
125 | 125 | ||
126 | #ifdef CONFIG_PCI | ||
127 | static inline void pci_dma_burst_advice(struct pci_dev *pdev, | ||
128 | enum pci_dma_burst_strategy *strat, | ||
129 | unsigned long *strategy_parameter) | ||
130 | { | ||
131 | *strat = PCI_DMA_BURST_INFINITY; | ||
132 | *strategy_parameter = ~0UL; | ||
133 | } | ||
134 | #endif | ||
135 | |||
126 | #define HAVE_PCI_MMAP | 136 | #define HAVE_PCI_MMAP |
127 | extern int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, | 137 | extern int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, |
128 | enum pci_mmap_state mmap_state, int write_combine); | 138 | enum pci_mmap_state mmap_state, int write_combine); |
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/pgtable.h b/include/asm-x86_64/pgtable.h index db2a0efbf573..4eec176c3c39 100644 --- a/include/asm-x86_64/pgtable.h +++ b/include/asm-x86_64/pgtable.h | |||
@@ -253,6 +253,7 @@ extern inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; | |||
253 | extern inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_RW; } | 253 | extern inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_RW; } |
254 | static inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE; } | 254 | static inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE; } |
255 | 255 | ||
256 | #define __LARGE_PTE (_PAGE_PSE|_PAGE_PRESENT) | ||
256 | extern inline pte_t pte_rdprotect(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_USER)); return pte; } | 257 | extern inline pte_t pte_rdprotect(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_USER)); return pte; } |
257 | extern inline pte_t pte_exprotect(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_USER)); return pte; } | 258 | extern inline pte_t pte_exprotect(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_USER)); return pte; } |
258 | extern inline pte_t pte_mkclean(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_DIRTY)); return pte; } | 259 | extern inline pte_t pte_mkclean(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_DIRTY)); return pte; } |
@@ -263,6 +264,7 @@ extern inline pte_t pte_mkexec(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _ | |||
263 | extern inline pte_t pte_mkdirty(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _PAGE_DIRTY)); return pte; } | 264 | extern inline pte_t pte_mkdirty(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _PAGE_DIRTY)); return pte; } |
264 | extern inline pte_t pte_mkyoung(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _PAGE_ACCESSED)); return pte; } | 265 | extern inline pte_t pte_mkyoung(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _PAGE_ACCESSED)); return pte; } |
265 | extern inline pte_t pte_mkwrite(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _PAGE_RW)); return pte; } | 266 | extern inline pte_t pte_mkwrite(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _PAGE_RW)); return pte; } |
267 | extern inline pte_t pte_mkhuge(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | __LARGE_PTE)); return pte; } | ||
266 | 268 | ||
267 | struct vm_area_struct; | 269 | struct vm_area_struct; |
268 | 270 | ||
@@ -290,7 +292,6 @@ static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr, | |||
290 | */ | 292 | */ |
291 | #define pgprot_noncached(prot) (__pgprot(pgprot_val(prot) | _PAGE_PCD | _PAGE_PWT)) | 293 | #define pgprot_noncached(prot) (__pgprot(pgprot_val(prot) | _PAGE_PCD | _PAGE_PWT)) |
292 | 294 | ||
293 | #define __LARGE_PTE (_PAGE_PSE|_PAGE_PRESENT) | ||
294 | static inline int pmd_large(pmd_t pte) { | 295 | static inline int pmd_large(pmd_t pte) { |
295 | return (pmd_val(pte) & __LARGE_PTE) == __LARGE_PTE; | 296 | return (pmd_val(pte) & __LARGE_PTE) == __LARGE_PTE; |
296 | } | 297 | } |
diff --git a/include/asm-x86_64/processor.h b/include/asm-x86_64/processor.h index d641b19f6da5..106f666517bb 100644 --- a/include/asm-x86_64/processor.h +++ b/include/asm-x86_64/processor.h | |||
@@ -160,16 +160,17 @@ static inline void clear_in_cr4 (unsigned long mask) | |||
160 | /* | 160 | /* |
161 | * User space process size. 47bits minus one guard page. | 161 | * User space process size. 47bits minus one guard page. |
162 | */ | 162 | */ |
163 | #define TASK_SIZE (0x800000000000UL - 4096) | 163 | #define TASK_SIZE64 (0x800000000000UL - 4096) |
164 | 164 | ||
165 | /* This decides where the kernel will search for a free chunk of vm | 165 | /* This decides where the kernel will search for a free chunk of vm |
166 | * space during mmap's. | 166 | * space during mmap's. |
167 | */ | 167 | */ |
168 | #define IA32_PAGE_OFFSET ((current->personality & ADDR_LIMIT_3GB) ? 0xc0000000 : 0xFFFFe000) | 168 | #define IA32_PAGE_OFFSET ((current->personality & ADDR_LIMIT_3GB) ? 0xc0000000 : 0xFFFFe000) |
169 | #define TASK_UNMAPPED_32 PAGE_ALIGN(IA32_PAGE_OFFSET/3) | 169 | |
170 | #define TASK_UNMAPPED_64 PAGE_ALIGN(TASK_SIZE/3) | 170 | #define TASK_SIZE (test_thread_flag(TIF_IA32) ? IA32_PAGE_OFFSET : TASK_SIZE64) |
171 | #define TASK_UNMAPPED_BASE \ | 171 | #define TASK_SIZE_OF(child) ((test_tsk_thread_flag(child, TIF_IA32)) ? IA32_PAGE_OFFSET : TASK_SIZE64) |
172 | (test_thread_flag(TIF_IA32) ? TASK_UNMAPPED_32 : TASK_UNMAPPED_64) | 172 | |
173 | #define TASK_UNMAPPED_BASE PAGE_ALIGN(TASK_SIZE/3) | ||
173 | 174 | ||
174 | /* | 175 | /* |
175 | * Size of io_bitmap. | 176 | * Size of io_bitmap. |
@@ -279,6 +280,14 @@ struct thread_struct { | |||
279 | set_fs(USER_DS); \ | 280 | set_fs(USER_DS); \ |
280 | } while(0) | 281 | } while(0) |
281 | 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 | |||
282 | struct task_struct; | 291 | struct task_struct; |
283 | struct mm_struct; | 292 | struct mm_struct; |
284 | 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) |
86 | extern unsigned long profile_pc(struct pt_regs *regs); | 87 | extern unsigned long profile_pc(struct pt_regs *regs); |
87 | void signal_fault(struct pt_regs *regs, void __user *frame, char *where); | 88 | void signal_fault(struct pt_regs *regs, void __user *frame, char *where); |
diff --git a/include/asm-x86_64/serial.h b/include/asm-x86_64/serial.h index dbab232044cd..dc752eafa681 100644 --- a/include/asm-x86_64/serial.h +++ b/include/asm-x86_64/serial.h | |||
@@ -22,109 +22,9 @@ | |||
22 | #define STD_COM4_FLAGS ASYNC_BOOT_AUTOCONF | 22 | #define STD_COM4_FLAGS ASYNC_BOOT_AUTOCONF |
23 | #endif | 23 | #endif |
24 | 24 | ||
25 | #ifdef CONFIG_SERIAL_MANY_PORTS | 25 | #define SERIAL_PORT_DFNS \ |
26 | #define FOURPORT_FLAGS ASYNC_FOURPORT | ||
27 | #define ACCENT_FLAGS 0 | ||
28 | #define BOCA_FLAGS 0 | ||
29 | #define HUB6_FLAGS 0 | ||
30 | #endif | ||
31 | |||
32 | #define MCA_COM_FLAGS (STD_COM_FLAGS|ASYNC_BOOT_ONLYMCA) | ||
33 | |||
34 | /* | ||
35 | * The following define the access methods for the HUB6 card. All | ||
36 | * access is through two ports for all 24 possible chips. The card is | ||
37 | * selected through the high 2 bits, the port on that card with the | ||
38 | * "middle" 3 bits, and the register on that port with the bottom | ||
39 | * 3 bits. | ||
40 | * | ||
41 | * While the access port and interrupt is configurable, the default | ||
42 | * port locations are 0x302 for the port control register, and 0x303 | ||
43 | * for the data read/write register. Normally, the interrupt is at irq3 | ||
44 | * but can be anything from 3 to 7 inclusive. Note that using 3 will | ||
45 | * require disabling com2. | ||
46 | */ | ||
47 | |||
48 | #define C_P(card,port) (((card)<<6|(port)<<3) + 1) | ||
49 | |||
50 | #define STD_SERIAL_PORT_DEFNS \ | ||
51 | /* UART CLK PORT IRQ FLAGS */ \ | 26 | /* UART CLK PORT IRQ FLAGS */ \ |
52 | { 0, BASE_BAUD, 0x3F8, 4, STD_COM_FLAGS }, /* ttyS0 */ \ | 27 | { 0, BASE_BAUD, 0x3F8, 4, STD_COM_FLAGS }, /* ttyS0 */ \ |
53 | { 0, BASE_BAUD, 0x2F8, 3, STD_COM_FLAGS }, /* ttyS1 */ \ | 28 | { 0, BASE_BAUD, 0x2F8, 3, STD_COM_FLAGS }, /* ttyS1 */ \ |
54 | { 0, BASE_BAUD, 0x3E8, 4, STD_COM_FLAGS }, /* ttyS2 */ \ | 29 | { 0, BASE_BAUD, 0x3E8, 4, STD_COM_FLAGS }, /* ttyS2 */ \ |
55 | { 0, BASE_BAUD, 0x2E8, 3, STD_COM4_FLAGS }, /* ttyS3 */ | 30 | { 0, BASE_BAUD, 0x2E8, 3, STD_COM4_FLAGS }, /* ttyS3 */ |
56 | |||
57 | |||
58 | #ifdef CONFIG_SERIAL_MANY_PORTS | ||
59 | #define EXTRA_SERIAL_PORT_DEFNS \ | ||
60 | { 0, BASE_BAUD, 0x1A0, 9, FOURPORT_FLAGS }, /* ttyS4 */ \ | ||
61 | { 0, BASE_BAUD, 0x1A8, 9, FOURPORT_FLAGS }, /* ttyS5 */ \ | ||
62 | { 0, BASE_BAUD, 0x1B0, 9, FOURPORT_FLAGS }, /* ttyS6 */ \ | ||
63 | { 0, BASE_BAUD, 0x1B8, 9, FOURPORT_FLAGS }, /* ttyS7 */ \ | ||
64 | { 0, BASE_BAUD, 0x2A0, 5, FOURPORT_FLAGS }, /* ttyS8 */ \ | ||
65 | { 0, BASE_BAUD, 0x2A8, 5, FOURPORT_FLAGS }, /* ttyS9 */ \ | ||
66 | { 0, BASE_BAUD, 0x2B0, 5, FOURPORT_FLAGS }, /* ttyS10 */ \ | ||
67 | { 0, BASE_BAUD, 0x2B8, 5, FOURPORT_FLAGS }, /* ttyS11 */ \ | ||
68 | { 0, BASE_BAUD, 0x330, 4, ACCENT_FLAGS }, /* ttyS12 */ \ | ||
69 | { 0, BASE_BAUD, 0x338, 4, ACCENT_FLAGS }, /* ttyS13 */ \ | ||
70 | { 0, BASE_BAUD, 0x000, 0, 0 }, /* ttyS14 (spare) */ \ | ||
71 | { 0, BASE_BAUD, 0x000, 0, 0 }, /* ttyS15 (spare) */ \ | ||
72 | { 0, BASE_BAUD, 0x100, 12, BOCA_FLAGS }, /* ttyS16 */ \ | ||
73 | { 0, BASE_BAUD, 0x108, 12, BOCA_FLAGS }, /* ttyS17 */ \ | ||
74 | { 0, BASE_BAUD, 0x110, 12, BOCA_FLAGS }, /* ttyS18 */ \ | ||
75 | { 0, BASE_BAUD, 0x118, 12, BOCA_FLAGS }, /* ttyS19 */ \ | ||
76 | { 0, BASE_BAUD, 0x120, 12, BOCA_FLAGS }, /* ttyS20 */ \ | ||
77 | { 0, BASE_BAUD, 0x128, 12, BOCA_FLAGS }, /* ttyS21 */ \ | ||
78 | { 0, BASE_BAUD, 0x130, 12, BOCA_FLAGS }, /* ttyS22 */ \ | ||
79 | { 0, BASE_BAUD, 0x138, 12, BOCA_FLAGS }, /* ttyS23 */ \ | ||
80 | { 0, BASE_BAUD, 0x140, 12, BOCA_FLAGS }, /* ttyS24 */ \ | ||
81 | { 0, BASE_BAUD, 0x148, 12, BOCA_FLAGS }, /* ttyS25 */ \ | ||
82 | { 0, BASE_BAUD, 0x150, 12, BOCA_FLAGS }, /* ttyS26 */ \ | ||
83 | { 0, BASE_BAUD, 0x158, 12, BOCA_FLAGS }, /* ttyS27 */ \ | ||
84 | { 0, BASE_BAUD, 0x160, 12, BOCA_FLAGS }, /* ttyS28 */ \ | ||
85 | { 0, BASE_BAUD, 0x168, 12, BOCA_FLAGS }, /* ttyS29 */ \ | ||
86 | { 0, BASE_BAUD, 0x170, 12, BOCA_FLAGS }, /* ttyS30 */ \ | ||
87 | { 0, BASE_BAUD, 0x178, 12, BOCA_FLAGS }, /* ttyS31 */ | ||
88 | #else | ||
89 | #define EXTRA_SERIAL_PORT_DEFNS | ||
90 | #endif | ||
91 | |||
92 | /* You can have up to four HUB6's in the system, but I've only | ||
93 | * included two cards here for a total of twelve ports. | ||
94 | */ | ||
95 | #if (defined(CONFIG_HUB6) && defined(CONFIG_SERIAL_MANY_PORTS)) | ||
96 | #define HUB6_SERIAL_PORT_DFNS \ | ||
97 | { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,0) }, /* ttyS32 */ \ | ||
98 | { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,1) }, /* ttyS33 */ \ | ||
99 | { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,2) }, /* ttyS34 */ \ | ||
100 | { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,3) }, /* ttyS35 */ \ | ||
101 | { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,4) }, /* ttyS36 */ \ | ||
102 | { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,5) }, /* ttyS37 */ \ | ||
103 | { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,0) }, /* ttyS38 */ \ | ||
104 | { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,1) }, /* ttyS39 */ \ | ||
105 | { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,2) }, /* ttyS40 */ \ | ||
106 | { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,3) }, /* ttyS41 */ \ | ||
107 | { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,4) }, /* ttyS42 */ \ | ||
108 | { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,5) }, /* ttyS43 */ | ||
109 | #else | ||
110 | #define HUB6_SERIAL_PORT_DFNS | ||
111 | #endif | ||
112 | |||
113 | #ifdef CONFIG_MCA | ||
114 | #define MCA_SERIAL_PORT_DFNS \ | ||
115 | { 0, BASE_BAUD, 0x3220, 3, MCA_COM_FLAGS }, \ | ||
116 | { 0, BASE_BAUD, 0x3228, 3, MCA_COM_FLAGS }, \ | ||
117 | { 0, BASE_BAUD, 0x4220, 3, MCA_COM_FLAGS }, \ | ||
118 | { 0, BASE_BAUD, 0x4228, 3, MCA_COM_FLAGS }, \ | ||
119 | { 0, BASE_BAUD, 0x5220, 3, MCA_COM_FLAGS }, \ | ||
120 | { 0, BASE_BAUD, 0x5228, 3, MCA_COM_FLAGS }, | ||
121 | #else | ||
122 | #define MCA_SERIAL_PORT_DFNS | ||
123 | #endif | ||
124 | |||
125 | #define SERIAL_PORT_DFNS \ | ||
126 | STD_SERIAL_PORT_DEFNS \ | ||
127 | EXTRA_SERIAL_PORT_DEFNS \ | ||
128 | HUB6_SERIAL_PORT_DFNS \ | ||
129 | MCA_SERIAL_PORT_DFNS | ||
130 | |||
diff --git a/include/asm-x86_64/smp.h b/include/asm-x86_64/smp.h index 96844fecbde8..aeb1b73e21e1 100644 --- a/include/asm-x86_64/smp.h +++ b/include/asm-x86_64/smp.h | |||
@@ -43,6 +43,8 @@ extern cpumask_t cpu_callout_map; | |||
43 | extern void smp_alloc_memory(void); | 43 | extern void smp_alloc_memory(void); |
44 | extern volatile unsigned long smp_invalidate_needed; | 44 | extern volatile unsigned long smp_invalidate_needed; |
45 | extern int pic_mode; | 45 | extern int pic_mode; |
46 | extern void lock_ipi_call_lock(void); | ||
47 | extern void unlock_ipi_call_lock(void); | ||
46 | extern int smp_num_siblings; | 48 | extern int smp_num_siblings; |
47 | extern void smp_flush_tlb(void); | 49 | extern void smp_flush_tlb(void); |
48 | extern void smp_message_irq(int cpl, void *dev_id, struct pt_regs *regs); | 50 | extern void smp_message_irq(int cpl, void *dev_id, struct pt_regs *regs); |
@@ -68,7 +70,7 @@ static inline int num_booting_cpus(void) | |||
68 | return cpus_weight(cpu_callout_map); | 70 | return cpus_weight(cpu_callout_map); |
69 | } | 71 | } |
70 | 72 | ||
71 | #define __smp_processor_id() read_pda(cpunumber) | 73 | #define raw_smp_processor_id() read_pda(cpunumber) |
72 | 74 | ||
73 | extern __inline int hard_smp_processor_id(void) | 75 | extern __inline int hard_smp_processor_id(void) |
74 | { | 76 | { |
@@ -77,6 +79,8 @@ extern __inline int hard_smp_processor_id(void) | |||
77 | } | 79 | } |
78 | 80 | ||
79 | extern int safe_smp_processor_id(void); | 81 | extern int safe_smp_processor_id(void); |
82 | extern int __cpu_disable(void); | ||
83 | extern void __cpu_die(unsigned int cpu); | ||
80 | 84 | ||
81 | #endif /* !ASSEMBLY */ | 85 | #endif /* !ASSEMBLY */ |
82 | 86 | ||
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 | |||
22 | extern 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/suspend.h b/include/asm-x86_64/suspend.h index ec745807feae..bb9f40597d09 100644 --- a/include/asm-x86_64/suspend.h +++ b/include/asm-x86_64/suspend.h | |||
@@ -16,7 +16,7 @@ arch_prepare_suspend(void) | |||
16 | struct saved_context { | 16 | struct saved_context { |
17 | u16 ds, es, fs, gs, ss; | 17 | u16 ds, es, fs, gs, ss; |
18 | unsigned long gs_base, gs_kernel_base, fs_base; | 18 | unsigned long gs_base, gs_kernel_base, fs_base; |
19 | unsigned long cr0, cr2, cr3, cr4; | 19 | unsigned long cr0, cr2, cr3, cr4, cr8; |
20 | u16 gdt_pad; | 20 | u16 gdt_pad; |
21 | u16 gdt_limit; | 21 | u16 gdt_limit; |
22 | unsigned long gdt_base; | 22 | unsigned long gdt_base; |
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 | ||
27 | extern unsigned int cpu_khz; | 27 | extern unsigned int cpu_khz; |
28 | 28 | ||
29 | extern int read_current_timer(unsigned long *timer_value); | ||
30 | #define ARCH_HAS_READ_CURRENT_TIMER 1 | ||
31 | |||
29 | extern struct vxtime_data vxtime; | 32 | extern struct vxtime_data vxtime; |
30 | 33 | ||
31 | #endif | 34 | #endif |
diff --git a/include/asm-x86_64/tlbflush.h b/include/asm-x86_64/tlbflush.h index 2e811ac262af..061742382520 100644 --- a/include/asm-x86_64/tlbflush.h +++ b/include/asm-x86_64/tlbflush.h | |||
@@ -22,16 +22,18 @@ | |||
22 | */ | 22 | */ |
23 | #define __flush_tlb_global() \ | 23 | #define __flush_tlb_global() \ |
24 | do { \ | 24 | do { \ |
25 | unsigned long tmpreg; \ | 25 | unsigned long tmpreg, cr4, cr4_orig; \ |
26 | \ | 26 | \ |
27 | __asm__ __volatile__( \ | 27 | __asm__ __volatile__( \ |
28 | "movq %1, %%cr4; # turn off PGE \n" \ | 28 | "movq %%cr4, %2; # turn off PGE \n" \ |
29 | "movq %2, %1; \n" \ | ||
30 | "andq %3, %1; \n" \ | ||
31 | "movq %1, %%cr4; \n" \ | ||
29 | "movq %%cr3, %0; # flush TLB \n" \ | 32 | "movq %%cr3, %0; # flush TLB \n" \ |
30 | "movq %0, %%cr3; \n" \ | 33 | "movq %0, %%cr3; \n" \ |
31 | "movq %2, %%cr4; # turn PGE back on \n" \ | 34 | "movq %2, %%cr4; # turn PGE back on \n" \ |
32 | : "=&r" (tmpreg) \ | 35 | : "=&r" (tmpreg), "=&r" (cr4), "=&r" (cr4_orig) \ |
33 | : "r" (mmu_cr4_features & ~X86_CR4_PGE), \ | 36 | : "i" (~X86_CR4_PGE) \ |
34 | "r" (mmu_cr4_features) \ | ||
35 | : "memory"); \ | 37 | : "memory"); \ |
36 | } while (0) | 38 | } while (0) |
37 | 39 | ||
diff --git a/include/asm-x86_64/topology.h b/include/asm-x86_64/topology.h index 67f24e0ea819..c1bc3fad482e 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 @@ | |||
13 | extern cpumask_t cpu_online_map; | 13 | extern cpumask_t cpu_online_map; |
14 | 14 | ||
15 | extern unsigned char cpu_to_node[]; | 15 | extern unsigned char cpu_to_node[]; |
16 | extern unsigned char pci_bus_to_node[]; | ||
16 | extern cpumask_t node_to_cpumask[]; | 17 | extern cpumask_t node_to_cpumask[]; |
17 | extern cpumask_t pci_bus_to_cpumask[]; | ||
18 | 18 | ||
19 | #ifdef CONFIG_ACPI_NUMA | 19 | #ifdef CONFIG_ACPI_NUMA |
20 | extern int __node_distance(int, int); | 20 | extern 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 | ||
30 | static 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, \ |
@@ -48,18 +39,21 @@ static inline cpumask_t __pcibus_to_cpumask(int bus) | |||
48 | .busy_factor = 32, \ | 39 | .busy_factor = 32, \ |
49 | .imbalance_pct = 125, \ | 40 | .imbalance_pct = 125, \ |
50 | .cache_hot_time = (10*1000000), \ | 41 | .cache_hot_time = (10*1000000), \ |
51 | .cache_nice_tries = 1, \ | 42 | .cache_nice_tries = 2, \ |
43 | .busy_idx = 3, \ | ||
44 | .idle_idx = 2, \ | ||
45 | .newidle_idx = 0, \ | ||
46 | .wake_idx = 1, \ | ||
47 | .forkexec_idx = 1, \ | ||
52 | .per_cpu_gain = 100, \ | 48 | .per_cpu_gain = 100, \ |
53 | .flags = SD_LOAD_BALANCE \ | 49 | .flags = SD_LOAD_BALANCE \ |
54 | | SD_BALANCE_NEWIDLE \ | 50 | | SD_BALANCE_FORK \ |
55 | | SD_BALANCE_EXEC \ | 51 | | SD_BALANCE_EXEC \ |
56 | | SD_WAKE_IDLE \ | ||
57 | | SD_WAKE_BALANCE, \ | 52 | | SD_WAKE_BALANCE, \ |
58 | .last_balance = jiffies, \ | 53 | .last_balance = jiffies, \ |
59 | .balance_interval = 1, \ | 54 | .balance_interval = 1, \ |
60 | .nr_balance_failed = 0, \ | 55 | .nr_balance_failed = 0, \ |
61 | } | 56 | } |
62 | #endif | ||
63 | 57 | ||
64 | #endif | 58 | #endif |
65 | 59 | ||
diff --git a/include/asm-x86_64/unistd.h b/include/asm-x86_64/unistd.h index 3c9af6fd4332..6560439a83e4 100644 --- a/include/asm-x86_64/unistd.h +++ b/include/asm-x86_64/unistd.h | |||
@@ -552,7 +552,7 @@ __SYSCALL(__NR_mq_notify, sys_mq_notify) | |||
552 | #define __NR_mq_getsetattr 245 | 552 | #define __NR_mq_getsetattr 245 |
553 | __SYSCALL(__NR_mq_getsetattr, sys_mq_getsetattr) | 553 | __SYSCALL(__NR_mq_getsetattr, sys_mq_getsetattr) |
554 | #define __NR_kexec_load 246 | 554 | #define __NR_kexec_load 246 |
555 | __SYSCALL(__NR_kexec_load, sys_ni_syscall) | 555 | __SYSCALL(__NR_kexec_load, sys_kexec_load) |
556 | #define __NR_waitid 247 | 556 | #define __NR_waitid 247 |
557 | __SYSCALL(__NR_waitid, sys_waitid) | 557 | __SYSCALL(__NR_waitid, sys_waitid) |
558 | #define __NR_add_key 248 | 558 | #define __NR_add_key 248 |
@@ -561,8 +561,12 @@ __SYSCALL(__NR_add_key, sys_add_key) | |||
561 | __SYSCALL(__NR_request_key, sys_request_key) | 561 | __SYSCALL(__NR_request_key, sys_request_key) |
562 | #define __NR_keyctl 250 | 562 | #define __NR_keyctl 250 |
563 | __SYSCALL(__NR_keyctl, sys_keyctl) | 563 | __SYSCALL(__NR_keyctl, sys_keyctl) |
564 | #define __NR_ioprio_set 251 | ||
565 | __SYSCALL(__NR_ioprio_set, sys_ioprio_set) | ||
566 | #define __NR_ioprio_get 252 | ||
567 | __SYSCALL(__NR_ioprio_get, sys_ioprio_get) | ||
564 | 568 | ||
565 | #define __NR_syscall_max __NR_keyctl | 569 | #define __NR_syscall_max __NR_ioprio_get |
566 | #ifndef __NO_STUBS | 570 | #ifndef __NO_STUBS |
567 | 571 | ||
568 | /* user-visible error numbers are in the range -1 - -4095 */ | 572 | /* user-visible error numbers are in the range -1 - -4095 */ |