mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-10 09:09:55 -04:00
Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
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 <asm-generic/msi.h> 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 ...
This commit is contained in:
@@ -530,6 +530,10 @@ static inline void irq_set_chip_and_handler(unsigned int irq, struct irq_chip *c
|
||||
}
|
||||
|
||||
extern int irq_set_percpu_devid(unsigned int irq);
|
||||
extern int irq_set_percpu_devid_partition(unsigned int irq,
|
||||
const struct cpumask *affinity);
|
||||
extern int irq_get_percpu_devid_partition(unsigned int irq,
|
||||
struct cpumask *affinity);
|
||||
|
||||
extern void
|
||||
__irq_set_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained,
|
||||
|
||||
@@ -102,8 +102,6 @@
|
||||
#define GICR_SYNCR 0x00C0
|
||||
#define GICR_MOVLPIR 0x0100
|
||||
#define GICR_MOVALLR 0x0110
|
||||
#define GICR_ISACTIVER GICD_ISACTIVER
|
||||
#define GICR_ICACTIVER GICD_ICACTIVER
|
||||
#define GICR_IDREGS GICD_IDREGS
|
||||
#define GICR_PIDR2 GICD_PIDR2
|
||||
|
||||
|
||||
59
include/linux/irqchip/irq-partition-percpu.h
Normal file
59
include/linux/irqchip/irq-partition-percpu.h
Normal file
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
* Copyright (C) 2016 ARM Limited, All Rights Reserved.
|
||||
* Author: Marc Zyngier <marc.zyngier@arm.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <linux/fwnode.h>
|
||||
#include <linux/cpumask.h>
|
||||
#include <linux/irqdomain.h>
|
||||
|
||||
struct partition_affinity {
|
||||
cpumask_t mask;
|
||||
void *partition_id;
|
||||
};
|
||||
|
||||
struct partition_desc;
|
||||
|
||||
#ifdef CONFIG_PARTITION_PERCPU
|
||||
int partition_translate_id(struct partition_desc *desc, void *partition_id);
|
||||
struct partition_desc *partition_create_desc(struct fwnode_handle *fwnode,
|
||||
struct partition_affinity *parts,
|
||||
int nr_parts,
|
||||
int chained_irq,
|
||||
const struct irq_domain_ops *ops);
|
||||
struct irq_domain *partition_get_domain(struct partition_desc *dsc);
|
||||
#else
|
||||
static inline int partition_translate_id(struct partition_desc *desc,
|
||||
void *partition_id)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static inline
|
||||
struct partition_desc *partition_create_desc(struct fwnode_handle *fwnode,
|
||||
struct partition_affinity *parts,
|
||||
int nr_parts,
|
||||
int chained_irq,
|
||||
const struct irq_domain_ops *ops)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline
|
||||
struct irq_domain *partition_get_domain(struct partition_desc *dsc)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
@@ -66,6 +66,7 @@ struct irq_desc {
|
||||
int threads_handled_last;
|
||||
raw_spinlock_t lock;
|
||||
struct cpumask *percpu_enabled;
|
||||
const struct cpumask *percpu_affinity;
|
||||
#ifdef CONFIG_SMP
|
||||
const struct cpumask *affinity_hint;
|
||||
struct irq_affinity_notify *affinity_notify;
|
||||
|
||||
@@ -96,6 +96,8 @@ enum irq_domain_bus_token {
|
||||
struct irq_domain_ops {
|
||||
int (*match)(struct irq_domain *d, struct device_node *node,
|
||||
enum irq_domain_bus_token bus_token);
|
||||
int (*select)(struct irq_domain *d, struct irq_fwspec *fwspec,
|
||||
enum irq_domain_bus_token bus_token);
|
||||
int (*map)(struct irq_domain *d, unsigned int virq, irq_hw_number_t hw);
|
||||
void (*unmap)(struct irq_domain *d, unsigned int virq);
|
||||
int (*xlate)(struct irq_domain *d, struct device_node *node,
|
||||
@@ -211,7 +213,7 @@ struct irq_domain *irq_domain_add_legacy(struct device_node *of_node,
|
||||
irq_hw_number_t first_hwirq,
|
||||
const struct irq_domain_ops *ops,
|
||||
void *host_data);
|
||||
extern struct irq_domain *irq_find_matching_fwnode(struct fwnode_handle *fwnode,
|
||||
extern struct irq_domain *irq_find_matching_fwspec(struct irq_fwspec *fwspec,
|
||||
enum irq_domain_bus_token bus_token);
|
||||
extern void irq_set_default_host(struct irq_domain *host);
|
||||
extern int irq_domain_alloc_descs(int virq, unsigned int nr_irqs,
|
||||
@@ -227,6 +229,17 @@ static inline bool is_fwnode_irqchip(struct fwnode_handle *fwnode)
|
||||
return fwnode && fwnode->type == FWNODE_IRQCHIP;
|
||||
}
|
||||
|
||||
static inline
|
||||
struct irq_domain *irq_find_matching_fwnode(struct fwnode_handle *fwnode,
|
||||
enum irq_domain_bus_token bus_token)
|
||||
{
|
||||
struct irq_fwspec fwspec = {
|
||||
.fwnode = fwnode,
|
||||
};
|
||||
|
||||
return irq_find_matching_fwspec(&fwspec, bus_token);
|
||||
}
|
||||
|
||||
static inline struct irq_domain *irq_find_matching_host(struct device_node *node,
|
||||
enum irq_domain_bus_token bus_token)
|
||||
{
|
||||
@@ -346,9 +359,8 @@ int irq_domain_xlate_onetwocell(struct irq_domain *d, struct device_node *ctrlr,
|
||||
irq_hw_number_t *out_hwirq, unsigned int *out_type);
|
||||
|
||||
/* IPI functions */
|
||||
unsigned int irq_reserve_ipi(struct irq_domain *domain,
|
||||
const struct cpumask *dest);
|
||||
void irq_destroy_ipi(unsigned int irq);
|
||||
int irq_reserve_ipi(struct irq_domain *domain, const struct cpumask *dest);
|
||||
int irq_destroy_ipi(unsigned int irq, const struct cpumask *dest);
|
||||
|
||||
/* V2 interfaces to support hierarchy IRQ domains. */
|
||||
extern struct irq_data *irq_domain_get_irq_data(struct irq_domain *domain,
|
||||
|
||||
Reference in New Issue
Block a user