mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: "Maciej W. Rozycki" <macro@orcam.me.uk>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	x86@kernel.org, Boris Ostrovsky <boris.ostrovsky@oracle.com>,
	"H. Peter Anvin" <hpa@zytor.com>,
	"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
	Rick Edgecombe <rick.p.edgecombe@intel.com>,
	Isaku Yamahata <isaku.yamahata@intel.com>,
	Kevin Loughlin <kevinloughlin@google.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86/EISA: Use memremap() to probe for the EISA BIOS signature
Date: Tue, 27 Aug 2024 23:14:45 -0700	[thread overview]
Message-ID: <Zs7AVTEiW2R_vB-f@infradead.org> (raw)
In-Reply-To: <alpine.DEB.2.21.2408242025210.30766@angie.orcam.me.uk>

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.


  parent reply	other threads:[~2024-08-28  6:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-24 22:17 Maciej W. Rozycki
2024-08-25 12:37 ` [tip: x86/cleanups] " tip-bot2 for Maciej W. Rozycki
2024-08-28  6:14 ` Christoph Hellwig [this message]
2024-08-28  7:13   ` [PATCH] " Kirill A. Shutemov

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=Zs7AVTEiW2R_vB-f@infradead.org \
    --to=hch@infradead.org \
    --cc=boris.ostrovsky@oracle.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=isaku.yamahata@intel.com \
    --cc=kevinloughlin@google.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=macro@orcam.me.uk \
    --cc=mingo@redhat.com \
    --cc=rick.p.edgecombe@intel.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /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

all inboxes | Powered by JetHome®