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 00DCEC2BB3F for ; Wed, 15 Nov 2023 21:59:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343700AbjKOV71 (ORCPT ); Wed, 15 Nov 2023 16:59:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50300 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234927AbjKOV7Z (ORCPT ); Wed, 15 Nov 2023 16:59:25 -0500 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 41E93A9 for ; Wed, 15 Nov 2023 13:59:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1700085562; x=1731621562; h=date:from:to:cc:subject:message-id:mime-version; bh=dASepLV8F8sfmfnzZijxFD5iER/lRPbpXDVIXF3RLgs=; b=Xhk56tSIf366LNOG/3xaPlJ5ryBF3d8zsUu4UuxSvOt1nSi2nYcLUZ8B SXBak9RWlVery1PZj9v4XWuGUBx+Bmtz9o6IhqxkEseazxbP6GLNd8LIX RfuxduYM8Dvx+HihQfRpsA7Kofv/x/xZgRv1kFP4PEWAiM2L/2jyY2MMe q7LITpw8bteWmrnA2M3j1TVv1Dx+FC04uNpLOlYnI8qZDaM9DKXk+GoXC uKU8i/hO4CSXkIz9+C2Gg368XnUbUqlb/O/n+SJ4kcvT0F4VKbO8T/UKq VqZ1VU9VCVUR2g9IcpIvufZ8M17oArWu8qEdTSgh3dcixZep9j0OELC3R w==; X-IronPort-AV: E=McAfee;i="6600,9927,10895"; a="381355370" X-IronPort-AV: E=Sophos;i="6.03,306,1694761200"; d="scan'208";a="381355370" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Nov 2023 13:55:25 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10895"; a="799978395" X-IronPort-AV: E=Sophos;i="6.03,306,1694761200"; d="scan'208";a="799978395" Received: from lkp-server02.sh.intel.com (HELO b8de5498638e) ([10.239.97.151]) by orsmga001.jf.intel.com with ESMTP; 15 Nov 2023 13:55:23 -0800 Received: from kbuild by b8de5498638e with local (Exim 4.96) (envelope-from ) id 1r3Nqz-0000sq-0a; Wed, 15 Nov 2023 21:55:21 +0000 Date: Thu, 16 Nov 2023 05:54:56 +0800 From: kernel test robot To: Peter Zijlstra Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org Subject: drivers/perf/thunderx2_pmu.c:556:9: sparse: sparse: incorrect type in argument 1 (different address spaces) Message-ID: <202311160521.Gb6dkXjx-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://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: c42d9eeef8e5ba9292eda36fd8e3c11f35ee065c commit: f3c0eba287049237b23d1300376768293eb89e69 perf: Add a few assertions date: 1 year, 2 months ago config: loongarch-randconfig-r123-20231107 (https://download.01.org/0day-ci/archive/20231116/202311160521.Gb6dkXjx-lkp@intel.com/config) compiler: loongarch64-linux-gcc (GCC) 13.2.0 reproduce: (https://download.01.org/0day-ci/archive/20231116/202311160521.Gb6dkXjx-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/202311160521.Gb6dkXjx-lkp@intel.com/ sparse warnings: (new ones prefixed by >>) >> drivers/perf/thunderx2_pmu.c:556:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got unsigned int [noderef] __percpu * @@ drivers/perf/thunderx2_pmu.c:556:9: sparse: expected void *ptr drivers/perf/thunderx2_pmu.c:556:9: sparse: got unsigned int [noderef] __percpu * >> drivers/perf/thunderx2_pmu.c:556:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got unsigned int [noderef] __percpu * @@ drivers/perf/thunderx2_pmu.c:556:9: sparse: expected void *ptr drivers/perf/thunderx2_pmu.c:556:9: sparse: got unsigned int [noderef] __percpu * >> drivers/perf/thunderx2_pmu.c:556:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got unsigned int [noderef] __percpu * @@ drivers/perf/thunderx2_pmu.c:556:9: sparse: expected void *ptr drivers/perf/thunderx2_pmu.c:556:9: sparse: got unsigned int [noderef] __percpu * >> drivers/perf/thunderx2_pmu.c:556:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got unsigned int [noderef] __percpu * @@ drivers/perf/thunderx2_pmu.c:556:9: sparse: expected void *ptr drivers/perf/thunderx2_pmu.c:556:9: sparse: got unsigned int [noderef] __percpu * >> drivers/perf/thunderx2_pmu.c:556:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got int [noderef] __percpu * @@ drivers/perf/thunderx2_pmu.c:556:9: sparse: expected void *ptr drivers/perf/thunderx2_pmu.c:556:9: sparse: got int [noderef] __percpu * >> drivers/perf/thunderx2_pmu.c:556:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got int [noderef] __percpu * @@ drivers/perf/thunderx2_pmu.c:556:9: sparse: expected void *ptr drivers/perf/thunderx2_pmu.c:556:9: sparse: got int [noderef] __percpu * >> drivers/perf/thunderx2_pmu.c:556:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got int [noderef] __percpu * @@ drivers/perf/thunderx2_pmu.c:556:9: sparse: expected void *ptr drivers/perf/thunderx2_pmu.c:556:9: sparse: got int [noderef] __percpu * >> drivers/perf/thunderx2_pmu.c:556:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got int [noderef] __percpu * @@ drivers/perf/thunderx2_pmu.c:556:9: sparse: expected void *ptr drivers/perf/thunderx2_pmu.c:556:9: sparse: got int [noderef] __percpu * vim +556 drivers/perf/thunderx2_pmu.c 69c32972d59388c0 Kulkarni, Ganapatrao 2018-12-06 539 69c32972d59388c0 Kulkarni, Ganapatrao 2018-12-06 540 /* 69c32972d59388c0 Kulkarni, Ganapatrao 2018-12-06 541 * Make sure the group of events can be scheduled at once 69c32972d59388c0 Kulkarni, Ganapatrao 2018-12-06 542 * on the PMU. 69c32972d59388c0 Kulkarni, Ganapatrao 2018-12-06 543 */ 5e2c27e833bb9248 Ganapatrao Prabhakerrao Kulkarni 2019-10-16 544 static bool tx2_uncore_validate_event_group(struct perf_event *event, 5e2c27e833bb9248 Ganapatrao Prabhakerrao Kulkarni 2019-10-16 545 int max_counters) 69c32972d59388c0 Kulkarni, Ganapatrao 2018-12-06 546 { 69c32972d59388c0 Kulkarni, Ganapatrao 2018-12-06 547 struct perf_event *sibling, *leader = event->group_leader; 69c32972d59388c0 Kulkarni, Ganapatrao 2018-12-06 548 int counters = 0; 69c32972d59388c0 Kulkarni, Ganapatrao 2018-12-06 549 69c32972d59388c0 Kulkarni, Ganapatrao 2018-12-06 550 if (event->group_leader == event) 69c32972d59388c0 Kulkarni, Ganapatrao 2018-12-06 551 return true; 69c32972d59388c0 Kulkarni, Ganapatrao 2018-12-06 552 69c32972d59388c0 Kulkarni, Ganapatrao 2018-12-06 553 if (!tx2_uncore_validate_event(event->pmu, leader, &counters)) 69c32972d59388c0 Kulkarni, Ganapatrao 2018-12-06 554 return false; 69c32972d59388c0 Kulkarni, Ganapatrao 2018-12-06 555 69c32972d59388c0 Kulkarni, Ganapatrao 2018-12-06 @556 for_each_sibling_event(sibling, leader) { 69c32972d59388c0 Kulkarni, Ganapatrao 2018-12-06 557 if (!tx2_uncore_validate_event(event->pmu, sibling, &counters)) 69c32972d59388c0 Kulkarni, Ganapatrao 2018-12-06 558 return false; 69c32972d59388c0 Kulkarni, Ganapatrao 2018-12-06 559 } 69c32972d59388c0 Kulkarni, Ganapatrao 2018-12-06 560 69c32972d59388c0 Kulkarni, Ganapatrao 2018-12-06 561 if (!tx2_uncore_validate_event(event->pmu, event, &counters)) 69c32972d59388c0 Kulkarni, Ganapatrao 2018-12-06 562 return false; 69c32972d59388c0 Kulkarni, Ganapatrao 2018-12-06 563 69c32972d59388c0 Kulkarni, Ganapatrao 2018-12-06 564 /* 69c32972d59388c0 Kulkarni, Ganapatrao 2018-12-06 565 * If the group requires more counters than the HW has, 69c32972d59388c0 Kulkarni, Ganapatrao 2018-12-06 566 * it cannot ever be scheduled. 69c32972d59388c0 Kulkarni, Ganapatrao 2018-12-06 567 */ 5e2c27e833bb9248 Ganapatrao Prabhakerrao Kulkarni 2019-10-16 568 return counters <= max_counters; 69c32972d59388c0 Kulkarni, Ganapatrao 2018-12-06 569 } 69c32972d59388c0 Kulkarni, Ganapatrao 2018-12-06 570 :::::: The code at line 556 was first introduced by commit :::::: 69c32972d59388c041268e8206e8eb1acff29b9a drivers/perf: Add Cavium ThunderX2 SoC UNCORE PMU driver :::::: TO: Kulkarni, Ganapatrao :::::: CC: Will Deacon -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki