diff options
author | David Woodhouse <David.Woodhouse@intel.com> | 2010-10-30 07:35:11 -0400 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2010-10-30 07:35:11 -0400 |
commit | 67577927e8d7a1f4b09b4992df640eadc6aacb36 (patch) | |
tree | 2e9efe6b5745965faf0dcc084d4613d9356263f9 /arch/x86/kernel/acpi | |
parent | 6fe4c590313133ebd5dadb769031489ff178ece1 (diff) | |
parent | 51f00a471ce8f359627dd99aeac322947a0e491b (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Conflicts:
drivers/mtd/mtd_blkdevs.c
Merge Grant's device-tree bits so that we can apply the subsequent fixes.
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'arch/x86/kernel/acpi')
-rw-r--r-- | arch/x86/kernel/acpi/cstate.c | 13 | ||||
-rw-r--r-- | arch/x86/kernel/acpi/sleep.c | 16 |
2 files changed, 13 insertions, 16 deletions
diff --git a/arch/x86/kernel/acpi/cstate.c b/arch/x86/kernel/acpi/cstate.c index fb7a5f052e2b..5812404a0d4c 100644 --- a/arch/x86/kernel/acpi/cstate.c +++ b/arch/x86/kernel/acpi/cstate.c | |||
@@ -13,6 +13,7 @@ | |||
13 | 13 | ||
14 | #include <acpi/processor.h> | 14 | #include <acpi/processor.h> |
15 | #include <asm/acpi.h> | 15 | #include <asm/acpi.h> |
16 | #include <asm/mwait.h> | ||
16 | 17 | ||
17 | /* | 18 | /* |
18 | * Initialize bm_flags based on the CPU cache properties | 19 | * Initialize bm_flags based on the CPU cache properties |
@@ -61,20 +62,10 @@ struct cstate_entry { | |||
61 | unsigned int ecx; | 62 | unsigned int ecx; |
62 | } states[ACPI_PROCESSOR_MAX_POWER]; | 63 | } states[ACPI_PROCESSOR_MAX_POWER]; |
63 | }; | 64 | }; |
64 | static struct cstate_entry *cpu_cstate_entry; /* per CPU ptr */ | 65 | static struct cstate_entry __percpu *cpu_cstate_entry; /* per CPU ptr */ |
65 | 66 | ||
66 | static short mwait_supported[ACPI_PROCESSOR_MAX_POWER]; | 67 | static short mwait_supported[ACPI_PROCESSOR_MAX_POWER]; |
67 | 68 | ||
68 | #define MWAIT_SUBSTATE_MASK (0xf) | ||
69 | #define MWAIT_CSTATE_MASK (0xf) | ||
70 | #define MWAIT_SUBSTATE_SIZE (4) | ||
71 | |||
72 | #define CPUID_MWAIT_LEAF (5) | ||
73 | #define CPUID5_ECX_EXTENSIONS_SUPPORTED (0x1) | ||
74 | #define CPUID5_ECX_INTERRUPT_BREAK (0x2) | ||
75 | |||
76 | #define MWAIT_ECX_INTERRUPT_BREAK (0x1) | ||
77 | |||
78 | #define NATIVE_CSTATE_BEYOND_HALT (2) | 69 | #define NATIVE_CSTATE_BEYOND_HALT (2) |
79 | 70 | ||
80 | static long acpi_processor_ffh_cstate_probe_cpu(void *_cx) | 71 | static long acpi_processor_ffh_cstate_probe_cpu(void *_cx) |
diff --git a/arch/x86/kernel/acpi/sleep.c b/arch/x86/kernel/acpi/sleep.c index 33cec152070d..74a847835bab 100644 --- a/arch/x86/kernel/acpi/sleep.c +++ b/arch/x86/kernel/acpi/sleep.c | |||
@@ -7,11 +7,17 @@ | |||
7 | 7 | ||
8 | #include <linux/acpi.h> | 8 | #include <linux/acpi.h> |
9 | #include <linux/bootmem.h> | 9 | #include <linux/bootmem.h> |
10 | #include <linux/memblock.h> | ||
10 | #include <linux/dmi.h> | 11 | #include <linux/dmi.h> |
11 | #include <linux/cpumask.h> | 12 | #include <linux/cpumask.h> |
12 | #include <asm/segment.h> | 13 | #include <asm/segment.h> |
13 | #include <asm/desc.h> | 14 | #include <asm/desc.h> |
14 | 15 | ||
16 | #ifdef CONFIG_X86_32 | ||
17 | #include <asm/pgtable.h> | ||
18 | #include <asm/pgtable_32.h> | ||
19 | #endif | ||
20 | |||
15 | #include "realmode/wakeup.h" | 21 | #include "realmode/wakeup.h" |
16 | #include "sleep.h" | 22 | #include "sleep.h" |
17 | 23 | ||
@@ -90,7 +96,7 @@ int acpi_save_state_mem(void) | |||
90 | 96 | ||
91 | #ifndef CONFIG_64BIT | 97 | #ifndef CONFIG_64BIT |
92 | header->pmode_entry = (u32)&wakeup_pmode_return; | 98 | header->pmode_entry = (u32)&wakeup_pmode_return; |
93 | header->pmode_cr3 = (u32)(swsusp_pg_dir - __PAGE_OFFSET); | 99 | header->pmode_cr3 = (u32)__pa(&initial_page_table); |
94 | saved_magic = 0x12345678; | 100 | saved_magic = 0x12345678; |
95 | #else /* CONFIG_64BIT */ | 101 | #else /* CONFIG_64BIT */ |
96 | header->trampoline_segment = setup_trampoline() >> 4; | 102 | header->trampoline_segment = setup_trampoline() >> 4; |
@@ -125,7 +131,7 @@ void acpi_restore_state_mem(void) | |||
125 | */ | 131 | */ |
126 | void __init acpi_reserve_wakeup_memory(void) | 132 | void __init acpi_reserve_wakeup_memory(void) |
127 | { | 133 | { |
128 | unsigned long mem; | 134 | phys_addr_t mem; |
129 | 135 | ||
130 | if ((&wakeup_code_end - &wakeup_code_start) > WAKEUP_SIZE) { | 136 | if ((&wakeup_code_end - &wakeup_code_start) > WAKEUP_SIZE) { |
131 | printk(KERN_ERR | 137 | printk(KERN_ERR |
@@ -133,15 +139,15 @@ void __init acpi_reserve_wakeup_memory(void) | |||
133 | return; | 139 | return; |
134 | } | 140 | } |
135 | 141 | ||
136 | mem = find_e820_area(0, 1<<20, WAKEUP_SIZE, PAGE_SIZE); | 142 | mem = memblock_find_in_range(0, 1<<20, WAKEUP_SIZE, PAGE_SIZE); |
137 | 143 | ||
138 | if (mem == -1L) { | 144 | if (mem == MEMBLOCK_ERROR) { |
139 | printk(KERN_ERR "ACPI: Cannot allocate lowmem, S3 disabled.\n"); | 145 | printk(KERN_ERR "ACPI: Cannot allocate lowmem, S3 disabled.\n"); |
140 | return; | 146 | return; |
141 | } | 147 | } |
142 | acpi_realmode = (unsigned long) phys_to_virt(mem); | 148 | acpi_realmode = (unsigned long) phys_to_virt(mem); |
143 | acpi_wakeup_address = mem; | 149 | acpi_wakeup_address = mem; |
144 | reserve_early(mem, mem + WAKEUP_SIZE, "ACPI WAKEUP"); | 150 | memblock_x86_reserve_range(mem, mem + WAKEUP_SIZE, "ACPI WAKEUP"); |
145 | } | 151 | } |
146 | 152 | ||
147 | 153 | ||