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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 51403C54798 for ; Tue, 5 Mar 2024 09:24:47 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D96666B0093; Tue, 5 Mar 2024 04:24:46 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D472C6B009A; Tue, 5 Mar 2024 04:24:46 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C0E9D6B009C; Tue, 5 Mar 2024 04:24:46 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id ACACC6B0093 for ; Tue, 5 Mar 2024 04:24:46 -0500 (EST) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 7FBCA1A0B96 for ; Tue, 5 Mar 2024 09:24:46 +0000 (UTC) X-FDA: 81862450572.08.0A666B8 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) by imf14.hostedemail.com (Postfix) with ESMTP id 22C4C10000D for ; Tue, 5 Mar 2024 09:24:42 +0000 (UTC) Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=a9vfh94s; spf=pass (imf14.hostedemail.com: domain of lkp@intel.com designates 192.198.163.19 as permitted sender) smtp.mailfrom=lkp@intel.com; dmarc=pass (policy=none) header.from=intel.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1709630683; a=rsa-sha256; cv=none; b=hiju0odfbKpktFgYKJPzLrlDnYga9gdy8f2Pvw7YG/8h7PPuragF+pRK6ifhFr3vlm0BEY i3V/8e4stmMyrmeNAKsShzgg6Cnz7tKdtuaf4jwLI4Kkvva5jaj8RmKvylFkeTBpGbO9Pa Ou08P2nga+au4jpvqgRtSVaUr8DSowE= ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=a9vfh94s; spf=pass (imf14.hostedemail.com: domain of lkp@intel.com designates 192.198.163.19 as permitted sender) smtp.mailfrom=lkp@intel.com; dmarc=pass (policy=none) header.from=intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1709630683; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding:in-reply-to: references:dkim-signature; bh=DP8ffSiDrl9y2/S/8g6njeYENpvnuRH3Vfurqy8djew=; b=X4NmVGbN1vUJ02P9r0NomJeMI7r0cUje6ebPqr6WVTwXHL+qismXxKWGNDVWLD4cM7IxX1 rnzGa1HL0HlDe5vL64gkQR8qYL6voY142euvFIYigcPRyYEl6to9u4MKpY3oy1887Hf3q1 +bgJv8QXeswktEO4EOf6XseQjhgSc5c= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709630683; x=1741166683; h=date:from:to:cc:subject:message-id:mime-version; bh=GK/G6YOr6+r/mb4raz1XIrKoWM4QBOgmidhCnylSAP8=; b=a9vfh94s6k14NVZE0Q8s704yYXLDQANXXjSPxLHBWrQukmsIagx8YQZQ 6zbKQPMo+c+Q0c9CJWAIQCjgVCdWn/D1pen7uMh4JWGorzBbw7cOvtJxh 1einaCZuSaoU9WV7784Goz+mY07H1wDbr04y3YVfw7goRsKxHkRy04OOB IMp24SDzFuA2QlidrWBpY7gZ2F65fn7YIkYB55/iSyadbIcu9jFR3VHki /jRzGD16WGcsOdW29SOhwDBQf7zoLBFNez5Qb6dYNYjlt54jVWcqtEqO9 7jvmY43ykAnBKYCs4RpeatowGthTrvsNMw2zSjA/sK2oBvdhXtCdTnhhh Q==; X-IronPort-AV: E=McAfee;i="6600,9927,11003"; a="4030558" X-IronPort-AV: E=Sophos;i="6.06,205,1705392000"; d="scan'208";a="4030558" Received: from fmviesa007.fm.intel.com ([10.60.135.147]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Mar 2024 01:24:41 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,205,1705392000"; d="scan'208";a="9166399" Received: from lkp-server01.sh.intel.com (HELO b21307750695) ([10.239.97.150]) by fmviesa007.fm.intel.com with ESMTP; 05 Mar 2024 01:24:40 -0800 Received: from kbuild by b21307750695 with local (Exim 4.96) (envelope-from ) id 1rhR2L-0003CL-23; Tue, 05 Mar 2024 09:24:37 +0000 Date: Tue, 5 Mar 2024 17:23:45 +0800 From: kernel test robot To: Ji Sheng Teoh Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev, Linux Memory Management List , Will Deacon Subject: [linux-next:master 11348/11963] drivers/perf/starfive_starlink_pmu.c:169:3: error: call to undeclared function 'writeq'; ISO C99 and later do not support implicit function declarations Message-ID: <202403051732.LuCJfZAh-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: 22C4C10000D X-Stat-Signature: 5u83xgnygh7d36bck4qwt8ofeibtir1z X-Rspam-User: X-HE-Tag: 1709630682-692037 X-HE-Meta: U2FsdGVkX18Gjf6DzU9Tx/DSIpDwOzhDQWgnJGaNk/DxNuWyEzyTRMjgS8LHekxRtrKk3mfQ1TMvKW/C+9AeKjDGCfR1tbzYwMp7Gd0HdNJW5G5JBAm+eNMZldUDd09rDVoETnCiFrCI0OA/V/6stn/fhW9YrGpuWajdY2D6SPQNKEb8WtEppbGv4A38+WKlIMpHxfYXwmUJvdDU4ZVdsQThVusu2nasXURXiTYCI1ySjVCU0Oz/yxiW7SU5l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aBi4uY4Ra9wvk/PMDkRJURAvGJzTvRsXpj5V+jYPC+sHoj X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 11afac187274a6177a7ac82997f8691c0f469e41 commit: c2b24812f7bc5fbd6f2f92af070856fbe4c37b40 [11348/11963] perf: starfive: Add StarLink PMU support config: hexagon-allmodconfig (https://download.01.org/0day-ci/archive/20240305/202403051732.LuCJfZAh-lkp@intel.com/config) compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project 325f51237252e6dab8e4e1ea1fa7acbb4faee1cd) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240305/202403051732.LuCJfZAh-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/202403051732.LuCJfZAh-lkp@intel.com/ All errors (new ones prefixed by >>): In file included from drivers/perf/starfive_starlink_pmu.c:16: In file included from include/linux/io.h:13: In file included from arch/hexagon/include/asm/io.h:328: include/asm-generic/io.h:547:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 547 | val = __raw_readb(PCI_IOBASE + addr); | ~~~~~~~~~~ ^ include/asm-generic/io.h:560:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 560 | 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/perf/starfive_starlink_pmu.c:16: In file included from include/linux/io.h:13: In file included from arch/hexagon/include/asm/io.h:328: include/asm-generic/io.h:573:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 573 | 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/perf/starfive_starlink_pmu.c:16: In file included from include/linux/io.h:13: In file included from arch/hexagon/include/asm/io.h:328: include/asm-generic/io.h:584:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 584 | __raw_writeb(value, PCI_IOBASE + addr); | ~~~~~~~~~~ ^ include/asm-generic/io.h:594:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 594 | __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr); | ~~~~~~~~~~ ^ include/asm-generic/io.h:604:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 604 | __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr); | ~~~~~~~~~~ ^ In file included from drivers/perf/starfive_starlink_pmu.c:21: In file included from include/linux/perf_event.h:18: In file included from include/uapi/linux/bpf_perf_event.h:11: In file included from ./arch/hexagon/include/generated/uapi/asm/bpf_perf_event.h:1: In file included from include/uapi/asm-generic/bpf_perf_event.h:4: In file included from include/linux/ptrace.h:10: In file included from include/linux/pid_namespace.h:7: In file included from include/linux/mm.h:2188: include/linux/vmstat.h:522:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion] 522 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_" | ~~~~~~~~~~~ ^ ~~~ >> drivers/perf/starfive_starlink_pmu.c:169:3: error: call to undeclared function 'writeq'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 169 | writeq(val, starlink_pmu->pmu_base + STARLINK_PMU_CYCLE_COUNTER); | ^ >> drivers/perf/starfive_starlink_pmu.c:191:8: error: call to undeclared function 'readq'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 191 | val = readq(starlink_pmu->pmu_base + STARLINK_PMU_INTERRUPT_ENABLE); | ^ drivers/perf/starfive_starlink_pmu.c:200:3: error: call to undeclared function 'writeq'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 200 | writeq(event->hw.config, starlink_pmu->pmu_base + | ^ drivers/perf/starfive_starlink_pmu.c:206:2: error: call to undeclared function 'writeq'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 206 | writeq(val, starlink_pmu->pmu_base + STARLINK_PMU_INTERRUPT_ENABLE); | ^ drivers/perf/starfive_starlink_pmu.c:219:8: error: call to undeclared function 'readq'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 219 | val = readq(starlink_pmu->pmu_base + STARLINK_PMU_CONTROL); | ^ drivers/perf/starfive_starlink_pmu.c:221:2: error: call to undeclared function 'writeq'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 221 | writeq(val, starlink_pmu->pmu_base + STARLINK_PMU_CONTROL); | ^ drivers/perf/starfive_starlink_pmu.c:244:20: error: call to undeclared function 'readq'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 244 | new_raw_count = readq(starlink_pmu->pmu_base + | ^ drivers/perf/starfive_starlink_pmu.c:412:21: error: call to undeclared function 'readq'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 412 | overflow_status = readq(starlink_pmu->pmu_base + | ^ drivers/perf/starfive_starlink_pmu.c:417:3: error: call to undeclared function 'writeq'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 417 | writeq(BIT_ULL(idx), starlink_pmu->pmu_base + | ^ 7 warnings and 9 errors generated. vim +/writeq +169 drivers/perf/starfive_starlink_pmu.c 154 155 static void starlink_pmu_set_event_period(struct perf_event *event) 156 { 157 struct starlink_pmu *starlink_pmu = to_starlink_pmu(event->pmu); 158 struct hw_perf_event *hwc = &event->hw; 159 int idx = event->hw.idx; 160 161 /* 162 * Program counter to half of it's max count to handle 163 * cases of extreme interrupt latency. 164 */ 165 u64 val = STARLINK_PMU_COUNTER_MASK >> 1; 166 167 local64_set(&hwc->prev_count, val); 168 if (hwc->config == STARLINK_CYCLES) > 169 writeq(val, starlink_pmu->pmu_base + STARLINK_PMU_CYCLE_COUNTER); 170 else 171 writeq(val, starlink_pmu->pmu_base + STARLINK_PMU_EVENT_COUNTER + 172 idx * sizeof(u64)); 173 } 174 175 static void starlink_pmu_counter_start(struct perf_event *event, 176 struct starlink_pmu *starlink_pmu) 177 { 178 struct hw_perf_event *hwc = &event->hw; 179 int idx = event->hw.idx; 180 u64 val; 181 182 /* 183 * Enable counter overflow interrupt[63:0], 184 * which is mapped as follow: 185 * 186 * event counter 0 - Bit [0] 187 * event counter 1 - Bit [1] 188 * ... 189 * cycle counter - Bit [63] 190 */ > 191 val = readq(starlink_pmu->pmu_base + STARLINK_PMU_INTERRUPT_ENABLE); 192 193 if (hwc->config == STARLINK_CYCLES) { 194 /* 195 * Cycle count has its dedicated register, and it starts 196 * counting as soon as STARLINK_PMU_GLOBAL_ENABLE is set. 197 */ 198 val |= STARLINK_PMU_CYCLE_OVERFLOW_MASK; 199 } else { 200 writeq(event->hw.config, starlink_pmu->pmu_base + 201 STARLINK_PMU_EVENT_SELECT + idx * sizeof(u64)); 202 203 val |= BIT_ULL(idx); 204 } 205 206 writeq(val, starlink_pmu->pmu_base + STARLINK_PMU_INTERRUPT_ENABLE); 207 208 writeq(STARLINK_PMU_GLOBAL_ENABLE, starlink_pmu->pmu_base + 209 STARLINK_PMU_CONTROL); 210 } 211 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki