04 Oct, 2016

2 commits

  • Pull tty and serial updates from Greg KH:
    "Here is the big tty and serial patch set for 4.9-rc1.

    It also includes some drivers/dma/ changes, as those were needed by
    some serial drivers, and they were all acked by the DMA maintainer.

    Also in here is the long-suffering ACPI SPCR patchset, which was
    passed around from maintainer to maintainer like a hot-potato. Seems I
    was the sucker^Wlucky one. All of those patches have been acked by the
    various subsystem maintainers as well.

    All of this has been in linux-next with no reported issues"

    * tag 'tty-4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (111 commits)
    Revert "serial: pl011: add console matching function"
    MAINTAINERS: update entry for atmel_serial driver
    serial: pl011: add console matching function
    ARM64: ACPI: enable ACPI_SPCR_TABLE
    ACPI: parse SPCR and enable matching console
    of/serial: move earlycon early_param handling to serial
    Revert "drivers/tty: Explicitly pass current to show_stack"
    tty: amba-pl011: Don't complain on -EPROBE_DEFER when no irq
    nios2: dts: 10m50: Add tx-threshold parameter
    serial: 8250: Set Altera 16550 TX FIFO Threshold
    serial: 8250: of: Load TX FIFO Threshold from DT
    Documentation: dt: serial: Add TX FIFO threshold parameter
    drivers/tty: Explicitly pass current to show_stack
    serial: imx: Fix DCD reading
    serial: stm32: mark symbols static where possible
    serial: xuartps: Add some register initialisation to cdns_early_console_setup()
    serial: xuartps: Removed unwanted checks while reading the error conditions
    serial: xuartps: Rewrite the interrupt handling logic
    serial: stm32: use mapbase instead of membase for DMA
    tty/serial: atmel: fix fractional baud rate computation
    ...

    Linus Torvalds
     
  • Pull irq updates from Thomas Gleixner:
    "The irq departement proudly presents:

    - A rework of the core infrastructure to optimally spread interrupt
    for multiqueue devices. The first version was a bit naive and
    failed to take thread siblings and other details into account.
    Developed in cooperation with Christoph and Keith.

    - Proper delegation of softirqs to ksoftirqd, so if ksoftirqd is
    active then no further softirq processsing on interrupt return
    happens. Otherwise we try to delegate and still run another batch
    of network packets in the irq return path, which then tries to
    delegate to ksoftirqd .....

    - A proper machine parseable sysfs based alternative for
    /proc/interrupts.

    - ACPI support for the GICV3-ITS and ARM interrupt remapping

    - Two new irq chips from the ARM SoC zoo: STM32-EXTI and MVEBU-PIC

    - A new irq chip for the JCore (SuperH)

    - The usual pile of small fixlets in core and irqchip drivers"

    * 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (42 commits)
    softirq: Let ksoftirqd do its job
    genirq: Make function __irq_do_set_handler() static
    ARM/dts: Add EXTI controller node to stm32f429
    ARM/STM32: Select external interrupts controller
    drivers/irqchip: Add STM32 external interrupts support
    Documentation/dt-bindings: Document STM32 EXTI controller bindings
    irqchip/mips-gic: Use for_each_set_bit to iterate over local IRQs
    pci/msi: Retrieve affinity for a vector
    genirq/affinity: Remove old irq spread infrastructure
    genirq/msi: Switch to new irq spreading infrastructure
    genirq/affinity: Provide smarter irq spreading infrastructure
    genirq/msi: Add cpumask allocation to alloc_msi_entry
    genirq: Expose interrupt information through sysfs
    irqchip/gicv3-its: Use MADT ITS subtable to do PCI/MSI domain initialization
    irqchip/gicv3-its: Factor out PCI-MSI part that might be reused for ACPI
    irqchip/gicv3-its: Probe ITS in the ACPI way
    irqchip/gicv3-its: Refactor ITS DT init code to prepare for ACPI
    irqchip/gicv3-its: Cleanup for ITS domain initialization
    PCI/MSI: Setup MSI domain on a per-device basis using IORT ACPI table
    ACPI: Add new IORT functions to support MSI domain handling
    ...

    Linus Torvalds
     

02 Oct, 2016

1 commit

  • * acpi-wdat:
    watchdog: wdat_wdt: Fix warning for using 0 as NULL
    watchdog: wdat_wdt: fix return value check in wdat_wdt_probe()
    platform/x86: intel_pmc_ipc: Do not create iTCO watchdog when WDAT table exists
    i2c: i801: Do not create iTCO watchdog when WDAT table exists
    mfd: lpc_ich: Do not create iTCO watchdog when WDAT table exists
    ACPI / watchdog: Add support for WDAT hardware watchdog

    * acpi-ec:
    ACPI / EC: Fix issues related to boot_ec
    ACPI / EC: Fix a gap that ECDT EC cannot handle EC events
    ACPI / EC: Fix a memory leakage issue in acpi_ec_add()
    ACPI / EC: Cleanup first_ec/boot_ec code
    ACPI / EC: Enable event freeze mode to improve event handling for suspend process
    ACPI / EC: Add PM operations to improve event handling for suspend process
    ACPI / EC: Add PM operations to improve event handling for resume process
    ACPI / EC: Fix an issue that SCI_EVT cannot be detected after event is enabled
    ACPI / EC: Add EC_FLAGS_QUERY_ENABLED to reveal a hidden logic
    ACPI / EC: Add PM operations for suspend/resume noirq stage

    Rafael J. Wysocki
     

28 Sep, 2016

1 commit

  • 'ARM Server Base Boot Requiremets' [1] mentions SPCR (Serial Port
    Console Redirection Table) [2] as a mandatory ACPI table that
    specifies the configuration of serial console.

    Defer initialization of DT earlycon until ACPI/DT decision is made.

    Parse the ACPI SPCR table, setup earlycon if required,
    enable specified console.

    Thanks to Peter Hurley for explaining how this should work.

    [1] http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.den0044a/index.html
    [2] https://msdn.microsoft.com/en-us/library/windows/hardware/dn639132(v=vs.85).aspx

    Signed-off-by: Aleksey Makarov
    Acked-by: Rafael J. Wysocki
    Reviewed-by: Peter Hurley
    Tested-by: Kefeng Wang
    Tested-by: Christopher Covington
    Signed-off-by: Greg Kroah-Hartman

    Aleksey Makarov
     

24 Sep, 2016

1 commit

  • Starting from Intel Skylake the iTCO watchdog timer registers were moved to
    reside in the same register space with SMBus host controller. Not all
    needed registers are available though and we need to unhide P2SB (Primary
    to Sideband) device briefly to be able to read status of required NO_REBOOT
    bit. The i2c-i801.c SMBus driver used to handle this and creation of the
    iTCO watchdog platform device.

    Windows, on the other hand, does not use the iTCO watchdog hardware
    directly even if it is available. Instead it relies on ACPI Watchdog Action
    Table (WDAT) table to describe the watchdog hardware to the OS. This table
    contains necessary information about the the hardware and also set of
    actions which are executed by a driver as needed.

    This patch implements a new watchdog driver that takes advantage of the
    ACPI WDAT table. We split the functionality into two parts: first part
    enumerates the WDAT table and if found, populates resources and creates
    platform device for the actual driver. The second part is the driver
    itself.

    The reason for the split is that this way we can make the driver itself to
    be a module and loaded automatically if the WDAT table is found. Otherwise
    the module is not loaded.

    Signed-off-by: Mika Westerberg
    Reviewed-by: Guenter Roeck
    Signed-off-by: Rafael J. Wysocki

    Mika Westerberg
     

13 Sep, 2016

1 commit

  • IORT shows representation of IO topology for ARM based systems.
    It describes how various components are connected together on
    parent-child basis e.g. PCI RC -> SMMU -> ITS. Also see IORT spec.
    http://infocenter.arm.com/help/topic/com.arm.doc.den0049b/DEN0049B_IO_Remapping_Table.pdf

    Initial support allows to detect IORT table presence and save its
    root pointer obtained through acpi_get_table(). The pointer validity
    depends on acpi_gbl_permanent_mmap because if acpi_gbl_permanent_mmap
    is not set while using IORT nodes we would dereference unmapped pointers.

    For the aforementioned reason call acpi_iort_init() from acpi_init()
    which guarantees acpi_gbl_permanent_mmap to be set at that point.

    Add generic helpers which are helpful for scanning and retrieving
    information from IORT table content. List of the most important helpers:
    - iort_find_dev_node() finds IORT node for a given device
    - iort_node_map_rid() maps device RID and returns IORT node which provides
    final translation

    IORT support is placed under drivers/acpi/arm64/ new directory due to its
    ARM64 specific nature. The code there is considered only for ARM64.
    The long term plan is to keep all ARM64 specific tables support
    in this place e.g. GTDT table.

    Signed-off-by: Tomasz Nowicki
    Acked-by: Rafael J. Wysocki
    Reviewed-by: Hanjun Guo
    Reviewed-by: Lorenzo Pieralisi
    Signed-off-by: Marc Zyngier

    Tomasz Nowicki
     

09 Sep, 2016

1 commit

  • Some newer x86 platforms have support for both _CPC and _PSS object. So
    kernel config can have both ACPI_CPU_FREQ_PSS and ACPI_CPPC_LIB. So remove
    restriction for ACPI_CPPC_LIB to build only when ACPI_CPU_FREQ_PSS is not
    defined.
    Also for legacy systems with only _PSS, we shouldn't bail out if
    acpi_cppc_processor_probe() fails, if ACPI_CPU_FREQ_PSS is also defined.

    Signed-off-by: Srinivas Pandruvada
    Signed-off-by: Rafael J. Wysocki

    Srinivas Pandruvada
     

03 Aug, 2016

1 commit

  • Pull PCI updates from Bjorn Helgaas:
    "Highlights:

    - ARM64 support for ACPI host bridges

    - new drivers for Axis ARTPEC-6 and Marvell Aardvark

    - new pci_alloc_irq_vectors() interface for MSI-X, MSI, legacy INTx

    - pci_resource_to_user() cleanup (more to come)

    Detailed summary:

    Enumeration:
    - Move ecam.h to linux/include/pci-ecam.h (Jayachandran C)
    - Add parent device field to ECAM struct pci_config_window (Jayachandran C)
    - Add generic MCFG table handling (Tomasz Nowicki)
    - Refactor pci_bus_assign_domain_nr() for CONFIG_PCI_DOMAINS_GENERIC (Tomasz Nowicki)
    - Factor DT-specific pci_bus_find_domain_nr() code out (Tomasz Nowicki)

    Resource management:
    - Add devm_request_pci_bus_resources() (Bjorn Helgaas)
    - Unify pci_resource_to_user() declarations (Bjorn Helgaas)
    - Implement pci_resource_to_user() with pcibios_resource_to_bus() (microblaze, powerpc, sparc) (Bjorn Helgaas)
    - Request host bridge window resources (designware, iproc, rcar, xgene, xilinx, xilinx-nwl) (Bjorn Helgaas)
    - Make PCI I/O space optional on ARM32 (Bjorn Helgaas)
    - Ignore write combining when mapping I/O port space (Bjorn Helgaas)
    - Claim bus resources on MIPS PCI_PROBE_ONLY set-ups (Bjorn Helgaas)
    - Remove unicore32 pci=firmware command line parameter handling (Bjorn Helgaas)
    - Support I/O resources when parsing host bridge resources (Jayachandran C)
    - Add helpers to request/release memory and I/O regions (Johannes Thumshirn)
    - Use pci_(request|release)_mem_regions (NVMe, lpfc, GenWQE, ethernet/intel, alx) (Johannes Thumshirn)
    - Extend pci=resource_alignment to specify device/vendor IDs (Koehrer Mathias (ETAS/ESW5))
    - Add generic pci_bus_claim_resources() (Lorenzo Pieralisi)
    - Claim bus resources on ARM32 PCI_PROBE_ONLY set-ups (Lorenzo Pieralisi)
    - Remove ARM32 and ARM64 arch-specific pcibios_enable_device() (Lorenzo Pieralisi)
    - Add pci_unmap_iospace() to unmap I/O resources (Sinan Kaya)
    - Remove powerpc __pci_mmap_set_pgprot() (Yinghai Lu)

    PCI device hotplug:
    - Allow additional bus numbers for hotplug bridges (Keith Busch)
    - Ignore interrupts during D3cold (Lukas Wunner)

    Power management:
    - Enforce type casting for pci_power_t (Andy Shevchenko)
    - Don't clear d3cold_allowed for PCIe ports (Mika Westerberg)
    - Put PCIe ports into D3 during suspend (Mika Westerberg)
    - Power on bridges before scanning new devices (Mika Westerberg)
    - Runtime resume bridge before rescan (Mika Westerberg)
    - Add runtime PM support for PCIe ports (Mika Westerberg)
    - Remove redundant check of pcie_set_clkpm (Shawn Lin)

    Virtualization:
    - Add function 1 DMA alias quirk for Marvell 88SE9182 (Aaron Sierra)
    - Add DMA alias quirk for Adaptec 3805 (Alex Williamson)
    - Mark Atheros AR9485 and QCA9882 to avoid bus reset (Chris Blake)
    - Add ACS quirk for Solarflare SFC9220 (Edward Cree)

    MSI:
    - Fix PCI_MSI dependencies (Arnd Bergmann)
    - Add pci_msix_desc_addr() helper (Christoph Hellwig)
    - Switch msix_program_entries() to use pci_msix_desc_addr() (Christoph Hellwig)
    - Make the "entries" argument to pci_enable_msix() optional (Christoph Hellwig)
    - Provide sensible IRQ vector alloc/free routines (Christoph Hellwig)
    - Spread interrupt vectors in pci_alloc_irq_vectors() (Christoph Hellwig)

    Error Handling:
    - Bind DPC to Root Ports as well as Downstream Ports (Keith Busch)
    - Remove DPC tristate module option (Keith Busch)
    - Convert Downstream Port Containment driver to use devm_* functions (Mika Westerberg)

    Generic host bridge driver:
    - Select IRQ_DOMAIN (Arnd Bergmann)
    - Claim bus resources on PCI_PROBE_ONLY set-ups (Lorenzo Pieralisi)

    ACPI host bridge driver:
    - Add ARM64 acpi_pci_bus_find_domain_nr() (Tomasz Nowicki)
    - Add ARM64 ACPI support for legacy IRQs parsing and consolidation with DT code (Tomasz Nowicki)
    - Implement ARM64 AML accessors for PCI_Config region (Tomasz Nowicki)
    - Support ARM64 ACPI-based PCI host controller (Tomasz Nowicki)

    Altera host bridge driver:
    - Check link status before retrain link (Ley Foon Tan)
    - Poll for link up status after retraining the link (Ley Foon Tan)

    Axis ARTPEC-6 host bridge driver:
    - Add PCI_MSI_IRQ_DOMAIN dependency (Arnd Bergmann)
    - Add DT binding for Axis ARTPEC-6 PCIe controller (Niklas Cassel)
    - Add Axis ARTPEC-6 PCIe controller driver (Niklas Cassel)

    Intel VMD host bridge driver:
    - Use lock save/restore in interrupt enable path (Jon Derrick)
    - Select device dma ops to override (Keith Busch)
    - Initialize list item in IRQ disable (Keith Busch)
    - Use x86_vector_domain as parent domain (Keith Busch)
    - Separate MSI and MSI-X vector sharing (Keith Busch)

    Marvell Aardvark host bridge driver:
    - Add DT binding for the Aardvark PCIe controller (Thomas Petazzoni)
    - Add Aardvark PCI host controller driver (Thomas Petazzoni)
    - Add Aardvark PCIe support for Armada 3700 (Thomas Petazzoni)

    Microsoft Hyper-V host bridge driver:
    - Fix interrupt cleanup path (Cathy Avery)
    - Don't leak buffer in hv_pci_onchannelcallback() (Vitaly Kuznetsov)
    - Handle all pending messages in hv_pci_onchannelcallback() (Vitaly Kuznetsov)

    NVIDIA Tegra host bridge driver:
    - Program PADS_REFCLK_CFG* always, not just on legacy SoCs (Stephen Warren)
    - Program PADS_REFCLK_CFG* registers with per-SoC values (Stephen Warren)
    - Use lower-case hex consistently for register definitions (Thierry Reding)
    - Use generic pci_remap_iospace() rather than ARM32-specific one (Thierry Reding)
    - Stop setting pcibios_min_mem (Thierry Reding)

    Renesas R-Car host bridge driver:
    - Drop gen2 dummy I/O port region (Bjorn Helgaas)

    TI DRA7xx host bridge driver:
    - Fix return value in case of error (Christophe JAILLET)

    Xilinx AXI host bridge driver:
    - Fix return value in case of error (Christophe JAILLET)

    Miscellaneous:
    - Make bus_attr_resource_alignment static (Ben Dooks)
    - Include for isa_dma_bridge_buggy (Ben Dooks)
    - MAINTAINERS: Add file patterns for PCI device tree bindings (Geert Uytterhoeven)
    - Make host bridge drivers explicitly non-modular (Paul Gortmaker)"

    * tag 'pci-v4.8-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (125 commits)
    PCI: xgene: Make explicitly non-modular
    PCI: thunder-pem: Make explicitly non-modular
    PCI: thunder-ecam: Make explicitly non-modular
    PCI: tegra: Make explicitly non-modular
    PCI: rcar-gen2: Make explicitly non-modular
    PCI: rcar: Make explicitly non-modular
    PCI: mvebu: Make explicitly non-modular
    PCI: layerscape: Make explicitly non-modular
    PCI: keystone: Make explicitly non-modular
    PCI: hisi: Make explicitly non-modular
    PCI: generic: Make explicitly non-modular
    PCI: designware-plat: Make it explicitly non-modular
    PCI: artpec6: Make explicitly non-modular
    PCI: armada8k: Make explicitly non-modular
    PCI: artpec: Add PCI_MSI_IRQ_DOMAIN dependency
    PCI: Add ACS quirk for Solarflare SFC9220
    arm64: dts: marvell: Add Aardvark PCIe support for Armada 3700
    PCI: aardvark: Add Aardvark PCI host controller driver
    dt-bindings: add DT binding for the Aardvark PCIe controller
    PCI: tegra: Program PADS_REFCLK_CFG* registers with per-SoC values
    ...

    Linus Torvalds
     

29 Jul, 2016

1 commit

  • Pull libnvdimm updates from Dan Williams:

    - Replace pcommit with ADR / directed-flushing.

    The pcommit instruction, which has not shipped on any product, is
    deprecated. Instead, the requirement is that platforms implement
    either ADR, or provide one or more flush addresses per nvdimm.

    ADR (Asynchronous DRAM Refresh) flushes data in posted write buffers
    to the memory controller on a power-fail event.

    Flush addresses are defined in ACPI 6.x as an NVDIMM Firmware
    Interface Table (NFIT) sub-structure: "Flush Hint Address Structure".
    A flush hint is an mmio address that when written and fenced assures
    that all previous posted writes targeting a given dimm have been
    flushed to media.

    - On-demand ARS (address range scrub).

    Linux uses the results of the ACPI ARS commands to track bad blocks
    in pmem devices. When latent errors are detected we re-scrub the
    media to refresh the bad block list, userspace can also request a
    re-scrub at any time.

    - Support for the Microsoft DSM (device specific method) command
    format.

    - Support for EDK2/OVMF virtual disk device memory ranges.

    - Various fixes and cleanups across the subsystem.

    * tag 'libnvdimm-for-4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: (41 commits)
    libnvdimm-btt: Delete an unnecessary check before the function call "__nd_device_register"
    nfit: do an ARS scrub on hitting a latent media error
    nfit: move to nfit/ sub-directory
    nfit, libnvdimm: allow an ARS scrub to be triggered on demand
    libnvdimm: register nvdimm_bus devices with an nd_bus driver
    pmem: clarify a debug print in pmem_clear_poison
    x86/insn: remove pcommit
    Revert "KVM: x86: add pcommit support"
    nfit, tools/testing/nvdimm/: unify shutdown paths
    libnvdimm: move ->module to struct nvdimm_bus_descriptor
    nfit: cleanup acpi_nfit_init calling convention
    nfit: fix _FIT evaluation memory leak + use after free
    tools/testing/nvdimm: add manufacturing_{date|location} dimm properties
    tools/testing/nvdimm: add virtual ramdisk range
    acpi, nfit: treat virtual ramdisk SPA as pmem region
    pmem: kill __pmem address space
    pmem: kill wmb_pmem()
    libnvdimm, pmem: use nvdimm_flush() for namespace I/O writes
    fs/dax: remove wmb_pmem()
    libnvdimm, pmem: flush posted-write queues on shutdown
    ...

    Linus Torvalds
     

25 Jul, 2016

4 commits

  • * acpi-drivers:
    ACPI / DPTF: move int340x_thermal.c to the DPTF folder
    ACPI / DPTF: Add DPTF power participant driver

    * acpi-misc:
    ACPI / lpat: make it explicitly non-modular
    ACPI / dock: make dock explicitly non-modular

    * acpi-tools:
    tools/acpi: use CROSS_COMPILE to define prefix

    Rafael J. Wysocki
     
  • * acpi-pmic:
    ACPI / PMIC: remove modular references from non-modular code
    ACPI / PMIC: intel: initialize result to 0
    ACPI / PMIC: intel: add REGS operation region support
    ACPI / PMIC: Add opregion driver for Intel BXT WhiskeyCove PMIC
    ACPI / PMIC: modify the pen function signature to take bit field

    Conflicts:
    drivers/acpi/Makefile

    Rafael J. Wysocki
     
  • * acpi-processor:
    ACPI: enable ACPI_PROCESSOR_IDLE on ARM64
    arm64: add support for ACPI Low Power Idle(LPI)
    drivers: firmware: psci: initialise idle states using ACPI LPI
    cpuidle: introduce CPU_PM_CPU_IDLE_ENTER macro for ARM{32, 64}
    arm64: cpuidle: drop __init section marker to arm_cpuidle_init
    ACPI / processor_idle: Add support for Low Power Idle(LPI) states
    ACPI / processor_idle: introduce ACPI_PROCESSOR_CSTATE

    * acpi-cppc:
    mailbox: pcc: Add PCC request and free channel declarations
    ACPI / CPPC: Prevent cpc_desc_ptr points to the invalid data
    ACPI: CPPC: Return error if _CPC is invalid on a CPU

    * acpi-apei:
    ACPI / APEI: Add Boot Error Record Table (BERT) support
    ACPI / einj: Make error paths more talkative
    ACPI / einj: Convert EINJ_PFX to proper pr_fmt

    * acpi-sleep:
    ACPI: Execute _PTS before system reboot

    Rafael J. Wysocki
     
  • * acpi-tables:
    ACPI: Rename configfs.c to acpi_configfs.c to prevent link error
    ACPI: add support for loading SSDTs via configfs
    ACPI: add support for configfs
    efi / ACPI: load SSTDs from EFI variables
    spi / ACPI: add support for ACPI reconfigure notifications
    i2c / ACPI: add support for ACPI reconfigure notifications
    ACPI: add support for ACPI reconfiguration notifiers
    ACPI / scan: fix enumeration (visited) flags for bus rescans
    ACPI / documentation: add SSDT overlays documentation
    ACPI: ARM64: support for ACPI_TABLE_UPGRADE
    ACPI / tables: introduce ARCH_HAS_ACPI_TABLE_UPGRADE
    ACPI / tables: move arch-specific symbol to asm/acpi.h
    ACPI / tables: table upgrade: refactor function definitions
    ACPI / tables: table upgrade: use cacheable map for tables

    Conflicts:
    arch/arm64/include/asm/acpi.h

    Rafael J. Wysocki
     

