Skip to content

Commit c16e5c9

Browse files
committed
Merge tag 'arm-fixes-6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc
Pull SoC fixes from Arnd Bergmann: "Most of the fixes this time are for platform specific drivers, addressing issues found through build testing on freescale, ep93xx, starfive, and npcm platforms, as as well as the ffa firmware. The fixes for the scmi firmware driver address compatibility problems found on broadcom machines. There are only two devicetree fixes, addressing incorrect in configuration on broadcom and marvell machines. The changes to the Documentation and MAINTAINERS files are for clarification only" * tag 'arm-fixes-6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: firmware: arm_ffa: Avoid string-fortify warning caused by memcpy() firmware: arm_scmi: Queue in scmi layer for mailbox implementation firmware: arm_ffa: Avoid string-fortify warning in export_uuid() firmware: arm_scmi: Give SMC transport precedence over mailbox firmware: arm_scmi: Fix the double free in scmi_debugfs_common_setup() Documentation/process: maintainer-soc: clarify submitting patches dmaengine: cirrus: check that output may be truncated dmaengine: cirrus: ERR_CAST() ioremap error MAINTAINERS: use the canonical soc mailing list address and mark it as L: ARM: dts: bcm2837-rpi-cm3-io3: Fix HDMI hpd-gpio pin arm64: dts: marvell: cn9130-sr-som: fix cp0 mdio pin numbers soc: fsl: cpm1: qmc: Fix unused data compilation warning soc: fsl: cpm1: qmc: Do not use IS_ERR_VALUE() on error pointers reset: starfive: jh71x0: Fix accessing the empty member on JH7110 SoC reset: npcm: convert comma to semicolon
2 parents 5c94bda + 1b59d6c commit c16e5c9

File tree

12 files changed

+92
-40
lines changed

12 files changed

+92
-40
lines changed

Documentation/process/maintainer-soc.rst

Lines changed: 37 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,13 @@ tree as a dedicated branch covering multiple subsystems.
3030
The main SoC tree is housed on git.kernel.org:
3131
https://git.kernel.org/pub/scm/linux/kernel/git/soc/soc.git/
3232

33+
Maintainers
34+
-----------
35+
3336
Clearly this is quite a wide range of topics, which no one person, or even
3437
small group of people are capable of maintaining. Instead, the SoC subsystem
35-
is comprised of many submaintainers, each taking care of individual platforms
36-
and driver subdirectories.
38+
is comprised of many submaintainers (platform maintainers), each taking care of
39+
individual platforms and driver subdirectories.
3740
In this regard, "platform" usually refers to a series of SoCs from a given
3841
vendor, for example, Nvidia's series of Tegra SoCs. Many submaintainers operate
3942
on a vendor level, responsible for multiple product lines. For several reasons,
@@ -43,14 +46,43 @@ MAINTAINERS file.
4346

4447
Most of these submaintainers have their own trees where they stage patches,
4548
sending pull requests to the main SoC tree. These trees are usually, but not
46-
always, listed in MAINTAINERS. The main SoC maintainers can be reached via the
47-
alias [email protected] if there is no platform-specific maintainer, or if they
48-
are unresponsive.
49+
always, listed in MAINTAINERS.
4950

5051
What the SoC tree is not, however, is a location for architecture-specific code
5152
changes. Each architecture has its own maintainers that are responsible for
5253
architectural details, CPU errata and the like.
5354

55+
Submitting Patches for Given SoC
56+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
57+
58+
All typical platform related patches should be sent via SoC submaintainers
59+
(platform-specific maintainers). This includes also changes to per-platform or
60+
shared defconfigs (scripts/get_maintainer.pl might not provide correct
61+
addresses in such case).
62+
63+
Submitting Patches to the Main SoC Maintainers
64+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
65+
66+
The main SoC maintainers can be reached via the alias [email protected] only in
67+
following cases:
68+
69+
1. There are no platform-specific maintainers.
70+
71+
2. Platform-specific maintainers are unresponsive.
72+
73+
3. Introducing a completely new SoC platform. Such new SoC work should be sent
74+
first to common mailing lists, pointed out by scripts/get_maintainer.pl, for
75+
community review. After positive community review, work should be sent to
76+
[email protected] in one patchset containing new arch/foo/Kconfig entry, DTS
77+
files, MAINTAINERS file entry and optionally initial drivers with their
78+
Devicetree bindings. The MAINTAINERS file entry should list new
79+
platform-specific maintainers, who are going to be responsible for handling
80+
patches for the platform from now on.
81+
82+
Note that the [email protected] is usually not the place to discuss the patches,
83+
thus work sent to this address should be already considered as acceptable by
84+
the community.
85+
5486
Information for (new) Submaintainers
5587
------------------------------------
5688

MAINTAINERS

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1761,8 +1761,8 @@ F: include/uapi/linux/if_arcnet.h
17611761
ARM AND ARM64 SoC SUB-ARCHITECTURES (COMMON PARTS)
17621762
M: Arnd Bergmann <[email protected]>
17631763
M: Olof Johansson <[email protected]>
1764-
17651764
L: [email protected] (moderated for non-subscribers)
1765+
17661766
S: Maintained
17671767
P: Documentation/process/maintainer-soc.rst
17681768
C: irc://irc.libera.chat/armlinux
@@ -21778,8 +21778,8 @@ F: drivers/accessibility/speakup/
2177821778
SPEAR PLATFORM/CLOCK/PINCTRL SUPPORT
2177921779
M: Viresh Kumar <[email protected]>
2178021780
M: Shiraz Hashim <[email protected]>
21781-
2178221781
L: [email protected] (moderated for non-subscribers)
21782+
2178321783
S: Maintained
2178421784
W: http://www.st.com/spear
2178521785
F: arch/arm/boot/dts/st/spear*

arch/arm/boot/dts/broadcom/bcm2837-rpi-cm3-io3.dts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
};
7878

7979
&hdmi {
80-
hpd-gpios = <&expgpio 1 GPIO_ACTIVE_LOW>;
80+
hpd-gpios = <&expgpio 0 GPIO_ACTIVE_LOW>;
8181
power-domains = <&power RPI_POWER_DOMAIN_HDMI>;
8282
status = "okay";
8383
};

arch/arm64/boot/dts/marvell/cn9130-sr-som.dtsi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@
136136
};
137137

138138
cp0_mdio_pins: cp0-mdio-pins {
139-
marvell,pins = "mpp40", "mpp41";
139+
marvell,pins = "mpp0", "mpp1";
140140
marvell,function = "ge";
141141
};
142142

