The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Athira Rajeev <atrajeev@linux.ibm.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
	Madhavan Srinivasan <maddy@linux.ibm.com>
Subject: arch/powerpc/platforms/pseries/htmdump.c:246:25: sparse: sparse: cast to restricted __be64
Date: Wed, 13 May 2026 03:53:01 +0800	[thread overview]
Message-ID: <202605130321.UkddskUP-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   1d5dcaa3bd65f2e8c9baa14a393d3a2dc5db7524
commit: 627cf584f4c36acb52230ffc47403cf9469ec9d0 powerpc/pseries/htmdump: Add htm status support to htmdump module
date:   1 year ago
config: powerpc64-randconfig-r122-20260512 (https://download.01.org/0day-ci/archive/20260513/202605130321.UkddskUP-lkp@intel.com/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project 5bac06718f502014fade905512f1d26d578a18f3)
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260513/202605130321.UkddskUP-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
| Fixes: 627cf584f4c3 ("powerpc/pseries/htmdump: Add htm status support to htmdump module")
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202605130321.UkddskUP-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> arch/powerpc/platforms/pseries/htmdump.c:246:25: sparse: sparse: cast to restricted __be64

vim +246 arch/powerpc/platforms/pseries/htmdump.c

   208	
   209	static ssize_t htmstatus_read(struct file *filp, char __user *ubuf,
   210				     size_t count, loff_t *ppos)
   211	{
   212		void *htm_status_buf = filp->private_data;
   213		long rc, ret;
   214		u64 *num_entries;
   215		u64 to_copy;
   216		int htmstatus_flag;
   217	
   218		/*
   219		 * Invoke H_HTM call with:
   220		 * - operation as htm status (H_HTM_OP_STATUS)
   221		 * - last three values as addr, size and offset
   222		 */
   223		rc = htm_hcall_wrapper(nodeindex, nodalchipindex, coreindexonchip,
   224					   htmtype, H_HTM_OP_STATUS, virt_to_phys(htm_status_buf),
   225					   PAGE_SIZE, 0);
   226	
   227		ret = htm_return_check(rc);
   228		if (ret <= 0) {
   229			pr_debug("H_HTM hcall failed for op: H_HTM_OP_STATUS, returning %ld\n", ret);
   230			return ret;
   231		}
   232	
   233		/*
   234		 * HTM status buffer, start of buffer + 0x10 gives the
   235		 * number of HTM entries in the buffer. Each nest htm status
   236		 * entry is 0x6 bytes where each core htm status entry is
   237		 * 0x8 bytes.
   238		 * So total count to copy is:
   239		 * 32 bytes (for first 7 fields) + (number of HTM entries * entry size)
   240		 */
   241		num_entries = htm_status_buf + 0x10;
   242		if (htmtype == 0x2)
   243			htmstatus_flag = 0x8;
   244		else
   245			htmstatus_flag = 0x6;
 > 246		to_copy = 32 + (be64_to_cpu(*num_entries) * htmstatus_flag);
   247		return simple_read_from_buffer(ubuf, count, ppos, htm_status_buf, to_copy);
   248	}
   249	

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

             reply	other threads:[~2026-05-12 19:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-12 19:53 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-05-13 10:24 arch/powerpc/platforms/pseries/htmdump.c:246:25: sparse: sparse: cast to restricted __be64 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=202605130321.UkddskUP-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=atrajeev@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maddy@linux.ibm.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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