Skip to content

Commit

Permalink
Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/l…
Browse files Browse the repository at this point in the history
…inux/kernel/git/tip/tip

Pull irq fixes from Ingo Molnar:
 "Three irqchip driver fixes, and an affinity mask helper function bug
  fix affecting x86"

* 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  Revert "genirq: Restrict effective affinity to interrupts actually using it"
  irqchip.mips-gic: Fix shared interrupt mask writes
  irqchip/gic-v4: Fix building with ancient gcc
  irqchip/gic-v3: Iterate over possible CPUs by for_each_possible_cpu()
  • Loading branch information
torvalds committed Sep 24, 2017
2 parents a430643 + cf00ab8 commit 43d368a
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 14 deletions.
8 changes: 4 additions & 4 deletions drivers/irqchip/irq-gic-v3.c
Original file line number Diff line number Diff line change
Expand Up @@ -1042,7 +1042,7 @@ static int get_cpu_number(struct device_node *dn)
{
const __be32 *cell;
u64 hwid;
int i;
int cpu;

cell = of_get_property(dn, "reg", NULL);
if (!cell)
Expand All @@ -1056,9 +1056,9 @@ static int get_cpu_number(struct device_node *dn)
if (hwid & ~MPIDR_HWID_BITMASK)
return -1;

for (i = 0; i < num_possible_cpus(); i++)
if (cpu_logical_map(i) == hwid)
return i;
for_each_possible_cpu(cpu)
if (cpu_logical_map(cpu) == hwid)
return cpu;

return -1;
}
Expand Down
12 changes: 9 additions & 3 deletions drivers/irqchip/irq-gic-v4.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,9 @@ int its_map_vlpi(int irq, struct its_vlpi_map *map)
{
struct its_cmd_info info = {
.cmd_type = MAP_VLPI,
.map = map,
{
.map = map,
},
};

/*
Expand All @@ -189,7 +191,9 @@ int its_get_vlpi(int irq, struct its_vlpi_map *map)
{
struct its_cmd_info info = {
.cmd_type = GET_VLPI,
.map = map,
{
.map = map,
},
};

return irq_set_vcpu_affinity(irq, &info);
Expand All @@ -205,7 +209,9 @@ int its_prop_update_vlpi(int irq, u8 config, bool inv)
{
struct its_cmd_info info = {
.cmd_type = inv ? PROP_UPDATE_AND_INV_VLPI : PROP_UPDATE_VLPI,
.config = config,
{
.config = config,
},
};

return irq_set_vcpu_affinity(irq, &info);
Expand Down
6 changes: 3 additions & 3 deletions drivers/irqchip/irq-mips-gic.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ static void gic_mask_irq(struct irq_data *d)
{
unsigned int intr = GIC_HWIRQ_TO_SHARED(d->hwirq);

write_gic_rmask(BIT(intr));
write_gic_rmask(intr);
gic_clear_pcpu_masks(intr);
}

Expand All @@ -179,7 +179,7 @@ static void gic_unmask_irq(struct irq_data *d)
unsigned int intr = GIC_HWIRQ_TO_SHARED(d->hwirq);
unsigned int cpu;

write_gic_smask(BIT(intr));
write_gic_smask(intr);

gic_clear_pcpu_masks(intr);
cpu = cpumask_first_and(affinity, cpu_online_mask);
Expand Down Expand Up @@ -767,7 +767,7 @@ static int __init gic_of_init(struct device_node *node,
for (i = 0; i < gic_shared_intrs; i++) {
change_gic_pol(i, GIC_POL_ACTIVE_HIGH);
change_gic_trig(i, GIC_TRIG_LEVEL);
write_gic_rmask(BIT(i));
write_gic_rmask(i);
}

for (i = 0; i < gic_vpes; i++) {
Expand Down
5 changes: 1 addition & 4 deletions include/linux/irq.h
Original file line number Diff line number Diff line change
Expand Up @@ -783,10 +783,7 @@ static inline struct cpumask *irq_data_get_affinity_mask(struct irq_data *d)
static inline
struct cpumask *irq_data_get_effective_affinity_mask(struct irq_data *d)
{
if (!cpumask_empty(d->common->effective_affinity))
return d->common->effective_affinity;

return d->common->affinity;
return d->common->effective_affinity;
}
static inline void irq_data_update_effective_affinity(struct irq_data *d,
const struct cpumask *m)
Expand Down

0 comments on commit 43d368a

Please sign in to comment.