Commit 6ef9d231 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'arm-fixes-5.16-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc

Pull ARM SoC fixes from Arnd Bergmann:
 "There are only a few devicetree fixes this time:

   - one outdated devicetree property that slipped into the newly added
     ExynosAutov9 support

   - three changes to Broadcom SoCs that had incorrect number values for
     interrupts or irqchips.

  In the MAINTAINERS file, Nishanth Menon gets listed for TI K3 SoCs,
  while Taichi Sugaya and Takao Orito take ownership of the Socionext
  Milbeaut platform.

  All other changes are for SoC specific drivers, fixing:

   - A missing NULL pointer check in the mediatek memory driver

   - An integer overflow issue in the Arm smccc firwmare interface

   - A false-positive fortify-source check

   - Error handling fixes for optee and smci

   - Incorrect message format in one SCMI call"

* tag 'arm-fixes-5.16-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc:
  memory: mtk-smi: Fix a null dereference for the ostd
  arm64: dts: exynos: drop samsung,ufs-shareability-reg-offset in ExynosAutov9
  MAINTAINERS: Update maintainer entry for keystone platforms
  MAINTAINERS: Add entry to MAINTAINERS for Milbeaut
  firmware: smccc: Fix check for ARCH_SOC_ID not implemented
  ARM: socfpga: Fix crash with CONFIG_FORTIRY_SOURCE
  firmware: arm_scmi: Fix type error assignment in voltage protocol
  firmware: arm_scmi: Fix type error in sensor protocol
  firmware: arm_scmi: pm: Propagate return value to caller
  firmware: arm_scmi: Fix base agent discover response
  optee: fix kfree NULL pointer
  ARM: dts: bcm2711: Fix PCIe interrupts
  ARM: dts: BCM5301X: Add interrupt properties to GPIO node
  ARM: dts: BCM5301X: Fix I2C controller interrupt
  firmware: arm_scmi: Fix null de-reference on error path
