[PATCH 1/2] platform/x86/intel/pmt: allow user offset for PMT callbacks

Andy Shevchenko andriy.shevchenko at linux.intel.com
Tue Nov 12 15:27:53 UTC 2024


On Tue, Nov 12, 2024 at 02:38:06PM +0000, Ruhl, Michael J wrote:
> > -----Original Message-----
> > From: Andy Shevchenko <andriy.shevchenko at linux.intel.com>
> > Sent: Monday, November 11, 2024 3:34 AM
> > To: Ruhl, Michael J <michael.j.ruhl at intel.com>
> > Cc: intel-xe at lists.freedesktop.org; platform-driver-x86 at vger.kernel.org;
> > david.e.box at linux.intel.com; ilpo.jarvinen at linux.intel.com;
> > hdegoede at redhat.com; Vivi, Rodrigo <rodrigo.vivi at intel.com>; De Marchi,
> > Lucas <lucas.demarchi at intel.com>
> > Subject: Re: [PATCH 1/2] platform/x86/intel/pmt: allow user offset for PMT
> > callbacks
> > 
> > On Fri, Nov 08, 2024 at 03:19:53PM -0500, Michael J. Ruhl wrote:
> > > Usage of the telem sysfs file allows for partial reads at an offset.
> > >
> > > The current callback method returns the buffer starting from offset 0
> > > only.
> > >
> > > Include the requested offset in the callback.
> > > Update the necsessary address calculations with the offset.
> > 
> > ...
> > 
> > > -	memcpy_fromio(buf, addr, count);
> > > +	memcpy_fromio(buf, addr + off, count);
> 
> Hi Andy,
> 
> > This will give an unaligned IO access in some cases. Is it a problem?
> 
> That is a good question.
> 
> I moved this value from the caller to this location.
> 
> So essentially it is "unchanged" from the current usage.  Does that answer
> the question?

Probably. Please, mention this in the commit message.

-- 
With Best Regards,
Andy Shevchenko




More information about the Intel-xe mailing list