drivers/dma/ep93xx_dma.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1391,11 +1391,12 @@ static struct ep93xx_dma_engine *ep93xx_dma_of_probe(struct platform_device *pde
13911391
INIT_LIST_HEAD(&dma_dev->channels);
13921392
for (i = 0; i < edma->num_channels; i++) {
13931393
struct ep93xx_dma_chan *edmac = &edma->channels[i];
1394+
int len;
13941395

13951396
edmac->chan.device = dma_dev;
13961397
edmac->regs = devm_platform_ioremap_resource(pdev, i);
13971398
if (IS_ERR(edmac->regs))
1398-
return edmac->regs;
1399+
return ERR_CAST(edmac->regs);
13991400

14001401
edmac->irq = fwnode_irq_get(dev_fwnode(dev), i);
14011402
if (edmac->irq < 0)
@@ -1404,9 +1405,11 @@ static struct ep93xx_dma_engine *ep93xx_dma_of_probe(struct platform_device *pde
14041405
edmac->edma = edma;
14051406

14061407
if (edma->m2m)
1407-
snprintf(dma_clk_name, sizeof(dma_clk_name), "m2m%u", i);
1408+
len = snprintf(dma_clk_name, sizeof(dma_clk_name), "m2m%u", i);
14081409
else
1409-
snprintf(dma_clk_name, sizeof(dma_clk_name), "m2p%u", i);
1410+
len = snprintf(dma_clk_name, sizeof(dma_clk_name), "m2p%u", i);
1411+
if (len >= sizeof(dma_clk_name))
1412+
return ERR_PTR(-ENOBUFS);
14101413

14111414
edmac->clk = devm_clk_get(dev, dma_clk_name);
14121415
if (IS_ERR(edmac->clk)) {

drivers/firmware/arm_ffa/driver.c

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -481,11 +481,16 @@ static int ffa_msg_send_direct_req2(u16 src_id, u16 dst_id, const uuid_t *uuid,
481481
struct ffa_send_direct_data2 *data)
482482
{
483483
u32 src_dst_ids = PACK_TARGET_INFO(src_id, dst_id);
484+
union {
485+
uuid_t uuid;
486+
__le64 regs[2];
487+
} uuid_regs = { .uuid = *uuid };
484488
ffa_value_t ret, args = {
485-
.a0 = FFA_MSG_SEND_DIRECT_REQ2, .a1 = src_dst_ids,
489+
.a0 = FFA_MSG_SEND_DIRECT_REQ2,
490+
.a1 = src_dst_ids,
491+
.a2 = le64_to_cpu(uuid_regs.regs[0]),
492+
.a3 = le64_to_cpu(uuid_regs.regs[1]),
486493
};
487-
488-
export_uuid((u8 *)&args.a2, uuid);
489494
memcpy((void *)&args + offsetof(ffa_value_t, a4), data, sizeof(*data));
490495

491496
invoke_ffa_fn(args, &ret);
@@ -496,7 +501,7 @@ static int ffa_msg_send_direct_req2(u16 src_id, u16 dst_id, const uuid_t *uuid,
496501
return ffa_to_linux_errno((int)ret.a2);
497502

498503
if (ret.a0 == FFA_MSG_SEND_DIRECT_RESP2) {
499-
memcpy(data, &ret.a4, sizeof(*data));
504+
memcpy(data, (void *)&ret + offsetof(ffa_value_t, a4), sizeof(*data));
500505
return 0;
501506
}
502507

drivers/firmware/arm_scmi/driver.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2976,10 +2976,8 @@ static struct scmi_debug_info *scmi_debugfs_common_setup(struct scmi_info *info)
29762976
dbg->top_dentry = top_dentry;
29772977

29782978
if (devm_add_action_or_reset(info->dev,
2979-
scmi_debugfs_common_cleanup, dbg)) {
2980-
scmi_debugfs_common_cleanup(dbg);
2979+
scmi_debugfs_common_cleanup, dbg))
29812980
return NULL;
2982-
}
29832981

29842982
return dbg;
29852983
}

drivers/firmware/arm_scmi/transports/Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
# SPDX-License-Identifier: GPL-2.0-only
2-
scmi_transport_mailbox-objs := mailbox.o
3-
obj-$(CONFIG_ARM_SCMI_TRANSPORT_MAILBOX) += scmi_transport_mailbox.o
2+
# Keep before scmi_transport_mailbox.o to allow precedence
3+
# while matching the compatible.
44
scmi_transport_smc-objs := smc.o
55
obj-$(CONFIG_ARM_SCMI_TRANSPORT_SMC) += scmi_transport_smc.o
6+
scmi_transport_mailbox-objs := mailbox.o
7+
obj-$(CONFIG_ARM_SCMI_TRANSPORT_MAILBOX) += scmi_transport_mailbox.o
68
scmi_transport_optee-objs := optee.o
79
obj-$(CONFIG_ARM_SCMI_TRANSPORT_OPTEE) += scmi_transport_optee.o
810
scmi_transport_virtio-objs := virtio.o

drivers/firmware/arm_scmi/transports/mailbox.c

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
* @chan_platform_receiver: Optional Platform Receiver mailbox unidirectional channel
2626
* @cinfo: SCMI channel info
2727
* @shmem: Transmit/Receive shared memory area
28+
* @chan_lock: Lock that prevents multiple xfers from being queued
2829
*/
2930
struct scmi_mailbox {
3031
struct mbox_client cl;
@@ -33,6 +34,7 @@ struct scmi_mailbox {
3334
struct mbox_chan *chan_platform_receiver;
3435
struct scmi_chan_info *cinfo;
3536
struct scmi_shared_mem __iomem *shmem;
37+
struct mutex chan_lock;
3638
};
3739

3840
#define client_to_scmi_mailbox(c) container_of(c, struct scmi_mailbox, cl)
@@ -238,6 +240,7 @@ static int mailbox_chan_setup(struct scmi_chan_info *cinfo, struct device *dev,
238240

239241
cinfo->transport_info = smbox;
240242
smbox->cinfo = cinfo;
243+
mutex_init(&smbox->chan_lock);
241244

242245
return 0;
243246
}
@@ -267,27 +270,34 @@ static int mailbox_send_message(struct scmi_chan_info *cinfo,
267270
struct scmi_mailbox *smbox = cinfo->transport_info;
268271
int ret;
269272

270-
ret = mbox_send_message(smbox->chan, xfer);
273+
/*
274+
* The mailbox layer has its own queue. However the mailbox queue
275+
* confuses the per message SCMI timeouts since the clock starts when
276+
* the message is submitted into the mailbox queue. So when multiple
277+
* messages are queued up the clock starts on all messages instead of
278+
* only the one inflight.
279+
*/
280+
mutex_lock(&smbox->chan_lock);
271281

272-
/* mbox_send_message returns non-negative value on success, so reset */
273-
if (ret > 0)
274-
ret = 0;
282+
ret = mbox_send_message(smbox->chan, xfer);
283+
/* mbox_send_message returns non-negative value on success */
284+
if (ret < 0) {
285+
mutex_unlock(&smbox->chan_lock);
286+
return ret;
287+
}
275288

276-
return ret;
289+
return 0;
277290
}
278291

279292
static void mailbox_mark_txdone(struct scmi_chan_info *cinfo, int ret,
280293
struct scmi_xfer *__unused)
281294
{
282295
struct scmi_mailbox *smbox = cinfo->transport_info;
283296

284-
/*
285-
* NOTE: we might prefer not to need the mailbox ticker to manage the
286-
* transfer queueing since the protocol layer queues things by itself.
287-
* Unfortunately, we have to kick the mailbox framework after we have
288-
* received our message.
289-
*/
290297
mbox_client_txdone(smbox->chan, ret);
298+
299+
/* Release channel */
300+
mutex_unlock(&smbox->chan_lock);
291301
}
292302

293303
static void mailbox_fetch_response(struct scmi_chan_info *cinfo,

drivers/reset/reset-npcm.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -405,8 +405,8 @@ static int npcm_rc_probe(struct platform_device *pdev)
405405
if (!of_property_read_u32(pdev->dev.of_node, "nuvoton,sw-reset-number",
406406
&rc->sw_reset_number)) {
407407
if (rc->sw_reset_number && rc->sw_reset_number < 5) {
408-
rc->restart_nb.priority = 192,
409-
rc->restart_nb.notifier_call = npcm_rc_restart,
408+
rc->restart_nb.priority = 192;
409+
rc->restart_nb.notifier_call = npcm_rc_restart;
410410
ret = register_restart_handler(&rc->restart_nb);
411411
if (ret)
412412
dev_warn(&pdev->dev, "failed to register restart handler\n");

0 commit comments

Comments
 (0)