diff options
28 files changed, 196 insertions, 205 deletions
diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c index 851cc7158ca3..70b2c7801110 100644 --- a/arch/arm/mach-ep93xx/core.c +++ b/arch/arm/mach-ep93xx/core.c | |||
@@ -336,7 +336,7 @@ static int ep93xx_gpio_irq_type(unsigned int irq, unsigned int type) | |||
336 | if (line >= 0 && line < 16) { | 336 | if (line >= 0 && line < 16) { |
337 | gpio_line_config(line, GPIO_IN); | 337 | gpio_line_config(line, GPIO_IN); |
338 | } else { | 338 | } else { |
339 | gpio_line_config(EP93XX_GPIO_LINE_F(line), GPIO_IN); | 339 | gpio_line_config(EP93XX_GPIO_LINE_F(line-16), GPIO_IN); |
340 | } | 340 | } |
341 | 341 | ||
342 | port = line >> 3; | 342 | port = line >> 3; |
diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c index b4e9b734e0bd..76b800a95191 100644 --- a/arch/arm/mm/cache-l2x0.c +++ b/arch/arm/mm/cache-l2x0.c | |||
@@ -57,7 +57,17 @@ static void l2x0_inv_range(unsigned long start, unsigned long end) | |||
57 | { | 57 | { |
58 | unsigned long addr; | 58 | unsigned long addr; |
59 | 59 | ||
60 | start &= ~(CACHE_LINE_SIZE - 1); | 60 | if (start & (CACHE_LINE_SIZE - 1)) { |
61 | start &= ~(CACHE_LINE_SIZE - 1); | ||
62 | sync_writel(start, L2X0_CLEAN_INV_LINE_PA, 1); | ||
63 | start += CACHE_LINE_SIZE; | ||
64 | } | ||
65 | |||
66 | if (end & (CACHE_LINE_SIZE - 1)) { | ||
67 | end &= ~(CACHE_LINE_SIZE - 1); | ||
68 | sync_writel(end, L2X0_CLEAN_INV_LINE_PA, 1); | ||
69 | } | ||
70 | |||
61 | for (addr = start; addr < end; addr += CACHE_LINE_SIZE) | 71 | for (addr = start; addr < end; addr += CACHE_LINE_SIZE) |
62 | sync_writel(addr, L2X0_INV_LINE_PA, 1); | 72 | sync_writel(addr, L2X0_INV_LINE_PA, 1); |
63 | cache_sync(); | 73 | cache_sync(); |
diff --git a/arch/mips/sibyte/bcm1480/setup.c b/arch/mips/sibyte/bcm1480/setup.c index bb28f28e8042..7e1aa348b8e0 100644 --- a/arch/mips/sibyte/bcm1480/setup.c +++ b/arch/mips/sibyte/bcm1480/setup.c | |||
@@ -15,6 +15,7 @@ | |||
15 | * along with this program; if not, write to the Free Software | 15 | * along with this program; if not, write to the Free Software |
16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
17 | */ | 17 | */ |
18 | #include <linux/init.h> | ||
18 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
19 | #include <linux/module.h> | 20 | #include <linux/module.h> |
20 | #include <linux/reboot.h> | 21 | #include <linux/reboot.h> |
@@ -35,6 +36,7 @@ unsigned int soc_type; | |||
35 | EXPORT_SYMBOL(soc_type); | 36 | EXPORT_SYMBOL(soc_type); |
36 | unsigned int periph_rev; | 37 | unsigned int periph_rev; |
37 | unsigned int zbbus_mhz; | 38 | unsigned int zbbus_mhz; |
39 | EXPORT_SYMBOL(zbbus_mhz); | ||
38 | 40 | ||
39 | static unsigned int part_type; | 41 | static unsigned int part_type; |
40 | 42 | ||
diff --git a/arch/x86_64/Kconfig b/arch/x86_64/Kconfig index ffa036406289..b4d9089a6a06 100644 --- a/arch/x86_64/Kconfig +++ b/arch/x86_64/Kconfig | |||
@@ -60,14 +60,6 @@ config ZONE_DMA | |||
60 | bool | 60 | bool |
61 | default y | 61 | default y |
62 | 62 | ||
63 | config QUICKLIST | ||
64 | bool | ||
65 | default y | ||
66 | |||
67 | config NR_QUICK | ||
68 | int | ||
69 | default 2 | ||
70 | |||
71 | config ISA | 63 | config ISA |
72 | bool | 64 | bool |
73 | 65 | ||
diff --git a/arch/x86_64/ia32/ia32entry.S b/arch/x86_64/ia32/ia32entry.S index 938278697e20..18b231810908 100644 --- a/arch/x86_64/ia32/ia32entry.S +++ b/arch/x86_64/ia32/ia32entry.S | |||
@@ -38,6 +38,18 @@ | |||
38 | movq %rax,R8(%rsp) | 38 | movq %rax,R8(%rsp) |
39 | .endm | 39 | .endm |
40 | 40 | ||
41 | .macro LOAD_ARGS32 offset | ||
42 | movl \offset(%rsp),%r11d | ||
43 | movl \offset+8(%rsp),%r10d | ||
44 | movl \offset+16(%rsp),%r9d | ||
45 | movl \offset+24(%rsp),%r8d | ||
46 | movl \offset+40(%rsp),%ecx | ||
47 | movl \offset+48(%rsp),%edx | ||
48 | movl \offset+56(%rsp),%esi | ||
49 | movl \offset+64(%rsp),%edi | ||
50 | movl \offset+72(%rsp),%eax | ||
51 | .endm | ||
52 | |||
41 | .macro CFI_STARTPROC32 simple | 53 | .macro CFI_STARTPROC32 simple |
42 | CFI_STARTPROC \simple | 54 | CFI_STARTPROC \simple |
43 | CFI_UNDEFINED r8 | 55 | CFI_UNDEFINED r8 |
@@ -152,7 +164,7 @@ sysenter_tracesys: | |||
152 | movq $-ENOSYS,RAX(%rsp) /* really needed? */ | 164 | movq $-ENOSYS,RAX(%rsp) /* really needed? */ |
153 | movq %rsp,%rdi /* &pt_regs -> arg1 */ | 165 | movq %rsp,%rdi /* &pt_regs -> arg1 */ |
154 | call syscall_trace_enter | 166 | call syscall_trace_enter |
155 | LOAD_ARGS ARGOFFSET /* reload args from stack in case ptrace changed it */ | 167 | LOAD_ARGS32 ARGOFFSET /* reload args from stack in case ptrace changed it */ |
156 | RESTORE_REST | 168 | RESTORE_REST |
157 | movl %ebp, %ebp | 169 | movl %ebp, %ebp |
158 | /* no need to do an access_ok check here because rbp has been | 170 | /* no need to do an access_ok check here because rbp has been |
@@ -255,7 +267,7 @@ cstar_tracesys: | |||
255 | movq $-ENOSYS,RAX(%rsp) /* really needed? */ | 267 | movq $-ENOSYS,RAX(%rsp) /* really needed? */ |
256 | movq %rsp,%rdi /* &pt_regs -> arg1 */ | 268 | movq %rsp,%rdi /* &pt_regs -> arg1 */ |
257 | call syscall_trace_enter | 269 | call syscall_trace_enter |
258 | LOAD_ARGS ARGOFFSET /* reload args from stack in case ptrace changed it */ | 270 | LOAD_ARGS32 ARGOFFSET /* reload args from stack in case ptrace changed it */ |
259 | RESTORE_REST | 271 | RESTORE_REST |
260 | movl RSP-ARGOFFSET(%rsp), %r8d | 272 | movl RSP-ARGOFFSET(%rsp), %r8d |
261 | /* no need to do an access_ok check here because r8 has been | 273 | /* no need to do an access_ok check here because r8 has been |
@@ -334,7 +346,7 @@ ia32_tracesys: | |||
334 | movq $-ENOSYS,RAX(%rsp) /* really needed? */ | 346 | movq $-ENOSYS,RAX(%rsp) /* really needed? */ |
335 | movq %rsp,%rdi /* &pt_regs -> arg1 */ | 347 | movq %rsp,%rdi /* &pt_regs -> arg1 */ |
336 | call syscall_trace_enter | 348 | call syscall_trace_enter |
337 | LOAD_ARGS ARGOFFSET /* reload args from stack in case ptrace changed it */ | 349 | LOAD_ARGS32 ARGOFFSET /* reload args from stack in case ptrace changed it */ |
338 | RESTORE_REST | 350 | RESTORE_REST |
339 | jmp ia32_do_syscall | 351 | jmp ia32_do_syscall |
340 | END(ia32_syscall) | 352 | END(ia32_syscall) |
diff --git a/arch/x86_64/kernel/process.c b/arch/x86_64/kernel/process.c index 2842f50cbe3f..98956555450b 100644 --- a/arch/x86_64/kernel/process.c +++ b/arch/x86_64/kernel/process.c | |||
@@ -208,7 +208,6 @@ void cpu_idle (void) | |||
208 | if (__get_cpu_var(cpu_idle_state)) | 208 | if (__get_cpu_var(cpu_idle_state)) |
209 | __get_cpu_var(cpu_idle_state) = 0; | 209 | __get_cpu_var(cpu_idle_state) = 0; |
210 | 210 | ||
211 | check_pgt_cache(); | ||
212 | rmb(); | 211 | rmb(); |
213 | idle = pm_idle; | 212 | idle = pm_idle; |
214 | if (!idle) | 213 | if (!idle) |
diff --git a/arch/x86_64/kernel/ptrace.c b/arch/x86_64/kernel/ptrace.c index e83cc67155ac..eea3702427b4 100644 --- a/arch/x86_64/kernel/ptrace.c +++ b/arch/x86_64/kernel/ptrace.c | |||
@@ -232,10 +232,6 @@ static int putreg(struct task_struct *child, | |||
232 | { | 232 | { |
233 | unsigned long tmp; | 233 | unsigned long tmp; |
234 | 234 | ||
235 | /* Some code in the 64bit emulation may not be 64bit clean. | ||
236 | Don't take any chances. */ | ||
237 | if (test_tsk_thread_flag(child, TIF_IA32)) | ||
238 | value &= 0xffffffff; | ||
239 | switch (regno) { | 235 | switch (regno) { |
240 | case offsetof(struct user_regs_struct,fs): | 236 | case offsetof(struct user_regs_struct,fs): |
241 | if (value && (value & 3) != 3) | 237 | if (value && (value & 3) != 3) |
diff --git a/arch/x86_64/kernel/smp.c b/arch/x86_64/kernel/smp.c index 673a300b5944..df4a82812adb 100644 --- a/arch/x86_64/kernel/smp.c +++ b/arch/x86_64/kernel/smp.c | |||
@@ -241,7 +241,7 @@ void flush_tlb_mm (struct mm_struct * mm) | |||
241 | } | 241 | } |
242 | if (!cpus_empty(cpu_mask)) | 242 | if (!cpus_empty(cpu_mask)) |
243 | flush_tlb_others(cpu_mask, mm, FLUSH_ALL); | 243 | flush_tlb_others(cpu_mask, mm, FLUSH_ALL); |
244 | check_pgt_cache(); | 244 | |
245 | preempt_enable(); | 245 | preempt_enable(); |
246 | } | 246 | } |
247 | EXPORT_SYMBOL(flush_tlb_mm); | 247 | EXPORT_SYMBOL(flush_tlb_mm); |
diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c index 2afb3d2086b3..9f11dc296cdd 100644 --- a/drivers/acpi/processor_core.c +++ b/drivers/acpi/processor_core.c | |||
@@ -102,6 +102,8 @@ static struct acpi_driver acpi_processor_driver = { | |||
102 | .add = acpi_processor_add, | 102 | .add = acpi_processor_add, |
103 | .remove = acpi_processor_remove, | 103 | .remove = acpi_processor_remove, |
104 | .start = acpi_processor_start, | 104 | .start = acpi_processor_start, |
105 | .suspend = acpi_processor_suspend, | ||
106 | .resume = acpi_processor_resume, | ||
105 | }, | 107 | }, |
106 | }; | 108 | }; |
107 | 109 | ||
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index d9b8af763e1e..f18261368e76 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c | |||
@@ -325,6 +325,23 @@ static void acpi_state_timer_broadcast(struct acpi_processor *pr, | |||
325 | 325 | ||
326 | #endif | 326 | #endif |
327 | 327 | ||
328 | /* | ||
329 | * Suspend / resume control | ||
330 | */ | ||
331 | static int acpi_idle_suspend; | ||
332 | |||
333 | int acpi_processor_suspend(struct acpi_device * device, pm_message_t state) | ||
334 | { | ||
335 | acpi_idle_suspend = 1; | ||
336 | return 0; | ||
337 | } | ||
338 | |||
339 | int acpi_processor_resume(struct acpi_device * device) | ||
340 | { | ||
341 | acpi_idle_suspend = 0; | ||
342 | return 0; | ||
343 | } | ||
344 | |||
328 | static void acpi_processor_idle(void) | 345 | static void acpi_processor_idle(void) |
329 | { | 346 | { |
330 | struct acpi_processor *pr = NULL; | 347 | struct acpi_processor *pr = NULL; |
@@ -355,7 +372,7 @@ static void acpi_processor_idle(void) | |||
355 | } | 372 | } |
356 | 373 | ||
357 | cx = pr->power.state; | 374 | cx = pr->power.state; |
358 | if (!cx) { | 375 | if (!cx || acpi_idle_suspend) { |
359 | if (pm_idle_save) | 376 | if (pm_idle_save) |
360 | pm_idle_save(); | 377 | pm_idle_save(); |
361 | else | 378 | else |
diff --git a/drivers/acpi/sleep/Makefile b/drivers/acpi/sleep/Makefile index 195a4f69c0f7..ba9bd403d443 100644 --- a/drivers/acpi/sleep/Makefile +++ b/drivers/acpi/sleep/Makefile | |||
@@ -1,4 +1,4 @@ | |||
1 | obj-y := poweroff.o wakeup.o | 1 | obj-y := wakeup.o |
2 | obj-$(CONFIG_ACPI_SLEEP) += main.o | 2 | obj-$(CONFIG_ACPI_SLEEP) += main.o |
3 | obj-$(CONFIG_ACPI_SLEEP) += proc.o | 3 | obj-$(CONFIG_ACPI_SLEEP) += proc.o |
4 | 4 | ||
diff --git a/drivers/acpi/sleep/main.c b/drivers/acpi/sleep/main.c index c52ade816fb4..85633c585aab 100644 --- a/drivers/acpi/sleep/main.c +++ b/drivers/acpi/sleep/main.c | |||
@@ -15,6 +15,9 @@ | |||
15 | #include <linux/dmi.h> | 15 | #include <linux/dmi.h> |
16 | #include <linux/device.h> | 16 | #include <linux/device.h> |
17 | #include <linux/suspend.h> | 17 | #include <linux/suspend.h> |
18 | |||
19 | #include <asm/io.h> | ||
20 | |||
18 | #include <acpi/acpi_bus.h> | 21 | #include <acpi/acpi_bus.h> |
19 | #include <acpi/acpi_drivers.h> | 22 | #include <acpi/acpi_drivers.h> |
20 | #include "sleep.h" | 23 | #include "sleep.h" |
@@ -57,6 +60,27 @@ static int acpi_pm_set_target(suspend_state_t pm_state) | |||
57 | return error; | 60 | return error; |
58 | } | 61 | } |
59 | 62 | ||
63 | int acpi_sleep_prepare(u32 acpi_state) | ||
64 | { | ||
65 | #ifdef CONFIG_ACPI_SLEEP | ||
66 | /* do we have a wakeup address for S2 and S3? */ | ||
67 | if (acpi_state == ACPI_STATE_S3) { | ||
68 | if (!acpi_wakeup_address) { | ||
69 | return -EFAULT; | ||
70 | } | ||
71 | acpi_set_firmware_waking_vector((acpi_physical_address) | ||
72 | virt_to_phys((void *) | ||
73 | acpi_wakeup_address)); | ||
74 | |||
75 | } | ||
76 | ACPI_FLUSH_CPU_CACHE(); | ||
77 | acpi_enable_wakeup_device_prep(acpi_state); | ||
78 | #endif | ||
79 | acpi_gpe_sleep_prepare(acpi_state); | ||
80 | acpi_enter_sleep_state_prep(acpi_state); | ||
81 | return 0; | ||
82 | } | ||
83 | |||
60 | /** | 84 | /** |
61 | * acpi_pm_prepare - Do preliminary suspend work. | 85 | * acpi_pm_prepare - Do preliminary suspend work. |
62 | * @pm_state: ignored | 86 | * @pm_state: ignored |
@@ -350,6 +374,20 @@ int acpi_pm_device_sleep_state(struct device *dev, int wake, int *d_min_p) | |||
350 | return d_max; | 374 | return d_max; |
351 | } | 375 | } |
352 | 376 | ||
377 | static void acpi_power_off_prepare(void) | ||
378 | { | ||
379 | /* Prepare to power off the system */ | ||
380 | acpi_sleep_prepare(ACPI_STATE_S5); | ||
381 | } | ||
382 | |||
383 | static void acpi_power_off(void) | ||
384 | { | ||
385 | /* acpi_sleep_prepare(ACPI_STATE_S5) should have already been called */ | ||
386 | printk("%s called\n", __FUNCTION__); | ||
387 | local_irq_disable(); | ||
388 | acpi_enter_sleep_state(ACPI_STATE_S5); | ||
389 | } | ||
390 | |||
353 | int __init acpi_sleep_init(void) | 391 | int __init acpi_sleep_init(void) |
354 | { | 392 | { |
355 | acpi_status status; | 393 | acpi_status status; |
@@ -363,16 +401,17 @@ int __init acpi_sleep_init(void) | |||
363 | if (acpi_disabled) | 401 | if (acpi_disabled) |
364 | return 0; | 402 | return 0; |
365 | 403 | ||
404 | sleep_states[ACPI_STATE_S0] = 1; | ||
405 | printk(KERN_INFO PREFIX "(supports S0"); | ||
406 | |||
366 | #ifdef CONFIG_SUSPEND | 407 | #ifdef CONFIG_SUSPEND |
367 | printk(KERN_INFO PREFIX "(supports"); | 408 | for (i = ACPI_STATE_S1; i < ACPI_STATE_S4; i++) { |
368 | for (i = ACPI_STATE_S0; i < ACPI_STATE_S4; i++) { | ||
369 | status = acpi_get_sleep_type_data(i, &type_a, &type_b); | 409 | status = acpi_get_sleep_type_data(i, &type_a, &type_b); |
370 | if (ACPI_SUCCESS(status)) { | 410 | if (ACPI_SUCCESS(status)) { |
371 | sleep_states[i] = 1; | 411 | sleep_states[i] = 1; |
372 | printk(" S%d", i); | 412 | printk(" S%d", i); |
373 | } | 413 | } |
374 | } | 414 | } |
375 | printk(")\n"); | ||
376 | 415 | ||
377 | pm_set_ops(&acpi_pm_ops); | 416 | pm_set_ops(&acpi_pm_ops); |
378 | #endif | 417 | #endif |
@@ -382,10 +421,16 @@ int __init acpi_sleep_init(void) | |||
382 | if (ACPI_SUCCESS(status)) { | 421 | if (ACPI_SUCCESS(status)) { |
383 | hibernation_set_ops(&acpi_hibernation_ops); | 422 | hibernation_set_ops(&acpi_hibernation_ops); |
384 | sleep_states[ACPI_STATE_S4] = 1; | 423 | sleep_states[ACPI_STATE_S4] = 1; |
424 | printk(" S4"); | ||
385 | } | 425 | } |
386 | #else | ||
387 | sleep_states[ACPI_STATE_S4] = 0; | ||
388 | #endif | 426 | #endif |
389 | 427 | status = acpi_get_sleep_type_data(ACPI_STATE_S5, &type_a, &type_b); | |
428 | if (ACPI_SUCCESS(status)) { | ||
429 | sleep_states[ACPI_STATE_S5] = 1; | ||
430 | printk(" S5"); | ||
431 | pm_power_off_prepare = acpi_power_off_prepare; | ||
432 | pm_power_off = acpi_power_off; | ||
433 | } | ||
434 | printk(")\n"); | ||
390 | return 0; | 435 | return 0; |
391 | } | 436 | } |
diff --git a/drivers/acpi/sleep/poweroff.c b/drivers/acpi/sleep/poweroff.c deleted file mode 100644 index 39e40d56b034..000000000000 --- a/drivers/acpi/sleep/poweroff.c +++ /dev/null | |||
@@ -1,75 +0,0 @@ | |||
1 | /* | ||
2 | * poweroff.c - ACPI handler for powering off the system. | ||
3 | * | ||
4 | * AKA S5, but it is independent of whether or not the kernel supports | ||
5 | * any other sleep support in the system. | ||
6 | * | ||
7 | * Copyright (c) 2005 Alexey Starikovskiy <alexey.y.starikovskiy@intel.com> | ||
8 | * | ||
9 | * This file is released under the GPLv2. | ||
10 | */ | ||
11 | |||
12 | #include <linux/pm.h> | ||
13 | #include <linux/init.h> | ||
14 | #include <acpi/acpi_bus.h> | ||
15 | #include <linux/sysdev.h> | ||
16 | #include <asm/io.h> | ||
17 | #include "sleep.h" | ||
18 | |||
19 | int acpi_sleep_prepare(u32 acpi_state) | ||
20 | { | ||
21 | #ifdef CONFIG_ACPI_SLEEP | ||
22 | /* do we have a wakeup address for S2 and S3? */ | ||
23 | if (acpi_state == ACPI_STATE_S3) { | ||
24 | if (!acpi_wakeup_address) { | ||
25 | return -EFAULT; | ||
26 | } | ||
27 | acpi_set_firmware_waking_vector((acpi_physical_address) | ||
28 | virt_to_phys((void *) | ||
29 | acpi_wakeup_address)); | ||
30 | |||
31 | } | ||
32 | ACPI_FLUSH_CPU_CACHE(); | ||
33 | acpi_enable_wakeup_device_prep(acpi_state); | ||
34 | #endif | ||
35 | acpi_gpe_sleep_prepare(acpi_state); | ||
36 | acpi_enter_sleep_state_prep(acpi_state); | ||
37 | return 0; | ||
38 | } | ||
39 | |||
40 | #ifdef CONFIG_PM | ||
41 | |||
42 | static void acpi_power_off_prepare(void) | ||
43 | { | ||
44 | /* Prepare to power off the system */ | ||
45 | acpi_sleep_prepare(ACPI_STATE_S5); | ||
46 | } | ||
47 | |||
48 | static void acpi_power_off(void) | ||
49 | { | ||
50 | /* acpi_sleep_prepare(ACPI_STATE_S5) should have already been called */ | ||
51 | printk("%s called\n", __FUNCTION__); | ||
52 | local_irq_disable(); | ||
53 | /* Some SMP machines only can poweroff in boot CPU */ | ||
54 | acpi_enter_sleep_state(ACPI_STATE_S5); | ||
55 | } | ||
56 | |||
57 | static int acpi_poweroff_init(void) | ||
58 | { | ||
59 | if (!acpi_disabled) { | ||
60 | u8 type_a, type_b; | ||
61 | acpi_status status; | ||
62 | |||
63 | status = | ||
64 | acpi_get_sleep_type_data(ACPI_STATE_S5, &type_a, &type_b); | ||
65 | if (ACPI_SUCCESS(status)) { | ||
66 | pm_power_off_prepare = acpi_power_off_prepare; | ||
67 | pm_power_off = acpi_power_off; | ||
68 | } | ||
69 | } | ||
70 | return 0; | ||
71 | } | ||
72 | |||
73 | late_initcall(acpi_poweroff_init); | ||
74 | |||
75 | #endif /* CONFIG_PM */ | ||
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index 3c9bb85a6a93..d05891f16282 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c | |||
@@ -417,7 +417,6 @@ acpi_video_device_lcd_set_level(struct acpi_video_device *device, int level) | |||
417 | arg0.integer.value = level; | 417 | arg0.integer.value = level; |
418 | status = acpi_evaluate_object(device->dev->handle, "_BCM", &args, NULL); | 418 | status = acpi_evaluate_object(device->dev->handle, "_BCM", &args, NULL); |
419 | 419 | ||
420 | printk(KERN_DEBUG "set_level status: %x\n", status); | ||
421 | return status; | 420 | return status; |
422 | } | 421 | } |
423 | 422 | ||
@@ -1754,7 +1753,7 @@ static int acpi_video_bus_put_devices(struct acpi_video_bus *video) | |||
1754 | 1753 | ||
1755 | static int acpi_video_bus_start_devices(struct acpi_video_bus *video) | 1754 | static int acpi_video_bus_start_devices(struct acpi_video_bus *video) |
1756 | { | 1755 | { |
1757 | return acpi_video_bus_DOS(video, 1, 0); | 1756 | return acpi_video_bus_DOS(video, 0, 0); |
1758 | } | 1757 | } |
1759 | 1758 | ||
1760 | static int acpi_video_bus_stop_devices(struct acpi_video_bus *video) | 1759 | static int acpi_video_bus_stop_devices(struct acpi_video_bus *video) |
diff --git a/drivers/kvm/Kconfig b/drivers/kvm/Kconfig index 7b64fd4aa2f3..0a419a0de603 100644 --- a/drivers/kvm/Kconfig +++ b/drivers/kvm/Kconfig | |||
@@ -6,7 +6,8 @@ menuconfig VIRTUALIZATION | |||
6 | depends on X86 | 6 | depends on X86 |
7 | default y | 7 | default y |
8 | ---help--- | 8 | ---help--- |
9 | Say Y here to get to see options for virtualization guest drivers. | 9 | Say Y here to get to see options for using your Linux host to run other |
10 | operating systems inside virtual machines (guests). | ||
10 | This option alone does not add any kernel code. | 11 | This option alone does not add any kernel code. |
11 | 12 | ||
12 | If you say N, all options in this submenu will be skipped and disabled. | 13 | If you say N, all options in this submenu will be skipped and disabled. |
diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c index 50cd8a209012..f37f25c931f5 100644 --- a/fs/ocfs2/aops.c +++ b/fs/ocfs2/aops.c | |||
@@ -930,18 +930,11 @@ static void ocfs2_write_failure(struct inode *inode, | |||
930 | loff_t user_pos, unsigned user_len) | 930 | loff_t user_pos, unsigned user_len) |
931 | { | 931 | { |
932 | int i; | 932 | int i; |
933 | unsigned from, to; | 933 | unsigned from = user_pos & (PAGE_CACHE_SIZE - 1), |
934 | to = user_pos + user_len; | ||
934 | struct page *tmppage; | 935 | struct page *tmppage; |
935 | 936 | ||
936 | ocfs2_zero_new_buffers(wc->w_target_page, user_pos, user_len); | 937 | ocfs2_zero_new_buffers(wc->w_target_page, from, to); |
937 | |||
938 | if (wc->w_large_pages) { | ||
939 | from = wc->w_target_from; | ||
940 | to = wc->w_target_to; | ||
941 | } else { | ||
942 | from = 0; | ||
943 | to = PAGE_CACHE_SIZE; | ||
944 | } | ||
945 | 938 | ||
946 | for(i = 0; i < wc->w_num_pages; i++) { | 939 | for(i = 0; i < wc->w_num_pages; i++) { |
947 | tmppage = wc->w_pages[i]; | 940 | tmppage = wc->w_pages[i]; |
@@ -991,9 +984,6 @@ static int ocfs2_prepare_page_for_write(struct inode *inode, u64 *p_blkno, | |||
991 | map_from = cluster_start; | 984 | map_from = cluster_start; |
992 | map_to = cluster_end; | 985 | map_to = cluster_end; |
993 | } | 986 | } |
994 | |||
995 | wc->w_target_from = map_from; | ||
996 | wc->w_target_to = map_to; | ||
997 | } else { | 987 | } else { |
998 | /* | 988 | /* |
999 | * If we haven't allocated the new page yet, we | 989 | * If we haven't allocated the new page yet, we |
@@ -1211,18 +1201,33 @@ static int ocfs2_write_cluster_by_desc(struct address_space *mapping, | |||
1211 | loff_t pos, unsigned len) | 1201 | loff_t pos, unsigned len) |
1212 | { | 1202 | { |
1213 | int ret, i; | 1203 | int ret, i; |
1204 | loff_t cluster_off; | ||
1205 | unsigned int local_len = len; | ||
1214 | struct ocfs2_write_cluster_desc *desc; | 1206 | struct ocfs2_write_cluster_desc *desc; |
1207 | struct ocfs2_super *osb = OCFS2_SB(mapping->host->i_sb); | ||
1215 | 1208 | ||
1216 | for (i = 0; i < wc->w_clen; i++) { | 1209 | for (i = 0; i < wc->w_clen; i++) { |
1217 | desc = &wc->w_desc[i]; | 1210 | desc = &wc->w_desc[i]; |
1218 | 1211 | ||
1212 | /* | ||
1213 | * We have to make sure that the total write passed in | ||
1214 | * doesn't extend past a single cluster. | ||
1215 | */ | ||
1216 | local_len = len; | ||
1217 | cluster_off = pos & (osb->s_clustersize - 1); | ||
1218 | if ((cluster_off + local_len) > osb->s_clustersize) | ||
1219 | local_len = osb->s_clustersize - cluster_off; | ||
1220 | |||
1219 | ret = ocfs2_write_cluster(mapping, desc->c_phys, | 1221 | ret = ocfs2_write_cluster(mapping, desc->c_phys, |
1220 | desc->c_unwritten, data_ac, meta_ac, | 1222 | desc->c_unwritten, data_ac, meta_ac, |
1221 | wc, desc->c_cpos, pos, len); | 1223 | wc, desc->c_cpos, pos, local_len); |
1222 | if (ret) { | 1224 | if (ret) { |
1223 | mlog_errno(ret); | 1225 | mlog_errno(ret); |
1224 | goto out; | 1226 | goto out; |
1225 | } | 1227 | } |
1228 | |||
1229 | len -= local_len; | ||
1230 | pos += local_len; | ||
1226 | } | 1231 | } |
1227 | 1232 | ||
1228 | ret = 0; | 1233 | ret = 0; |
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index 7e34e66159c6..f3bc3658e7a5 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c | |||
@@ -491,8 +491,8 @@ int ocfs2_do_extend_allocation(struct ocfs2_super *osb, | |||
491 | goto leave; | 491 | goto leave; |
492 | } | 492 | } |
493 | 493 | ||
494 | status = ocfs2_claim_clusters(osb, handle, data_ac, 1, | 494 | status = __ocfs2_claim_clusters(osb, handle, data_ac, 1, |
495 | &bit_off, &num_bits); | 495 | clusters_to_add, &bit_off, &num_bits); |
496 | if (status < 0) { | 496 | if (status < 0) { |
497 | if (status != -ENOSPC) | 497 | if (status != -ENOSPC) |
498 | mlog_errno(status); | 498 | mlog_errno(status); |
diff --git a/fs/ocfs2/localalloc.c b/fs/ocfs2/localalloc.c index 545f7892cdf3..de984d272576 100644 --- a/fs/ocfs2/localalloc.c +++ b/fs/ocfs2/localalloc.c | |||
@@ -524,13 +524,12 @@ bail: | |||
524 | int ocfs2_claim_local_alloc_bits(struct ocfs2_super *osb, | 524 | int ocfs2_claim_local_alloc_bits(struct ocfs2_super *osb, |
525 | handle_t *handle, | 525 | handle_t *handle, |
526 | struct ocfs2_alloc_context *ac, | 526 | struct ocfs2_alloc_context *ac, |
527 | u32 min_bits, | 527 | u32 bits_wanted, |
528 | u32 *bit_off, | 528 | u32 *bit_off, |
529 | u32 *num_bits) | 529 | u32 *num_bits) |
530 | { | 530 | { |
531 | int status, start; | 531 | int status, start; |
532 | struct inode *local_alloc_inode; | 532 | struct inode *local_alloc_inode; |
533 | u32 bits_wanted; | ||
534 | void *bitmap; | 533 | void *bitmap; |
535 | struct ocfs2_dinode *alloc; | 534 | struct ocfs2_dinode *alloc; |
536 | struct ocfs2_local_alloc *la; | 535 | struct ocfs2_local_alloc *la; |
@@ -538,7 +537,6 @@ int ocfs2_claim_local_alloc_bits(struct ocfs2_super *osb, | |||
538 | mlog_entry_void(); | 537 | mlog_entry_void(); |
539 | BUG_ON(ac->ac_which != OCFS2_AC_USE_LOCAL); | 538 | BUG_ON(ac->ac_which != OCFS2_AC_USE_LOCAL); |
540 | 539 | ||
541 | bits_wanted = ac->ac_bits_wanted - ac->ac_bits_given; | ||
542 | local_alloc_inode = ac->ac_inode; | 540 | local_alloc_inode = ac->ac_inode; |
543 | alloc = (struct ocfs2_dinode *) osb->local_alloc_bh->b_data; | 541 | alloc = (struct ocfs2_dinode *) osb->local_alloc_bh->b_data; |
544 | la = OCFS2_LOCAL_ALLOC(alloc); | 542 | la = OCFS2_LOCAL_ALLOC(alloc); |
diff --git a/fs/ocfs2/localalloc.h b/fs/ocfs2/localalloc.h index 385a10152f9c..3f76631e110c 100644 --- a/fs/ocfs2/localalloc.h +++ b/fs/ocfs2/localalloc.h | |||
@@ -48,7 +48,7 @@ int ocfs2_reserve_local_alloc_bits(struct ocfs2_super *osb, | |||
48 | int ocfs2_claim_local_alloc_bits(struct ocfs2_super *osb, | 48 | int ocfs2_claim_local_alloc_bits(struct ocfs2_super *osb, |
49 | handle_t *handle, | 49 | handle_t *handle, |
50 | struct ocfs2_alloc_context *ac, | 50 | struct ocfs2_alloc_context *ac, |
51 | u32 min_bits, | 51 | u32 bits_wanted, |
52 | u32 *bit_off, | 52 | u32 *bit_off, |
53 | u32 *num_bits); | 53 | u32 *num_bits); |
54 | 54 | ||
diff --git a/fs/ocfs2/suballoc.c b/fs/ocfs2/suballoc.c index d9c5c9fcb30f..8f09f5235e3a 100644 --- a/fs/ocfs2/suballoc.c +++ b/fs/ocfs2/suballoc.c | |||
@@ -1486,21 +1486,21 @@ static inline void ocfs2_block_to_cluster_group(struct inode *inode, | |||
1486 | * contig. allocation, set to '1' to indicate we can deal with extents | 1486 | * contig. allocation, set to '1' to indicate we can deal with extents |
1487 | * of any size. | 1487 | * of any size. |
1488 | */ | 1488 | */ |
1489 | int ocfs2_claim_clusters(struct ocfs2_super *osb, | 1489 | int __ocfs2_claim_clusters(struct ocfs2_super *osb, |
1490 | handle_t *handle, | 1490 | handle_t *handle, |
1491 | struct ocfs2_alloc_context *ac, | 1491 | struct ocfs2_alloc_context *ac, |
1492 | u32 min_clusters, | 1492 | u32 min_clusters, |
1493 | u32 *cluster_start, | 1493 | u32 max_clusters, |
1494 | u32 *num_clusters) | 1494 | u32 *cluster_start, |
1495 | u32 *num_clusters) | ||
1495 | { | 1496 | { |
1496 | int status; | 1497 | int status; |
1497 | unsigned int bits_wanted = ac->ac_bits_wanted - ac->ac_bits_given; | 1498 | unsigned int bits_wanted = max_clusters; |
1498 | u64 bg_blkno = 0; | 1499 | u64 bg_blkno = 0; |
1499 | u16 bg_bit_off; | 1500 | u16 bg_bit_off; |
1500 | 1501 | ||
1501 | mlog_entry_void(); | 1502 | mlog_entry_void(); |
1502 | 1503 | ||
1503 | BUG_ON(!ac); | ||
1504 | BUG_ON(ac->ac_bits_given >= ac->ac_bits_wanted); | 1504 | BUG_ON(ac->ac_bits_given >= ac->ac_bits_wanted); |
1505 | 1505 | ||
1506 | BUG_ON(ac->ac_which != OCFS2_AC_USE_LOCAL | 1506 | BUG_ON(ac->ac_which != OCFS2_AC_USE_LOCAL |
@@ -1557,6 +1557,19 @@ bail: | |||
1557 | return status; | 1557 | return status; |
1558 | } | 1558 | } |
1559 | 1559 | ||
1560 | int ocfs2_claim_clusters(struct ocfs2_super *osb, | ||
1561 | handle_t *handle, | ||
1562 | struct ocfs2_alloc_context *ac, | ||
1563 | u32 min_clusters, | ||
1564 | u32 *cluster_start, | ||
1565 | u32 *num_clusters) | ||
1566 | { | ||
1567 | unsigned int bits_wanted = ac->ac_bits_wanted - ac->ac_bits_given; | ||
1568 | |||
1569 | return __ocfs2_claim_clusters(osb, handle, ac, min_clusters, | ||
1570 | bits_wanted, cluster_start, num_clusters); | ||
1571 | } | ||
1572 | |||
1560 | static inline int ocfs2_block_group_clear_bits(handle_t *handle, | 1573 | static inline int ocfs2_block_group_clear_bits(handle_t *handle, |
1561 | struct inode *alloc_inode, | 1574 | struct inode *alloc_inode, |
1562 | struct ocfs2_group_desc *bg, | 1575 | struct ocfs2_group_desc *bg, |
diff --git a/fs/ocfs2/suballoc.h b/fs/ocfs2/suballoc.h index f212dc01a84b..cafe93703095 100644 --- a/fs/ocfs2/suballoc.h +++ b/fs/ocfs2/suballoc.h | |||
@@ -85,6 +85,17 @@ int ocfs2_claim_clusters(struct ocfs2_super *osb, | |||
85 | u32 min_clusters, | 85 | u32 min_clusters, |
86 | u32 *cluster_start, | 86 | u32 *cluster_start, |
87 | u32 *num_clusters); | 87 | u32 *num_clusters); |
88 | /* | ||
89 | * Use this variant of ocfs2_claim_clusters to specify a maxiumum | ||
90 | * number of clusters smaller than the allocation reserved. | ||
91 | */ | ||
92 | int __ocfs2_claim_clusters(struct ocfs2_super *osb, | ||
93 | handle_t *handle, | ||
94 | struct ocfs2_alloc_context *ac, | ||
95 | u32 min_clusters, | ||
96 | u32 max_clusters, | ||
97 | u32 *cluster_start, | ||
98 | u32 *num_clusters); | ||
88 | 99 | ||
89 | int ocfs2_free_suballoc_bits(handle_t *handle, | 100 | int ocfs2_free_suballoc_bits(handle_t *handle, |
90 | struct inode *alloc_inode, | 101 | struct inode *alloc_inode, |
diff --git a/fs/ocfs2/vote.c b/fs/ocfs2/vote.c index 66a13ee63d4c..c05358538f2b 100644 --- a/fs/ocfs2/vote.c +++ b/fs/ocfs2/vote.c | |||
@@ -66,7 +66,7 @@ struct ocfs2_vote_msg | |||
66 | { | 66 | { |
67 | struct ocfs2_msg_hdr v_hdr; | 67 | struct ocfs2_msg_hdr v_hdr; |
68 | __be32 v_reserved1; | 68 | __be32 v_reserved1; |
69 | }; | 69 | } __attribute__ ((packed)); |
70 | 70 | ||
71 | /* Responses are given these values to maintain backwards | 71 | /* Responses are given these values to maintain backwards |
72 | * compatibility with older ocfs2 versions */ | 72 | * compatibility with older ocfs2 versions */ |
@@ -78,7 +78,7 @@ struct ocfs2_response_msg | |||
78 | { | 78 | { |
79 | struct ocfs2_msg_hdr r_hdr; | 79 | struct ocfs2_msg_hdr r_hdr; |
80 | __be32 r_response; | 80 | __be32 r_response; |
81 | }; | 81 | } __attribute__ ((packed)); |
82 | 82 | ||
83 | struct ocfs2_vote_work { | 83 | struct ocfs2_vote_work { |
84 | struct list_head w_list; | 84 | struct list_head w_list; |
diff --git a/fs/xfs/xfs_filestream.c b/fs/xfs/xfs_filestream.c index 16f8e175167d..36d8f6aa11af 100644 --- a/fs/xfs/xfs_filestream.c +++ b/fs/xfs/xfs_filestream.c | |||
@@ -350,9 +350,10 @@ _xfs_filestream_update_ag( | |||
350 | /* xfs_fstrm_free_func(): callback for freeing cached stream items. */ | 350 | /* xfs_fstrm_free_func(): callback for freeing cached stream items. */ |
351 | void | 351 | void |
352 | xfs_fstrm_free_func( | 352 | xfs_fstrm_free_func( |
353 | xfs_ino_t ino, | 353 | unsigned long ino, |
354 | fstrm_item_t *item) | 354 | void *data) |
355 | { | 355 | { |
356 | fstrm_item_t *item = (fstrm_item_t *)data; | ||
356 | xfs_inode_t *ip = item->ip; | 357 | xfs_inode_t *ip = item->ip; |
357 | int ref; | 358 | int ref; |
358 | 359 | ||
@@ -438,7 +439,7 @@ xfs_filestream_mount( | |||
438 | grp_count = 10; | 439 | grp_count = 10; |
439 | 440 | ||
440 | err = xfs_mru_cache_create(&mp->m_filestream, lifetime, grp_count, | 441 | err = xfs_mru_cache_create(&mp->m_filestream, lifetime, grp_count, |
441 | (xfs_mru_cache_free_func_t)xfs_fstrm_free_func); | 442 | xfs_fstrm_free_func); |
442 | 443 | ||
443 | return err; | 444 | return err; |
444 | } | 445 | } |
diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c index dacb19739cc2..7174991f4bef 100644 --- a/fs/xfs/xfs_log_recover.c +++ b/fs/xfs/xfs_log_recover.c | |||
@@ -1920,9 +1920,9 @@ xlog_recover_do_reg_buffer( | |||
1920 | stale_buf = 1; | 1920 | stale_buf = 1; |
1921 | break; | 1921 | break; |
1922 | } | 1922 | } |
1923 | if (be16_to_cpu(dip->di_core.di_mode)) | 1923 | if (dip->di_core.di_mode) |
1924 | mode_count++; | 1924 | mode_count++; |
1925 | if (be16_to_cpu(dip->di_core.di_gen)) | 1925 | if (dip->di_core.di_gen) |
1926 | gen_count++; | 1926 | gen_count++; |
1927 | } | 1927 | } |
1928 | 1928 | ||
diff --git a/include/acpi/processor.h b/include/acpi/processor.h index ec3ffdadb4d2..99934a999e66 100644 --- a/include/acpi/processor.h +++ b/include/acpi/processor.h | |||
@@ -320,6 +320,8 @@ int acpi_processor_power_init(struct acpi_processor *pr, | |||
320 | int acpi_processor_cst_has_changed(struct acpi_processor *pr); | 320 | int acpi_processor_cst_has_changed(struct acpi_processor *pr); |
321 | int acpi_processor_power_exit(struct acpi_processor *pr, | 321 | int acpi_processor_power_exit(struct acpi_processor *pr, |
322 | struct acpi_device *device); | 322 | struct acpi_device *device); |
323 | int acpi_processor_suspend(struct acpi_device * device, pm_message_t state); | ||
324 | int acpi_processor_resume(struct acpi_device * device); | ||
323 | 325 | ||
324 | /* in processor_thermal.c */ | 326 | /* in processor_thermal.c */ |
325 | int acpi_processor_get_limit_info(struct acpi_processor *pr); | 327 | int acpi_processor_get_limit_info(struct acpi_processor *pr); |
diff --git a/include/asm-x86_64/pgalloc.h b/include/asm-x86_64/pgalloc.h index b467be6d367f..8bb564687860 100644 --- a/include/asm-x86_64/pgalloc.h +++ b/include/asm-x86_64/pgalloc.h | |||
@@ -4,10 +4,6 @@ | |||
4 | #include <asm/pda.h> | 4 | #include <asm/pda.h> |
5 | #include <linux/threads.h> | 5 | #include <linux/threads.h> |
6 | #include <linux/mm.h> | 6 | #include <linux/mm.h> |
7 | #include <linux/quicklist.h> | ||
8 | |||
9 | #define QUICK_PGD 0 /* We preserve special mappings over free */ | ||
10 | #define QUICK_PT 1 /* Other page table pages that are zero on free */ | ||
11 | 7 | ||
12 | #define pmd_populate_kernel(mm, pmd, pte) \ | 8 | #define pmd_populate_kernel(mm, pmd, pte) \ |
13 | set_pmd(pmd, __pmd(_PAGE_TABLE | __pa(pte))) | 9 | set_pmd(pmd, __pmd(_PAGE_TABLE | __pa(pte))) |
@@ -24,23 +20,23 @@ static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd, struct page *p | |||
24 | static inline void pmd_free(pmd_t *pmd) | 20 | static inline void pmd_free(pmd_t *pmd) |
25 | { | 21 | { |
26 | BUG_ON((unsigned long)pmd & (PAGE_SIZE-1)); | 22 | BUG_ON((unsigned long)pmd & (PAGE_SIZE-1)); |
27 | quicklist_free(QUICK_PT, NULL, pmd); | 23 | free_page((unsigned long)pmd); |
28 | } | 24 | } |
29 | 25 | ||
30 | static inline pmd_t *pmd_alloc_one (struct mm_struct *mm, unsigned long addr) | 26 | static inline pmd_t *pmd_alloc_one (struct mm_struct *mm, unsigned long addr) |
31 | { | 27 | { |
32 | return (pmd_t *)quicklist_alloc(QUICK_PT, GFP_KERNEL|__GFP_REPEAT, NULL); | 28 | return (pmd_t *)get_zeroed_page(GFP_KERNEL|__GFP_REPEAT); |
33 | } | 29 | } |
34 | 30 | ||
35 | static inline pud_t *pud_alloc_one(struct mm_struct *mm, unsigned long addr) | 31 | static inline pud_t *pud_alloc_one(struct mm_struct *mm, unsigned long addr) |
36 | { | 32 | { |
37 | return (pud_t *)quicklist_alloc(QUICK_PT, GFP_KERNEL|__GFP_REPEAT, NULL); | 33 | return (pud_t *)get_zeroed_page(GFP_KERNEL|__GFP_REPEAT); |
38 | } | 34 | } |
39 | 35 | ||
40 | static inline void pud_free (pud_t *pud) | 36 | static inline void pud_free (pud_t *pud) |
41 | { | 37 | { |
42 | BUG_ON((unsigned long)pud & (PAGE_SIZE-1)); | 38 | BUG_ON((unsigned long)pud & (PAGE_SIZE-1)); |
43 | quicklist_free(QUICK_PT, NULL, pud); | 39 | free_page((unsigned long)pud); |
44 | } | 40 | } |
45 | 41 | ||
46 | static inline void pgd_list_add(pgd_t *pgd) | 42 | static inline void pgd_list_add(pgd_t *pgd) |
@@ -61,57 +57,41 @@ static inline void pgd_list_del(pgd_t *pgd) | |||
61 | spin_unlock(&pgd_lock); | 57 | spin_unlock(&pgd_lock); |
62 | } | 58 | } |
63 | 59 | ||
64 | static inline void pgd_ctor(void *x) | 60 | static inline pgd_t *pgd_alloc(struct mm_struct *mm) |
65 | { | 61 | { |
66 | unsigned boundary; | 62 | unsigned boundary; |
67 | pgd_t *pgd = x; | 63 | pgd_t *pgd = (pgd_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT); |
68 | struct page *page = virt_to_page(pgd); | 64 | if (!pgd) |
69 | 65 | return NULL; | |
66 | pgd_list_add(pgd); | ||
70 | /* | 67 | /* |
71 | * Copy kernel pointers in from init. | 68 | * Copy kernel pointers in from init. |
69 | * Could keep a freelist or slab cache of those because the kernel | ||
70 | * part never changes. | ||
72 | */ | 71 | */ |
73 | boundary = pgd_index(__PAGE_OFFSET); | 72 | boundary = pgd_index(__PAGE_OFFSET); |
73 | memset(pgd, 0, boundary * sizeof(pgd_t)); | ||
74 | memcpy(pgd + boundary, | 74 | memcpy(pgd + boundary, |
75 | init_level4_pgt + boundary, | 75 | init_level4_pgt + boundary, |
76 | (PTRS_PER_PGD - boundary) * sizeof(pgd_t)); | 76 | (PTRS_PER_PGD - boundary) * sizeof(pgd_t)); |
77 | |||
78 | spin_lock(&pgd_lock); | ||
79 | list_add(&page->lru, &pgd_list); | ||
80 | spin_unlock(&pgd_lock); | ||
81 | } | ||
82 | |||
83 | static inline void pgd_dtor(void *x) | ||
84 | { | ||
85 | pgd_t *pgd = x; | ||
86 | struct page *page = virt_to_page(pgd); | ||
87 | |||
88 | spin_lock(&pgd_lock); | ||
89 | list_del(&page->lru); | ||
90 | spin_unlock(&pgd_lock); | ||
91 | } | ||
92 | |||
93 | static inline pgd_t *pgd_alloc(struct mm_struct *mm) | ||
94 | { | ||
95 | pgd_t *pgd = (pgd_t *)quicklist_alloc(QUICK_PGD, | ||
96 | GFP_KERNEL|__GFP_REPEAT, pgd_ctor); | ||
97 | return pgd; | 77 | return pgd; |
98 | } | 78 | } |
99 | 79 | ||
100 | static inline void pgd_free(pgd_t *pgd) | 80 | static inline void pgd_free(pgd_t *pgd) |
101 | { | 81 | { |
102 | BUG_ON((unsigned long)pgd & (PAGE_SIZE-1)); | 82 | BUG_ON((unsigned long)pgd & (PAGE_SIZE-1)); |
103 | quicklist_free(QUICK_PGD, pgd_dtor, pgd); | 83 | pgd_list_del(pgd); |
84 | free_page((unsigned long)pgd); | ||
104 | } | 85 | } |
105 | 86 | ||
106 | static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address) | 87 | static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address) |
107 | { | 88 | { |
108 | return (pte_t *)quicklist_alloc(QUICK_PT, GFP_KERNEL|__GFP_REPEAT, NULL); | 89 | return (pte_t *)get_zeroed_page(GFP_KERNEL|__GFP_REPEAT); |
109 | } | 90 | } |
110 | 91 | ||
111 | static inline struct page *pte_alloc_one(struct mm_struct *mm, unsigned long address) | 92 | static inline struct page *pte_alloc_one(struct mm_struct *mm, unsigned long address) |
112 | { | 93 | { |
113 | void *p = (void *)quicklist_alloc(QUICK_PT, GFP_KERNEL|__GFP_REPEAT, NULL); | 94 | void *p = (void *)get_zeroed_page(GFP_KERNEL|__GFP_REPEAT); |
114 | |||
115 | if (!p) | 95 | if (!p) |
116 | return NULL; | 96 | return NULL; |
117 | return virt_to_page(p); | 97 | return virt_to_page(p); |
@@ -123,22 +103,17 @@ static inline struct page *pte_alloc_one(struct mm_struct *mm, unsigned long add | |||
123 | static inline void pte_free_kernel(pte_t *pte) | 103 | static inline void pte_free_kernel(pte_t *pte) |
124 | { | 104 | { |
125 | BUG_ON((unsigned long)pte & (PAGE_SIZE-1)); | 105 | BUG_ON((unsigned long)pte & (PAGE_SIZE-1)); |
126 | quicklist_free(QUICK_PT, NULL, pte); | 106 | free_page((unsigned long)pte); |
127 | } | 107 | } |
128 | 108 | ||
129 | static inline void pte_free(struct page *pte) | 109 | static inline void pte_free(struct page *pte) |
130 | { | 110 | { |
131 | quicklist_free_page(QUICK_PT, NULL, pte); | 111 | __free_page(pte); |
132 | } | 112 | } |
133 | 113 | ||
134 | #define __pte_free_tlb(tlb,pte) quicklist_free_page(QUICK_PT, NULL,(pte)) | 114 | #define __pte_free_tlb(tlb,pte) tlb_remove_page((tlb),(pte)) |
135 | 115 | ||
136 | #define __pmd_free_tlb(tlb,x) quicklist_free(QUICK_PT, NULL, (x)) | 116 | #define __pmd_free_tlb(tlb,x) tlb_remove_page((tlb),virt_to_page(x)) |
137 | #define __pud_free_tlb(tlb,x) quicklist_free(QUICK_PT, NULL, (x)) | 117 | #define __pud_free_tlb(tlb,x) tlb_remove_page((tlb),virt_to_page(x)) |
138 | 118 | ||
139 | static inline void check_pgt_cache(void) | ||
140 | { | ||
141 | quicklist_trim(QUICK_PGD, pgd_dtor, 25, 16); | ||
142 | quicklist_trim(QUICK_PT, NULL, 25, 16); | ||
143 | } | ||
144 | #endif /* _X86_64_PGALLOC_H */ | 119 | #endif /* _X86_64_PGALLOC_H */ |
diff --git a/include/asm-x86_64/pgtable.h b/include/asm-x86_64/pgtable.h index c9d8764c89d1..57dd6b3107ea 100644 --- a/include/asm-x86_64/pgtable.h +++ b/include/asm-x86_64/pgtable.h | |||
@@ -411,6 +411,7 @@ pte_t *lookup_address(unsigned long addr); | |||
411 | #define HAVE_ARCH_UNMAPPED_AREA | 411 | #define HAVE_ARCH_UNMAPPED_AREA |
412 | 412 | ||
413 | #define pgtable_cache_init() do { } while (0) | 413 | #define pgtable_cache_init() do { } while (0) |
414 | #define check_pgt_cache() do { } while (0) | ||
414 | 415 | ||
415 | #define PAGE_AGP PAGE_KERNEL_NOCACHE | 416 | #define PAGE_AGP PAGE_KERNEL_NOCACHE |
416 | #define HAVE_PAGE_AGP 1 | 417 | #define HAVE_PAGE_AGP 1 |
diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c index aab881c86a1a..0962e0577660 100644 --- a/kernel/time/tick-broadcast.c +++ b/kernel/time/tick-broadcast.c | |||
@@ -382,23 +382,8 @@ static int tick_broadcast_set_event(ktime_t expires, int force) | |||
382 | 382 | ||
383 | int tick_resume_broadcast_oneshot(struct clock_event_device *bc) | 383 | int tick_resume_broadcast_oneshot(struct clock_event_device *bc) |
384 | { | 384 | { |
385 | int cpu = smp_processor_id(); | ||
386 | |||
387 | /* | ||
388 | * If the CPU is marked for broadcast, enforce oneshot | ||
389 | * broadcast mode. The jinxed VAIO does not resume otherwise. | ||
390 | * No idea why it ends up in a lower C State during resume | ||
391 | * without notifying the clock events layer. | ||
392 | */ | ||
393 | if (cpu_isset(cpu, tick_broadcast_mask)) | ||
394 | cpu_set(cpu, tick_broadcast_oneshot_mask); | ||
395 | |||
396 | clockevents_set_mode(bc, CLOCK_EVT_MODE_ONESHOT); | 385 | clockevents_set_mode(bc, CLOCK_EVT_MODE_ONESHOT); |
397 | 386 | return 0; | |
398 | if(!cpus_empty(tick_broadcast_oneshot_mask)) | ||
399 | tick_broadcast_set_event(ktime_get(), 1); | ||
400 | |||
401 | return cpu_isset(cpu, tick_broadcast_oneshot_mask); | ||
402 | } | 387 | } |
403 | 388 | ||
404 | /* | 389 | /* |