1. 10 9月, 2016 4 次提交
  2. 31 8月, 2016 5 次提交
    • L
      ACPI / EC: Enable event freeze mode to improve event handling for suspend process · d3028305
      Lv Zheng 提交于
      This patch enables the event freeze mode, flushing the EC event handling in
      .suspend() callback. This feature is experimental, if it is bisected out to
      be the cause of the real issues, please report the issues to the kernel
      bugzilla for further root causing and improvement.
      
      This mode eliminates useless _Qxx handling during the power saving
      operations, thus can help to tune the power saving operations faster. Tests
      show that this mode can efficiently block flooding _Qxx during the suspend
      process and tune the speed of the suspend faster.
      Signed-off-by: NLv Zheng <lv.zheng@intel.com>
      Tested-by: NTodd E Brandt <todd.e.brandt@linux.intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      d3028305
    • L
      ACPI / EC: Add PM operations to improve event handling for suspend process · 39a2a2aa
      Lv Zheng 提交于
      In the original EC driver, though the event handling is not explicitly
      stopped, the EC driver is actually not able to handle events during the
      noirq stage as the EC driver is not prepared to handle the EC events in the
      polling mode. So if there is no advance_transaction() triggered, the EC
      driver couldn't notice the EC events.
      However, do we actually need to handle EC events during suspend/resume
      stage? EC events are mostly useless for the suspend/resume period (key
      strokes and battery/thermal updates, etc.,), and the useful ones (lid
      close, power/sleep button press) should have already been delivered to the
      OSPM to trigger the power saving operations.
      Thus this patch implements acpi_ec_disable_event() to be a reverse call of
      acpi_ec_enable_event(), with which, the EC driver is able to stop handling
      the EC events in a position before entering the noirq stage.
      
      Since there are actually 2 choices for us:
      1. implement event handling in polling mode;
      2. stop event handling before entering noirq stage.
      And this patch only implements the second choice using .suspend() callback.
      Thus this is experimental (first choice is better? or different hook
      position is better?). This patch finally keeps the old behavior by default
      and prepares a boot parameter to enable this feature.
      
      The differences of the event handling availability between the old behavior
      (this patch is not applied) and the new behavior (this patch is applied)
      are as follows:
                              !FreezeEvents   FreezeEvents
      before suspend          Y               Y
      suspend before EC       Y               Y
      suspend after EC        Y               N
      suspend_late            Y               N
      suspend_noirq           Y (actually N)  N
      resume_noirq            Y (actually N)  N
      resume_late             Y (actually N)  N
      resume before EC        Y (actually N)  N
      resume after EC         Y               Y
      after resume            Y               Y
      Where "actually N" means if there is no EC transactions, the EC driver
      is actually not able to notice the pending events.
      
      We can see that FreezeEvents is the only approach now can actually flush
      the EC event handling with both query commands and _Qxx evaluations
      flushed, other modes can only flush the EC event handling with only query
      commands flushed, _Qxx evaluations occurred after stopping the EC driver
      may end up failure due to the failure of the EC transaction carried out in
      the _Qxx control methods.
      
      We also can see that this feature should be able to trigger some platform
      notifications later than resuming other drivers.
      Signed-off-by: NLv Zheng <lv.zheng@intel.com>
      Tested-by: NTodd E Brandt <todd.e.brandt@linux.intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      39a2a2aa
    • L
      ACPI / EC: Add PM operations to improve event handling for resume process · c2b46d67
      Lv Zheng 提交于
      This patch makes 2 changes:
      
      1. Restore old behavior
      Originally, EC driver stops handling both events and transactions in
      acpi_ec_block_transactions(), and restarts to handle transactions in
      acpi_ec_unblock_transactions_early(), restarts to handle both events and
      transactions in acpi_ec_unblock_transactions().
      While currently, EC driver still stops handling both events and
      transactions in acpi_ec_block_transactions(), but restarts to handle both
      events and transactions in acpi_ec_unblock_transactions_early().
      This patch tries to restore the old behavior by dropping
      __acpi_ec_enable_event() from acpi_unblock_transactions_early().
      
      2. Improve old behavior
      However this still cannot fix the real issue as both of the
      acpi_ec_unblock_xxx() functions are invoked in the noirq stage. Since the
      EC driver actually doesn't implement the event handling in the polling
      mode, re-enabling the event handling too early in the noirq stage could
      result in the problem that if there is no triggering source causing
      advance_transaction() to be invoked, pending SCI_EVT cannot be detected by
      the EC driver and _Qxx cannot be triggered.
      It actually makes sense to restart the event handling in any point during
      resuming after the noirq stage. Just like the boot stage where the event
      handling is enabled in .add(), this patch further moves
      acpi_ec_enable_event() to .resume(). After doing that, the following 2
      functions can be combined:
      acpi_ec_unblock_transactions_early()/acpi_ec_unblock_transactions().
      
      The differences of the event handling availability between the old behavior
      (this patch isn't applied) and the new behavior (this patch is applied) are
      as follows:
                              !Applied        Applied
      before suspend          Y               Y
      suspend before EC       Y               Y
      suspend after EC        Y               Y
      suspend_late            Y               Y
      suspend_noirq           Y (actually N)  Y (actually N)
      resume_noirq            Y (actually N)  Y (actually N)
      resume_late             Y (actually N)  Y (actually N)
      resume before EC        Y (actually N)  Y (actually N)
      resume after EC         Y (actually N)  Y
      after resume            Y (actually N)  Y
      Where "actually N" means if there is no triggering source, the EC driver
      is actually not able to notice the pending SCI_EVT occurred in the noirq
      stage. So we can clearly see that this patch has improved the situation.
      Signed-off-by: NLv Zheng <lv.zheng@intel.com>
      Tested-by: NTodd E Brandt <todd.e.brandt@linux.intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      c2b46d67
    • L
      ACPI / EC: Fix an issue that SCI_EVT cannot be detected after event is enabled · e923e8e7
      Lv Zheng 提交于
      After enabling the EC event handling, Linux is still in the noirq stage, if
      there is no triggering source (EC transaction, GPE STS status),
      advance_transaction() will not be invoked and SCI_EVT cannot be detected.
      This patch adds one more triggering source after enabling the EC event
      handling to poll the pending SCI_EVT.
      
      Known issues:
      1. Still no SCI_EVT triggering source
         There could still be no SCI_EVT triggering source after handling the
         first SCI_EVT (polled by this patch if any). Because after handling the
         first SCI_EVT, Linux could still be in noirq stage and there could still
         be no further triggering source in this stage. Then the second SCI_EVT
         indicated during this stage still cannot be detected by the EC driver.
         With this improvement applied, it is then possible to move
         acpi_ec_enable_event() out of the noirq stage to fix this issue (if the
         first SCI_EVT is handled out of the noirq stage, the follow-up SCI_EVTs
         should be able to trigger IRQs).
      Signed-off-by: NLv Zheng <lv.zheng@intel.com>
      Tested-by: NTodd E Brandt <todd.e.brandt@linux.intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      e923e8e7
    • L
      ACPI / EC: Add EC_FLAGS_QUERY_ENABLED to reveal a hidden logic · 750f628b
      Lv Zheng 提交于
      There is a hidden logic in the EC driver:
      1. During boot, EC_FLAGS_QUERY_PENDING is responsible for blocking event
         handling;
      2. During suspend, EC_FLAGS_STARTED is responsible for blocking event
         handling.
      This patch uses a new EC_FLAGS_QUERY_ENABLED flag to make this hidden
      logic explicit and have code cleaned up. No functional change.
      Signed-off-by: NLv Zheng <lv.zheng@intel.com>
      Tested-by: NTodd E Brandt <todd.e.brandt@linux.intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      750f628b
  3. 17 8月, 2016 1 次提交
  4. 09 8月, 2016 1 次提交
  5. 04 8月, 2016 1 次提交
  6. 03 8月, 2016 2 次提交
  7. 24 7月, 2016 3 次提交
    • V
      nfit: do an ARS scrub on hitting a latent media error · 6839a6d9
      Vishal Verma 提交于
      When a latent (unknown to 'badblocks') error is encountered, it will
      trigger a machine check exception. On a system with machine check
      recovery, this will only SIGBUS the process(es) which had the bad page
      mapped (as opposed to a kernel panic on platforms without machine
      check recovery features). In the former case, we want to trigger a full
      rescan of that nvdimm bus. This will allow any additional, new errors
      to be captured in the block devices' badblocks lists, and offending
      operations on them can be trapped early, avoiding machine checks.
      
      This is done by registering a callback function with the
      x86_mce_decoder_chain and calling the new ars_rescan functionality with
      the address in the mce notificatiion.
      
      Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Signed-off-by: NVishal Verma <vishal.l.verma@intel.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      6839a6d9
    • D
      nfit: move to nfit/ sub-directory · bdf97013
      Dan Williams 提交于
      With the arrival of x86-machine-check support the nfit driver will add a
      (conditionally-compiled) source file.  Prepare for this by moving all
      nfit source to drivers/acpi/nfit/.  This is pure code movement, no
      functional changes.
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      bdf97013
    • V
      nfit, libnvdimm: allow an ARS scrub to be triggered on demand · 37b137ff
      Vishal Verma 提交于
      Normally, an ARS (Address Range Scrub) only happens at
      boot/initialization time. There can however arise situations where a
      bus-wide rescan is needed - notably, in the case of discovering a latent
      media error, we should do a full rescan to figure out what other sectors
      are bad, and thus potentially avoid triggering an mce on them in the
      future. Also provide a sysfs trigger to start a bus-wide scrub.
      
      Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
      Signed-off-by: NVishal Verma <vishal.l.verma@intel.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      37b137ff
  8. 23 7月, 2016 1 次提交
  9. 22 7月, 2016 7 次提交
    • D
      libnvdimm: move ->module to struct nvdimm_bus_descriptor · bc9775d8
      Dan Williams 提交于
      Let the provider module be explicitly passed in rather than implicitly
      assumed by the module that calls nvdimm_bus_register().  This is in
      preparation for unifying the nfit and nfit_test driver teardown paths.
      Reviewed-by: NLee, Chun-Yi <jlee@suse.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      bc9775d8
    • S
      ACPI: enable ACPI_PROCESSOR_IDLE on ARM64 · 8fc85c6a
      Sudeep Holla 提交于
      Now that ACPI processor idle driver supports LPI(Low Power Idle), lets
      enable ACPI_PROCESSOR_IDLE for ARM64 too.
      
      This patch just removes the IA64 and X86 dependency on ACPI_PROCESSOR_IDLE
      Signed-off-by: NSudeep Holla <sudeep.holla@arm.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      8fc85c6a
    • S
      ACPI / processor_idle: Add support for Low Power Idle(LPI) states · a36a7fec
      Sudeep Holla 提交于
      ACPI 6.0 introduced an optional object _LPI that provides an alternate
      method to describe Low Power Idle states. It defines the local power
      states for each node in a hierarchical processor topology. The OSPM can
      use _LPI object to select a local power state for each level of processor
      hierarchy in the system. They used to produce a composite power state
      request that is presented to the platform by the OSPM.
      
      Since multiple processors affect the idle state for any non-leaf hierarchy
      node, coordination of idle state requests between the processors is
      required. ACPI supports two different coordination schemes: Platform
      coordinated and  OS initiated.
      
      This patch adds initial support for Platform coordination scheme of LPI.
      Signed-off-by: NSudeep Holla <sudeep.holla@arm.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      a36a7fec
    • S
      ACPI / processor_idle: introduce ACPI_PROCESSOR_CSTATE · 35ae7133
      Sudeep Holla 提交于
      ACPI 6.0 adds a new method to specify the CPU idle states(C-states)
      called Low Power Idle(LPI) states. Since new architectures like ARM64
      use only LPIs, introduce ACPI_PROCESSOR_CSTATE to encapsulate all the
      code supporting the old style C-states(_CST).
      
      This patch will help to extend the processor_idle module to support
      LPI.
      Signed-off-by: NSudeep Holla <sudeep.holla@arm.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      35ae7133
    • D
      nfit: cleanup acpi_nfit_init calling convention · e7a11b44
      Dan Williams 提交于
      Pass the nfit buffer as a parameter rather than hanging it off of
      acpi_desc.
      Reviewed-by: N"Lee, Chun-Yi" <jlee@suse.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      e7a11b44
    • D
      nfit: fix _FIT evaluation memory leak + use after free · 31932041
      Dan Williams 提交于
      acpi_evaluate_object() allocates memory. Free the buffer allocated
      during acpi_nfit_add(). In order for this memory to be freed
      acpi_nfit_init() needs to be converted to duplicate the nfit contents in
      its internal allocation.  Use zero-length arrays to minimize the thrash
      with the rest of the nfit driver implementation.
      
      All of the add_<nfit-sub-table>() routines now validate a minimum table
      size and expect hotplugged tables to match the size of the original
      table to count as a duplicate. For variable length tables, like 'idt'
      and 'flush', we calculate the dynamic size. Note that hotplug by
      definition cannot change the interleave as it would cause data
      corruption of in-use namespaces.
      
      Cc: Vishal Verma <vishal.l.verma@intel.com>
      Reported-by: NXiao Guangrong <guangrong.xiao@intel.com>
      Reported-by: NHaozhong Zhang <haozhong.zhang@intel.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      31932041
    • L
      acpi, nfit: treat virtual ramdisk SPA as pmem region · c2f32acd
      Lee, Chun-Yi 提交于
      This patch adds logic to treat virtual ramdisk SPA as pmem region, then
      ramdisk's /dev/pmem* device can be mounted with iso9660.
      
      It's useful to work with the httpboot in EFI firmware to pull a remote
      ISO file to the local memory region for booting and installation.
      
      Wiki page of UEFI HTTPBoot with OVMF:
      	https://en.opensuse.org/UEFI_HTTPBoot_with_OVMF
      
      The ramdisk function in EDK2/OVMF generates a ACPI0012 root device that
      it contains empty _STA but without _DSM:
      
      DefinitionBlock ("ssdt2.aml", "SSDT", 2, "INTEL ", "RamDisk ", 0x00001000)
      {
          Scope (\_SB)
          {
              Device (NVDR)
              {
                  Name (_HID, "ACPI0012")  // _HID: Hardware ID
                  Name (_STR, Unicode ("NVDIMM Root Device"))  // _STR: Description String
                  Method (_STA, 0, NotSerialized)  // _STA: Status
                  {
                      Return (0x0F)
                  }
              }
          }
      }
      
      In section 5.2.25.2 of ACPI 6.1 spec, it mentions that the "SPA Range
      Structure Index" of virtual SPA shall be set to zero. That means virtual SPA
      will not be associated by any NVDIMM region mapping.
      
      The VCD's SPA Range Structure in NFIT is similar to virtual disk region
      as following:
      
      [028h 0040   2]                Subtable Type : 0000 [System Physical Address Range]
      [02Ah 0042   2]                       Length : 0038
      
      [02Ch 0044   2]                  Range Index : 0000
      [02Eh 0046   2]        Flags (decoded below) : 0000
                         Add/Online Operation Only : 0
                            Proximity Domain Valid : 0
      [030h 0048   4]                     Reserved : 00000000
      [034h 0052   4]             Proximity Domain : 00000000
      [038h 0056  16]           Address Range GUID : 77AB535A-45FC-624B-5560-F7B281D1F96E
      [048h 0072   8]           Address Range Base : 00000000B6ABD018
      [050h 0080   8]         Address Range Length : 0000000005500000
      [058h 0088   8]         Memory Map Attribute : 0000000000000000
      
      The way to not associate a SPA range is to never reference it from a "flush hint",
      "interleave", or "control region" table.
      
      After testing on OVMF, pmem driver can support the region that it doesn't
      assoicate to any NVDIMM mapping. So, treat VCD like pmem is a idea to get
      a pmem block device that it contains iso.
      
      v4:
      Instoduce nfit_spa_is_virtual() to check virtual ramdisk SPA and create
      pmem region.
      
      v3:
      To simplify patch, removed useless VCD region in libnvdimm.
      
      v2:
      Removed the code for setting VCD to a read-only region.
      
      Cc: Gary Lin <GLin@suse.com>
      Cc: Dan Williams <dan.j.williams@intel.com>
      Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
      Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
      Cc: Linda Knippers <linda.knippers@hpe.com>
      Signed-off-by: NLee, Chun-Yi <jlee@suse.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      c2f32acd
  10. 21 7月, 2016 2 次提交
    • S
      ACPI / DPTF: move int340x_thermal.c to the DPTF folder · c11dd70f
      Srinivas Pandruvada 提交于
      Since DPTF has its own folder under ACPI, move this file also there.
      Signed-off-by: NSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      c11dd70f
    • S
      ACPI / DPTF: Add DPTF power participant driver · 6256ebd5
      Srinivas Pandruvada 提交于
      This driver adds support for Dynamic Platform and Thermal Framework
      (DPTF) Platform Power Participant device (INT3407) support.
      
      This participant is responsible for exposing platform telemetry such as:
          max_platform_power
          platform_power_source
          adapter_rating
          battery_steady_power
          charger_type
      
      These attributes are presented via sysfs interface under the INT3407
      platform device:
      $ls /sys/bus/platform/devices/INT3407\:00/dptf_power/
          adapter_rating_mw
          battery_steady_power_mw
          charger_type
          max_platform_power_mw
          platform_power_source
          `
      ACPI methods description used in this driver:
          PMAX: Maximum platform power that can be supported by the battery in
                mW.
          PSRC: System charge source,
                  0x00 = DC
                  0x01 = AC
                  0x02 = USB
                  0x03 = Wireless Charger
          ARTG: Adapter rating in mW (Maximum Adapter power) Must be 0 if no
                AC adapter is plugged in.
          CTYP: Charger Type,
                  Traditional : 0x01
                  Hybrid: 0x02
                  NVDC: 0x03
          PBSS: Returns max sustained power for battery in milliWatts.
      
      The INT3407 also contains _BTS and _BIX objects, which are compliant to
      ACPI 5.0, specification. Those objects are already used by ACPI battery
      (PNP0C0A) driver and information about them is exported via Linux power
      supply class registration.
      Signed-off-by: NSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      6256ebd5
  11. 20 7月, 2016 1 次提交
    • D
      nfit: make DIMM DSMs optional · a7225598
      Dan Williams 提交于
      Commit 4995734e "acpi, nfit: fix acpi_check_dsm() vs zero functions
      implemented" attempted to fix a QEMU regression by supporting its usage
      of a zero-mask as a valid response to a DSM-family probe request.
      However, this behavior breaks HP platforms that return a zero-mask by
      default causing the probe to misidentify the DSM-family.
      
      Instead, the QEMU regression can be fixed by simply not requiring the DSM
      family to be identified.
      
      This effectively reverts commit 4995734e, and removes the DSM
      requirement from the init path.
      
      Cc: "Rafael J. Wysocki" <rafael@kernel.org>
      Cc: Xiao Guangrong <guangrong.xiao@linux.intel.com>
      Cc: Linda Knippers <linda.knippers@hpe.com>
      Fixes: 4995734e ("acpi, nfit: fix acpi_check_dsm() vs zero functions implemented")
      Reported-by: NJerry Hoemann <jerry.hoemann@hpe.com>
      Tested-by: NJerry Hoemann <jerry.hoemann@hpe.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      a7225598
  12. 16 7月, 2016 4 次提交
    • P
      ACPI / lpat: make it explicitly non-modular · c49b43ce
      Paul Gortmaker 提交于
      The Makefile for building this is "acpi-y" and so it is not built
      as a module.  Hence including module.h and everything that comes
      with it just for the no-op MODULE_LICENSE is rather heavy handed.
      
      The license info is found at the top of the file, so we just remove
      the MODULE_LICENSE and the include of module.h
      
      We add an include of export.h since the file exports some symbols.
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      c49b43ce
    • P
      ACPI / dock: make dock explicitly non-modular · 0f093e95
      Paul Gortmaker 提交于
      The Kconfig for this file is:
      
      drivers/acpi/Kconfig:config ACPI_DOCK
      drivers/acpi/Kconfig:   bool "Dock"
      
      ...and so it is not built as a module.  Hence including module.h
      and everything that comes with it just for the no-op MODULE_LICENSE
      and friends is rather heavy handed.
      
      The license/author info is found at the top of the file, so we
      just remove the MODULE_LICENSE etc and the include of module.h
      
      The file does still have some module_param() so we add the right
      include for that infrastructure.
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      0f093e95
    • P
      ACPI / PCI: make pci_slot explicitly non-modular · ffaab0aa
      Paul Gortmaker 提交于
      The Kconfig for this file is:
      
      drivers/acpi/Kconfig:config ACPI_PCI_SLOT
      drivers/acpi/Kconfig:   bool "PCI slot detection driver"
      
      ...and so it is not built as a module.  Hence including module.h
      and everything that comes with it just for the no-op MODULE_LICENSE
      and friends is rather heavy handed.
      
      The license/author info is found at the top of the file, so we
      just remove the MODULE_LICENSE etc and the include of module.h
      
      We delete the DRIVER_VERSION macro as well since it is unused.
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      ffaab0aa
    • P
      ACPI / PMIC: remove modular references from non-modular code · 6d3ef8d8
      Paul Gortmaker 提交于
      The Kconfig currently controlling compilation of these files are:
      
      drivers/acpi/Kconfig:menuconfig PMIC_OPREGION
      drivers/acpi/Kconfig:   bool "PMIC (Power Management Integrated Circuit) operation region support"
      
      drivers/acpi/Kconfig:config BXT_WC_PMIC_OPREGION
      drivers/acpi/Kconfig:   bool "ACPI operation region support for BXT WhiskeyCove PMIC"
      
      drivers/acpi/Kconfig:config XPOWER_PMIC_OPREGION
      drivers/acpi/Kconfig:   bool "ACPI operation region support for XPower AXP288 PMIC"
      
      ...meaning they currently are not being built as a module by anyone.
      
      Lets remove the couple traces of modular infrastructure use, so that
      when reading the code there is no doubt it is builtin-only.
      
      We delete the MODULE_LICENSE tag etc. since all that information
      is already contained at the top of the file in the comments.
      
      One file was using module_init.  Since module_init translates to
      device_initcall in the non-modular case, the init ordering remains
      unchanged with this commit.
      
      In one case we replace the module.h with export.h since that file
      is exporting some symbols, but does not use __init.  The other two
      are using __init and so module.h gets replaced with init.h there.
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      6d3ef8d8
  13. 15 7月, 2016 1 次提交
  14. 13 7月, 2016 1 次提交
    • D
      pmem: kill __pmem address space · 7a9eb206
      Dan Williams 提交于
      The __pmem address space was meant to annotate codepaths that touch
      persistent memory and need to coordinate a call to wmb_pmem().  Now that
      wmb_pmem() is gone, there is little need to keep this annotation.
      
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      7a9eb206
  15. 12 7月, 2016 3 次提交
    • D
      libnvdimm: introduce nvdimm_flush() and nvdimm_has_flush() · f284a4f2
      Dan Williams 提交于
      nvdimm_flush() is a replacement for the x86 'pcommit' instruction.  It is
      an optional write flushing mechanism that an nvdimm bus can provide for
      the pmem driver to consume.  In the case of the NFIT nvdimm-bus-provider
      nvdimm_flush() is implemented as a series of flush-hint-address [1]
      writes to each dimm in the interleave set (region) that backs the
      namespace.
      
      The nvdimm_has_flush() routine relies on platform firmware to describe
      the flushing capabilities of a platform.  It uses the heuristic of
      whether an nvdimm bus provider provides flush address data to return a
      ternary result:
      
            1: flush addresses defined
            0: dimm topology described without flush addresses (assume ADR)
       -errno: no topology information, unable to determine flush mechanism
      
      The pmem driver is expected to take the following actions on this ternary
      result:
      
            1: nvdimm_flush() in response to REQ_FUA / REQ_FLUSH and shutdown
            0: do not set, WC or FUA on the queue, take no further action
       -errno: warn and then operate as if nvdimm_has_flush() returned '0'
      
      The caveat of this heuristic is that it can not distinguish the "dimm
      does not have flush address" case from the "platform firmware is broken
      and failed to describe a flush address".  Given we are already
      explicitly trusting the NFIT there's not much more we can do beyond
      blacklisting broken firmwares if they are ever encountered.
      
      Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      f284a4f2
    • D
      libnvdimm, nfit: move flush hint mapping to region-device driver-data · e5ae3b25
      Dan Williams 提交于
      In preparation for triggering flushes of a DIMM's writes-posted-queue
      (WPQ) via the pmem driver move mapping of flush hint addresses to the
      region driver.  Since this uses devm_nvdimm_memremap() the flush
      addresses will remain mapped while any region to which the dimm belongs
      is active.
      
      We need to communicate more information to the nvdimm core to facilitate
      this mapping, namely each dimm object now carries an array of flush hint
      address resources.
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      e5ae3b25
    • D
      libnvdimm, nfit: remove nfit_spa_map() infrastructure · a8a6d2e0
      Dan Williams 提交于
      Now that all shared mappings are handled by devm_nvdimm_memremap() we no
      longer need nfit_spa_map() nor do we need to trigger a callback to the
      bus provider at region disable time.
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      a8a6d2e0
  16. 11 7月, 2016 3 次提交