1. 13 Oct, 2010 1 commit
    • Jeremy Fitzhardinge's avatar
      xen: Cope with unmapped pages when initializing kernel pagetable · fef5ba79
      Jeremy Fitzhardinge authored
      Xen requires that all pages containing pagetable entries to be mapped
      read-only.  If pages used for the initial pagetable are already mapped
      then we can change the mapping to RO.  However, if they are initially
      unmapped, we need to make sure that when they are later mapped, they
      are also mapped RO.
      
      We do this by knowing that the kernel pagetable memory is pre-allocated
      in the range e820_table_start - e820_table_end, so any pfn within this
      range should be mapped read-only.  However, the pagetable setup code
      early_ioremaps the pages to write their entries, so we must make sure
      that mappings created in the early_ioremap fixmap area are mapped RW.
      (Those mappings are removed before the pages are presented to Xen
      as pagetable pages.)
      Signed-off-by: default avatarJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
      LKML-Reference: <4CB63A80.8060702@goop.org>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Signed-off-by: default avatarH. Peter Anvin <hpa@linux.intel.com>
      fef5ba79
  2. 12 Oct, 2010 2 commits
  3. 11 Oct, 2010 4 commits
    • Yinghai Lu's avatar
      memblock: Annotate memblock functions with __init_memblock · cd79481d
      Yinghai Lu authored
      Stephen found
      
      WARNING: mm/built-in.o(.text+0x25ab8): Section mismatch in reference from the function memblock_find_base() to the function .init.text:memblock_find_region()
      The function memblock_find_base() references
      the function __init memblock_find_region().
      This is often because memblock_find_base lacks a __init
      annotation or the annotation of memblock_find_region is wrong.
      
      So let memblock_find_region() to use __init_memblock instead of __init
      directly.
      
      Also fix one function that did not have __init* to be __init_memblock.
      Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: default avatarYinghai Lu <yinghai@kernel.org>
      LKML-Reference: <4CB366B1.40405@kernel.org>
      Signed-off-by: default avatarH. Peter Anvin <hpa@linux.intel.com>
      cd79481d
    • Jeremy Fitzhardinge's avatar
      memblock: Allow memblock_init to be called early · 236260b9
      Jeremy Fitzhardinge authored
      The Xen setup code needs to call memblock_x86_reserve_range() very early,
      so allow it to initialize the memblock subsystem before doing so.  The
      second memblock_init() is ignored.
      Signed-off-by: default avatarJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      LKML-Reference: <4CACFDAD.3090900@goop.org>
      Signed-off-by: default avatarH. Peter Anvin <hpa@linux.intel.com>
      236260b9
    • Yinghai Lu's avatar
      x86, numa: For each node, register the memory blocks actually used · 73cf624d
      Yinghai Lu authored
      Russ reported SGI UV is broken recently. He said:
      
      | The SRAT table shows that memory range is spread over two nodes.
      |
      | SRAT: Node 0 PXM 0 100000000-800000000
      | SRAT: Node 1 PXM 1 800000000-1000000000
      | SRAT: Node 0 PXM 0 1000000000-1080000000
      |
      |Previously, the kernel early_node_map[] would show three entries
      |with the proper node.
      |
      |[    0.000000]     0: 0x00100000 -> 0x00800000
      |[    0.000000]     1: 0x00800000 -> 0x01000000
      |[    0.000000]     0: 0x01000000 -> 0x01080000
      |
      |The problem is recent community kernel early_node_map[] shows
      |only two entries with the node 0 entry overlapping the node 1
      |entry.
      |
      |    0: 0x00100000 -> 0x01080000
      |    1: 0x00800000 -> 0x01000000
      
      After looking at the changelog, Found out that it has been broken for a while by
      following commit
      
      |commit 8716273c
      |Author: David Rientjes <rientjes@google.com>
      |Date:   Fri Sep 25 15:20:04 2009 -0700
      |
      |    x86: Export srat physical topology
      
      Before that commit, register_active_regions() is called for every SRAT memory
      entry right away.
      
      Use nodememblk_range[] instead of nodes[] in order to make sure we
      capture the actual memory blocks registered with each node.  nodes[]
      contains an extended range which spans all memory regions associated
      with a node, but that does not mean that all the memory in between are
      included.
      Reported-by: default avatarRuss Anderson <rja@sgi.com>
      Tested-by: default avatarRuss Anderson <rja@sgi.com>
      Signed-off-by: default avatarYinghai Lu <yinghai@kernel.org>
      LKML-Reference: <4CB27BDF.5000800@kernel.org>
      Acked-by: default avatarDavid Rientjes <rientjes@google.com>
      Cc: <stable@kernel.org> 2.6.33 .34 .35 .36
      Signed-off-by: default avatarH. Peter Anvin <hpa@linux.intel.com>
      73cf624d
    • Borislav Petkov's avatar
      x86, AMD, MCE thresholding: Fix the MCi_MISCj iteration order · 6dcbfe4f
      Borislav Petkov authored
      This fixes possible cases of not collecting valid error info in
      the MCE error thresholding groups on F10h hardware.
      
      The current code contains a subtle problem of checking only the
      Valid bit of MSR0000_0413 (which is MC4_MISC0 - DRAM
      thresholding group) in its first iteration and breaking out if
      the bit is cleared.
      
      But (!), this MSR contains an offset value, BlkPtr[31:24], which
      points to the remaining MSRs in this thresholding group which
      might contain valid information too. But if we bail out only
      after we checked the valid bit in the first MSR and not the
      block pointer too, we miss that other information.
      
      The thing is, MC4_MISC0[BlkPtr] is not predicated on
      MCi_STATUS[MiscV] or MC4_MISC0[Valid] and should be checked
      prior to iterating over the MCI_MISCj thresholding group,
      irrespective of the MC4_MISC0[Valid] setting.
      Signed-off-by: default avatarBorislav Petkov <borislav.petkov@amd.com>
      Cc: <stable@kernel.org>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      6dcbfe4f
  4. 08 Oct, 2010 3 commits
  5. 07 Oct, 2010 23 commits
  6. 06 Oct, 2010 7 commits
    • Linus Torvalds's avatar
      Linux 2.6.36-rc7 · cb655d0f
      Linus Torvalds authored
      cb655d0f
    • Linus Torvalds's avatar
      Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/upstream-linus · 81c20b96
      Linus Torvalds authored
      * 'upstream' of git://git.linux-mips.org/pub/scm/upstream-linus:
        MIPS: Octeon: Place cnmips_cu2_setup in __init memory.
        MIPS: Don't place cu2 notifiers in __cpuinitdata
        MIPS: Calculate VMLINUZ_LOAD_ADDRESS based on the length of vmlinux.bin
        MIPS: Alchemy: Resolve prom section mismatches
        MIPS: Fix syscall 64 bit number comments.
        MIPS: Hookup fanotify_init, fanotify_mark, and prlimit64 syscalls.
        MIPS: TX49xx: Rename ARCH_KMALLOC_MINALIGN to ARCH_DMA_MINALIGN
        MIPS: N32: Fix getdents64 syscall for n32
        MIPS: Remove pr_<level> uses of KERN_<level>
        MIPS: PNX8550: Sort out machine halt, restart and powerdown functions.
        MIPS: GIC: Remove dependencies from Malta files.
        MIPS: Kconfig: Fix and clarify kconfig help text for VSMP and SMTC.
        MIPS: DMA: Fix computation of DMA flags from device's coherent_dma_mask.
        MIPS: Audit: Fix hang in entry.S.
        MIPS: Document why RELOC_HIDE is there.
        MIPS: Octeon: Determine if helper needs to be built
        MIPS: Use generic atomic64 for 32-bit kernels
        MIPS: RM7000: Symbol should be static
        MIPS: kspd: Adjust confusing if indentation
        MIPS: Fix a typo.
      81c20b96
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block · 089eed29
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.dk/linux-2.6-block:
        writeback: always use sb->s_bdi for writeback purposes
      089eed29
    • Linus Torvalds's avatar
      Merge branch 'v2.6.36-rc6-urgent-fixes' of git://xenbits.xen.org/people/sstabellini/linux-pvhvm · 34984f54
      Linus Torvalds authored
      * 'v2.6.36-rc6-urgent-fixes' of git://xenbits.xen.org/people/sstabellini/linux-pvhvm:
        xen: do not initialize PV timers on HVM if !xen_have_vector_callback
        xen: do not set xenstored_ready before xenbus_probe on hvm
      34984f54
    • Linus Torvalds's avatar
      8fe9793a
    • Yinghai Lu's avatar
      x86, memblock: Remove __memblock_x86_find_in_range_size() · 16c36f74
      Yinghai Lu authored
      Fold it into memblock_x86_find_in_range(), and change bad_addr_size()
      to check_reserve_memblock().
      
      So whole memblock_x86_find_in_range_size() code is more readable.
      Signed-off-by: default avatarYinghai Lu <yinghai@kernel.org>
      LKML-Reference: <4CAA4DEC.4000401@kernel.org>
      Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
      16c36f74
    • Yinghai Lu's avatar
      memblock: Fix wraparound in find_region() · f1af98c7
      Yinghai Lu authored
      When trying to find huge range for crashkernel, get
      
      [    0.000000] ------------[ cut here ]------------
      [    0.000000] WARNING: at arch/x86/mm/memblock.c:248 memblock_x86_reserve_range+0x40/0x7a()
      [    0.000000] Hardware name: Sun Fire x4800
      [    0.000000] memblock_x86_reserve_range: wrong range [0xffffffff37000000, 0x137000000)
      [    0.000000] Modules linked in:
      [    0.000000] Pid: 0, comm: swapper Not tainted 2.6.36-rc5-tip-yh-01876-g1cac214-dirty #59
      [    0.000000] Call Trace:
      [    0.000000]  [<ffffffff82816f7e>] ? memblock_x86_reserve_range+0x40/0x7a
      [    0.000000]  [<ffffffff81078c2d>] warn_slowpath_common+0x85/0x9e
      [    0.000000]  [<ffffffff81078d38>] warn_slowpath_fmt+0x6e/0x70
      [    0.000000]  [<ffffffff8281e77c>] ? memblock_find_region+0x40/0x78
      [    0.000000]  [<ffffffff8281eb1f>] ? memblock_find_base+0x9a/0xb9
      [    0.000000]  [<ffffffff82816f7e>] memblock_x86_reserve_range+0x40/0x7a
      [    0.000000]  [<ffffffff8280452c>] setup_arch+0x99d/0xb2a
      [    0.000000]  [<ffffffff810a3e02>] ? trace_hardirqs_off+0xd/0xf
      [    0.000000]  [<ffffffff81cec7d8>] ? _raw_spin_unlock_irqrestore+0x3d/0x4c
      [    0.000000]  [<ffffffff827ffcec>] start_kernel+0xde/0x3f1
      [    0.000000]  [<ffffffff827ff2d4>] x86_64_start_reservations+0xa0/0xa4
      [    0.000000]  [<ffffffff827ff3de>] x86_64_start_kernel+0x106/0x10d
      [    0.000000] ---[ end trace a7919e7f17c0a725 ]---
      [    0.000000] Reserving 8192MB of memory at 17592186041200MB for crashkernel (System RAM: 526336MB)
      
      This is caused by a wraparound in the test due to size > end;
      explicitly check for this condition and fail.
      Signed-off-by: default avatarYinghai Lu <yinghai@kernel.org>
      LKML-Reference: <4CAA4DD3.1080401@kernel.org>
      Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
      f1af98c7