aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86_64
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2005-07-30 01:55:32 -0400
committerLen Brown <len.brown@intel.com>2005-07-30 01:55:32 -0400
commitadbedd34244e2b054557002817f979a9b004a405 (patch)
tree78e4a524e84f8b3e23ae8b49ac689048584e4668 /include/asm-x86_64
parentd6ac1a7910d22626bc77e73db091e00b810715f4 (diff)
parentb0825488a642cadcf39709961dde61440cb0731c (diff)
merge 2.6.13-rc4 with ACPI's to-linus tree
Diffstat (limited to 'include/asm-x86_64')
-rw-r--r--include/asm-x86_64/bitops.h3
-rw-r--r--include/asm-x86_64/bug.h13
-rw-r--r--include/asm-x86_64/desc.h1
-rw-r--r--include/asm-x86_64/ipi.h45
-rw-r--r--include/asm-x86_64/irq.h2
-rw-r--r--include/asm-x86_64/msr.h2
-rw-r--r--include/asm-x86_64/pgtable.h2
-rw-r--r--include/asm-x86_64/smp.h6
-rw-r--r--include/asm-x86_64/system.h7
-rw-r--r--include/asm-x86_64/tlbflush.h9
10 files changed, 49 insertions, 41 deletions
diff --git a/include/asm-x86_64/bitops.h b/include/asm-x86_64/bitops.h
index a31bb99be53f..05a0d374404b 100644
--- a/include/asm-x86_64/bitops.h
+++ b/include/asm-x86_64/bitops.h
@@ -348,8 +348,7 @@ static inline int sched_find_first_bit(const unsigned long *b)
348 return __ffs(b[0]); 348 return __ffs(b[0]);
349 if (b[1]) 349 if (b[1])
350 return __ffs(b[1]) + 64; 350 return __ffs(b[1]) + 64;
351 if (b[2]) 351 return __ffs(b[2]) + 128;
352 return __ffs(b[2]) + 128;
353} 352}
354 353
355/** 354/**
diff --git a/include/asm-x86_64/bug.h b/include/asm-x86_64/bug.h
index 3d2a666a5dd5..eed785667289 100644
--- a/include/asm-x86_64/bug.h
+++ b/include/asm-x86_64/bug.h
@@ -8,17 +8,24 @@
8 * this frame. 8 * this frame.
9 */ 9 */
10struct bug_frame { 10struct bug_frame {
11 unsigned char ud2[2]; 11 unsigned char ud2[2];
12 unsigned char mov;
12 /* should use 32bit offset instead, but the assembler doesn't 13 /* should use 32bit offset instead, but the assembler doesn't
13 like it */ 14 like it */
14 char *filename; 15 char *filename;
16 unsigned char ret;
15 unsigned short line; 17 unsigned short line;
16} __attribute__((packed)); 18} __attribute__((packed));
17 19
18#ifdef CONFIG_BUG 20#ifdef CONFIG_BUG
19#define HAVE_ARCH_BUG 21#define HAVE_ARCH_BUG
20#define BUG() \ 22/* We turn the bug frame into valid instructions to not confuse
21 asm volatile("ud2 ; .quad %c1 ; .short %c0" :: \ 23 the disassembler. Thanks to Jan Beulich & Suresh Siddha
24 for nice instruction selection.
25 The magic numbers generate mov $64bitimm,%eax ; ret $offset. */
26#define BUG() \
27 asm volatile( \
28 "ud2 ; .byte 0xa3 ; .quad %c1 ; .byte 0xc2 ; .short %c0" :: \
22 "i"(__LINE__), "i" (__stringify(__FILE__))) 29 "i"(__LINE__), "i" (__stringify(__FILE__)))
23void out_of_line_bug(void); 30void out_of_line_bug(void);
24#else 31#else
diff --git a/include/asm-x86_64/desc.h b/include/asm-x86_64/desc.h
index 6aefb9c0280d..c89b58bebee2 100644
--- a/include/asm-x86_64/desc.h
+++ b/include/asm-x86_64/desc.h
@@ -75,6 +75,7 @@ struct desc_ptr {
75 */ 75 */
76extern struct desc_struct default_ldt[]; 76extern struct desc_struct default_ldt[];
77extern struct gate_struct idt_table[]; 77extern struct gate_struct idt_table[];
78extern struct desc_ptr cpu_gdt_descr[];
78 79
79static inline void _set_gate(void *adr, unsigned type, unsigned long func, unsigned dpl, unsigned ist) 80static inline void _set_gate(void *adr, unsigned type, unsigned long func, unsigned dpl, unsigned ist)
80{ 81{
diff --git a/include/asm-x86_64/ipi.h b/include/asm-x86_64/ipi.h
index d1841847ed89..5e166b9d3bde 100644
--- a/include/asm-x86_64/ipi.h
+++ b/include/asm-x86_64/ipi.h
@@ -82,30 +82,27 @@ static inline void send_IPI_mask_sequence(cpumask_t mask, int vector)
82 */ 82 */
83 local_irq_save(flags); 83 local_irq_save(flags);
84 84
85 for (query_cpu = 0; query_cpu < NR_CPUS; ++query_cpu) { 85 for_each_cpu_mask(query_cpu, mask) {
86 if (cpu_isset(query_cpu, mask)) { 86 /*
87 87 * Wait for idle.
88 /* 88 */
89 * Wait for idle. 89 apic_wait_icr_idle();
90 */ 90
91 apic_wait_icr_idle(); 91 /*
92 92 * prepare target chip field
93 /* 93 */
94 * prepare target chip field 94 cfg = __prepare_ICR2(x86_cpu_to_apicid[query_cpu]);
95 */ 95 apic_write_around(APIC_ICR2, cfg);
96 cfg = __prepare_ICR2(x86_cpu_to_apicid[query_cpu]); 96
97 apic_write_around(APIC_ICR2, cfg); 97 /*
98 98 * program the ICR
99 /* 99 */
100 * program the ICR 100 cfg = __prepare_ICR(0, vector, APIC_DEST_PHYSICAL);
101 */ 101
102 cfg = __prepare_ICR(0, vector, APIC_DEST_PHYSICAL); 102 /*
103 103 * Send the IPI. The write to APIC_ICR fires this off.
104 /* 104 */
105 * Send the IPI. The write to APIC_ICR fires this off. 105 apic_write_around(APIC_ICR, cfg);
106 */
107 apic_write_around(APIC_ICR, cfg);
108 }
109 } 106 }
110 local_irq_restore(flags); 107 local_irq_restore(flags);
111} 108}
diff --git a/include/asm-x86_64/irq.h b/include/asm-x86_64/irq.h
index eb3b7aa9eb9f..4482657777bb 100644
--- a/include/asm-x86_64/irq.h
+++ b/include/asm-x86_64/irq.h
@@ -57,4 +57,6 @@ int handle_IRQ_event(unsigned int, struct pt_regs *, struct irqaction *);
57extern void fixup_irqs(cpumask_t map); 57extern void fixup_irqs(cpumask_t map);
58#endif 58#endif
59 59
60#define __ARCH_HAS_DO_SOFTIRQ 1
61
60#endif /* _ASM_IRQ_H */ 62#endif /* _ASM_IRQ_H */
diff --git a/include/asm-x86_64/msr.h b/include/asm-x86_64/msr.h
index bc700232728d..ba15279a79d0 100644
--- a/include/asm-x86_64/msr.h
+++ b/include/asm-x86_64/msr.h
@@ -218,7 +218,7 @@ extern inline unsigned int cpuid_edx(unsigned int op)
218#define MSR_K7_PERFCTR3 0xC0010007 218#define MSR_K7_PERFCTR3 0xC0010007
219#define MSR_K8_TOP_MEM1 0xC001001A 219#define MSR_K8_TOP_MEM1 0xC001001A
220#define MSR_K8_TOP_MEM2 0xC001001D 220#define MSR_K8_TOP_MEM2 0xC001001D
221#define MSR_K8_SYSCFG 0xC0000010 221#define MSR_K8_SYSCFG 0xC0010010
222 222
223/* K6 MSRs */ 223/* K6 MSRs */
224#define MSR_K6_EFER 0xC0000080 224#define MSR_K6_EFER 0xC0000080
diff --git a/include/asm-x86_64/pgtable.h b/include/asm-x86_64/pgtable.h
index 4eec176c3c39..4e167b5ea8f3 100644
--- a/include/asm-x86_64/pgtable.h
+++ b/include/asm-x86_64/pgtable.h
@@ -176,6 +176,8 @@ extern inline void pgd_clear (pgd_t * pgd)
176 (_PAGE_PRESENT | _PAGE_USER | _PAGE_ACCESSED | _PAGE_PCD) 176 (_PAGE_PRESENT | _PAGE_USER | _PAGE_ACCESSED | _PAGE_PCD)
177#define __PAGE_KERNEL_LARGE \ 177#define __PAGE_KERNEL_LARGE \
178 (__PAGE_KERNEL | _PAGE_PSE) 178 (__PAGE_KERNEL | _PAGE_PSE)
179#define __PAGE_KERNEL_LARGE_EXEC \
180 (__PAGE_KERNEL_EXEC | _PAGE_PSE)
179 181
180#define MAKE_GLOBAL(x) __pgprot((x) | _PAGE_GLOBAL) 182#define MAKE_GLOBAL(x) __pgprot((x) | _PAGE_GLOBAL)
181 183
diff --git a/include/asm-x86_64/smp.h b/include/asm-x86_64/smp.h
index aeb1b73e21e1..de8b57b2b62b 100644
--- a/include/asm-x86_64/smp.h
+++ b/include/asm-x86_64/smp.h
@@ -46,12 +46,12 @@ extern int pic_mode;
46extern void lock_ipi_call_lock(void); 46extern void lock_ipi_call_lock(void);
47extern void unlock_ipi_call_lock(void); 47extern void unlock_ipi_call_lock(void);
48extern int smp_num_siblings; 48extern int smp_num_siblings;
49extern void smp_flush_tlb(void);
50extern void smp_message_irq(int cpl, void *dev_id, struct pt_regs *regs);
51extern void smp_send_reschedule(int cpu); 49extern void smp_send_reschedule(int cpu);
52extern void smp_invalidate_rcv(void); /* Process an NMI */
53extern void zap_low_mappings(void); 50extern void zap_low_mappings(void);
54void smp_stop_cpu(void); 51void smp_stop_cpu(void);
52extern int smp_call_function_single(int cpuid, void (*func) (void *info),
53 void *info, int retry, int wait);
54
55extern cpumask_t cpu_sibling_map[NR_CPUS]; 55extern cpumask_t cpu_sibling_map[NR_CPUS];
56extern cpumask_t cpu_core_map[NR_CPUS]; 56extern cpumask_t cpu_core_map[NR_CPUS];
57extern u8 phys_proc_id[NR_CPUS]; 57extern u8 phys_proc_id[NR_CPUS];
diff --git a/include/asm-x86_64/system.h b/include/asm-x86_64/system.h
index 76165736e43a..8606e170a7dc 100644
--- a/include/asm-x86_64/system.h
+++ b/include/asm-x86_64/system.h
@@ -116,12 +116,12 @@ struct alt_instr {
116/* 116/*
117 * Alternative inline assembly with input. 117 * Alternative inline assembly with input.
118 * 118 *
119 * Pecularities: 119 * Peculiarities:
120 * No memory clobber here. 120 * No memory clobber here.
121 * Argument numbers start with 1. 121 * Argument numbers start with 1.
122 * Best is to use constraints that are fixed size (like (%1) ... "r") 122 * Best is to use constraints that are fixed size (like (%1) ... "r")
123 * If you use variable sized constraints like "m" or "g" in the 123 * If you use variable sized constraints like "m" or "g" in the
124 * replacement maake sure to pad to the worst case length. 124 * replacement make sure to pad to the worst case length.
125 */ 125 */
126#define alternative_input(oldinstr, newinstr, feature, input...) \ 126#define alternative_input(oldinstr, newinstr, feature, input...) \
127 asm volatile ("661:\n\t" oldinstr "\n662:\n" \ 127 asm volatile ("661:\n\t" oldinstr "\n662:\n" \
@@ -335,9 +335,6 @@ void cpu_idle_wait(void);
335void disable_hlt(void); 335void disable_hlt(void);
336void enable_hlt(void); 336void enable_hlt(void);
337 337
338#define HAVE_EAT_KEY
339void eat_key(void);
340
341extern unsigned long arch_align_stack(unsigned long sp); 338extern unsigned long arch_align_stack(unsigned long sp);
342 339
343#endif 340#endif
diff --git a/include/asm-x86_64/tlbflush.h b/include/asm-x86_64/tlbflush.h
index 061742382520..505b0cf906de 100644
--- a/include/asm-x86_64/tlbflush.h
+++ b/include/asm-x86_64/tlbflush.h
@@ -56,8 +56,9 @@ extern unsigned long pgkern_mask;
56 * - flush_tlb_kernel_range(start, end) flushes a range of kernel pages 56 * - flush_tlb_kernel_range(start, end) flushes a range of kernel pages
57 * - flush_tlb_pgtables(mm, start, end) flushes a range of page tables 57 * - flush_tlb_pgtables(mm, start, end) flushes a range of page tables
58 * 58 *
59 * ..but the x86_64 has somewhat limited tlb flushing capabilities, 59 * x86-64 can only flush individual pages or full VMs. For a range flush
60 * and page-granular flushes are available only on i486 and up. 60 * we always do the full VM. Might be worth trying if for a small
61 * range a few INVLPGs in a row are a win.
61 */ 62 */
62 63
63#ifndef CONFIG_SMP 64#ifndef CONFIG_SMP
@@ -115,7 +116,9 @@ static inline void flush_tlb_range(struct vm_area_struct * vma, unsigned long st
115static inline void flush_tlb_pgtables(struct mm_struct *mm, 116static inline void flush_tlb_pgtables(struct mm_struct *mm,
116 unsigned long start, unsigned long end) 117 unsigned long start, unsigned long end)
117{ 118{
118 /* x86_64 does not keep any page table caches in TLB */ 119 /* x86_64 does not keep any page table caches in a software TLB.
120 The CPUs do in their hardware TLBs, but they are handled
121 by the normal TLB flushing algorithms. */
119} 122}
120 123
121#endif /* _X8664_TLBFLUSH_H */ 124#endif /* _X8664_TLBFLUSH_H */