From: kernel test robot <lkp@intel.com>
To: Joerg Roedel <joro@8bytes.org>
Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
David Woodhouse <dwmw2@infradead.org>,
Lu Baolu <baolu.lu@linux.intel.com>,
Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>,
Jerry Snitselaar <jsnitsel@redhat.com>, Qian Cai <cai@lca.pw>,
iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/2] iommu/amd: Move AMD IOMMU driver into subdirectory
Date: Wed, 10 Jun 2020 09:25:43 +0800 [thread overview]
Message-ID: <202006100916.8dmlS5sj%lkp@intel.com> (raw)
In-Reply-To: <20200609130303.26974-2-joro@8bytes.org>
[-- Attachment #1: Type: text/plain, Size: 14815 bytes --]
Hi Joerg,
I love your patch! Perhaps something to improve:
[auto build test WARNING on iommu/next]
[also build test WARNING on linus/master next-20200609]
[cannot apply to v5.7]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Joerg-Roedel/iommu-Move-Intel-and-AMD-drivers-into-their-own-subdirectory/20200609-210928
base: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next
config: x86_64-randconfig-r026-20200607 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project bc2b70982be8f5250cd0082a7190f8b417bd4dfe)
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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
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 >>, old ones prefixed by <<):
>> drivers/iommu/amd/init.c:3073:19: warning: no previous prototype for function 'get_amd_iommu' [-Wmissing-prototypes]
struct amd_iommu *get_amd_iommu(unsigned int idx)
^
drivers/iommu/amd/init.c:3073:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
struct amd_iommu *get_amd_iommu(unsigned int idx)
^
static
>> drivers/iommu/amd/init.c:3092:4: warning: no previous prototype for function 'amd_iommu_pc_get_max_banks' [-Wmissing-prototypes]
u8 amd_iommu_pc_get_max_banks(unsigned int idx)
^
drivers/iommu/amd/init.c:3092:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
u8 amd_iommu_pc_get_max_banks(unsigned int idx)
^
static
>> drivers/iommu/amd/init.c:3103:6: warning: no previous prototype for function 'amd_iommu_pc_supported' [-Wmissing-prototypes]
bool amd_iommu_pc_supported(void)
^
drivers/iommu/amd/init.c:3103:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
bool amd_iommu_pc_supported(void)
^
static
>> drivers/iommu/amd/init.c:3109:4: warning: no previous prototype for function 'amd_iommu_pc_get_max_counters' [-Wmissing-prototypes]
u8 amd_iommu_pc_get_max_counters(unsigned int idx)
^
drivers/iommu/amd/init.c:3109:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
u8 amd_iommu_pc_get_max_counters(unsigned int idx)
^
static
>> drivers/iommu/amd/init.c:3158:5: warning: no previous prototype for function 'amd_iommu_pc_get_reg' [-Wmissing-prototypes]
int amd_iommu_pc_get_reg(struct amd_iommu *iommu, u8 bank, u8 cntr, u8 fxn, u64 *value)
^
drivers/iommu/amd/init.c:3158:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int amd_iommu_pc_get_reg(struct amd_iommu *iommu, u8 bank, u8 cntr, u8 fxn, u64 *value)
^
static
>> drivers/iommu/amd/init.c:3167:5: warning: no previous prototype for function 'amd_iommu_pc_set_reg' [-Wmissing-prototypes]
int amd_iommu_pc_set_reg(struct amd_iommu *iommu, u8 bank, u8 cntr, u8 fxn, u64 *value)
^
drivers/iommu/amd/init.c:3167:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int amd_iommu_pc_set_reg(struct amd_iommu *iommu, u8 bank, u8 cntr, u8 fxn, u64 *value)
^
static
6 warnings generated.
vim +/get_amd_iommu +3073 drivers/iommu/amd/init.c
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3072
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 @3073 struct amd_iommu *get_amd_iommu(unsigned int idx)
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3074 {
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3075 unsigned int i = 0;
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3076 struct amd_iommu *iommu;
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3077
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3078 for_each_iommu(iommu)
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3079 if (i++ == idx)
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3080 return iommu;
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3081 return NULL;
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3082 }
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3083 EXPORT_SYMBOL(get_amd_iommu);
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3084
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3085 /****************************************************************************
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3086 *
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3087 * IOMMU EFR Performance Counter support functionality. This code allows
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3088 * access to the IOMMU PC functionality.
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3089 *
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3090 ****************************************************************************/
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3091
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 @3092 u8 amd_iommu_pc_get_max_banks(unsigned int idx)
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3093 {
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3094 struct amd_iommu *iommu = get_amd_iommu(idx);
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3095
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3096 if (iommu)
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3097 return iommu->max_banks;
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3098
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3099 return 0;
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3100 }
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3101 EXPORT_SYMBOL(amd_iommu_pc_get_max_banks);
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3102
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 @3103 bool amd_iommu_pc_supported(void)
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3104 {
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3105 return amd_iommu_pc_present;
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3106 }
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3107 EXPORT_SYMBOL(amd_iommu_pc_supported);
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3108
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 @3109 u8 amd_iommu_pc_get_max_counters(unsigned int idx)
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3110 {
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3111 struct amd_iommu *iommu = get_amd_iommu(idx);
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3112
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3113 if (iommu)
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3114 return iommu->max_counters;
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3115
f5863a00e73c43 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3116 return 0;
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3117 }
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3118 EXPORT_SYMBOL(amd_iommu_pc_get_max_counters);
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3119
1650dfd1a9bcde drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3120 static int iommu_pc_get_set_reg(struct amd_iommu *iommu, u8 bank, u8 cntr,
1650dfd1a9bcde drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3121 u8 fxn, u64 *value, bool is_write)
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3122 {
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3123 u32 offset;
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3124 u32 max_offset_lim;
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3125
1650dfd1a9bcde drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3126 /* Make sure the IOMMU PC resource is available */
1650dfd1a9bcde drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3127 if (!amd_iommu_pc_present)
1650dfd1a9bcde drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3128 return -ENODEV;
1650dfd1a9bcde drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3129
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3130 /* Check for valid iommu and pc register indexing */
1650dfd1a9bcde drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3131 if (WARN_ON(!iommu || (fxn > 0x28) || (fxn & 7)))
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3132 return -ENODEV;
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3133
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3134 offset = (u32)(((0x40 | bank) << 12) | (cntr << 8) | fxn);
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3135
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3136 /* Limit the offset to the hw defined mmio region aperture */
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3137 max_offset_lim = (u32)(((0x40 | iommu->max_banks) << 12) |
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3138 (iommu->max_counters << 8) | 0x28);
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3139 if ((offset < MMIO_CNTR_REG_OFFSET) ||
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3140 (offset > max_offset_lim))
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3141 return -EINVAL;
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3142
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3143 if (is_write) {
0a6d80c70b9150 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3144 u64 val = *value & GENMASK_ULL(47, 0);
0a6d80c70b9150 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3145
0a6d80c70b9150 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3146 writel((u32)val, iommu->mmio_base + offset);
0a6d80c70b9150 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3147 writel((val >> 32), iommu->mmio_base + offset + 4);
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3148 } else {
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3149 *value = readl(iommu->mmio_base + offset + 4);
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3150 *value <<= 32;
0a6d80c70b9150 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3151 *value |= readl(iommu->mmio_base + offset);
0a6d80c70b9150 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3152 *value &= GENMASK_ULL(47, 0);
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3153 }
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3154
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3155 return 0;
30861ddc9cca47 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3156 }
38e45d02ea9f19 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2016-02-23 3157
1650dfd1a9bcde drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 @3158 int amd_iommu_pc_get_reg(struct amd_iommu *iommu, u8 bank, u8 cntr, u8 fxn, u64 *value)
38e45d02ea9f19 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2016-02-23 3159 {
1650dfd1a9bcde drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3160 if (!iommu)
1650dfd1a9bcde drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3161 return -EINVAL;
38e45d02ea9f19 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2016-02-23 3162
1650dfd1a9bcde drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3163 return iommu_pc_get_set_reg(iommu, bank, cntr, fxn, value, false);
1650dfd1a9bcde drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3164 }
1650dfd1a9bcde drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3165 EXPORT_SYMBOL(amd_iommu_pc_get_reg);
1650dfd1a9bcde drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3166
1650dfd1a9bcde drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 @3167 int amd_iommu_pc_set_reg(struct amd_iommu *iommu, u8 bank, u8 cntr, u8 fxn, u64 *value)
:::::: The code at line 3073 was first introduced by commit
:::::: f5863a00e73c432b91e4efe1d68778b4ace6a892 x86/events/amd/iommu.c: Modify functions to query max banks and counters
:::::: TO: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
:::::: CC: Ingo Molnar <mingo@kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 31625 bytes --]
next prev parent reply other threads:[~2020-06-10 2:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-09 13:03 [PATCH v2 0/2] iommu: Move Intel and AMD drivers into their own subdirectory Joerg Roedel
2020-06-09 13:03 ` [PATCH v2 1/2] iommu/amd: Move AMD IOMMU driver into subdirectory Joerg Roedel
2020-06-10 1:25 ` kernel test robot [this message]
2020-06-09 13:03 ` [PATCH v2 2/2] iommu/vt-d: Move Intel " Joerg Roedel
2020-06-10 2:09 ` Lu Baolu
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=202006100916.8dmlS5sj%lkp@intel.com \
--to=lkp@intel.com \
--cc=baolu.lu@linux.intel.com \
--cc=cai@lca.pw \
--cc=clang-built-linux@googlegroups.com \
--cc=dwmw2@infradead.org \
--cc=iommu@lists.linux-foundation.org \
--cc=joro@8bytes.org \
--cc=jsnitsel@redhat.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=suravee.suthikulpanit@amd.com \
/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