Skip to content

Commit d2ff0ff

Browse files
committed
Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC fixes from Olof Johansson: "A few fixes who have come in near or during the merge window: - Removal of a VLA usage in Marvell mpp platform code - Enable some IPMI options for ARM64 servers by default, helps testing - Enable PREEMPT on 32-bit ARMv7 defconfig - Minor fix for stm32 DT (removal of an unused DMA property) - Bugfix for TI OMAP1-based ams-delta (-EINVAL -> IRQ_NOTCONNECTED)" * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: ARM: dts: stm32: update HASH1 dmas property on stm32mp157c ARM: orion: avoid VLA in orion_mpp_conf ARM: defconfig: Update multi_v7 to use PREEMPT arm64: defconfig: Enable some IPMI configs soc: ti: QMSS: Fix usage of irq_set_affinity_hint ARM: OMAP1: ams-delta: Fix impossible .irq < 0
2 parents 83650fd + 8008cc7 commit d2ff0ff

File tree

8 files changed

+35
-22
lines changed

8 files changed

+35
-22
lines changed

arch/arm/boot/dts/stm32mp157c.dtsi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -923,7 +923,7 @@
923923
interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>;
924924
clocks = <&rcc HASH1>;
925925
resets = <&rcc HASH1_R>;
926-
dmas = <&mdma1 31 0x10 0x1000A02 0x0 0x0 0x0>;
926+
dmas = <&mdma1 31 0x10 0x1000A02 0x0 0x0>;
927927
dma-names = "in";
928928
dma-maxburst = <2>;
929929
status = "disabled";

arch/arm/configs/multi_v7_defconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
CONFIG_SYSVIPC=y
22
CONFIG_NO_HZ=y
33
CONFIG_HIGH_RES_TIMERS=y
4+
CONFIG_PREEMPT=y
45
CONFIG_CGROUPS=y
56
CONFIG_BLK_DEV_INITRD=y
67
CONFIG_EMBEDDED=y

