20 Oct, 2016

1 commit


13 Sep, 2016

2 commits

  • We get 1 warning when building kernel with W=1:
    drivers/irqchip/irq-gic.c:917:13: warning: no previous prototype for 'gic_init_physaddr' [-Wmissing-prototypes]

    In fact, this function is only used in the file in which it is
    declared and don't need a declaration, but can be made static.
    so this patch marks this function with 'static'.

    Signed-off-by: Baoyou Xie
    Signed-off-by: Marc Zyngier

    Baoyou Xie
     
  • The BL switcher code manipulates the logical/physical CPU mapping,
    forcing a lock to be taken on the IPI path. With an IPI heavy load,
    this single lock becomes contended.

    But when CONFIG_BL_SWITCHER is not enabled, there is no reason
    to take this lock at all since the CPU mapping is immutable.

    This patch allows the lock to be entierely removed when BL_SWITCHER
    is not enabled (which is the case in most configurations), leading
    to a small improvement of "perf bench sched pipe" (measured on
    an 8 core AMD Seattle system):

    Before: 101370 ops/sec
    After: 103680 ops/sec

    Take this opportunity to remove a useless lock being taken when
    handling an interrupt on a secondary GIC.

    Signed-off-by: Marc Zyngier

    Marc Zyngier
     

18 Aug, 2016

1 commit


30 Jul, 2016

1 commit

  • Pull smp hotplug updates from Thomas Gleixner:
    "This is the next part of the hotplug rework.

    - Convert all notifiers with a priority assigned

    - Convert all CPU_STARTING/DYING notifiers

    The final removal of the STARTING/DYING infrastructure will happen
    when the merge window closes.

    Another 700 hundred line of unpenetrable maze gone :)"

    * 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (70 commits)
    timers/core: Correct callback order during CPU hot plug
    leds/trigger/cpu: Move from CPU_STARTING to ONLINE level
    powerpc/numa: Convert to hotplug state machine
    arm/perf: Fix hotplug state machine conversion
    irqchip/armada: Avoid unused function warnings
    ARC/time: Convert to hotplug state machine
    clocksource/atlas7: Convert to hotplug state machine
    clocksource/armada-370-xp: Convert to hotplug state machine
    clocksource/exynos_mct: Convert to hotplug state machine
    clocksource/arm_global_timer: Convert to hotplug state machine
    rcu: Convert rcutree to hotplug state machine
    KVM/arm/arm64/vgic-new: Convert to hotplug state machine
    smp/cfd: Convert core to hotplug state machine
    x86/x2apic: Convert to CPU hotplug state machine
    profile: Convert to hotplug state machine
    timers/core: Convert to hotplug state machine
    hrtimer: Convert to hotplug state machine
    x86/tboot: Convert to hotplug state machine
    arm64/armv8 deprecated: Convert to hotplug state machine
    hwtracing/coresight-etm4x: Convert to hotplug state machine
    ...

    Linus Torvalds
     

14 Jul, 2016

1 commit

  • More or less straightforward, although this driver sports some very
    interesting SMP setup code. Regarding the callback ordering, this
    deleted comment is interesting:

    ... the GIC needs to be up before the ARM generic timers.

    That comment is half baken as the same requirement is true for perf.

    Signed-off-by: Richard Cochran
    Signed-off-by: Anna-Maria Gleixner
    Reviewed-by: Sebastian Andrzej Siewior
    Acked-by: Jason Cooper
    Cc: Linus Torvalds
    Cc: Marc Zyngier
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: rt@linutronix.de
    Link: http://lkml.kernel.org/r/20160713153333.069777215@linutronix.de
    Signed-off-by: Ingo Molnar

    Richard Cochran
     

13 Jun, 2016

