linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Besar Wicaksono <bwicaksono@nvidia.com>
To: "sudeep.holla@arm.com" <sudeep.holla@arm.com>,
	"robin.murphy@arm.com" <robin.murphy@arm.com>,
	"catalin.marinas@arm.com" <catalin.marinas@arm.com>,
	"will@kernel.org" <will@kernel.org>,
	"mark.rutland@arm.com" <mark.rutland@arm.com>
Cc: "linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>,
	"thanu.rangarajan@arm.com" <thanu.rangarajan@arm.com>,
	"Michael.Williams@arm.com" <Michael.Williams@arm.com>,
	"suzuki.poulose@arm.com" <suzuki.poulose@arm.com>,
	Thierry Reding <treding@nvidia.com>,
	Jonathan Hunter <jonathanh@nvidia.com>,
	Vikram Sethi <vsethi@nvidia.com>
Subject: RE: [PATCH v2 1/2] perf: coresight_pmu: Add support for ARM CoreSight PMU driver
Date: Wed, 18 May 2022 20:10:41 +0000	[thread overview]
Message-ID: <SJ0PR12MB567669E26BF743C951AADD28A0D19@SJ0PR12MB5676.namprd12.prod.outlook.com> (raw)
In-Reply-To: <202205181534.wuyBFt9d-lkp@intel.com>

The errors on the APMT* identifiers are due to the missing ACPI patch, which was
submitted on different series: https://lkml.org/lkml/fancy/2022/4/19/1395.
Sudeep, could you please suggest if I need to combine ACPI and driver patches
into a single patch series ?

I will fix the warning on 'level' usage on the next version.

Regards,
Besar

