linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Fabio Estevam <festevam@gmail.com>
Cc: Linux ARM <linux-arm-kernel@lists.infradead.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	Shawn Guo <shawnguo@kernel.org>,
	NXP Linux Team <linux-imx@nxp.com>,
	Sascha Hauer <kernel@pengutronix.de>
Subject: Re: [PATCH 09/13] ARM: imx: Remove unused IO_ADDRESS() macros
Date: Thu, 17 Sep 2020 09:16:22 +0200	[thread overview]
Message-ID: <CAK8P3a29hRu8vXubdroNfv3USC9FAKaKTzw=ORTsNFmRJZYAtg@mail.gmail.com> (raw)
In-Reply-To: <CAOMZO5AFK=D1137ofEqw=NTpZ549NszN-jNdgvB-XWsVR=UtOw@mail.gmail.com>

On Wed, Sep 16, 2020 at 11:56 PM Fabio Estevam <festevam@gmail.com> wrote:
> On Wed, Sep 16, 2020 at 6:35 PM Arnd Bergmann <arnd@arndb.de> wrote:
>
> > As far as I can tell, the MX27_IO_P2V() macro should be removed here as
> > well if MX27_IO_ADDRESS() gets removed.
>
> The MX27_IO_P2V() macro is still used. Here is the error when I try to
> remove it:
>
> In file included from arch/arm/mach-imx/mach-imx27.c:17:0:
> arch/arm/mach-imx/mach-imx27.c:30:16: error: implicit declaration of
> function ‘MX27_IO_P2V’; did you mean ‘MX35_IO_P2V’?
> [-Werror=implicit-function-declaration]
>   imx_map_entry(MX27, AIPI, MT_DEVICE),
>                 ^
> arch/arm/mach-imx/hardware.h:103:13: note: in definition of macro
> ‘imx_map_entry’
>   .virtual = soc ## _IO_P2V(soc ## _ ## name ## _BASE_ADDR), \

Ah, right. My grep did not catch the static mappings:

arch/arm/mach-imx/mm-imx21.c-/* MX21 memory map definition */
arch/arm/mach-imx/mm-imx21.c-static struct map_desc imx21_io_desc[]
__initdata = {
arch/arm/mach-imx/mm-imx21.c:   imx_map_entry(MX21, AIPI, MT_DEVICE),
arch/arm/mach-imx/mm-imx21.c:   imx_map_entry(MX21, SAHB1, MT_DEVICE),
arch/arm/mach-imx/mm-imx21.c:   imx_map_entry(MX21, X_MEMC, MT_DEVICE),
arch/arm/mach-imx/mm-imx21.c-};
--
arch/arm/mach-imx/mm-imx27.c-/* MX27 memory map definition */
arch/arm/mach-imx/mm-imx27.c-static struct map_desc imx27_io_desc[]
__initdata = {
arch/arm/mach-imx/mm-imx27.c:   imx_map_entry(MX27, AIPI, MT_DEVICE),
arch/arm/mach-imx/mm-imx27.c:   imx_map_entry(MX27, SAHB1, MT_DEVICE),
arch/arm/mach-imx/mm-imx27.c:   imx_map_entry(MX27, X_MEMC, MT_DEVICE),
arch/arm/mach-imx/mm-imx27.c-};
--
arch/arm/mach-imx/mm-imx3.c-static struct map_desc mx31_io_desc[] __initdata = {
arch/arm/mach-imx/mm-imx3.c:    imx_map_entry(MX31, X_MEMC, MT_DEVICE),
arch/arm/mach-imx/mm-imx3.c:    imx_map_entry(MX31, AVIC, MT_DEVICE_NONSHARED),
arch/arm/mach-imx/mm-imx3.c:    imx_map_entry(MX31, AIPS1, MT_DEVICE_NONSHARED),
arch/arm/mach-imx/mm-imx3.c:    imx_map_entry(MX31, AIPS2, MT_DEVICE_NONSHARED),
arch/arm/mach-imx/mm-imx3.c:    imx_map_entry(MX31, SPBA0, MT_DEVICE_NONSHARED),
arch/arm/mach-imx/mm-imx3.c-};
--
arch/arm/mach-imx/mm-imx3.c-#ifdef CONFIG_SOC_IMX35
arch/arm/mach-imx/mm-imx3.c-static struct map_desc mx35_io_desc[] __initdata = {
arch/arm/mach-imx/mm-imx3.c:    imx_map_entry(MX35, X_MEMC, MT_DEVICE),
arch/arm/mach-imx/mm-imx3.c:    imx_map_entry(MX35, AVIC, MT_DEVICE_NONSHARED),
arch/arm/mach-imx/mm-imx3.c:    imx_map_entry(MX35, AIPS1, MT_DEVICE_NONSHARED),
arch/arm/mach-imx/mm-imx3.c:    imx_map_entry(MX35, AIPS2, MT_DEVICE_NONSHARED),
arch/arm/mach-imx/mm-imx3.c:    imx_map_entry(MX35, SPBA0, MT_DEVICE_NONSHARED),
arch/arm/mach-imx/mm-imx3.c-};

If all of the devices in here are now also mapped using of_iomap() or
ioremap(), then the iotables are not strictly needed any more, but most
of them are 1MB section sized, which helps slightly reduce TLB usage
compared to non-section ioremap() mappings, so we might want to
keep them anyway, possibly with the constants moved from the header
into the mm-imx??.c files.

Adding Linus to Cc for further thoughts, as he was looking at the early
io mappings recently.

      Arnd

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-09-17  7:18 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-16 20:55 [PATCH 00/13] ARM: imx: Further cleanups due to dt-only conversion Fabio Estevam
2020-09-16 20:55 ` [PATCH 01/13] ARM: dts: imx27: Fix the register range for CCM Fabio Estevam
2020-09-16 20:55 ` [PATCH 02/13] ARM: dts: imx27: Add the SYSCTRL description Fabio Estevam
2020-09-16 20:55 ` [PATCH 03/13] ARM: imx27: Retrieve the SYSCTRL base address from devicetree Fabio Estevam
2020-09-16 21:30   ` Arnd Bergmann
2020-09-16 21:36     ` Fabio Estevam
2020-09-16 20:55 ` [PATCH 04/13] ARM: imx27: Retrieve the CCM " Fabio Estevam
2020-09-16 20:55 ` [PATCH 05/13] ARM: imx31: Retrieve the IIM " Fabio Estevam
2020-09-16 20:55 ` [PATCH 06/13] ARM: imx3: Retrieve the CCM " Fabio Estevam
2020-09-16 20:55 ` [PATCH 07/13] ARM: imx3: Retrieve the AVIC " Fabio Estevam
2020-09-16 20:55 ` [PATCH 08/13] ARM: imx35: Retrieve the IIM " Fabio Estevam
2020-09-16 20:55 ` [PATCH 09/13] ARM: imx: Remove unused IO_ADDRESS() macros Fabio Estevam
2020-09-16 21:34   ` Arnd Bergmann
2020-09-16 21:56     ` Fabio Estevam
2020-09-17  7:16       ` Arnd Bergmann [this message]
2020-09-17 10:17         ` Fabio Estevam
2020-09-29 13:11         ` Linus Walleij
2020-09-29 13:21           ` Arnd Bergmann
2020-09-30  9:34             ` Linus Walleij
2020-09-16 20:55 ` [PATCH 10/13] clk: imx: imx27: Remove mx27_clocks_init() Fabio Estevam
2020-09-16 20:55 ` [PATCH 11/13] clk: imx: imx31: Remove mx31_clocks_init() Fabio Estevam
2020-09-16 20:55 ` [PATCH 12/13] clk: imx: imx35: Remove mx35_clocks_init() Fabio Estevam
2020-09-16 20:55 ` [PATCH 13/13] clk: imx: imx21: Remove clock driver Fabio Estevam

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='CAK8P3a29hRu8vXubdroNfv3USC9FAKaKTzw=ORTsNFmRJZYAtg@mail.gmail.com' \
    --to=arnd@arndb.de \
    --cc=festevam@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=shawnguo@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;
as well as URLs for NNTP newsgroup(s).