4 commits

  • Add a platform driver to support non-root GICs that require runtime
    power-management. Currently, only non-root GICs are supported because
    the functions, smp_cross_call() and set_handle_irq(), that need to
    be called for a root controller are located in the __init section and
    so cannot be called by the platform driver.

    The GIC platform driver re-uses many functions from the existing GIC
    driver including some functions to save and restore the GIC context
    during power transitions. The functions for saving and restoring the
    GIC context are currently only defined if CONFIG_CPU_PM is enabled and
    to ensure that these functions are always defined when the platform
    driver is enabled, a dependency on CONFIG_ARM_GIC_PM (which selects the
    platform driver) has been added.

    In order to re-use the private GIC initialisation code, a new public
    function, gic_of_init_child(), has been added which calls various
    private functions to initialise the GIC. This is different from the
    existing gic_of_init() because it only supports non-root GICs (ie. does
    not call smp_cross_call() is set_handle_irq()) and is not located in
    the __init section (so can be used by platform drivers). Furthermore,
    gic_of_init_child() dynamically allocates memory for the GIC chip data
    which is also different from gic_of_init().

    There is no specific suspend handling for GICs registered as platform
    devices. Non-wakeup interrupts will be disabled by the kernel during
    late suspend, however, this alone will not power down the GIC if
    interrupts have been requested and not freed. Therefore, requestors of
    non-wakeup interrupts will need to free them on entering suspend in
    order to power-down the GIC.

    Signed-off-by: Jon Hunter
    Signed-off-by: Marc Zyngier

    Jon Hunter
     
  • To support GICs that require runtime power management, it is necessary
    to add a platform driver, so that the probing of the chip can be
    deferred if resources, such as a power-domain, is not yet available.

    To prepare for adding a platform driver:
    1. Drop the __init section from the gic_dist_config() so this can be
    re-used by the platform driver.
    2. Add prototypes for functions required by the platform driver to the
    GIC header file so they can be re-used.

    Signed-off-by: Jon Hunter
    Signed-off-by: Marc Zyngier

    Jon Hunter
     
  • For GICs that require runtime power-management it is necessary to
    populate the 'parent_device' member of the irqchip structure. In
    preparation for supporting such GICs, move the code that initialises
    the irqchip structure for a GIC into its own function called
    gic_init_chip() where the parent device pointer is also set.

    Instead of calling gic_init_chip() from within gic_init_bases(), move
    the calls to outside of this function, so that in the future we can
    avoid having to pass additional parameters to gic_init_bases() in order
    set the parent device pointer or set the name to a specific string.

    Signed-off-by: Jon Hunter
    Signed-off-by: Marc Zyngier

    Jon Hunter
     
  • To re-use the code that initialises the GIC (found in
    __gic_init_bases()), from within a platform driver, it is necessary to
    move the code from the __init section so that it is always present and
    not removed. Unfortunately, it is not possible to simply drop the __init
    from the function declaration for __gic_init_bases() because it contains
    calls to set_smp_cross_call() and set_handle_irq() which are both
    located in the __init section. Fortunately, these calls are only
    required for the root controller and because the initial platform driver
    will only support non-root controllers that can be initialised later in
    the boot process, we can move these calls to another function.

    Move the bulk of the code from __gic_init_bases() to a new function
    called gic_init_bases() which is not located in the __init section and
    can be used by the platform driver. Update __gic_init_bases() to call
    gic_init_bases() and if necessary, set_smp_cross_call() and
    set_handle_irq().

    Signed-off-by: Jon Hunter
    Signed-off-by: Marc Zyngier

    Jon Hunter
     

28 May, 2016

1 commit

  • Most users of IS_ERR_VALUE() in the kernel are wrong, as they
    pass an 'int' into a function that takes an 'unsigned long'
    argument. This happens to work because the type is sign-extended
    on 64-bit architectures before it gets converted into an
    unsigned type.

    However, anything that passes an 'unsigned short' or 'unsigned int'
    argument into IS_ERR_VALUE() is guaranteed to be broken, as are
    8-bit integers and types that are wider than 'unsigned long'.

    Andrzej Hajda has already fixed a lot of the worst abusers that
    were causing actual bugs, but it would be nice to prevent any
    users that are not passing 'unsigned long' arguments.

    This patch changes all users of IS_ERR_VALUE() that I could find
    on 32-bit ARM randconfig builds and x86 allmodconfig. For the
    moment, this doesn't change the definition of IS_ERR_VALUE()
    because there are probably still architecture specific users
    elsewhere.

    Almost all the warnings I got are for files that are better off
    using 'if (err)' or 'if (err < 0)'.
    The only legitimate user I could find that we get a warning for
    is the (32-bit only) freescale fman driver, so I did not remove
    the IS_ERR_VALUE() there but changed the type to 'unsigned long'.
    For 9pfs, I just worked around one user whose calling conventions
    are so obscure that I did not dare change the behavior.

    I was using this definition for testing:

    #define IS_ERR_VALUE(x) ((unsigned long*)NULL == (typeof (x)*)NULL && \
    unlikely((unsigned long long)(x) >= (unsigned long long)(typeof(x))-MAX_ERRNO))

    which ends up making all 16-bit or wider types work correctly with
    the most plausible interpretation of what IS_ERR_VALUE() was supposed
    to return according to its users, but also causes a compile-time
    warning for any users that do not pass an 'unsigned long' argument.

    I suggested this approach earlier this year, but back then we ended
    up deciding to just fix the users that are obviously broken. After
    the initial warning that caused me to get involved in the discussion
    (fs/gfs2/dir.c) showed up again in the mainline kernel, Linus
    asked me to send the whole thing again.

    [ Updated the 9p parts as per Al Viro - Linus ]

    Signed-off-by: Arnd Bergmann
    Cc: Andrzej Hajda
    Cc: Andrew Morton
    Link: https://lkml.org/lkml/2016/1/7/363
    Link: https://lkml.org/lkml/2016/5/27/486
    Acked-by: Srinivas Kandagatla # For nvmem part
    Signed-off-by: Linus Torvalds

    Arnd Bergmann
     

