1. 25 6月, 2012 1 次提交
  2. 08 6月, 2012 1 次提交
  3. 17 1月, 2012 3 次提交
  4. 21 9月, 2011 1 次提交
    • J
      x86: uv2: Workaround for UV2 Hub bug (system global address format) · 6a469e46
      Jack Steiner 提交于
      This is a workaround for a UV2 hub bug that affects the format of system
      global addresses.
      
      The GRU API for UV2 was inadvertently broken by a hardware change.  The
      format of the physical address used for TLB dropins and for addresses used
      with instructions running in unmapped mode has changed.  This change was
      not documented and became apparent only when diags failed running on
      system simulators.
      
      For UV1, TLB and GRU instruction physical addresses are identical to
      socket physical addresses (although high NASID bits must be OR'ed into the
      address).
      
      For UV2, socket physical addresses need to be converted.  The NODE portion
      of the physical address needs to be shifted so that the low bit is in bit
      39 or bit 40, depending on an MMR value.
      
      It is not yet clear if this bug will be fixed in a silicon respin.  If it
      is fixed, the hub revision will be incremented & the workaround disabled.
      Signed-off-by: NJack Steiner <steiner@sgi.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: <stable@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      6a469e46
  5. 30 8月, 2011 1 次提交
  6. 21 6月, 2011 4 次提交
  7. 25 5月, 2011 2 次提交
    • C
      x86, UV: Clean up uv_tlb.c · f073cc8f
      Cliff Wickman 提交于
      SGI UV's uv_tlb.c driver has become rather hard to read, with overly large
      functions, non-standard coding style and (way) too long variable, constant
      and function names and non-obvious code flow sequences.
      
      This patch improves the readability and maintainability of the driver
      significantly, by doing the following strict code cleanups with no side
      effects:
      
       - Split long functions into shorter logical functions.
      
       - Shortened some variable and structure member names.
      
       - Added special functions for reads and writes of MMR regs with
         very long names.
      
       - Added the 'tunables' table to shortened tunables_write().
      
       - Added the 'stat_description' table to shorten uv_ptc_proc_write().
      
       - Pass fewer 'stat' arguments where it can be derived from the 'bcp'
         argument.
      
       - Function definitions consistent on one line, and inline in few (short) cases.
      
       - Moved some small structures and an atomic inline function to the header file.
      
       - Moved some local variables to the blocks where they are used.
      
       - Updated the copyright date.
      
       - Shortened uv_write_global_mmr64() etc. using some aliasing; no
         line breaks. Renamed many uv_.. functions that are not exported.
      
       - Aligned structure fields.
          [ note that not all structures are aligned the same way though; I'd like
            to keep the extensive commenting in some of them. ]
      
       - Shortened some long structure names.
      
       - Standard pass/fail exit from init_per_cpu()
      
       - Vertical alignment for mass initializations.
      
       - More separation between blocks of code.
      
      Tested on a 16-processor Altix UV.
      Signed-off-by: NCliff Wickman <cpw@sgi.com>
      Cc: penberg@kernel.org
      Link: http://lkml.kernel.org/r/E1QOw12-0004MN-Lp@eag09.americas.sgi.comSigned-off-by: NIngo Molnar <mingo@elte.hu>
      f073cc8f
    • J
      x86, UV: Add support for SGI UV2 hub chip · 2a919596
      Jack Steiner 提交于
      This patch adds support for a new version of the SGI UV hub
      chip. The hub chip is the node controller that connects multiple
      blades into a larger coherent SSI.
      
      For the most part, UV2 is compatible with UV1. The majority of
      the changes are in the addresses of MMRs and in a few cases, the
      contents of MMRs. These changes are the result in changes in the
      system topology such as node configuration, processor types,
      maximum nodes, physical address sizes, etc.
      Signed-off-by: NJack Steiner <steiner@sgi.com>
      Link: http://lkml.kernel.org/r/20110511175028.GA18006@sgi.comSigned-off-by: NIngo Molnar <mingo@elte.hu>
      2a919596
  8. 13 5月, 2011 1 次提交
    • C
      x86: Fix UV BAU for non-consecutive nasids · 77ed23f8
      Cliff Wickman 提交于
      This is a fix for the SGI Altix-UV Broadcast Assist Unit code,
      which is used for TLB flushing.
      
      Certain hardware configurations (that customers are ordering)
      cause nasids (numa address space id's) to be non-consecutive.
      Specifically, once you have more than 4 blades in a IRU
      (Individual Rack Unit - or 1/2 rack) but less than the maximum
      of 16, the nasid numbering becomes non-consecutive.  This
      currently results in a 'catastrophic error' (CATERR) detected by
      the firmware during OS boot.  The BAU is generating an 'INTD'
      request that is targeting a non-existent nasid value. Such
      configurations may also occur when a blade is configured off
      because of hardware errors. (There is one UV hub per blade.)
      
      This patch is required to support such configurations.
      
      The problem with the tlb_uv.c code is that is using the
      consecutive hub numbers as indices to the BAU distribution bit
      map. These are simply the ordinal position of the hub or blade
      within its partition.  It should be using physical node numbers
      (pnodes), which correspond to the physical nasid values. Use of
      the hub number only works as long as the nasids in the partition
      are consecutive and increase with a stride of 1.
      
      This patch changes the index to be the pnode number, thus
      allowing nasids to be non-consecutive.
      It also provides a table in local memory for each cpu to
      translate target cpu number to target pnode and nasid.
      And it improves naming to properly reflect 'node' and 'uvhub'
      versus 'nasid'.
      Signed-off-by: NCliff Wickman <cpw@sgi.com>
      Cc: <stable@kernel.org>
      Link: http://lkml.kernel.org/r/E1QJmxX-0002Mz-Fk@eag09.americas.sgi.comSigned-off-by: NIngo Molnar <mingo@elte.hu>
      77ed23f8
  9. 09 3月, 2011 1 次提交
  10. 04 1月, 2011 1 次提交
    • C
      x86, UV, BAU: Extend for more than 16 cpus per socket · cfa60917
      Cliff Wickman 提交于
      Fix a hard-coded limit of a maximum of 16 cpu's per socket.
      
      The UV Broadcast Assist Unit code initializes by scanning the
      cpu topology of the system and assigning a master cpu for each
      socket and UV hub. That scan had an assumption of a limit of 16
      cpus per socket. With Westmere we are going over that limit.
      The UV hub hardware will allow up to 32.
      
      If the scan finds the system has gone over that limit it returns
      an error and we print a warning and fall back to doing TLB
      shootdowns without the BAU.
      Signed-off-by: NCliff Wickman <cpw@sgi.com>
      Cc: <stable@kernel.org> # .37.x
      LKML-Reference: <E1PZol7-0000mM-77@eag09.americas.sgi.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      cfa60917
  11. 09 6月, 2010 8 次提交
    • C
      x86, UV: Modularize BAU send and wait · f6d8a566
      Cliff Wickman 提交于
      Streamline the large uv_flush_send_and_wait() function by use of
      a couple of helper functions.
      
      And remove some excess comments.
      Signed-off-by: NCliff Wickman <cpw@sgi.com>
      Cc: gregkh@suse.de
      LKML-Reference: <E1OJvNy-0004ay-IH@eag09.americas.sgi.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      f6d8a566
    • C
      x86, UV: BAU broadcast to the local hub · 450a007e
      Cliff Wickman 提交于
      Make the Broadcast Assist Unit driver use the BAU for TLB
      shootdowns of cpu's on the local uvhub.
      
      It was previously thought that IPI might be faster to the cpu's
      on the local hub.  But the IPI operation would have to follow
      the completion of the BAU broadcast anyway.  So we broadcast to
      the local uvhub in all cases except when the current cpu was the
      only local cpu in the mask.
      
      This simplifies uv_flush_send_and_wait() in that it returns
      either all shootdowns complete, or none.
      
      Adjust the statistics to account for shootdowns on the local
      uvhub.
      Signed-off-by: NCliff Wickman <cpw@sgi.com>
      Cc: gregkh@suse.de
      LKML-Reference: <E1OJvNy-0004aq-G7@eag09.americas.sgi.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      450a007e
    • C
      x86, UV: Remove BAU check for stay-busy · 90cc7d94
      Cliff Wickman 提交于
      Remove a faulty assumption that a long running BAU request has
      encountered a hardware problem and will never finish.
      
      Numalink congestion can make a request appear to have
      encountered such a problem, but it is not safe to cancel the
      request.  If such a cancel is done but a reply is later received
      we can miss a TLB shootdown.
      
      We depend upon the max_bau_concurrent 'throttle' to prevent the
      stay-busy case from happening.
      Signed-off-by: NCliff Wickman <cpw@sgi.com>
      Cc: gregkh@suse.de
      LKML-Reference: <E1OJvNy-0004ad-BV@eag09.americas.sgi.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      90cc7d94
    • C
      x86, UV: BAU structure rearranging · 4faca155
      Cliff Wickman 提交于
      Move some structure definitions from the C code to the BAU
      header file, and change the organization of that header file a
      little.
      Signed-off-by: NCliff Wickman <cpw@sgi.com>
      Cc: gregkh@suse.de
      LKML-Reference: <E1OJvNy-0004aI-54@eag09.americas.sgi.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      4faca155
    • C
      x86, UV: Shorten access to BAU statistics structure · 712157aa
      Cliff Wickman 提交于
      Use a pointer from the per-cpu BAU control structure to the
      per-cpu BAU statistics structure.
      We nearly always know the first before needing the second.
      Signed-off-by: NCliff Wickman <cpw@sgi.com>
      Cc: gregkh@suse.de
      LKML-Reference: <E1OJvNy-0004aB-2k@eag09.americas.sgi.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      712157aa
    • C
      x86, UV: Disable BAU on network congestion · 50fb55ac
      Cliff Wickman 提交于
      The numalink network can become so congested that TLB shootdown
      using the Broadcast Assist Unit becomes slower than using IPI's.
      
      In that case, disable the use of the BAU for a period of time.
      The period is tunable.  When the period expires the use of the
      BAU is re-enabled. A count of these actions is added to the
      statistics file.
      Signed-off-by: NCliff Wickman <cpw@sgi.com>
      Cc: gregkh@suse.de
      LKML-Reference: <E1OJvNy-0004a4-0a@eag09.americas.sgi.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      50fb55ac
    • C
      x86, UV: BAU tunables into a debugfs file · e8e5e8a8
      Cliff Wickman 提交于
      Make the Broadcast Assist Unit driver's nine tuning values variable by
      making them accessible through a read/write debugfs file.
      
      The file will normally be mounted as
      /sys/kernel/debug/sgi_uv/bau_tunables. The tunables are kept in each
      cpu's per-cpu BAU structure.
      
      The patch also does a little name improvement, and corrects the reset of
      two destination timeout counters.
      Signed-off-by: NCliff Wickman <cpw@sgi.com>
      Cc: gregkh@suse.de
      LKML-Reference: <E1OJvNx-0004Zx-Uo@eag09.americas.sgi.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      e8e5e8a8
    • C
      x86, UV: Calculate BAU destination timeout · 12a6611f
      Cliff Wickman 提交于
      Calculate the Broadcast Assist Unit's destination timeout period from the
      values in the relevant MMR's.
      
      Store it in each cpu's per-cpu BAU structure so that a destination
      timeout can be differentiated from a 'plugged' situation in which all
      software ack resources are already allocated and a timeout is pending.
      That case returns an immediate destination error.
      Signed-off-by: NCliff Wickman <cpw@sgi.com>
      Cc: gregkh@suse.de
      LKML-Reference: <E1OJvNx-0004Zq-RK@eag09.americas.sgi.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      12a6611f
  12. 15 4月, 2010 1 次提交
    • C
      x86, UV: Improve BAU performance and error recovery · b8f7fb13
      Cliff Wickman 提交于
      - increase performance of the interrupt handler
      
      - release timed-out software acknowledge resources
      
      - recover from continuous-busy status due to a hardware issue
      
      - add a 'throttle' to keep a uvhub from sending more than a
        specified number of broadcasts concurrently (work around the hardware issue)
      
      - provide a 'nobau' boot command line option
      
      - rename 'pnode' and 'node' to 'uvhub' (the 'node' terminology
        is ambiguous)
      
      - add some new statistics about the scope of broadcasts, retries, the
        hardware issue and the 'throttle'
      
      - split off new function uv_bau_retry_msg() from
        uv_bau_process_message() per community coding style feedback.
      
      - simplify the argument list to uv_bau_process_message(), per
        community coding style feedback.
      Signed-off-by: NCliff Wickman <cpw@sgi.com>
      Cc: linux-mm@kvack.org
      Cc: Jack Steiner <steiner@sgi.com>
      Cc: Russ Anderson <rja@sgi.com>
      Cc: Mike Travis <travis@sgi.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      LKML-Reference: <E1O25Z4-0004Ur-PB@eag09.americas.sgi.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      b8f7fb13
  13. 04 12月, 2009 1 次提交
  14. 15 8月, 2009 1 次提交
  15. 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
  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. 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
  18. 31 12月, 2008 1 次提交
    • J
      x86: uv_bau.h: fix dubious bitfield · fa95826f
      Jaswinder Singh Rajput 提交于
      Impact: cleanup, avoid sparse warnings
      
      declare bitfield as unsigned to avoid dubious bitfield issue
      
       CHECK   arch/x86/kernel/tlb_64.c
      arch/x86/include/asm/uv/uv_bau.h:136:22: warning: dubious bitfield without explicit `signed' or `unsigned'
      arch/x86/include/asm/uv/uv_bau.h:138:25: warning: dubious bitfield without explicit `signed' or `unsigned'
      arch/x86/include/asm/uv/uv_bau.h:140:15: warning: dubious bitfield without explicit `signed' or `unsigned'
      arch/x86/include/asm/uv/uv_bau.h:143:14: warning: dubious bitfield without explicit `signed' or `unsigned'
      arch/x86/include/asm/uv/uv_bau.h:146:14: warning: dubious bitfield without explicit `signed' or `unsigned'
      arch/x86/include/asm/uv/uv_bau.h:149:18: warning: dubious bitfield without explicit `signed' or `unsigned'
      arch/x86/include/asm/uv/uv_bau.h:151:18: warning: dubious bitfield without explicit `signed' or `unsigned'
      arch/x86/include/asm/uv/uv_bau.h:155:14: error: dubious one-bit signed bitfield
      arch/x86/include/asm/uv/uv_bau.h:159:18: error: dubious one-bit signed bitfield
      arch/x86/include/asm/uv/uv_bau.h:173:19: error: dubious one-bit signed bitfield
      arch/x86/include/asm/uv/uv_bau.h:181:16: error: dubious one-bit signed bitfield
      arch/x86/include/asm/uv/uv_bau.h:185:18: error: dubious one-bit signed bitfield
      arch/x86/include/asm/uv/uv_bau.h:188:16: error: dubious one-bit signed bitfield
      
       CHECK   arch/x86/kernel/tlb_uv.c
      arch/x86/include/asm/uv/uv_bau.h:136:22: warning: dubious bitfield without explicit `signed' or `unsigned'
      arch/x86/include/asm/uv/uv_bau.h:138:25: warning: dubious bitfield without explicit `signed' or `unsigned'
      arch/x86/include/asm/uv/uv_bau.h:140:15: warning: dubious bitfield without explicit `signed' or `unsigned'
      arch/x86/include/asm/uv/uv_bau.h:143:14: warning: dubious bitfield without explicit `signed' or `unsigned'
      arch/x86/include/asm/uv/uv_bau.h:146:14: warning: dubious bitfield without explicit `signed' or `unsigned'
      arch/x86/include/asm/uv/uv_bau.h:149:18: warning: dubious bitfield without explicit `signed' or `unsigned'
      arch/x86/include/asm/uv/uv_bau.h:151:18: warning: dubious bitfield without explicit `signed' or `unsigned'
      arch/x86/include/asm/uv/uv_bau.h:155:14: error: dubious one-bit signed bitfield
      arch/x86/include/asm/uv/uv_bau.h:159:18: error: dubious one-bit signed bitfield
      arch/x86/include/asm/uv/uv_bau.h:173:19: error: dubious one-bit signed bitfield
      arch/x86/include/asm/uv/uv_bau.h:181:16: error: dubious one-bit signed bitfield
      arch/x86/include/asm/uv/uv_bau.h:185:18: error: dubious one-bit signed bitfield
      arch/x86/include/asm/uv/uv_bau.h:188:16: error: dubious one-bit signed bitfield
      Signed-off-by: NJaswinder Singh Rajput <jaswinderrajput@gmail.com>
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      fa95826f
  19. 23 10月, 2008 3 次提交
  20. 20 8月, 2008 1 次提交
  21. 23 7月, 2008 1 次提交
    • V
      x86: consolidate header guards · 77ef50a5
      Vegard Nossum 提交于
      This patch is the result of an automatic script that consolidates the
      format of all the headers in include/asm-x86/.
      
      The format:
      
      1. No leading underscore. Names with leading underscores are reserved.
      2. Pathname components are separated by two underscores. So we can
         distinguish between mm_types.h and mm/types.h.
      3. Everything except letters and numbers are turned into single
         underscores.
      Signed-off-by: NVegard Nossum <vegard.nossum@gmail.com>
      77ef50a5
  22. 08 7月, 2008 3 次提交
    • 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