Re: [linux-next:master 4897/5417] drivers/i2c/busses/i2c-designware-amdpsp.c:165:25: sparse: sparse: incorrect type in argument 1 (different address spaces)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Feb 14, 2022 at 01:27:35PM +0100, Jan Dąbroś wrote:
> pt., 11 lut 2022 o 22:24 kernel test robot <lkp@xxxxxxxxx> napisał(a):

> >    159
> >    160  /* Helper to verify status returned by PSP */
> >    161  static int check_i2c_req_sts(struct psp_i2c_req *req)
> >    162  {
> >    163          int status;
> >    164
> >  > 165          status = readl(&req->hdr.status);
> 
> Actually the above error points to something hidden but important -
> for reading from command-response buffer, we shouldn't use __iomem
> specifier (nor readl() family of functions) since this is normal
> memory - however updated by PSP. Thus I will refactor this to use
> 'volatile u32 *' and reading status by de-referencing pointer.

Not sure volatile is a good idea. Perhaps READ_ONCE() is what you need.
Is this a system memory?

-- 
With Best Regards,
Andy Shevchenko







[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux