From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3F8B7C52D7C for ; Sun, 11 Aug 2024 12:19:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=iZIFwEpbwN6b6YqXs/aZ1ZC2OAsHdBtl53ju7f62mUU=; b=btu0Z3Qdt0NyyVCn1hpJPb97RX TYPTDxLTwdIYtrnHJGq8XhOEkLXgQSbU5/enjUA7NiKQfoNR4H4LkA7bkUO6vCqGfXkIbQyl6qsXa yT3vp+kQcUtrP58lWBK09ty5pyDu5AXEVUInkneIkIjZLYs7Dyrw1NIstIjFu8MDOEVSxgd+V6Oga yN/hAxFjHuylO17AMjCVwWMyh3v3fX8vq6fm9j8r6spM5sANKUveAAT4y+Vz54CGxns3ZUWZX8dT/ 5ElTohGRmSzUzz03jiBnvqKCsehOcf8kdDdy8iRw30bWgmXCP7LONRi+UdFyyLbLZV+dEKVzs7pD6 1o1LAXlw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sd7XB-0000000FVYv-2p71; Sun, 11 Aug 2024 12:18:53 +0000 Received: from mgamail.intel.com ([198.175.65.9]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sd7Wa-0000000FVUZ-13aP for linux-arm-kernel@lists.infradead.org; Sun, 11 Aug 2024 12:18:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1723378697; x=1754914697; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=hHwWR9mdrr1F86wPJmxJ+Z+hpsFfE7JK/YLabgBSPHc=; b=T8VkHxJ2H7vWtU+zwgWVItId3zbyvlfmREqB25WfJetGYO4j+wCRqFA6 IMhUzmJa04I3XT6+JXXd3c/KF0aEAXgHrERPvWBQ53y+GtGJUg3yTnWB3 FawmtcGfNTxs2Fl8JfXTZbyl9nCz9sjY/02MkuBGum22wTprETSretAKZ 5Vqfpbelmf0/6TmvxmySUnP30TCVjff2hX5Lkl1Tj20RKk7H99Tx+2g9A hnD8k/sXFecudtAgYIrH2/xMFnWRPBu9ABCfDJyWrMEDbvpj/OmtCOWT/ 5mbYmB/uj8bwcbhHmu9Tdd4koUr18HMKChj3KQvRJZoN2YP0esdObEhRK Q==; X-CSE-ConnectionGUID: AyNlWyl9QuOtIoLIJpZIPA== X-CSE-MsgGUID: q5UX12WOS+WFiL6Iud/uwQ== X-IronPort-AV: E=McAfee;i="6700,10204,11161"; a="44012925" X-IronPort-AV: E=Sophos;i="6.09,281,1716274800"; d="scan'208";a="44012925" Received: from fmviesa004.fm.intel.com ([10.60.135.144]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2024 05:18:07 -0700 X-CSE-ConnectionGUID: bdThaog8TSmmVcTT7UQGHw== X-CSE-MsgGUID: aUUBDBetRYS5ZabXVNtqXw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,281,1716274800"; d="scan'208";a="62663202" Received: from unknown (HELO b6bf6c95bbab) ([10.239.97.151]) by fmviesa004.fm.intel.com with ESMTP; 11 Aug 2024 05:18:03 -0700 Received: from kbuild by b6bf6c95bbab with local (Exim 4.96) (envelope-from ) id 1sd7WL-000AoV-1D; Sun, 11 Aug 2024 12:18:01 +0000 Date: Sun, 11 Aug 2024 20:17:24 +0800 From: kernel test robot To: Florian Fainelli , linux-arm-kernel@lists.infradead.org Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev, Florian Fainelli , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Sudeep Holla , Cristian Marussi , 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 Message-ID: <202408112059.XkTMhslU-lkp@intel.com> References: <20240810214621.14417-3-florian.fainelli@broadcom.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240810214621.14417-3-florian.fainelli@broadcom.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240811_051816_411991_FC8DC26E X-CRM114-Status: GOOD ( 16.75 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 | 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], \ | ^ :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