diff options
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/Kconfig | 10 | ||||
-rw-r--r-- | arch/x86/ia32/ia32_aout.c | 1 | ||||
-rw-r--r-- | arch/x86/include/asm/acpi.h | 5 | ||||
-rw-r--r-- | arch/x86/include/asm/bitops.h | 4 | ||||
-rw-r--r-- | arch/x86/include/asm/mmu.h | 6 | ||||
-rw-r--r-- | arch/x86/include/asm/types.h | 8 | ||||
-rw-r--r-- | arch/x86/kernel/acpi/sleep.c | 12 | ||||
-rw-r--r-- | arch/x86/kernel/acpi/sleep.h | 2 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/mcheck/mce-apei.c | 42 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/perf_event.c | 11 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/perf_event_p4.c | 1 | ||||
-rw-r--r-- | arch/x86/kernel/crash_dump_32.c | 3 | ||||
-rw-r--r-- | arch/x86/kernel/crash_dump_64.c | 3 | ||||
-rw-r--r-- | arch/x86/kernel/devicetree.c | 6 | ||||
-rw-r--r-- | arch/x86/kernel/dumpstack.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/e820.c | 1 | ||||
-rw-r--r-- | arch/x86/kernel/mpparse.c | 8 | ||||
-rw-r--r-- | arch/x86/kernel/process_64.c | 8 | ||||
-rw-r--r-- | arch/x86/kernel/setup.c | 22 | ||||
-rw-r--r-- | arch/x86/mm/init_64.c | 16 | ||||
-rw-r--r-- | arch/x86/platform/olpc/olpc-xo1.c | 42 | ||||
-rw-r--r-- | arch/x86/vdso/vdso32-setup.c | 15 |
22 files changed, 112 insertions, 116 deletions
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index d57ddd7573cc..140e254fe546 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig | |||
@@ -2096,6 +2096,16 @@ source "drivers/pcmcia/Kconfig" | |||
2096 | 2096 | ||
2097 | source "drivers/pci/hotplug/Kconfig" | 2097 | source "drivers/pci/hotplug/Kconfig" |
2098 | 2098 | ||
2099 | config RAPIDIO | ||
2100 | bool "RapidIO support" | ||
2101 | depends on PCI | ||
2102 | default n | ||
2103 | help | ||
2104 | If you say Y here, the kernel will include drivers and | ||
2105 | infrastructure code to support RapidIO interconnect devices. | ||
2106 | |||
2107 | source "drivers/rapidio/Kconfig" | ||
2108 | |||
2099 | endmenu | 2109 | endmenu |
2100 | 2110 | ||
2101 | 2111 | ||
diff --git a/arch/x86/ia32/ia32_aout.c b/arch/x86/ia32/ia32_aout.c index 2d93bdbc9ac0..fd843877e841 100644 --- a/arch/x86/ia32/ia32_aout.c +++ b/arch/x86/ia32/ia32_aout.c | |||
@@ -298,6 +298,7 @@ static int load_aout_binary(struct linux_binprm *bprm, struct pt_regs *regs) | |||
298 | /* OK, This is the point of no return */ | 298 | /* OK, This is the point of no return */ |
299 | set_personality(PER_LINUX); | 299 | set_personality(PER_LINUX); |
300 | set_thread_flag(TIF_IA32); | 300 | set_thread_flag(TIF_IA32); |
301 | current->mm->context.ia32_compat = 1; | ||
301 | 302 | ||
302 | setup_new_exec(bprm); | 303 | setup_new_exec(bprm); |
303 | 304 | ||
diff --git a/arch/x86/include/asm/acpi.h b/arch/x86/include/asm/acpi.h index 448d73a371ba..12e0e7dd869c 100644 --- a/arch/x86/include/asm/acpi.h +++ b/arch/x86/include/asm/acpi.h | |||
@@ -114,9 +114,8 @@ static inline void acpi_disable_pci(void) | |||
114 | acpi_noirq_set(); | 114 | acpi_noirq_set(); |
115 | } | 115 | } |
116 | 116 | ||
117 | /* routines for saving/restoring kernel state */ | 117 | /* Low-level suspend routine. */ |
118 | extern int acpi_save_state_mem(void); | 118 | extern int acpi_suspend_lowlevel(void); |
119 | extern void acpi_restore_state_mem(void); | ||
120 | 119 | ||
121 | extern const unsigned char acpi_wakeup_code[]; | 120 | extern const unsigned char acpi_wakeup_code[]; |
122 | #define acpi_wakeup_address (__pa(TRAMPOLINE_SYM(acpi_wakeup_code))) | 121 | #define acpi_wakeup_address (__pa(TRAMPOLINE_SYM(acpi_wakeup_code))) |
diff --git a/arch/x86/include/asm/bitops.h b/arch/x86/include/asm/bitops.h index 903683b07e42..69d58131bc8e 100644 --- a/arch/x86/include/asm/bitops.h +++ b/arch/x86/include/asm/bitops.h | |||
@@ -456,14 +456,12 @@ static inline int fls(int x) | |||
456 | 456 | ||
457 | #ifdef __KERNEL__ | 457 | #ifdef __KERNEL__ |
458 | 458 | ||
459 | #include <asm-generic/bitops/ext2-non-atomic.h> | 459 | #include <asm-generic/bitops/le.h> |
460 | 460 | ||
461 | #define ext2_set_bit_atomic(lock, nr, addr) \ | 461 | #define ext2_set_bit_atomic(lock, nr, addr) \ |
462 | test_and_set_bit((nr), (unsigned long *)(addr)) | 462 | test_and_set_bit((nr), (unsigned long *)(addr)) |
463 | #define ext2_clear_bit_atomic(lock, nr, addr) \ | 463 | #define ext2_clear_bit_atomic(lock, nr, addr) \ |
464 | test_and_clear_bit((nr), (unsigned long *)(addr)) | 464 | test_and_clear_bit((nr), (unsigned long *)(addr)) |
465 | 465 | ||
466 | #include <asm-generic/bitops/minix.h> | ||
467 | |||
468 | #endif /* __KERNEL__ */ | 466 | #endif /* __KERNEL__ */ |
469 | #endif /* _ASM_X86_BITOPS_H */ | 467 | #endif /* _ASM_X86_BITOPS_H */ |
diff --git a/arch/x86/include/asm/mmu.h b/arch/x86/include/asm/mmu.h index 80a1dee5bea5..aeff3e89b222 100644 --- a/arch/x86/include/asm/mmu.h +++ b/arch/x86/include/asm/mmu.h | |||
@@ -13,6 +13,12 @@ typedef struct { | |||
13 | int size; | 13 | int size; |
14 | struct mutex lock; | 14 | struct mutex lock; |
15 | void *vdso; | 15 | void *vdso; |
16 | |||
17 | #ifdef CONFIG_X86_64 | ||
18 | /* True if mm supports a task running in 32 bit compatibility mode. */ | ||
19 | unsigned short ia32_compat; | ||
20 | #endif | ||
21 | |||
16 | } mm_context_t; | 22 | } mm_context_t; |
17 | 23 | ||
18 | #ifdef CONFIG_SMP | 24 | #ifdef CONFIG_SMP |
diff --git a/arch/x86/include/asm/types.h b/arch/x86/include/asm/types.h index 88102055a4b8..8e8c23fef08c 100644 --- a/arch/x86/include/asm/types.h +++ b/arch/x86/include/asm/types.h | |||
@@ -3,12 +3,4 @@ | |||
3 | 3 | ||
4 | #include <asm-generic/types.h> | 4 | #include <asm-generic/types.h> |
5 | 5 | ||
6 | #ifdef __KERNEL__ | ||
7 | #ifndef __ASSEMBLY__ | ||
8 | |||
9 | typedef u64 dma64_addr_t; | ||
10 | |||
11 | #endif /* __ASSEMBLY__ */ | ||
12 | #endif /* __KERNEL__ */ | ||
13 | |||
14 | #endif /* _ASM_X86_TYPES_H */ | 6 | #endif /* _ASM_X86_TYPES_H */ |
diff --git a/arch/x86/kernel/acpi/sleep.c b/arch/x86/kernel/acpi/sleep.c index 4572c58e66d5..ff93bc1b09c3 100644 --- a/arch/x86/kernel/acpi/sleep.c +++ b/arch/x86/kernel/acpi/sleep.c | |||
@@ -25,12 +25,12 @@ static char temp_stack[4096]; | |||
25 | #endif | 25 | #endif |
26 | 26 | ||
27 | /** | 27 | /** |
28 | * acpi_save_state_mem - save kernel state | 28 | * acpi_suspend_lowlevel - save kernel state |
29 | * | 29 | * |
30 | * Create an identity mapped page table and copy the wakeup routine to | 30 | * Create an identity mapped page table and copy the wakeup routine to |
31 | * low memory. | 31 | * low memory. |
32 | */ | 32 | */ |
33 | int acpi_save_state_mem(void) | 33 | int acpi_suspend_lowlevel(void) |
34 | { | 34 | { |
35 | struct wakeup_header *header; | 35 | struct wakeup_header *header; |
36 | /* address in low memory of the wakeup routine. */ | 36 | /* address in low memory of the wakeup routine. */ |
@@ -96,16 +96,10 @@ int acpi_save_state_mem(void) | |||
96 | saved_magic = 0x123456789abcdef0L; | 96 | saved_magic = 0x123456789abcdef0L; |
97 | #endif /* CONFIG_64BIT */ | 97 | #endif /* CONFIG_64BIT */ |
98 | 98 | ||
99 | do_suspend_lowlevel(); | ||
99 | return 0; | 100 | return 0; |
100 | } | 101 | } |
101 | 102 | ||
102 | /* | ||
103 | * acpi_restore_state - undo effects of acpi_save_state_mem | ||
104 | */ | ||
105 | void acpi_restore_state_mem(void) | ||
106 | { | ||
107 | } | ||
108 | |||
109 | static int __init acpi_sleep_setup(char *str) | 103 | static int __init acpi_sleep_setup(char *str) |
110 | { | 104 | { |
111 | while ((str != NULL) && (*str != '\0')) { | 105 | while ((str != NULL) && (*str != '\0')) { |
diff --git a/arch/x86/kernel/acpi/sleep.h b/arch/x86/kernel/acpi/sleep.h index 86ba1c87165b..416d4be13fef 100644 --- a/arch/x86/kernel/acpi/sleep.h +++ b/arch/x86/kernel/acpi/sleep.h | |||
@@ -11,3 +11,5 @@ extern int wakeup_pmode_return; | |||
11 | 11 | ||
12 | extern unsigned long acpi_copy_wakeup_routine(unsigned long); | 12 | extern unsigned long acpi_copy_wakeup_routine(unsigned long); |
13 | extern void wakeup_long64(void); | 13 | extern void wakeup_long64(void); |
14 | |||
15 | extern void do_suspend_lowlevel(void); | ||
diff --git a/arch/x86/kernel/cpu/mcheck/mce-apei.c b/arch/x86/kernel/cpu/mcheck/mce-apei.c index 8209472b27a5..83930deec3c6 100644 --- a/arch/x86/kernel/cpu/mcheck/mce-apei.c +++ b/arch/x86/kernel/cpu/mcheck/mce-apei.c | |||
@@ -106,24 +106,34 @@ int apei_write_mce(struct mce *m) | |||
106 | ssize_t apei_read_mce(struct mce *m, u64 *record_id) | 106 | ssize_t apei_read_mce(struct mce *m, u64 *record_id) |
107 | { | 107 | { |
108 | struct cper_mce_record rcd; | 108 | struct cper_mce_record rcd; |
109 | ssize_t len; | 109 | int rc, pos; |
110 | 110 | ||
111 | len = erst_read_next(&rcd.hdr, sizeof(rcd)); | 111 | rc = erst_get_record_id_begin(&pos); |
112 | if (len <= 0) | 112 | if (rc) |
113 | return len; | 113 | return rc; |
114 | /* Can not skip other records in storage via ERST unless clear them */ | 114 | retry: |
115 | else if (len != sizeof(rcd) || | 115 | rc = erst_get_record_id_next(&pos, record_id); |
116 | uuid_le_cmp(rcd.hdr.creator_id, CPER_CREATOR_MCE)) { | 116 | if (rc) |
117 | if (printk_ratelimit()) | 117 | goto out; |
118 | pr_warning( | 118 | /* no more record */ |
119 | "MCE-APEI: Can not skip the unknown record in ERST"); | 119 | if (*record_id == APEI_ERST_INVALID_RECORD_ID) |
120 | return -EIO; | 120 | goto out; |
121 | } | 121 | rc = erst_read(*record_id, &rcd.hdr, sizeof(rcd)); |
122 | 122 | /* someone else has cleared the record, try next one */ | |
123 | if (rc == -ENOENT) | ||
124 | goto retry; | ||
125 | else if (rc < 0) | ||
126 | goto out; | ||
127 | /* try to skip other type records in storage */ | ||
128 | else if (rc != sizeof(rcd) || | ||
129 | uuid_le_cmp(rcd.hdr.creator_id, CPER_CREATOR_MCE)) | ||
130 | goto retry; | ||
123 | memcpy(m, &rcd.mce, sizeof(*m)); | 131 | memcpy(m, &rcd.mce, sizeof(*m)); |
124 | *record_id = rcd.hdr.record_id; | 132 | rc = sizeof(*m); |
133 | out: | ||
134 | erst_get_record_id_end(); | ||
125 | 135 | ||
126 | return sizeof(*m); | 136 | return rc; |
127 | } | 137 | } |
128 | 138 | ||
129 | /* Check whether there is record in ERST */ | 139 | /* Check whether there is record in ERST */ |
diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c index 87eab4a27dfc..eed3673a8656 100644 --- a/arch/x86/kernel/cpu/perf_event.c +++ b/arch/x86/kernel/cpu/perf_event.c | |||
@@ -500,12 +500,17 @@ static bool check_hw_exists(void) | |||
500 | return true; | 500 | return true; |
501 | 501 | ||
502 | bios_fail: | 502 | bios_fail: |
503 | printk(KERN_CONT "Broken BIOS detected, using software events only.\n"); | 503 | /* |
504 | * We still allow the PMU driver to operate: | ||
505 | */ | ||
506 | printk(KERN_CONT "Broken BIOS detected, complain to your hardware vendor.\n"); | ||
504 | printk(KERN_ERR FW_BUG "the BIOS has corrupted hw-PMU resources (MSR %x is %Lx)\n", reg, val); | 507 | printk(KERN_ERR FW_BUG "the BIOS has corrupted hw-PMU resources (MSR %x is %Lx)\n", reg, val); |
505 | return false; | 508 | |
509 | return true; | ||
506 | 510 | ||
507 | msr_fail: | 511 | msr_fail: |
508 | printk(KERN_CONT "Broken PMU hardware detected, using software events only.\n"); | 512 | printk(KERN_CONT "Broken PMU hardware detected, using software events only.\n"); |
513 | |||
509 | return false; | 514 | return false; |
510 | } | 515 | } |
511 | 516 | ||
@@ -912,7 +917,7 @@ static inline void x86_assign_hw_event(struct perf_event *event, | |||
912 | hwc->event_base = 0; | 917 | hwc->event_base = 0; |
913 | } else if (hwc->idx >= X86_PMC_IDX_FIXED) { | 918 | } else if (hwc->idx >= X86_PMC_IDX_FIXED) { |
914 | hwc->config_base = MSR_ARCH_PERFMON_FIXED_CTR_CTRL; | 919 | hwc->config_base = MSR_ARCH_PERFMON_FIXED_CTR_CTRL; |
915 | hwc->event_base = MSR_ARCH_PERFMON_FIXED_CTR0; | 920 | hwc->event_base = MSR_ARCH_PERFMON_FIXED_CTR0 + (hwc->idx - X86_PMC_IDX_FIXED); |
916 | } else { | 921 | } else { |
917 | hwc->config_base = x86_pmu_config_addr(hwc->idx); | 922 | hwc->config_base = x86_pmu_config_addr(hwc->idx); |
918 | hwc->event_base = x86_pmu_event_addr(hwc->idx); | 923 | hwc->event_base = x86_pmu_event_addr(hwc->idx); |
diff --git a/arch/x86/kernel/cpu/perf_event_p4.c b/arch/x86/kernel/cpu/perf_event_p4.c index 0811f5ebfba6..c2520e178d32 100644 --- a/arch/x86/kernel/cpu/perf_event_p4.c +++ b/arch/x86/kernel/cpu/perf_event_p4.c | |||
@@ -777,6 +777,7 @@ static inline int p4_pmu_clear_cccr_ovf(struct hw_perf_event *hwc) | |||
777 | * the counter has reached zero value and continued counting before | 777 | * the counter has reached zero value and continued counting before |
778 | * real NMI signal was received: | 778 | * real NMI signal was received: |
779 | */ | 779 | */ |
780 | rdmsrl(hwc->event_base, v); | ||
780 | if (!(v & ARCH_P4_UNFLAGGED_BIT)) | 781 | if (!(v & ARCH_P4_UNFLAGGED_BIT)) |
781 | return 1; | 782 | return 1; |
782 | 783 | ||
diff --git a/arch/x86/kernel/crash_dump_32.c b/arch/x86/kernel/crash_dump_32.c index d5cd13945d5a..642f75a68cd5 100644 --- a/arch/x86/kernel/crash_dump_32.c +++ b/arch/x86/kernel/crash_dump_32.c | |||
@@ -14,9 +14,6 @@ | |||
14 | 14 | ||
15 | static void *kdump_buf_page; | 15 | static void *kdump_buf_page; |
16 | 16 | ||
17 | /* Stores the physical address of elf header of crash image. */ | ||
18 | unsigned long long elfcorehdr_addr = ELFCORE_ADDR_MAX; | ||
19 | |||
20 | static inline bool is_crashed_pfn_valid(unsigned long pfn) | 17 | static inline bool is_crashed_pfn_valid(unsigned long pfn) |
21 | { | 18 | { |
22 | #ifndef CONFIG_X86_PAE | 19 | #ifndef CONFIG_X86_PAE |
diff --git a/arch/x86/kernel/crash_dump_64.c b/arch/x86/kernel/crash_dump_64.c index 994828899e09..afa64adb75ee 100644 --- a/arch/x86/kernel/crash_dump_64.c +++ b/arch/x86/kernel/crash_dump_64.c | |||
@@ -10,9 +10,6 @@ | |||
10 | #include <linux/uaccess.h> | 10 | #include <linux/uaccess.h> |
11 | #include <linux/io.h> | 11 | #include <linux/io.h> |
12 | 12 | ||
13 | /* Stores the physical address of elf header of crash image. */ | ||
14 | unsigned long long elfcorehdr_addr = ELFCORE_ADDR_MAX; | ||
15 | |||
16 | /** | 13 | /** |
17 | * copy_oldmem_page - copy one page from "oldmem" | 14 | * copy_oldmem_page - copy one page from "oldmem" |
18 | * @pfn: page frame number to be copied | 15 | * @pfn: page frame number to be copied |
diff --git a/arch/x86/kernel/devicetree.c b/arch/x86/kernel/devicetree.c index 7a8cebc9ff29..706a9fb46a58 100644 --- a/arch/x86/kernel/devicetree.c +++ b/arch/x86/kernel/devicetree.c | |||
@@ -65,12 +65,10 @@ unsigned int irq_create_of_mapping(struct device_node *controller, | |||
65 | return 0; | 65 | return 0; |
66 | ret = ih->xlate(ih, intspec, intsize, &virq, &type); | 66 | ret = ih->xlate(ih, intspec, intsize, &virq, &type); |
67 | if (ret) | 67 | if (ret) |
68 | return ret; | 68 | return 0; |
69 | if (type == IRQ_TYPE_NONE) | 69 | if (type == IRQ_TYPE_NONE) |
70 | return virq; | 70 | return virq; |
71 | /* set the mask if it is different from current */ | 71 | irq_set_irq_type(virq, type); |
72 | if (type == (irq_to_desc(virq)->status & IRQF_TRIGGER_MASK)) | ||
73 | set_irq_type(virq, type); | ||
74 | return virq; | 72 | return virq; |
75 | } | 73 | } |
76 | EXPORT_SYMBOL_GPL(irq_create_of_mapping); | 74 | EXPORT_SYMBOL_GPL(irq_create_of_mapping); |
diff --git a/arch/x86/kernel/dumpstack.c b/arch/x86/kernel/dumpstack.c index 81ac6c78c01c..e2a3f0606da4 100644 --- a/arch/x86/kernel/dumpstack.c +++ b/arch/x86/kernel/dumpstack.c | |||
@@ -27,7 +27,7 @@ static int die_counter; | |||
27 | 27 | ||
28 | void printk_address(unsigned long address, int reliable) | 28 | void printk_address(unsigned long address, int reliable) |
29 | { | 29 | { |
30 | printk(" [<%p>] %s%pS\n", (void *) address, | 30 | printk(" [<%p>] %s%pB\n", (void *) address, |
31 | reliable ? "" : "? ", (void *) address); | 31 | reliable ? "" : "? ", (void *) address); |
32 | } | 32 | } |
33 | 33 | ||
diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c index cdf5bfd9d4d5..3e2ef8425316 100644 --- a/arch/x86/kernel/e820.c +++ b/arch/x86/kernel/e820.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/types.h> | 12 | #include <linux/types.h> |
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/crash_dump.h> | ||
14 | #include <linux/bootmem.h> | 15 | #include <linux/bootmem.h> |
15 | #include <linux/pfn.h> | 16 | #include <linux/pfn.h> |
16 | #include <linux/suspend.h> | 17 | #include <linux/suspend.h> |
diff --git a/arch/x86/kernel/mpparse.c b/arch/x86/kernel/mpparse.c index 6f789a887c06..5a532ce646bf 100644 --- a/arch/x86/kernel/mpparse.c +++ b/arch/x86/kernel/mpparse.c | |||
@@ -714,10 +714,6 @@ static void __init check_irq_src(struct mpc_intsrc *m, int *nr_m_spare) | |||
714 | *nr_m_spare += 1; | 714 | *nr_m_spare += 1; |
715 | } | 715 | } |
716 | } | 716 | } |
717 | #else /* CONFIG_X86_IO_APIC */ | ||
718 | static | ||
719 | inline void __init check_irq_src(struct mpc_intsrc *m, int *nr_m_spare) {} | ||
720 | #endif /* CONFIG_X86_IO_APIC */ | ||
721 | 717 | ||
722 | static int | 718 | static int |
723 | check_slot(unsigned long mpc_new_phys, unsigned long mpc_new_length, int count) | 719 | check_slot(unsigned long mpc_new_phys, unsigned long mpc_new_length, int count) |
@@ -731,6 +727,10 @@ check_slot(unsigned long mpc_new_phys, unsigned long mpc_new_length, int count) | |||
731 | 727 | ||
732 | return ret; | 728 | return ret; |
733 | } | 729 | } |
730 | #else /* CONFIG_X86_IO_APIC */ | ||
731 | static | ||
732 | inline void __init check_irq_src(struct mpc_intsrc *m, int *nr_m_spare) {} | ||
733 | #endif /* CONFIG_X86_IO_APIC */ | ||
734 | 734 | ||
735 | static int __init replace_intsrc_all(struct mpc_table *mpc, | 735 | static int __init replace_intsrc_all(struct mpc_table *mpc, |
736 | unsigned long mpc_new_phys, | 736 | unsigned long mpc_new_phys, |
diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c index bd387e8f73b4..6c9dd922ac0d 100644 --- a/arch/x86/kernel/process_64.c +++ b/arch/x86/kernel/process_64.c | |||
@@ -501,6 +501,10 @@ void set_personality_64bit(void) | |||
501 | /* Make sure to be in 64bit mode */ | 501 | /* Make sure to be in 64bit mode */ |
502 | clear_thread_flag(TIF_IA32); | 502 | clear_thread_flag(TIF_IA32); |
503 | 503 | ||
504 | /* Ensure the corresponding mm is not marked. */ | ||
505 | if (current->mm) | ||
506 | current->mm->context.ia32_compat = 0; | ||
507 | |||
504 | /* TBD: overwrites user setup. Should have two bits. | 508 | /* TBD: overwrites user setup. Should have two bits. |
505 | But 64bit processes have always behaved this way, | 509 | But 64bit processes have always behaved this way, |
506 | so it's not too bad. The main problem is just that | 510 | so it's not too bad. The main problem is just that |
@@ -516,6 +520,10 @@ void set_personality_ia32(void) | |||
516 | set_thread_flag(TIF_IA32); | 520 | set_thread_flag(TIF_IA32); |
517 | current->personality |= force_personality32; | 521 | current->personality |= force_personality32; |
518 | 522 | ||
523 | /* Mark the associated mm as containing 32-bit tasks. */ | ||
524 | if (current->mm) | ||
525 | current->mm->context.ia32_compat = 1; | ||
526 | |||
519 | /* Prepare the first "return" to user space */ | 527 | /* Prepare the first "return" to user space */ |
520 | current_thread_info()->status |= TS_COMPAT; | 528 | current_thread_info()->status |= TS_COMPAT; |
521 | } | 529 | } |
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index 32bd87cbf982..5a0484a95ad6 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c | |||
@@ -619,28 +619,6 @@ void __init reserve_standard_io_resources(void) | |||
619 | 619 | ||
620 | } | 620 | } |
621 | 621 | ||
622 | /* | ||
623 | * Note: elfcorehdr_addr is not just limited to vmcore. It is also used by | ||
624 | * is_kdump_kernel() to determine if we are booting after a panic. Hence | ||
625 | * ifdef it under CONFIG_CRASH_DUMP and not CONFIG_PROC_VMCORE. | ||
626 | */ | ||
627 | |||
628 | #ifdef CONFIG_CRASH_DUMP | ||
629 | /* elfcorehdr= specifies the location of elf core header | ||
630 | * stored by the crashed kernel. This option will be passed | ||
631 | * by kexec loader to the capture kernel. | ||
632 | */ | ||
633 | static int __init setup_elfcorehdr(char *arg) | ||
634 | { | ||
635 | char *end; | ||
636 | if (!arg) | ||
637 | return -EINVAL; | ||
638 | elfcorehdr_addr = memparse(arg, &end); | ||
639 | return end > arg ? 0 : -EINVAL; | ||
640 | } | ||
641 | early_param("elfcorehdr", setup_elfcorehdr); | ||
642 | #endif | ||
643 | |||
644 | static __init void reserve_ibft_region(void) | 622 | static __init void reserve_ibft_region(void) |
645 | { | 623 | { |
646 | unsigned long addr, size = 0; | 624 | unsigned long addr, size = 0; |
diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c index 2362b646178e..794233587287 100644 --- a/arch/x86/mm/init_64.c +++ b/arch/x86/mm/init_64.c | |||
@@ -862,18 +862,18 @@ static struct vm_area_struct gate_vma = { | |||
862 | .vm_flags = VM_READ | VM_EXEC | 862 | .vm_flags = VM_READ | VM_EXEC |
863 | }; | 863 | }; |
864 | 864 | ||
865 | struct vm_area_struct *get_gate_vma(struct task_struct *tsk) | 865 | struct vm_area_struct *get_gate_vma(struct mm_struct *mm) |
866 | { | 866 | { |
867 | #ifdef CONFIG_IA32_EMULATION | 867 | #ifdef CONFIG_IA32_EMULATION |
868 | if (test_tsk_thread_flag(tsk, TIF_IA32)) | 868 | if (!mm || mm->context.ia32_compat) |
869 | return NULL; | 869 | return NULL; |
870 | #endif | 870 | #endif |
871 | return &gate_vma; | 871 | return &gate_vma; |
872 | } | 872 | } |
873 | 873 | ||
874 | int in_gate_area(struct task_struct *task, unsigned long addr) | 874 | int in_gate_area(struct mm_struct *mm, unsigned long addr) |
875 | { | 875 | { |
876 | struct vm_area_struct *vma = get_gate_vma(task); | 876 | struct vm_area_struct *vma = get_gate_vma(mm); |
877 | 877 | ||
878 | if (!vma) | 878 | if (!vma) |
879 | return 0; | 879 | return 0; |
@@ -882,11 +882,11 @@ int in_gate_area(struct task_struct *task, unsigned long addr) | |||
882 | } | 882 | } |
883 | 883 | ||
884 | /* | 884 | /* |
885 | * Use this when you have no reliable task/vma, typically from interrupt | 885 | * Use this when you have no reliable mm, typically from interrupt |
886 | * context. It is less reliable than using the task's vma and may give | 886 | * context. It is less reliable than using a task's mm and may give |
887 | * false positives: | 887 | * false positives. |
888 | */ | 888 | */ |
889 | int in_gate_area_no_task(unsigned long addr) | 889 | int in_gate_area_no_mm(unsigned long addr) |
890 | { | 890 | { |
891 | return (addr >= VSYSCALL_START) && (addr < VSYSCALL_END); | 891 | return (addr >= VSYSCALL_START) && (addr < VSYSCALL_END); |
892 | } | 892 | } |
diff --git a/arch/x86/platform/olpc/olpc-xo1.c b/arch/x86/platform/olpc/olpc-xo1.c index 127775696d6c..99513642a0e6 100644 --- a/arch/x86/platform/olpc/olpc-xo1.c +++ b/arch/x86/platform/olpc/olpc-xo1.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
17 | #include <linux/pm.h> | 17 | #include <linux/pm.h> |
18 | #include <linux/mfd/core.h> | ||
18 | 19 | ||
19 | #include <asm/io.h> | 20 | #include <asm/io.h> |
20 | #include <asm/olpc.h> | 21 | #include <asm/olpc.h> |
@@ -56,25 +57,24 @@ static void xo1_power_off(void) | |||
56 | static int __devinit olpc_xo1_probe(struct platform_device *pdev) | 57 | static int __devinit olpc_xo1_probe(struct platform_device *pdev) |
57 | { | 58 | { |
58 | struct resource *res; | 59 | struct resource *res; |
60 | int err; | ||
59 | 61 | ||
60 | /* don't run on non-XOs */ | 62 | /* don't run on non-XOs */ |
61 | if (!machine_is_olpc()) | 63 | if (!machine_is_olpc()) |
62 | return -ENODEV; | 64 | return -ENODEV; |
63 | 65 | ||
66 | err = mfd_cell_enable(pdev); | ||
67 | if (err) | ||
68 | return err; | ||
69 | |||
64 | res = platform_get_resource(pdev, IORESOURCE_IO, 0); | 70 | res = platform_get_resource(pdev, IORESOURCE_IO, 0); |
65 | if (!res) { | 71 | if (!res) { |
66 | dev_err(&pdev->dev, "can't fetch device resource info\n"); | 72 | dev_err(&pdev->dev, "can't fetch device resource info\n"); |
67 | return -EIO; | 73 | return -EIO; |
68 | } | 74 | } |
69 | 75 | if (strcmp(pdev->name, "olpc-xo1-pms") == 0) | |
70 | if (!request_region(res->start, resource_size(res), DRV_NAME)) { | ||
71 | dev_err(&pdev->dev, "can't request region\n"); | ||
72 | return -EIO; | ||
73 | } | ||
74 | |||
75 | if (strcmp(pdev->name, "cs5535-pms") == 0) | ||
76 | pms_base = res->start; | 76 | pms_base = res->start; |
77 | else if (strcmp(pdev->name, "cs5535-acpi") == 0) | 77 | else if (strcmp(pdev->name, "olpc-xo1-ac-acpi") == 0) |
78 | acpi_base = res->start; | 78 | acpi_base = res->start; |
79 | 79 | ||
80 | /* If we have both addresses, we can override the poweroff hook */ | 80 | /* If we have both addresses, we can override the poweroff hook */ |
@@ -88,14 +88,11 @@ static int __devinit olpc_xo1_probe(struct platform_device *pdev) | |||
88 | 88 | ||
89 | static int __devexit olpc_xo1_remove(struct platform_device *pdev) | 89 | static int __devexit olpc_xo1_remove(struct platform_device *pdev) |
90 | { | 90 | { |
91 | struct resource *r; | 91 | mfd_cell_disable(pdev); |
92 | |||
93 | r = platform_get_resource(pdev, IORESOURCE_IO, 0); | ||
94 | release_region(r->start, resource_size(r)); | ||
95 | 92 | ||
96 | if (strcmp(pdev->name, "cs5535-pms") == 0) | 93 | if (strcmp(pdev->name, "olpc-xo1-pms") == 0) |
97 | pms_base = 0; | 94 | pms_base = 0; |
98 | else if (strcmp(pdev->name, "cs5535-acpi") == 0) | 95 | else if (strcmp(pdev->name, "olpc-xo1-acpi") == 0) |
99 | acpi_base = 0; | 96 | acpi_base = 0; |
100 | 97 | ||
101 | pm_power_off = NULL; | 98 | pm_power_off = NULL; |
@@ -104,7 +101,7 @@ static int __devexit olpc_xo1_remove(struct platform_device *pdev) | |||
104 | 101 | ||
105 | static struct platform_driver cs5535_pms_drv = { | 102 | static struct platform_driver cs5535_pms_drv = { |
106 | .driver = { | 103 | .driver = { |
107 | .name = "cs5535-pms", | 104 | .name = "olpc-xo1-pms", |
108 | .owner = THIS_MODULE, | 105 | .owner = THIS_MODULE, |
109 | }, | 106 | }, |
110 | .probe = olpc_xo1_probe, | 107 | .probe = olpc_xo1_probe, |
@@ -113,7 +110,7 @@ static struct platform_driver cs5535_pms_drv = { | |||
113 | 110 | ||
114 | static struct platform_driver cs5535_acpi_drv = { | 111 | static struct platform_driver cs5535_acpi_drv = { |
115 | .driver = { | 112 | .driver = { |
116 | .name = "cs5535-acpi", | 113 | .name = "olpc-xo1-acpi", |
117 | .owner = THIS_MODULE, | 114 | .owner = THIS_MODULE, |
118 | }, | 115 | }, |
119 | .probe = olpc_xo1_probe, | 116 | .probe = olpc_xo1_probe, |
@@ -124,26 +121,27 @@ static int __init olpc_xo1_init(void) | |||
124 | { | 121 | { |
125 | int r; | 122 | int r; |
126 | 123 | ||
127 | r = platform_driver_register(&cs5535_pms_drv); | 124 | r = mfd_shared_platform_driver_register(&cs5535_pms_drv, "cs5535-pms"); |
128 | if (r) | 125 | if (r) |
129 | return r; | 126 | return r; |
130 | 127 | ||
131 | r = platform_driver_register(&cs5535_acpi_drv); | 128 | r = mfd_shared_platform_driver_register(&cs5535_acpi_drv, |
129 | "cs5535-acpi"); | ||
132 | if (r) | 130 | if (r) |
133 | platform_driver_unregister(&cs5535_pms_drv); | 131 | mfd_shared_platform_driver_unregister(&cs5535_pms_drv); |
134 | 132 | ||
135 | return r; | 133 | return r; |
136 | } | 134 | } |
137 | 135 | ||
138 | static void __exit olpc_xo1_exit(void) | 136 | static void __exit olpc_xo1_exit(void) |
139 | { | 137 | { |
140 | platform_driver_unregister(&cs5535_acpi_drv); | 138 | mfd_shared_platform_driver_unregister(&cs5535_acpi_drv); |
141 | platform_driver_unregister(&cs5535_pms_drv); | 139 | mfd_shared_platform_driver_unregister(&cs5535_pms_drv); |
142 | } | 140 | } |
143 | 141 | ||
144 | MODULE_AUTHOR("Daniel Drake <dsd@laptop.org>"); | 142 | MODULE_AUTHOR("Daniel Drake <dsd@laptop.org>"); |
145 | MODULE_LICENSE("GPL"); | 143 | MODULE_LICENSE("GPL"); |
146 | MODULE_ALIAS("platform:olpc-xo1"); | 144 | MODULE_ALIAS("platform:cs5535-pms"); |
147 | 145 | ||
148 | module_init(olpc_xo1_init); | 146 | module_init(olpc_xo1_init); |
149 | module_exit(olpc_xo1_exit); | 147 | module_exit(olpc_xo1_exit); |
diff --git a/arch/x86/vdso/vdso32-setup.c b/arch/x86/vdso/vdso32-setup.c index 36df991985b2..468d591dde31 100644 --- a/arch/x86/vdso/vdso32-setup.c +++ b/arch/x86/vdso/vdso32-setup.c | |||
@@ -417,24 +417,25 @@ const char *arch_vma_name(struct vm_area_struct *vma) | |||
417 | return NULL; | 417 | return NULL; |
418 | } | 418 | } |
419 | 419 | ||
420 | struct vm_area_struct *get_gate_vma(struct task_struct *tsk) | 420 | struct vm_area_struct *get_gate_vma(struct mm_struct *mm) |
421 | { | 421 | { |
422 | struct mm_struct *mm = tsk->mm; | 422 | /* |
423 | 423 | * Check to see if the corresponding task was created in compat vdso | |
424 | /* Check to see if this task was created in compat vdso mode */ | 424 | * mode. |
425 | */ | ||
425 | if (mm && mm->context.vdso == (void *)VDSO_HIGH_BASE) | 426 | if (mm && mm->context.vdso == (void *)VDSO_HIGH_BASE) |
426 | return &gate_vma; | 427 | return &gate_vma; |
427 | return NULL; | 428 | return NULL; |
428 | } | 429 | } |
429 | 430 | ||
430 | int in_gate_area(struct task_struct *task, unsigned long addr) | 431 | int in_gate_area(struct mm_struct *mm, unsigned long addr) |
431 | { | 432 | { |
432 | const struct vm_area_struct *vma = get_gate_vma(task); | 433 | const struct vm_area_struct *vma = get_gate_vma(mm); |
433 | 434 | ||
434 | return vma && addr >= vma->vm_start && addr < vma->vm_end; | 435 | return vma && addr >= vma->vm_start && addr < vma->vm_end; |
435 | } | 436 | } |
436 | 437 | ||
437 | int in_gate_area_no_task(unsigned long addr) | 438 | int in_gate_area_no_mm(unsigned long addr) |
438 | { | 439 | { |
439 | return 0; | 440 | return 0; |
440 | } | 441 | } |