All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Tomas Winkler <tomas.winkler@intel.com>,
	Rajneesh Bhardwaj <irenic.rajneesh@gmail.com>,
	David E Box <david.e.box@intel.com>,
	Hans de Goede <hdegoede@redhat.com>,
	Mark Gross <mgross@linux.intel.com>
Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
	platform-driver-x86@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Tamar Mashiah <tamar.mashiah@intel.com>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Tomas Winkler <tomas.winkler@intel.com>
Subject: Re: [PATCH v5] platform/x86: intel_pmc_core: export platform global reset bits via etr3 sysfs file
Date: Sun, 11 Apr 2021 22:15:45 +0800	[thread overview]
Message-ID: <202104112247.q3ceXFmO-lkp@intel.com> (raw)
In-Reply-To: <20210411094344.2973757-1-tomas.winkler@intel.com>

[-- Attachment #1: Type: text/plain, Size: 3916 bytes --]

Hi Tomas,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v5.12-rc6 next-20210409]
[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/0day-ci/linux/commits/Tomas-Winkler/platform-x86-intel_pmc_core-export-platform-global-reset-bits-via-etr3-sysfs-file/20210411-174433
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 52e44129fba5cfc4e351fdb5e45849afc74d9a53
config: x86_64-randconfig-a013-20210411 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 9829f5e6b1bca9b61efc629770d28bb9014dec45)
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
        # https://github.com/0day-ci/linux/commit/b966c4184fd486407516000bf3151906318d29f6
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Tomas-Winkler/platform-x86-intel_pmc_core-export-platform-global-reset-bits-via-etr3-sysfs-file/20210411-174433
        git checkout b966c4184fd486407516000bf3151906318d29f6
        # 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 >>):

>> drivers/platform/x86/intel_pmc_core.c:656:41: warning: '&' within '|' [-Wbitwise-op-parentheses]
           return reg & ETR3_CF9LOCK ? attr->mode & SYSFS_PREALLOC | 0444 : attr->mode;
                                       ~~~~~~~~~~~^~~~~~~~~~~~~~~~ ~
   drivers/platform/x86/intel_pmc_core.c:656:41: note: place parentheses around the '&' expression to silence this warning
           return reg & ETR3_CF9LOCK ? attr->mode & SYSFS_PREALLOC | 0444 : attr->mode;
                                       ~~~~~~~~~~~^~~~~~~~~~~~~~~~
   1 warning generated.


vim +656 drivers/platform/x86/intel_pmc_core.c

   608	
   609	static int set_etr3(struct pmc_dev *pmcdev)
   610	{
   611		const struct pmc_reg_map *map = pmcdev->map;
   612		u32 reg;
   613		int err;
   614	
   615		if (!map->etr3_offset)
   616			return -EOPNOTSUPP;
   617	
   618		mutex_lock(&pmcdev->lock);
   619	
   620		/* check if CF9 is locked */
   621		reg = pmc_core_reg_read(pmcdev, map->etr3_offset);
   622		if (reg & ETR3_CF9LOCK) {
   623			err = -EACCES;
   624			goto out_unlock;
   625		}
   626	
   627		/* write CF9 global reset bit */
   628		reg |= ETR3_CF9GR;
   629		pmc_core_reg_write(pmcdev, map->etr3_offset, reg);
   630	
   631		reg = pmc_core_reg_read(pmcdev, map->etr3_offset);
   632		if (!(reg & ETR3_CF9GR)) {
   633			err = -EIO;
   634			goto out_unlock;
   635		}
   636	
   637		err = 0;
   638	
   639	out_unlock:
   640		mutex_unlock(&pmcdev->lock);
   641		return err;
   642	}
   643	static umode_t etr3_is_visible(struct kobject *kobj,
   644					struct attribute *attr,
   645					int idx)
   646	{
   647		struct device *dev = container_of(kobj, struct device, kobj);
   648		struct pmc_dev *pmcdev = dev_get_drvdata(dev);
   649		const struct pmc_reg_map *map = pmcdev->map;
   650		u32 reg;
   651	
   652		mutex_lock(&pmcdev->lock);
   653		reg = pmc_core_reg_read(pmcdev, map->etr3_offset);
   654		mutex_unlock(&pmcdev->lock);
   655	
 > 656		return reg & ETR3_CF9LOCK ? attr->mode & SYSFS_PREALLOC | 0444 : attr->mode;
   657	}
   658	

