[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190820222828.GC18433@lst.de>
Date: Wed, 21 Aug 2019 00:28:28 +0200
From: Christoph Hellwig <hch@....de>
To: Christophe Leroy <christophe.leroy@....fr>
Cc: Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Paul Mackerras <paulus@...ba.org>,
Michael Ellerman <mpe@...erman.id.au>, npiggin@...il.com,
hch@....de, linux-kernel@...r.kernel.org,
linuxppc-dev@...ts.ozlabs.org
Subject: Re: [PATCH v2 05/12] powerpc/mm: rework io-workaround invocation.
On Tue, Aug 20, 2019 at 02:07:13PM +0000, Christophe Leroy wrote:
> ppc_md.ioremap() is only used for I/O workaround on CELL platform,
> so indirect function call can be avoided.
>
> This patch reworks the io-workaround and ioremap() functions to
> use the global 'io_workaround_inited' flag for the activation
> of io-workaround.
>
> When CONFIG_PPC_IO_WORKAROUNDS or CONFIG_PPC_INDIRECT_MMIO are not
> selected, the I/O workaround ioremap() voids and the global flag is
> not used.
Note that CONFIG_PPC_IO_WORKAROUNDS is only selected by a specific cell
config, and CONFIG_PPC_INDIRECT_MMIO is always selected by cell, so
I think we can make CONFIG_PPC_IO_WORKAROUNDS depend on
CONFIG_PPC_INDIRECT_MMIO
> #define _IO_WORKAROUNDS_H
>
> +#ifdef CONFIG_PPC_IO_WORKAROUNDS
> #include <linux/io.h>
> #include <asm/pci-bridge.h>
>
> @@ -32,4 +33,23 @@ extern int spiderpci_iowa_init(struct iowa_bus *, void *);
> #define SPIDER_PCI_DUMMY_READ 0x0810
> #define SPIDER_PCI_DUMMY_READ_BASE 0x0814
>
> +#endif
> +
> +#if defined(CONFIG_PPC_IO_WORKAROUNDS) && defined(CONFIG_PPC_INDIRECT_MMIO)
and simplify the ifdefs here a bit.
Otherwise this looks fine:
Reviewed-by: Christoph Hellwig <hch@....de>
Powered by blists - more mailing lists