20 May, 2016

1 commit

  • Pull KVM updates from Paolo Bonzini:
    "Small release overall.

    x86:
    - miscellaneous fixes
    - AVIC support (local APIC virtualization, AMD version)

    s390:
    - polling for interrupts after a VCPU goes to halted state is now
    enabled for s390
    - use hardware provided information about facility bits that do not
    need any hypervisor activity, and other fixes for cpu models and
    facilities
    - improve perf output
    - floating interrupt controller improvements.

    MIPS:
    - miscellaneous fixes

    PPC:
    - bugfixes only

    ARM:
    - 16K page size support
    - generic firmware probing layer for timer and GIC

    Christoffer Dall (KVM-ARM maintainer) says:
    "There are a few changes in this pull request touching things
    outside KVM, but they should all carry the necessary acks and it
    made the merge process much easier to do it this way."

    though actually the irqchip maintainers' acks didn't make it into the
    patches. Marc Zyngier, who is both irqchip and KVM-ARM maintainer,
    later acked at http://mid.gmane.org/573351D1.4060303@arm.com ('more
    formally and for documentation purposes')"

    * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (82 commits)
    KVM: MTRR: remove MSR 0x2f8
    KVM: x86: make hwapic_isr_update and hwapic_irr_update look the same
    svm: Manage vcpu load/unload when enable AVIC
    svm: Do not intercept CR8 when enable AVIC
    svm: Do not expose x2APIC when enable AVIC
    KVM: x86: Introducing kvm_x86_ops.apicv_post_state_restore
    svm: Add VMEXIT handlers for AVIC
    svm: Add interrupt injection via AVIC
    KVM: x86: Detect and Initialize AVIC support
    svm: Introduce new AVIC VMCB registers
    KVM: split kvm_vcpu_wake_up from kvm_vcpu_kick
    KVM: x86: Introducing kvm_x86_ops VCPU blocking/unblocking hooks
    KVM: x86: Introducing kvm_x86_ops VM init/destroy hooks
    KVM: x86: Rename kvm_apic_get_reg to kvm_lapic_get_reg
    KVM: x86: Misc LAPIC changes to expose helper functions
    KVM: shrink halt polling even more for invalid wakeups
    KVM: s390: set halt polling to 80 microseconds
    KVM: halt_polling: provide a way to qualify wakeups during poll
    KVM: PPC: Book3S HV: Re-enable XICS fast path for irqfd-generated interrupts
    kvm: Conditionally register IRQ bypass consumer
    ...

    Linus Torvalds
     

18 May, 2016

