Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp105377iof; Sun, 5 Jun 2022 22:32:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzfZvSeGt0LG1rruIPJ6T+uXUa0RVjA4osd+EK3+MK8M9zMhO33A0Vm10ah7qAEP6yQalOJ X-Received: by 2002:a05:6a00:14c8:b0:51c:29fb:7b2 with SMTP id w8-20020a056a0014c800b0051c29fb07b2mr374296pfu.24.1654493543849; Sun, 05 Jun 2022 22:32:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654493543; cv=none; d=google.com; s=arc-20160816; b=ZMItVsBJjgFx1NdZtznWgfU8/NQwWivEkOXIqalBBpHNWVFctuHncL4LpBLIu3ayOx HxaJwwX6FtyMUUgbeXCixWxv3Hi3vMCzvw1Q6PxODCPvBKTictb1KP1/s5gmUxNpMqEM akLsGv6lSgLZ+yUJFjLmrbrJS7CCxQok8JZPgr95xMAWZlPDDU2NRbCkH6ZdrtEow/p2 clI/hIhQimNg9Xld5e95kKLej18O0pK4M7IXKj2g2IArRYkGE1APVzWTVaXlQpnrldOA Kk6lWRlCUN6PTurwn0aIIkb3Op18xsKF0WoFer2rlR4YnCrdrzgyNRuK1XizpOz0KCXr jp+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=phaOYmGFVM3f9yWRzjDyr9KgZdfYS0qiyjz0ml4tUVA=; b=kOslJRdXjge4n2e6xV/ulLzEikOW9RiTaGjxvm6ZPkvYnl3hfQeCDUpXAGQY+3e+7a FVBMxK4d7XaKtFQpWUmkiuUoHRgWKw1/jEHsbkXxaJgNCdAof7bDRijGKqzBxZXRI+fL VMPq0XaiGsi2Trt9mvMRK8KZYigvooI/mhKtGDKLSHhYiz+ScXA2fASYZ7hgz8Is/a5I gU5mpm7qV/nWkHctH9vRpsDizAgCLUa8hhOtISOLgR9GQ4xtlGSztEUlVvZ+s+I6/RMr ymBhpqQo0YjwE9U69J0dhOCpOhTpJ1JOlgc/yO3Tep0Qkj3pUq3N2WH7FSMUGVcvADHP Vi+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=M98GQiZ+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id r21-20020a632b15000000b003fcee1b911bsi15201124pgr.517.2022.06.05.22.32.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Jun 2022 22:32:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=M98GQiZ+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5C356214414; Sun, 5 Jun 2022 21:32:18 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233444AbiFDIjc (ORCPT + 99 others); Sat, 4 Jun 2022 04:39:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54632 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231770AbiFDIj2 (ORCPT ); Sat, 4 Jun 2022 04:39:28 -0400 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1582112D0A for ; Sat, 4 Jun 2022 01:39: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=1654331967; x=1685867967; h=date:from:to:cc:subject:message-id:mime-version; bh=p2asbGTYnRUKSc6CNgW+MxeAm9Vp8COBTvXPjJA1nPE=; b=M98GQiZ+RS07BnSb6bh8WazWyVO6jQjFEuMV3EYu2UI42PQnnnWUmYSq uXPnuocVHDNeu+dWk25d2MrarEFLTNmQmqwxHzMTb0Q5C/m7h0NksI4at JVvIl2ZeXbd0VfguM9kxBnS/MQCpfNTpYlP1iYMfk7CjW+Sul0Tn+rWwj E1qDNyXSBH6C9/ZDYC7lCLs0EMlwQuoAW2mubmumK1b6Y5gxbjBNe0nCe 0MQTQbF73+WAGHTfQes7vTE4DBm5yYLLs3uanYVdiPPzpv/hMg7hcqXBf MFH2gXA0/ijurXN6480c4sPoNQNA3WhYN/huMcoBCskU8Ev3eYSxGusXM Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10367"; a="276175205" X-IronPort-AV: E=Sophos;i="5.91,277,1647327600"; d="scan'208";a="276175205" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2022 01:39:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,277,1647327600"; d="scan'208";a="531347788" Received: from lkp-server01.sh.intel.com (HELO 60dabacc1df6) ([10.239.97.150]) by orsmga003.jf.intel.com with ESMTP; 04 Jun 2022 01:39:25 -0700 Received: from kbuild by 60dabacc1df6 with local (Exim 4.95) (envelope-from ) id 1nxPJc-000AWB-9O; Sat, 04 Jun 2022 08:39:24 +0000 Date: Sat, 4 Jun 2022 16:38:49 +0800 From: kernel test robot To: Bang Li Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org, linux-snps-arc@lists.infradead.org, Vineet Gupta Subject: arch/arc/kernel/smp.c:277:30: sparse: sparse: dereference of noderef expression Message-ID: <202206041630.8CNeV2bc-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 032dcf09e2bf7c822be25b4abef7a6c913870d98 commit: c6ed4d84a2c49de7d6f490144cca7b4a4831fb6e ARC: remove redundant READ_ONCE() in cmpxchg loop date: 7 weeks ago config: arc-randconfig-s032-20220603 (https://download.01.org/0day-ci/archive/20220604/202206041630.8CNeV2bc-lkp@intel.com/config) compiler: arc-elf-gcc (GCC) 11.3.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # apt-get install sparse # sparse version: v0.6.4-18-g56afb504-dirty # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c6ed4d84a2c49de7d6f490144cca7b4a4831fb6e git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git git fetch --no-tags linus master git checkout c6ed4d84a2c49de7d6f490144cca7b4a4831fb6e # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arc SHELL=/bin/bash arch/arc/kernel/ If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot sparse warnings: (new ones prefixed by >>) arch/arc/kernel/smp.c:264:48: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned long [noderef] __percpu *ipi_data_ptr @@ got unsigned long * @@ arch/arc/kernel/smp.c:264:48: sparse: expected unsigned long [noderef] __percpu *ipi_data_ptr arch/arc/kernel/smp.c:264:48: sparse: got unsigned long * arch/arc/kernel/smp.c:279:18: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile *v @@ got unsigned long [noderef] __percpu *__ai_ptr @@ arch/arc/kernel/smp.c:279:18: sparse: expected void const volatile *v arch/arc/kernel/smp.c:279:18: sparse: got unsigned long [noderef] __percpu *__ai_ptr arch/arc/kernel/smp.c:413:72: sparse: sparse: incorrect type in argument 4 (different address spaces) @@ expected void [noderef] __percpu *percpu_dev_id @@ got int *dev @@ arch/arc/kernel/smp.c:413:72: sparse: expected void [noderef] __percpu *percpu_dev_id arch/arc/kernel/smp.c:413:72: sparse: got int *dev >> arch/arc/kernel/smp.c:277:30: sparse: sparse: dereference of noderef expression vim +277 arch/arc/kernel/smp.c 261 262 static void ipi_send_msg_one(int cpu, enum ipi_msg_type msg) 263 { 264 unsigned long __percpu *ipi_data_ptr = per_cpu_ptr(&ipi_data, cpu); 265 unsigned long old, new; 266 unsigned long flags; 267 268 pr_debug("%d Sending msg [%d] to %d\n", smp_processor_id(), msg, cpu); 269 270 local_irq_save(flags); 271 272 /* 273 * Atomically write new msg bit (in case others are writing too), 274 * and read back old value 275 */ 276 do { > 277 new = old = *ipi_data_ptr; 278 new |= 1U << msg; 279 } while (cmpxchg(ipi_data_ptr, old, new) != old); 280 281 /* 282 * Call the platform specific IPI kick function, but avoid if possible: 283 * Only do so if there's no pending msg from other concurrent sender(s). 284 * Otherwise, receiver will see this msg as well when it takes the 285 * IPI corresponding to that msg. This is true, even if it is already in 286 * IPI handler, because !@old means it has not yet dequeued the msg(s) 287 * so @new msg can be a free-loader 288 */ 289 if (plat_smp_ops.ipi_send && !old) 290 plat_smp_ops.ipi_send(cpu); 291 292 local_irq_restore(flags); 293 } 294 -- 0-DAY CI Kernel Test Service https://01.org/lkp