Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] soc: imx: Makefile: only build soc-imx8 when CONFIG_ARM64
@ 2020-01-14  8:08 Peng Fan
  2020-01-14  8:17 ` Uwe Kleine-König
  0 siblings, 1 reply; 6+ messages in thread
From: Peng Fan @ 2020-01-14  8:08 UTC (permalink / raw)
  To: shawnguo, s.hauer, Abel Vesa, Leonard Crestez
  Cc: Peng Fan, Anson Huang, linux-kernel, dl-linux-imx, kernel,
	festevam, linux-arm-kernel

From: Peng Fan <peng.fan@nxp.com>

Only need to build soc-imx8.c when CONFIG_ARM64 defined,
no need to build it for CONFIG_ARM32 currently.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 drivers/soc/imx/Makefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/soc/imx/Makefile b/drivers/soc/imx/Makefile
index cf9ca42ff739..cfcbc62b11d7 100644
--- a/drivers/soc/imx/Makefile
+++ b/drivers/soc/imx/Makefile
@@ -1,5 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0-only
 obj-$(CONFIG_HAVE_IMX_GPC) += gpc.o
 obj-$(CONFIG_IMX_GPCV2_PM_DOMAINS) += gpcv2.o
+ifdef CONFIG_ARM64
 obj-$(CONFIG_ARCH_MXC) += soc-imx8.o
+endif
 obj-$(CONFIG_IMX_SCU_SOC) += soc-imx-scu.o
-- 
2.16.4


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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] soc: imx: Makefile: only build soc-imx8 when CONFIG_ARM64
  2020-01-14  8:08 [PATCH] soc: imx: Makefile: only build soc-imx8 when CONFIG_ARM64 Peng Fan
@ 2020-01-14  8:17 ` Uwe Kleine-König
  2020-01-14  8:32   ` Peng Fan
  0 siblings, 1 reply; 6+ messages in thread
From: Uwe Kleine-König @ 2020-01-14  8:17 UTC (permalink / raw)
  To: Peng Fan
  Cc: Abel Vesa, Anson Huang, festevam, s.hauer, linux-kernel,
	dl-linux-imx, kernel, Leonard Crestez, shawnguo,
	linux-arm-kernel

On Tue, Jan 14, 2020 at 08:08:45AM +0000, Peng Fan wrote:
> From: Peng Fan <peng.fan@nxp.com>
> 
> Only need to build soc-imx8.c when CONFIG_ARM64 defined,
> no need to build it for CONFIG_ARM32 currently.
> 
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
>  drivers/soc/imx/Makefile | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/soc/imx/Makefile b/drivers/soc/imx/Makefile
> index cf9ca42ff739..cfcbc62b11d7 100644
> --- a/drivers/soc/imx/Makefile
> +++ b/drivers/soc/imx/Makefile
> @@ -1,5 +1,7 @@
>  # SPDX-License-Identifier: GPL-2.0-only
>  obj-$(CONFIG_HAVE_IMX_GPC) += gpc.o
>  obj-$(CONFIG_IMX_GPCV2_PM_DOMAINS) += gpcv2.o
> +ifdef CONFIG_ARM64
>  obj-$(CONFIG_ARCH_MXC) += soc-imx8.o
> +endif

For earlier SoCs we had kconfig symbols like SOC_IMX25. Actually
SOC_IMX8 would be the right one to decide about soc-imx8.c to be
compiled, it would be easier to read and verify than the suggested
"ARM64 && ARCH_MXC" and it would stay right once NXP presents it's next
64-bit SoC i.MX9.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [PATCH] soc: imx: Makefile: only build soc-imx8 when CONFIG_ARM64
  2020-01-14  8:17 ` Uwe Kleine-König
@ 2020-01-14  8:32   ` Peng Fan
  2020-01-14 10:59     ` Arnd Bergmann
  0 siblings, 1 reply; 6+ messages in thread
From: Peng Fan @ 2020-01-14  8:32 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Abel Vesa, Anson Huang, festevam, s.hauer, linux-kernel,
	dl-linux-imx, kernel, Leonard Crestez, shawnguo,
	linux-arm-kernel

Hi Uwe,

> Subject: Re: [PATCH] soc: imx: Makefile: only build soc-imx8 when
> CONFIG_ARM64
> 
> On Tue, Jan 14, 2020 at 08:08:45AM +0000, Peng Fan wrote:
> > From: Peng Fan <peng.fan@nxp.com>
> >
> > Only need to build soc-imx8.c when CONFIG_ARM64 defined, no need to
> > build it for CONFIG_ARM32 currently.
> >
> > Signed-off-by: Peng Fan <peng.fan@nxp.com>
> > ---
> >  drivers/soc/imx/Makefile | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/soc/imx/Makefile b/drivers/soc/imx/Makefile index
> > cf9ca42ff739..cfcbc62b11d7 100644
> > --- a/drivers/soc/imx/Makefile
> > +++ b/drivers/soc/imx/Makefile
> > @@ -1,5 +1,7 @@
> >  # SPDX-License-Identifier: GPL-2.0-only
> >  obj-$(CONFIG_HAVE_IMX_GPC) += gpc.o
> >  obj-$(CONFIG_IMX_GPCV2_PM_DOMAINS) += gpcv2.o
> > +ifdef CONFIG_ARM64
> >  obj-$(CONFIG_ARCH_MXC) += soc-imx8.o
> > +endif
> 
> For earlier SoCs we had kconfig symbols like SOC_IMX25. Actually
> SOC_IMX8 would be the right one to decide about soc-imx8.c to be compiled,
> it would be easier to read and verify than the suggested
> "ARM64 && ARCH_MXC" and it would stay right once NXP presents it's next
> 64-bit SoC i.MX9.

There is no SOC_IMX8 currently. Need to introduce one in 
arch/arm64/Kconfig.platforms. But I not see other vendors
introduce options like SOC_XX. Is this the right direction to
add one in Kconfig.platforms?

Thanks,
Peng.

> 
> Best regards
> Uwe
> 
> --
> Pengutronix e.K.                           | Uwe Kleine-König
> |
> Industrial Linux Solutions                 |
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.
> pengutronix.de%2F&amp;data=02%7C01%7Cpeng.fan%40nxp.com%7C90c4c
> 1a07d9242a422ce08d798ca414e%7C686ea1d3bc2b4c6fa92cd99c5c301635
> %7C0%7C0%7C637145866755858613&amp;sdata=A3e1lAq5wR7d9doxZZV%
> 2FUud1u2qDxdY9VhaHlfzgbhc%3D&amp;reserved=0 |

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] soc: imx: Makefile: only build soc-imx8 when CONFIG_ARM64
  2020-01-14  8:32   ` Peng Fan
@ 2020-01-14 10:59     ` Arnd Bergmann
  2020-01-15  2:38       ` Peng Fan
  0 siblings, 1 reply; 6+ messages in thread
From: Arnd Bergmann @ 2020-01-14 10:59 UTC (permalink / raw)
  To: Peng Fan
  Cc: Abel Vesa, Anson Huang, shawnguo, s.hauer, linux-kernel,
	dl-linux-imx, kernel, Uwe Kleine-König, Leonard Crestez,
	festevam, linux-arm-kernel

On Tue, Jan 14, 2020 at 9:32 AM Peng Fan <peng.fan@nxp.com> wrote:
> > Subject: Re: [PATCH] soc: imx: Makefile: only build soc-imx8 when
> > CONFIG_ARM64
> >
> > On Tue, Jan 14, 2020 at 08:08:45AM +0000, Peng Fan wrote:
> > > From: Peng Fan <peng.fan@nxp.com>
> > >
> > > Only need to build soc-imx8.c when CONFIG_ARM64 defined, no need to
> > > build it for CONFIG_ARM32 currently.
> > >
> > > Signed-off-by: Peng Fan <peng.fan@nxp.com>
> > > ---
> > >  drivers/soc/imx/Makefile | 2 ++
> > >  1 file changed, 2 insertions(+)
> > >
> > > diff --git a/drivers/soc/imx/Makefile b/drivers/soc/imx/Makefile index
> > > cf9ca42ff739..cfcbc62b11d7 100644
> > > --- a/drivers/soc/imx/Makefile
> > > +++ b/drivers/soc/imx/Makefile
> > > @@ -1,5 +1,7 @@
> > >  # SPDX-License-Identifier: GPL-2.0-only
> > >  obj-$(CONFIG_HAVE_IMX_GPC) += gpc.o
> > >  obj-$(CONFIG_IMX_GPCV2_PM_DOMAINS) += gpcv2.o
> > > +ifdef CONFIG_ARM64
> > >  obj-$(CONFIG_ARCH_MXC) += soc-imx8.o
> > > +endif
> >
> > For earlier SoCs we had kconfig symbols like SOC_IMX25. Actually
> > SOC_IMX8 would be the right one to decide about soc-imx8.c to be compiled,
> > it would be easier to read and verify than the suggested
> > "ARM64 && ARCH_MXC" and it would stay right once NXP presents it's next
> > 64-bit SoC i.MX9.
>
> There is no SOC_IMX8 currently. Need to introduce one in
> arch/arm64/Kconfig.platforms. But I not see other vendors
> introduce options like SOC_XX. Is this the right direction to
> add one in Kconfig.platforms?

I think it would be more consistent with the other platforms to have
a symbol in drivers/soc/imx/Kconfig to control whether we build
that driver.

If the driver is well written, it should be possible to allow compile
testing it on any architecture (please test this, at least on x86).

For some SoCs, we also allow running 32-bit kernels, so it would
not be wrong to allow enabling the symbol on 32-bit ARM as
well, but this is probably something where you want to consider
the bigger picture to see if you want to support that configuration
or not.

      Arnd

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [PATCH] soc: imx: Makefile: only build soc-imx8 when CONFIG_ARM64
  2020-01-14 10:59     ` Arnd Bergmann
@ 2020-01-15  2:38       ` Peng Fan
  2020-01-15 10:38         ` Arnd Bergmann
  0 siblings, 1 reply; 6+ messages in thread
From: Peng Fan @ 2020-01-15  2:38 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Abel Vesa, Anson Huang, shawnguo, s.hauer, linux-kernel,
	dl-linux-imx, kernel, Uwe Kleine-König, Leonard Crestez,
	festevam, linux-arm-kernel

Hi Arnd,

> Subject: Re: [PATCH] soc: imx: Makefile: only build soc-imx8 when
> CONFIG_ARM64
> 
> On Tue, Jan 14, 2020 at 9:32 AM Peng Fan <peng.fan@nxp.com> wrote:
> > > Subject: Re: [PATCH] soc: imx: Makefile: only build soc-imx8 when
> > > CONFIG_ARM64
> > >
> > > On Tue, Jan 14, 2020 at 08:08:45AM +0000, Peng Fan wrote:
> > > > From: Peng Fan <peng.fan@nxp.com>
> > > >
> > > > Only need to build soc-imx8.c when CONFIG_ARM64 defined, no need
> > > > to build it for CONFIG_ARM32 currently.
> > > >
> > > > Signed-off-by: Peng Fan <peng.fan@nxp.com>
> > > > ---
> > > >  drivers/soc/imx/Makefile | 2 ++
> > > >  1 file changed, 2 insertions(+)
> > > >
> > > > diff --git a/drivers/soc/imx/Makefile b/drivers/soc/imx/Makefile
> > > > index
> > > > cf9ca42ff739..cfcbc62b11d7 100644
> > > > --- a/drivers/soc/imx/Makefile
> > > > +++ b/drivers/soc/imx/Makefile
> > > > @@ -1,5 +1,7 @@
> > > >  # SPDX-License-Identifier: GPL-2.0-only
> > > >  obj-$(CONFIG_HAVE_IMX_GPC) += gpc.o
> > > >  obj-$(CONFIG_IMX_GPCV2_PM_DOMAINS) += gpcv2.o
> > > > +ifdef CONFIG_ARM64
> > > >  obj-$(CONFIG_ARCH_MXC) += soc-imx8.o
> > > > +endif
> > >
> > > For earlier SoCs we had kconfig symbols like SOC_IMX25. Actually
> > > SOC_IMX8 would be the right one to decide about soc-imx8.c to be
> > > compiled, it would be easier to read and verify than the suggested
> > > "ARM64 && ARCH_MXC" and it would stay right once NXP presents it's
> > > next 64-bit SoC i.MX9.
> >
> > There is no SOC_IMX8 currently. Need to introduce one in
> > arch/arm64/Kconfig.platforms. But I not see other vendors introduce
> > options like SOC_XX. Is this the right direction to add one in
> > Kconfig.platforms?
> 
> I think it would be more consistent with the other platforms to have a symbol
> in drivers/soc/imx/Kconfig to control whether we build that driver.

Ok, I'll add Kconfig entry in drivers/soc/imx/Kconfig for various i.MX SoCs.

> 
> If the driver is well written, it should be possible to allow compile testing it on
> any architecture (please test this, at least on x86).

Yes.

> 
> For some SoCs, we also allow running 32-bit kernels, so it would not be wrong
> to allow enabling the symbol on 32-bit ARM as well, but this is probably
> something where you want to consider the bigger picture to see if you want
> to support that configuration or not.

Does the current upstream kernel support 32bit kernels on ARM64 platforms
without vendor specific stuff. I recalled that several years ago, NXP people
tried to upstream 32bit kernel support, but rejected by you.

So Is there any plan to support 32bit kernel on AARCH64 in upstream kernel?
Or any suggestions?

Thanks,
Peng.

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] soc: imx: Makefile: only build soc-imx8 when CONFIG_ARM64
  2020-01-15  2:38       ` Peng Fan
@ 2020-01-15 10:38         ` Arnd Bergmann
  0 siblings, 0 replies; 6+ messages in thread
From: Arnd Bergmann @ 2020-01-15 10:38 UTC (permalink / raw)
  To: Peng Fan
  Cc: Abel Vesa, Anson Huang, shawnguo, s.hauer, linux-kernel,
	dl-linux-imx, kernel, Uwe Kleine-König, Leonard Crestez,
	festevam, linux-arm-kernel

On Wed, Jan 15, 2020 at 3:38 AM Peng Fan <peng.fan@nxp.com> wrote:
> > Subject: Re: [PATCH] soc: imx: Makefile: only build soc-imx8 when CONFIG_ARM64
> > On Tue, Jan 14, 2020 at 9:32 AM Peng Fan <peng.fan@nxp.com> wrote:
> > > > Subject: Re: [PATCH] soc: imx: Makefile: only build soc-imx8 when
> > >
> > > There is no SOC_IMX8 currently. Need to introduce one in
> > > arch/arm64/Kconfig.platforms. But I not see other vendors introduce
> > > options like SOC_XX. Is this the right direction to add one in
> > > Kconfig.platforms?
> >
> > I think it would be more consistent with the other platforms to have a symbol
> > in drivers/soc/imx/Kconfig to control whether we build that driver.
>
> Ok, I'll add Kconfig entry in drivers/soc/imx/Kconfig for various i.MX SoCs.

I was thinking of one entry for this driver.

> > For some SoCs, we also allow running 32-bit kernels, so it would not be wrong
> > to allow enabling the symbol on 32-bit ARM as well, but this is probably
> > something where you want to consider the bigger picture to see if you want
> > to support that configuration or not.
>
> Does the current upstream kernel support 32bit kernels on ARM64 platforms
> without vendor specific stuff. I recalled that several years ago, NXP people
> tried to upstream 32bit kernel support, but rejected by you.

We have at least some Broadcom SoCs that are supported this way. As
long as you can use the same dtb file on a regular multi_v7_defconfig
I see no problem with doing this.

What I would like to avoid though are ports that require extra code in
arch/arm/mach-* that is not needed for the 64-bit target, or ports to
64-bit hardware that only run in 32-bit mode.

> So Is there any plan to support 32bit kernel on AARCH64 in upstream
> kernel?
> Or any suggestions?

I don't think there should be 32-bit kernel running in aarch64-ilp32
mode. This was discussed way back when the aarch64-ilp32 user
space patches first appeared.

Generally speaking you are usually better off running an aarch64
kernel using aarch32 user space, but there may be reasons for
running an ARMv8 aarch32 kernel on the same hardware and there
is no technical reason why this shouldn't work for a clean port.

We never really supported ARMv8-aarch32 in arch/arm/ as a
separate target, but usually building an ARMv7 kernel is close
enough to ARMv8-aarch32 that things just work. If you would
like to help out making ARMv7VE and ARMv8-aarch64 proper
targets for arch/arm/, let me know and we can discuss what parts
are missing.

     Arnd

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, back to index

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-14  8:08 [PATCH] soc: imx: Makefile: only build soc-imx8 when CONFIG_ARM64 Peng Fan
2020-01-14  8:17 ` Uwe Kleine-König
2020-01-14  8:32   ` Peng Fan
2020-01-14 10:59     ` Arnd Bergmann
2020-01-15  2:38       ` Peng Fan
2020-01-15 10:38         ` Arnd Bergmann

Linux-ARM-Kernel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-arm-kernel/0 linux-arm-kernel/git/0.git
	git clone --mirror https://lore.kernel.org/linux-arm-kernel/1 linux-arm-kernel/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-arm-kernel linux-arm-kernel/ https://lore.kernel.org/linux-arm-kernel \
		linux-arm-kernel@lists.infradead.org
	public-inbox-index linux-arm-kernel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.infradead.lists.linux-arm-kernel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git