24 Jul, 2016

1 commit

  • 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: Dan Williams

    Dan Williams
     

22 Jul, 2016

2 commits

  • 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: Sudeep Holla
    Signed-off-by: Rafael J. Wysocki

    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: Sudeep Holla
    Signed-off-by: Rafael J. Wysocki

    Sudeep Holla
     

21 Jul, 2016

1 commit

  • 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: Srinivas Pandruvada
    Signed-off-by: Rafael J. Wysocki

    Srinivas Pandruvada
     

09 Jul, 2016

1 commit


24 Jun, 2016

1 commit


22 Jun, 2016

2 commits


11 Jun, 2016

1 commit

  • On ACPI systems that support memory-mapped config space access, i.e., ECAM,
    the PCI Firmware Specification says the OS can learn where the ECAM space
    is from either:

    - the static MCFG table (for non-hotpluggable bridges), or
    - the _CBA method (for hotpluggable bridges)

    The current MCFG table handling code cannot be easily generalized owing to
    x86-specific quirks, which makes it hard to reuse on other architectures.

    Implement generic MCFG handling from scratch, including:

    - Simple MCFG table parsing (via pci_mmcfg_late_init() as in current x86)
    - MCFG region lookup for a (domain, bus_start, bus_end) tuple

    [bhelgaas: changelog]
    Signed-off-by: Tomasz Nowicki
    Signed-off-by: Jayachandran C
    Signed-off-by: Bjorn Helgaas
    Reviewed-by: Lorenzo Pieralisi

    Tomasz Nowicki
     

16 May, 2016

1 commit

  • * acpi-pci:
    ACPI,PCI,IRQ: remove SCI penalize function
    ACPI,PCI,IRQ: remove redundant code in acpi_irq_penalty_init()
    ACPI,PCI,IRQ: reduce static IRQ array size to 16
    ACPI,PCI,IRQ: reduce resource requirements

    * acpi-misc:
    ACPI / sysfs: fix error code in get_status()
    ACPI / device_sysfs: Clean up checkpatch errors
    ACPI / device_sysfs: Change _SUN and _STA show functions error return to EIO
    ACPI / device_sysfs: Add sysfs support for _HRV hardware revision
    arm64: defconfig: Enable ACPI
    ACPI / ARM64: Remove EXPERT dependency for ACPI on ARM64
    ACPI / ARM64: Don't enable ACPI by default on ARM64
    acer-wmi: Use acpi_dev_found()
    eeepc-wmi: Use acpi_dev_found()
    ACPI / utils: Rename acpi_dev_present()

    * acpi-tools:
    tools/power/acpi: close file only if it is open

    Rafael J. Wysocki
     

27 Apr, 2016

2 commits

  • When ACPI was originally merged for arm64 it had only been tested on
    emulators and not on real physical platforms and no platforms were
    relying on it. This meant that there were concerns that there might be
    serious issues attempting to use it on practical systems so it had a
    dependency on EXPERT added to warn people that it was in an early stage
    of development with very little practical testing. Since then things
    have moved on a bit. We have seen people testing on real hardware and
    now have people starting to produce some platforms (the most prominent
    being the 96boards Cello) which only have ACPI support and which build
    and run to some useful extent with mainline.

    This is not to say that ACPI support or support for these systems is
    completely done, there are still areas being worked on such as PCI, but
    at this point it seems that we can be reasonably sure that ACPI will be
    viable for use on ARM64 and that the already merged support works for
    the cases it handles. For the AMD Seattle based platforms support
    outside of PCI has been fairly complete in mainline a few releases now.

    This is also not to say that we don't have vendors working with ACPI who
    are trying do things that we would not consider optimal but it does not
    appear that the EXPERT dependency is having a substantial impact on
    these vendors.

    Given all this it seems that at this point the EXPERT dependency mainly
    creates inconvenience for users with systems that are doing the right
    thing and gets in the way of including the ACPI code in the testing that
    people are doing on mainline. Removing it should help our ongoing
    testing cover those platforms with only ACPI support and help ensure
    that when ACPI code is merged any problems it causes for other users are
    more easily discovered.

    Signed-off-by: Mark Brown
    Acked-by: Graeme Gregory
    Acked-by: Ard Biesheuvel
    Reviewed-by: Al Stone
    Acked-by: Hanjun Guo
    Acked-by: Catalin Marinas
    Acked-by: Roy Franz
    Acked-by: Olof Johansson
    Acked-by: Timur Tabi
    Signed-off-by: Rafael J. Wysocki

    Mark Brown
     
  • If ACPI is selectable it is enabled by default. This is a good choice
    for architectures where the overwhelming majority of systems use ACPI
    like x86 and IA-64 but is less clear for architectures where it's less
    common like ARM64. Change the default selection so that it's only done
    explicitly on those architectures where ACPI is universally used.

    Signed-off-by: Mark Brown
    Acked-by: Catalin Marinas
    Acked-by: Hanjun Guo
    Acked-by: Olof Johansson
    Signed-off-by: Rafael J. Wysocki

    Mark Brown
     

