powerpc/85xx: allow CONFIG_PHYS_64BIT to be selectable
Subsystems (2)
PATCH 1/1 powerpc/85xx: allow CONFIG_PHYS_64BIT to be selectable
Remove the "select PHYS_64BIT" from the Kconfig entry for the P1022DS, so that large physical address support is a selectable option for non-CoreNet reference boards.
The option is enabled in mpc85xx_[smp_]defconfig so that the default is unchanged. However, now it can be deselected.
The P1022DS had this option defined because the default device tree for this board uses 36-bit addresses. This had the side-effect of forcing this option on for all boards that use mpc85xx_[smp_]defconfig. Some users may want to disable this feature to create an optimized configuration for boards with <= 2GB of RAM.
--- arch/powerpc/configs/mpc85xx_defconfig | 1 + arch/powerpc/configs/mpc85xx_smp_defconfig | 1 + arch/powerpc/platforms/85xx/Kconfig | 1 - 3 files changed, 2 insertions(+), 1 deletions(-)
arch/powerpc/configs/mpc85xx_defconfig +1 -0
@@ -1,4 +1,5 @@ CONFIG_PPC_85xx=y +CONFIG_PHYS_64BIT=y CONFIG_EXPERIMENTAL=y CONFIG_SYSVIPC=y CONFIG_POSIX_MQUEUE=y
arch/powerpc/configs/mpc85xx_smp_defconfig +1 -0
@@ -1,4 +1,5 @@ CONFIG_PPC_85xx=y +CONFIG_PHYS_64BIT=y CONFIG_SMP=y CONFIG_NR_CPUS=8 CONFIG_EXPERIMENTAL=y
arch/powerpc/platforms/85xx/Kconfig +0 -1
@@ -80,7 +80,6 @@ config P1010_RDB config P1022_DS bool "Freescale P1022 DS" select DEFAULT_UIMAGE - select PHYS_64BIT # The DTS has 36-bit addresses select SWIOTLB help This option enables support for the Freescale P1022DS reference board.
Signature · 1 line
1.7.3.4
I have one similar patch to remove the "select PHYS_64BIT".
http://patchwork.ozlabs.org/patch/132351/
Thanks
Jerry Huang
Quoted 73 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Timur Tabi
Sent: Wednesday, February 22, 2012 3:53 AM
To: [email protected]; [email protected]; Wood Scott- B07421; Li Yang-R58472; [email protected]
Subject: [PATCH] powerpc/85xx: allowCONFIG_PHYS_64BITto be selectable =20
Remove the "selectPHYS_64BIT" from theKconfigentry for the P1022DS, so that large physical address support is a selectable option for non- CoreNet reference boards.
=20
The option is enabled in mpc85xx_[smp_]defconfig so that the default is unchanged. However, now it can be deselected.
=20
The P1022DS had this option defined because the default device tree for this board uses 36-bit addresses. This had the side-effect of forcing this option on for all boards that use mpc85xx_[smp_]defconfig. Some users may want to disable this feature to create an optimized configuration for boards with <=3D 2GB of RAM.
=20Signed-off-by Timur Tabi <[email protected]>--- arch/powerpc/configs/mpc85xx_defconfig | 1 + arch/powerpc/configs/mpc85xx_smp_defconfig | 1 + arch/powerpc/platforms/85xx/Kconfig | 1 - 3 files changed, 2 insertions(+), 1 deletions(-)=20
arch/powerpc/configs/mpc85xx_defconfig +1
-0@@ -1,4 +1,5 @@ CONFIG_PPC_85xx=3Dy +CONFIG_PHYS_64BIT=3Dy CONFIG_EXPERIMENTAL=3Dy CONFIG_SYSVIPC=3Dy CONFIG_POSIX_MQUEUE=3Dyarch/powerpc/configs/mpc85xx_smp_defconfig +1
-0@@ -1,4 +1,5 @@ CONFIG_PPC_85xx=3Dy +CONFIG_PHYS_64BIT=3Dy CONFIG_SMP=3Dy CONFIG_NR_CPUS=3D8 CONFIG_EXPERIMENTAL=3Dyarch/powerpc/platforms/85xx/Kconfig +0
-1@@ -80,7 +80,6 @@ config P1010_RDB config P1022_DS bool "Freescale P1022 DS" select DEFAULT_UIMAGE - select PHYS_64BIT # The DTS has 36-bit addresses select SWIOTLB help This option enables support for the Freescale P1022DS referenceboard.
--
1.7.3.4
=20
=20
_______________________________________________
Linuxppc-dev mailing list
[email protected]
https://lists.ozlabs.org/listinfo/linuxppc-dev
Quoted 2 lines · Huang Changming-R66093 wrote:
I have one similar patch to remove the "select
PHYS_64BIT".
http://patchwork.ozlabs.org/patch/132351/
That one doesn't update the defconfigs, which means that the default=20 kernel will not have PHYS_64BIT enabled.
--=20
Timur Tabi
Linux kernel developer at Freescale=
Quoted 12 lines
-----Original Message-----
From: Tabi Timur-B04825
Sent: Thursday, February 23, 2012 8:25 PM
To: Huang Changming-R66093
Cc: [email protected]; [email protected]; Wood Scott- B07421; Li Yang-R58472; [email protected]
Subject: Re: [PATCH] powerpc/85xx: allowCONFIG_PHYS_64BITto be selectable
=20
Huang Changming-R66093 wrote:
Quoted 5 lines
Quoted 2 lines
I have one similar patch to remove the "select
PHYS_64BIT".
http://patchwork.ozlabs.org/patch/132351/=20
That one doesn't update the defconfigs, which means that the default kernel will not havePHYS_64BITenabled.
I think it is not necessary to enable the 64BIT, if customer want to enable it, he can do it manually.=20
Quoted 11 lines
Quoted 9 lines
Subject: Re: [PATCH] powerpc/85xx: allow
CONFIG_PHYS_64BITto be selectableQuoted 2 lines · Huang Changming-R66093 wrote:
I have one similar patch to remove the "select
PHYS_64BIT".
http://patchwork.ozlabs.org/patch/132351/That one doesn't update the defconfigs, which means that the default kernel will not have
PHYS_64BITenabled.I think it is not necessary to enable the 64BIT, if customer want to enable it, he can do it manually.
I agree with Changming that we shouldn't setting PHYS_64BIT by default. Fo= r the platforms covered by the mpc85xx_defconfig, most user won't need the = PHYS_64BIT. We shouldn't set the one with worse performance and unnecessar= y to most people as default. Also all these platforms supports 32-bit mode= .
- Leo
Quoted 1 line · Li Yang-R58472 wrote:
I agree with Changming that we shouldn't setting
PHYS_64BITby default.
The default kernel should always be the compatible with as much as=20 possible. Disabling PHYS_64BIT by default means that the default kernel=20 will not work with a 36-bit DTS. If you attempt to boot such a kernel=20 with a 36-bit DTS, there will be no text output. Most people will not=20 know why it's not working.
So the safest option is for PHYS_64BIT to be enabled by default. That=20 way, the kernel will always work.
--=20
Timur Tabi
Linux kernel developer at Freescale=
Quoted 14 lines
-----Original Message-----
From: Tabi Timur-B04825
Sent: Friday, February 24, 2012 10:46 AM
To: Li Yang-R58472
Cc: Huang Changming-R66093; [email protected]; [email protected]; Wood Scott-B07421; [email protected]
Subject: Re: [PATCH] powerpc/85xx: allowCONFIG_PHYS_64BITto be selectable
=20
Li Yang-R58472 wrote:
=20Quoted 1 line
I agree with Changming that we shouldn't setting
PHYS_64BITby default.
Quoted 9 lines
=20
The default kernel should always be the compatible with as much as possible. DisablingPHYS_64BITby default means that the default kernel will not work with a 36-bit DTS. If you attempt to boot such a kernel with a 36-bit DTS, there will be no text output. Most people will not know why it's not working.
=20
So the safest option is forPHYS_64BITto be enabled by default. That way, the kernel will always work.
Even though the user still need to know the addressing mode that u-boot is = using. It won't work if the addressing mode of u-boot and device tree are = different.
- Leo
Quoted 20 lines
Quoted 9 lines
-----Original Message-----
From: Tabi Timur-B04825
Sent: Friday, February 24, 2012 10:46 AM
To: Li Yang-R58472
Cc: Huang Changming-R66093; [email protected]; [email protected]; Wood Scott-B07421; [email protected]
Subject: Re: [PATCH] powerpc/85xx: allowCONFIG_PHYS_64BITto be selectableQuoted 3 lines
Quoted 1 line · Li Yang-R58472 wrote:
I agree with Changming that we shouldn't setting
PHYS_64BITbydefault.
Quoted 7 lines
The default kernel should always be the compatible with as much as possible. Disabling
PHYS_64BITby default means that the default kernel will not work with a 36-bit DTS. If you attempt to boot such a kernel with a 36-bit DTS, there will be no text output. Most people will not know why it's not working.
Quoted 7 lines
Quoted 2 lines
So the safest option is for
PHYS_64BITto be enabled by default. That way, the kernel will always work.=20
Even though the user still need to know the addressing mode that u-boot is using. It won't work if the addressing mode of u-boot and device tree are different.
=20
Yes, u-boot must has the same address mode with DTS, otherwise, we can't bo= ot the kernel.
Quoted 3 lines · Li Yang-R58472 wrote:
Even though the user still need to know the addressing mode that u-boot is using. It won't work if the addressing mode of u-boot and device tree are different.
U-Boot will tell the user if the DT does not match. I added code to=20 U-Boot to do that. So if you have a 36-bit U-Boot and a 32-bit DT, then=20 you will get a warning. If you have a 36-bit U-boot and a 36-bit DT and a= =20
32-bit kernel, you will get nothing. But if you have a 32-bit U-boot and=20 a 32-bit DT and a 36-bit kernel, then that will work. A 36-bit kernel=20 works with 32-bit *and* 36-bit DTs. This is why a 36-bit kernel should be= =20
the default.
--=20
Timur Tabi
Linux kernel developer at Freescale=
Quoted 7 lines
=20
Li Yang-R58472 wrote:
=20Quoted 3 lines
Even though the user still need to know the addressing mode that u-boot is using. It won't work if the addressing mode of u-boot and device tree are different.
Quoted 10 lines
=20
U-Boot will tell the user if the DT does not match. I added code to U- Boot to do that. So if you have a 36-bit U-Boot and a 32-bit DT, then you will get a warning. If you have a 36-bit U-boot and a 36-bit DT and a 32-bit kernel, you will get nothing. But if you have a 32-bit U-boot and a 32-bit DT and a 36-bit kernel, then that will work. A 36-bit kernel works with 32-bit *and* 36-bit DTs. This is why a 36-bit kernel should be the default.
=20
--
Hi, Timur
I want to know if you have the other codes for different address?
The current U-boot just detect the base address of DTS and the CCSR address= .
If they are different, u-boot will print the warning and return 0, so the kernel can't been booted.
Jerry.
Quoted 3 lines · Huang Changming-R66093 wrote:
I want to know if you have the other codes for different address?
The current U-boot just detect the base address of DTS and the CCSR addre=
ss.
Quoted 2 lines
If they are different, u-boot will print the warning and return 0, so the kernel can't been booted.
I had a patch that verified some PCI addresses (which are sometimes=20 slightly mismatched), but Kumar rejected it.
I could add some more checks, but the 90% of the time, the only problem is= =20
using the wrong size (32-bit vs 36-bit) DT.
--=20
Timur Tabi
Linux kernel developer at Freescale=
Quoted 8 lines
Subject: Re: [PATCH] powerpc/85xx: allow
CONFIG_PHYS_64BITto be selectable
=20
Li Yang-R58472 wrote:
=20Quoted 3 lines
Even though the user still need to know the addressing mode that u-boot is using. It won't work if the addressing mode of u-boot and device tree are different.
Quoted 8 lines
=20
U-Boot will tell the user if the DT does not match. I added code to U- Boot to do that. So if you have a 36-bit U-Boot and a 32-bit DT, then you will get a warning. If you have a 36-bit U-boot and a 36-bit DT and a 32-bit kernel, you will get nothing. But if you have a 32-bit U-boot and a 32-bit DT and a 36-bit kernel, then that will work. A 36-bit kernel works with 32-bit *and* 36-bit DTs. This is why a 36-bit kernel should be the default.
The mpc85xx_defconfig does include silicons with e500v1 core which doesn't = have the 36-bit support. Won't enabling 36-bit support by default break th= e support for them?
- Leo
Quoted 3 lines · Li Yang-R58472 wrote:
The
mpc85xx_defconfigdoes include silicons with e500v1 core which doesn't have the 36-bit support. Won't enabling 36-bit support by default break the support for them?
No. The kernel will detect at runtime that that it's an e500v1 core and=20 it won't try to create 36-bit TLBs. (e.g. it won't write to MAS7).
Please remember that the Kconfig for the P1022DS already forced PHYS_64BIT= =20
for all mpc85xx platforms. All we're doing is making it possible to=20 deselect PHYS_64BIT.
--=20
Timur Tabi
Linux kernel developer at Freescale=
Quoted 11 lines
Subject: Re: [PATCH] powerpc/85xx: allow
CONFIG_PHYS_64BITto be selectable
=20
Li Yang-R58472 wrote:
=20Quoted 3 lines
The
mpc85xx_defconfigdoes include silicons with e500v1 core which doesn't have the 36-bit support. Won't enabling 36-bit support by default break the support for them?=20
No. The kernel will detect at runtime that that it's an e500v1 core and it won't try to create 36-bit TLBs. (e.g. it won't write to MAS7).
It's a good point. Why can't we decide to use 32-bit/36-bit TLB at runtime=
even for e500v2?
Quoted 4 lines
=20
Please remember that theKconfigfor the P1022DS already forcedPHYS_64BITfor all mpc85xx platforms. All we're doing is making it possible to deselectPHYS_64BIT.
I think it's a side-effect introduced by P1022DS support and need to be fix= ed. There was no mentioning of enforcing 36-bit for all mpc85xx platforms.
- Leo
Quoted 1 line · Li Yang-R58472 wrote:
It's a good point. Why can't we decide to use 32-bit/36-bit TLB at runti=
me even for e500v2?
That's not what PHYS_64BIT does. PHYS_64BIT determines whether=20 phys_addr_t is a u64 or a u32. This is something that must be determined=20 at compilation time.
Quoted 5 lines
Quoted 3 lines
Please remember that the
Kconfigfor the P1022DS already forcedPHYS_64BITfor all mpc85xx platforms. All we're doing is making it possible to deselectPHYS_64BIT.I think it's a side-effect introduced by P1022DS support and need to be f=
ixed.
Exactly. That's what these patches do. And these patches have been=20 applied to the SDK. I'm just waiting for Kumar to apply them to his=20 repository.
Quoted 1 line
There was no mentioning of enforcing 36-bit for all mpc85xx platforms.
It's not enforcing, it's just the default. If you build with=20 mpc85xx_smp_defconfig, then you'll get a 36-bit kernel. But now you can=20 also use menuconfig to turn off PHYS_64BIT. Before these fixes, that was=20 not possible.
--=20
Timur Tabi
Linux kernel developer at Freescale=
Kumar Gala
AppliedQuoted 2 lines · Timur Tabi
Remove the "select
PHYS_64BIT" from theKconfigentry for the P1022DS, so that large physical address support is a selectable option for =
non-CoreNet
Quoted 3 lines
reference boards.
=20
The option is enabled in mpc85xx_[smp_]defconfig so that the default =
is
Quoted 3 lines
unchanged. However, now it can be deselected.
=20
The P1022DS had this option defined because the default device tree =
for
Quoted 3 lines
this board uses 36-bit addresses. This had the side-effect of forcing this option on for all boards that use mpc85xx_[smp_]defconfig. Some users may want to disable this feature to create an optimized =
configuration
Quoted 8 lines
for boards with <=3D 2GB of RAM.
=20Signed-off-by Timur Tabi <[email protected]>---
arch/powerpc/configs/mpc85xx_defconfig | 1 + arch/powerpc/configs/mpc85xx_smp_defconfig | 1 + arch/powerpc/platforms/85xx/Kconfig | 1 - 3 files changed, 2 insertions(+), 1 deletions(-)
applied
- k=