diff options
Diffstat (limited to 'include/asm-i386')
38 files changed, 296 insertions, 214 deletions
diff --git a/include/asm-i386/apic.h b/include/asm-i386/apic.h index a5810cf7b578..6a1b1882285c 100644 --- a/include/asm-i386/apic.h +++ b/include/asm-i386/apic.h | |||
@@ -5,6 +5,7 @@ | |||
5 | #include <linux/pm.h> | 5 | #include <linux/pm.h> |
6 | #include <asm/fixmap.h> | 6 | #include <asm/fixmap.h> |
7 | #include <asm/apicdef.h> | 7 | #include <asm/apicdef.h> |
8 | #include <asm/processor.h> | ||
8 | #include <asm/system.h> | 9 | #include <asm/system.h> |
9 | 10 | ||
10 | #define Dprintk(x...) | 11 | #define Dprintk(x...) |
@@ -16,8 +17,20 @@ | |||
16 | #define APIC_VERBOSE 1 | 17 | #define APIC_VERBOSE 1 |
17 | #define APIC_DEBUG 2 | 18 | #define APIC_DEBUG 2 |
18 | 19 | ||
20 | extern int enable_local_apic; | ||
19 | extern int apic_verbosity; | 21 | extern int apic_verbosity; |
20 | 22 | ||
23 | static inline void lapic_disable(void) | ||
24 | { | ||
25 | enable_local_apic = -1; | ||
26 | clear_bit(X86_FEATURE_APIC, boot_cpu_data.x86_capability); | ||
27 | } | ||
28 | |||
29 | static inline void lapic_enable(void) | ||
30 | { | ||
31 | enable_local_apic = 1; | ||
32 | } | ||
33 | |||
21 | /* | 34 | /* |
22 | * Define the default level of output to be very little | 35 | * Define the default level of output to be very little |
23 | * This can be turned up by using apic=verbose for more | 36 | * This can be turned up by using apic=verbose for more |
@@ -87,7 +100,7 @@ extern void (*wait_timer_tick)(void); | |||
87 | extern int get_maxlvt(void); | 100 | extern int get_maxlvt(void); |
88 | extern void clear_local_APIC(void); | 101 | extern void clear_local_APIC(void); |
89 | extern void connect_bsp_APIC (void); | 102 | extern void connect_bsp_APIC (void); |
90 | extern void disconnect_bsp_APIC (void); | 103 | extern void disconnect_bsp_APIC (int virt_wire_setup); |
91 | extern void disable_local_APIC (void); | 104 | extern void disable_local_APIC (void); |
92 | extern void lapic_shutdown (void); | 105 | extern void lapic_shutdown (void); |
93 | extern int verify_local_APIC (void); | 106 | extern int verify_local_APIC (void); |
diff --git a/include/asm-i386/apicdef.h b/include/asm-i386/apicdef.h index cb0a8bf530c2..a96a8f48fbfc 100644 --- a/include/asm-i386/apicdef.h +++ b/include/asm-i386/apicdef.h | |||
@@ -86,11 +86,12 @@ | |||
86 | #define APIC_LVT_REMOTE_IRR (1<<14) | 86 | #define APIC_LVT_REMOTE_IRR (1<<14) |
87 | #define APIC_INPUT_POLARITY (1<<13) | 87 | #define APIC_INPUT_POLARITY (1<<13) |
88 | #define APIC_SEND_PENDING (1<<12) | 88 | #define APIC_SEND_PENDING (1<<12) |
89 | #define APIC_MODE_MASK 0x700 | ||
89 | #define GET_APIC_DELIVERY_MODE(x) (((x)>>8)&0x7) | 90 | #define GET_APIC_DELIVERY_MODE(x) (((x)>>8)&0x7) |
90 | #define SET_APIC_DELIVERY_MODE(x,y) (((x)&~0x700)|((y)<<8)) | 91 | #define SET_APIC_DELIVERY_MODE(x,y) (((x)&~0x700)|((y)<<8)) |
91 | #define APIC_MODE_FIXED 0x0 | 92 | #define APIC_MODE_FIXED 0x0 |
92 | #define APIC_MODE_NMI 0x4 | 93 | #define APIC_MODE_NMI 0x4 |
93 | #define APIC_MODE_EXINT 0x7 | 94 | #define APIC_MODE_EXTINT 0x7 |
94 | #define APIC_LVT1 0x360 | 95 | #define APIC_LVT1 0x360 |
95 | #define APIC_LVTERR 0x370 | 96 | #define APIC_LVTERR 0x370 |
96 | #define APIC_TMICT 0x380 | 97 | #define APIC_TMICT 0x380 |
diff --git a/include/asm-i386/checksum.h b/include/asm-i386/checksum.h index 641342002bcd..f949e44c2a35 100644 --- a/include/asm-i386/checksum.h +++ b/include/asm-i386/checksum.h | |||
@@ -3,6 +3,8 @@ | |||
3 | 3 | ||
4 | #include <linux/in6.h> | 4 | #include <linux/in6.h> |
5 | 5 | ||
6 | #include <asm/uaccess.h> | ||
7 | |||
6 | /* | 8 | /* |
7 | * computes the checksum of a memory block at buff, length len, | 9 | * computes the checksum of a memory block at buff, length len, |
8 | * and adds in "sum" (32-bit) | 10 | * and adds in "sum" (32-bit) |
diff --git a/include/asm-i386/cpu.h b/include/asm-i386/cpu.h index 002740b21951..e7252c216ca8 100644 --- a/include/asm-i386/cpu.h +++ b/include/asm-i386/cpu.h | |||
@@ -5,6 +5,7 @@ | |||
5 | #include <linux/cpu.h> | 5 | #include <linux/cpu.h> |
6 | #include <linux/topology.h> | 6 | #include <linux/topology.h> |
7 | #include <linux/nodemask.h> | 7 | #include <linux/nodemask.h> |
8 | #include <linux/percpu.h> | ||
8 | 9 | ||
9 | #include <asm/node.h> | 10 | #include <asm/node.h> |
10 | 11 | ||
@@ -16,4 +17,5 @@ extern int arch_register_cpu(int num); | |||
16 | extern void arch_unregister_cpu(int); | 17 | extern void arch_unregister_cpu(int); |
17 | #endif | 18 | #endif |
18 | 19 | ||
20 | DECLARE_PER_CPU(int, cpu_state); | ||
19 | #endif /* _ASM_I386_CPU_H_ */ | 21 | #endif /* _ASM_I386_CPU_H_ */ |
diff --git a/include/asm-i386/genapic.h b/include/asm-i386/genapic.h index fc813b2e8274..b3783a32abee 100644 --- a/include/asm-i386/genapic.h +++ b/include/asm-i386/genapic.h | |||
@@ -78,7 +78,6 @@ struct genapic { | |||
78 | .int_delivery_mode = INT_DELIVERY_MODE, \ | 78 | .int_delivery_mode = INT_DELIVERY_MODE, \ |
79 | .int_dest_mode = INT_DEST_MODE, \ | 79 | .int_dest_mode = INT_DEST_MODE, \ |
80 | .no_balance_irq = NO_BALANCE_IRQ, \ | 80 | .no_balance_irq = NO_BALANCE_IRQ, \ |
81 | .no_ioapic_check = NO_IOAPIC_CHECK, \ | ||
82 | .ESR_DISABLE = esr_disable, \ | 81 | .ESR_DISABLE = esr_disable, \ |
83 | .apic_destination_logical = APIC_DEST_LOGICAL, \ | 82 | .apic_destination_logical = APIC_DEST_LOGICAL, \ |
84 | APICFUNC(apic_id_registered), \ | 83 | APICFUNC(apic_id_registered), \ |
diff --git a/include/asm-i386/highmem.h b/include/asm-i386/highmem.h index 1df42bf347df..0fd331306b60 100644 --- a/include/asm-i386/highmem.h +++ b/include/asm-i386/highmem.h | |||
@@ -70,6 +70,7 @@ void *kmap(struct page *page); | |||
70 | void kunmap(struct page *page); | 70 | void kunmap(struct page *page); |
71 | void *kmap_atomic(struct page *page, enum km_type type); | 71 | void *kmap_atomic(struct page *page, enum km_type type); |
72 | void kunmap_atomic(void *kvaddr, enum km_type type); | 72 | void kunmap_atomic(void *kvaddr, enum km_type type); |
73 | void *kmap_atomic_pfn(unsigned long pfn, enum km_type type); | ||
73 | struct page *kmap_atomic_to_page(void *ptr); | 74 | struct page *kmap_atomic_to_page(void *ptr); |
74 | 75 | ||
75 | #define flush_cache_kmaps() do { } while (0) | 76 | #define flush_cache_kmaps() do { } while (0) |
diff --git a/include/asm-i386/i8253.h b/include/asm-i386/i8253.h new file mode 100644 index 000000000000..015d8df07690 --- /dev/null +++ b/include/asm-i386/i8253.h | |||
@@ -0,0 +1,6 @@ | |||
1 | #ifndef __ASM_I8253_H__ | ||
2 | #define __ASM_I8253_H__ | ||
3 | |||
4 | extern spinlock_t i8253_lock; | ||
5 | |||
6 | #endif /* __ASM_I8253_H__ */ | ||
diff --git a/include/asm-i386/ide.h b/include/asm-i386/ide.h index 859ebf4da632..79dfab87135d 100644 --- a/include/asm-i386/ide.h +++ b/include/asm-i386/ide.h | |||
@@ -41,13 +41,17 @@ static __inline__ int ide_default_irq(unsigned long base) | |||
41 | 41 | ||
42 | static __inline__ unsigned long ide_default_io_base(int index) | 42 | static __inline__ unsigned long ide_default_io_base(int index) |
43 | { | 43 | { |
44 | if (pci_find_device(PCI_ANY_ID, PCI_ANY_ID, NULL) == NULL) { | ||
45 | switch(index) { | ||
46 | case 2: return 0x1e8; | ||
47 | case 3: return 0x168; | ||
48 | case 4: return 0x1e0; | ||
49 | case 5: return 0x160; | ||
50 | } | ||
51 | } | ||
44 | switch (index) { | 52 | switch (index) { |
45 | case 0: return 0x1f0; | 53 | case 0: return 0x1f0; |
46 | case 1: return 0x170; | 54 | case 1: return 0x170; |
47 | case 2: return 0x1e8; | ||
48 | case 3: return 0x168; | ||
49 | case 4: return 0x1e0; | ||
50 | case 5: return 0x160; | ||
51 | default: | 55 | default: |
52 | return 0; | 56 | return 0; |
53 | } | 57 | } |
diff --git a/include/asm-i386/irq.h b/include/asm-i386/irq.h index 05b9e61b0a72..270f1986b19f 100644 --- a/include/asm-i386/irq.h +++ b/include/asm-i386/irq.h | |||
@@ -29,13 +29,19 @@ extern void release_vm86_irqs(struct task_struct *); | |||
29 | 29 | ||
30 | #ifdef CONFIG_4KSTACKS | 30 | #ifdef CONFIG_4KSTACKS |
31 | extern void irq_ctx_init(int cpu); | 31 | extern void irq_ctx_init(int cpu); |
32 | extern void irq_ctx_exit(int cpu); | ||
32 | # define __ARCH_HAS_DO_SOFTIRQ | 33 | # define __ARCH_HAS_DO_SOFTIRQ |
33 | #else | 34 | #else |
34 | # define irq_ctx_init(cpu) do { } while (0) | 35 | # define irq_ctx_init(cpu) do { } while (0) |
36 | # define irq_ctx_exit(cpu) do { } while (0) | ||
35 | #endif | 37 | #endif |
36 | 38 | ||
37 | #ifdef CONFIG_IRQBALANCE | 39 | #ifdef CONFIG_IRQBALANCE |
38 | extern int irqbalance_disable(char *str); | 40 | extern int irqbalance_disable(char *str); |
39 | #endif | 41 | #endif |
40 | 42 | ||
43 | #ifdef CONFIG_HOTPLUG_CPU | ||
44 | extern void fixup_irqs(cpumask_t map); | ||
45 | #endif | ||
46 | |||
41 | #endif /* _ASM_IRQ_H */ | 47 | #endif /* _ASM_IRQ_H */ |
diff --git a/include/asm-i386/kdebug.h b/include/asm-i386/kdebug.h index de6498b0d493..b3f8d5f59d5d 100644 --- a/include/asm-i386/kdebug.h +++ b/include/asm-i386/kdebug.h | |||
@@ -18,7 +18,7 @@ struct die_args { | |||
18 | }; | 18 | }; |
19 | 19 | ||
20 | /* Note - you should never unregister because that can race with NMIs. | 20 | /* Note - you should never unregister because that can race with NMIs. |
21 | If you really want to do it first unregister - then synchronize_kernel - then free. | 21 | If you really want to do it first unregister - then synchronize_sched - then free. |
22 | */ | 22 | */ |
23 | int register_die_notifier(struct notifier_block *nb); | 23 | int register_die_notifier(struct notifier_block *nb); |
24 | extern struct notifier_block *i386die_chain; | 24 | extern struct notifier_block *i386die_chain; |
diff --git a/include/asm-i386/kexec.h b/include/asm-i386/kexec.h new file mode 100644 index 000000000000..6ed2a03e37b3 --- /dev/null +++ b/include/asm-i386/kexec.h | |||
@@ -0,0 +1,33 @@ | |||
1 | #ifndef _I386_KEXEC_H | ||
2 | #define _I386_KEXEC_H | ||
3 | |||
4 | #include <asm/fixmap.h> | ||
5 | |||
6 | /* | ||
7 | * KEXEC_SOURCE_MEMORY_LIMIT maximum page get_free_page can return. | ||
8 | * I.e. Maximum page that is mapped directly into kernel memory, | ||
9 | * and kmap is not required. | ||
10 | * | ||
11 | * Someone correct me if FIXADDR_START - PAGEOFFSET is not the correct | ||
12 | * calculation for the amount of memory directly mappable into the | ||
13 | * kernel memory space. | ||
14 | */ | ||
15 | |||
16 | /* Maximum physical address we can use pages from */ | ||
17 | #define KEXEC_SOURCE_MEMORY_LIMIT (-1UL) | ||
18 | /* Maximum address we can reach in physical address mode */ | ||
19 | #define KEXEC_DESTINATION_MEMORY_LIMIT (-1UL) | ||
20 | /* Maximum address we can use for the control code buffer */ | ||
21 | #define KEXEC_CONTROL_MEMORY_LIMIT TASK_SIZE | ||
22 | |||
23 | #define KEXEC_CONTROL_CODE_SIZE 4096 | ||
24 | |||
25 | /* The native architecture */ | ||
26 | #define KEXEC_ARCH KEXEC_ARCH_386 | ||
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 /* _I386_KEXEC_H */ | ||
diff --git a/include/asm-i386/kprobes.h b/include/asm-i386/kprobes.h index 4092f68d123a..8b6d3a90cd78 100644 --- a/include/asm-i386/kprobes.h +++ b/include/asm-i386/kprobes.h | |||
@@ -39,6 +39,9 @@ typedef u8 kprobe_opcode_t; | |||
39 | : (((unsigned long)current_thread_info()) + THREAD_SIZE - (ADDR))) | 39 | : (((unsigned long)current_thread_info()) + THREAD_SIZE - (ADDR))) |
40 | 40 | ||
41 | #define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)pentry | 41 | #define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)pentry |
42 | #define ARCH_SUPPORTS_KRETPROBES | ||
43 | |||
44 | void kretprobe_trampoline(void); | ||
42 | 45 | ||
43 | /* Architecture specific copy of original instruction*/ | 46 | /* Architecture specific copy of original instruction*/ |
44 | struct arch_specific_insn { | 47 | struct arch_specific_insn { |
diff --git a/include/asm-i386/mach-bigsmp/mach_apic.h b/include/asm-i386/mach-bigsmp/mach_apic.h index 2339868270ef..ba936d4daedb 100644 --- a/include/asm-i386/mach-bigsmp/mach_apic.h +++ b/include/asm-i386/mach-bigsmp/mach_apic.h | |||
@@ -14,8 +14,6 @@ | |||
14 | #define NO_BALANCE_IRQ (1) | 14 | #define NO_BALANCE_IRQ (1) |
15 | #define esr_disable (1) | 15 | #define esr_disable (1) |
16 | 16 | ||
17 | #define NO_IOAPIC_CHECK (0) | ||
18 | |||
19 | static inline int apic_id_registered(void) | 17 | static inline int apic_id_registered(void) |
20 | { | 18 | { |
21 | return (1); | 19 | return (1); |
diff --git a/include/asm-i386/mach-default/do_timer.h b/include/asm-i386/mach-default/do_timer.h index 03dd13a48a8c..56211414fc95 100644 --- a/include/asm-i386/mach-default/do_timer.h +++ b/include/asm-i386/mach-default/do_timer.h | |||
@@ -1,6 +1,7 @@ | |||
1 | /* defines for inline arch setup functions */ | 1 | /* defines for inline arch setup functions */ |
2 | 2 | ||
3 | #include <asm/apic.h> | 3 | #include <asm/apic.h> |
4 | #include <asm/i8259.h> | ||
4 | 5 | ||
5 | /** | 6 | /** |
6 | * do_timer_interrupt_hook - hook into timer tick | 7 | * do_timer_interrupt_hook - hook into timer tick |
diff --git a/include/asm-i386/mach-default/mach_apic.h b/include/asm-i386/mach-default/mach_apic.h index 627f1cd084ba..3ef6292db780 100644 --- a/include/asm-i386/mach-default/mach_apic.h +++ b/include/asm-i386/mach-default/mach_apic.h | |||
@@ -19,8 +19,6 @@ static inline cpumask_t target_cpus(void) | |||
19 | #define NO_BALANCE_IRQ (0) | 19 | #define NO_BALANCE_IRQ (0) |
20 | #define esr_disable (0) | 20 | #define esr_disable (0) |
21 | 21 | ||
22 | #define NO_IOAPIC_CHECK (0) | ||
23 | |||
24 | #define INT_DELIVERY_MODE dest_LowestPrio | 22 | #define INT_DELIVERY_MODE dest_LowestPrio |
25 | #define INT_DEST_MODE 1 /* logical delivery broadcast to all procs */ | 23 | #define INT_DEST_MODE 1 /* logical delivery broadcast to all procs */ |
26 | 24 | ||
diff --git a/include/asm-i386/mach-default/mach_ipi.h b/include/asm-i386/mach-default/mach_ipi.h index 6f2b17a20089..cc756a67cd63 100644 --- a/include/asm-i386/mach-default/mach_ipi.h +++ b/include/asm-i386/mach-default/mach_ipi.h | |||
@@ -4,11 +4,34 @@ | |||
4 | void send_IPI_mask_bitmask(cpumask_t mask, int vector); | 4 | void send_IPI_mask_bitmask(cpumask_t mask, int vector); |
5 | void __send_IPI_shortcut(unsigned int shortcut, int vector); | 5 | void __send_IPI_shortcut(unsigned int shortcut, int vector); |
6 | 6 | ||
7 | extern int no_broadcast; | ||
8 | |||
7 | static inline void send_IPI_mask(cpumask_t mask, int vector) | 9 | static inline void send_IPI_mask(cpumask_t mask, int vector) |
8 | { | 10 | { |
9 | send_IPI_mask_bitmask(mask, vector); | 11 | send_IPI_mask_bitmask(mask, vector); |
10 | } | 12 | } |
11 | 13 | ||
14 | static inline void __local_send_IPI_allbutself(int vector) | ||
15 | { | ||
16 | if (no_broadcast) { | ||
17 | cpumask_t mask = cpu_online_map; | ||
18 | int this_cpu = get_cpu(); | ||
19 | |||
20 | cpu_clear(this_cpu, mask); | ||
21 | send_IPI_mask(mask, vector); | ||
22 | put_cpu(); | ||
23 | } else | ||
24 | __send_IPI_shortcut(APIC_DEST_ALLBUT, vector); | ||
25 | } | ||
26 | |||
27 | static inline void __local_send_IPI_all(int vector) | ||
28 | { | ||
29 | if (no_broadcast) | ||
30 | send_IPI_mask(cpu_online_map, vector); | ||
31 | else | ||
32 | __send_IPI_shortcut(APIC_DEST_ALLINC, vector); | ||
33 | } | ||
34 | |||
12 | static inline void send_IPI_allbutself(int vector) | 35 | static inline void send_IPI_allbutself(int vector) |
13 | { | 36 | { |
14 | /* | 37 | /* |
@@ -18,13 +41,13 @@ static inline void send_IPI_allbutself(int vector) | |||
18 | if (!(num_online_cpus() > 1)) | 41 | if (!(num_online_cpus() > 1)) |
19 | return; | 42 | return; |
20 | 43 | ||
21 | __send_IPI_shortcut(APIC_DEST_ALLBUT, vector); | 44 | __local_send_IPI_allbutself(vector); |
22 | return; | 45 | return; |
23 | } | 46 | } |
24 | 47 | ||
25 | static inline void send_IPI_all(int vector) | 48 | static inline void send_IPI_all(int vector) |
26 | { | 49 | { |
27 | __send_IPI_shortcut(APIC_DEST_ALLINC, vector); | 50 | __local_send_IPI_all(vector); |
28 | } | 51 | } |
29 | 52 | ||
30 | #endif /* __ASM_MACH_IPI_H */ | 53 | #endif /* __ASM_MACH_IPI_H */ |
diff --git a/include/asm-i386/mach-es7000/mach_apic.h b/include/asm-i386/mach-es7000/mach_apic.h index ceab2c464b13..b5f3f0d0b2bc 100644 --- a/include/asm-i386/mach-es7000/mach_apic.h +++ b/include/asm-i386/mach-es7000/mach_apic.h | |||
@@ -38,8 +38,6 @@ static inline cpumask_t target_cpus(void) | |||
38 | #define WAKE_SECONDARY_VIA_INIT | 38 | #define WAKE_SECONDARY_VIA_INIT |
39 | #endif | 39 | #endif |
40 | 40 | ||
41 | #define NO_IOAPIC_CHECK (1) | ||
42 | |||
43 | static inline unsigned long check_apicid_used(physid_mask_t bitmap, int apicid) | 41 | static inline unsigned long check_apicid_used(physid_mask_t bitmap, int apicid) |
44 | { | 42 | { |
45 | return 0; | 43 | return 0; |
diff --git a/include/asm-i386/mach-generic/mach_apic.h b/include/asm-i386/mach-generic/mach_apic.h index ab36d02ebede..b13767a4e934 100644 --- a/include/asm-i386/mach-generic/mach_apic.h +++ b/include/asm-i386/mach-generic/mach_apic.h | |||
@@ -5,7 +5,6 @@ | |||
5 | 5 | ||
6 | #define esr_disable (genapic->ESR_DISABLE) | 6 | #define esr_disable (genapic->ESR_DISABLE) |
7 | #define NO_BALANCE_IRQ (genapic->no_balance_irq) | 7 | #define NO_BALANCE_IRQ (genapic->no_balance_irq) |
8 | #define NO_IOAPIC_CHECK (genapic->no_ioapic_check) | ||
9 | #define INT_DELIVERY_MODE (genapic->int_delivery_mode) | 8 | #define INT_DELIVERY_MODE (genapic->int_delivery_mode) |
10 | #define INT_DEST_MODE (genapic->int_dest_mode) | 9 | #define INT_DEST_MODE (genapic->int_dest_mode) |
11 | #undef APIC_DEST_LOGICAL | 10 | #undef APIC_DEST_LOGICAL |
diff --git a/include/asm-i386/mach-numaq/mach_apic.h b/include/asm-i386/mach-numaq/mach_apic.h index e1a04494764a..9d158095da82 100644 --- a/include/asm-i386/mach-numaq/mach_apic.h +++ b/include/asm-i386/mach-numaq/mach_apic.h | |||
@@ -17,8 +17,6 @@ static inline cpumask_t target_cpus(void) | |||
17 | #define NO_BALANCE_IRQ (1) | 17 | #define NO_BALANCE_IRQ (1) |
18 | #define esr_disable (1) | 18 | #define esr_disable (1) |
19 | 19 | ||
20 | #define NO_IOAPIC_CHECK (0) | ||
21 | |||
22 | #define INT_DELIVERY_MODE dest_LowestPrio | 20 | #define INT_DELIVERY_MODE dest_LowestPrio |
23 | #define INT_DEST_MODE 0 /* physical delivery on LOCAL quad */ | 21 | #define INT_DEST_MODE 0 /* physical delivery on LOCAL quad */ |
24 | 22 | ||
diff --git a/include/asm-i386/mach-summit/mach_apic.h b/include/asm-i386/mach-summit/mach_apic.h index 74e9cbc8c01b..3d6d12937e1f 100644 --- a/include/asm-i386/mach-summit/mach_apic.h +++ b/include/asm-i386/mach-summit/mach_apic.h | |||
@@ -7,8 +7,6 @@ | |||
7 | #define esr_disable (1) | 7 | #define esr_disable (1) |
8 | #define NO_BALANCE_IRQ (0) | 8 | #define NO_BALANCE_IRQ (0) |
9 | 9 | ||
10 | #define NO_IOAPIC_CHECK (1) /* Don't check I/O APIC ID for xAPIC */ | ||
11 | |||
12 | /* In clustered mode, the high nibble of APIC ID is a cluster number. | 10 | /* In clustered mode, the high nibble of APIC ID is a cluster number. |
13 | * The low nibble is a 4-bit bitmap. */ | 11 | * The low nibble is a 4-bit bitmap. */ |
14 | #define XAPIC_DEST_CPUS_SHIFT 4 | 12 | #define XAPIC_DEST_CPUS_SHIFT 4 |
diff --git a/include/asm-i386/mach-visws/mach_apic.h b/include/asm-i386/mach-visws/mach_apic.h index 4e6cdfb8b091..de438c7147a8 100644 --- a/include/asm-i386/mach-visws/mach_apic.h +++ b/include/asm-i386/mach-visws/mach_apic.h | |||
@@ -9,8 +9,6 @@ | |||
9 | #define no_balance_irq (0) | 9 | #define no_balance_irq (0) |
10 | #define esr_disable (0) | 10 | #define esr_disable (0) |
11 | 11 | ||
12 | #define NO_IOAPIC_CHECK (0) | ||
13 | |||
14 | #define INT_DELIVERY_MODE dest_LowestPrio | 12 | #define INT_DELIVERY_MODE dest_LowestPrio |
15 | #define INT_DEST_MODE 1 /* logical delivery broadcast to all procs */ | 13 | #define INT_DEST_MODE 1 /* logical delivery broadcast to all procs */ |
16 | 14 | ||
diff --git a/include/asm-i386/mmzone.h b/include/asm-i386/mmzone.h index 13830ae67cac..516421300ea2 100644 --- a/include/asm-i386/mmzone.h +++ b/include/asm-i386/mmzone.h | |||
@@ -8,21 +8,43 @@ | |||
8 | 8 | ||
9 | #include <asm/smp.h> | 9 | #include <asm/smp.h> |
10 | 10 | ||
11 | #ifdef CONFIG_DISCONTIGMEM | ||
12 | |||
13 | #ifdef CONFIG_NUMA | 11 | #ifdef CONFIG_NUMA |
14 | #ifdef CONFIG_X86_NUMAQ | 12 | extern struct pglist_data *node_data[]; |
15 | #include <asm/numaq.h> | 13 | #define NODE_DATA(nid) (node_data[nid]) |
16 | #else /* summit or generic arch */ | 14 | |
17 | #include <asm/srat.h> | 15 | #ifdef CONFIG_X86_NUMAQ |
18 | #endif | 16 | #include <asm/numaq.h> |
17 | #else /* summit or generic arch */ | ||
18 | #include <asm/srat.h> | ||
19 | #endif | ||
20 | |||
21 | extern int get_memcfg_numa_flat(void ); | ||
22 | /* | ||
23 | * This allows any one NUMA architecture to be compiled | ||
24 | * for, and still fall back to the flat function if it | ||
25 | * fails. | ||
26 | */ | ||
27 | static inline void get_memcfg_numa(void) | ||
28 | { | ||
29 | #ifdef CONFIG_X86_NUMAQ | ||
30 | if (get_memcfg_numaq()) | ||
31 | return; | ||
32 | #elif CONFIG_ACPI_SRAT | ||
33 | if (get_memcfg_from_srat()) | ||
34 | return; | ||
35 | #endif | ||
36 | |||
37 | get_memcfg_numa_flat(); | ||
38 | } | ||
39 | |||
40 | extern int early_pfn_to_nid(unsigned long pfn); | ||
41 | |||
19 | #else /* !CONFIG_NUMA */ | 42 | #else /* !CONFIG_NUMA */ |
20 | #define get_memcfg_numa get_memcfg_numa_flat | 43 | #define get_memcfg_numa get_memcfg_numa_flat |
21 | #define get_zholes_size(n) (0) | 44 | #define get_zholes_size(n) (0) |
22 | #endif /* CONFIG_NUMA */ | 45 | #endif /* CONFIG_NUMA */ |
23 | 46 | ||
24 | extern struct pglist_data *node_data[]; | 47 | #ifdef CONFIG_DISCONTIGMEM |
25 | #define NODE_DATA(nid) (node_data[nid]) | ||
26 | 48 | ||
27 | /* | 49 | /* |
28 | * generic node memory support, the following assumptions apply: | 50 | * generic node memory support, the following assumptions apply: |
@@ -48,26 +70,6 @@ static inline int pfn_to_nid(unsigned long pfn) | |||
48 | #endif | 70 | #endif |
49 | } | 71 | } |
50 | 72 | ||
51 | /* | ||
52 | * Following are macros that are specific to this numa platform. | ||
53 | */ | ||
54 | #define reserve_bootmem(addr, size) \ | ||
55 | reserve_bootmem_node(NODE_DATA(0), (addr), (size)) | ||
56 | #define alloc_bootmem(x) \ | ||
57 | __alloc_bootmem_node(NODE_DATA(0), (x), SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS)) | ||
58 | #define alloc_bootmem_low(x) \ | ||
59 | __alloc_bootmem_node(NODE_DATA(0), (x), SMP_CACHE_BYTES, 0) | ||
60 | #define alloc_bootmem_pages(x) \ | ||
61 | __alloc_bootmem_node(NODE_DATA(0), (x), PAGE_SIZE, __pa(MAX_DMA_ADDRESS)) | ||
62 | #define alloc_bootmem_low_pages(x) \ | ||
63 | __alloc_bootmem_node(NODE_DATA(0), (x), PAGE_SIZE, 0) | ||
64 | #define alloc_bootmem_node(ignore, x) \ | ||
65 | __alloc_bootmem_node(NODE_DATA(0), (x), SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS)) | ||
66 | #define alloc_bootmem_pages_node(ignore, x) \ | ||
67 | __alloc_bootmem_node(NODE_DATA(0), (x), PAGE_SIZE, __pa(MAX_DMA_ADDRESS)) | ||
68 | #define alloc_bootmem_low_pages_node(ignore, x) \ | ||
69 | __alloc_bootmem_node(NODE_DATA(0), (x), PAGE_SIZE, 0) | ||
70 | |||
71 | #define node_localnr(pfn, nid) ((pfn) - node_data[nid]->node_start_pfn) | 73 | #define node_localnr(pfn, nid) ((pfn) - node_data[nid]->node_start_pfn) |
72 | 74 | ||
73 | /* | 75 | /* |
@@ -79,7 +81,6 @@ static inline int pfn_to_nid(unsigned long pfn) | |||
79 | */ | 81 | */ |
80 | #define kvaddr_to_nid(kaddr) pfn_to_nid(__pa(kaddr) >> PAGE_SHIFT) | 82 | #define kvaddr_to_nid(kaddr) pfn_to_nid(__pa(kaddr) >> PAGE_SHIFT) |
81 | 83 | ||
82 | #define node_mem_map(nid) (NODE_DATA(nid)->node_mem_map) | ||
83 | #define node_start_pfn(nid) (NODE_DATA(nid)->node_start_pfn) | 84 | #define node_start_pfn(nid) (NODE_DATA(nid)->node_start_pfn) |
84 | #define node_end_pfn(nid) \ | 85 | #define node_end_pfn(nid) \ |
85 | ({ \ | 86 | ({ \ |
@@ -100,7 +101,7 @@ static inline int pfn_to_nid(unsigned long pfn) | |||
100 | ({ \ | 101 | ({ \ |
101 | unsigned long __pfn = pfn; \ | 102 | unsigned long __pfn = pfn; \ |
102 | int __node = pfn_to_nid(__pfn); \ | 103 | int __node = pfn_to_nid(__pfn); \ |
103 | &node_mem_map(__node)[node_localnr(__pfn,__node)]; \ | 104 | &NODE_DATA(__node)->node_mem_map[node_localnr(__pfn,__node)]; \ |
104 | }) | 105 | }) |
105 | 106 | ||
106 | #define page_to_pfn(pg) \ | 107 | #define page_to_pfn(pg) \ |
@@ -122,26 +123,32 @@ static inline int pfn_valid(int pfn) | |||
122 | return (pfn < node_end_pfn(nid)); | 123 | return (pfn < node_end_pfn(nid)); |
123 | return 0; | 124 | return 0; |
124 | } | 125 | } |
125 | #endif | 126 | #endif /* CONFIG_X86_NUMAQ */ |
127 | |||
128 | #endif /* CONFIG_DISCONTIGMEM */ | ||
129 | |||
130 | #ifdef CONFIG_NEED_MULTIPLE_NODES | ||
126 | 131 | ||
127 | extern int get_memcfg_numa_flat(void ); | ||
128 | /* | 132 | /* |
129 | * This allows any one NUMA architecture to be compiled | 133 | * Following are macros that are specific to this numa platform. |
130 | * for, and still fall back to the flat function if it | ||
131 | * fails. | ||
132 | */ | 134 | */ |
133 | static inline void get_memcfg_numa(void) | 135 | #define reserve_bootmem(addr, size) \ |
134 | { | 136 | reserve_bootmem_node(NODE_DATA(0), (addr), (size)) |
135 | #ifdef CONFIG_X86_NUMAQ | 137 | #define alloc_bootmem(x) \ |
136 | if (get_memcfg_numaq()) | 138 | __alloc_bootmem_node(NODE_DATA(0), (x), SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS)) |
137 | return; | 139 | #define alloc_bootmem_low(x) \ |
138 | #elif CONFIG_ACPI_SRAT | 140 | __alloc_bootmem_node(NODE_DATA(0), (x), SMP_CACHE_BYTES, 0) |
139 | if (get_memcfg_from_srat()) | 141 | #define alloc_bootmem_pages(x) \ |
140 | return; | 142 | __alloc_bootmem_node(NODE_DATA(0), (x), PAGE_SIZE, __pa(MAX_DMA_ADDRESS)) |
141 | #endif | 143 | #define alloc_bootmem_low_pages(x) \ |
144 | __alloc_bootmem_node(NODE_DATA(0), (x), PAGE_SIZE, 0) | ||
145 | #define alloc_bootmem_node(ignore, x) \ | ||
146 | __alloc_bootmem_node(NODE_DATA(0), (x), SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS)) | ||
147 | #define alloc_bootmem_pages_node(ignore, x) \ | ||
148 | __alloc_bootmem_node(NODE_DATA(0), (x), PAGE_SIZE, __pa(MAX_DMA_ADDRESS)) | ||
149 | #define alloc_bootmem_low_pages_node(ignore, x) \ | ||
150 | __alloc_bootmem_node(NODE_DATA(0), (x), PAGE_SIZE, 0) | ||
142 | 151 | ||
143 | get_memcfg_numa_flat(); | 152 | #endif /* CONFIG_NEED_MULTIPLE_NODES */ |
144 | } | ||
145 | 153 | ||
146 | #endif /* CONFIG_DISCONTIGMEM */ | ||
147 | #endif /* _ASM_MMZONE_H_ */ | 154 | #endif /* _ASM_MMZONE_H_ */ |
diff --git a/include/asm-i386/page.h b/include/asm-i386/page.h index ed13969fa2d6..8d93f732d72d 100644 --- a/include/asm-i386/page.h +++ b/include/asm-i386/page.h | |||
@@ -68,6 +68,7 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
68 | #define HPAGE_MASK (~(HPAGE_SIZE - 1)) | 68 | #define HPAGE_MASK (~(HPAGE_SIZE - 1)) |
69 | #define HUGETLB_PAGE_ORDER (HPAGE_SHIFT - PAGE_SHIFT) | 69 | #define HUGETLB_PAGE_ORDER (HPAGE_SHIFT - PAGE_SHIFT) |
70 | #define HAVE_ARCH_HUGETLB_UNMAPPED_AREA | 70 | #define HAVE_ARCH_HUGETLB_UNMAPPED_AREA |
71 | #define ARCH_HAS_HUGETLB_CLEAN_STALE_PGTABLE | ||
71 | #endif | 72 | #endif |
72 | 73 | ||
73 | #define pgd_val(x) ((x).pgd) | 74 | #define pgd_val(x) ((x).pgd) |
@@ -119,13 +120,18 @@ static __inline__ int get_order(unsigned long size) | |||
119 | 120 | ||
120 | extern int sysctl_legacy_va_layout; | 121 | extern int sysctl_legacy_va_layout; |
121 | 122 | ||
123 | extern int page_is_ram(unsigned long pagenr); | ||
124 | |||
122 | #endif /* __ASSEMBLY__ */ | 125 | #endif /* __ASSEMBLY__ */ |
123 | 126 | ||
124 | #ifdef __ASSEMBLY__ | 127 | #ifdef __ASSEMBLY__ |
125 | #define __PAGE_OFFSET (0xC0000000) | 128 | #define __PAGE_OFFSET (0xC0000000) |
129 | #define __PHYSICAL_START CONFIG_PHYSICAL_START | ||
126 | #else | 130 | #else |
127 | #define __PAGE_OFFSET (0xC0000000UL) | 131 | #define __PAGE_OFFSET (0xC0000000UL) |
132 | #define __PHYSICAL_START ((unsigned long)CONFIG_PHYSICAL_START) | ||
128 | #endif | 133 | #endif |
134 | #define __KERNEL_START (__PAGE_OFFSET + __PHYSICAL_START) | ||
129 | 135 | ||
130 | 136 | ||
131 | #define PAGE_OFFSET ((unsigned long)__PAGE_OFFSET) | 137 | #define PAGE_OFFSET ((unsigned long)__PAGE_OFFSET) |
@@ -134,11 +140,11 @@ extern int sysctl_legacy_va_layout; | |||
134 | #define __pa(x) ((unsigned long)(x)-PAGE_OFFSET) | 140 | #define __pa(x) ((unsigned long)(x)-PAGE_OFFSET) |
135 | #define __va(x) ((void *)((unsigned long)(x)+PAGE_OFFSET)) | 141 | #define __va(x) ((void *)((unsigned long)(x)+PAGE_OFFSET)) |
136 | #define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT) | 142 | #define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT) |
137 | #ifndef CONFIG_DISCONTIGMEM | 143 | #ifdef CONFIG_FLATMEM |
138 | #define pfn_to_page(pfn) (mem_map + (pfn)) | 144 | #define pfn_to_page(pfn) (mem_map + (pfn)) |
139 | #define page_to_pfn(page) ((unsigned long)((page) - mem_map)) | 145 | #define page_to_pfn(page) ((unsigned long)((page) - mem_map)) |
140 | #define pfn_valid(pfn) ((pfn) < max_mapnr) | 146 | #define pfn_valid(pfn) ((pfn) < max_mapnr) |
141 | #endif /* !CONFIG_DISCONTIGMEM */ | 147 | #endif /* CONFIG_FLATMEM */ |
142 | #define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT) | 148 | #define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT) |
143 | 149 | ||
144 | #define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT) | 150 | #define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT) |
diff --git a/include/asm-i386/param.h b/include/asm-i386/param.h index b6440526e42a..fa02e67ea86b 100644 --- a/include/asm-i386/param.h +++ b/include/asm-i386/param.h | |||
@@ -1,8 +1,10 @@ | |||
1 | #include <linux/config.h> | ||
2 | |||
1 | #ifndef _ASMi386_PARAM_H | 3 | #ifndef _ASMi386_PARAM_H |
2 | #define _ASMi386_PARAM_H | 4 | #define _ASMi386_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 |
diff --git a/include/asm-i386/pci.h b/include/asm-i386/pci.h index e0dc1cea0b7c..78c85985aee3 100644 --- a/include/asm-i386/pci.h +++ b/include/asm-i386/pci.h | |||
@@ -99,6 +99,16 @@ static inline void pcibios_add_platform_entries(struct pci_dev *dev) | |||
99 | { | 99 | { |
100 | } | 100 | } |
101 | 101 | ||
102 | #ifdef CONFIG_PCI | ||
103 | static inline void pci_dma_burst_advice(struct pci_dev *pdev, | ||
104 | enum pci_dma_burst_strategy *strat, | ||
105 | unsigned long *strategy_parameter) | ||
106 | { | ||
107 | *strat = PCI_DMA_BURST_INFINITY; | ||
108 | *strategy_parameter = ~0UL; | ||
109 | } | ||
110 | #endif | ||
111 | |||
102 | #endif /* __KERNEL__ */ | 112 | #endif /* __KERNEL__ */ |
103 | 113 | ||
104 | /* implement the pci_ DMA API in terms of the generic device dma_ one */ | 114 | /* implement the pci_ DMA API in terms of the generic device dma_ one */ |
diff --git a/include/asm-i386/pgtable.h b/include/asm-i386/pgtable.h index 8d60c2b4b003..77c6497f416e 100644 --- a/include/asm-i386/pgtable.h +++ b/include/asm-i386/pgtable.h | |||
@@ -236,6 +236,7 @@ static inline pte_t pte_mkexec(pte_t pte) { (pte).pte_low |= _PAGE_USER; return | |||
236 | static inline pte_t pte_mkdirty(pte_t pte) { (pte).pte_low |= _PAGE_DIRTY; return pte; } | 236 | static inline pte_t pte_mkdirty(pte_t pte) { (pte).pte_low |= _PAGE_DIRTY; return pte; } |
237 | static inline pte_t pte_mkyoung(pte_t pte) { (pte).pte_low |= _PAGE_ACCESSED; return pte; } | 237 | static inline pte_t pte_mkyoung(pte_t pte) { (pte).pte_low |= _PAGE_ACCESSED; return pte; } |
238 | static inline pte_t pte_mkwrite(pte_t pte) { (pte).pte_low |= _PAGE_RW; return pte; } | 238 | static inline pte_t pte_mkwrite(pte_t pte) { (pte).pte_low |= _PAGE_RW; return pte; } |
239 | static inline pte_t pte_mkhuge(pte_t pte) { (pte).pte_low |= _PAGE_PRESENT | _PAGE_PSE; return pte; } | ||
239 | 240 | ||
240 | #ifdef CONFIG_X86_PAE | 241 | #ifdef CONFIG_X86_PAE |
241 | # include <asm/pgtable-3level.h> | 242 | # include <asm/pgtable-3level.h> |
@@ -275,7 +276,6 @@ static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr, | |||
275 | */ | 276 | */ |
276 | 277 | ||
277 | #define mk_pte(page, pgprot) pfn_pte(page_to_pfn(page), (pgprot)) | 278 | #define mk_pte(page, pgprot) pfn_pte(page_to_pfn(page), (pgprot)) |
278 | #define mk_pte_huge(entry) ((entry).pte_low |= _PAGE_PRESENT | _PAGE_PSE) | ||
279 | 279 | ||
280 | static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) | 280 | static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) |
281 | { | 281 | { |
@@ -398,9 +398,9 @@ extern void noexec_setup(const char *str); | |||
398 | 398 | ||
399 | #endif /* !__ASSEMBLY__ */ | 399 | #endif /* !__ASSEMBLY__ */ |
400 | 400 | ||
401 | #ifndef CONFIG_DISCONTIGMEM | 401 | #ifdef CONFIG_FLATMEM |
402 | #define kern_addr_valid(addr) (1) | 402 | #define kern_addr_valid(addr) (1) |
403 | #endif /* !CONFIG_DISCONTIGMEM */ | 403 | #endif /* CONFIG_FLATMEM */ |
404 | 404 | ||
405 | #define io_remap_page_range(vma, vaddr, paddr, size, prot) \ | 405 | #define io_remap_page_range(vma, vaddr, paddr, size, prot) \ |
406 | remap_pfn_range(vma, vaddr, (paddr) >> PAGE_SHIFT, size, prot) | 406 | remap_pfn_range(vma, vaddr, (paddr) >> PAGE_SHIFT, size, prot) |
diff --git a/include/asm-i386/processor.h b/include/asm-i386/processor.h index 359bb0151742..5d06e6bd6ba0 100644 --- a/include/asm-i386/processor.h +++ b/include/asm-i386/processor.h | |||
@@ -501,12 +501,16 @@ static inline void load_esp0(struct tss_struct *tss, struct thread_struct *threa | |||
501 | } while (0) | 501 | } while (0) |
502 | 502 | ||
503 | /* | 503 | /* |
504 | * This special macro can be used to load a debugging register | 504 | * These special macros can be used to get or set a debugging register |
505 | */ | 505 | */ |
506 | #define loaddebug(thread,register) \ | 506 | #define get_debugreg(var, register) \ |
507 | __asm__("movl %0,%%db" #register \ | 507 | __asm__("movl %%db" #register ", %0" \ |
508 | : /* no output */ \ | 508 | :"=r" (var)) |
509 | :"r" ((thread)->debugreg[register])) | 509 | #define set_debugreg(value, register) \ |
510 | __asm__("movl %0,%%db" #register \ | ||
511 | : /* no output */ \ | ||
512 | :"r" (value)) | ||
513 | |||
510 | 514 | ||
511 | /* Forward declaration, a strange C thing */ | 515 | /* Forward declaration, a strange C thing */ |
512 | struct task_struct; | 516 | struct task_struct; |
@@ -687,5 +691,15 @@ extern void select_idle_routine(const struct cpuinfo_x86 *c); | |||
687 | #define cache_line_size() (boot_cpu_data.x86_cache_alignment) | 691 | #define cache_line_size() (boot_cpu_data.x86_cache_alignment) |
688 | 692 | ||
689 | extern unsigned long boot_option_idle_override; | 693 | extern unsigned long boot_option_idle_override; |
694 | extern void enable_sep_cpu(void); | ||
695 | extern int sysenter_setup(void); | ||
696 | |||
697 | #ifdef CONFIG_MTRR | ||
698 | extern void mtrr_ap_init(void); | ||
699 | extern void mtrr_bp_init(void); | ||
700 | #else | ||
701 | #define mtrr_ap_init() do {} while (0) | ||
702 | #define mtrr_bp_init() do {} while (0) | ||
703 | #endif | ||
690 | 704 | ||
691 | #endif /* __ASM_I386_PROCESSOR_H */ | 705 | #endif /* __ASM_I386_PROCESSOR_H */ |
diff --git a/include/asm-i386/ptrace.h b/include/asm-i386/ptrace.h index 8618914b3521..eef9f93870d4 100644 --- a/include/asm-i386/ptrace.h +++ b/include/asm-i386/ptrace.h | |||
@@ -57,7 +57,8 @@ struct pt_regs { | |||
57 | #ifdef __KERNEL__ | 57 | #ifdef __KERNEL__ |
58 | struct task_struct; | 58 | struct task_struct; |
59 | extern void send_sigtrap(struct task_struct *tsk, struct pt_regs *regs, int error_code); | 59 | extern void send_sigtrap(struct task_struct *tsk, struct pt_regs *regs, int error_code); |
60 | #define user_mode(regs) ((VM_MASK & (regs)->eflags) || (3 & (regs)->xcs)) | 60 | #define user_mode(regs) (3 & (regs)->xcs) |
61 | #define user_mode_vm(regs) ((VM_MASK & (regs)->eflags) || user_mode(regs)) | ||
61 | #define instruction_pointer(regs) ((regs)->eip) | 62 | #define instruction_pointer(regs) ((regs)->eip) |
62 | #if defined(CONFIG_SMP) && defined(CONFIG_FRAME_POINTER) | 63 | #if defined(CONFIG_SMP) && defined(CONFIG_FRAME_POINTER) |
63 | extern unsigned long profile_pc(struct pt_regs *regs); | 64 | extern unsigned long profile_pc(struct pt_regs *regs); |
diff --git a/include/asm-i386/serial.h b/include/asm-i386/serial.h index 21ddecc77c77..e1ecfccb743b 100644 --- a/include/asm-i386/serial.h +++ b/include/asm-i386/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-i386/smp.h b/include/asm-i386/smp.h index e03a206dfa36..edad9b4712fa 100644 --- a/include/asm-i386/smp.h +++ b/include/asm-i386/smp.h | |||
@@ -42,16 +42,23 @@ extern void smp_message_irq(int cpl, void *dev_id, struct pt_regs *regs); | |||
42 | extern void smp_invalidate_rcv(void); /* Process an NMI */ | 42 | extern void smp_invalidate_rcv(void); /* Process an NMI */ |
43 | extern void (*mtrr_hook) (void); | 43 | extern void (*mtrr_hook) (void); |
44 | extern void zap_low_mappings (void); | 44 | extern void zap_low_mappings (void); |
45 | extern void lock_ipi_call_lock(void); | ||
46 | extern void unlock_ipi_call_lock(void); | ||
45 | 47 | ||
46 | #define MAX_APICID 256 | 48 | #define MAX_APICID 256 |
47 | extern u8 x86_cpu_to_apicid[]; | 49 | extern u8 x86_cpu_to_apicid[]; |
48 | 50 | ||
51 | #ifdef CONFIG_HOTPLUG_CPU | ||
52 | extern void cpu_exit_clear(void); | ||
53 | extern void cpu_uninit(void); | ||
54 | #endif | ||
55 | |||
49 | /* | 56 | /* |
50 | * This function is needed by all SMP systems. It must _always_ be valid | 57 | * This function is needed by all SMP systems. It must _always_ be valid |
51 | * from the initial startup. We map APIC_BASE very early in page_setup(), | 58 | * from the initial startup. We map APIC_BASE very early in page_setup(), |
52 | * so this is correct in the x86 case. | 59 | * so this is correct in the x86 case. |
53 | */ | 60 | */ |
54 | #define __smp_processor_id() (current_thread_info()->cpu) | 61 | #define raw_smp_processor_id() (current_thread_info()->cpu) |
55 | 62 | ||
56 | extern cpumask_t cpu_callout_map; | 63 | extern cpumask_t cpu_callout_map; |
57 | extern cpumask_t cpu_callin_map; | 64 | extern cpumask_t cpu_callin_map; |
@@ -83,6 +90,9 @@ static __inline int logical_smp_processor_id(void) | |||
83 | } | 90 | } |
84 | 91 | ||
85 | #endif | 92 | #endif |
93 | |||
94 | extern int __cpu_disable(void); | ||
95 | extern void __cpu_die(unsigned int cpu); | ||
86 | #endif /* !__ASSEMBLY__ */ | 96 | #endif /* !__ASSEMBLY__ */ |
87 | 97 | ||
88 | #define NO_PROC_ID 0xFF /* No processor magic marker */ | 98 | #define NO_PROC_ID 0xFF /* No processor magic marker */ |
diff --git a/include/asm-i386/sparsemem.h b/include/asm-i386/sparsemem.h new file mode 100644 index 000000000000..cfeed990585f --- /dev/null +++ b/include/asm-i386/sparsemem.h | |||
@@ -0,0 +1,31 @@ | |||
1 | #ifndef _I386_SPARSEMEM_H | ||
2 | #define _I386_SPARSEMEM_H | ||
3 | #ifdef CONFIG_SPARSEMEM | ||
4 | |||
5 | /* | ||
6 | * generic non-linear memory support: | ||
7 | * | ||
8 | * 1) we will not split memory into more chunks than will fit into the | ||
9 | * flags field of the struct page | ||
10 | */ | ||
11 | |||
12 | /* | ||
13 | * SECTION_SIZE_BITS 2^N: how big each section will be | ||
14 | * MAX_PHYSADDR_BITS 2^N: how much physical address space we have | ||
15 | * MAX_PHYSMEM_BITS 2^N: how much memory we can have in that space | ||
16 | */ | ||
17 | #ifdef CONFIG_X86_PAE | ||
18 | #define SECTION_SIZE_BITS 30 | ||
19 | #define MAX_PHYSADDR_BITS 36 | ||
20 | #define MAX_PHYSMEM_BITS 36 | ||
21 | #else | ||
22 | #define SECTION_SIZE_BITS 26 | ||
23 | #define MAX_PHYSADDR_BITS 32 | ||
24 | #define MAX_PHYSMEM_BITS 32 | ||
25 | #endif | ||
26 | |||
27 | /* XXX: FIXME -- wli */ | ||
28 | #define kern_addr_valid(kaddr) (0) | ||
29 | |||
30 | #endif /* CONFIG_SPARSEMEM */ | ||
31 | #endif /* _I386_SPARSEMEM_H */ | ||
diff --git a/include/asm-i386/string.h b/include/asm-i386/string.h index 6a78ac58c194..02c8f5d22065 100644 --- a/include/asm-i386/string.h +++ b/include/asm-i386/string.h | |||
@@ -116,7 +116,8 @@ __asm__ __volatile__( | |||
116 | "orb $1,%%al\n" | 116 | "orb $1,%%al\n" |
117 | "3:" | 117 | "3:" |
118 | :"=a" (__res), "=&S" (d0), "=&D" (d1) | 118 | :"=a" (__res), "=&S" (d0), "=&D" (d1) |
119 | :"1" (cs),"2" (ct)); | 119 | :"1" (cs),"2" (ct) |
120 | :"memory"); | ||
120 | return __res; | 121 | return __res; |
121 | } | 122 | } |
122 | 123 | ||
@@ -138,8 +139,9 @@ __asm__ __volatile__( | |||
138 | "3:\tsbbl %%eax,%%eax\n\t" | 139 | "3:\tsbbl %%eax,%%eax\n\t" |
139 | "orb $1,%%al\n" | 140 | "orb $1,%%al\n" |
140 | "4:" | 141 | "4:" |
141 | :"=a" (__res), "=&S" (d0), "=&D" (d1), "=&c" (d2) | 142 | :"=a" (__res), "=&S" (d0), "=&D" (d1), "=&c" (d2) |
142 | :"1" (cs),"2" (ct),"3" (count)); | 143 | :"1" (cs),"2" (ct),"3" (count) |
144 | :"memory"); | ||
143 | return __res; | 145 | return __res; |
144 | } | 146 | } |
145 | 147 | ||
@@ -158,7 +160,9 @@ __asm__ __volatile__( | |||
158 | "movl $1,%1\n" | 160 | "movl $1,%1\n" |
159 | "2:\tmovl %1,%0\n\t" | 161 | "2:\tmovl %1,%0\n\t" |
160 | "decl %0" | 162 | "decl %0" |
161 | :"=a" (__res), "=&S" (d0) : "1" (s),"0" (c)); | 163 | :"=a" (__res), "=&S" (d0) |
164 | :"1" (s),"0" (c) | ||
165 | :"memory"); | ||
162 | return __res; | 166 | return __res; |
163 | } | 167 | } |
164 | 168 | ||
@@ -175,7 +179,9 @@ __asm__ __volatile__( | |||
175 | "leal -1(%%esi),%0\n" | 179 | "leal -1(%%esi),%0\n" |
176 | "2:\ttestb %%al,%%al\n\t" | 180 | "2:\ttestb %%al,%%al\n\t" |
177 | "jne 1b" | 181 | "jne 1b" |
178 | :"=g" (__res), "=&S" (d0), "=&a" (d1) :"0" (0),"1" (s),"2" (c)); | 182 | :"=g" (__res), "=&S" (d0), "=&a" (d1) |
183 | :"0" (0),"1" (s),"2" (c) | ||
184 | :"memory"); | ||
179 | return __res; | 185 | return __res; |
180 | } | 186 | } |
181 | 187 | ||
@@ -189,7 +195,9 @@ __asm__ __volatile__( | |||
189 | "scasb\n\t" | 195 | "scasb\n\t" |
190 | "notl %0\n\t" | 196 | "notl %0\n\t" |
191 | "decl %0" | 197 | "decl %0" |
192 | :"=c" (__res), "=&D" (d0) :"1" (s),"a" (0), "0" (0xffffffffu)); | 198 | :"=c" (__res), "=&D" (d0) |
199 | :"1" (s),"a" (0), "0" (0xffffffffu) | ||
200 | :"memory"); | ||
193 | return __res; | 201 | return __res; |
194 | } | 202 | } |
195 | 203 | ||
@@ -333,7 +341,9 @@ __asm__ __volatile__( | |||
333 | "je 1f\n\t" | 341 | "je 1f\n\t" |
334 | "movl $1,%0\n" | 342 | "movl $1,%0\n" |
335 | "1:\tdecl %0" | 343 | "1:\tdecl %0" |
336 | :"=D" (__res), "=&c" (d0) : "a" (c),"0" (cs),"1" (count)); | 344 | :"=D" (__res), "=&c" (d0) |
345 | :"a" (c),"0" (cs),"1" (count) | ||
346 | :"memory"); | ||
337 | return __res; | 347 | return __res; |
338 | } | 348 | } |
339 | 349 | ||
@@ -369,7 +379,7 @@ __asm__ __volatile__( | |||
369 | "je 2f\n\t" | 379 | "je 2f\n\t" |
370 | "stosb\n" | 380 | "stosb\n" |
371 | "2:" | 381 | "2:" |
372 | : "=&c" (d0), "=&D" (d1) | 382 | :"=&c" (d0), "=&D" (d1) |
373 | :"a" (c), "q" (count), "0" (count/4), "1" ((long) s) | 383 | :"a" (c), "q" (count), "0" (count/4), "1" ((long) s) |
374 | :"memory"); | 384 | :"memory"); |
375 | return (s); | 385 | return (s); |
@@ -392,7 +402,8 @@ __asm__ __volatile__( | |||
392 | "jne 1b\n" | 402 | "jne 1b\n" |
393 | "3:\tsubl %2,%0" | 403 | "3:\tsubl %2,%0" |
394 | :"=a" (__res), "=&d" (d0) | 404 | :"=a" (__res), "=&d" (d0) |
395 | :"c" (s),"1" (count)); | 405 | :"c" (s),"1" (count) |
406 | :"memory"); | ||
396 | return __res; | 407 | return __res; |
397 | } | 408 | } |
398 | /* end of additional stuff */ | 409 | /* end of additional stuff */ |
@@ -473,7 +484,8 @@ static inline void * memscan(void * addr, int c, size_t size) | |||
473 | "dec %%edi\n" | 484 | "dec %%edi\n" |
474 | "1:" | 485 | "1:" |
475 | : "=D" (addr), "=c" (size) | 486 | : "=D" (addr), "=c" (size) |
476 | : "0" (addr), "1" (size), "a" (c)); | 487 | : "0" (addr), "1" (size), "a" (c) |
488 | : "memory"); | ||
477 | return addr; | 489 | return addr; |
478 | } | 490 | } |
479 | 491 | ||
diff --git a/include/asm-i386/thread_info.h b/include/asm-i386/thread_info.h index 2cd57271801d..95add81237ea 100644 --- a/include/asm-i386/thread_info.h +++ b/include/asm-i386/thread_info.h | |||
@@ -31,7 +31,7 @@ struct thread_info { | |||
31 | unsigned long flags; /* low level flags */ | 31 | unsigned long flags; /* low level flags */ |
32 | unsigned long status; /* thread-synchronous flags */ | 32 | unsigned long status; /* thread-synchronous flags */ |
33 | __u32 cpu; /* current CPU */ | 33 | __u32 cpu; /* current CPU */ |
34 | __s32 preempt_count; /* 0 => preemptable, <0 => BUG */ | 34 | int preempt_count; /* 0 => preemptable, <0 => BUG */ |
35 | 35 | ||
36 | 36 | ||
37 | mm_segment_t addr_limit; /* thread address space: | 37 | mm_segment_t addr_limit; /* thread address space: |
diff --git a/include/asm-i386/timer.h b/include/asm-i386/timer.h index c34709849839..dcf1e07db08a 100644 --- a/include/asm-i386/timer.h +++ b/include/asm-i386/timer.h | |||
@@ -22,6 +22,7 @@ struct timer_opts { | |||
22 | unsigned long (*get_offset)(void); | 22 | unsigned long (*get_offset)(void); |
23 | unsigned long long (*monotonic_clock)(void); | 23 | unsigned long long (*monotonic_clock)(void); |
24 | void (*delay)(unsigned long); | 24 | void (*delay)(unsigned long); |
25 | unsigned long (*read_timer)(void); | ||
25 | }; | 26 | }; |
26 | 27 | ||
27 | struct init_timer_opts { | 28 | struct init_timer_opts { |
@@ -52,6 +53,7 @@ extern struct init_timer_opts timer_cyclone_init; | |||
52 | #endif | 53 | #endif |
53 | 54 | ||
54 | extern unsigned long calibrate_tsc(void); | 55 | extern unsigned long calibrate_tsc(void); |
56 | extern unsigned long read_timer_tsc(void); | ||
55 | extern void init_cpu_khz(void); | 57 | extern void init_cpu_khz(void); |
56 | extern int recalibrate_cpu_khz(void); | 58 | extern int recalibrate_cpu_khz(void); |
57 | #ifdef CONFIG_HPET_TIMER | 59 | #ifdef CONFIG_HPET_TIMER |
diff --git a/include/asm-i386/timex.h b/include/asm-i386/timex.h index b41e484c3445..292b5a68f627 100644 --- a/include/asm-i386/timex.h +++ b/include/asm-i386/timex.h | |||
@@ -47,6 +47,9 @@ static inline cycles_t get_cycles (void) | |||
47 | return ret; | 47 | return ret; |
48 | } | 48 | } |
49 | 49 | ||
50 | extern unsigned long cpu_khz; | 50 | extern unsigned int cpu_khz; |
51 | |||
52 | extern int read_current_timer(unsigned long *timer_value); | ||
53 | #define ARCH_HAS_READ_CURRENT_TIMER 1 | ||
51 | 54 | ||
52 | #endif | 55 | #endif |
diff --git a/include/asm-i386/tlbflush.h b/include/asm-i386/tlbflush.h index f22fab0cea26..ab216e1370ef 100644 --- a/include/asm-i386/tlbflush.h +++ b/include/asm-i386/tlbflush.h | |||
@@ -22,16 +22,18 @@ | |||
22 | */ | 22 | */ |
23 | #define __flush_tlb_global() \ | 23 | #define __flush_tlb_global() \ |
24 | do { \ | 24 | do { \ |
25 | unsigned int tmpreg; \ | 25 | unsigned int tmpreg, cr4, cr4_orig; \ |
26 | \ | 26 | \ |
27 | __asm__ __volatile__( \ | 27 | __asm__ __volatile__( \ |
28 | "movl %1, %%cr4; # turn off PGE \n" \ | 28 | "movl %%cr4, %2; # turn off PGE \n" \ |
29 | "movl %2, %1; \n" \ | ||
30 | "andl %3, %1; \n" \ | ||
31 | "movl %1, %%cr4; \n" \ | ||
29 | "movl %%cr3, %0; \n" \ | 32 | "movl %%cr3, %0; \n" \ |
30 | "movl %0, %%cr3; # flush TLB \n" \ | 33 | "movl %0, %%cr3; # flush TLB \n" \ |
31 | "movl %2, %%cr4; # turn PGE back on \n" \ | 34 | "movl %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-i386/topology.h b/include/asm-i386/topology.h index 98f9e6850cba..2461b731781e 100644 --- a/include/asm-i386/topology.h +++ b/include/asm-i386/topology.h | |||
@@ -60,12 +60,8 @@ static inline int node_to_first_cpu(int node) | |||
60 | return first_cpu(mask); | 60 | return first_cpu(mask); |
61 | } | 61 | } |
62 | 62 | ||
63 | /* Returns the number of the node containing PCI bus number 'busnr' */ | 63 | #define pcibus_to_node(bus) mp_bus_id_to_node[(bus)->number] |
64 | static inline cpumask_t __pcibus_to_cpumask(int busnr) | 64 | #define pcibus_to_cpumask(bus) node_to_cpumask(pcibus_to_node(bus)) |
65 | { | ||
66 | return node_to_cpumask(mp_bus_id_to_node[busnr]); | ||
67 | } | ||
68 | #define pcibus_to_cpumask(bus) __pcibus_to_cpumask(bus->number) | ||
69 | 65 | ||
70 | /* sched_domains SD_NODE_INIT for NUMAQ machines */ | 66 | /* sched_domains SD_NODE_INIT for NUMAQ machines */ |
71 | #define SD_NODE_INIT (struct sched_domain) { \ | 67 | #define SD_NODE_INIT (struct sched_domain) { \ |
@@ -78,11 +74,14 @@ static inline cpumask_t __pcibus_to_cpumask(int busnr) | |||
78 | .imbalance_pct = 125, \ | 74 | .imbalance_pct = 125, \ |
79 | .cache_hot_time = (10*1000000), \ | 75 | .cache_hot_time = (10*1000000), \ |
80 | .cache_nice_tries = 1, \ | 76 | .cache_nice_tries = 1, \ |
77 | .busy_idx = 3, \ | ||
78 | .idle_idx = 1, \ | ||
79 | .newidle_idx = 2, \ | ||
80 | .wake_idx = 1, \ | ||
81 | .per_cpu_gain = 100, \ | 81 | .per_cpu_gain = 100, \ |
82 | .flags = SD_LOAD_BALANCE \ | 82 | .flags = SD_LOAD_BALANCE \ |
83 | | SD_BALANCE_EXEC \ | 83 | | SD_BALANCE_EXEC \ |
84 | | SD_BALANCE_NEWIDLE \ | 84 | | SD_BALANCE_FORK \ |
85 | | SD_WAKE_IDLE \ | ||
86 | | SD_WAKE_BALANCE, \ | 85 | | SD_WAKE_BALANCE, \ |
87 | .last_balance = jiffies, \ | 86 | .last_balance = jiffies, \ |
88 | .balance_interval = 1, \ | 87 | .balance_interval = 1, \ |
diff --git a/include/asm-i386/unistd.h b/include/asm-i386/unistd.h index 61bcc1b1e3f4..e25e4c71a879 100644 --- a/include/asm-i386/unistd.h +++ b/include/asm-i386/unistd.h | |||
@@ -256,7 +256,7 @@ | |||
256 | #define __NR_io_submit 248 | 256 | #define __NR_io_submit 248 |
257 | #define __NR_io_cancel 249 | 257 | #define __NR_io_cancel 249 |
258 | #define __NR_fadvise64 250 | 258 | #define __NR_fadvise64 250 |
259 | 259 | #define __NR_set_zone_reclaim 251 | |
260 | #define __NR_exit_group 252 | 260 | #define __NR_exit_group 252 |
261 | #define __NR_lookup_dcookie 253 | 261 | #define __NR_lookup_dcookie 253 |
262 | #define __NR_epoll_create 254 | 262 | #define __NR_epoll_create 254 |
@@ -294,8 +294,10 @@ | |||
294 | #define __NR_add_key 286 | 294 | #define __NR_add_key 286 |
295 | #define __NR_request_key 287 | 295 | #define __NR_request_key 287 |
296 | #define __NR_keyctl 288 | 296 | #define __NR_keyctl 288 |
297 | #define __NR_ioprio_set 289 | ||
298 | #define __NR_ioprio_get 290 | ||
297 | 299 | ||
298 | #define NR_syscalls 289 | 300 | #define NR_syscalls 291 |
299 | 301 | ||
300 | /* | 302 | /* |
301 | * user-visible error numbers are in the range -1 - -128: see | 303 | * user-visible error numbers are in the range -1 - -128: see |