1 commit

  • Pull irq updates from Thomas Gleixner:
    "This update delivers:

    - Yet another interrupt chip diver (LPC32xx)
    - Core functions to handle partitioned per-cpu interrupts
    - Enhancements to the IPI core
    - Proper handling of irq type configuration
    - A large set of ARM GIC enhancements
    - The usual pile of small fixes, cleanups and enhancements"

    * 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (31 commits)
    irqchip/bcm2836: Use a more generic memory barrier call
    irqchip/bcm2836: Fix compiler warning on 64-bit build
    irqchip/bcm2836: Drop smp_set_ops on arm64 builds
    irqchip/gic: Add helper functions for GIC setup and teardown
    irqchip/gic: Store GIC configuration parameters
    irqchip/gic: Pass GIC pointer to save/restore functions
    irqchip/gic: Return an error if GIC initialisation fails
    irqchip/gic: Remove static irq_chip definition for eoimode1
    irqchip/gic: Don't initialise chip if mapping IO space fails
    irqchip/gic: WARN if setting the interrupt type for a PPI fails
    irqchip/gic: Don't unnecessarily write the IRQ configuration
    irqchip: Mask the non-type/sense bits when translating an IRQ
    genirq: Ensure IRQ descriptor is valid when setting-up the IRQ
    irqchip/gic-v3: Configure all interrupts as non-secure Group-1
    irqchip/gic-v2m: Add workaround for Broadcom NS2 GICv2m erratum
    irqchip/irq-alpine-msi: Don't use
    irqchip/mbigen: Checking for IS_ERR() instead of NULL
    irqchip/gic-v3: Remove inexistant register definition
    irqchip/gicv3-its: Don't allow devices whose ID is outside range
    irqchip: Add LPC32xx interrupt controller driver
    ...

    Linus Torvalds
     

11 May, 2016

7 commits

  • Move the code that sets-up a GIC via device-tree into it's own
    function and add a generic function for GIC teardown that can be used
    for both device-tree and ACPI to unmap the GIC memory.

    Signed-off-by: Jon Hunter
    Signed-off-by: Marc Zyngier

    Jon Hunter
     
  • Store the GIC configuration parameters in the GIC chip data structure.
    This will allow us to simplify the code by reducing the number of
    parameters passed between functions.

    Update the __gic_init_bases() function so that we only need to pass a
    pointer to the GIC chip data structure and no longer need to pass the
    GIC index in order to look-up the chip data.

    Signed-off-by: Jon Hunter
    Signed-off-by: Marc Zyngier

    Jon Hunter
     
  • Instead of passing the GIC index to the save/restore functions pass a
    pointer to the GIC chip data. This will allow these save/restore
    functions to be re-used by a platform driver where the GIC chip data
    structure is allocated dynamically and so there is no applicable index
    for identifying the GIC.

    Signed-off-by: Jon Hunter
    Acked-by: Marc Zyngier
    Signed-off-by: Marc Zyngier

    Jon Hunter
     
  • If the GIC initialisation fails, then currently we do not return an error
    or clean-up afterwards. Although for root controllers, this failure may be
    fatal anyway, for secondary controllers, it may not be fatal and so return
    an error on failure and clean-up.

    Update the functions gic_cpu_init() and gic_pm_init() to return an error
    instead of calling BUG() and perform any necessary clean-up.

    For non-banked GIC controllers, make sure that we free any memory
    allocated if we fail to initialise the IRQ domain. Please note that
    free_percpu() only frees memory if the pointer passed to it is not NULL
    and so it is unnecessary to check if both pointers are valid or not.

    Signed-off-by: Jon Hunter
    Signed-off-by: Marc Zyngier

    Jon Hunter
     
  • There are only 3 differences (not including the name) in the definitions
    of the gic_chip and gic_eoimode1_chip structures. Instead of statically
    defining the gic_eoimode1_chip structure, remove it and populate the
    eoimode1 functions dynamically for the appropriate GIC irqchips.

    Signed-off-by: Jon Hunter
    Acked-by: Marc Zyngier
    Signed-off-by: Marc Zyngier

    Jon Hunter
     
  • If we fail to map the address space for the GIC distributor or CPU
    interface, then don't attempt to initialise the chip, just WARN and
    return.

    Signed-off-by: Jon Hunter
    Acked-by: Marc Zyngier
    Signed-off-by: Marc Zyngier

    Jon Hunter
     
  • When an IPI is generated by a CPU, the pattern looks roughly like:


    smp_wmb();

    On the receiving CPU we rely on the fact that, once we've taken the
    interrupt, then the freshly written shared data must be visible to us.
    Put another way, the CPU isn't going to speculate taking an interrupt.

    Unfortunately, this assumption turns out to be broken.

    Consider that CPUx wants to send an IPI to CPUy, which will cause CPUy
    to read some shared_data. Before CPUx has done anything, a random
    peripheral raises an IRQ to the GIC and the IRQ line on CPUy is raised.
    CPUy then takes the IRQ and starts executing the entry code, heading
    towards gic_handle_irq. Furthermore, let's assume that a bunch of the
    previous interrupts handled by CPUy were SGIs, so the branch predictor
    kicks in and speculates that irqnr will be
    Signed-off-by: Marc Zyngier

    Will Deacon
     

