1. 05 6月, 2014 2 次提交
    • L
      memory-hotplug: update documentation to hide information about SECTIONS and remove end_phys_index · 56a3c655
      Li Zhong 提交于
      Seems we all agree that information about SECTION, e.g. section size,
      sections per memory block should be kept as kernel internals, and not
      exposed to userspace.
      
      This patch updates Documentation/memory-hotplug.txt to refer to memory
      blocks instead of memory sections where appropriate and added a
      paragraph to explain that memory blocks are made of memory sections.
      The documentation update is mostly provided by Nathan.
      
      Also, as end_phys_index in code is actually not the end section id, but
      the end memory block id, which should always be the same as phys_index.
      So it is removed here.
      Signed-off-by: NLi Zhong <zhong@linux.vnet.ibm.com>
      Reviewed-by: NZhang Yanfei <zhangyanfei@cn.fujitsu.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      56a3c655
    • A
      cma: add placement specifier for "cma=" kernel parameter · 5ea3b1b2
      Akinobu Mita 提交于
      Currently, "cma=" kernel parameter is used to specify the size of CMA,
      but we can't specify where it is located.  We want to locate CMA below
      4GB for devices only supporting 32-bit addressing on 64-bit systems
      without iommu.
      
      This enables to specify the placement of CMA by extending "cma=" kernel
      parameter.
      
      Examples:
       1. locate 64MB CMA below 4GB by "cma=64M@0-4G"
       2. locate 64MB CMA exact at 512MB by "cma=64M@512M"
      
      Note that the DMA contiguous memory allocator on x86 assumes that
      page_address() works for the pages to allocate.  So this change requires
      to limit end address of contiguous memory area upto max_pfn_mapped to
      prevent from locating it on highmem area by the argument of
      dma_contiguous_reserve().
      Signed-off-by: NAkinobu Mita <akinobu.mita@gmail.com>
      Cc: Marek Szyprowski <m.szyprowski@samsung.com>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Don Dutile <ddutile@redhat.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      5ea3b1b2
  2. 30 5月, 2014 1 次提交
  3. 29 5月, 2014 1 次提交
  4. 28 5月, 2014 4 次提交
  5. 27 5月, 2014 1 次提交
  6. 26 5月, 2014 2 次提交
  7. 24 5月, 2014 1 次提交
  8. 23 5月, 2014 1 次提交
    • G
      of/irq: do irq resolution in platform_get_irq_byname() · ad69674e
      Grygorii Strashko 提交于
      The commit 9ec36caf
      "of/irq: do irq resolution in platform_get_irq" from Rob Herring -
      moves resolving of the interrupt resources in platform_get_irq().
      But this solution isn't complete because platform_get_irq_byname()
      need to be modified the same way.
      
      Hence, fix it by adding interrupt resolution code at the
      platform_get_irq_byname() function too.
      
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Rob Herring <robh@kernel.org>
      Cc: Tony Lindgren <tony@atomide.com>
      Cc: Grant Likely <grant.likely@linaro.org>
      Cc: Thierry Reding <thierry.reding@gmail.com>
      Signed-off-by: NGrygorii Strashko <grygorii.strashko@ti.com>
      Signed-off-by: NGrant Likely <grant.likely@linaro.org>
      ad69674e
  9. 22 5月, 2014 1 次提交
  10. 21 5月, 2014 1 次提交
  11. 20 5月, 2014 1 次提交
  12. 17 5月, 2014 1 次提交
    • R
      PM / sleep: Mechanism to avoid resuming runtime-suspended devices unnecessarily · aae4518b
      Rafael J. Wysocki 提交于
      Currently, some subsystems (e.g. PCI and the ACPI PM domain) have to
      resume all runtime-suspended devices during system suspend, mostly
      because those devices may need to be reprogrammed due to different
      wakeup settings for system sleep and for runtime PM.
      
      For some devices, though, it's OK to remain in runtime suspend
      throughout a complete system suspend/resume cycle (if the device was in
      runtime suspend at the start of the cycle).  We would like to do this
      whenever possible, to avoid the overhead of extra power-up and power-down
      events.
      
      However, problems may arise because the device's descendants may require
      it to be at full power at various points during the cycle.  Therefore the
      most straightforward way to do this safely is if the device and all its
      descendants can remain runtime suspended until the complete stage of
      system resume.
      
      To this end, introduce a new device PM flag, power.direct_complete
      and modify the PM core to use that flag as follows.
      
      If the ->prepare() callback of a device returns a positive number,
      the PM core will regard that as an indication that it may leave the
      device runtime-suspended.  It will then check if the system power
      transition in progress is a suspend (and not hibernation in particular)
      and if the device is, indeed, runtime-suspended.  In that case, the PM
      core will set the device's power.direct_complete flag.  Otherwise it
      will clear power.direct_complete for the device and it also will later
      clear it for the device's parent (if there's one).
      
      Next, the PM core will not invoke the ->suspend() ->suspend_late(),
      ->suspend_irq(), ->resume_irq(), ->resume_early(), or ->resume()
      callbacks for all devices having power.direct_complete set.  It
      will invoke their ->complete() callbacks, however, and those
      callbacks are then responsible for resuming the devices as
      appropriate, if necessary.  For example, in some cases they may
      need to queue up runtime resume requests for the devices using
      pm_request_resume().
      
      Changelog partly based on an Alan Stern's description of the idea
      (http://marc.info/?l=linux-pm&m=139940466625569&w=2).
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      aae4518b
  13. 15 5月, 2014 1 次提交
    • L
      cma: Remove potential deadlock situation · 7ee793a6
      Laura Abbott 提交于
      CMA locking is currently very coarse. The cma_mutex protects both
      the bitmap and avoids concurrency with alloc_contig_range. There
      are several situations which may result in a deadlock on the CMA
      mutex currently, mostly involving AB/BA situations with alloc and
      free. Fix this issue by protecting the bitmap with a mutex per CMA
      region and use the existing mutex for protecting against concurrency
      with alloc_contig_range.
      Signed-off-by: NLaura Abbott <lauraa@codeaurora.org>
      Signed-off-by: NMarek Szyprowski <m.szyprowski@samsung.com>
      7ee793a6
  14. 07 5月, 2014 2 次提交
    • N
      PM / OPP: Move cpufreq specific OPP functions out of generic OPP library · a0dd7b79
      Nishanth Menon 提交于
      CPUFreq specific helper functions for OPP (Operating Performance Points)
      now use generic OPP functions that allow CPUFreq to be be moved back
      into CPUFreq framework. This allows for independent modifications
      or future enhancements as needed isolated to just CPUFreq framework
      alone.
      
      Here, we just move relevant code and documentation to make this part of
      CPUFreq infrastructure.
      
      Cc: Kevin Hilman <khilman@deeprootsystems.com>
      Signed-off-by: NNishanth Menon <nm@ti.com>
      Acked-by: NViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      a0dd7b79
    • N
      PM / OPP: Remove cpufreq wrapper dependency on internal data organization · 0f5c890e
      Nishanth Menon 提交于
      CPUFREQ custom functions for OPP (Operating Performance Points)
      currently exist inside the OPP library. These custom functions currently
      depend on internal data structures to pick up OPP information to create
      the cpufreq table.  For example, the cpufreq table is created precisely
      in the same order of how OPP entries are stored inside the list implementation.
      
      This kind of tight interdependency is purely artificial since the same
      functionality can be achieved using the generic OPP functions
      meant to do the same. This interdependency also limits the independent
      modification of cpufreq and OPP library.
      
      So use the generic dev_pm_opp_find_freq_ceil function that achieves the
      table organization as we currently use.
      
      As a result of this, we dont need to use the internal device_opp
      structure anymore, and we hence we can switch over to rcu lock instead
      of the mutex holding the internal list lock.
      
      This breaking of dependency on internal data structure imposes no change
      to usage of these.
      
      NOTE: This change is a precursor to moving this cpufreq specific logic
      out of the generic library into cpufreq.
      
      Cc: Kevin Hilman <khilman@deeprootsystems.com>
      Signed-off-by: NNishanth Menon <nm@ti.com>
      Acked-by: NViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      0f5c890e
  15. 05 5月, 2014 1 次提交
  16. 01 5月, 2014 2 次提交
  17. 30 4月, 2014 1 次提交
  18. 29 4月, 2014 1 次提交
    • G
      drivercore: deferral race condition fix · 58b116bc
      Grant Likely 提交于
      When the kernel is built with CONFIG_PREEMPT it is possible to reach a state
      when all modules loaded but some driver still stuck in the deferred list
      and there is a need for external event to kick the deferred queue to probe
      these drivers.
      
      The issue has been observed on embedded systems with CONFIG_PREEMPT enabled,
      audio support built as modules and using nfsroot for root filesystem.
      
      The following log fragment shows such sequence when all audio modules
      were loaded but the sound card is not present since the machine driver has
      failed to probe due to missing dependency during it's probe.
      The board is am335x-evmsk (McASP<->tlv320aic3106 codec) with davinci-evm
      machine driver:
      
      ...
      [   12.615118] davinci-mcasp 4803c000.mcasp: davinci_mcasp_probe: ENTER
      [   12.719969] davinci_evm sound.3: davinci_evm_probe: ENTER
      [   12.725753] davinci_evm sound.3: davinci_evm_probe: snd_soc_register_card
      [   12.753846] davinci-mcasp 4803c000.mcasp: davinci_mcasp_probe: snd_soc_register_component
      [   12.922051] davinci-mcasp 4803c000.mcasp: davinci_mcasp_probe: snd_soc_register_component DONE
      [   12.950839] davinci_evm sound.3: ASoC: platform (null) not registered
      [   12.957898] davinci_evm sound.3: davinci_evm_probe: snd_soc_register_card DONE (-517)
      [   13.099026] davinci-mcasp 4803c000.mcasp: Kicking the deferred list
      [   13.177838] davinci-mcasp 4803c000.mcasp: really_probe: probe_count = 2
      [   13.194130] davinci_evm sound.3: snd_soc_register_card failed (-517)
      [   13.346755] davinci_mcasp_driver_init: LEAVE
      [   13.377446] platform sound.3: Driver davinci_evm requests probe deferral
      [   13.592527] platform sound.3: really_probe: probe_count = 0
      
      In the log the machine driver enters it's probe at 12.719969 (this point it
      has been removed from the deferred lists). McASP driver already executing
      it's probing (since 12.615118).
      The machine driver tries to construct the sound card (12.950839) but did
      not found one of the components so it fails. After this McASP driver
      registers all the ASoC components (the machine driver still in it's probe
      function after it failed to construct the card) and the deferred work is
      prepared at 13.099026 (note that this time the machine driver is not in the
      lists so it is not going to be handled when the work is executing).
      Lastly the machine driver exit from it's probe and the core places it to
      the deferred list but there will be no other driver going to load and the
      deferred queue is not going to be kicked again - till we have external event
      like connecting USB stick, etc.
      
      The proposed solution is to try the deferred queue once more when the last
      driver is asking for deferring and we had drivers loaded while this last
      driver was probing.
      
      This way we can avoid drivers stuck in the deferred queue.
      Signed-off-by: NGrant Likely <grant.likely@linaro.org>
      Reviewed-by: NPeter Ujfalusi <peter.ujfalusi@ti.com>
      Tested-by: NPeter Ujfalusi <peter.ujfalusi@ti.com>
      Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Mark Brown <broonie@kernel.org>
      Cc: Stable <stable@vger.kernel.org> # v3.4+
      58b116bc
  19. 26 4月, 2014 1 次提交
  20. 25 4月, 2014 1 次提交
    • R
      of/irq: do irq resolution in platform_get_irq · 9ec36caf
      Rob Herring 提交于
      Currently we get the following kind of errors if we try to use interrupt
      phandles to irqchips that have not yet initialized:
      
      irq: no irq domain found for /ocp/pinmux@48002030 !
      ------------[ cut here ]------------
      WARNING: CPU: 0 PID: 1 at drivers/of/platform.c:171 of_device_alloc+0x144/0x184()
      Modules linked in:
      CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.12.0-00038-g42a9708 #1012
      (show_stack+0x14/0x1c)
      (dump_stack+0x6c/0xa0)
      (warn_slowpath_common+0x64/0x84)
      (warn_slowpath_null+0x1c/0x24)
      (of_device_alloc+0x144/0x184)
      (of_platform_device_create_pdata+0x44/0x9c)
      (of_platform_bus_create+0xd0/0x170)
      (of_platform_bus_create+0x12c/0x170)
      (of_platform_populate+0x60/0x98)
      
      This is because we're wrongly trying to populate resources that are not
      yet available. It's perfectly valid to create irqchips dynamically, so
      let's fix up the issue by resolving the interrupt resources when
      platform_get_irq is called.
      
      And then we also need to accept the fact that some irqdomains do not
      exist that early on, and only get initialized later on. So we can
      make the current WARN_ON into just into a pr_debug().
      
      We still attempt to populate irq resources when we create the devices.
      This allows current drivers which don't use platform_get_irq to continue
      to function. Once all drivers are fixed, this code can be removed.
      Suggested-by: NRussell King <linux@arm.linux.org.uk>
      Signed-off-by: NRob Herring <robh@kernel.org>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      Tested-by: NTony Lindgren <tony@atomide.com>
      Cc: stable@vger.kernel.org # v3.10+
      Signed-off-by: NGrant Likely <grant.likely@linaro.org>
      9ec36caf
  21. 22 4月, 2014 1 次提交
  22. 18 4月, 2014 2 次提交
  23. 17 4月, 2014 3 次提交
  24. 14 4月, 2014 3 次提交
  25. 07 4月, 2014 1 次提交
  26. 01 4月, 2014 1 次提交
  27. 28 3月, 2014 1 次提交
  28. 27 3月, 2014 1 次提交