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

Re: [PATCH v2 1/2] intel/pinctrl: check REVID register value for device presence


  • To: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Thu, 25 Mar 2021 09:36:26 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=rMseXzzuh3LwxBLdIsHCmwcEHix6OfFdjI2TJF3OQXk=; b=H54Z+OH98NDj6Qprh088ECvPt4RQmTYeU6FK1ufyjAGOFt2gVhfiOrRa1nER2Tma0zMJ8i07TX6WDwHAxtE9DclF7T+33Ddh4BIgVVdZ7z6UqzCvc2q8Fwk37bXo4p0/FBCT7cGVEPBfmtVXbPa2oKzuo9ceXwjDWiSGtobpv/stKod1hpVVY4YZGbSry7M2BOf2HpuorrG0LK5edGUKMOoj6qRoATmFat7EH4I06E8HPGa9DRw1/aAmnFIx2OcuvPYTLYYfGjtHF4iHKgdUkjtBHq3SnaR2DPL/J1Fmki9V95rfDR3OPiZbw7Y589eucLYWOs5IhSwLMR1jjC76gA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TbImrjRSoP8MCaukz8AwKZAu4/fhFIPXDDNeNNAM16QCVnh5EBj0mIFMStm2ku0b9KzZBSCU9nBLIc6z5pi7u1rUZBH6RROmXSAv4jiHuFiPeAe1ZvTqF9Fht1nDUh3hoQ1c1IN9VCcan69mb6eTi6VhgVXuIgbehiKnOhLsW0662yND9P1f4iSFhl/u+VIWyJt1+RIHZ5xlq/uX1FOYol+aBz/mUtfQ0xPK4tr04b1Zy8GWznveVmVuZu5L2FqtbjInUEv7478V6QeC9QjXBAl+kWcPw6muRX/naH/NRBQwmtquyWZ0O75GbQeL7628p0EDgbTcK/Ftf5scbRi+oQ==
  • Authentication-results: esa5.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: <linux-kernel@xxxxxxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Andy Shevchenko <andy@xxxxxxxxxx>, Mika Westerberg <mika.westerberg@xxxxxxxxxxxxxxx>, Linus Walleij <linus.walleij@xxxxxxxxxx>, <linux-gpio@xxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 25 Mar 2021 08:36:38 +0000
  • Ironport-hdrordr: A9a23:hrX8EahmynDPD6CRTHvdbBueNXBQXw5y3DAbvn1ZSRFFG/Gwv/ uF2NwGyB75jysQUnk8mdaGfJKNW2/Y6IQd2+QsFJ+Ydk3DtHGzJI9vqbHjzTrpBjHk+odmv5 tIW5NVTOf9BV0St63HySGzGdo43Z2j+Kenme/Rwx5WPHRXQol98gZ0DRuaGEVqRA9AQaE0Do aY+9ACgSGhd3QRZsHTPAhyY8HoodrXmJX6JSMXHhJP0nj2sRqEyp7fVyKZ0BAXTi9Vzd4ZnV TtvgTl6syYwoCG4zDG0Wu71eUtpPLAzZ95CNWImowpLFzX+3SVTaBAf5HHgzwvuuGo7z8R4Z zxijMtJd565X+UXkzdm2qc5yDa3Dwj62DvxDaj6BONz72bNVBKc7s7uatjfhHU61UtsZVH6Y 0j5QKknqFaAh/akCP268KgbWAYqmOOrWc/iulWtnRDUOIlGfhshLYC90BYGopoJlOH1KkbEf JjBMyZxPFafULyVQGmgkBTwcehVnl2IxGeQkJqgL3r7xFqmhlCvjYl7f1aslE43I8hUJlO+/ nJP4BljqtHQMN+V9M6OM4xBeenAGnEQRbBK0OVO0nqGZsGNXXEtoLt7K9wwO2xYpQHwKIonp 7MSklVuAcJCifTIPzL8IxA9xjMRGmnfTD10cFY+rByp737Q9PQQE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HcN4dPmBEw5ebewRtqWv5awhn2BqZwovFXc1jFnGrrhb9I b8/PXZQOv5D3j0fXoH5D5eH4Zx2ggms3tJfcT7zZWzZGwsZ7Q1Ksp6woBdizRyrFfvq3Uach V2rwQtkqXANEbuMXg5Na/gm8/RmxgXpK+L7jRV1TRts2LirFGXoF7umcmp/1Iysm3Gtwdi7Z ynewFZulcViidXhYhgOGGKS2jiXDesN0721rIhPTlYDn011/83gBerFdhEqrmOi0x+rTo6BS AsxaqMDWi3c0TPKfTgaDSxUNilCt97ZPhcfmIFMn6tLRzB3pA9VAjBdttt3gil801+RpSmK+ ejekaQHZMN9KsfN+jwWIaYn97JzRUc+HcIrY734Eb13s5C/IeePEp7t9l4bq1ifgGt9y182s GIXQ3OM5MMiRul41DJ+GBdPpsO3w8RwUMGvi8eFyOjGsOrSiha1XY74o6sQDdd1N2IRtlUu3 rQuFKtuHHZMwaPLUmnMod9qU4B5ULGW4LVv1+zZrr3OVRT4ZiXYO6EqRY=
  • Ironport-sdr: Ga8gCpdqVFu0kc3d7yOxmFoujri0o1YOBS+igN1JkW+SzieYHroDYfQM1Jm60YLwcrIRP/PKwr UsB4RYAGwirVHBRgcxU4IQ2I2o+w5yDcqOOiO7ANbK/bnnD8LFfPf1Kj4hS6Ymr3wDArGoLlYl yLFrZgnoQ8y0b62X+VWI8DS3wDglrtIa5L7yxxTdmW9d7pOPZ+L4IRO7VhcmVrXpaWuVBlIOEF Jn2DohDdBG7brZPRmpj4tvPMFb3VueflQUNZkm/LEbkeqvmC+N3YOJMvPwe2i+oH/9BvKMplL2 qTw=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Wed, Mar 24, 2021 at 07:01:18PM +0200, Andy Shevchenko wrote:
> On Wed, Mar 24, 2021 at 04:43:11PM +0100, Roger Pau Monne wrote:
> 
> Thanks for a fix! My comments below.
> 
> > Use the value read from the REVID register in order to check for the
> > presence of the device. A read of all ones is treated as if the device
> > is not present, and hence probing is ended.
> > 
> > This fixes an issue when running as a Xen PVH dom0, where the ACPI
> > DSDT table is provided unmodified to dom0 and hence contains the
> > pinctrl devices, but the MMIO region(s) containing the device
> > registers might not be mapped in the guest physical memory map if such
> > region(s) are not exposed on a PCI device BAR or marked as reserved in
> > the host memory map.
> 
> Any particular point that we can use in the Fixes tag?

Hm, I haven't seen those issues up until 91d898e51e60 ('pinctrl:
intel: Convert capability list to features'), but the device wasn't
working properly for sure, as the registers where not accessible, it
just didn't lead to a kernel crash.

> ...
> 
> > Suggested-by: Andy Shevchenko <andy@xxxxxxxxxx>
> 
> Hmm... was it that address I have used? In any case I think my 
> @linux.intel.com
> is better.

I just used the same as the one that's on the MAINTAINERS file,
because I already had that n my Cc list. I can change to the @intel
one if that's your preference.

> ...
> 
> >             /* Determine community features based on the revision */
> >             value = readl(regs + REVID);
> > +           if (value == ~0u)
> > +                   return -ENODATA;
> 
> I think -ENODEV is more appropriate here.
> Also comment above should be adjusted to explain this check.

Right, will change and send v3.

Thanks.



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.