All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Srirangan Madhavan <smadhavan@nvidia.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: Re: [RFC PATCH v1] cxl: add support for cxl reset
Date: Sat, 14 Dec 2024 17:38:59 +0800	[thread overview]
Message-ID: <202412141749.12WRnc38-lkp@intel.com> (raw)
In-Reply-To: <20241213074143.374-1-smadhavan@nvidia.com>

Hi Srirangan,

[This is a private test report for your RFC patch.]
kernel test robot noticed the following build warnings:

[auto build test WARNING on pci/next]
[also build test WARNING on pci/for-linus cxl/next linus/master v6.13-rc2 next-20241213]
[cannot apply to cxl/pending]
[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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Srirangan-Madhavan/cxl-add-support-for-cxl-reset/20241213-154303
base:   https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git next
patch link:    https://lore.kernel.org/r/20241213074143.374-1-smadhavan%40nvidia.com
patch subject: [RFC PATCH v1] cxl: add support for cxl reset
config: s390-randconfig-002-20241214 (https://download.01.org/0day-ci/archive/20241214/202412141749.12WRnc38-lkp@intel.com/config)
compiler: s390-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241214/202412141749.12WRnc38-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 <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202412141749.12WRnc38-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/pci/pci.c:5197: warning: Function parameter or struct member 'dvsec' not described in 'cxl_reset_init'


vim +5197 drivers/pci/pci.c

  5189	
  5190	/**
  5191	 * cxl_reset_init - initiate a cxl reset
  5192	 * @dev: device to reset
  5193	 *
  5194	 * Initiate a cxl reset.
  5195	 */
  5196	static int cxl_reset_init(struct pci_dev *dev, u16 dvsec)
> 5197	{
  5198		u16 reg, val;
  5199		u32 timeout_ms;
  5200		int rc;
  5201		u32 reset_timeouts_ms[] = {10, 100, 1000, 10000, 100000};
  5202	
  5203		/*
  5204		 * Check if CXL Reset MEM CLR is supported.
  5205		 * TODO: Add check to do MEM CLR only if requested.
  5206		 */
  5207		rc = pci_read_config_word(dev, dvsec + PCI_DVSEC_CXL_DEVCAP,
  5208					  &reg);
  5209		if (rc)
  5210			return rc;
  5211	
  5212		if (reg & PCI_DVSEC_CXL_DEVCAP_CXL_RST_MEM_CLR) {
  5213			rc = pci_read_config_word(dev, dvsec + PCI_DVSEC_CXL_DEVCTL2,
  5214						  &reg);
  5215			if (rc)
  5216				return rc;
  5217	
  5218			val = reg | PCI_DVSEC_CXL_DEVCTL2_CXL_RST_MEM_CLR_ENABLE;
  5219			pci_write_config_word(dev, dvsec + PCI_DVSEC_CXL_DEVCTL2,
  5220					      val);
  5221		}
  5222	
  5223		/*
  5224		 * Read timeout value
  5225		 */
  5226		rc = pci_read_config_word(dev, dvsec + PCI_DVSEC_CXL_DEVCAP,
  5227					  &reg);
  5228		if (rc)
  5229			return rc;
  5230		timeout_ms = reset_timeouts_ms[FIELD_GET(PCI_DVSEC_CXL_DEVCAP_CXL_RST_TIMEOUT_MASK, reg)];
  5231	
  5232		/*
  5233		 * Write reset config
  5234		 */
  5235		rc = pci_read_config_word(dev, dvsec + PCI_DVSEC_CXL_DEVCTL2,
  5236					  &reg);
  5237		if (rc)
  5238			return rc;
  5239	
  5240		val = reg | PCI_DVSEC_CXL_DEVCTL2_CXL_INIT_RST;
  5241		pci_write_config_word(dev, dvsec + PCI_DVSEC_CXL_DEVCTL2,
  5242				      val);
  5243	
  5244		/*
  5245		 *  Wait till timeout and then check reset status is complete.
  5246		 */
  5247		msleep(timeout_ms);
  5248		rc = pci_read_config_word(dev, dvsec + PCI_DVSEC_CXL_DEVSTATUS2,
  5249					  &reg);
  5250		if (rc)
  5251			return rc;
  5252		if (reg & PCI_DVSEC_CXL_DEVSTATUS2_RST_ERR ||
  5253		    ~reg & PCI_DVSEC_CXL_DEVSTATUS2_RST_COMPLETE)
  5254			return -ETIMEDOUT;
  5255	
  5256		/*
  5257		 * Revert cashing disable.
  5258		 */
  5259		rc = pci_read_config_word(dev, dvsec + PCI_DVSEC_CXL_DEVCTL2,
  5260					  &reg);
  5261		if (rc)
  5262			return rc;
  5263		val = (reg & (~PCI_DVSEC_CXL_DEVCTL2_DISABLE_CACHING));
  5264		pci_write_config_word(dev, dvsec + PCI_DVSEC_CXL_DEVCTL2,
  5265				      val);
  5266	
  5267		return 0;
  5268	}
  5269	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

  reply	other threads:[~2024-12-14  9:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-13  7:41 [RFC PATCH v1] cxl: add support for cxl reset Srirangan Madhavan
2024-12-14  9:38 ` kernel test robot [this message]
2024-12-17 17:02 ` Ira Weiny
2024-12-20 22:09   ` Srirangan Madhavan
     [not found]   ` <PH7PR12MB796800828DEC6E60D7C7C0F1C3072@PH7PR12MB7968.namprd12.prod.outlook.com>
2024-12-20 23:54     ` Ira Weiny
2024-12-23 23:49       ` Srirangan Madhavan
2024-12-24 10:03         ` Alejandro Lucero Palau

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=202412141749.12WRnc38-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=smadhavan@nvidia.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.