Skip to content
Snippets Groups Projects
  1. Nov 01, 2011
    • Paul Gortmaker's avatar
      x86: Fix files explicitly requiring export.h for EXPORT_SYMBOL/THIS_MODULE · 69c60c88
      Paul Gortmaker authored
      
      These files were implicitly getting EXPORT_SYMBOL via device.h
      which was including module.h, but that will be fixed up shortly.
      
      By fixing these now, we can avoid seeing things like:
      
      arch/x86/kernel/rtc.c:29: warning: type defaults to ‘int’ in declaration of ‘EXPORT_SYMBOL’
      arch/x86/kernel/pci-dma.c:20: warning: type defaults to ‘int’ in declaration of ‘EXPORT_SYMBOL’
      arch/x86/kernel/e820.c:69: warning: type defaults to ‘int’ in declaration of ‘EXPORT_SYMBOL_GPL’
      
      [ with input from Randy Dunlap <rdunlap@xenotime.net> and also
        from Stephen Rothwell <sfr@canb.auug.org.au> ]
      
      Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
      69c60c88
  2. Oct 14, 2011
  3. Sep 21, 2011
    • Matt Fleming's avatar
      x86/rtc: Don't recursively acquire rtc_lock · 47997d75
      Matt Fleming authored
      
      A deadlock was introduced on x86 in commit ef68c8f8 ("x86:
      Serialize EFI time accesses on rtc_lock") because efi_get_time()
      and friends can be called with rtc_lock already held by
      read_persistent_time(), e.g.:
      
       timekeeping_init()
          read_persistent_clock()     <-- acquire rtc_lock
              efi_get_time()
                  phys_efi_get_time() <-- acquire rtc_lock <DEADLOCK>
      
      To fix this let's push the locking down into the get_wallclock()
      and set_wallclock() implementations.  Only the clock
      implementations that access the x86 RTC directly need to acquire
      rtc_lock, so it makes sense to push the locking down into the
      rtc, vrtc and efi code.
      
      The virtualization implementations don't require rtc_lock to be
      held because they provide their own serialization.
      
      Signed-off-by: default avatarMatt Fleming <matt.fleming@intel.com>
      Acked-by: default avatarJan Beulich <jbeulich@novell.com>
      Acked-by: Avi Kivity <avi@redhat.com> [for the virtualization aspect]
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Zhang Rui <rui.zhang@intel.com>
      Cc: Josh Boyer <jwboyer@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      47997d75
    • Jack Steiner's avatar
      x86: uv2: Workaround for UV2 Hub bug (system global address format) · 6a469e46
      Jack Steiner authored
      
      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: default avatarJack Steiner <steiner@sgi.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: <stable@kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      6a469e46
    • Ed Wildgoose's avatar
      x86: geode: New PCEngines Alix system driver · d4f3e350
      Ed Wildgoose authored
      
      This new driver replaces the old PCEngines Alix 2/3 LED driver with a
      new driver that controls the LEDs through the leds-gpio driver. The
      old driver accessed GPIOs directly, which created a conflict and
      prevented also loading the cs5535-gpio driver to read other GPIOs on
      the Alix board. With this new driver, we hook into leds-gpio which in
      turn uses GPIO to control the LEDs and therefore it's possible to
      control both the LEDs and access onboard GPIOs
      
      Driver is moved to platform/geode as requested by Grant and any other
      geode initialisation modules should move here also
      
      This driver is inspired by leds-net5501.c by Alessandro Zummo.
      
      Ideally, leds-net5501.c should also be moved to platform/geode. 
      Additionally the driver relies on parts of the patch: 7f131cf3 ("leds:
      leds-alix2c - take port address from MSR) by Daniel Mack to perform
      detection of the Alix board.
      
      [akpm@linux-foundation.org: include module.h]
      
      Signed-off-by: default avatarEd Wildgoose <kernel@wildgooses.com>
      Cc: git@wildgooses.com
      Cc: Alessandro Zummo <a.zummo@towertech.it>
      Cc: Daniel Mack <daniel@caiaq.de>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Richard Purdie <rpurdie@rpsys.net>
      Reviewed-by: default avatarGrant Likely <grant.likely@secretlab.ca>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      d4f3e350
  4. Aug 26, 2011
  5. Aug 05, 2011
    • Paul Fox's avatar
      x86, olpc: Wait for last byte of EC command to be accepted · a3ea14df
      Paul Fox authored
      
      When executing EC commands, only waiting when there are still
      more bytes to write is usually fine. However, if the system
      suspends very quickly after a call to olpc_ec_cmd(), the last
      data byte may not yet be transferred to the EC, and the command
      will not complete.
      
      This solves a bug where the SCI wakeup mask was not correctly
      written when going into suspend.
      
      It means that sometimes, on XO-1.5 (but not XO-1), the
      devices that were marked as wakeup sources can't wake up
      the system. e.g. you ask for wifi wakeups, suspend, but then
      incoming wifi frames don't wake up the system as they should.
      
      Signed-off-by: default avatarPaul Fox <pgf@laptop.org>
      Signed-off-by: default avatarDaniel Drake <dsd@laptop.org>
      Acked-by: default avatarAndres Salomon <dilinger@queued.net>
      Cc: <stable@kernel.org>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      a3ea14df
  6. Aug 04, 2011
    • Len Brown's avatar
      mrst_pmu: driver for Intel Moorestown Power Management Unit · 6dccf9c5
      Len Brown authored
      
      The Moorestown (MRST) Power Management Unit (PMU) driver
      directs the SOC power states in the "Langwell" south complex (SCU).
      
      It hooks pci_platform_pm_ops[] and thus observes all PCI ".set_state"
      requests.  For devices in the SC, the pmu driver translates those
      PCI requests into the appropriate commands for the SCU.
      
      The PMU driver helps implement S0i3, a deep system idle power idle state.
      Entry into S0i3 is via cpuidle, just like regular processor c-states.
      S0i3 depends on pre-conditions including uni-processor, graphics off,
      and certain IO devices in the SC must be off.  If those pre-conditions
      are met, then the PMU allows cpuidle to enter S0i3, otherwise such requests
      are demoted, either to Atom C4 or Atom C6.
      
      This driver is based on prototype work by Bruce Flemming,
      Illyas Mansoor, Rajeev D. Muralidhar, Vishwesh M. Rudramuni,
      Hari Seshadri and Sujith Thomas.  The current driver also
      includes contributions from H. Peter Anvin, Arjan van de Ven,
      Kristen Accardi, and Yong Wang.
      
      Thanks for additional review feedback from Alan Cox and Randy Dunlap.
      
      Acked-by: default avatarAlan Cox <alan@linux.intel.com>
      Acked-by: default avatarH. Peter Anvin <hpa@linux.intel.com>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      6dccf9c5
  7. Jul 24, 2011
  8. Jul 21, 2011
  9. Jul 07, 2011
  10. Jul 06, 2011
  11. Jul 05, 2011
  12. Jun 21, 2011
  13. Jun 18, 2011
  14. Jun 06, 2011
  15. May 26, 2011
    • 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.com
      
      
      Signed-off-by: default avatarH. Peter Anvin <hpa@linux.intel.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: <stable@kernel.org>
      916f676f
  16. May 25, 2011
    • 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.com
      
      
      Signed-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.com
      
      
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      2a919596
  17. May 12, 2011
    • Cliff Wickman's avatar
      x86: Fix UV BAU for non-consecutive nasids · 77ed23f8
      Cliff Wickman authored
      
      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: default avatarCliff Wickman <cpw@sgi.com>
      Cc: <stable@kernel.org>
      Link: http://lkml.kernel.org/r/E1QJmxX-0002Mz-Fk@eag09.americas.sgi.com
      
      
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      77ed23f8
  18. May 09, 2011
Loading