From 6697c05296fab4d113c7144459b72b6172b485a5 Mon Sep 17 00:00:00 2001 From: Harvey Harrison Date: Sat, 9 Feb 2008 23:24:08 +0100 Subject: x86: fix sparse warnings in acpi/bus.c Add function definition and extern variables to asm-x86/acpi.h. All of these are used in bus.c in ifdef(CONFIG_X86) sections, so are only added to the x86 include headers. boot.c already includes acpi.h so no changes are needed there. Fixes the following: arch/x86/kernel/acpi/boot.c:83:4: warning: symbol 'acpi_sci_flags' was not declared. Should it be static? arch/x86/kernel/acpi/boot.c:84:5: warning: symbol 'acpi_sci_override_gsi' was not declared. Should it be static? arch/x86/kernel/acpi/boot.c:421:13: warning: symbol 'acpi_pic_sci_set_trigger' was not declared. Should it be static? Signed-off-by: Harvey Harrison Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner --- drivers/acpi/bus.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'drivers') diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c index 8b0d4b7d188..ce3c0a2cbac 100644 --- a/drivers/acpi/bus.c +++ b/drivers/acpi/bus.c @@ -31,6 +31,7 @@ #include #include #include +#include #ifdef CONFIG_X86 #include #endif @@ -39,9 +40,6 @@ #define _COMPONENT ACPI_BUS_COMPONENT ACPI_MODULE_NAME("bus"); -#ifdef CONFIG_X86 -extern void __init acpi_pic_sci_set_trigger(unsigned int irq, u16 trigger); -#endif struct acpi_device *acpi_root; struct proc_dir_entry *acpi_root_dir; @@ -653,8 +651,6 @@ void __init acpi_early_init(void) #ifdef CONFIG_X86 if (!acpi_ioapic) { - extern u8 acpi_sci_flags; - /* compatible (0) means level (3) */ if (!(acpi_sci_flags & ACPI_MADT_TRIGGER_MASK)) { acpi_sci_flags &= ~ACPI_MADT_TRIGGER_MASK; @@ -664,7 +660,6 @@ void __init acpi_early_init(void) acpi_pic_sci_set_trigger(acpi_gbl_FADT.sci_interrupt, (acpi_sci_flags & ACPI_MADT_TRIGGER_MASK) >> 2); } else { - extern int acpi_sci_override_gsi; /* * now that acpi_gbl_FADT is initialized, * update it with result from INT_SRC_OVR parsing -- cgit v1.2.3 From 31f4b46ec6f889533c06537dea96bb0d20fa625b Mon Sep 17 00:00:00 2001 From: "Ahmed S. Darwish" Date: Sat, 9 Feb 2008 23:24:09 +0100 Subject: lguest: accept guest _PAGE_PWT page table entries Beginning from commit 4138cc3418f5, ioremap_nocache() sets the _PAGE_PWT flag. Lguest doesn't accept a guest pte with a _PWT flag and reports a "bad page table entry" in that case. Accept guest _PAGE_PWT page table entries. Signed-off-by: Ahmed S. Darwish Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner --- drivers/lguest/page_tables.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/lguest/page_tables.c b/drivers/lguest/page_tables.c index 74b4cf2a6c4..275f23c2deb 100644 --- a/drivers/lguest/page_tables.c +++ b/drivers/lguest/page_tables.c @@ -178,8 +178,8 @@ static void release_pte(pte_t pte) static void check_gpte(struct lg_cpu *cpu, pte_t gpte) { - if ((pte_flags(gpte) & (_PAGE_PWT|_PAGE_PSE)) - || pte_pfn(gpte) >= cpu->lg->pfn_limit) + if ((pte_flags(gpte) & _PAGE_PSE) || + pte_pfn(gpte) >= cpu->lg->pfn_limit) kill_guest(cpu, "bad page table entry"); } -- cgit v1.2.3