> -----Original Message-----
> From: kernel test robot <lkp@intel.com>
> Sent: Wednesday, May 18, 2022 2:16 AM
> To: Besar Wicaksono <bwicaksono@nvidia.com>; robin.murphy@arm.com;
> catalin.marinas@arm.com; will@kernel.org; mark.rutland@arm.com
> Cc: llvm@lists.linux.dev; kbuild-all@lists.01.org; linux-arm-
> kernel@lists.infradead.org; linux-kernel@vger.kernel.org; linux-
> tegra@vger.kernel.org; sudeep.holla@arm.com;
> thanu.rangarajan@arm.com; Michael.Williams@arm.com;
> suzuki.poulose@arm.com; Thierry Reding <treding@nvidia.com>; Jonathan
> Hunter <jonathanh@nvidia.com>; Vikram Sethi <vsethi@nvidia.com>; Besar
> Wicaksono <bwicaksono@nvidia.com>
> Subject: Re: [PATCH v2 1/2] perf: coresight_pmu: Add support for ARM
> CoreSight PMU driver
> 
> External email: Use caution opening links or attachments
> 
> 
> Hi Besar,
> 
> Thank you for the patch! Perhaps something to improve:
> 
> [auto build test WARNING on arm64/for-next/core]
> [also build test WARNING on soc/for-next linus/master v5.18-rc7 next-
> 20220517]
> [If your patch is applied to the wrong git tree, kindly drop us a note.
> And when submitting patch, we suggest to use '--base' as documented in
> https://git-scm.com/docs/git-format-patch]
> 
> url:    https://github.com/intel-lab-lkp/linux/commits/Besar-Wicaksono/perf-
> coresight_pmu-Add-support-for-ARM-CoreSight-PMU-driver/20220516-
> 013131
> base:   https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-
> next/core
> config: arm64-allyesconfig (https://download.01.org/0day-
> ci/archive/20220518/202205181534.wuyBFt9d-lkp@intel.com/config)
> compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project
> 853fa8ee225edf2d0de94b0dcbd31bea916e825e)
> 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 arm64 cross compiling tool for clang build
>         # apt-get install binutils-aarch64-linux-gnu
>         # https://github.com/intel-lab-
> lkp/linux/commit/79f30980a7a91e6bbe7430206e4e46fa8134cfa9
>         git remote add linux-review https://github.com/intel-lab-lkp/linux
>         git fetch --no-tags linux-review Besar-Wicaksono/perf-coresight_pmu-
> Add-support-for-ARM-CoreSight-PMU-driver/20220516-013131
>         git checkout 79f30980a7a91e6bbe7430206e4e46fa8134cfa9
>         # 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=arm64 SHELL=/bin/bash
> drivers/media/platform/qcom/venus/ drivers/perf/coresight_pmu/
> drivers/rtc/
> 
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
> 
> All warnings (new ones prefixed by >>):
> 
>    drivers/perf/coresight_pmu/arm_coresight_pmu.c:165:49: error:
> incomplete definition of type 'struct acpi_apmt_node'
>            return CHECK_APMT_FLAG(coresight_pmu->apmt_node->flags,
> ATOMIC, SUPP);
>                                   ~~~~~~~~~~~~~~~~~~~~~~~~^
>    drivers/perf/coresight_pmu/arm_coresight_pmu.c:129:4: note: expanded
> from macro 'CHECK_APMT_FLAG'
>            ((flags & (ACPI_APMT_FLAGS_ ## f)) == (ACPI_APMT_FLAGS_ ## f ##
> _ ## v))
>              ^~~~~
>    drivers/perf/coresight_pmu/arm_coresight_pmu.h:116:9: note: forward
> declaration of 'struct acpi_apmt_node'
>            struct acpi_apmt_node *apmt_node;
>                   ^
>    drivers/perf/coresight_pmu/arm_coresight_pmu.c:165:9: error: use of
> undeclared identifier 'ACPI_APMT_FLAGS_ATOMIC'
>            return CHECK_APMT_FLAG(coresight_pmu->apmt_node->flags,
> ATOMIC, SUPP);
>                   ^
>    drivers/perf/coresight_pmu/arm_coresight_pmu.c:129:13: note: expanded
> from macro 'CHECK_APMT_FLAG'
>            ((flags & (ACPI_APMT_FLAGS_ ## f)) == (ACPI_APMT_FLAGS_ ## f ##
> _ ## v))
>                       ^
>    <scratch space>:61:1: note: expanded from here
>    ACPI_APMT_FLAGS_ATOMIC
>    ^
>    drivers/perf/coresight_pmu/arm_coresight_pmu.c:165:9: error: use of
> undeclared identifier 'ACPI_APMT_FLAGS_ATOMIC_SUPP'
>    drivers/perf/coresight_pmu/arm_coresight_pmu.c:129:41: note: expanded
> from macro 'CHECK_APMT_FLAG'
>            ((flags & (ACPI_APMT_FLAGS_ ## f)) == (ACPI_APMT_FLAGS_ ## f ##
> _ ## v))
>                                                   ^
>    <scratch space>:64:1: note: expanded from here
>    ACPI_APMT_FLAGS_ATOMIC_SUPP
>    ^
>    drivers/perf/coresight_pmu/arm_coresight_pmu.c:369:13: error:
> incomplete definition of type 'struct acpi_apmt_node'
>                    (apmt_node->impl_id) ? apmt_node->impl_id :
>                     ~~~~~~~~~^
>    drivers/perf/coresight_pmu/arm_coresight_pmu.h:116:9: note: forward
> declaration of 'struct acpi_apmt_node'
>            struct acpi_apmt_node *apmt_node;
>                   ^
>    drivers/perf/coresight_pmu/arm_coresight_pmu.c:369:35: error:
> incomplete definition of type 'struct acpi_apmt_node'
>                    (apmt_node->impl_id) ? apmt_node->impl_id :
>                                           ~~~~~~~~~^
>    drivers/perf/coresight_pmu/arm_coresight_pmu.h:116:9: note: forward
> declaration of 'struct acpi_apmt_node'
>            struct acpi_apmt_node *apmt_node;
>                   ^
>    drivers/perf/coresight_pmu/arm_coresight_pmu.c:894:58: error:
> incomplete definition of type 'struct acpi_apmt_node'
>                    devm_kasprintf(dev, GFP_KERNEL, PMUNAME "%u", apmt_node-
> >id);
>                                                                  ~~~~~~~~~^
>    drivers/perf/coresight_pmu/arm_coresight_pmu.h:116:9: note: forward
> declaration of 'struct acpi_apmt_node'
>            struct acpi_apmt_node *apmt_node;
>                   ^
>    drivers/perf/coresight_pmu/arm_coresight_pmu.c:920:31: error:
> incomplete definition of type 'struct acpi_apmt_node'
>            if (CHECK_APMT_FLAG(apmt_node->flags, DUAL_PAGE, SUPP)) {
>                                ~~~~~~~~~^
>    drivers/perf/coresight_pmu/arm_coresight_pmu.c:129:4: note: expanded
> from macro 'CHECK_APMT_FLAG'
>            ((flags & (ACPI_APMT_FLAGS_ ## f)) == (ACPI_APMT_FLAGS_ ## f ##
> _ ## v))
>              ^~~~~
>    drivers/perf/coresight_pmu/arm_coresight_pmu.h:116:9: note: forward
> declaration of 'struct acpi_apmt_node'
>            struct acpi_apmt_node *apmt_node;
>                   ^
>    drivers/perf/coresight_pmu/arm_coresight_pmu.c:920:6: error: use of
> undeclared identifier 'ACPI_APMT_FLAGS_DUAL_PAGE'
>            if (CHECK_APMT_FLAG(apmt_node->flags, DUAL_PAGE, SUPP)) {
>                ^
>    drivers/perf/coresight_pmu/arm_coresight_pmu.c:129:13: note: expanded
> from macro 'CHECK_APMT_FLAG'
>            ((flags & (ACPI_APMT_FLAGS_ ## f)) == (ACPI_APMT_FLAGS_ ## f ##
> _ ## v))
>                       ^
>    <scratch space>:60:1: note: expanded from here
>    ACPI_APMT_FLAGS_DUAL_PAGE
>    ^
>    drivers/perf/coresight_pmu/arm_coresight_pmu.c:920:6: error: use of
> undeclared identifier 'ACPI_APMT_FLAGS_DUAL_PAGE_SUPP'
>    drivers/perf/coresight_pmu/arm_coresight_pmu.c:129:41: note: expanded
> from macro 'CHECK_APMT_FLAG'
>            ((flags & (ACPI_APMT_FLAGS_ ## f)) == (ACPI_APMT_FLAGS_ ## f ##
> _ ## v))
>                                                   ^
>    <scratch space>:63:1: note: expanded from here
>    ACPI_APMT_FLAGS_DUAL_PAGE_SUPP
>    ^
>    drivers/perf/coresight_pmu/arm_coresight_pmu.c:1028:15: error:
> incomplete definition of type 'struct acpi_apmt_node'
>            if (apmt_node->ovflw_irq == 0)
>                ~~~~~~~~~^
>    drivers/perf/coresight_pmu/arm_coresight_pmu.h:116:9: note: forward
> declaration of 'struct acpi_apmt_node'
>            struct acpi_apmt_node *apmt_node;
>                   ^
> >> drivers/perf/coresight_pmu/arm_coresight_pmu.c:1053:6: warning:
> variable 'level' set but not used [-Wunused-but-set-variable]
>            int level = 0;
>                ^
>    drivers/perf/coresight_pmu/arm_coresight_pmu.c:1079:27: error:
> incomplete definition of type 'struct acpi_apmt_node'
>            affinity_flag = apmt_node->flags & ACPI_APMT_FLAGS_AFFINITY;
>                            ~~~~~~~~~^
>    drivers/perf/coresight_pmu/arm_coresight_pmu.h:116:9: note: forward
> declaration of 'struct acpi_apmt_node'
>            struct acpi_apmt_node *apmt_node;
>                   ^
>    drivers/perf/coresight_pmu/arm_coresight_pmu.c:1079:37: error: use of
> undeclared identifier 'ACPI_APMT_FLAGS_AFFINITY'
>            affinity_flag = apmt_node->flags & ACPI_APMT_FLAGS_AFFINITY;
>                                               ^
>    drivers/perf/coresight_pmu/arm_coresight_pmu.c:1081:23: error: use of
> undeclared identifier 'ACPI_APMT_FLAGS_AFFINITY_PROC'
>            if (affinity_flag == ACPI_APMT_FLAGS_AFFINITY_PROC) {
>                                 ^
>    drivers/perf/coresight_pmu/arm_coresight_pmu.c:1083:17: error:
> incomplete definition of type 'struct acpi_apmt_node'
>                            if (apmt_node->proc_affinity ==
>                                ~~~~~~~~~^
>    drivers/perf/coresight_pmu/arm_coresight_pmu.h:116:9: note: forward
> declaration of 'struct acpi_apmt_node'
>            struct acpi_apmt_node *apmt_node;
>                   ^
>    drivers/perf/coresight_pmu/arm_coresight_pmu.c:1093:23: error:
> incomplete definition of type 'struct acpi_apmt_node'
>                                        cpu, apmt_node->proc_affinity))
>                                             ~~~~~~~~~^
>    drivers/perf/coresight_pmu/arm_coresight_pmu.h:116:9: note: forward
> declaration of 'struct acpi_apmt_node'
>            struct acpi_apmt_node *apmt_node;
>                   ^
>    1 warning and 15 errors generated.
> 
> 
> vim +/level +1053 drivers/perf/coresight_pmu/arm_coresight_pmu.c
> 
>   1047
>   1048  static inline int coresight_pmu_find_cpu_container(int cpu, u32
> container_uid)
>   1049  {
>   1050          u32 acpi_uid;
>   1051          struct device *cpu_dev = get_cpu_device(cpu);
>   1052          struct acpi_device *acpi_dev = ACPI_COMPANION(cpu_dev);
> > 1053          int level = 0;
>   1054
>   1055          if (!cpu_dev)
>   1056                  return -ENODEV;
>   1057
>   1058          while (acpi_dev) {
>   1059                  if (!strcmp(acpi_device_hid(acpi_dev),
>   1060                              ACPI_PROCESSOR_CONTAINER_HID) &&
>   1061                      !kstrtouint(acpi_device_uid(acpi_dev), 0, &acpi_uid) &&
>   1062                      acpi_uid == container_uid)
>   1063                          return 0;
>   1064
>   1065                  acpi_dev = acpi_dev->parent;
>   1066                  level++;
>   1067          }
>   1068
>   1069          return -ENODEV;
>   1070  }
>   1071
> 
> --
> 0-DAY CI Kernel Test Service
> https://01.org/lkp

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2022-05-18 20:13 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-09  0:28 [PATCH 0/2] perf: ARM CoreSight PMU support Besar Wicaksono
2022-05-09  0:28 ` [PATCH 1/2] perf: coresight_pmu: Add support for ARM CoreSight PMU driver Besar Wicaksono
2022-05-09 12:13   ` Robin Murphy
2022-05-11  2:46     ` Besar Wicaksono
2022-05-11 10:03       ` Robin Murphy
2022-05-09  0:28 ` [PATCH 2/2] perf: coresight_pmu: Add support for NVIDIA SCF and MCF attribute Besar Wicaksono
2022-05-09  9:28 ` [PATCH 0/2] perf: ARM CoreSight PMU support Will Deacon
2022-05-09 10:02   ` Suzuki K Poulose
2022-05-09 12:20     ` Shaokun Zhang
2022-05-09 22:07     ` Besar Wicaksono
2022-05-10 11:07     ` Sudeep Holla
2022-05-10 11:13       ` Will Deacon
2022-05-10 18:40         ` Sudeep Holla
2022-05-11  1:29           ` Besar Wicaksono
2022-05-11 12:42             ` Robin Murphy
2022-05-13  6:16               ` Thanu Rangarajan
2022-05-11  8:44         ` Suzuki K Poulose
2022-05-11 16:44           ` Besar Wicaksono
2022-05-13 12:25             ` Besar Wicaksono
2022-05-15 16:30 ` [PATCH v2 " Besar Wicaksono
2022-05-15 16:30   ` [PATCH v2 1/2] perf: coresight_pmu: Add support for ARM CoreSight PMU driver Besar Wicaksono
2022-05-18  7:16     ` kernel test robot
2022-05-18 20:10       ` Besar Wicaksono [this message]
2022-05-19  8:52     ` Suzuki K Poulose
2022-05-19 17:04       ` Besar Wicaksono
2022-05-15 16:30   ` [PATCH v2 2/2] perf: coresight_pmu: Add support for NVIDIA SCF and MCF attribute Besar Wicaksono
2022-05-25  6:48   ` [PATCH v3 0/2] perf: ARM CoreSight PMU support Besar Wicaksono
2022-05-25  6:48     ` [PATCH v3 1/2] perf: coresight_pmu: Add support for ARM CoreSight PMU driver Besar Wicaksono
2022-05-25  6:48     ` [PATCH v3 2/2] perf: coresight_pmu: Add support for NVIDIA SCF and MCF attribute Besar Wicaksono
2022-06-03 15:47     ` [PATCH v3 0/2] perf: ARM CoreSight PMU support Besar Wicaksono
2022-06-14 10:19     ` Besar Wicaksono

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=SJ0PR12MB567669E26BF743C951AADD28A0D19@SJ0PR12MB5676.namprd12.prod.outlook.com \
    --to=bwicaksono@nvidia.com \
    --cc=Michael.Williams@arm.com \
    --cc=catalin.marinas@arm.com \
    --cc=jonathanh@nvidia.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=robin.murphy@arm.com \
    --cc=sudeep.holla@arm.com \
    --cc=suzuki.poulose@arm.com \
    --cc=thanu.rangarajan@arm.com \
    --cc=treding@nvidia.com \
    --cc=vsethi@nvidia.com \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).