linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Edward Cree <ecree.xilinx@gmail.com>
To: Baoquan He <bhe@redhat.com>, linux-kernel@vger.kernel.org
Cc: linux-arch@vger.kernel.org, linux-mm@kvack.org, arnd@arndb.de,
	christophe.leroy@csgroup.eu, hch@infradead.org,
	agordeev@linux.ibm.com, wangkefeng.wang@huawei.com,
	schnelle@linux.ibm.com, David.Laight@ACULAB.COM,
	shorne@gmail.com, willy@infradead.org, loongarch@lists.linux.dev,
	linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org,
	linuxppc-dev@lists.ozlabs.org, x86@kernel.org,
	netdev@vger.kernel.org, Martin Habets <habetsm.xilinx@gmail.com>
Subject: Re: [PATCH v5 01/17] asm-generic/iomap.h: remove ARCH_HAS_IOREMAP_xx macros
Date: Wed, 1 Mar 2023 04:38:10 +0000	[thread overview]
Message-ID: <7bd6db48-ffb1-7eb1-decf-afa8be032970@gmail.com> (raw)
In-Reply-To: <20230301034247.136007-2-bhe@redhat.com>

On 01/03/2023 03:42, Baoquan He wrote:
> diff --git a/drivers/net/ethernet/sfc/io.h b/drivers/net/ethernet/sfc/io.h
> index 30439cc83a89..07f99ad14bf3 100644
> --- a/drivers/net/ethernet/sfc/io.h
> +++ b/drivers/net/ethernet/sfc/io.h
> @@ -70,7 +70,7 @@
>   */
>  #ifdef CONFIG_X86_64
>  /* PIO is a win only if write-combining is possible */
> -#ifdef ARCH_HAS_IOREMAP_WC
> +#ifdef ioremap_wc
>  #define EFX_USE_PIO 1
>  #endif
>  #endif

So I don't know how valid what we're doing here is...

> diff --git a/include/asm-generic/iomap.h b/include/asm-generic/iomap.h
> index 08237ae8b840..196087a8126e 100644
> --- a/include/asm-generic/iomap.h
> +++ b/include/asm-generic/iomap.h
> @@ -93,15 +93,15 @@ extern void __iomem *ioport_map(unsigned long port, unsigned int nr);
>  extern void ioport_unmap(void __iomem *);
>  #endif
>  
> -#ifndef ARCH_HAS_IOREMAP_WC
> +#ifndef ioremap_wc
>  #define ioremap_wc ioremap
>  #endif

... but it looks like this will break it, since in sfc/io.h
 `#ifdef ioremap_wc` will always be true (if I'm correctly
 understanding what we get via #include <linux/io.h>, which I'm
 probably not because asm includes always confuse me).
I.e. we're not just interested in "can code that calls ioremap_wc
 compile?", we care about whether we actually get WC, because
 we're making an optimisation decision based on it.


  reply	other threads:[~2023-03-01  4:38 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-01  3:42 [PATCH v5 00/17] mm: ioremap: Convert architectures to take GENERIC_IOREMAP way Baoquan He
2023-03-01  3:42 ` [PATCH v5 01/17] asm-generic/iomap.h: remove ARCH_HAS_IOREMAP_xx macros Baoquan He
2023-03-01  4:38   ` Edward Cree [this message]
2023-03-01  5:11     ` Matthew Wilcox
2023-03-01  9:24       ` Baoquan He
2023-03-01  3:42 ` [PATCH v5 02/17] hexagon: mm: Convert to GENERIC_IOREMAP Baoquan He
2023-03-01  3:42 ` [PATCH v5 03/17] openrisc: mm: remove unneeded early ioremap code Baoquan He
2023-03-01  3:42 ` [PATCH v5 04/17] mm/ioremap: Define generic_ioremap_prot() and generic_iounmap() Baoquan He
2023-03-01  3:42 ` [PATCH v5 05/17] mm: ioremap: allow ARCH to have its own ioremap method definition Baoquan He
2023-03-01  3:42 ` [PATCH v5 06/17] mm/ioremap: add slab availability checking in ioremap_prot Baoquan He
2023-03-01  3:42 ` [PATCH v5 07/17] arc: mm: Convert to GENERIC_IOREMAP Baoquan He
2023-03-01  3:42 ` [PATCH v5 08/17] ia64: " Baoquan He
2023-03-01  3:42 ` [PATCH v5 09/17] openrisc: " Baoquan He
2023-03-01  3:42 ` [PATCH v5 10/17] s390: " Baoquan He
2023-03-01  3:42 ` [PATCH v5 11/17] sh: " Baoquan He
2023-03-01  3:42 ` [PATCH v5 12/17] xtensa: " Baoquan He
2023-03-01  3:42 ` [PATCH v5 13/17] parisc: " Baoquan He
2023-03-01  3:42 ` [PATCH v5 14/17] mm/ioremap: Consider IOREMAP space in generic ioremap Baoquan He
2023-03-01  3:42 ` [PATCH v5 15/17] powerpc: mm: Convert to GENERIC_IOREMAP Baoquan He
2023-03-01  3:42 ` [PATCH v5 16/17] arm64 : mm: add wrapper function ioremap_prot() Baoquan He
2023-03-01  3:42 ` [PATCH v5 17/17] mm: ioremap: remove unneeded ioremap_allowed and iounmap_allowed Baoquan He

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=7bd6db48-ffb1-7eb1-decf-afa8be032970@gmail.com \
    --to=ecree.xilinx@gmail.com \
    --cc=David.Laight@ACULAB.COM \
    --cc=agordeev@linux.ibm.com \
    --cc=arnd@arndb.de \
    --cc=bhe@redhat.com \
    --cc=christophe.leroy@csgroup.eu \
    --cc=habetsm.xilinx@gmail.com \
    --cc=hch@infradead.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-m68k@lists.linux-m68k.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=loongarch@lists.linux.dev \
    --cc=netdev@vger.kernel.org \
    --cc=schnelle@linux.ibm.com \
    --cc=shorne@gmail.com \
    --cc=wangkefeng.wang@huawei.com \
    --cc=willy@infradead.org \
    --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