1. 26 May, 2011 1 commit
    • Matthew Garrett's avatar
      x86, efi: Retain boot service code until after switching to virtual mode · 916f676f
      Matthew Garrett authored
      UEFI stands for "Unified Extensible Firmware Interface", where "Firmware"
      is an ancient African word meaning "Why do something right when you can
      do it so wrong that children will weep and brave adults will cower before
      you", and "UEI" is Celtic for "We missed DOS so we burned it into your
      ROMs". The UEFI specification provides for runtime services (ie, another
      way for the operating system to be forced to depend on the firmware) and
      we rely on these for certain trivial tasks such as setting up the
      bootloader. But some hardware fails to work if we attempt to use these
      runtime services from physical mode, and so we have to switch into virtual
      mode. So far so dreadful.
      
      The specification makes it clear that the operating system is free to do
      whatever it wants with boot services code after ExitBootServices() has been
      called. SetVirtualAddressMap() can't be called until ExitBootServices() has
      been. So, obviously, a whole bunch of EFI implementations call into boot
      services code when we do that. Since we've been charmingly naive and
      trusted that the specification may be somehow relevant to the real world,
      we've already stuffed a picture of a penguin or something in that address
      space. And just to make things more entertaining, we've also marked it
      non-executable.
      
      This patch allocates the boot services regions during EFI init and makes
      sure that they're executable. Then, after SetVirtualAddressMap(), it
      discards them and everyone lives happily ever after. Except for the ones
      who have to work on EFI, who live sad lives haunted by the knowledge that
      someone's eventually going to write yet another firmware specification.
      
      [ hpa: adding this to urgent with a stable tag since it fixes currently-broken
        hardware.  However, I do not know what the dependencies are and so I do
        not know which -stable versions this may be a candidate for. ]
      Signed-off-by: default avatarMatthew Garrett <mjg@redhat.com>
      Link: http://lkml.kernel.org/r/1306331593-28715-1-git-send-email-mjg@redhat.comSigned-off-by: default avatarH. Peter Anvin <hpa@linux.intel.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: <stable@kernel.org>
      916f676f
  2. 25 May, 2011 4 commits
    • Nikhil P Rao's avatar
      x86: Remove unnecessary check in detect_ht() · 8b27f2ff
      Nikhil P Rao authored
      This patch removes a check that causes incorrect scheduler
      domain setup (SMP instead of SMT) and bootlog warning messages
      when cpuid extensions for topology enumeration are not supported
      and the number of processors reported to the OS is smaller than
      smp_num_siblings.
      Acked-by: default avatarSuresh Siddha <suresh.b.siddha@intel.com>
      Signed-off-by: default avatarNikhil P Rao <nikhil.rao@intel.com>
      Link: http://lkml.kernel.org/r/1306343921.19325.1.camel@fedora13Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      8b27f2ff
    • Richard Kennedy's avatar
      x86: Reorder mm_context_t to remove x86_64 alignment padding and thus shrink mm_struct · af6a25f0
      Richard Kennedy authored
      Reorder mm_context_t to remove alignment padding on 64 bit
      builds shrinking its size from 64 to 56 bytes.
      
      This allows mm_struct to shrink from 840 to 832 bytes, so using
      one fewer cache lines, and getting more objects per slab when
      using slub.
      
      slabinfo mm_struct reports
      before :-
      
          Sizes (bytes)     Slabs
          -----------------------------------
          Object :     840  Total  :       7
          SlabObj:     896  Full   :       1
          SlabSiz:   16384  Partial:       4
          Loss   :      56  CpuSlab:       2
          Align  :      64  Objects:      18
      
      after :-
      
          Sizes (bytes)     Slabs
          ----------------------------------
          Object :     832  Total  :       7
          SlabObj:     832  Full   :       1
          SlabSiz:   16384  Partial:       4
          Loss   :       0  CpuSlab:       2
          Align  :      64  Objects:      19
      Signed-off-by: default avatarRichard Kennedy <richard@rsk.demon.co.uk>
      Cc: wilsons@start.ca
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Pekka Enberg <penberg@kernel.org>
      Link: http://lkml.kernel.org/r/1306244999.1999.5.camel@castor.rskSigned-off-by: default avatarIngo Molnar <mingo@elte.hu>
      af6a25f0
    • Cliff Wickman's avatar
      x86, UV: Clean up uv_tlb.c · f073cc8f
      Cliff Wickman authored
      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: default avatarCliff Wickman <cpw@sgi.com>
      Cc: penberg@kernel.org
      Link: http://lkml.kernel.org/r/E1QOw12-0004MN-Lp@eag09.americas.sgi.comSigned-off-by: default avatarIngo Molnar <mingo@elte.hu>
      f073cc8f
    • Jack Steiner's avatar
      x86, UV: Add support for SGI UV2 hub chip · 2a919596
      Jack Steiner authored
      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: default avatarJack Steiner <steiner@sgi.com>
      Link: http://lkml.kernel.org/r/20110511175028.GA18006@sgi.comSigned-off-by: default avatarIngo Molnar <mingo@elte.hu>
      2a919596
  3. 24 May, 2011 35 commits