arch/arm/mach-omap1/board-ams-delta.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -773,7 +773,7 @@ static struct plat_serial8250_port ams_delta_modem_ports[] = {
773773
{
774774
.membase = IOMEM(MODEM_VIRT),
775775
.mapbase = MODEM_PHYS,
776-
.irq = -EINVAL, /* changed later */
776+
.irq = IRQ_NOTCONNECTED, /* changed later */
777777
.flags = UPF_BOOT_AUTOCONF,
778778
.irqflags = IRQF_TRIGGER_RISING,
779779
.iotype = UPIO_MEM,
@@ -864,8 +864,7 @@ static int __init modem_nreset_init(void)
864864

865865

866866
/*
867-
* This function expects MODEM IRQ number already assigned to the port
868-
* and fails if it's not.
867+
* This function expects MODEM IRQ number already assigned to the port.
869868
* The MODEM device requires its RESET# pin kept high during probe.
870869
* That requirement can be fulfilled in several ways:
871870
* - with a descriptor of already functional modem_nreset regulator
@@ -888,9 +887,6 @@ static int __init ams_delta_modem_init(void)
888887
if (!machine_is_ams_delta())
889888
return -ENODEV;
890889

891-
if (ams_delta_modem_ports[0].irq < 0)
892-
return ams_delta_modem_ports[0].irq;
893-
894890
omap_cfg_reg(M14_1510_GPIO2);
895891

896892
/* Initialize the modem_nreset regulator consumer before use */

arch/arm/plat-orion/mpp.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,15 @@ void __init orion_mpp_conf(unsigned int *mpp_list, unsigned int variant_mask,
2828
unsigned int mpp_max, void __iomem *dev_bus)
2929
{
3030
unsigned int mpp_nr_regs = (1 + mpp_max/8);
31-
u32 mpp_ctrl[mpp_nr_regs];
31+
u32 mpp_ctrl[8];
3232
int i;
3333

3434
printk(KERN_DEBUG "initial MPP regs:");
35+
if (mpp_nr_regs > ARRAY_SIZE(mpp_ctrl)) {
36+
printk(KERN_ERR "orion_mpp_conf: invalid mpp_max\n");
37+
return;
38+
}
39+
3540
for (i = 0; i < mpp_nr_regs; i++) {
3641
mpp_ctrl[i] = readl(mpp_ctrl_addr(i, dev_bus));
3742
printk(" %08x", mpp_ctrl[i]);

arch/arm64/configs/defconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,9 @@ CONFIG_SERIAL_XILINX_PS_UART_CONSOLE=y
308308
CONFIG_SERIAL_MVEBU_UART=y
309309
CONFIG_SERIAL_DEV_BUS=y
310310
CONFIG_VIRTIO_CONSOLE=y
311+
CONFIG_IPMI_HANDLER=m
312+
CONFIG_IPMI_DEVICE_INTERFACE=m
313+
CONFIG_IPMI_SI=m
311314
CONFIG_TCG_TPM=y
312315
CONFIG_TCG_TIS_I2C_INFINEON=y
313316
CONFIG_I2C_CHARDEV=y

drivers/soc/ti/knav_qmss.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,8 +329,8 @@ struct knav_range_ops {
329329
};
330330

331331
struct knav_irq_info {
332-
int irq;
333-
u32 cpu_map;
332+
int irq;
333+
struct cpumask *cpu_mask;
334334
};
335335

336336
struct knav_range_info {

drivers/soc/ti/knav_qmss_acc.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -205,18 +205,18 @@ static int knav_range_setup_acc_irq(struct knav_range_info *range,
205205
{
206206
struct knav_device *kdev = range->kdev;
207207
struct knav_acc_channel *acc;
208-
unsigned long cpu_map;
208+
struct cpumask *cpu_mask;
209209
int ret = 0, irq;
210210
u32 old, new;
211211

212212
if (range->flags & RANGE_MULTI_QUEUE) {
213213
acc = range->acc;
214214
irq = range->irqs[0].irq;
215-
cpu_map = range->irqs[0].cpu_map;
215+
cpu_mask = range->irqs[0].cpu_mask;
216216
} else {
217217
acc = range->acc + queue;
218218
irq = range->irqs[queue].irq;
219-
cpu_map = range->irqs[queue].cpu_map;
219+
cpu_mask = range->irqs[queue].cpu_mask;
220220
}
221221

222222
old = acc->open_mask;
@@ -239,8 +239,8 @@ static int knav_range_setup_acc_irq(struct knav_range_info *range,
239239
acc->name, acc->name);
240240
ret = request_irq(irq, knav_acc_int_handler, 0, acc->name,
241241
range);
242-
if (!ret && cpu_map) {
243-
ret = irq_set_affinity_hint(irq, to_cpumask(&cpu_map));
242+
if (!ret && cpu_mask) {
243+
ret = irq_set_affinity_hint(irq, cpu_mask);
244244
if (ret) {
245245
dev_warn(range->kdev->dev,
246246
"Failed to set IRQ affinity\n");

drivers/soc/ti/knav_qmss_queue.c

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -118,19 +118,17 @@ static int knav_queue_setup_irq(struct knav_range_info *range,
118118
struct knav_queue_inst *inst)
119119
{
120120
unsigned queue = inst->id - range->queue_base;
121-
unsigned long cpu_map;
122121
int ret = 0, irq;
123122

124123
if (range->flags & RANGE_HAS_IRQ) {
125124
irq = range->irqs[queue].irq;
126-
cpu_map = range->irqs[queue].cpu_map;
127125
ret = request_irq(irq, knav_queue_int_handler, 0,
128126
inst->irq_name, inst);
129127
if (ret)
130128
return ret;
131129
disable_irq(irq);
132-
if (cpu_map) {
133-
ret = irq_set_affinity_hint(irq, to_cpumask(&cpu_map));
130+
if (range->irqs[queue].cpu_mask) {
131+
ret = irq_set_affinity_hint(irq, range->irqs[queue].cpu_mask);
134132
if (ret) {
135133
dev_warn(range->kdev->dev,
136134
"Failed to set IRQ affinity\n");
@@ -1262,9 +1260,19 @@ static int knav_setup_queue_range(struct knav_device *kdev,
12621260

12631261
range->num_irqs++;
12641262

1265-
if (IS_ENABLED(CONFIG_SMP) && oirq.args_count == 3)
1266-
range->irqs[i].cpu_map =
1267-
(oirq.args[2] & 0x0000ff00) >> 8;
1263+
if (IS_ENABLED(CONFIG_SMP) && oirq.args_count == 3) {
1264+
unsigned long mask;
1265+
int bit;
1266+
1267+
range->irqs[i].cpu_mask = devm_kzalloc(dev,
1268+
cpumask_size(), GFP_KERNEL);
1269+
if (!range->irqs[i].cpu_mask)
1270+
return -ENOMEM;
1271+
1272+
mask = (oirq.args[2] & 0x0000ff00) >> 8;
1273+
for_each_set_bit(bit, &mask, BITS_PER_LONG)
1274+
cpumask_set_cpu(bit, range->irqs[i].cpu_mask);
1275+
}
12681276
}
12691277

12701278
range->num_irqs = min(range->num_irqs, range->num_queues);

0 commit comments

Comments
 (0)