diff options
author | Paul Mundt <lethal@linux-sh.org> | 2011-07-13 04:02:12 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2011-07-13 04:02:12 -0400 |
commit | 4af358f81881e1d083a916c9269b5ac0936e180d (patch) | |
tree | c0533d3268daccb6f06f1180aa1ae8f1aac17d36 /arch/x86 | |
parent | 7653aaab775d4c205a7dce52850c8e3d4f31d4ea (diff) | |
parent | b63d10130e68aa6480cc1b2483d7c5ce57a05481 (diff) |
Merge branch 'fbdev/stable-updates'
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/include/asm/apb_timer.h | 2 | ||||
-rw-r--r-- | arch/x86/include/asm/mmzone_32.h | 13 | ||||
-rw-r--r-- | arch/x86/include/asm/mmzone_64.h | 3 | ||||
-rw-r--r-- | arch/x86/kernel/acpi/realmode/wakeup.S | 14 | ||||
-rw-r--r-- | arch/x86/kernel/acpi/realmode/wakeup.h | 6 | ||||
-rw-r--r-- | arch/x86/kernel/acpi/sleep.c | 6 | ||||
-rw-r--r-- | arch/x86/kernel/reboot.c | 8 | ||||
-rw-r--r-- | arch/x86/kvm/emulate.c | 12 | ||||
-rw-r--r-- | arch/x86/mm/init_64.c | 3 | ||||
-rw-r--r-- | arch/x86/oprofile/nmi_int.c | 14 | ||||
-rw-r--r-- | arch/x86/pci/acpi.c | 2 | ||||
-rw-r--r-- | arch/x86/pci/xen.c | 40 | ||||
-rw-r--r-- | arch/x86/platform/efi/efi.c | 3 | ||||
-rw-r--r-- | arch/x86/xen/mmu.c | 4 |
14 files changed, 91 insertions, 39 deletions
diff --git a/arch/x86/include/asm/apb_timer.h b/arch/x86/include/asm/apb_timer.h index 2fefa501d3ba..af60d8a2e288 100644 --- a/arch/x86/include/asm/apb_timer.h +++ b/arch/x86/include/asm/apb_timer.h | |||
@@ -62,7 +62,7 @@ extern int sfi_mtimer_num; | |||
62 | #else /* CONFIG_APB_TIMER */ | 62 | #else /* CONFIG_APB_TIMER */ |
63 | 63 | ||
64 | static inline unsigned long apbt_quick_calibrate(void) {return 0; } | 64 | static inline unsigned long apbt_quick_calibrate(void) {return 0; } |
65 | static inline void apbt_time_init(void) {return 0; } | 65 | static inline void apbt_time_init(void) { } |
66 | 66 | ||
67 | #endif | 67 | #endif |
68 | #endif /* ASM_X86_APBT_H */ | 68 | #endif /* ASM_X86_APBT_H */ |
diff --git a/arch/x86/include/asm/mmzone_32.h b/arch/x86/include/asm/mmzone_32.h index 5e83a416eca8..ffa037f28d39 100644 --- a/arch/x86/include/asm/mmzone_32.h +++ b/arch/x86/include/asm/mmzone_32.h | |||
@@ -48,17 +48,6 @@ static inline int pfn_to_nid(unsigned long pfn) | |||
48 | #endif | 48 | #endif |
49 | } | 49 | } |
50 | 50 | ||
51 | /* | ||
52 | * Following are macros that each numa implmentation must define. | ||
53 | */ | ||
54 | |||
55 | #define node_start_pfn(nid) (NODE_DATA(nid)->node_start_pfn) | ||
56 | #define node_end_pfn(nid) \ | ||
57 | ({ \ | ||
58 | pg_data_t *__pgdat = NODE_DATA(nid); \ | ||
59 | __pgdat->node_start_pfn + __pgdat->node_spanned_pages; \ | ||
60 | }) | ||
61 | |||
62 | static inline int pfn_valid(int pfn) | 51 | static inline int pfn_valid(int pfn) |
63 | { | 52 | { |
64 | int nid = pfn_to_nid(pfn); | 53 | int nid = pfn_to_nid(pfn); |
@@ -68,6 +57,8 @@ static inline int pfn_valid(int pfn) | |||
68 | return 0; | 57 | return 0; |
69 | } | 58 | } |
70 | 59 | ||
60 | #define early_pfn_valid(pfn) pfn_valid((pfn)) | ||
61 | |||
71 | #endif /* CONFIG_DISCONTIGMEM */ | 62 | #endif /* CONFIG_DISCONTIGMEM */ |
72 | 63 | ||
73 | #ifdef CONFIG_NEED_MULTIPLE_NODES | 64 | #ifdef CONFIG_NEED_MULTIPLE_NODES |
diff --git a/arch/x86/include/asm/mmzone_64.h b/arch/x86/include/asm/mmzone_64.h index b3f88d7867c7..129d9aa3ceb3 100644 --- a/arch/x86/include/asm/mmzone_64.h +++ b/arch/x86/include/asm/mmzone_64.h | |||
@@ -13,8 +13,5 @@ extern struct pglist_data *node_data[]; | |||
13 | 13 | ||
14 | #define NODE_DATA(nid) (node_data[nid]) | 14 | #define NODE_DATA(nid) (node_data[nid]) |
15 | 15 | ||
16 | #define node_start_pfn(nid) (NODE_DATA(nid)->node_start_pfn) | ||
17 | #define node_end_pfn(nid) (NODE_DATA(nid)->node_start_pfn + \ | ||
18 | NODE_DATA(nid)->node_spanned_pages) | ||
19 | #endif | 16 | #endif |
20 | #endif /* _ASM_X86_MMZONE_64_H */ | 17 | #endif /* _ASM_X86_MMZONE_64_H */ |
diff --git a/arch/x86/kernel/acpi/realmode/wakeup.S b/arch/x86/kernel/acpi/realmode/wakeup.S index ead21b663117..b4fd836e4053 100644 --- a/arch/x86/kernel/acpi/realmode/wakeup.S +++ b/arch/x86/kernel/acpi/realmode/wakeup.S | |||
@@ -28,6 +28,8 @@ pmode_cr3: .long 0 /* Saved %cr3 */ | |||
28 | pmode_cr4: .long 0 /* Saved %cr4 */ | 28 | pmode_cr4: .long 0 /* Saved %cr4 */ |
29 | pmode_efer: .quad 0 /* Saved EFER */ | 29 | pmode_efer: .quad 0 /* Saved EFER */ |
30 | pmode_gdt: .quad 0 | 30 | pmode_gdt: .quad 0 |
31 | pmode_misc_en: .quad 0 /* Saved MISC_ENABLE MSR */ | ||
32 | pmode_behavior: .long 0 /* Wakeup behavior flags */ | ||
31 | realmode_flags: .long 0 | 33 | realmode_flags: .long 0 |
32 | real_magic: .long 0 | 34 | real_magic: .long 0 |
33 | trampoline_segment: .word 0 | 35 | trampoline_segment: .word 0 |
@@ -91,6 +93,18 @@ wakeup_code: | |||
91 | /* Call the C code */ | 93 | /* Call the C code */ |
92 | calll main | 94 | calll main |
93 | 95 | ||
96 | /* Restore MISC_ENABLE before entering protected mode, in case | ||
97 | BIOS decided to clear XD_DISABLE during S3. */ | ||
98 | movl pmode_behavior, %eax | ||
99 | btl $WAKEUP_BEHAVIOR_RESTORE_MISC_ENABLE, %eax | ||
100 | jnc 1f | ||
101 | |||
102 | movl pmode_misc_en, %eax | ||
103 | movl pmode_misc_en + 4, %edx | ||
104 | movl $MSR_IA32_MISC_ENABLE, %ecx | ||
105 | wrmsr | ||
106 | 1: | ||
107 | |||
94 | /* Do any other stuff... */ | 108 | /* Do any other stuff... */ |
95 | 109 | ||
96 | #ifndef CONFIG_64BIT | 110 | #ifndef CONFIG_64BIT |
diff --git a/arch/x86/kernel/acpi/realmode/wakeup.h b/arch/x86/kernel/acpi/realmode/wakeup.h index e1828c07e79c..97a29e1430e3 100644 --- a/arch/x86/kernel/acpi/realmode/wakeup.h +++ b/arch/x86/kernel/acpi/realmode/wakeup.h | |||
@@ -21,6 +21,9 @@ struct wakeup_header { | |||
21 | u32 pmode_efer_low; /* Protected mode EFER */ | 21 | u32 pmode_efer_low; /* Protected mode EFER */ |
22 | u32 pmode_efer_high; | 22 | u32 pmode_efer_high; |
23 | u64 pmode_gdt; | 23 | u64 pmode_gdt; |
24 | u32 pmode_misc_en_low; /* Protected mode MISC_ENABLE */ | ||
25 | u32 pmode_misc_en_high; | ||
26 | u32 pmode_behavior; /* Wakeup routine behavior flags */ | ||
24 | u32 realmode_flags; | 27 | u32 realmode_flags; |
25 | u32 real_magic; | 28 | u32 real_magic; |
26 | u16 trampoline_segment; /* segment with trampoline code, 64-bit only */ | 29 | u16 trampoline_segment; /* segment with trampoline code, 64-bit only */ |
@@ -39,4 +42,7 @@ extern struct wakeup_header wakeup_header; | |||
39 | #define WAKEUP_HEADER_SIGNATURE 0x51ee1111 | 42 | #define WAKEUP_HEADER_SIGNATURE 0x51ee1111 |
40 | #define WAKEUP_END_SIGNATURE 0x65a22c82 | 43 | #define WAKEUP_END_SIGNATURE 0x65a22c82 |
41 | 44 | ||
45 | /* Wakeup behavior bits */ | ||
46 | #define WAKEUP_BEHAVIOR_RESTORE_MISC_ENABLE 0 | ||
47 | |||
42 | #endif /* ARCH_X86_KERNEL_ACPI_RM_WAKEUP_H */ | 48 | #endif /* ARCH_X86_KERNEL_ACPI_RM_WAKEUP_H */ |
diff --git a/arch/x86/kernel/acpi/sleep.c b/arch/x86/kernel/acpi/sleep.c index 18a857ba7a25..103b6ab368d3 100644 --- a/arch/x86/kernel/acpi/sleep.c +++ b/arch/x86/kernel/acpi/sleep.c | |||
@@ -77,6 +77,12 @@ int acpi_suspend_lowlevel(void) | |||
77 | 77 | ||
78 | header->pmode_cr0 = read_cr0(); | 78 | header->pmode_cr0 = read_cr0(); |
79 | header->pmode_cr4 = read_cr4_safe(); | 79 | header->pmode_cr4 = read_cr4_safe(); |
80 | header->pmode_behavior = 0; | ||
81 | if (!rdmsr_safe(MSR_IA32_MISC_ENABLE, | ||
82 | &header->pmode_misc_en_low, | ||
83 | &header->pmode_misc_en_high)) | ||
84 | header->pmode_behavior |= | ||
85 | (1 << WAKEUP_BEHAVIOR_RESTORE_MISC_ENABLE); | ||
80 | header->realmode_flags = acpi_realmode_flags; | 86 | header->realmode_flags = acpi_realmode_flags; |
81 | header->real_magic = 0x12345678; | 87 | header->real_magic = 0x12345678; |
82 | 88 | ||
diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c index 0c016f727695..4f0d46fefa7f 100644 --- a/arch/x86/kernel/reboot.c +++ b/arch/x86/kernel/reboot.c | |||
@@ -294,6 +294,14 @@ static struct dmi_system_id __initdata reboot_dmi_table[] = { | |||
294 | DMI_MATCH(DMI_BOARD_NAME, "VersaLogic Menlow board"), | 294 | DMI_MATCH(DMI_BOARD_NAME, "VersaLogic Menlow board"), |
295 | }, | 295 | }, |
296 | }, | 296 | }, |
297 | { /* Handle reboot issue on Acer Aspire one */ | ||
298 | .callback = set_bios_reboot, | ||
299 | .ident = "Acer Aspire One A110", | ||
300 | .matches = { | ||
301 | DMI_MATCH(DMI_SYS_VENDOR, "Acer"), | ||
302 | DMI_MATCH(DMI_PRODUCT_NAME, "AOA110"), | ||
303 | }, | ||
304 | }, | ||
297 | { } | 305 | { } |
298 | }; | 306 | }; |
299 | 307 | ||
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 6df88c7885c0..adc98675cda0 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c | |||
@@ -3372,7 +3372,7 @@ x86_decode_insn(struct x86_emulate_ctxt *ctxt, void *insn, int insn_len) | |||
3372 | int def_op_bytes, def_ad_bytes, goffset, simd_prefix; | 3372 | int def_op_bytes, def_ad_bytes, goffset, simd_prefix; |
3373 | bool op_prefix = false; | 3373 | bool op_prefix = false; |
3374 | struct opcode opcode; | 3374 | struct opcode opcode; |
3375 | struct operand memop = { .type = OP_NONE }; | 3375 | struct operand memop = { .type = OP_NONE }, *memopp = NULL; |
3376 | 3376 | ||
3377 | c->eip = ctxt->eip; | 3377 | c->eip = ctxt->eip; |
3378 | c->fetch.start = c->eip; | 3378 | c->fetch.start = c->eip; |
@@ -3547,9 +3547,6 @@ done_prefixes: | |||
3547 | if (memop.type == OP_MEM && c->ad_bytes != 8) | 3547 | if (memop.type == OP_MEM && c->ad_bytes != 8) |
3548 | memop.addr.mem.ea = (u32)memop.addr.mem.ea; | 3548 | memop.addr.mem.ea = (u32)memop.addr.mem.ea; |
3549 | 3549 | ||
3550 | if (memop.type == OP_MEM && c->rip_relative) | ||
3551 | memop.addr.mem.ea += c->eip; | ||
3552 | |||
3553 | /* | 3550 | /* |
3554 | * Decode and fetch the source operand: register, memory | 3551 | * Decode and fetch the source operand: register, memory |
3555 | * or immediate. | 3552 | * or immediate. |
@@ -3571,6 +3568,7 @@ done_prefixes: | |||
3571 | c->op_bytes; | 3568 | c->op_bytes; |
3572 | srcmem_common: | 3569 | srcmem_common: |
3573 | c->src = memop; | 3570 | c->src = memop; |
3571 | memopp = &c->src; | ||
3574 | break; | 3572 | break; |
3575 | case SrcImmU16: | 3573 | case SrcImmU16: |
3576 | rc = decode_imm(ctxt, &c->src, 2, false); | 3574 | rc = decode_imm(ctxt, &c->src, 2, false); |
@@ -3667,6 +3665,7 @@ done_prefixes: | |||
3667 | case DstMem: | 3665 | case DstMem: |
3668 | case DstMem64: | 3666 | case DstMem64: |
3669 | c->dst = memop; | 3667 | c->dst = memop; |
3668 | memopp = &c->dst; | ||
3670 | if ((c->d & DstMask) == DstMem64) | 3669 | if ((c->d & DstMask) == DstMem64) |
3671 | c->dst.bytes = 8; | 3670 | c->dst.bytes = 8; |
3672 | else | 3671 | else |
@@ -3700,10 +3699,13 @@ done_prefixes: | |||
3700 | /* Special instructions do their own operand decoding. */ | 3699 | /* Special instructions do their own operand decoding. */ |
3701 | default: | 3700 | default: |
3702 | c->dst.type = OP_NONE; /* Disable writeback. */ | 3701 | c->dst.type = OP_NONE; /* Disable writeback. */ |
3703 | return 0; | 3702 | break; |
3704 | } | 3703 | } |
3705 | 3704 | ||
3706 | done: | 3705 | done: |
3706 | if (memopp && memopp->type == OP_MEM && c->rip_relative) | ||
3707 | memopp->addr.mem.ea += c->eip; | ||
3708 | |||
3707 | return (rc == X86EMUL_UNHANDLEABLE) ? EMULATION_FAILED : EMULATION_OK; | 3709 | return (rc == X86EMUL_UNHANDLEABLE) ? EMULATION_FAILED : EMULATION_OK; |
3708 | } | 3710 | } |
3709 | 3711 | ||
diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c index d865c4aeec55..bbaaa005bf0e 100644 --- a/arch/x86/mm/init_64.c +++ b/arch/x86/mm/init_64.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/poison.h> | 28 | #include <linux/poison.h> |
29 | #include <linux/dma-mapping.h> | 29 | #include <linux/dma-mapping.h> |
30 | #include <linux/module.h> | 30 | #include <linux/module.h> |
31 | #include <linux/memory.h> | ||
31 | #include <linux/memory_hotplug.h> | 32 | #include <linux/memory_hotplug.h> |
32 | #include <linux/nmi.h> | 33 | #include <linux/nmi.h> |
33 | #include <linux/gfp.h> | 34 | #include <linux/gfp.h> |
@@ -895,8 +896,6 @@ const char *arch_vma_name(struct vm_area_struct *vma) | |||
895 | } | 896 | } |
896 | 897 | ||
897 | #ifdef CONFIG_X86_UV | 898 | #ifdef CONFIG_X86_UV |
898 | #define MIN_MEMORY_BLOCK_SIZE (1 << SECTION_SIZE_BITS) | ||
899 | |||
900 | unsigned long memory_block_size_bytes(void) | 899 | unsigned long memory_block_size_bytes(void) |
901 | { | 900 | { |
902 | if (is_uv_system()) { | 901 | if (is_uv_system()) { |
diff --git a/arch/x86/oprofile/nmi_int.c b/arch/x86/oprofile/nmi_int.c index cf9750004a08..68894fdc034b 100644 --- a/arch/x86/oprofile/nmi_int.c +++ b/arch/x86/oprofile/nmi_int.c | |||
@@ -112,8 +112,10 @@ static void nmi_cpu_start(void *dummy) | |||
112 | static int nmi_start(void) | 112 | static int nmi_start(void) |
113 | { | 113 | { |
114 | get_online_cpus(); | 114 | get_online_cpus(); |
115 | on_each_cpu(nmi_cpu_start, NULL, 1); | ||
116 | ctr_running = 1; | 115 | ctr_running = 1; |
116 | /* make ctr_running visible to the nmi handler: */ | ||
117 | smp_mb(); | ||
118 | on_each_cpu(nmi_cpu_start, NULL, 1); | ||
117 | put_online_cpus(); | 119 | put_online_cpus(); |
118 | return 0; | 120 | return 0; |
119 | } | 121 | } |
@@ -504,15 +506,18 @@ static int nmi_setup(void) | |||
504 | 506 | ||
505 | nmi_enabled = 0; | 507 | nmi_enabled = 0; |
506 | ctr_running = 0; | 508 | ctr_running = 0; |
507 | barrier(); | 509 | /* make variables visible to the nmi handler: */ |
510 | smp_mb(); | ||
508 | err = register_die_notifier(&profile_exceptions_nb); | 511 | err = register_die_notifier(&profile_exceptions_nb); |
509 | if (err) | 512 | if (err) |
510 | goto fail; | 513 | goto fail; |
511 | 514 | ||
512 | get_online_cpus(); | 515 | get_online_cpus(); |
513 | register_cpu_notifier(&oprofile_cpu_nb); | 516 | register_cpu_notifier(&oprofile_cpu_nb); |
514 | on_each_cpu(nmi_cpu_setup, NULL, 1); | ||
515 | nmi_enabled = 1; | 517 | nmi_enabled = 1; |
518 | /* make nmi_enabled visible to the nmi handler: */ | ||
519 | smp_mb(); | ||
520 | on_each_cpu(nmi_cpu_setup, NULL, 1); | ||
516 | put_online_cpus(); | 521 | put_online_cpus(); |
517 | 522 | ||
518 | return 0; | 523 | return 0; |
@@ -531,7 +536,8 @@ static void nmi_shutdown(void) | |||
531 | nmi_enabled = 0; | 536 | nmi_enabled = 0; |
532 | ctr_running = 0; | 537 | ctr_running = 0; |
533 | put_online_cpus(); | 538 | put_online_cpus(); |
534 | barrier(); | 539 | /* make variables visible to the nmi handler: */ |
540 | smp_mb(); | ||
535 | unregister_die_notifier(&profile_exceptions_nb); | 541 | unregister_die_notifier(&profile_exceptions_nb); |
536 | msrs = &get_cpu_var(cpu_msrs); | 542 | msrs = &get_cpu_var(cpu_msrs); |
537 | model->shutdown(msrs); | 543 | model->shutdown(msrs); |
diff --git a/arch/x86/pci/acpi.c b/arch/x86/pci/acpi.c index 0972315c3860..68c3c1395202 100644 --- a/arch/x86/pci/acpi.c +++ b/arch/x86/pci/acpi.c | |||
@@ -188,7 +188,7 @@ static bool resource_contains(struct resource *res, resource_size_t point) | |||
188 | return false; | 188 | return false; |
189 | } | 189 | } |
190 | 190 | ||
191 | static void coalesce_windows(struct pci_root_info *info, int type) | 191 | static void coalesce_windows(struct pci_root_info *info, unsigned long type) |
192 | { | 192 | { |
193 | int i, j; | 193 | int i, j; |
194 | struct resource *res1, *res2; | 194 | struct resource *res1, *res2; |
diff --git a/arch/x86/pci/xen.c b/arch/x86/pci/xen.c index 8214724ce54d..f567965c0620 100644 --- a/arch/x86/pci/xen.c +++ b/arch/x86/pci/xen.c | |||
@@ -327,7 +327,7 @@ int __init pci_xen_hvm_init(void) | |||
327 | } | 327 | } |
328 | 328 | ||
329 | #ifdef CONFIG_XEN_DOM0 | 329 | #ifdef CONFIG_XEN_DOM0 |
330 | static int xen_register_pirq(u32 gsi, int triggering) | 330 | static int xen_register_pirq(u32 gsi, int gsi_override, int triggering) |
331 | { | 331 | { |
332 | int rc, pirq, irq = -1; | 332 | int rc, pirq, irq = -1; |
333 | struct physdev_map_pirq map_irq; | 333 | struct physdev_map_pirq map_irq; |
@@ -344,16 +344,18 @@ static int xen_register_pirq(u32 gsi, int triggering) | |||
344 | shareable = 1; | 344 | shareable = 1; |
345 | name = "ioapic-level"; | 345 | name = "ioapic-level"; |
346 | } | 346 | } |
347 | |||
348 | pirq = xen_allocate_pirq_gsi(gsi); | 347 | pirq = xen_allocate_pirq_gsi(gsi); |
349 | if (pirq < 0) | 348 | if (pirq < 0) |
350 | goto out; | 349 | goto out; |
351 | 350 | ||
352 | irq = xen_bind_pirq_gsi_to_irq(gsi, pirq, shareable, name); | 351 | if (gsi_override >= 0) |
352 | irq = xen_bind_pirq_gsi_to_irq(gsi_override, pirq, shareable, name); | ||
353 | else | ||
354 | irq = xen_bind_pirq_gsi_to_irq(gsi, pirq, shareable, name); | ||
353 | if (irq < 0) | 355 | if (irq < 0) |
354 | goto out; | 356 | goto out; |
355 | 357 | ||
356 | printk(KERN_DEBUG "xen: --> pirq=%d -> irq=%d\n", pirq, irq); | 358 | printk(KERN_DEBUG "xen: --> pirq=%d -> irq=%d (gsi=%d)\n", pirq, irq, gsi); |
357 | 359 | ||
358 | map_irq.domid = DOMID_SELF; | 360 | map_irq.domid = DOMID_SELF; |
359 | map_irq.type = MAP_PIRQ_TYPE_GSI; | 361 | map_irq.type = MAP_PIRQ_TYPE_GSI; |
@@ -370,7 +372,7 @@ out: | |||
370 | return irq; | 372 | return irq; |
371 | } | 373 | } |
372 | 374 | ||
373 | static int xen_register_gsi(u32 gsi, int triggering, int polarity) | 375 | static int xen_register_gsi(u32 gsi, int gsi_override, int triggering, int polarity) |
374 | { | 376 | { |
375 | int rc, irq; | 377 | int rc, irq; |
376 | struct physdev_setup_gsi setup_gsi; | 378 | struct physdev_setup_gsi setup_gsi; |
@@ -381,7 +383,7 @@ static int xen_register_gsi(u32 gsi, int triggering, int polarity) | |||
381 | printk(KERN_DEBUG "xen: registering gsi %u triggering %d polarity %d\n", | 383 | printk(KERN_DEBUG "xen: registering gsi %u triggering %d polarity %d\n", |
382 | gsi, triggering, polarity); | 384 | gsi, triggering, polarity); |
383 | 385 | ||
384 | irq = xen_register_pirq(gsi, triggering); | 386 | irq = xen_register_pirq(gsi, gsi_override, triggering); |
385 | 387 | ||
386 | setup_gsi.gsi = gsi; | 388 | setup_gsi.gsi = gsi; |
387 | setup_gsi.triggering = (triggering == ACPI_EDGE_SENSITIVE ? 0 : 1); | 389 | setup_gsi.triggering = (triggering == ACPI_EDGE_SENSITIVE ? 0 : 1); |
@@ -403,6 +405,8 @@ static __init void xen_setup_acpi_sci(void) | |||
403 | int rc; | 405 | int rc; |
404 | int trigger, polarity; | 406 | int trigger, polarity; |
405 | int gsi = acpi_sci_override_gsi; | 407 | int gsi = acpi_sci_override_gsi; |
408 | int irq = -1; | ||
409 | int gsi_override = -1; | ||
406 | 410 | ||
407 | if (!gsi) | 411 | if (!gsi) |
408 | return; | 412 | return; |
@@ -419,7 +423,25 @@ static __init void xen_setup_acpi_sci(void) | |||
419 | printk(KERN_INFO "xen: sci override: global_irq=%d trigger=%d " | 423 | printk(KERN_INFO "xen: sci override: global_irq=%d trigger=%d " |
420 | "polarity=%d\n", gsi, trigger, polarity); | 424 | "polarity=%d\n", gsi, trigger, polarity); |
421 | 425 | ||
422 | gsi = xen_register_gsi(gsi, trigger, polarity); | 426 | /* Before we bind the GSI to a Linux IRQ, check whether |
427 | * we need to override it with bus_irq (IRQ) value. Usually for | ||
428 | * IRQs below IRQ_LEGACY_IRQ this holds IRQ == GSI, as so: | ||
429 | * ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 low level) | ||
430 | * but there are oddballs where the IRQ != GSI: | ||
431 | * ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 20 low level) | ||
432 | * which ends up being: gsi_to_irq[9] == 20 | ||
433 | * (which is what acpi_gsi_to_irq ends up calling when starting the | ||
434 | * the ACPI interpreter and keels over since IRQ 9 has not been | ||
435 | * setup as we had setup IRQ 20 for it). | ||
436 | */ | ||
437 | /* Check whether the GSI != IRQ */ | ||
438 | if (acpi_gsi_to_irq(gsi, &irq) == 0) { | ||
439 | if (irq >= 0 && irq != gsi) | ||
440 | /* Bugger, we MUST have that IRQ. */ | ||
441 | gsi_override = irq; | ||
442 | } | ||
443 | |||
444 | gsi = xen_register_gsi(gsi, gsi_override, trigger, polarity); | ||
423 | printk(KERN_INFO "xen: acpi sci %d\n", gsi); | 445 | printk(KERN_INFO "xen: acpi sci %d\n", gsi); |
424 | 446 | ||
425 | return; | 447 | return; |
@@ -428,7 +450,7 @@ static __init void xen_setup_acpi_sci(void) | |||
428 | static int acpi_register_gsi_xen(struct device *dev, u32 gsi, | 450 | static int acpi_register_gsi_xen(struct device *dev, u32 gsi, |
429 | int trigger, int polarity) | 451 | int trigger, int polarity) |
430 | { | 452 | { |
431 | return xen_register_gsi(gsi, trigger, polarity); | 453 | return xen_register_gsi(gsi, -1 /* no GSI override */, trigger, polarity); |
432 | } | 454 | } |
433 | 455 | ||
434 | static int __init pci_xen_initial_domain(void) | 456 | static int __init pci_xen_initial_domain(void) |
@@ -467,7 +489,7 @@ void __init xen_setup_pirqs(void) | |||
467 | if (acpi_get_override_irq(irq, &trigger, &polarity) == -1) | 489 | if (acpi_get_override_irq(irq, &trigger, &polarity) == -1) |
468 | continue; | 490 | continue; |
469 | 491 | ||
470 | xen_register_pirq(irq, | 492 | xen_register_pirq(irq, -1 /* no GSI override */, |
471 | trigger ? ACPI_LEVEL_SENSITIVE : ACPI_EDGE_SENSITIVE); | 493 | trigger ? ACPI_LEVEL_SENSITIVE : ACPI_EDGE_SENSITIVE); |
472 | } | 494 | } |
473 | } | 495 | } |
diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c index 474356b98ede..899e393d8e73 100644 --- a/arch/x86/platform/efi/efi.c +++ b/arch/x86/platform/efi/efi.c | |||
@@ -504,9 +504,6 @@ void __init efi_init(void) | |||
504 | x86_platform.set_wallclock = efi_set_rtc_mmss; | 504 | x86_platform.set_wallclock = efi_set_rtc_mmss; |
505 | #endif | 505 | #endif |
506 | 506 | ||
507 | /* Setup for EFI runtime service */ | ||
508 | reboot_type = BOOT_EFI; | ||
509 | |||
510 | #if EFI_DEBUG | 507 | #if EFI_DEBUG |
511 | print_efi_memmap(); | 508 | print_efi_memmap(); |
512 | #endif | 509 | #endif |
diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c index 673e968df3cf..0ccccb67a993 100644 --- a/arch/x86/xen/mmu.c +++ b/arch/x86/xen/mmu.c | |||
@@ -1232,7 +1232,11 @@ static void xen_flush_tlb_others(const struct cpumask *cpus, | |||
1232 | { | 1232 | { |
1233 | struct { | 1233 | struct { |
1234 | struct mmuext_op op; | 1234 | struct mmuext_op op; |
1235 | #ifdef CONFIG_SMP | ||
1235 | DECLARE_BITMAP(mask, num_processors); | 1236 | DECLARE_BITMAP(mask, num_processors); |
1237 | #else | ||
1238 | DECLARE_BITMAP(mask, NR_CPUS); | ||
1239 | #endif | ||
1236 | } *args; | 1240 | } *args; |
1237 | struct multicall_space mcs; | 1241 | struct multicall_space mcs; |
1238 | 1242 | ||