1. 24 11月, 2009 1 次提交
    • C
      x86: SGI UV: Fix BAU initialization · e38e2af1
      Cliff Wickman 提交于
      A memory mapped register that affects the SGI UV Broadcast
      Assist Unit's interrupt handling may sometimes be unintialized.
      
      Remove the condition on its initialization, as that condition
      can be randomly satisfied by a hardware reset.
      Signed-off-by: NCliff Wickman <cpw@sgi.com>
      Cc: <stable@kernel.org>
      LKML-Reference: <E1NBGB9-0005nU-Dp@eag09.americas.sgi.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      e38e2af1
  2. 24 8月, 2009 1 次提交
  3. 15 8月, 2009 1 次提交
  4. 24 6月, 2009 1 次提交
    • C
      x86: Fix uv bau sending buffer initialization · 9c26f52b
      Cliff Wickman 提交于
      The initialization of the UV Broadcast Assist Unit's sending
      buffers was making an invalid assumption about the
      initialization of an MMR that defines its address.
      
      The BIOS will not be providing that MMR.  So
      uv_activation_descriptor_init() should unconditionally set it.
      
      Tested on UV simulator.
      Signed-off-by: NCliff Wickman <cpw@sgi.com>
      Cc: <stable@kernel.org> # for v2.6.30.x
      LKML-Reference: <E1MJTfj-0005i1-W8@eag09.americas.sgi.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      9c26f52b
  5. 09 6月, 2009 1 次提交
  6. 03 6月, 2009 1 次提交
    • C
      x86: Fix UV BAU activation descriptor init · 0e2595cd
      Cliff Wickman 提交于
      The UV tlb shootdown code has a serious initialization error.
      
      An array of structures [32*8] is initialized as if it were [32].
      The array is indexed by (cpu number on the blade)*8, so the short
      initialization works for up to 4 cpus on a blade.
      But above that, we provide an invalid opcode to the hub's
      broadcast assist unit.
      
      This patch changes the allocation of the array to use its symbolic
      dimensions for better clarity. And initializes all 32*8 entries.
      
      Shortened 'UV_ACTIVATION_DESCRIPTOR_SIZE' to 'UV_ADP_SIZE' per Ingo's
      recommendation.
      
      Tested on the UV simulator.
      Signed-off-by: NCliff Wickman <cpw@sgi.com>
      Cc: <stable@kernel.org>
      LKML-Reference: <E1M6lZR-0007kV-Aq@eag09.americas.sgi.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      0e2595cd
  7. 17 4月, 2009 1 次提交
    • C
      x86: UV BAU distribution and payload MMRs · 4ea3c51d
      Cliff Wickman 提交于
      This patch correctly sets BAU memory mapped registers to point
      to the sending activation descriptor table and target payload table.
      
      The "Broadcast Assist Unit" is used for TLB shootdown in UV.
      
      The memory mapped registers that point to sending and receiving
      memory structures contain node numbers.
      
      In one case the __pa() function did not provide the node id of
      memory on blade zero in configurations where that id is nonzero.
      In another case, it was assumed that memory was allocated on
      the local node.  That assumption is not true in a configuration
      in which the node has no memory.
      
      Tested on the UV hardware simulator.
      
      [ Impact: fix possible runtime crash due to incorrect TLB logic ]
      Signed-off-by: NCliff Wickman <cpw@sgi.com>
      LKML-Reference: <E1LuR5Z-0007An-B8@eag09.americas.sgi.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      4ea3c51d
  8. 15 4月, 2009 1 次提交
    • C
      x86: UV: BAU partition-relative distribution map · 94ca8e48
      Cliff Wickman 提交于
      This patch enables each partition's BAU distribution bit map
      to be partition-relative.
      
      The distribution bitmap had been constructed assuming 0 as the base
      node number.  That construct would not have allowed a total system of
      greater than 256 nodes.
      It also corrects an error that occurred when the first blade's nasid
      was not zero.  That nasid was stored as the base node.
      The base node number gets added by hardware to the node numbers implied
      in the distribution bitmap, resulting in invalid target nasids.
      
      Tested on the UV hardware simulator.
      Signed-off-by: NCliff Wickman <cpw@sgi.com>
      LKML-Reference: <E1Ltl0C-0004Ob-37@eag09.americas.sgi.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      94ca8e48
  9. 04 4月, 2009 2 次提交
    • C
      x86: UV BAU messaging timeouts · c4c4688f
      Cliff Wickman 提交于
      This patch replaces a 'nop' uv_enable_timeouts() in the
      UV TLB shootdown code. (somehow, long ago that function got
      eviscerated)
      
      If any cpu in the destination node does not get interrupted by the
      message and post completion in a reasonable time the hardware
      should respond to the sender with an error.  This function
      enables such timeouts.
      
      Tested on the UV hardware simulator.
      Signed-off-by: NCliff Wickman <cpw@sgi.com>
      LKML-Reference: <E1LpjXU-00007e-Qh@eag09.americas.sgi.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      c4c4688f
    • C
      x86: UV BAU and nodes with no memory · 9674f35b
      Cliff Wickman 提交于
      This patch fixes BAU initialization for systems containing
      nodes with no memory and for systems with non-consecutive
      node numbers.
      
      Fixes and clarifies situations where pnode should be used instead
      of node id.
      
      Tested on the UV hardware simulator.
      Signed-off-by: NCliff Wickman <cpw@sgi.com>
      LKML-Reference: <E1LpjX3-00007N-12@eag09.americas.sgi.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      9674f35b
  10. 18 3月, 2009 1 次提交
  11. 13 3月, 2009 1 次提交
  12. 08 3月, 2009 1 次提交
    • C
      x86: UV: remove uv_flush_tlb_others() WARN_ON · 3a450de1
      Cliff Wickman 提交于
      In uv_flush_tlb_others() (arch/x86/kernel/tlb_uv.c),
      the "WARN_ON(!in_atomic())" fails if CONFIG_PREEMPT is not enabled.
      
      And CONFIG_PREEMPT is not enabled by default in the distribution that
      most UV owners will use.
      
      We could #ifdef CONFIG_PREEMPT the warning, but that is not good form.
      And there seems to be no suitable fix to in_atomic() when CONFIG_PREMPT
      is not on.
      
      As Ingo commented:
      
        > and we have no proper primitive to test for atomicity. (mainly
        > because we dont know about atomicity on a non-preempt kernel)
      
      So we drop the WARN_ON.
      Signed-off-by: NCliff Wickman <cpw@sgi.com>
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      3a450de1
  13. 18 2月, 2009 2 次提交
  14. 31 1月, 2009 1 次提交
  15. 29 1月, 2009 1 次提交
  16. 21 1月, 2009 1 次提交
    • T
      x86: uv cleanup · bdbcdd48
      Tejun Heo 提交于
      Impact: cleanup
      
      Make the following uv related cleanups.
      
      * collect visible uv related definitions and interfaces into uv/uv.h
        and use it.  this cleans up the messy situation where on 64bit, uv
        is defined properly, on 32bit generic it's dummy and on the rest
        undefined.  after this clean up, uv is defined on 64 and dummy on
        32.
      
      * update uv_flush_tlb_others() such that it takes cpumask of
        to-be-flushed cpus as argument, instead of that minus self, and
        returns yet-to-be-flushed cpumask, instead of modifying the passed
        in parameter.  this interface change will ease dummy implementation
        of uv_flush_tlb_others() and makes uv tlb flush related stuff
        defined in tlb_uv proper.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      bdbcdd48
  17. 16 1月, 2009 1 次提交
  18. 12 1月, 2009 1 次提交
    • R
      x86: change flush_tlb_others to take a const struct cpumask · 4595f962
      Rusty Russell 提交于
      Impact: reduce stack usage, use new cpumask API.
      
      This is made a little more tricky by uv_flush_tlb_others which
      actually alters its argument, for an IPI to be sent to the remaining
      cpus in the mask.
      
      I solve this by allocating a cpumask_var_t for this case and falling back
      to IPI should this fail.
      
      To eliminate temporaries in the caller, all flush_tlb_others implementations
      now do the this-cpu-elimination step themselves.
      
      Note also the curious "cpus_or(f->flush_cpumask, cpumask, f->flush_cpumask)"
      which has been there since pre-git and yet f->flush_cpumask is always zero
      at this point.
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: NMike Travis <travis@sgi.com>
      4595f962
  19. 03 1月, 2009 1 次提交
    • C
      x86, UV: remove erroneous BAU initialization · 46814dde
      Cliff Wickman 提交于
      Impact: fix crash on x86/UV
      
      UV is the SGI "UltraViolet" machine, which is x86_64 based.
      BAU is the "Broadcast Assist Unit", used for TLB shootdown in UV.
      
      This patch removes the allocation and initialization of an unused table.
      
      This table is left over from a development test mode.  It is unused in
      the present code.
      
      And it was incorrectly initialized: 8 entries allocated but 17 initialized,
      causing slab corruption.
      
      This patch should go into 2.6.27 and 2.6.28 as well as the current tree.
      
      Diffed against 2.6.28 (linux-next, 12/30/08)
      Signed-off-by: NCliff Wickman <cpw@sgi.com>
      Cc: <stable@kernel.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      46814dde
  20. 11 11月, 2008 1 次提交
  21. 22 10月, 2008 1 次提交
  22. 20 8月, 2008 1 次提交
  23. 08 7月, 2008 7 次提交
    • C
      x86, SGI UV: uv_ptc_proc_write fix · e7eb8726
      Cliff Wickman 提交于
      Someone could write 0 bytes to /proc/sgi_uv/ptc_statistics,
      causing
        optstr[count - 1] = '\0';
      to write to who-knows-where.
      
      (Andi Kleen noticed this need from a patch I sent for
       similar code in the ia64 world (sn2_ptc_proc_write()).)
      
      (count less than zero is not possible here, as count is unsigned)
      Signed-off-by: NCliff Wickman <cpw@sgi.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      e7eb8726
    • C
      x86, SGI UV: TLB shootdown using broadcast assist unit, v6 · cef53278
      Cliff Wickman 提交于
      v6: 6/19 close the security hole in uv_ptc_proc_write())
      
        > Found a potential security hole while doing that:
        > static ssize_t uv_ptc_proc_write(struct file *file, const char __user *user,
        >                              size_t count, loff_t *data)
        >     if (copy_from_user(optstr, user, count))
        >             return -EFAULT;
        >
        > is count guaranteed to never be larger than 64?
      
      is fixed below.
      
      It adds tlb_uv.o to the Makefile.
      Signed-off-by: NCliff Wickman <cpw@sgi.com>
      Cc: mingo@elte.hu
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      cef53278
    • I
      SGI UV: TLB shootdown using broadcast assist unit, fix · d400524a
      Ingo Molnar 提交于
      fix:
      
      arch/x86/kernel/tlb_uv.c: In function ‘uv_table_bases_init':
      arch/x86/kernel/tlb_uv.c:612: error: ‘bau_tabsp' undeclared (first use in this function)
      arch/x86/kernel/tlb_uv.c:612: error: (Each undeclared identifier is reported only once
      arch/x86/kernel/tlb_uv.c:612: error: for each function it appears in.)
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      d400524a
    • I
      SGI UV: clean up arch/x86/kernel/tlb_uv.c · b4c286e6
      Ingo Molnar 提交于
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      b4c286e6
    • I
      SGI UV: TLB shootdown using broadcast assist unit · dc163a41
      Ingo Molnar 提交于
      TLB shootdown for SGI UV.
      
      v5: 6/12 corrections/improvements per Ingo's second review
      Signed-off-by: NCliff Wickman <cpw@sgi.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      dc163a41
    • C
      SGI UV: TLB shootdown using broadcast assist unit, cleanups · b194b120
      Cliff Wickman 提交于
      TLB shootdown for SGI UV.
      
      v1: 6/2 original
      v2: 6/3 corrections/improvements per Ingo's review
      v3: 6/4 split atomic operations off to a separate patch (Jeremy's review)
      v4: 6/12 include <mach_apic.h> rather than <asm/mach-bigsmp/mach_apic.h>
               (fixes a !SMP build problem that Ingo found)
               fix the index on uv_table_bases[blade]
      Signed-off-by: NCliff Wickman <cpw@sgi.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      b194b120
    • C
      x86, SGI UV: TLB shootdown using broadcast assist unit · 1812924b
      Cliff Wickman 提交于
      TLB shootdown for SGI UV.
      
      Depends on patch (in tip/x86/irq):
         x86-update-macros-used-by-uv-platform.patch   Jack Steiner May 29
      
      This patch provides the ability to flush TLB's in cpu's that are not on
      the local node.  The hardware mechanism for distributing the flush
      messages is the UV's "broadcast assist unit".
      
      The hook to intercept TLB shootdown requests is a 2-line change to
      native_flush_tlb_others() (arch/x86/kernel/tlb_64.c).
      
      This code has been tested on a hardware simulator. The real hardware
      is not yet available.
      
      The shootdown statistics are provided through /proc/sgi_uv/ptc_statistics.
      The use of /sys was considered, but would have required the use of
      many /sys files.  The debugfs was also considered, but these statistics
      should be available on an ongoing basis, not just for debugging.
      
      Issues to be fixed later:
      - The IRQ for the messaging interrupt is currently hardcoded as 200
        (see UV_BAU_MESSAGE).  It should be dynamically assigned in the future.
      - The use of appropriate udelay()'s is untested, as they are a problem
        in the simulator.
      Signed-off-by: NCliff Wickman <cpw@sgi.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      1812924b