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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E6E9CC433EF for ; Fri, 6 May 2022 07:37:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1389612AbiEFHlN (ORCPT ); Fri, 6 May 2022 03:41:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60334 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242343AbiEFHlJ (ORCPT ); Fri, 6 May 2022 03:41:09 -0400 Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B526A66AE0 for ; Fri, 6 May 2022 00:37:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1651822647; x=1683358647; h=date:from:to:cc:subject:message-id:mime-version; bh=6GnqrL7EBjLLoEykq8Y0CQn9hVDmg7VJnwlaAXrMM4I=; b=K6LhcqFP8DawOjoIoPQxqWrOpupeqpYCZYo8okaGEDb4IDXO+upbap6M K/0HqeS7AVJTp72Sw4khgHFoeYxW0COn6Cq8mUea/0UvZrWAoyTwyu3BU GyByz66s7M1Yw0XqcI1jaK/MI2oehWYEsVl2jaHD6oaPS6bV4KNIlHh22 4occxNsTo0LRxfoesFyH6buOea+vat/HvJ1tJKZyUaNsQRjgLGwTl0+Im ckkF7uooL10+6d1owT/caAk8jtlw8L4C8qdJr2xGEWKh/n7M04Sw/q3iP 95lHLhKPjhApcbHt23j9K5bfRjIauJpTeaHw1fUoi5xuAggW9qT5ODkY8 g==; X-IronPort-AV: E=McAfee;i="6400,9594,10338"; a="328927481" X-IronPort-AV: E=Sophos;i="5.91,203,1647327600"; d="scan'208";a="328927481" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 May 2022 00:37:27 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,203,1647327600"; d="scan'208";a="709333660" Received: from lkp-server01.sh.intel.com (HELO 5056e131ad90) ([10.239.97.150]) by fmsmga001.fm.intel.com with ESMTP; 06 May 2022 00:37:25 -0700 Received: from kbuild by 5056e131ad90 with local (Exim 4.95) (envelope-from ) id 1nmsWi-000DFy-MY; Fri, 06 May 2022 07:37:24 +0000 Date: Fri, 6 May 2022 15:36:56 +0800 From: kernel test robot To: Tom Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org, linux-kernel@vger.kernel.org, Emil Renner Berthing Subject: [esmil:visionfive 22/55] drivers/soc/sifive/sifive_l2_cache.c:152:3: error: call to undeclared function 'writeq'; ISO C99 and later do not support implicit function declarations Message-ID: <202205061511.HSxGnz59-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org tree: https://github.com/esmil/linux visionfive head: f568ecc24aebec8ce1c59b86f2a85098675a4091 commit: 7fa12d2f832a42a37ff0d8f4dd7569cee4b0b82f [22/55] sifive/sifive_l2_cache: Add sifive_l2_flush64_range function config: riscv-randconfig-r031-20220505 (https://download.01.org/0day-ci/archive/20220506/202205061511.HSxGnz59-lkp@intel.com/config) compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 5e004fb787698440a387750db7f8028e7cb14cfc) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # install riscv cross compiling tool for clang build # apt-get install binutils-riscv64-linux-gnu # https://github.com/esmil/linux/commit/7fa12d2f832a42a37ff0d8f4dd7569cee4b0b82f git remote add esmil https://github.com/esmil/linux git fetch --no-tags esmil visionfive git checkout 7fa12d2f832a42a37ff0d8f4dd7569cee4b0b82f # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash drivers/soc/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): >> drivers/soc/sifive/sifive_l2_cache.c:152:3: error: call to undeclared function 'writeq'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] writeq(line, l2_base + SIFIVE_L2_FLUSH64); ^ drivers/soc/sifive/sifive_l2_cache.c:142:19: warning: result of comparison of constant 36507222016 with expression of type 'unsigned long' is always false [-Wtautological-constant-out-of-range-compare] (start + len) > (CONFIG_SIFIVE_L2_FLUSH_START + ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/compiler.h:56:47: note: expanded from macro 'if' #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) ) ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ include/linux/compiler.h:58:86: note: expanded from macro '__trace_if_var' #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond)) ~~~~~~~~~~~~~~~~~^~~~~ include/linux/compiler.h:69:3: note: expanded from macro '__trace_if_value' (cond) ? \ ^~~~ drivers/soc/sifive/sifive_l2_cache.c:142:19: warning: result of comparison of constant 36507222016 with expression of type 'unsigned long' is always false [-Wtautological-constant-out-of-range-compare] (start + len) > (CONFIG_SIFIVE_L2_FLUSH_START + ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/compiler.h:56:47: note: expanded from macro 'if' #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) ) ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ include/linux/compiler.h:58:52: note: expanded from macro '__trace_if_var' #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond)) ^~~~ drivers/soc/sifive/sifive_l2_cache.c:142:19: warning: result of comparison of constant 36507222016 with expression of type 'unsigned long' is always false [-Wtautological-constant-out-of-range-compare] (start + len) > (CONFIG_SIFIVE_L2_FLUSH_START + ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/compiler.h:56:47: note: expanded from macro 'if' #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) ) ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ include/linux/compiler.h:58:61: note: expanded from macro '__trace_if_var' #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond)) ^~~~ 3 warnings and 1 error generated. vim +/writeq +152 drivers/soc/sifive/sifive_l2_cache.c 123 124 #ifdef CONFIG_SIFIVE_L2_FLUSH 125 void sifive_l2_flush64_range(unsigned long start, unsigned long len) 126 { 127 unsigned long line; 128 129 if(!l2_base) { 130 pr_warn("L2CACHE: base addr invalid, skipping flush\n"); 131 return; 132 } 133 134 /* TODO: if (len == 0), skipping flush or going on? */ 135 if(!len) { 136 pr_debug("L2CACHE: flush64 range @ 0x%lx(len:0)\n", start); 137 return; 138 } 139 140 /* make sure the address is in the range */ 141 if(start < CONFIG_SIFIVE_L2_FLUSH_START || 142 (start + len) > (CONFIG_SIFIVE_L2_FLUSH_START + 143 CONFIG_SIFIVE_L2_FLUSH_SIZE)) { 144 pr_warn("L2CACHE: flush64 out of range: %lx(%lx), skip flush\n", 145 start, len); 146 return; 147 } 148 149 mb(); /* sync */ 150 for (line = start; line < start + len; 151 line += SIFIVE_L2_FLUSH64_LINE_LEN) { > 152 writeq(line, l2_base + SIFIVE_L2_FLUSH64); 153 mb(); 154 } 155 } 156 EXPORT_SYMBOL_GPL(sifive_l2_flush64_range); 157 #endif 158 -- 0-DAY CI Kernel Test Service https://01.org/lkp