1. 11 May, 2016 22 commits
  2. 05 May, 2016 1 commit
  3. 04 May, 2016 2 commits
  4. 02 May, 2016 7 commits
    • Marc Zyngier's avatar
      DT/arm,gic-v3: Documment PPI partition support · 287e9357
      Marc Zyngier authored
      Add a decription of the PPI partitioning support.
      Signed-off-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
      Acked-by: default avatarRob Herring <robh+dt@kernel.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: devicetree@vger.kernel.org
      Cc: Jason Cooper <jason@lakedaemon.net>
      Cc: Will Deacon <will.deacon@arm.com>
      Link: http://lkml.kernel.org/r/1460365075-7316-6-git-send-email-marc.zyngier@arm.comSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      287e9357
    • Marc Zyngier's avatar
      irqchip/gic-v3: Add support for partitioned PPIs · e3825ba1
      Marc Zyngier authored
      Plug the partitioning layer into the GICv3 PPI code, parsing the
      DT and building the partition affinities and providing the generic
      code with partition data and callbacks.
      Signed-off-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: devicetree@vger.kernel.org
      Cc: Jason Cooper <jason@lakedaemon.net>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: Rob Herring <robh+dt@kernel.org>
      Link: http://lkml.kernel.org/r/1460365075-7316-5-git-send-email-marc.zyngier@arm.comSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      e3825ba1
    • Marc Zyngier's avatar
      irqchip: Add per-cpu interrupt partitioning library · 9e2c986c
      Marc Zyngier authored
      We've unfortunately started seeing a situation where percpu interrupts
      are partitioned in the system: one arbitrary set of CPUs has an
      interrupt connected to a type of device, while another disjoint
      set of CPUs has the same interrupt connected to another type of device.
      
      This makes it impossible to have a device driver requesting this interrupt
      using the current percpu-interrupt abstraction, as the same interrupt number
      is now potentially claimed by at least two drivers, and we forbid interrupt
      sharing on per-cpu interrupt.
      
      A solution to this is to turn things upside down. Let's assume that our
      system describes all the possible partitions for a given interrupt, and
      give each of them a unique identifier. It is then possible to create
      a namespace where the affinity identifier itself is a form of interrupt
      number. At this point, it becomes easy to implement a set of partitions
      as a cascaded irqchip, each affinity identifier being the HW irq.
      
      This allows us to keep a number of nice properties:
      - Each partition results in a separate percpu-interrupt (with a restrictied
        affinity), which keeps drivers happy.
      - Because the underlying interrupt is still per-cpu, the overhead of
        the indirection can be kept pretty minimal.
      - The core code can ignore most of that crap.
      
      For that purpose, we implement a small library that deals with some of
      the boilerplate code, relying on platform-specific drivers to provide
      a description of the affinity sets and a set of callbacks.
      Signed-off-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: devicetree@vger.kernel.org
      Cc: Jason Cooper <jason@lakedaemon.net>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: Rob Herring <robh+dt@kernel.org>
      Link: http://lkml.kernel.org/r/1460365075-7316-4-git-send-email-marc.zyngier@arm.comSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      9e2c986c
    • Marc Zyngier's avatar
      genirq: Allow the affinity of a percpu interrupt to be set/retrieved · 222df54f
      Marc Zyngier authored
      In order to prepare the genirq layer for the concept of partitionned
      percpu interrupts, let's allow an affinity to be associated with
      such an interrupt. We introduce:
      
      - irq_set_percpu_devid_partition: flag an interrupt as a percpu-devid
        interrupt, and associate it with an affinity
      - irq_get_percpu_devid_partition: allow the affinity of that interrupt
        to be retrieved.
      
      This will allow a driver to discover which CPUs the per-cpu interrupt
      can actually fire on.
      Signed-off-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: devicetree@vger.kernel.org
      Cc: Jason Cooper <jason@lakedaemon.net>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: Rob Herring <robh+dt@kernel.org>
      Link: http://lkml.kernel.org/r/1460365075-7316-3-git-send-email-marc.zyngier@arm.comSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      222df54f
    • Marc Zyngier's avatar
      irqdomain: Allow domain matching on irq_fwspec · 651e8b54
      Marc Zyngier authored
      When iterating over the irq domain list, we try to match a domain
      either by calling a match() function or by comparing a number
      of fields passed as parameters.
      
      Both approaches are a bit restrictive:
      - match() is DT specific and only takes a device node
      - the fallback case only deals with the fwnode_handle
      
      It would be useful if we had a per-domain function that would
      actually perform the matching check on the whole of the
      irq_fwspec structure. This would allow for a domain to triage
      matching attempts that need to extend beyond the fwnode.
      
      Let's introduce irq_find_matching_fwspec(), which takes a full
      blown irq_fwspec structure, and call into a select() function
      implemented by the irqdomain. irq_find_matching_fwnode() is
      made a wrapper around irq_find_matching_fwspec in order to
      preserve compatibility.
      Signed-off-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: devicetree@vger.kernel.org
      Cc: Jason Cooper <jason@lakedaemon.net>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: Rob Herring <robh+dt@kernel.org>
      Link: http://lkml.kernel.org/r/1460365075-7316-2-git-send-email-marc.zyngier@arm.comSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      651e8b54
    • Matt Redfearn's avatar
      genirq: Add error code reporting to irq_{reserve,destroy}_ipi · 7cec18a3
      Matt Redfearn authored
      Make these functions return appropriate error codes when something goes
      wrong.
      
      Previously irq_destroy_ipi returned void making it impossible to notify
      the caller if the request could not be fulfilled. Patch 1 in the series
      added another condition in which this could fail in addition to the
      existing ones. irq_reserve_ipi returned an unsigned int meaning it could
      only return 0 on failure and give the caller no indication as to why the
      request failed.
      
      As time goes on there are likely to be further conditions added in which
      these functions can fail. These APIs and the IPI IRQ domain are new in
      4.6 and the number of existing call sites are low, changing the API now
      has little impact on the code, while making it easier for these
      functions to grow over time.
      Signed-off-by: default avatarMatt Redfearn <matt.redfearn@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: jason@lakedaemon.net
      Cc: marc.zyngier@arm.com
      Cc: ralf@linux-mips.org
      Cc: Qais Yousef <qsyousef@gmail.com>
      Cc: lisa.parratt@imgtec.com
      Cc: jiang.liu@linux.intel.com
      Link: http://lkml.kernel.org/r/1461568464-31701-2-git-send-email-matt.redfearn@imgtec.comSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      7cec18a3
    • Matt Redfearn's avatar
      genirq: Make irq_destroy_ipi take a cpumask of IPIs to destroy · 01292cea
      Matt Redfearn authored
      Previously irq_destroy_ipi() would destroy IPIs to all CPUs that were
      configured by irq_reserve_ipi(). This change makes it possible to
      destroy just a subset of the IPIs. This may be useful to remove IPIs to
      CPUs that have been hot removed so that the IRQ numbers allocated within
      the IPI domain can be re-used.
      
      The original behaviour is restored by passing the complete mask that the
      IPI was created with.
      
      There are currently no users of this function that would break from the
      API change.
      Signed-off-by: default avatarMatt Redfearn <matt.redfearn@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: jason@lakedaemon.net
      Cc: marc.zyngier@arm.com
      Cc: ralf@linux-mips.org
      Cc: Qais Yousef <qsyousef@gmail.com>
      Cc: lisa.parratt@imgtec.com
      Cc: jiang.liu@linux.intel.com
      Link: http://lkml.kernel.org/r/1461568464-31701-1-git-send-email-matt.redfearn@imgtec.comSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      01292cea
  5. 27 Apr, 2016 8 commits