19 Apr, 2016

1 commit

  • This patch converts the initrd table override mechanism to the table
    upgrade mechanism by restricting its usage to the tables released with
    compatibility and more recent revision.

    This use case has been encouraged by the ACPI specification:

    1. OEMID:
    An OEM-supplied string that identifies the OEM.

    2. OEM Table ID:
    An OEM-supplied string that the OEM uses to identify the particular data
    table. This field is particularly useful when defining a definition
    block to distinguish definition block functions. OEM assigns each
    dissimilar table a new OEM Table Id.

    3. OEM Revision:
    An OEM-supplied revision number. Larger numbers are assumed to be newer
    revisions.

    For OEMs, good practices will ensure consistency when assigning OEMID and
    OEM Table ID fields in any table. The intent of these fields is to allow
    for a binary control system that support services can use. Because many
    support function can be automated, it is useful when a tool can
    programatically determine which table release is a compatible and more
    recent revision of a prior table on the same OEMID and OEM Table ID.

    The facility can now be used by the vendors to upgrade wrong tables for bug
    fixing purpose, thus lockdep disabling taint is not suitable for it and it
    should be a default 'y' option to implement the spec encouraged use case.

    Note that, by implementing table upgrade inside of ACPICA itself, it is
    possible to remove acpi_table_initrd_override() and tables can be upgraded
    by acpi_install_table() automatically. Though current ACPICA impelentation
    hasn't implemented this, this patched changes the table flag setting timing
    to allow this to be implemented in ACPICA without changing the code here.

    Documentation of initrd override mechanism is upgraded accordingly.

    Original-by: Octavian Purdila
    Signed-off-by: Lv Zheng
    Signed-off-by: Rafael J. Wysocki

    Lv Zheng
     

15 Dec, 2015

2 commits

  • This patch converts AML debugger into a loadable module.

    Note that, it implements driver unloading at the level dependent on the
    module reference count. Which means if ACPI debugger is being used by a
    userspace program, "rmmod acpi_dbg" should result in failure.

    Signed-off-by: Lv Zheng
    Signed-off-by: Rafael J. Wysocki

    Lv Zheng
     
  • This patch adds /sys/kernel/debug/acpi/acpidbg, which can be used by
    userspace programs to access ACPICA debugger functionalities.

    Known issue:
    1. IO flush support
    acpi_os_notify_command_complete() and acpi_os_wait_command_ready() can
    be used by acpi_dbg module to implement .flush() filesystem operation.
    While this patch doesn't go that far. It then becomes userspace tool's
    duty now to flush old commands before executing new batch mode commands.

    Signed-off-by: Lv Zheng
    Signed-off-by: Rafael J. Wysocki

    Lv Zheng
     

04 Dec, 2015

1 commit


01 Dec, 2015

1 commit

  • Hi,

    For a brief moment I was tricked into thinking that:

    In-kernel debugger (EXPERIMENTAL) (ACPI_DEBUGGER) [N/y/?] (NEW)

    might be something useful. Better describe the feature to reduce
    such confusion.

    Signed-off-by: Peter Zijlstra (Intel)
    Signed-off-by: Rafael J. Wysocki

    Peter Zijlstra
     

02 Nov, 2015

1 commit

  • * acpi-processor:
    ACPI / CPPC: Fix potential memory leak
    ACPI / CPPC: signedness bug in register_pcc_channel()
    ACPI: Allow selection of the ACPI processor driver for ARM64
    CPPC: Probe for CPPC tables for each ACPI Processor object
    ACPI: Add weak routines for ACPI CPU Hotplug
    ACPI / CPPC: Add a CPUFreq driver for use with CPPC
    ACPI: Introduce CPU performance controls using CPPC

    Rafael J. Wysocki
     

22 Oct, 2015

1 commit

  • This patch enables ACPICA debugger files using a configurable
    CONFIG_ACPI_DEBUGGER configuration item. Those debugger related code that
    was originally masked as ACPI_FUTURE_USAGE now gets unmasked.

    Necessary OSL stubs are also added in this patch:
    1. acpi_os_readable(): This should be arch specific in Linux, while this
    patch doesn't introduce real implementation and a complex mechanism to
    allow architecture specific acpi_os_readable() to be implemented to
    validate the address. It may be done by future commits.
    2. acpi_os_get_line(): This is used to obtain debugger command input. This
    patch only introduces a simple KDB concept example in it and the
    example should be co-working with the code implemented in
    acpi_os_printf(). Since this KDB example won't be compiled unless
    ENABLE_DEBUGGER is defined and it seems Linux has already stopped to
    use ENABLE_DEBUGGER, thus do not expect it can work properly.

    This patch also cleans up all other ACPI_FUTURE_USAGE surroundings
    accordingly.
    1. Since linkage error can be automatically detected, declaration in the
    headers needn't be surrounded by ACPI_FUTURE_USAGE.
    So only the following separate exported fuction bodies are masked by
    this macro (other exported fucntions may have already been masked at
    entire module level via drivers/acpi/acpica/Makefile):
    acpi_install_exception_handler()
    acpi_subsystem_status()
    acpi_get_system_info()
    acpi_get_statistics()
    acpi_install_initialization_handler()
    2. Since strip can automatically zap the no-user functions, functions that
    are not marked with ACPI_EXPORT_SYMBOL() needn't get surrounded by
    ACPI_FUTURE_USAGE.
    So the following function which is not used by Linux kernel now won't
    get surrounded by this macro:
    acpi_ps_get_name()

    Signed-off-by: Lv Zheng
    Signed-off-by: Rafael J. Wysocki

    Lv Zheng
     

13 Oct, 2015

2 commits

  • Now that the ACPI processor driver has been decoupled from
    the C states and P states functionality, make it selectable on
    ARM64 so that it can be used by others e.g. CPPC.

    The C states and P states code is selected only on X86 or
    IA64 until the relevant support is added on ARM64.

    Signed-off-by: Ashwin Chaugule
    Signed-off-by: Rafael J. Wysocki

    Ashwin Chaugule
     
  • CPPC stands for Collaborative Processor Performance Controls
    and is defined in the ACPI v5.0+ spec. It describes CPU
    performance controls on an abstract and continuous scale
    allowing the platform (e.g. remote power processor) to flexibly
    optimize CPU performance with its knowledge of power budgets
    and other architecture specific knowledge.

    This patch adds a shim which exports commonly used functions
    to get and set CPPC specific controls for each CPU. This enables
    CPUFreq drivers to gather per CPU performance data and use
    with exisiting governors or even allows for customized governors
    which are implemented inside CPUFreq drivers.

    Signed-off-by: Ashwin Chaugule
    Reviewed-by: Al Stone
    Signed-off-by: Rafael J. Wysocki

    Ashwin Chaugule
     

09 Sep, 2015

1 commit

  • Pull libnvdimm updates from Dan Williams:
    "This update has successfully completed a 0day-kbuild run and has
    appeared in a linux-next release. The changes outside of the typical
    drivers/nvdimm/ and drivers/acpi/nfit.[ch] paths are related to the
    removal of IORESOURCE_CACHEABLE, the introduction of memremap(), and
    the introduction of ZONE_DEVICE + devm_memremap_pages().

    Summary:

    - Introduce ZONE_DEVICE and devm_memremap_pages() as a generic
    mechanism for adding device-driver-discovered memory regions to the
    kernel's direct map.

    This facility is used by the pmem driver to enable pfn_to_page()
    operations on the page frames returned by DAX ('direct_access' in
    'struct block_device_operations').

    For now, the 'memmap' allocation for these "device" pages comes
    from "System RAM". Support for allocating the memmap from device
    memory will arrive in a later kernel.

    - Introduce memremap() to replace usages of ioremap_cache() and
    ioremap_wt(). memremap() drops the __iomem annotation for these
    mappings to memory that do not have i/o side effects. The
    replacement of ioremap_cache() with memremap() is limited to the
    pmem driver to ease merging the api change in v4.3.

    Completion of the conversion is targeted for v4.4.

    - Similar to the usage of memcpy_to_pmem() + wmb_pmem() in the pmem
    driver, update the VFS DAX implementation and PMEM api to provide
    persistence guarantees for kernel operations on a DAX mapping.

    - Convert the ACPI NFIT 'BLK' driver to map the block apertures as
    cacheable to improve performance.

    - Miscellaneous updates and fixes to libnvdimm including support for
    issuing "address range scrub" commands, clarifying the optimal
    'sector size' of pmem devices, a clarification of the usage of the
    ACPI '_STA' (status) property for DIMM devices, and other minor
    fixes"

    * tag 'libnvdimm-for-4.3' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: (34 commits)
    libnvdimm, pmem: direct map legacy pmem by default
    libnvdimm, pmem: 'struct page' for pmem
    libnvdimm, pfn: 'struct page' provider infrastructure
    x86, pmem: clarify that ARCH_HAS_PMEM_API implies PMEM mapped WB
    add devm_memremap_pages
    mm: ZONE_DEVICE for "device memory"
    mm: move __phys_to_pfn and __pfn_to_phys to asm/generic/memory_model.h
    dax: drop size parameter to ->direct_access()
    nd_blk: change aperture mapping from WC to WB
    nvdimm: change to use generic kvfree()
    pmem, dax: have direct_access use __pmem annotation
    dax: update I/O path to do proper PMEM flushing
    pmem: add copy_from_iter_pmem() and clear_pmem()
    pmem, x86: clean up conditional pmem includes
    pmem: remove layer when calling arch_has_wmb_pmem()
    pmem, x86: move x86 PMEM API to new pmem.h header
    libnvdimm, e820: make CONFIG_X86_PMEM_LEGACY a tristate option
    pmem: switch to devm_ allocations
    devres: add devm_memremap
    libnvdimm, btt: write and validate parent_uuid
    ...

    Linus Torvalds
     

28 Aug, 2015

1 commit

  • This should result in a pretty sizeable performance gain for reads. For
    rough comparison I did some simple read testing using PMEM to compare
    reads of write combining (WC) mappings vs write-back (WB). This was
    done on a random lab machine.

    PMEM reads from a write combining mapping:
    # dd of=/dev/null if=/dev/pmem0 bs=4096 count=100000
    100000+0 records in
    100000+0 records out
    409600000 bytes (410 MB) copied, 9.2855 s, 44.1 MB/s

    PMEM reads from a write-back mapping:
    # dd of=/dev/null if=/dev/pmem0 bs=4096 count=1000000
    1000000+0 records in
    1000000+0 records out
    4096000000 bytes (4.1 GB) copied, 3.44034 s, 1.2 GB/s

    To be able to safely support a write-back aperture I needed to add
    support for the "read flush" _DSM flag, as outlined in the DSM spec:

    http://pmem.io/documents/NVDIMM_DSM_Interface_Example.pdf

    This flag tells the ND BLK driver that it needs to flush the cache lines
    associated with the aperture after the aperture is moved but before any
    new data is read. This ensures that any stale cache lines from the
    previous contents of the aperture will be discarded from the processor
    cache, and the new data will be read properly from the DIMM. We know
    that the cache lines are clean and will be discarded without any
    writeback because either a) the previous aperture operation was a read,
    and we never modified the contents of the aperture, or b) the previous
    aperture operation was a write and we must have written back the dirtied
    contents of the aperture to the DIMM before the I/O was completed.

    In order to add support for the "read flush" flag I needed to add a
    generic routine to invalidate cache lines, mmio_flush_range(). This is
    protected by the ARCH_HAS_MMIO_FLUSH Kconfig variable, and is currently
    only supported on x86.

    Signed-off-by: Ross Zwisler
    Signed-off-by: Dan Williams

    Ross Zwisler
     