parents 79941493 383a44ae
...@@ -2263,6 +2263,15 @@ L: linux-iio@vger.kernel.org ...@@ -2263,6 +2263,15 @@ L: linux-iio@vger.kernel.org
S: Maintained S: Maintained
F: drivers/counter/microchip-tcb-capture.c F: drivers/counter/microchip-tcb-capture.c
ARM/MILBEAUT ARCHITECTURE
M: Taichi Sugaya <sugaya.taichi@socionext.com>
M: Takao Orito <orito.takao@socionext.com>
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
S: Maintained
F: arch/arm/boot/dts/milbeaut*
F: arch/arm/mach-milbeaut/
N: milbeaut
ARM/MIOA701 MACHINE SUPPORT ARM/MIOA701 MACHINE SUPPORT
M: Robert Jarzmik <robert.jarzmik@free.fr> M: Robert Jarzmik <robert.jarzmik@free.fr>
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
...@@ -2729,10 +2738,11 @@ S: Maintained ...@@ -2729,10 +2738,11 @@ S: Maintained
F: drivers/memory/*emif* F: drivers/memory/*emif*
ARM/TEXAS INSTRUMENT KEYSTONE ARCHITECTURE ARM/TEXAS INSTRUMENT KEYSTONE ARCHITECTURE
M: Nishanth Menon <nm@ti.com>
M: Santosh Shilimkar <ssantosh@kernel.org> M: Santosh Shilimkar <ssantosh@kernel.org>
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
S: Maintained S: Maintained
T: git git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone.git T: git git://git.kernel.org/pub/scm/linux/kernel/git/ti/linux.git
F: arch/arm/boot/dts/keystone-* F: arch/arm/boot/dts/keystone-*
F: arch/arm/mach-keystone/ F: arch/arm/mach-keystone/
...@@ -19031,11 +19041,12 @@ F: drivers/mmc/host/tifm_sd.c ...@@ -19031,11 +19041,12 @@ F: drivers/mmc/host/tifm_sd.c
F: include/linux/tifm.h F: include/linux/tifm.h
TI KEYSTONE MULTICORE NAVIGATOR DRIVERS TI KEYSTONE MULTICORE NAVIGATOR DRIVERS
M: Nishanth Menon <nm@ti.com>
M: Santosh Shilimkar <ssantosh@kernel.org> M: Santosh Shilimkar <ssantosh@kernel.org>
L: linux-kernel@vger.kernel.org L: linux-kernel@vger.kernel.org
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
S: Maintained S: Maintained
T: git git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone.git T: git git://git.kernel.org/pub/scm/linux/kernel/git/ti/linux.git
F: drivers/soc/ti/* F: drivers/soc/ti/*
TI LM49xxx FAMILY ASoC CODEC DRIVERS TI LM49xxx FAMILY ASoC CODEC DRIVERS
......
...@@ -506,11 +506,17 @@ pcie0: pcie@7d500000 { ...@@ -506,11 +506,17 @@ pcie0: pcie@7d500000 {
#address-cells = <3>; #address-cells = <3>;
#interrupt-cells = <1>; #interrupt-cells = <1>;
#size-cells = <2>; #size-cells = <2>;
interrupts = <GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH>, interrupts = <GIC_SPI 147 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH>; <GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "pcie", "msi"; interrupt-names = "pcie", "msi";
interrupt-map-mask = <0x0 0x0 0x0 0x7>; interrupt-map-mask = <0x0 0x0 0x0 0x7>;
interrupt-map = <0 0 0 1 &gicv2 GIC_SPI 143 interrupt-map = <0 0 0 1 &gicv2 GIC_SPI 143
IRQ_TYPE_LEVEL_HIGH>,
<0 0 0 2 &gicv2 GIC_SPI 144
IRQ_TYPE_LEVEL_HIGH>,
<0 0 0 3 &gicv2 GIC_SPI 145
IRQ_TYPE_LEVEL_HIGH>,
<0 0 0 4 &gicv2 GIC_SPI 146
IRQ_TYPE_LEVEL_HIGH>; IRQ_TYPE_LEVEL_HIGH>;
msi-controller; msi-controller;
msi-parent = <&pcie0>; msi-parent = <&pcie0>;
......
...@@ -242,6 +242,8 @@ chipcommon: chipcommon@0 { ...@@ -242,6 +242,8 @@ chipcommon: chipcommon@0 {
gpio-controller; gpio-controller;
#gpio-cells = <2>; #gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <2>;
}; };
pcie0: pcie@12000 { pcie0: pcie@12000 {
...@@ -408,7 +410,7 @@ uart2: serial@18008000 { ...@@ -408,7 +410,7 @@ uart2: serial@18008000 {
i2c0: i2c@18009000 { i2c0: i2c@18009000 {
compatible = "brcm,iproc-i2c"; compatible = "brcm,iproc-i2c";
reg = <0x18009000 0x50>; reg = <0x18009000 0x50>;
interrupts = <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>;
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
clock-frequency = <100000>; clock-frequency = <100000>;
......
...@@ -33,7 +33,7 @@ extern void __iomem *sdr_ctl_base_addr; ...@@ -33,7 +33,7 @@ extern void __iomem *sdr_ctl_base_addr;
u32 socfpga_sdram_self_refresh(u32 sdr_base); u32 socfpga_sdram_self_refresh(u32 sdr_base);
extern unsigned int socfpga_sdram_self_refresh_sz; extern unsigned int socfpga_sdram_self_refresh_sz;
extern char secondary_trampoline, secondary_trampoline_end; extern char secondary_trampoline[], secondary_trampoline_end[];
extern unsigned long socfpga_cpu1start_addr; extern unsigned long socfpga_cpu1start_addr;
......
...@@ -20,14 +20,14 @@ ...@@ -20,14 +20,14 @@
static int socfpga_boot_secondary(unsigned int cpu, struct task_struct *idle) static int socfpga_boot_secondary(unsigned int cpu, struct task_struct *idle)
{ {
int trampoline_size = &secondary_trampoline_end - &secondary_trampoline; int trampoline_size = secondary_trampoline_end - secondary_trampoline;
if (socfpga_cpu1start_addr) { if (socfpga_cpu1start_addr) {
/* This will put CPU #1 into reset. */ /* This will put CPU #1 into reset. */
writel(RSTMGR_MPUMODRST_CPU1, writel(RSTMGR_MPUMODRST_CPU1,
rst_manager_base_addr + SOCFPGA_RSTMGR_MODMPURST); rst_manager_base_addr + SOCFPGA_RSTMGR_MODMPURST);
memcpy(phys_to_virt(0), &secondary_trampoline, trampoline_size); memcpy(phys_to_virt(0), secondary_trampoline, trampoline_size);
writel(__pa_symbol(secondary_startup), writel(__pa_symbol(secondary_startup),
sys_manager_base_addr + (socfpga_cpu1start_addr & 0x000000ff)); sys_manager_base_addr + (socfpga_cpu1start_addr & 0x000000ff));
...@@ -45,12 +45,12 @@ static int socfpga_boot_secondary(unsigned int cpu, struct task_struct *idle) ...@@ -45,12 +45,12 @@ static int socfpga_boot_secondary(unsigned int cpu, struct task_struct *idle)
static int socfpga_a10_boot_secondary(unsigned int cpu, struct task_struct *idle) static int socfpga_a10_boot_secondary(unsigned int cpu, struct task_struct *idle)
{ {
int trampoline_size = &secondary_trampoline_end - &secondary_trampoline; int trampoline_size = secondary_trampoline_end - secondary_trampoline;
if (socfpga_cpu1start_addr) { if (socfpga_cpu1start_addr) {
writel(RSTMGR_MPUMODRST_CPU1, rst_manager_base_addr + writel(RSTMGR_MPUMODRST_CPU1, rst_manager_base_addr +
SOCFPGA_A10_RSTMGR_MODMPURST); SOCFPGA_A10_RSTMGR_MODMPURST);
memcpy(phys_to_virt(0), &secondary_trampoline, trampoline_size); memcpy(phys_to_virt(0), secondary_trampoline, trampoline_size);
writel(__pa_symbol(secondary_startup), writel(__pa_symbol(secondary_startup),
sys_manager_base_addr + (socfpga_cpu1start_addr & 0x00000fff)); sys_manager_base_addr + (socfpga_cpu1start_addr & 0x00000fff));
......
...@@ -296,8 +296,7 @@ ufs_0: ufs0@17e00000 { ...@@ -296,8 +296,7 @@ ufs_0: ufs0@17e00000 {
pinctrl-0 = <&ufs_rst_n &ufs_refclk_out>; pinctrl-0 = <&ufs_rst_n &ufs_refclk_out>;
phys = <&ufs_0_phy>; phys = <&ufs_0_phy>;
phy-names = "ufs-phy"; phy-names = "ufs-phy";
samsung,sysreg = <&syscon_fsys2>; samsung,sysreg = <&syscon_fsys2 0x710>;
samsung,ufs-shareability-reg-offset = <0x710>;
status = "disabled"; status = "disabled";
}; };
}; };
......
...@@ -34,6 +34,12 @@ struct scmi_msg_resp_base_attributes { ...@@ -34,6 +34,12 @@ struct scmi_msg_resp_base_attributes {
__le16 reserved; __le16 reserved;
}; };
struct scmi_msg_resp_base_discover_agent {
__le32 agent_id;
u8 name[SCMI_MAX_STR_SIZE];
};
struct scmi_msg_base_error_notify { struct scmi_msg_base_error_notify {
__le32 event_control; __le32 event_control;
#define BASE_TP_NOTIFY_ALL BIT(0) #define BASE_TP_NOTIFY_ALL BIT(0)
...@@ -225,18 +231,21 @@ static int scmi_base_discover_agent_get(const struct scmi_protocol_handle *ph, ...@@ -225,18 +231,21 @@ static int scmi_base_discover_agent_get(const struct scmi_protocol_handle *ph,
int id, char *name) int id, char *name)
{ {
int ret; int ret;
struct scmi_msg_resp_base_discover_agent *agent_info;
struct scmi_xfer *t; struct scmi_xfer *t;
ret = ph->xops->xfer_get_init(ph, BASE_DISCOVER_AGENT, ret = ph->xops->xfer_get_init(ph, BASE_DISCOVER_AGENT,
sizeof(__le32), SCMI_MAX_STR_SIZE, &t); sizeof(__le32), sizeof(*agent_info), &t);
if (ret) if (ret)
return ret; return ret;
put_unaligned_le32(id, t->tx.buf); put_unaligned_le32(id, t->tx.buf);
ret = ph->xops->do_xfer(ph, t); ret = ph->xops->do_xfer(ph, t);
if (!ret) if (!ret) {
strlcpy(name, t->rx.buf, SCMI_MAX_STR_SIZE); agent_info = t->rx.buf;
strlcpy(name, agent_info->name, SCMI_MAX_STR_SIZE);
}
ph->xops->xfer_put(ph, t); ph->xops->xfer_put(ph, t);
......
...@@ -138,9 +138,7 @@ static int scmi_pm_domain_probe(struct scmi_device *sdev) ...@@ -138,9 +138,7 @@ static int scmi_pm_domain_probe(struct scmi_device *sdev)
scmi_pd_data->domains = domains; scmi_pd_data->domains = domains;
scmi_pd_data->num_domains = num_domains; scmi_pd_data->num_domains = num_domains;
of_genpd_add_provider_onecell(np, scmi_pd_data); return of_genpd_add_provider_onecell(np, scmi_pd_data);
return 0;
} }
static const struct scmi_device_id scmi_id_table[] = { static const struct scmi_device_id scmi_id_table[] = {
......
...@@ -637,7 +637,7 @@ static int scmi_sensor_config_get(const struct scmi_protocol_handle *ph, ...@@ -637,7 +637,7 @@ static int scmi_sensor_config_get(const struct scmi_protocol_handle *ph,
if (ret) if (ret)
return ret; return ret;
put_unaligned_le32(cpu_to_le32(sensor_id), t->tx.buf); put_unaligned_le32(sensor_id, t->tx.buf);
ret = ph->xops->do_xfer(ph, t); ret = ph->xops->do_xfer(ph, t);
if (!ret) { if (!ret) {
struct sensors_info *si = ph->get_priv(ph); struct sensors_info *si = ph->get_priv(ph);
......
...@@ -82,7 +82,8 @@ static bool scmi_vio_have_vq_rx(struct virtio_device *vdev) ...@@ -82,7 +82,8 @@ static bool scmi_vio_have_vq_rx(struct virtio_device *vdev)
} }
static int scmi_vio_feed_vq_rx(struct scmi_vio_channel *vioch, static int scmi_vio_feed_vq_rx(struct scmi_vio_channel *vioch,
struct scmi_vio_msg *msg) struct scmi_vio_msg *msg,
struct device *dev)
{ {
struct scatterlist sg_in; struct scatterlist sg_in;
int rc; int rc;
...@@ -94,8 +95,7 @@ static int scmi_vio_feed_vq_rx(struct scmi_vio_channel *vioch, ...@@ -94,8 +95,7 @@ static int scmi_vio_feed_vq_rx(struct scmi_vio_channel *vioch,
rc = virtqueue_add_inbuf(vioch->vqueue, &sg_in, 1, msg, GFP_ATOMIC); rc = virtqueue_add_inbuf(vioch->vqueue, &sg_in, 1, msg, GFP_ATOMIC);
if (rc) if (rc)
dev_err_once(vioch->cinfo->dev, dev_err_once(dev, "failed to add to virtqueue (%d)\n", rc);
"failed to add to virtqueue (%d)\n", rc);
else else
virtqueue_kick(vioch->vqueue); virtqueue_kick(vioch->vqueue);
...@@ -108,7 +108,7 @@ static void scmi_finalize_message(struct scmi_vio_channel *vioch, ...@@ -108,7 +108,7 @@ static void scmi_finalize_message(struct scmi_vio_channel *vioch,
struct scmi_vio_msg *msg) struct scmi_vio_msg *msg)
{ {
if (vioch->is_rx) { if (vioch->is_rx) {
scmi_vio_feed_vq_rx(vioch, msg); scmi_vio_feed_vq_rx(vioch, msg, vioch->cinfo->dev);
} else { } else {
/* Here IRQs are assumed to be already disabled by the caller */ /* Here IRQs are assumed to be already disabled by the caller */
spin_lock(&vioch->lock); spin_lock(&vioch->lock);
...@@ -269,7 +269,7 @@ static int virtio_chan_setup(struct scmi_chan_info *cinfo, struct device *dev, ...@@ -269,7 +269,7 @@ static int virtio_chan_setup(struct scmi_chan_info *cinfo, struct device *dev,
list_add_tail(&msg->list, &vioch->free_list); list_add_tail(&msg->list, &vioch->free_list);
spin_unlock_irqrestore(&vioch->lock, flags); spin_unlock_irqrestore(&vioch->lock, flags);
} else { } else {
scmi_vio_feed_vq_rx(vioch, msg); scmi_vio_feed_vq_rx(vioch, msg, cinfo->dev);
} }
} }
......
...@@ -156,7 +156,7 @@ static int scmi_voltage_descriptors_get(const struct scmi_protocol_handle *ph, ...@@ -156,7 +156,7 @@ static int scmi_voltage_descriptors_get(const struct scmi_protocol_handle *ph,
int cnt; int cnt;
cmd->domain_id = cpu_to_le32(v->id); cmd->domain_id = cpu_to_le32(v->id);
cmd->level_index = desc_index; cmd->level_index = cpu_to_le32(desc_index);
ret = ph->xops->do_xfer(ph, tl); ret = ph->xops->do_xfer(ph, tl);
if (ret) if (ret)
break; break;
......
...@@ -50,7 +50,7 @@ static int __init smccc_soc_init(void) ...@@ -50,7 +50,7 @@ static int __init smccc_soc_init(void)
arm_smccc_1_1_invoke(ARM_SMCCC_ARCH_FEATURES_FUNC_ID, arm_smccc_1_1_invoke(ARM_SMCCC_ARCH_FEATURES_FUNC_ID,
ARM_SMCCC_ARCH_SOC_ID, &res); ARM_SMCCC_ARCH_SOC_ID, &res);
if (res.a0 == SMCCC_RET_NOT_SUPPORTED) { if ((int)res.a0 == SMCCC_RET_NOT_SUPPORTED) {
pr_info("ARCH_SOC_ID not implemented, skipping ....\n"); pr_info("ARCH_SOC_ID not implemented, skipping ....\n");
return 0; return 0;
} }
......
...@@ -241,7 +241,7 @@ static void mtk_smi_larb_config_port_gen2_general(struct device *dev) ...@@ -241,7 +241,7 @@ static void mtk_smi_larb_config_port_gen2_general(struct device *dev)
{ {
struct mtk_smi_larb *larb = dev_get_drvdata(dev); struct mtk_smi_larb *larb = dev_get_drvdata(dev);
u32 reg, flags_general = larb->larb_gen->flags_general; u32 reg, flags_general = larb->larb_gen->flags_general;
const u8 *larbostd = larb->larb_gen->ostd[larb->larbid]; const u8 *larbostd = larb->larb_gen->ostd ? larb->larb_gen->ostd[larb->larbid] : NULL;
int i; int i;
if (BIT(larb->larbid) & larb->larb_gen->larb_direct_to_common_mask) if (BIT(larb->larbid) & larb->larb_gen->larb_direct_to_common_mask)
......
...@@ -810,10 +810,9 @@ static int optee_ffa_probe(struct ffa_device *ffa_dev) ...@@ -810,10 +810,9 @@ static int optee_ffa_probe(struct ffa_device *ffa_dev)
return -EINVAL; return -EINVAL;
optee = kzalloc(sizeof(*optee), GFP_KERNEL); optee = kzalloc(sizeof(*optee), GFP_KERNEL);
if (!optee) { if (!optee)
rc = -ENOMEM; return -ENOMEM;
goto err;
}
optee->pool = optee_ffa_config_dyn_shm(); optee->pool = optee_ffa_config_dyn_shm();
if (IS_ERR(optee->pool)) { if (IS_ERR(optee->pool)) {
rc = PTR_ERR(optee->pool); rc = PTR_ERR(optee->pool);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment