From: kernel test robot <lkp@intel.com>
To: Florian Fainelli <florian.fainelli@broadcom.com>,
linux-arm-kernel@lists.infradead.org
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
Florian Fainelli <florian.fainelli@broadcom.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Sudeep Holla <sudeep.holla@arm.com>,
Cristian Marussi <cristian.marussi@arm.com>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
arm-scmi@vger.kernel.org, james.quinlan@broadcom.com,
justin.chen@broadcom.com, kapil.hali@broadcom.com,
bcm-kernel-feedback-list@broadcom.com
Subject: Re: [PATCH 2/2] firmware: arm_scmi: Support 'reg-io-width' property for shared memory
Date: Sun, 11 Aug 2024 20:17:24 +0800 [thread overview]
Message-ID: <202408112059.XkTMhslU-lkp@intel.com> (raw)
In-Reply-To: <20240810214621.14417-3-florian.fainelli@broadcom.com>
Hi Florian,
kernel test robot noticed the following build errors:
[auto build test ERROR on next-20240809]
[cannot apply to robh/for-next soc/for-next linus/master v6.11-rc2 v6.11-rc1 v6.10 v6.11-rc2]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Florian-Fainelli/dt-bindings-sram-Document-reg-io-width-property/20240811-055659
base: next-20240809
patch link: https://lore.kernel.org/r/20240810214621.14417-3-florian.fainelli%40broadcom.com
patch subject: [PATCH 2/2] firmware: arm_scmi: Support 'reg-io-width' property for shared memory
config: hexagon-allmodconfig (https://download.01.org/0day-ci/archive/20240811/202408112059.XkTMhslU-lkp@intel.com/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project f86594788ce93b696675c94f54016d27a6c21d18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240811/202408112059.XkTMhslU-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202408112059.XkTMhslU-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from drivers/firmware/arm_scmi/shmem.c:9:
In file included from include/linux/io.h:14:
In file included from arch/hexagon/include/asm/io.h:328:
include/asm-generic/io.h:548:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
548 | val = __raw_readb(PCI_IOBASE + addr);
| ~~~~~~~~~~ ^
include/asm-generic/io.h:561:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
561 | val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
| ~~~~~~~~~~ ^
include/uapi/linux/byteorder/little_endian.h:37:51: note: expanded from macro '__le16_to_cpu'
37 | #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
| ^
In file included from drivers/firmware/arm_scmi/shmem.c:9:
In file included from include/linux/io.h:14:
In file included from arch/hexagon/include/asm/io.h:328:
include/asm-generic/io.h:574:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
574 | val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
| ~~~~~~~~~~ ^
include/uapi/linux/byteorder/little_endian.h:35:51: note: expanded from macro '__le32_to_cpu'
35 | #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
| ^
In file included from drivers/firmware/arm_scmi/shmem.c:9:
In file included from include/linux/io.h:14:
In file included from arch/hexagon/include/asm/io.h:328:
include/asm-generic/io.h:585:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
585 | __raw_writeb(value, PCI_IOBASE + addr);
| ~~~~~~~~~~ ^
include/asm-generic/io.h:595:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
595 | __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
| ~~~~~~~~~~ ^
include/asm-generic/io.h:605:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
605 | __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
| ~~~~~~~~~~ ^
>> drivers/firmware/arm_scmi/shmem.c:98:4: error: call to undeclared function 'iowrite64'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
98 | __shmem_copy_toio_tpl(64);
| ^
drivers/firmware/arm_scmi/shmem.c:39:3: note: expanded from macro '__shmem_copy_toio_tpl'
39 | iowrite##s(((u##s *)(xfer->tx.buf))[i / shmem_io_width], \
| ^
<scratch space>:43:1: note: expanded from here
43 | iowrite64
| ^
6 warnings and 1 error generated.
vim +/iowrite64 +98 drivers/firmware/arm_scmi/shmem.c
36
37 #define __shmem_copy_toio_tpl(s) \
38 for (unsigned int i = 0; i < xfer->tx.len; i += shmem_io_width) \
39 iowrite##s(((u##s *)(xfer->tx.buf))[i / shmem_io_width], \
40 shmem->msg_payload + i);
41
42 #define __shmem_copy_fromio_tpl(s) \
43 for (unsigned int i = 0; i < xfer->rx.len; i += shmem_io_width) \
44 ((u##s *)(xfer->rx.buf))[i / shmem_io_width] = \
45 ioread##s(shmem->msg_payload + shmem_io_width + i);
46
47 static void shmem_tx_prepare(struct scmi_shared_mem __iomem *shmem,
48 struct scmi_xfer *xfer,
49 struct scmi_chan_info *cinfo,
50 u32 shmem_io_width)
51 {
52 ktime_t stop;
53
54 /*
55 * Ideally channel must be free by now unless OS timeout last
56 * request and platform continued to process the same, wait
57 * until it releases the shared memory, otherwise we may endup
58 * overwriting its response with new message payload or vice-versa.
59 * Giving up anyway after twice the expected channel timeout so as
60 * not to bail-out on intermittent issues where the platform is
61 * occasionally a bit slower to answer.
62 *
63 * Note that after a timeout is detected we bail-out and carry on but
64 * the transport functionality is probably permanently compromised:
65 * this is just to ease debugging and avoid complete hangs on boot
66 * due to a misbehaving SCMI firmware.
67 */
68 stop = ktime_add_ms(ktime_get(), 2 * cinfo->rx_timeout_ms);
69 spin_until_cond((ioread32(&shmem->channel_status) &
70 SCMI_SHMEM_CHAN_STAT_CHANNEL_FREE) ||
71 ktime_after(ktime_get(), stop));
72 if (!(ioread32(&shmem->channel_status) &
73 SCMI_SHMEM_CHAN_STAT_CHANNEL_FREE)) {
74 WARN_ON_ONCE(1);
75 dev_err(cinfo->dev,
76 "Timeout waiting for a free TX channel !\n");
77 return;
78 }
79
80 /* Mark channel busy + clear error */
81 iowrite32(0x0, &shmem->channel_status);
82 iowrite32(xfer->hdr.poll_completion ? 0 : SCMI_SHMEM_FLAG_INTR_ENABLED,
83 &shmem->flags);
84 iowrite32(sizeof(shmem->msg_header) + xfer->tx.len, &shmem->length);
85 iowrite32(pack_scmi_header(&xfer->hdr), &shmem->msg_header);
86 if (xfer->tx.buf) {
87 switch (shmem_io_width) {
88 case 1:
89 __shmem_copy_toio_tpl(8);
90 break;
91 case 2:
92 __shmem_copy_toio_tpl(16);
93 break;
94 case 4:
95 __shmem_copy_toio_tpl(32);
96 break;
97 case 8:
> 98 __shmem_copy_toio_tpl(64);
99 break;
100 default:
101 memcpy_toio(shmem->msg_payload, xfer->tx.buf, xfer->tx.len);
102 break;
103 }
104 }
105 }
106
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2024-08-11 12:19 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-10 21:46 [PATCH 0/2] Support for I/O width within ARM SCMI SHMEM Florian Fainelli
2024-08-10 21:46 ` [PATCH 1/2] dt-bindings: sram: Document reg-io-width property Florian Fainelli
2024-08-11 5:37 ` Christophe JAILLET
2024-08-11 12:39 ` Krzysztof Kozlowski
2024-08-12 16:55 ` Rob Herring
2024-08-10 21:46 ` [PATCH 2/2] firmware: arm_scmi: Support 'reg-io-width' property for shared memory Florian Fainelli
2024-08-11 2:42 ` Florian Fainelli
2024-08-11 12:17 ` kernel test robot [this message]
2024-08-11 12:27 ` kernel test robot
2024-08-11 12:27 ` kernel test robot
2024-08-11 12:42 ` Peng Fan
2024-08-11 21:03 ` Florian Fainelli
2024-08-11 21:08 ` Florian Fainelli
2024-08-12 17:18 ` Cristian Marussi
2024-08-12 17:46 ` Florian Fainelli
2024-08-12 18:01 ` Cristian Marussi
2024-08-12 21:19 ` Florian Fainelli
2024-08-13 5:00 ` Florian Fainelli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202408112059.XkTMhslU-lkp@intel.com \
--to=lkp@intel.com \
--cc=arm-scmi@vger.kernel.org \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=conor+dt@kernel.org \
--cc=cristian.marussi@arm.com \
--cc=devicetree@vger.kernel.org \
--cc=florian.fainelli@broadcom.com \
--cc=james.quinlan@broadcom.com \
--cc=justin.chen@broadcom.com \
--cc=kapil.hali@broadcom.com \
--cc=krzk@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=robh@kernel.org \
--cc=sudeep.holla@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).