1. 15 3月, 2011 1 次提交
  2. 14 3月, 2011 1 次提交
  3. 12 3月, 2011 1 次提交
  4. 10 3月, 2011 3 次提交
  5. 09 3月, 2011 2 次提交
  6. 04 3月, 2011 5 次提交
    • T
      x86-64, NUMA: Don't assume phys node 0 is always online in numa_emulation() · 078a1989
      Tejun Heo 提交于
      Undetermined entries in emu_nid_to_phys[] are filled with zero
      assuming that physical node 0 is always online; however, this might
      not be true depending on hardware configuration.  Find a physical node
      which is actually online and use it instead.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Reported-by: NDavid Rientjes <rientjes@google.com>
      LKML-Reference: <alpine.DEB.2.00.1103020628210.31626@chino.kir.corp.google.com>
      078a1989
    • Y
      x86, numa: Fix numa_emulation code with memory-less node0 · 3b28cf32
      Yinghai Lu 提交于
      This crash happens on a system that does not have RAM on node0.
      
      When numa_emulation is compiled in, and:
      
       1. we boot the system without numa=fake...
       2. or we boot the system with numa=fake=128 to make emulation fail
      
      we will get:
      
      [    0.076025] ------------[ cut here ]------------
      [    0.080004] kernel BUG at arch/x86/mm/numa_64.c:788!
      [    0.080004] invalid opcode: 0000 [#1] SMP
      [...]
      
      need to use early_cpu_to_node() directly, because cpu_to_apicid
      and apicid_to_node will return node0 that is not onlined.
      Signed-off-by: NYinghai Lu <yinghai@kernel.org>
      Acked-by: NTejun Heo <tj@kernel.org>
      Cc: David Rientjes <rientjes@google.com>
      LKML-Reference: <4D6ECF72.5010308@kernel.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      3b28cf32
    • D
      x86-64, NUMA: Clean up initmem_init() · c09cedf4
      David Rientjes 提交于
      This patch cleans initmem_init() so that it is more readable and doesn't
      use an unnecessary array of function pointers to convolute the flow of
      the code.  It also makes it obvious that dummy_numa_init() will always
      succeed (and documents that requirement) so that the existing BUG() is
      never actually reached.
      
      No functional change.
      
      -tj: Updated comment for dummy_numa_init() slightly.
      Signed-off-by: NDavid Rientjes <rientjes@google.com>
      Signed-off-by: NTejun Heo <tj@kernel.org>
      c09cedf4
    • Y
      x86-64, NUMA: Fix numa_emulation code with node0 without RAM · 51b361b4
      Yinghai Lu 提交于
      On one system that does not have RAM on node0.
      
      When numa_emulation is compiled in, and
      1. boot system without numa=fake...
      2. or boot system with numa=fake=128 to make emulation fail
      
      will get:
      
      [    0.092026] ------------[ cut here ]------------
      [    0.096005] kernel BUG at arch/x86/mm/numa_emulation.c:439!
      [    0.096005] invalid opcode: 0000 [#1] SMP
      [    0.096005] last sysfs file:
      [    0.096005] CPU 0
      [    0.096005] Modules linked in:
      [    0.096005]
      [    0.096005] Pid: 0, comm: swapper Not tainted 2.6.38-rc6-tip-yh-03869-gcb0491d-dirty #684 Sun Microsystems     Sun Fire X4240/Sun Fire X4240
      [    0.096005] RIP: 0010:[<ffffffff81cdc65b>]  [<ffffffff81cdc65b>] numa_add_cpu+0x56/0xcf
      [    0.096005] RSP: 0000:ffffffff82437ed8  EFLAGS: 00010246
      ...
      [    0.096005] Call Trace:
      [    0.096005]  [<ffffffff81cd7931>] identify_cpu+0x2d7/0x2df
      [    0.096005]  [<ffffffff827e54fa>] identify_boot_cpu+0x10/0x30
      [    0.096005]  [<ffffffff827e5704>] check_bugs+0x9/0x2d
      [    0.096005]  [<ffffffff827dceda>] start_kernel+0x3d7/0x3f1
      [    0.096005]  [<ffffffff827dc2cc>] x86_64_start_reservations+0x9c/0xa0
      [    0.096005]  [<ffffffff827dc4ad>] x86_64_start_kernel+0x1dd/0x1e8
      [    0.096005] Code: 74 06 48 8d 04 90 eb 0f 48 c7 c0 30 d9 00 00 48 03 04 d5 90 0f 60 82 8b 00 83 f8 ff 74 0d 0f a3 05 8b 7e 92 00 19 d2 85 d2 75 02 <0f> 0b 48 98 be 00 01 00 00 48 c7 c7 e0 44 60 82 44 8b 2c 85 e0
      [    0.096005] RIP  [<ffffffff81cdc65b>] numa_add_cpu+0x56/0xcf
      [    0.096005]  RSP <ffffffff82437ed8>
      [    0.096026] ---[ end trace a7919e7f17c0a725 ]---
      
      We need to use early_cpu_to_node() directly, because numa_cpu_node()
      will return node0 that is not onlined.
      Signed-off-by: NYinghai Lu <yinghai@kernel.org>
      Signed-off-by: NTejun Heo <tj@kernel.org>
      51b361b4
    • T
      x86-64, NUMA: Revert NUMA affine page table allocation · f8911250
      Tejun Heo 提交于
      This patch reverts NUMA affine page table allocation added by commit
      1411e0ec (x86-64, numa: Put pgtable to local node memory).
      
      The commit made an undocumented change where the kernel linear mapping
      strictly follows intersection of e820 memory map and NUMA
      configuration.  If the physical memory configuration has holes or NUMA
      nodes are not properly aligned, this leads to using unnecessarily
      smaller mapping size which leads to increased TLB pressure.  For
      details,
      
        http://thread.gmane.org/gmane.linux.kernel/1104672
      
      Patches to fix the problem have been proposed but the underlying code
      needs more cleanup and the approach itself seems a bit heavy handed
      and it has been determined to revert the feature for now and come back
      to it in the next developement cycle.
      
        http://thread.gmane.org/gmane.linux.kernel/1105959
      
      As init_memory_mapping_high() callsites have been consolidated since
      the commit, reverting is done manually.  Also, the RED-PEN comment in
      arch/x86/mm/init.c is not restored as the problem no longer exists
      with memblock based top-down early memory allocation.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      f8911250
  7. 03 3月, 2011 2 次提交
  8. 02 3月, 2011 6 次提交
  9. 28 2月, 2011 1 次提交
    • D
      x86: Use u32 instead of long to set reset vector back to 0 · 299c5696
      Don Zickus 提交于
      A customer of ours, complained that when setting the reset
      vector back to 0, it trashed other data and hung their box.
      They noticed when only 4 bytes were set to 0 instead of 8,
      everything worked correctly.
      
      Mathew pointed out:
      
       |
       | We're supposed to be resetting trampoline_phys_low and
       | trampoline_phys_high here, which are two 16-bit values.
       | Writing 64 bits is definitely going to overwrite space
       | that we're not supposed to be touching.
       |
      
      So limit the area modified to u32.
      Signed-off-by: NDon Zickus <dzickus@redhat.com>
      Acked-by: NMatthew Garrett <mjg@redhat.com>
      Cc: <stable@kernel.org>
      LKML-Reference: <1297139100-424-1-git-send-email-dzickus@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      299c5696
  10. 25 2月, 2011 2 次提交
  11. 24 2月, 2011 2 次提交
    • Y
      x86: Rename e820_table_* to pgt_buf_* · d1b19426
      Yinghai Lu 提交于
      e820_table_{start|end|top}, which are used to buffer page table
      allocation during early boot, are now derived from memblock and don't
      have much to do with e820.  Change the names so that they reflect what
      they're used for.
      
      This patch doesn't introduce any behavior change.
      
      -v2: Ingo found that earlier patch "x86: Use early pre-allocated page
           table buffer top-down" caused crash on 32bit and needed to be
           dropped.  This patch was updated to reflect the change.
      
      -tj: Updated commit description.
      Signed-off-by: NYinghai Lu <yinghai@kernel.org>
      Signed-off-by: NTejun Heo <tj@kernel.org>
      d1b19426
    • J
      x86/mrst: Fix apb timer rating when lapic timer is used · 7b62dbec
      Jacob Pan 提交于
      Need to adjust the clockevent device rating for the structure
      that will be registered with clockevent system instead of the
      temporary structure.
      
      Without this fix, APB timer rating will be higher than LAPIC
      timer such that it can not be released later to be used as the
      broadcast timer.
      Signed-off-by: NJacob Pan <jacob.jun.pan@linux.intel.com>
      Cc: Arjan van de Ven <arjan@linux.intel.com>
      Cc: Alan Cox <alan@linux.intel.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: John Stultz <john.stultz@linaro.org>
      LKML-Reference: <1298506046-439-1-git-send-email-jacob.jun.pan@linux.intel.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      7b62dbec
  12. 22 2月, 2011 5 次提交
  13. 21 2月, 2011 2 次提交
  14. 18 2月, 2011 2 次提交
  15. 17 2月, 2011 5 次提交
    • Y
      x86-64, NUMA: Put dummy_numa_init() in the init section · 6d496f9f
      Yinghai Lu 提交于
      dummy_numa_init() is used only during system boot.  Put it in .init
      like other NUMA init functions.
      
      - tj: Description update.
      Signed-off-by: NYinghai Lu <yinghai@kernel.org>
      Signed-off-by: NTejun Heo <tj@kernel.org>
      6d496f9f
    • Y
      x86-64, NUMA: Don't call __pa() with invalid address in numa_reset_distance() · 2ca230ba
      Yinghai Lu 提交于
      Do not call __pa(numa_distance) if it was not allocated before.
      Calling with invalid address triggers VIRTUAL_BUG_ON() in
      __phys_addr() if CONFIG_DEBUG_VIRTUAL.
      
      Also reported by Ingo.
      
       http://thread.gmane.org/gmane.linux.kernel/1101306/focus=1101785
      
      - v2: Change to check existing path as tj requested.
      - tj: Description update.
      Signed-off-by: NYinghai Lu <yinghai@kernel.org>
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Reported-by: NIngo Molnar <mingo@elte.hu>
      2ca230ba
    • T
      x86-64, NUMA: Unify emulated distance mapping · e23bba60
      Tejun Heo 提交于
      NUMA emulation needs to update node distance information.  It did it
      by remapping apicid to PXM mapping, even when amdtopology is being
      used.  There is no reason to go through such convolution.  The generic
      code has all the information necessary to transform the distance table
      to the emulated nid space.
      
      Implement generic distance table transformation in numa_emulation()
      and drop private implementations in srat_64 and amdtopology_64.  This
      makes find_node_by_addr() and fake_physnodes() and related functions
      unnecessary, drop them.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Cc: Brian Gerst <brgerst@gmail.com>
      Cc: Cyrill Gorcunov <gorcunov@gmail.com>
      Cc: Shaohui Zheng <shaohui.zheng@intel.com>
      Cc: David Rientjes <rientjes@google.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: H. Peter Anvin <hpa@linux.intel.com>
      e23bba60
    • T
      x86-64, NUMA: Unify emulated apicid -> node mapping transformation · 6b78cb54
      Tejun Heo 提交于
      NUMA emulation changes node mappings and thus apicid -> node mapping
      needs to be updated accordingly.  srat_64 and amdtopology_64 did this
      separately; however, all the necessary information is the mapping from
      emulated nodes to physical nodes which is available in
      emu_nid_to_phys[].
      
      Implement common __apicid_to_node[] transformation in numa_emulation()
      and drop duplicate implementations.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Cc: Brian Gerst <brgerst@gmail.com>
      Cc: Cyrill Gorcunov <gorcunov@gmail.com>
      Cc: Shaohui Zheng <shaohui.zheng@intel.com>
      Cc: David Rientjes <rientjes@google.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: H. Peter Anvin <hpa@linux.intel.com>
      6b78cb54
    • T
      x86-64, NUMA: Emulate directly from numa_meminfo · 1cca5340
      Tejun Heo 提交于
      NUMA emulation built physnodes[] array which could only represent
      configurations from the physical meminfo and emulated nodes using the
      information.  There's no reason to take this extra level of
      indirection.  Update emulation functions so that they operate directly
      on numa_meminfo.  This simplifies the code and makes emulation layout
      behave better with interleaved physical nodes.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Cc: Brian Gerst <brgerst@gmail.com>
      Cc: Cyrill Gorcunov <gorcunov@gmail.com>
      Cc: Shaohui Zheng <shaohui.zheng@intel.com>
      Cc: David Rientjes <rientjes@google.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: H. Peter Anvin <hpa@linux.intel.com>
      1cca5340