03 May, 2016

2 commits

  • For now, the firmware tables are parsed 2 times: once in the GIC
    drivers, the other timer when initializing the vGIC. It means code
    duplication and make more tedious to add the support for another
    firmware table (like ACPI).

    Introduce a new structure and set of helpers to get/set the virtual GIC
    information. Also fill up the structure for GICv2.

    Signed-off-by: Julien Grall
    Signed-off-by: Christoffer Dall

    Julien Grall
     
  • The ACPI code requires to use global variables in order to collect
    information from the tables.

    For now, a single global variable is used, but more will be added in a
    subsequent patch. To make clear they are ACPI specific, gather all the
    information in a single structure.

    Signed-off-by: Julien Grall
    Acked-by: Christofer Dall
    Acked-by: Hanjun Guo
    Signed-off-by: Christoffer Dall

    Julien Grall
     

25 Apr, 2016

1 commit

  • When introducing the whole CPU feature detection framework,
    we lost the capability to detect a mismatched GIC configuration
    (using the GICv2 MMIO interface, but having the system register
    interface enabled).

    In order to solve this, use the new this_cpu_has_cap() helper.
    Also move the check to the CPU interface path in order to catch
    systems where the first CPU has been correctly configured,
    but the secondaries are not.

    Reviewed-by: Catalin Marinas
    Signed-off-by: Marc Zyngier
    Signed-off-by: Suzuki K Poulose
    Signed-off-by: Will Deacon

    Marc Zyngier
     

08 Mar, 2016

1 commit


19 Feb, 2016