25 Aug, 2015

2 commits

  • This patch introduces a new Kconfig symbol, ACPI_PROCESSOR_IDLE,
    which is auto selected by architectures which support the ACPI
    based C states for CPU Idle management.

    The processor_idle driver in its present form contains declarations
    specific to X86 and IA64. Since there are no reasonable defaults
    for other architectures e.g. ARM64, the driver is selected only for
    X86 or IA64.

    This helps in decoupling the ACPI processor_driver from the ACPI
    processor_idle driver which is useful for the upcoming alternative
    patchwork for controlling CPU Performance (CPPC) and CPU Idle (LPI).

    Signed-off-by: Ashwin Chaugule
    Signed-off-by: Rafael J. Wysocki

    Ashwin Chaugule
     
  • The ACPI processor driver is currently tied too closely
    to the ACPI P-states (PSS) and other related constructs
    for controlling CPU performance.

    The newer ACPI specification (v5.1 onwards) introduces
    alternative methods to PSS. These new mechanisms are
    described within each ACPI Processor object and so they
    need to be scanned whenever a new Processor object is detected.
    This patch introduces a new Kconfig symbol to allow for
    finer configurability among the two options for controlling
    performance states. There is no change in functionality and
    the option is auto-selected by the architectures which support it.

    A future commit will introduce support for CPPC: A newer method of
    controlling CPU performance. The OS is not expected to support
    CPPC and PSS at the same time, so the Kconfig option lets us make
    the two mutually exclusive at compile time.

    Signed-off-by: Ashwin Chaugule
    [ rjw: Changelog ]
    Signed-off-by: Rafael J. Wysocki

    Ashwin Chaugule
     

03 Jul, 2015

2 commits

  • Pull ACPICA updates from Rafael Wysocki:
    "Additional ACPICA material for v4.2-rc1

    This will update the ACPICA code in the kernel to upstream revision
    20150619 (a bug-fix release mostly including stable-candidate fixes)
    and restore an earlier ACPICA commit that had to be reverted due to a
    regression introduced by it (the regression is addressed by
    blacklisting the only known system affected by it to date).

    The only new feature added by this update is the support for
    overriding objects in the ACPI namespace and a new ACPI table that can
    be used for that called the Override System Definition Table (OSDT).
    That should allow us to "patch" the ACPI namespace built from
    incomplete or incorrect ACPI System Definition tables (DSDT, SSDT)
    during system startup without the need to provide replacements for all
    of those tables in the future.

    Specifics:

    - Fix system resume problems related to 32-bit and 64-bit versions of
    the Firmware ACPI Control Structure (FACS) in the firmare (Lv
    Zheng)

    - Fix double initialization of the FACS (Lv Zheng)

    - Add _CLS object processing code to ACPICA (Suravee Suthikulpanit)

    - Add support for the (currently missing) new GIC version field in
    the Multiple APIC Description Table (MADT) (Hanjun Guo)

    - Add support for overriding objects in the ACPI namespace to ACPICA
    and OSDT support (Lv Zheng, Bob Moore, Zhang Rui)

    - Updates related to the TCPA and TPM2 ACPI tables (Bob Moore)

    - Restore the commit modifying _REV to always return "2" (as required
    by ACPI 6) and add a blacklisting mechanism for systems that may be
    affected by that change (Rafael J Wysocki)

    - Assorted fixes and cleanups (Bob Moore, Lv Zheng, Sascha Wildner)"

    * tag 'acpica-4.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (28 commits)
    Revert 'Revert "ACPICA: Permanently set _REV to the value '2'."'
    ACPI / init: Make it possible to override _REV
    ACPICA: Update version to 20150619
    ACPICA: Comment update, no functional change
    ACPICA: Update TPM2 ACPI table
    ACPICA: Update definitions for the TCPA and TPM2 ACPI tables
    ACPICA: Split C library prototypes to new header
    ACPICA: De-macroize calls to standard C library functions
    ACPI / acpidump: Update acpidump manual
    ACPICA: acpidump: Convert the default behavior to dump from /sys/firmware/acpi/tables
    ACPICA: acpidump: Allow customized tables to be dumped without accessing /dev/mem
    ACPICA: Cleanup output for the ASL Debug object
    ACPICA: Update for acpi_install_table memory types
    ACPICA: Namespace: Change namespace override to avoid node deletion
    ACPICA: Namespace: Add support of OSDT table
    ACPICA: Namespace: Add support to allow overriding objects
    ACPICA: ACPI 6.0: Add values for MADT GIC version field
    ACPICA: Utilities: Add _CLS processing
    ACPICA: Add dragon_fly support to unix file mapping file
    ACPICA: EFI: Add EFI interface definitions to eliminate dependency of GNU EFI
    ...

    Linus Torvalds
     
  • The platform firmware on some systems expects Linux to return "5" as
    the supported ACPI revision which makes it expose system configuration
    information in a special way.

    For example, based on what ACPI exports as the supported revision,
    Dell XPS 13 (2015) configures its audio device to either work in HDA
    mode or in I2S mode, where the former is supposed to be used on Linux
    until the latter is fully supported (in the kernel as well as in user
    space).

    Since ACPI 6 mandates that _REV should return "2" if ACPI 2 or later
    is supported by the OS, a subsequent change will make that happen, so
    make it possible to override that on systems where "5" is expected to
    be returned for Linux to work correctly one them (such as the Dell
    machine mentioned above).

    Original-by: Dominik Brodowski
    Signed-off-by: Rafael J. Wysocki

    Rafael J. Wysocki