[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <pmskepgrtwhs5owjr4ok3i32655jyrkbmja7mew357occwlumx@hpd2mqndpkey>
Date: Wed, 28 Aug 2024 10:13:34 +0300
From: "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>
To: Christoph Hellwig <hch@...radead.org>
Cc: "Maciej W. Rozycki" <macro@...am.me.uk>,
Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org, Boris Ostrovsky <boris.ostrovsky@...cle.com>,
"H. Peter Anvin" <hpa@...or.com>, Rick Edgecombe <rick.p.edgecombe@...el.com>,
Isaku Yamahata <isaku.yamahata@...el.com>, Kevin Loughlin <kevinloughlin@...gle.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] x86/EISA: Use memremap() to probe for the EISA BIOS
signature
On Tue, Aug 27, 2024 at 11:14:45PM -0700, Christoph Hellwig wrote:
> On Sat, Aug 24, 2024 at 11:17:10PM +0100, Maciej W. Rozycki wrote:
> > - void __iomem *p;
> > + void *p;
> >
> > if ((xen_pv_domain() && !xen_initial_domain()) || cc_platform_has(CC_ATTR_GUEST_SEV_SNP))
> > return 0;
> >
> > - p = ioremap(0x0FFFD9, 4);
> > + p = memremap(0x0FFFD9, 4, MEMREMAP_WB);
> > if (p && readl(p) == 'E' + ('I' << 8) + ('S' << 16) + ('A' << 24))
> > EISA_bus = 1;
>
> readl requires and __iomem pointer. If this is just a memory region you
> can and should directly dereference the address instead.
>
> Note that sparse will complain about the above as well.
See v2:
https://lore.kernel.org/all/alpine.DEB.2.21.2408261015270.30766@angie.orcam.me.uk
--
Kiryl Shutsemau / Kirill A. Shutemov
Powered by blists - more mailing lists