Commit e3223421 authored by Andi Kleen's avatar Andi Kleen Committed by Linus Torvalds

[PATCH] More x86-64 bugfixes

This patch fixes the problem some people had with their systems crashing
early at boot.  Also fix a problem in the LDT/TSS setup noticed by Paul
Menage.  And some other random fixes.

- Update defconfig
- Remove some unnecessary printks
- Enlarge kernel mapping to 40MB
- Fix acpi=ht (Suresh Siddha)
- Use KERN_ALERT for more important oops lines
- Fix LDT/TSS limit (Paul Menage)
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent e1900a19
......@@ -34,6 +34,7 @@ CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
# CONFIG_EMBEDDED is not set
CONFIG_KALLSYMS=y
CONFIG_KALLSYMS_ALL=y
CONFIG_FUTEX=y
CONFIG_EPOLL=y
CONFIG_IOSCHED_NOOP=y
......@@ -234,6 +235,7 @@ CONFIG_BLK_DEV_PIIX=y
# CONFIG_BLK_DEV_SLC90E66 is not set
# CONFIG_BLK_DEV_TRM290 is not set
# CONFIG_BLK_DEV_VIA82CXXX is not set
# CONFIG_IDE_ARM is not set
CONFIG_BLK_DEV_IDEDMA=y
# CONFIG_IDEDMA_IVB is not set
CONFIG_IDEDMA_AUTO=y
......@@ -258,7 +260,6 @@ CONFIG_BLK_DEV_SD=y
# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
#
# CONFIG_SCSI_MULTI_LUN is not set
# CONFIG_SCSI_REPORT_LUNS is not set
# CONFIG_SCSI_CONSTANTS is not set
# CONFIG_SCSI_LOGGING is not set
......@@ -789,7 +790,6 @@ CONFIG_USB_HIDINPUT=y
# Firmware Drivers
#
# CONFIG_EDD is not set
# CONFIG_SMBIOS is not set
#
# File systems
......
......@@ -114,7 +114,6 @@ void __init acpi_reserve_bootmem(void)
acpi_wakeup_address = (unsigned long)alloc_bootmem_low(PAGE_SIZE);
if ((&wakeup_end - &wakeup_start) > PAGE_SIZE)
printk(KERN_CRIT "ACPI: Wakeup code way too big, will crash on attempt to suspend\n");
Dprintk(KERN_DEBUG "ACPI: have wakeup address 0x%8.8lx\n", acpi_wakeup_address);
}
static int __init acpi_sleep_setup(char *str)
......
......@@ -255,7 +255,7 @@ temp_boot_pmds:
.org 0x5000
ENTRY(level2_kernel_pgt)
/* 10MB kernel mapping. The kernel code cannot be bigger than that.
/* 40MB kernel mapping. The kernel code cannot be bigger than that.
When you change this change KERNEL_TEXT_SIZE in page.h too. */
/* (2^48-(2*1024*1024*1024)-((2^39)*511)-((2^30)*510)) = 0 */
.quad 0x0000000000000183
......@@ -263,8 +263,21 @@ ENTRY(level2_kernel_pgt)
.quad 0x0000000000400183
.quad 0x0000000000600183
.quad 0x0000000000800183
/* 10MB mapping for now to decrease the aliasing window */
.fill 15,8,0
.quad 0x0000000000A00183
.quad 0x0000000000C00183
.quad 0x0000000000E00183
.quad 0x0000000001000183
.quad 0x0000000001200183
.quad 0x0000000001400183
.quad 0x0000000001600183
.quad 0x0000000001800183
.quad 0x0000000001A00183
.quad 0x0000000001C00183
.quad 0x0000000001E00183
.quad 0x0000000002000183
.quad 0x0000000002200183
.quad 0x0000000002400183
.quad 0x0000000002600183
/* Module mapping starts here */
.fill 492,8,0
......
......@@ -253,6 +253,8 @@ static __init void parse_cmdline_early (char ** cmdline_p)
/* acpi=ht just means: do ACPI MADT parsing
at bootup, but don't enable the full ACPI interpreter */
if (!memcmp(from, "acpi=ht", 7)) {
/* if (!acpi_force) */
disable_acpi();
acpi_ht = 1;
}
else if (!memcmp(from, "pci=noacpi", 10))
......@@ -535,8 +537,7 @@ void __init setup_arch(char **cmdline_p)
* the bootmem allocator) but before get_smp_config (to allow parsing
* of MADT).
*/
if (!acpi_disabled)
acpi_boot_init();
acpi_boot_init();
#endif
#ifdef CONFIG_X86_LOCAL_APIC
/*
......
......@@ -302,7 +302,7 @@ void handle_BUG(struct pt_regs *regs)
if (__get_user(tmp, f.filename))
f.filename = "unmapped filename";
printk("----------- [cut here ] --------- [please bite here ] ---------\n");
printk("Kernel BUG at %.50s:%d\n", f.filename, f.line);
printk(KERN_ALERT "Kernel BUG at %.50s:%d\n", f.filename, f.line);
}
void out_of_line_bug(void)
......@@ -356,7 +356,7 @@ void __die(const char * str, struct pt_regs * regs, long err)
notify_die(DIE_OOPS, (char *)str, regs, err, 255, SIGSEGV);
show_registers(regs);
/* Executive summary in case the oops scrolled away */
printk("RIP ");
printk(KERN_ALERT "RIP ");
printk_address(regs->rip);
printk(" RSP <%016lx>\n", regs->rsp);
}
......
......@@ -423,8 +423,9 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long error_code)
printk(KERN_ALERT "Unable to handle kernel NULL pointer dereference");
else
printk(KERN_ALERT "Unable to handle kernel paging request");
printk(" at %016lx RIP: \n",address);
printk(" at %016lx RIP: \n" KERN_ALERT,address);
printk_address(regs->rip);
printk("\n");
dump_pagetable(address);
__die("Oops", regs, error_code);
/* Executive summary in case the body of the oops scrolled away */
......
......@@ -124,7 +124,7 @@ void __init setup_node_zones(int nodeid)
start_pfn = node_start_pfn(nodeid);
end_pfn = node_end_pfn(nodeid);
printk(KERN_INFO "setting up node %d %lx-%lx\n", nodeid, start_pfn, end_pfn);
Dprintk(KERN_INFO "setting up node %d %lx-%lx\n", nodeid, start_pfn, end_pfn);
/* All nodes > 0 have a zero length zone DMA */
dma_end_pfn = __pa(MAX_DMA_ADDRESS) >> PAGE_SHIFT;
......
......@@ -118,7 +118,6 @@ static inline void set_tssldt_descriptor(void *ptr, unsigned long tss, unsigned
d.base1 = PTR_MIDDLE(tss) & 0xFF;
d.type = type;
d.p = 1;
d.g = 1;
d.limit1 = (size >> 16) & 0xF;
d.base2 = (PTR_MIDDLE(tss) >> 8) & 0xFF;
d.base3 = PTR_HIGH(tss);
......@@ -135,7 +134,7 @@ static inline void set_tss_desc(unsigned cpu, void *addr)
static inline void set_ldt_desc(unsigned cpu, void *addr, int size)
{
set_tssldt_descriptor(&cpu_gdt_table[cpu][GDT_ENTRY_LDT], (unsigned long)addr,
DESC_LDT, size);
DESC_LDT, size * 8);
}
static inline void set_seg_base(unsigned cpu, int entry, void *base)
......
......@@ -84,7 +84,7 @@ extern unsigned long vm_force_exec32;
#define __VIRTUAL_MASK_SHIFT 48
#define __VIRTUAL_MASK ((1UL << __VIRTUAL_MASK_SHIFT) - 1)
#define KERNEL_TEXT_SIZE (10UL*1024*1024)
#define KERNEL_TEXT_SIZE (40UL*1024*1024)
#define KERNEL_TEXT_START 0xffffffff80000000UL
#ifndef __ASSEMBLY__
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment