1. 01 Apr, 2010 1 commit
    • Yinghai Lu's avatar
      x86: Make e820_remove_range to handle all covered case · 9f3a5f52
      Yinghai Lu authored
      Rusty found on lguest with trim_bios_range, max_pfn is not right anymore, and
      looks e820_remove_range does not work right.
      
      [    0.000000] BIOS-provided physical RAM map:
      [    0.000000]  LGUEST: 0000000000000000 - 0000000004000000 (usable)
      [    0.000000] Notice: NX (Execute Disable) protection missing in CPU or disabled in BIOS!
      [    0.000000] DMI not present or invalid.
      [    0.000000] last_pfn = 0x3fa0 max_arch_pfn = 0x100000
      [    0.000000] init_memory_mapping: 0000000000000000-0000000003fa0000
      
      root cause is: the e820_remove_range doesn't handle the all covered
      case.  e820_remove_range(BIOS_START, BIOS_END - BIOS_START, ...)
      produces a bogus range as a result.
      
      Make it match e820_update_range() by handling that case too.
      Reported-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: default avatarYinghai Lu <yinghai@kernel.org>
      Tested-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      LKML-Reference: <4BB18E55.6090903@kernel.org>
      Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
      9f3a5f52
  2. 30 Mar, 2010 1 commit
    • Shaohua Li's avatar
      x86-32, resume: do a global tlb flush in S4 resume · 8ae06d22
      Shaohua Li authored
      Colin King reported a strange oops in S4 resume code path (see below). The test
      system has i5/i7 CPU. The kernel doesn't open PAE, so 4M page table is used.
      The oops always happen a virtual address 0xc03ff000, which is mapped to the
      last 4k of first 4M memory. Doing a global tlb flush fixes the issue.
      
      EIP: 0060:[<c0493a01>] EFLAGS: 00010086 CPU: 0
      EIP is at copy_loop+0xe/0x15
      EAX: 36aeb000 EBX: 00000000 ECX: 00000400 EDX: f55ad46c
      ESI: 0f800000 EDI: c03ff000 EBP: f67fbec4 ESP: f67fbea8
      DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
      ...
      ...
      CR2: 00000000c03ff000
      Tested-by: default avatarColin Ian King <colin.king@canonical.com>
      Signed-off-by: default avatarShaohua Li <shaohua.li@intel.com>
      LKML-Reference: <20100305005932.GA22675@sli10-desk.sh.intel.com>
      Acked-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
      Cc: <stable@kernel.org>
      8ae06d22
  3. 29 Mar, 2010 3 commits
    • Ian Campbell's avatar
      x86: Do not free zero sized per cpu areas · eed63519
      Ian Campbell authored
      This avoids an infinite loop in free_early_partial().
      
      Add a warning to free_early_partial() to catch future problems.
      
      -v5: put back start > end back into WARN_ONCE()
      -v6: use one line for warning, suggested by Linus
      -v7: more tests
      -v8: remove the function name as suggested by Johannes
           WARN_ONCE() will print out that function name.
      Signed-off-by: default avatarIan Campbell <ian.campbell@citrix.com>
      Signed-off-by: default avatarYinghai Lu <yinghai@kernel.org>
      Tested-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Tested-by: default avatarJoel Becker <joel.becker@oracle.com>
      Tested-by: default avatarStanislaw Gruszka <sgruszka@redhat.com>
      Acked-by: default avatarJohannes Weiner <hannes@cmpxchg.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: David Miller <davem@davemloft.net>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      LKML-Reference: <1269830604-26214-4-git-send-email-yinghai@kernel.org>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      eed63519
    • Yinghai Lu's avatar
      x86: Make sure free_init_pages() frees pages on page boundary · c967da6a
      Yinghai Lu authored
      When CONFIG_NO_BOOTMEM=y, it could use memory more effiently, or
      in a more compact fashion.
      
      Example:
      
       Allocated new RAMDISK: 00ec2000 - 0248ce57
       Move RAMDISK from 000000002ea04000 - 000000002ffcee56 to 00ec2000 - 0248ce56
      
      The new RAMDISK's end is not page aligned.
      Last page could be shared with other users.
      
      When free_init_pages are called for initrd or .init, the page
      could be freed and we could corrupt other data.
      
      code segment in free_init_pages():
      
       |        for (; addr < end; addr += PAGE_SIZE) {
       |                ClearPageReserved(virt_to_page(addr));
       |                init_page_count(virt_to_page(addr));
       |                memset((void *)(addr & ~(PAGE_SIZE-1)),
       |                        POISON_FREE_INITMEM, PAGE_SIZE);
       |                free_page(addr);
       |                totalram_pages++;
       |        }
      
      last half page could be used as one whole free page.
      
      So page align the boundaries.
      
      -v2: make the original initramdisk to be aligned, according to
           Johannes, otherwise we have the chance to lose one page.
           we still need to keep initrd_end not aligned, otherwise it could
           confuse decompressor.
      -v3: change to WARN_ON instead, suggested by Johannes.
      -v4: use PAGE_ALIGN, suggested by Johannes.
           We may fix that macro name later to PAGE_ALIGN_UP, and PAGE_ALIGN_DOWN
           Add comments about assuming ramdisk start is aligned
           in relocate_initrd(), change to re get ramdisk_image instead of save it
           to make diff smaller. Add warning for wrong range, suggested by Johannes.
      -v6: remove one WARN()
           We need to align beginning in free_init_pages()
           do not copy more than ramdisk_size, noticed by Johannes
      Reported-by: default avatarStanislaw Gruszka <sgruszka@redhat.com>
      Tested-by: default avatarStanislaw Gruszka <sgruszka@redhat.com>
      Signed-off-by: default avatarYinghai Lu <yinghai@kernel.org>
      Acked-by: default avatarJohannes Weiner <hannes@cmpxchg.org>
      Cc: David Miller <davem@davemloft.net>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      LKML-Reference: <1269830604-26214-3-git-send-email-yinghai@kernel.org>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      c967da6a
    • Yinghai Lu's avatar
      x86: Make smp_locks end with page alignment · 596b711e
      Yinghai Lu authored
      Fix:
      
       ------------[ cut here ]------------
       WARNING: at arch/x86/mm/init.c:342 free_init_pages+0x4c/0xfa()
       free_init_pages: range [0x40daf000, 0x40db5c24] is not aligned
       Modules linked in:
       Pid: 0, comm: swapper Not tainted
       2.6.34-rc2-tip-03946-g4f16b23-dirty #50 Call Trace:
        [<40232e9f>] warn_slowpath_common+0x65/0x7c
        [<4021c9f0>] ? free_init_pages+0x4c/0xfa
        [<40881434>] ? _etext+0x0/0x24
        [<40232eea>] warn_slowpath_fmt+0x24/0x27
        [<4021c9f0>] free_init_pages+0x4c/0xfa
        [<40881434>] ? _etext+0x0/0x24
        [<40d3f4bd>] alternative_instructions+0xf6/0x100
        [<40d3fe4f>] check_bugs+0xbd/0xbf
        [<40d398a7>] start_kernel+0x2d5/0x2e4
        [<40d390ce>] i386_start_kernel+0xce/0xd5
       ---[ end trace 4eaa2a86a8e2da22 ]---
      
      Comments in vmlinux.lds.S already said:
      
       |        /*
       |         * smp_locks might be freed after init
       |         * start/end must be page aligned
       |         */
      Signed-off-by: default avatarYinghai Lu <yinghai@kernel.org>
      Acked-by: default avatarJohannes Weiner <hannes@cmpxchg.org>
      Cc: David Miller <davem@davemloft.net>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      LKML-Reference: <1269830604-26214-2-git-send-email-yinghai@kernel.org>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      596b711e
  4. 26 Mar, 2010 13 commits
  5. 25 Mar, 2010 20 commits
  6. 24 Mar, 2010 2 commits
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://gitorious.org/linux-omap-dss2/linux · 01e77706
      Linus Torvalds authored
      * 'for-linus' of git://gitorious.org/linux-omap-dss2/linux:
        OMAP: DSS2: panel-generic: re-implement mode changing
        OMAP: DSS2: initialize dss clk sources properly
        OMAP: DSS2: VRAM: Fix early_param for vram
      01e77706
    • Linus Torvalds's avatar
      Merge master.kernel.org:/home/rmk/linux-2.6-arm · 1ff31056
      Linus Torvalds authored
      * master.kernel.org:/home/rmk/linux-2.6-arm:
        [ARM] Orion5x: replace KEY_WLAN with KEY_WPS_BUTTON
        [ARM] Kirkwood: WPS button keycode mapping
        pxa168fb: fix incorrect resource calculation
        [ARM] pxa/raumfeld: fix button name
        [ARM] pxa/raumfeld: remove duplicated #include
        [ARM] locomo: fix unpaired spin_lock_irqsave
        [ARM] locomo: fix SPI register offset
        [ARM] pxa/sharpsl: add dependency of max1111 driver to sharpsl_pm
        [ARM] pxa: remove unnecessary 'select FB_W100' from some platforms
        [ARM] pxa: remove spi cs gpio direction to avoid clash with driver
        [ARM] mmp: fix for variables in uncompress.h being discarded
        [ARM] pxa: fix for variables in uncompress.h being discarded
        ARM: Update mach-types
        ARM: Fix IXP23xx build error in mach/memory.h
      1ff31056