diff options
Diffstat (limited to 'arch/i386')
-rw-r--r-- | arch/i386/Kconfig | 5 | ||||
-rw-r--r-- | arch/i386/Kconfig.debug | 4 | ||||
-rw-r--r-- | arch/i386/boot/apm.c | 7 | ||||
-rw-r--r-- | arch/i386/boot/code16gcc.h | 2 | ||||
-rw-r--r-- | arch/i386/boot/edd.c | 5 | ||||
-rw-r--r-- | arch/i386/boot/header.S | 4 | ||||
-rw-r--r-- | arch/i386/boot/install.sh | 9 | ||||
-rw-r--r-- | arch/i386/boot/main.c | 16 | ||||
-rw-r--r-- | arch/i386/boot/pm.c | 2 | ||||
-rw-r--r-- | arch/i386/boot/video-bios.c | 2 | ||||
-rw-r--r-- | arch/i386/kernel/Makefile | 1 | ||||
-rw-r--r-- | arch/i386/kernel/alternative.c | 14 | ||||
-rw-r--r-- | arch/i386/kernel/apm.c | 2 | ||||
-rw-r--r-- | arch/i386/kernel/cpu/bugs.c | 1 | ||||
-rw-r--r-- | arch/i386/kernel/cpu/cpufreq/Kconfig | 2 | ||||
-rw-r--r-- | arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c | 4 | ||||
-rw-r--r-- | arch/i386/kernel/e820.c | 2 | ||||
-rw-r--r-- | arch/i386/kernel/legacy_serial.c | 67 | ||||
-rw-r--r-- | arch/i386/kernel/microcode.c | 1 | ||||
-rw-r--r-- | arch/i386/kernel/sys_i386.c | 1 | ||||
-rw-r--r-- | arch/i386/kernel/sysenter.c | 1 | ||||
-rw-r--r-- | arch/i386/mm/init.c | 16 | ||||
-rw-r--r-- | arch/i386/power/Makefile | 2 |
23 files changed, 55 insertions, 115 deletions
diff --git a/arch/i386/Kconfig b/arch/i386/Kconfig index abb582bc218f..f9524933258a 100644 --- a/arch/i386/Kconfig +++ b/arch/i386/Kconfig @@ -458,8 +458,7 @@ config MICROCODE tristate "/dev/cpu/microcode - Intel IA32 CPU microcode support" select FW_LOADER ---help--- - If you say Y here and also to "/dev file system support" in the - 'File systems' section, you will be able to update the microcode on + If you say Y here, you will be able to update the microcode on Intel processors in the IA32 family, e.g. Pentium Pro, Pentium II, Pentium III, Pentium 4, Xeon etc. You will obviously need the actual microcode binary data itself which is not shipped with the @@ -938,7 +937,7 @@ source "drivers/acpi/Kconfig" menuconfig APM tristate "APM (Advanced Power Management) BIOS support" - depends on PM && !X86_VISWS + depends on PM_SLEEP && !X86_VISWS ---help--- APM is a BIOS specification for saving power using several different techniques. This is mostly useful for battery powered laptops with diff --git a/arch/i386/Kconfig.debug b/arch/i386/Kconfig.debug index b31c0802e1cc..f03531eacdfb 100644 --- a/arch/i386/Kconfig.debug +++ b/arch/i386/Kconfig.debug @@ -36,11 +36,11 @@ config DEBUG_STACK_USAGE This option will slow down process creation somewhat. comment "Page alloc debug is incompatible with Software Suspend on i386" - depends on DEBUG_KERNEL && SOFTWARE_SUSPEND + depends on DEBUG_KERNEL && HIBERNATION config DEBUG_PAGEALLOC bool "Debug page memory allocations" - depends on DEBUG_KERNEL && !SOFTWARE_SUSPEND && !HUGETLBFS + depends on DEBUG_KERNEL && !HIBERNATION && !HUGETLBFS help Unmap pages from the kernel linear mapping after free_pages(). This results in a large slowdown, but helps to find certain types diff --git a/arch/i386/boot/apm.c b/arch/i386/boot/apm.c index a34087c370c0..eab50c55a3a5 100644 --- a/arch/i386/boot/apm.c +++ b/arch/i386/boot/apm.c @@ -40,14 +40,15 @@ int query_apm_bios(void) if (bx != 0x504d) /* "PM" signature */ return -1; - if (cx & 0x02) /* 32 bits supported? */ + if (!(cx & 0x02)) /* 32 bits supported? */ return -1; /* Disconnect first, just in case */ ax = 0x5304; + bx = 0; asm volatile("pushl %%ebp ; int $0x15 ; popl %%ebp" - : "+a" (ax) - : : "ebx", "ecx", "edx", "esi", "edi"); + : "+a" (ax), "+b" (bx) + : : "ecx", "edx", "esi", "edi"); /* Paranoia */ ebx = esi = 0; diff --git a/arch/i386/boot/code16gcc.h b/arch/i386/boot/code16gcc.h index 3bd848093b9d..d93e48010b61 100644 --- a/arch/i386/boot/code16gcc.h +++ b/arch/i386/boot/code16gcc.h @@ -2,7 +2,7 @@ * code16gcc.h * * This file is -include'd when compiling 16-bit C code. - * Note: this asm() needs to be emitted before gcc omits any code. + * Note: this asm() needs to be emitted before gcc emits any code. * Depending on gcc version, this requires -fno-unit-at-a-time or * -fno-toplevel-reorder. * diff --git a/arch/i386/boot/edd.c b/arch/i386/boot/edd.c index 25a282494f4c..77d92daf7923 100644 --- a/arch/i386/boot/edd.c +++ b/arch/i386/boot/edd.c @@ -72,17 +72,18 @@ static u32 read_mbr_sig(u8 devno, struct edd_info *ei) u32 mbrsig; u32 buf_base, mbr_base; extern char _end[]; - static char mbr_buf[1024]; sector_size = ei->params.bytes_per_sector; if (!sector_size) sector_size = 512; /* Best available guess */ + /* Produce a naturally aligned buffer on the heap */ buf_base = (ds() << 4) + (u32)&_end; mbr_base = (buf_base+sector_size-1) & ~(sector_size-1); - mbrbuf_ptr = mbr_buf + (mbr_base-buf_base); + mbrbuf_ptr = _end + (mbr_base-buf_base); mbrbuf_end = mbrbuf_ptr + sector_size; + /* Make sure we actually have space on the heap... */ if (!(boot_params.hdr.loadflags & CAN_USE_HEAP)) return 0; if (mbrbuf_end > (char *)(size_t)boot_params.hdr.heap_end_ptr) diff --git a/arch/i386/boot/header.S b/arch/i386/boot/header.S index 6b9923fb6eae..7f4a2c53bd76 100644 --- a/arch/i386/boot/header.S +++ b/arch/i386/boot/header.S @@ -225,7 +225,7 @@ start_of_setup: int $0x13 #endif -# We will have entired with %cs = %ds+0x20, normalize %cs so +# We will have entered with %cs = %ds+0x20, normalize %cs so # it is on par with the other segments. pushw %ds pushw $setup2 @@ -280,4 +280,4 @@ die: .section ".initdata", "a" setup_corrupt: .byte 7 - .string "No setup signature found..." + .string "No setup signature found...\n" diff --git a/arch/i386/boot/install.sh b/arch/i386/boot/install.sh index 5e44c736eea8..88d77761d01b 100644 --- a/arch/i386/boot/install.sh +++ b/arch/i386/boot/install.sh @@ -51,4 +51,11 @@ fi cat $2 > $4/vmlinuz cp $3 $4/System.map -if [ -x /sbin/lilo ]; then /sbin/lilo; else /etc/lilo/install; fi +if [ -x /sbin/lilo ]; then + /sbin/lilo +elif [ -x /etc/lilo/install ]; then + /etc/lilo/install +else + sync + echo "Cannot find LILO." +fi diff --git a/arch/i386/boot/main.c b/arch/i386/boot/main.c index 7f01f96c4fb8..0eeef3989a17 100644 --- a/arch/i386/boot/main.c +++ b/arch/i386/boot/main.c @@ -73,15 +73,15 @@ static void keyboard_set_repeat(void) } /* - * Get Intel SpeedStep IST information. + * Get Intel SpeedStep (IST) information. */ -static void query_speedstep_ist(void) +static void query_ist(void) { asm("int $0x15" - : "=a" (boot_params.speedstep_info[0]), - "=b" (boot_params.speedstep_info[1]), - "=c" (boot_params.speedstep_info[2]), - "=d" (boot_params.speedstep_info[3]) + : "=a" (boot_params.ist_info.signature), + "=b" (boot_params.ist_info.command), + "=c" (boot_params.ist_info.event), + "=d" (boot_params.ist_info.perf_level) : "a" (0x0000e980), /* IST Support */ "d" (0x47534943)); /* Request value */ } @@ -144,8 +144,8 @@ void main(void) query_voyager(); #endif - /* Query SpeedStep IST information */ - query_speedstep_ist(); + /* Query Intel SpeedStep (IST) information */ + query_ist(); /* Query APM information */ #if defined(CONFIG_APM) || defined(CONFIG_APM_MODULE) diff --git a/arch/i386/boot/pm.c b/arch/i386/boot/pm.c index 1df025c73261..6be9ca811d17 100644 --- a/arch/i386/boot/pm.c +++ b/arch/i386/boot/pm.c @@ -80,7 +80,7 @@ static void move_kernel_around(void) */ static void mask_all_interrupts(void) { - outb(0xff, 0xa1); /* Mask all interrupts on the seconday PIC */ + outb(0xff, 0xa1); /* Mask all interrupts on the secondary PIC */ io_delay(); outb(0xfb, 0x21); /* Mask all but cascade on the primary PIC */ io_delay(); diff --git a/arch/i386/boot/video-bios.c b/arch/i386/boot/video-bios.c index afea46c500cc..68e65d95cdfd 100644 --- a/arch/i386/boot/video-bios.c +++ b/arch/i386/boot/video-bios.c @@ -44,7 +44,7 @@ static int set_bios_mode(u8 mode) : "+a" (ax) : : "ebx", "ecx", "edx", "esi", "edi"); - do_restore = 1; /* Assume video contents was lost */ + do_restore = 1; /* Assume video contents were lost */ new_mode = ax & 0x7f; /* Not all BIOSes are clean with the top bit */ if (new_mode == mode) diff --git a/arch/i386/kernel/Makefile b/arch/i386/kernel/Makefile index dbe5e87e0d66..9d33b00de659 100644 --- a/arch/i386/kernel/Makefile +++ b/arch/i386/kernel/Makefile @@ -35,7 +35,6 @@ obj-y += sysenter.o vsyscall.o obj-$(CONFIG_ACPI_SRAT) += srat.o obj-$(CONFIG_EFI) += efi.o efi_stub.o obj-$(CONFIG_DOUBLEFAULT) += doublefault.o -obj-$(CONFIG_SERIAL_8250) += legacy_serial.o obj-$(CONFIG_VM86) += vm86.o obj-$(CONFIG_EARLY_PRINTK) += early_printk.o obj-$(CONFIG_HPET_TIMER) += hpet.o diff --git a/arch/i386/kernel/alternative.c b/arch/i386/kernel/alternative.c index c3750c2c4113..c85598acb8fd 100644 --- a/arch/i386/kernel/alternative.c +++ b/arch/i386/kernel/alternative.c @@ -430,22 +430,12 @@ void __init alternative_instructions(void) * And on the local CPU you need to be protected again NMI or MCE handlers * seeing an inconsistent instruction while you patch. */ -void __kprobes text_poke(void *oaddr, unsigned char *opcode, int len) +void __kprobes text_poke(void *addr, unsigned char *opcode, int len) { - u8 *addr = oaddr; - if (!pte_write(*lookup_address((unsigned long)addr))) { - struct page *p[2] = { virt_to_page(addr), virt_to_page(addr+PAGE_SIZE) }; - addr = vmap(p, 2, VM_MAP, PAGE_KERNEL); - if (!addr) - return; - addr += ((unsigned long)oaddr) % PAGE_SIZE; - } memcpy(addr, opcode, len); sync_core(); /* Not strictly needed, but can speed CPU recovery up. Ignore cross cacheline case. */ if (cpu_has_clflush) - asm("clflush (%0) " :: "r" (oaddr) : "memory"); - if (addr != oaddr) - vunmap(addr); + asm("clflush (%0) " :: "r" (addr) : "memory"); } diff --git a/arch/i386/kernel/apm.c b/arch/i386/kernel/apm.c index 47001d50a083..f02a8aca826b 100644 --- a/arch/i386/kernel/apm.c +++ b/arch/i386/kernel/apm.c @@ -2235,7 +2235,7 @@ static int __init apm_init(void) apm_info.bios.cseg_16_len = 0; /* 64k */ if (debug) { - printk(KERN_INFO "apm: entry %x:%lx cseg16 %x dseg %x", + printk(KERN_INFO "apm: entry %x:%x cseg16 %x dseg %x", apm_info.bios.cseg, apm_info.bios.offset, apm_info.bios.cseg_16, apm_info.bios.dseg); if (apm_info.bios.version > 0x100) diff --git a/arch/i386/kernel/cpu/bugs.c b/arch/i386/kernel/cpu/bugs.c index 54428a2500f3..59266f03d1cd 100644 --- a/arch/i386/kernel/cpu/bugs.c +++ b/arch/i386/kernel/cpu/bugs.c @@ -11,6 +11,7 @@ */ #include <linux/init.h> #include <linux/utsname.h> +#include <asm/bugs.h> #include <asm/processor.h> #include <asm/i387.h> #include <asm/msr.h> diff --git a/arch/i386/kernel/cpu/cpufreq/Kconfig b/arch/i386/kernel/cpu/cpufreq/Kconfig index 094118ba00da..d8c6f132dc7a 100644 --- a/arch/i386/kernel/cpu/cpufreq/Kconfig +++ b/arch/i386/kernel/cpu/cpufreq/Kconfig @@ -92,7 +92,7 @@ config X86_POWERNOW_K8 config X86_POWERNOW_K8_ACPI bool "ACPI Support" select ACPI_PROCESSOR - depends on X86_POWERNOW_K8 + depends on ACPI && X86_POWERNOW_K8 default y help This provides access to the K8s Processor Performance States via ACPI. diff --git a/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c b/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c index 6f846bee2103..32d04b083e38 100644 --- a/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c +++ b/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c @@ -511,7 +511,6 @@ acpi_cpufreq_guess_freq(struct acpi_cpufreq_data *data, unsigned int cpu) static int acpi_cpufreq_early_init(void) { struct acpi_processor_performance *data; - cpumask_t covered; unsigned int i, j; dprintk("acpi_cpufreq_early_init\n"); @@ -520,14 +519,13 @@ static int acpi_cpufreq_early_init(void) data = kzalloc(sizeof(struct acpi_processor_performance), GFP_KERNEL); if (!data) { - for_each_cpu_mask(j, covered) { + for_each_possible_cpu(j) { kfree(acpi_perf_data[j]); acpi_perf_data[j] = NULL; } return -ENOMEM; } acpi_perf_data[i] = data; - cpu_set(i, covered); } /* Do initialization in ACPI core */ diff --git a/arch/i386/kernel/e820.c b/arch/i386/kernel/e820.c index e60cddbc4cfb..3c86b979a40a 100644 --- a/arch/i386/kernel/e820.c +++ b/arch/i386/kernel/e820.c @@ -321,7 +321,7 @@ static int __init request_standard_resources(void) subsys_initcall(request_standard_resources); -#if defined(CONFIG_PM) && defined(CONFIG_SOFTWARE_SUSPEND) +#if defined(CONFIG_PM) && defined(CONFIG_HIBERNATION) /** * e820_mark_nosave_regions - Find the ranges of physical addresses that do not * correspond to e820 RAM areas and mark the corresponding pages as nosave for diff --git a/arch/i386/kernel/legacy_serial.c b/arch/i386/kernel/legacy_serial.c deleted file mode 100644 index 21510118544e..000000000000 --- a/arch/i386/kernel/legacy_serial.c +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Legacy COM port devices for x86 platforms without PNPBIOS or ACPI. - * Data taken from include/asm-i386/serial.h. - * - * (c) Copyright 2007 Hewlett-Packard Development Company, L.P. - * Bjorn Helgaas <bjorn.helgaas@hp.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ -#include <linux/module.h> -#include <linux/init.h> -#include <linux/pnp.h> -#include <linux/serial_8250.h> - -/* Standard COM flags (except for COM4, because of the 8514 problem) */ -#ifdef CONFIG_SERIAL_DETECT_IRQ -#define COM_FLAGS (UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_AUTO_IRQ) -#define COM4_FLAGS (UPF_BOOT_AUTOCONF | UPF_AUTO_IRQ) -#else -#define COM_FLAGS (UPF_BOOT_AUTOCONF | UPF_SKIP_TEST) -#define COM4_FLAGS UPF_BOOT_AUTOCONF -#endif - -#define PORT(_base,_irq,_flags) \ - { \ - .iobase = _base, \ - .irq = _irq, \ - .uartclk = 1843200, \ - .iotype = UPIO_PORT, \ - .flags = _flags, \ - } - -static struct plat_serial8250_port x86_com_data[] = { - PORT(0x3F8, 4, COM_FLAGS), - PORT(0x2F8, 3, COM_FLAGS), - PORT(0x3E8, 4, COM_FLAGS), - PORT(0x2E8, 3, COM4_FLAGS), - { }, -}; - -static struct platform_device x86_com_device = { - .name = "serial8250", - .id = PLAT8250_DEV_PLATFORM, - .dev = { - .platform_data = x86_com_data, - }, -}; - -static int force_legacy_probe; -module_param_named(force, force_legacy_probe, bool, 0); -MODULE_PARM_DESC(force, "Force legacy serial port probe"); - -static int __init serial8250_x86_com_init(void) -{ - if (pnp_platform_devices && !force_legacy_probe) - return -ENODEV; - - return platform_device_register(&x86_com_device); -} - -module_init(serial8250_x86_com_init); - -MODULE_AUTHOR("Bjorn Helgaas"); -MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("Generic 8250/16x50 legacy probe module"); diff --git a/arch/i386/kernel/microcode.c b/arch/i386/kernel/microcode.c index d865d041bea1..09cf78110358 100644 --- a/arch/i386/kernel/microcode.c +++ b/arch/i386/kernel/microcode.c @@ -82,6 +82,7 @@ #include <linux/miscdevice.h> #include <linux/spinlock.h> #include <linux/mm.h> +#include <linux/fs.h> #include <linux/mutex.h> #include <linux/cpu.h> #include <linux/firmware.h> diff --git a/arch/i386/kernel/sys_i386.c b/arch/i386/kernel/sys_i386.c index e5dcb9379018..42147304de88 100644 --- a/arch/i386/kernel/sys_i386.c +++ b/arch/i386/kernel/sys_i386.c @@ -9,6 +9,7 @@ #include <linux/errno.h> #include <linux/sched.h> #include <linux/mm.h> +#include <linux/fs.h> #include <linux/smp.h> #include <linux/sem.h> #include <linux/msg.h> diff --git a/arch/i386/kernel/sysenter.c b/arch/i386/kernel/sysenter.c index 6deb159d08e0..4eb2e408764f 100644 --- a/arch/i386/kernel/sysenter.c +++ b/arch/i386/kernel/sysenter.c @@ -16,6 +16,7 @@ #include <linux/string.h> #include <linux/elf.h> #include <linux/mm.h> +#include <linux/err.h> #include <linux/module.h> #include <asm/cpufeature.h> diff --git a/arch/i386/mm/init.c b/arch/i386/mm/init.c index c3b9905af2d5..730a5b177b1f 100644 --- a/arch/i386/mm/init.c +++ b/arch/i386/mm/init.c @@ -432,7 +432,7 @@ static void __init pagetable_init (void) paravirt_pagetable_setup_done(pgd_base); } -#if defined(CONFIG_SOFTWARE_SUSPEND) || defined(CONFIG_ACPI_SLEEP) +#if defined(CONFIG_HIBERNATION) || defined(CONFIG_ACPI) /* * Swap suspend & friends need this for resume because things like the intel-agp * driver might have split up a kernel 4MB mapping. @@ -800,9 +800,17 @@ void mark_rodata_ro(void) unsigned long start = PFN_ALIGN(_text); unsigned long size = PFN_ALIGN(_etext) - start; - change_page_attr(virt_to_page(start), - size >> PAGE_SHIFT, PAGE_KERNEL_RX); - printk("Write protecting the kernel text: %luk\n", size >> 10); +#ifndef CONFIG_KPROBES +#ifdef CONFIG_HOTPLUG_CPU + /* It must still be possible to apply SMP alternatives. */ + if (num_possible_cpus() <= 1) +#endif + { + change_page_attr(virt_to_page(start), + size >> PAGE_SHIFT, PAGE_KERNEL_RX); + printk("Write protecting the kernel text: %luk\n", size >> 10); + } +#endif start += size; size = (unsigned long)__end_rodata - start; change_page_attr(virt_to_page(start), diff --git a/arch/i386/power/Makefile b/arch/i386/power/Makefile index 2de7bbf03cd7..d764ec950065 100644 --- a/arch/i386/power/Makefile +++ b/arch/i386/power/Makefile @@ -1,2 +1,2 @@ obj-$(CONFIG_PM) += cpu.o -obj-$(CONFIG_SOFTWARE_SUSPEND) += swsusp.o suspend.o +obj-$(CONFIG_HIBERNATION) += swsusp.o suspend.o |