diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kernel/cpu/cpufreq/powernow-k8.c | 13 | ||||
-rw-r--r-- | arch/x86/lguest/Makefile | 1 | ||||
-rw-r--r-- | arch/x86/lguest/boot.c | 17 |
3 files changed, 21 insertions, 10 deletions
diff --git a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c index f6b32d112357..35dc8fbe92bd 100644 --- a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c +++ b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c | |||
@@ -835,7 +835,7 @@ static int powernow_k8_cpu_init_acpi(struct powernow_k8_data *data) | |||
835 | { | 835 | { |
836 | struct cpufreq_frequency_table *powernow_table; | 836 | struct cpufreq_frequency_table *powernow_table; |
837 | int ret_val = -ENODEV; | 837 | int ret_val = -ENODEV; |
838 | acpi_integer space_id; | 838 | acpi_integer control, status; |
839 | 839 | ||
840 | if (acpi_processor_register_performance(&data->acpi_data, data->cpu)) { | 840 | if (acpi_processor_register_performance(&data->acpi_data, data->cpu)) { |
841 | dprintk("register performance failed: bad ACPI data\n"); | 841 | dprintk("register performance failed: bad ACPI data\n"); |
@@ -848,12 +848,13 @@ static int powernow_k8_cpu_init_acpi(struct powernow_k8_data *data) | |||
848 | goto err_out; | 848 | goto err_out; |
849 | } | 849 | } |
850 | 850 | ||
851 | space_id = data->acpi_data.control_register.space_id; | 851 | control = data->acpi_data.control_register.space_id; |
852 | if ((space_id != ACPI_ADR_SPACE_FIXED_HARDWARE) || | 852 | status = data->acpi_data.status_register.space_id; |
853 | (space_id != ACPI_ADR_SPACE_FIXED_HARDWARE)) { | 853 | |
854 | if ((control != ACPI_ADR_SPACE_FIXED_HARDWARE) || | ||
855 | (status != ACPI_ADR_SPACE_FIXED_HARDWARE)) { | ||
854 | dprintk("Invalid control/status registers (%x - %x)\n", | 856 | dprintk("Invalid control/status registers (%x - %x)\n", |
855 | data->acpi_data.control_register.space_id, | 857 | control, status); |
856 | space_id); | ||
857 | goto err_out; | 858 | goto err_out; |
858 | } | 859 | } |
859 | 860 | ||
diff --git a/arch/x86/lguest/Makefile b/arch/x86/lguest/Makefile index 27f0c9ed7f60..94e0e54056a9 100644 --- a/arch/x86/lguest/Makefile +++ b/arch/x86/lguest/Makefile | |||
@@ -1 +1,2 @@ | |||
1 | obj-y := i386_head.o boot.o | 1 | obj-y := i386_head.o boot.o |
2 | CFLAGS_boot.o := $(call cc-option, -fno-stack-protector) | ||
diff --git a/arch/x86/lguest/boot.c b/arch/x86/lguest/boot.c index ca7ec44bafc3..33a93b417396 100644 --- a/arch/x86/lguest/boot.c +++ b/arch/x86/lguest/boot.c | |||
@@ -67,6 +67,7 @@ | |||
67 | #include <asm/mce.h> | 67 | #include <asm/mce.h> |
68 | #include <asm/io.h> | 68 | #include <asm/io.h> |
69 | #include <asm/i387.h> | 69 | #include <asm/i387.h> |
70 | #include <asm/stackprotector.h> | ||
70 | #include <asm/reboot.h> /* for struct machine_ops */ | 71 | #include <asm/reboot.h> /* for struct machine_ops */ |
71 | 72 | ||
72 | /*G:010 Welcome to the Guest! | 73 | /*G:010 Welcome to the Guest! |
@@ -1088,13 +1089,21 @@ __init void lguest_init(void) | |||
1088 | * lguest_init() where the rest of the fairly chaotic boot setup | 1089 | * lguest_init() where the rest of the fairly chaotic boot setup |
1089 | * occurs. */ | 1090 | * occurs. */ |
1090 | 1091 | ||
1092 | /* The stack protector is a weird thing where gcc places a canary | ||
1093 | * value on the stack and then checks it on return. This file is | ||
1094 | * compiled with -fno-stack-protector it, so we got this far without | ||
1095 | * problems. The value of the canary is kept at offset 20 from the | ||
1096 | * %gs register, so we need to set that up before calling C functions | ||
1097 | * in other files. */ | ||
1098 | setup_stack_canary_segment(0); | ||
1099 | /* We could just call load_stack_canary_segment(), but we might as | ||
1100 | * call switch_to_new_gdt() which loads the whole table and sets up | ||
1101 | * the per-cpu segment descriptor register %fs as well. */ | ||
1102 | switch_to_new_gdt(0); | ||
1103 | |||
1091 | /* As described in head_32.S, we map the first 128M of memory. */ | 1104 | /* As described in head_32.S, we map the first 128M of memory. */ |
1092 | max_pfn_mapped = (128*1024*1024) >> PAGE_SHIFT; | 1105 | max_pfn_mapped = (128*1024*1024) >> PAGE_SHIFT; |
1093 | 1106 | ||
1094 | /* Load the %fs segment register (the per-cpu segment register) with | ||
1095 | * the normal data segment to get through booting. */ | ||
1096 | asm volatile ("mov %0, %%fs" : : "r" (__KERNEL_DS) : "memory"); | ||
1097 | |||
1098 | /* The Host<->Guest Switcher lives at the top of our address space, and | 1107 | /* The Host<->Guest Switcher lives at the top of our address space, and |
1099 | * the Host told us how big it is when we made LGUEST_INIT hypercall: | 1108 | * the Host told us how big it is when we made LGUEST_INIT hypercall: |
1100 | * it put the answer in lguest_data.reserve_mem */ | 1109 | * it put the answer in lguest_data.reserve_mem */ |