1 commit

  • Moving an SPI around doesn't require any extra work from the rest
    of the stack, and specially not for MSI-generated SPIs.

    It is then worth returning IRQ_SET_MASK_OK_DONE instead of
    IRQ_SET_MASK_OK, and simplify the other irqchips that rely on
    this behaviour (GICv2m and Marvell's ODMI controller).

    Signed-off-by: Marc Zyngier
    Acked-by: Thomas Petazzoni
    Link: https://lkml.kernel.org/r/1455894029-17270-1-git-send-email-marc.zyngier@arm.com
    Signed-off-by: Jason Cooper

    Marc Zyngier
     

11 Feb, 2016

2 commits

  • EOImode1 is only used for the root controller and hence only the root
    controller uses the eoimode1 functions for handling interrupts. However,
    if the root controller supports EOImode1, then the EOImodeNS bit will be
    set for all GICs, enabling EOImode1. This is not what we want and this
    causes interrupts on non-root GICs to only be dropped in priority but
    never deactivated. Therefore, only set the EOImodeNS bit for the root
    controller.

    Acked-by: Marc Zyngier
    Signed-off-by: Jon Hunter
    Signed-off-by: Marc Zyngier

    Jon Hunter
     
  • Setting the affinity of an IRQ, it only applicable for the root
    interrupt controller and so only populate this operator for the root
    controller.

    Acked-by: Marc Zyngier
    Signed-off-by: Jon Hunter
    Signed-off-by: Marc Zyngier

    Jon Hunter
     

29 Dec, 2015

1 commit


21 Dec, 2015

2 commits


18 Dec, 2015

1 commit

  • There is currently a hack in the GIC driver making it possible
    to pass the number of GIC instances from the platform-specific
    include files and thus override the variable MAX_GIC_NR.

    With multiplatform deployments, this will not work as we need
    to get rid of the platform-specific include files.

    It turns out that this feature is only used by the RealView
    platform which has a cascaded GIC. So move the configuration
    to Kconfig and bump to 2 instances if we're building for the
    RealView. The include file hacks can then be removed.

    Tested on the ARM PB11MPCore with its cascaded GIC.

    Suggested-by: Arnd Bergmann
    Signed-off-by: Linus Walleij
    Signed-off-by: Marc Zyngier

    Linus Walleij
     

16 Dec, 2015

3 commits

  • The GIC has no such thing as interrupt 1020: the last valid ID is
    1019, and the range 1020-1023 is reserved - 1023 indicating that
    no interrupt is pending. So let's make sure we don't try to handle
    this ID.

    This bug has been in since the initial GIC code was introduced in
    8ad68bbf7a06 ("[ARM] Add support for ARM RealView board").

    Reported-by: Eric Auger
    Cc: Catalin Marinas
    Signed-off-by: Marc Zyngier

    Marc Zyngier
     
  • Instead of having the irqchip being a static struct, make it part
    of the per-instance data so we can assign it a dynamic name. This
    has the usable side effect of displaying the GIC with an instance
    number as GIC0, GIC1 ... GICn in /proc/interrupts, which is helpful
    when debugging cascaded GICs, such as on the ARM PB11MPCore.

    Cc: Thomas Gleixner
    Cc: Jason Cooper
    Signed-off-by: Linus Walleij
    Signed-off-by: Marc Zyngier

    Linus Walleij
     
  • The ARM RealView PB11MPCore reference design has some special
    bits in a system controller register to set up the GIC in one
    of three modes: legacy, new with DCC, new without DCC. The
    register is also used to enable FIQ.

    Since the platform will not boot unless this register is set
    up to "new with DCC" mode, we need a special quirk to be
    compiled-in for the RealView platforms.

    If we find the right compatible string on the GIC TestChip,
    we enable this quirk by looking up the system controller and
    enabling the special bits.

    We depend on the CONFIG_REALVIEW_DT Kconfig symbol as the old
    boardfile code has the same fix hardcoded, and this is only
    needed for the attempts to modernize the RealView code using
    device tree.

    After fixing this, the PB11MPCore boots with device tree
    only.

    Cc: Thomas Gleixner
    Cc: Jason Cooper
    Signed-off-by: Linus Walleij
    Signed-off-by: Marc Zyngier

    Linus Walleij
     

17 Nov, 2015

2 commits

  • When using EOImode==1, we may mark interrupts as being forwarded
    to a virtual machine. In that case, the interrupt is left active
    while being passed to the VM.

    If we suspend the system before the VM has deactivated the interrupt,
    the active state will be lost (which may be very annoying, as this
    may result in spurious interrupts and a confused guest).

    To avoid this, save and restore the active state together with the
    rest of the GIC registers.

    Signed-off-by: Marc Zyngier
    Cc:
    Cc: Jason Cooper
    Cc: Russell King
    Link: http://lkml.kernel.org/r/1447701208-18150-5-git-send-email-marc.zyngier@arm.com
    Signed-off-by: Thomas Gleixner

    Marc Zyngier
     
  • When restoring the GIC state (after a suspend/resume cycle,
    for example), the driver directly writes the 'enabled' state
    it has saved by accessing GICD_ISENABLERn, which performs
    an OR operation between the value present in the register
    and the value we write.

    If whatever code that has run before we reentered the kernel
    has enabled an interrupt that was previously disabled, we won't
    restore that disabled state.

    Making sure we first clear the register (by writting to
    GICD_ICENABLERn) before restoring the enabled state.

    Signed-off-by: Marc Zyngier
    Cc:
    Cc: Jason Cooper
    Cc: Russell King
    Link: http://lkml.kernel.org/r/1447701208-18150-4-git-send-email-marc.zyngier@arm.com
    Signed-off-by: Thomas Gleixner

    Marc Zyngier
     

05 Nov, 2015

1 commit

  • Pull power management and ACPI updates from Rafael Wysocki:
    "Quite a new features are included this time.

    First off, the Collaborative Processor Performance Control interface
    (version 2) defined by ACPI will now be supported on ARM64 along with
    a cpufreq frontend for CPU performance scaling.

    Second, ACPI gets a new infrastructure for the early probing of IRQ
    chips and clock sources (along the lines of the existing similar
    mechanism for DT).

    Next, the ACPI core and the generic device properties API will now
    support a recently introduced hierarchical properties extension of the
    _DSD (Device Specific Data) ACPI device configuration object. If the
    ACPI platform firmware uses that extension to organize device
    properties in a hierarchical way, the kernel will automatically handle
    it and make those properties available to device drivers via the
    generic device properties API.

    It also will be possible to build the ACPICA's AML interpreter
    debugger into the kernel now and use that to diagnose AML-related
    problems more efficiently. In the future, this should make it
    possible to single-step AML execution and do similar things.
    Interesting stuff, although somewhat experimental at this point.

    Finally, the PM core gets a new mechanism that can be used by device
    drivers to distinguish between suspend-to-RAM (based on platform
    firmware support) and suspend-to-idle (or other variants of system
    suspend the platform firmware is not involved in) and possibly
    optimize their device suspend/resume handling accordingly.

    In addition to that, some existing features are re-organized quite
    substantially.

    First, the ACPI-based handling of PCI host bridges on x86 and ia64 is
    unified and the common code goes into the ACPI core (so as to reduce
    code duplication and eliminate non-essential differences between the
    two architectures in that area).

    Second, the Operating Performance Points (OPP) framework is
    reorganized to make the code easier to find and follow.

    Next, the cpufreq core's sysfs interface is reorganized to get rid of
    the "primary CPU" concept for configurations in which the same
    performance scaling settings are shared between multiple CPUs.

    Finally, some interfaces that aren't necessary any more are dropped
    from the generic power domains framework.

    On top of the above we have some minor extensions, cleanups and bug
    fixes in multiple places, as usual.

    Specifics:

    - ACPICA update to upstream revision 20150930 (Bob Moore, Lv Zheng).

    The most significant change is to allow the AML debugger to be
    built into the kernel. On top of that there is an update related
    to the NFIT table (the ACPI persistent memory interface) and a few
    fixes and cleanups.

    - ACPI CPPC2 (Collaborative Processor Performance Control v2) support
    along with a cpufreq frontend (Ashwin Chaugule).

    This can only be enabled on ARM64 at this point.

    - New ACPI infrastructure for the early probing of IRQ chips and
    clock sources (Marc Zyngier).

    - Support for a new hierarchical properties extension of the ACPI
    _DSD (Device Specific Data) device configuration object allowing
    the kernel to handle hierarchical properties (provided by the
    platform firmware this way) automatically and make them available
    to device drivers via the generic device properties interface
    (Rafael Wysocki).

    - Generic device properties API extension to obtain an index of
    certain string value in an array of strings, along the lines of
    of_property_match_string(), but working for all of the supported
    firmware node types, and support for the "dma-names" device
    property based on it (Mika Westerberg).

    - ACPI core fix to parse the MADT (Multiple APIC Description Table)
    entries in the order expected by platform firmware (and mandated by
    the specification) to avoid confusion on systems with more than 255
    logical CPUs (Lukasz Anaczkowski).

    - Consolidation of the ACPI-based handling of PCI host bridges on x86
    and ia64 (Jiang Liu).

    - ACPI core fixes to ensure that the correct IRQ number is used to
    represent the SCI (System Control Interrupt) in the cases when it
    has been re-mapped (Chen Yu).

    - New ACPI backlight quirk for Lenovo IdeaPad S405 (Hans de Goede).

    - ACPI EC driver fixes (Lv Zheng).

    - Assorted ACPI fixes and cleanups (Dan Carpenter, Insu Yun, Jiri
    Kosina, Rami Rosen, Rasmus Villemoes).

    - New mechanism in the PM core allowing drivers to check if the
    platform firmware is going to be involved in the upcoming system
    suspend or if it has been involved in the suspend the system is
    resuming from at the moment (Rafael Wysocki).

    This should allow drivers to optimize their suspend/resume handling
    in some cases and the changes include a couple of users of it (the
    i8042 input driver, PCI PM).

    - PCI PM fix to prevent runtime-suspended devices with PME enabled
    from being resumed during system suspend even if they aren't
    configured to wake up the system from sleep (Rafael Wysocki).

    - New mechanism to report the number of a wakeup IRQ that woke up the
    system from sleep last time (Alexandra Yates).

    - Removal of unused interfaces from the generic power domains
    framework and fixes related to latency measurements in that code
    (Ulf Hansson, Daniel Lezcano).

    - cpufreq core sysfs interface rework to make it handle CPUs that
    share performance scaling settings (represented by a common cpufreq
    policy object) more symmetrically (Viresh Kumar).

    This should help to simplify the CPU offline/online handling among
    other things.

    - cpufreq core fixes and cleanups (Viresh Kumar).

    - intel_pstate fixes related to the Turbo Activation Ratio (TAR)
    mechanism on client platforms which causes the turbo P-states range
    to vary depending on platform firmware settings (Srinivas
    Pandruvada).

    - intel_pstate sysfs interface fix (Prarit Bhargava).

    - Assorted cpufreq driver (imx, tegra20, powernv, integrator) fixes
    and cleanups (Bai Ping, Bartlomiej Zolnierkiewicz, Shilpasri G
    Bhat, Luis de Bethencourt).

    - cpuidle mvebu driver cleanups (Russell King).

    - OPP (Operating Performance Points) framework code reorganization to
    make it more maintainable (Viresh Kumar).

    - Intel Broxton support for the RAPL (Running Average Power Limits)
    power capping driver (Amy Wiles).

    - Assorted power management code fixes and cleanups (Dan Carpenter,
    Geert Uytterhoeven, Geliang Tang, Luis de Bethencourt, Rasmus
    Villemoes)"

    * tag 'pm+acpi-4.4-rc1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (108 commits)
    cpufreq: postfix policy directory with the first CPU in related_cpus
    cpufreq: create cpu/cpufreq/policyX directories
    cpufreq: remove cpufreq_sysfs_{create|remove}_file()
    cpufreq: create cpu/cpufreq at boot time
    cpufreq: Use cpumask_copy instead of cpumask_or to copy a mask
    cpufreq: ondemand: Drop unnecessary locks from update_sampling_rate()
    PM / Domains: Merge measurements for PM QoS device latencies
    PM / Domains: Don't measure ->start|stop() latency in system PM callbacks
    PM / clk: Fix broken build due to non-matching code and header #ifdefs
    ACPI / Documentation: add copy_dsdt to ACPI format options
    ACPI / sysfs: correctly check failing memory allocation
    ACPI / video: Add a quirk to force native backlight on Lenovo IdeaPad S405
    ACPI / CPPC: Fix potential memory leak
    ACPI / CPPC: signedness bug in register_pcc_channel()
    ACPI / PAD: power_saving_thread() is not freezable
    ACPI / PM: Fix incorrect wakeup IRQ setting during suspend-to-idle
    ACPI: Using correct irq when waiting for events
    ACPI: Use correct IRQ when uninstalling ACPI interrupt handler
    cpuidle: mvebu: disable the bind/unbind attributes and use builtin_platform_driver
    cpuidle: mvebu: clean up multiple platform drivers
    ...

    Linus Torvalds
     

14 Oct, 2015

3 commits

  • We are now left with only two use models for the GIC driver:
    - Via a firmware interface, which mandates a hierarchical domain,
    and the use of the 'translate' method
    - The legacy platforms, which assume irq==hwirq, hence not using
    the 'xlate' method.

    The logical conclusion is that we can now nuke the 'xlate' method
    altogether.

    Signed-off-by: Marc Zyngier
    Reviewed-and-tested-by: Hanjun Guo
    Tested-by: Lorenzo Pieralisi
    Cc:
    Cc: Tomasz Nowicki
    Cc: Suravee Suthikulpanit
    Cc: Graeme Gregory
    Cc: Jake Oshins
    Cc: Jiang Liu
    Cc: Jason Cooper
    Cc: Rafael J. Wysocki
    Link: http://lkml.kernel.org/r/1444737105-31573-14-git-send-email-marc.zyngier@arm.com
    Signed-off-by: Thomas Gleixner

    Marc Zyngier
     
  • Now that the basic ACPI GSI code is irq domain aware, make sure
    that the ACPI support in the GIC doesn't pointlessly deviate from
    the DT path.

    Signed-off-by: Marc Zyngier
    Reviewed-and-tested-by: Hanjun Guo
    Tested-by: Lorenzo Pieralisi
    Cc:
    Cc: Tomasz Nowicki
    Cc: Suravee Suthikulpanit
    Cc: Graeme Gregory
    Cc: Jake Oshins
    Cc: Jiang Liu
    Cc: Jason Cooper
    Cc: Rafael J. Wysocki
    Link: http://lkml.kernel.org/r/1444737105-31573-13-git-send-email-marc.zyngier@arm.com
    Signed-off-by: Thomas Gleixner

    Marc Zyngier
     
  • Since nobody is using gic_init_bases anymore outside of the GIC
    driver itself, let's do a bit of housekeeping and remove the now
    useless entry point.

    Only gic_init() is now exposed to the rest of the kernel for the
    benefit of legacy systems.

    Signed-off-by: Marc Zyngier
    Reviewed-and-tested-by: Hanjun Guo
    Tested-by: Lorenzo Pieralisi
    Cc:
    Cc: Tomasz Nowicki
    Cc: Suravee Suthikulpanit
    Cc: Graeme Gregory
    Cc: Jake Oshins
    Cc: Jiang Liu
    Cc: Jason Cooper
    Cc: Rafael J. Wysocki
    Link: http://lkml.kernel.org/r/1444737105-31573-12-git-send-email-marc.zyngier@arm.com
    Signed-off-by: Thomas Gleixner

    Marc Zyngier