---
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: 33216 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH v5] platform/x86: intel_pmc_core: export platform global reset bits via etr3 sysfs file
Date: Sun, 11 Apr 2021 22:15:45 +0800	[thread overview]
Message-ID: <202104112247.q3ceXFmO-lkp@intel.com> (raw)
In-Reply-To: <20210411094344.2973757-1-tomas.winkler@intel.com>

[-- Attachment #1: Type: text/plain, Size: 4015 bytes --]

Hi Tomas,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v5.12-rc6 next-20210409]
[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/0day-ci/linux/commits/Tomas-Winkler/platform-x86-intel_pmc_core-export-platform-global-reset-bits-via-etr3-sysfs-file/20210411-174433
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 52e44129fba5cfc4e351fdb5e45849afc74d9a53
config: x86_64-randconfig-a013-20210411 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 9829f5e6b1bca9b61efc629770d28bb9014dec45)
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
        # https://github.com/0day-ci/linux/commit/b966c4184fd486407516000bf3151906318d29f6
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Tomas-Winkler/platform-x86-intel_pmc_core-export-platform-global-reset-bits-via-etr3-sysfs-file/20210411-174433
        git checkout b966c4184fd486407516000bf3151906318d29f6
        # 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 >>):

>> drivers/platform/x86/intel_pmc_core.c:656:41: warning: '&' within '|' [-Wbitwise-op-parentheses]
           return reg & ETR3_CF9LOCK ? attr->mode & SYSFS_PREALLOC | 0444 : attr->mode;
                                       ~~~~~~~~~~~^~~~~~~~~~~~~~~~ ~
   drivers/platform/x86/intel_pmc_core.c:656:41: note: place parentheses around the '&' expression to silence this warning
           return reg & ETR3_CF9LOCK ? attr->mode & SYSFS_PREALLOC | 0444 : attr->mode;
                                       ~~~~~~~~~~~^~~~~~~~~~~~~~~~
   1 warning generated.


vim +656 drivers/platform/x86/intel_pmc_core.c

   608	
   609	static int set_etr3(struct pmc_dev *pmcdev)
   610	{
   611		const struct pmc_reg_map *map = pmcdev->map;
   612		u32 reg;
   613		int err;
   614	
   615		if (!map->etr3_offset)
   616			return -EOPNOTSUPP;
   617	
   618		mutex_lock(&pmcdev->lock);
   619	
   620		/* check if CF9 is locked */
   621		reg = pmc_core_reg_read(pmcdev, map->etr3_offset);
   622		if (reg & ETR3_CF9LOCK) {
   623			err = -EACCES;
   624			goto out_unlock;
   625		}
   626	
   627		/* write CF9 global reset bit */
   628		reg |= ETR3_CF9GR;
   629		pmc_core_reg_write(pmcdev, map->etr3_offset, reg);
   630	
   631		reg = pmc_core_reg_read(pmcdev, map->etr3_offset);
   632		if (!(reg & ETR3_CF9GR)) {
   633			err = -EIO;
   634			goto out_unlock;
   635		}
   636	
   637		err = 0;
   638	
   639	out_unlock:
   640		mutex_unlock(&pmcdev->lock);
   641		return err;
   642	}
   643	static umode_t etr3_is_visible(struct kobject *kobj,
   644					struct attribute *attr,
   645					int idx)
   646	{
   647		struct device *dev = container_of(kobj, struct device, kobj);
   648		struct pmc_dev *pmcdev = dev_get_drvdata(dev);
   649		const struct pmc_reg_map *map = pmcdev->map;
   650		u32 reg;
   651	
   652		mutex_lock(&pmcdev->lock);
   653		reg = pmc_core_reg_read(pmcdev, map->etr3_offset);
   654		mutex_unlock(&pmcdev->lock);
   655	
 > 656		return reg & ETR3_CF9LOCK ? attr->mode & SYSFS_PREALLOC | 0444 : attr->mode;
   657	}
   658	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 33216 bytes --]

  parent reply	other threads:[~2021-04-11 14:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-11  9:43 [PATCH v5] platform/x86: intel_pmc_core: export platform global reset bits via etr3 sysfs file Tomas Winkler
2021-04-11 11:55 ` kernel test robot
2021-04-11 11:55   ` kernel test robot
2021-04-11 14:15 ` kernel test robot [this message]
2021-04-11 14:15   ` kernel test robot

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=202104112247.q3ceXFmO-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=clang-built-linux@googlegroups.com \
    --cc=david.e.box@intel.com \
    --cc=hdegoede@redhat.com \
    --cc=irenic.rajneesh@gmail.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgross@linux.intel.com \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=tamar.mashiah@intel.com \
    --cc=tomas.winkler@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.