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 EB2FCC64EC4 for ; Sat, 4 Mar 2023 13:33:02 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3B4D16B0072; Sat, 4 Mar 2023 08:33:02 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 33D896B0073; Sat, 4 Mar 2023 08:33:02 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1DEBC6B0074; Sat, 4 Mar 2023 08:33:02 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 08D5B6B0072 for ; Sat, 4 Mar 2023 08:33:02 -0500 (EST) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id C12FC161149 for ; Sat, 4 Mar 2023 13:33:01 +0000 (UTC) X-FDA: 80531306562.20.3FB6BBA Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by imf09.hostedemail.com (Postfix) with ESMTP id E4555140015 for ; Sat, 4 Mar 2023 13:32:57 +0000 (UTC) Authentication-Results: imf09.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=NBW+B4TP; spf=pass (imf09.hostedemail.com: domain of lkp@intel.com designates 192.55.52.88 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=1677936780; 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=Jo2LRKUc2GveGdOUH2xG5Oe6DSQ/fYoGF17tfROUsEA=; b=FZnUiqvaYUo3WsWNU64stylJRbj3VhF0wey8AE8T4qoIWP3V09JV542moaIfTl/VfTv7wS oPFMS1bd8urg+aSQgLFvhlywsRbMinG2KVO7ZUB/iBs5/64KLBvf3+V+aqVbcavt8AZPb5 9Fe9PCOej+T3diyXbJIVEHYAOLR1wo8= ARC-Authentication-Results: i=1; imf09.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=NBW+B4TP; spf=pass (imf09.hostedemail.com: domain of lkp@intel.com designates 192.55.52.88 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=1677936780; a=rsa-sha256; cv=none; b=EaL7VXSXGrFh5AG+9zFCqpFRaJCKUzUDsjxhhjJxM9/kZx5KfJTopjFkBIbygpBv9u0C4R n5UjYeNT+E6ctNys2fykze6lLFT5Ps2/+H7BNWHB1QguSUkA13bl6vT53TYsI3+jMnkhM6 DlVYI0gDpLCJoxBoMLQMsHtHYKcRREQ= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1677936778; x=1709472778; h=date:from:to:cc:subject:message-id:mime-version; bh=D8qIkQ/BcQYRIHp3dnYN93wDFfeGEb6SYjPyN+KPe7o=; b=NBW+B4TPloYiwuqkvg6CpONjozmVr2EfHC7cNXnTCVBMBVyCdJZXCmTA tnWghnO0aAh7RSKIs9jI7Wo3RSA4Ku1ZAfRcaeAl8wEYmEdybRsHv58NQ MXyT80y8RbPGvUyXGzTakY8cxcWoL9cciV++hBV7MyHwMTyLmzb9agCjf DBTEy7lUh9ie1RFJkKxB/iG6pmyyghYewu++8vhiEenXo9gGkgPIPBE/7 EF4fu97C9BXOB8rcLUqvAYzQZBheLSRhOjqR8El2zkkS0GiaIri0jieLr 9a4JG+l6rCe0E3x7PNv+5O0lH8bDBKNCGN3T9E1yjiNLkJNnu8bMrHOIp Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10639"; a="362859101" X-IronPort-AV: E=Sophos;i="5.98,233,1673942400"; d="scan'208";a="362859101" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Mar 2023 05:32:56 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10639"; a="677977832" X-IronPort-AV: E=Sophos;i="5.98,233,1673942400"; d="scan'208";a="677977832" Received: from lkp-server01.sh.intel.com (HELO 776573491cc5) ([10.239.97.150]) by fmsmga007.fm.intel.com with ESMTP; 04 Mar 2023 05:32:54 -0800 Received: from kbuild by 776573491cc5 with local (Exim 4.96) (envelope-from ) id 1pYS0L-0002Bk-2l; Sat, 04 Mar 2023 13:32:53 +0000 Date: Sat, 4 Mar 2023 21:32:14 +0800 From: kernel test robot To: Marcelo Tosatti Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev, Andrew Morton , Linux Memory Management List Subject: [akpm-mm:mm-unstable 129/143] mm/vmstat.c:907:9: error: call to '__compiletime_assert_291' declared with 'error' attribute: BUILD_BUG failed Message-ID: <202303042137.LlGpydJ8-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Stat-Signature: igpebun5uniweqd18irrgys89pzo6uus X-Rspam-User: X-Rspamd-Queue-Id: E4555140015 X-Rspamd-Server: rspam06 X-HE-Tag: 1677936777-980566 X-HE-Meta: U2FsdGVkX19PqYtzQm7m4VbDeoyvI8QYtCaTSCq/PgV89vDTdd34Rbqv1jR7BTMrOfAIPYcouCTWiJBhuo1cu35kURiiC1N58FNiTBDteJzDHFwDtJaOHPdJYVEzsSar+4tzsojfOSfRdR5DYsLZ5ODHmp7O+YLYjL6Ajd76iTYi5LpmAn+lWM1XuWAHJDNfYObY5pYBdP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AUSQHWwDT3qsn15fY4wBbUW1XYYfC+XBoSflcJ4Hs7d0p4g44dyn4/+ubX+o8wssg1l6Oaqg5XW0OH7EzFZ58adA2Y0QFkBnQ6DiYT1OZchTmdPm2YFcrZhFXfmaOyMmHVuop7kKJ7WY= 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: tree: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-unstable head: df3ae4347aff9be1e9763ffa3b1015fca348bfbd commit: 676a3befc9bac1179f6a160ffe059c11e831a32c [129/143] mm/vmstat: use xchg in cpu_vm_stats_fold config: riscv-randconfig-r016-20230302 (https://download.01.org/0day-ci/archive/20230304/202303042137.LlGpydJ8-lkp@intel.com/config) compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project 67409911353323ca5edf2049ef0df54132fa1ca7) 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://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git/commit/?id=676a3befc9bac1179f6a160ffe059c11e831a32c git remote add akpm-mm https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git git fetch --no-tags akpm-mm mm-unstable git checkout 676a3befc9bac1179f6a160ffe059c11e831a32c # 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 olddefconfig COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot | Link: https://lore.kernel.org/oe-kbuild-all/202303042137.LlGpydJ8-lkp@intel.com/ All errors (new ones prefixed by >>): ~~~~~~~~~~ ^ In file included from mm/vmstat.c:26: In file included from include/linux/writeback.h:13: In file included from include/linux/blk_types.h:10: In file included from include/linux/bvec.h:10: In file included from include/linux/highmem.h:12: In file included from include/linux/hardirq.h:11: In file included from ./arch/riscv/include/generated/asm/hardirq.h:1: In file included from include/asm-generic/hardirq.h:17: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/riscv/include/asm/io.h:136: include/asm-generic/io.h:751:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] insw(addr, buffer, count); ^~~~~~~~~~~~~~~~~~~~~~~~~ arch/riscv/include/asm/io.h:105:53: note: expanded from macro 'insw' #define insw(addr, buffer, count) __insw(PCI_IOBASE + (addr), buffer, count) ~~~~~~~~~~ ^ In file included from mm/vmstat.c:26: In file included from include/linux/writeback.h:13: In file included from include/linux/blk_types.h:10: In file included from include/linux/bvec.h:10: In file included from include/linux/highmem.h:12: In file included from include/linux/hardirq.h:11: In file included from ./arch/riscv/include/generated/asm/hardirq.h:1: In file included from include/asm-generic/hardirq.h:17: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/riscv/include/asm/io.h:136: include/asm-generic/io.h:759:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] insl(addr, buffer, count); ^~~~~~~~~~~~~~~~~~~~~~~~~ arch/riscv/include/asm/io.h:106:53: note: expanded from macro 'insl' #define insl(addr, buffer, count) __insl(PCI_IOBASE + (addr), buffer, count) ~~~~~~~~~~ ^ In file included from mm/vmstat.c:26: In file included from include/linux/writeback.h:13: In file included from include/linux/blk_types.h:10: In file included from include/linux/bvec.h:10: In file included from include/linux/highmem.h:12: In file included from include/linux/hardirq.h:11: In file included from ./arch/riscv/include/generated/asm/hardirq.h:1: In file included from include/asm-generic/hardirq.h:17: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/riscv/include/asm/io.h:136: include/asm-generic/io.h:768:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] outsb(addr, buffer, count); ^~~~~~~~~~~~~~~~~~~~~~~~~~ arch/riscv/include/asm/io.h:118:55: note: expanded from macro 'outsb' #define outsb(addr, buffer, count) __outsb(PCI_IOBASE + (addr), buffer, count) ~~~~~~~~~~ ^ In file included from mm/vmstat.c:26: In file included from include/linux/writeback.h:13: In file included from include/linux/blk_types.h:10: In file included from include/linux/bvec.h:10: In file included from include/linux/highmem.h:12: In file included from include/linux/hardirq.h:11: In file included from ./arch/riscv/include/generated/asm/hardirq.h:1: In file included from include/asm-generic/hardirq.h:17: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/riscv/include/asm/io.h:136: include/asm-generic/io.h:777:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] outsw(addr, buffer, count); ^~~~~~~~~~~~~~~~~~~~~~~~~~ arch/riscv/include/asm/io.h:119:55: note: expanded from macro 'outsw' #define outsw(addr, buffer, count) __outsw(PCI_IOBASE + (addr), buffer, count) ~~~~~~~~~~ ^ In file included from mm/vmstat.c:26: In file included from include/linux/writeback.h:13: In file included from include/linux/blk_types.h:10: In file included from include/linux/bvec.h:10: In file included from include/linux/highmem.h:12: In file included from include/linux/hardirq.h:11: In file included from ./arch/riscv/include/generated/asm/hardirq.h:1: In file included from include/asm-generic/hardirq.h:17: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/riscv/include/asm/io.h:136: include/asm-generic/io.h:786:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] outsl(addr, buffer, count); ^~~~~~~~~~~~~~~~~~~~~~~~~~ arch/riscv/include/asm/io.h:120:55: note: expanded from macro 'outsl' #define outsl(addr, buffer, count) __outsl(PCI_IOBASE + (addr), buffer, count) ~~~~~~~~~~ ^ In file included from mm/vmstat.c:26: In file included from include/linux/writeback.h:13: In file included from include/linux/blk_types.h:10: In file included from include/linux/bvec.h:10: In file included from include/linux/highmem.h:12: In file included from include/linux/hardirq.h:11: In file included from ./arch/riscv/include/generated/asm/hardirq.h:1: In file included from include/asm-generic/hardirq.h:17: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/riscv/include/asm/io.h:136: include/asm-generic/io.h:1134:55: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] return (port > MMIO_UPPER_LIMIT) ? NULL : PCI_IOBASE + port; ~~~~~~~~~~ ^ >> mm/vmstat.c:907:9: error: call to '__compiletime_assert_291' declared with 'error' attribute: BUILD_BUG failed v = xchg(&pzstats->vm_stat_diff[i], 0); ^ include/linux/atomic/atomic-instrumented.h:1886:2: note: expanded from macro 'xchg' arch_xchg(__ai_ptr, __VA_ARGS__); \ ^ arch/riscv/include/asm/cmpxchg.h:146:23: note: expanded from macro 'arch_xchg' (__typeof__(*(ptr))) __xchg((ptr), _x_, sizeof(*(ptr))); \ ^ arch/riscv/include/asm/cmpxchg.h:138:3: note: expanded from macro '__xchg' BUILD_BUG(); \ ^ note: (skipping 3 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) include/linux/compiler_types.h:387:2: note: expanded from macro '_compiletime_assert' __compiletime_assert(condition, msg, prefix, suffix) ^ include/linux/compiler_types.h:380:4: note: expanded from macro '__compiletime_assert' prefix ## suffix(); \ ^ :3:1: note: expanded from here __compiletime_assert_291 ^ mm/vmstat.c:933:9: error: call to '__compiletime_assert_292' declared with 'error' attribute: BUILD_BUG failed v = xchg(&p->vm_node_stat_diff[i], 0); ^ include/linux/atomic/atomic-instrumented.h:1886:2: note: expanded from macro 'xchg' arch_xchg(__ai_ptr, __VA_ARGS__); \ ^ arch/riscv/include/asm/cmpxchg.h:146:23: note: expanded from macro 'arch_xchg' (__typeof__(*(ptr))) __xchg((ptr), _x_, sizeof(*(ptr))); \ ^ arch/riscv/include/asm/cmpxchg.h:138:3: note: expanded from macro '__xchg' BUILD_BUG(); \ ^ note: (skipping 3 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) include/linux/compiler_types.h:387:2: note: expanded from macro '_compiletime_assert' __compiletime_assert(condition, msg, prefix, suffix) ^ include/linux/compiler_types.h:380:4: note: expanded from macro '__compiletime_assert' prefix ## suffix(); \ ^ :7:1: note: expanded from here __compiletime_assert_292 ^ 13 warnings and 2 errors generated. vim +907 mm/vmstat.c 884 885 /* 886 * Fold the data for a cpu into the global array. 887 * There cannot be any access by the offline cpu and therefore 888 * synchronization is simplified. 889 */ 890 void cpu_vm_stats_fold(int cpu) 891 { 892 struct pglist_data *pgdat; 893 struct zone *zone; 894 int i; 895 int global_zone_diff[NR_VM_ZONE_STAT_ITEMS] = { 0, }; 896 int global_node_diff[NR_VM_NODE_STAT_ITEMS] = { 0, }; 897 898 for_each_populated_zone(zone) { 899 struct per_cpu_zonestat *pzstats; 900 901 pzstats = per_cpu_ptr(zone->per_cpu_zonestats, cpu); 902 903 for (i = 0; i < NR_VM_ZONE_STAT_ITEMS; i++) { 904 if (pzstats->vm_stat_diff[i]) { 905 int v; 906 > 907 v = xchg(&pzstats->vm_stat_diff[i], 0); 908 atomic_long_add(v, &zone->vm_stat[i]); 909 global_zone_diff[i] += v; 910 } 911 } 912 #ifdef CONFIG_NUMA 913 for (i = 0; i < NR_VM_NUMA_EVENT_ITEMS; i++) { 914 if (pzstats->vm_numa_event[i]) { 915 unsigned long v; 916 917 v = xchg(&pzstats->vm_numa_event[i], 0); 918 zone_numa_event_add(v, zone, i); 919 } 920 } 921 #endif 922 } 923 924 for_each_online_pgdat(pgdat) { 925 struct per_cpu_nodestat *p; 926 927 p = per_cpu_ptr(pgdat->per_cpu_nodestats, cpu); 928 929 for (i = 0; i < NR_VM_NODE_STAT_ITEMS; i++) 930 if (p->vm_node_stat_diff[i]) { 931 int v; 932 933 v = xchg(&p->vm_node_stat_diff[i], 0); 934 atomic_long_add(v, &pgdat->vm_stat[i]); 935 global_node_diff[i] += v; 936 } 937 } 938 939 fold_diff(global_zone_diff, global_node_diff); 940 } 941 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests