From: Timur Tabi <hidden> Date: 2012-02-21 19:53:57
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.
Signed-off-by: Timur Tabi <redacted>
---
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(-)
-----Original Message-----
From: linuxppc-dev-bounces+r66093=3Dfreescale.com@lists.ozlabs.org
[mailto:linuxppc-dev-bounces+r66093=3Dfreescale.com@lists.ozlabs.org] On
Behalf Of Timur Tabi
Sent: Wednesday, February 22, 2012 3:53 AM
To: galak@kernel.crashing.org; benh@kernel.crashing.org; Wood Scott-
B07421; Li Yang-R58472; linuxppc-dev@ozlabs.org
Subject: [PATCH] powerpc/85xx: allow CONFIG_PHYS_64BIT to be selectable
=20
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.
=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.
=20
Signed-off-by: Timur Tabi <redacted>
---
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
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=
That one doesn't update the defconfigs, which means that the default
kernel will not have PHYS_64BIT enabled.
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
From: Tabi Timur-B04825 <hidden> Date: 2012-02-24 02:45:44
Li Yang-R58472 wrote:
I agree with Changming that we shouldn't setting PHYS_64BIT by 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=
From: Li Yang-R58472 <hidden> Date: 2012-02-24 02:59:30
-----Original Message-----
From: Tabi Timur-B04825
Sent: Friday, February 24, 2012 10:46 AM
To: Li Yang-R58472
Cc: Huang Changming-R66093; galak@kernel.crashing.org;
benh@kernel.crashing.org; Wood Scott-B07421; linuxppc-dev@ozlabs.org
Subject: Re: [PATCH] powerpc/85xx: allow CONFIG_PHYS_64BIT to be
selectable
=20
Li Yang-R58472 wrote:
=20
quoted
I agree with Changming that we shouldn't setting PHYS_64BIT by default.
=20
The default kernel should always be the compatible with as much as
possible. Disabling PHYS_64BIT by 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 for PHYS_64BIT to 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
-----Original Message-----
From: Tabi Timur-B04825
Sent: Friday, February 24, 2012 10:46 AM
To: Li Yang-R58472
Cc: Huang Changming-R66093; galak@kernel.crashing.org;
benh@kernel.crashing.org; Wood Scott-B07421; linuxppc-dev@ozlabs.org
Subject: Re: [PATCH] powerpc/85xx: allow CONFIG_PHYS_64BIT to be
selectable
Li Yang-R58472 wrote:
quoted
I agree with Changming that we shouldn't setting PHYS_64BIT by
default.
quoted
The default kernel should always be the compatible with as much as
possible. Disabling PHYS_64BIT by 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.
So the safest option is for PHYS_64BIT to 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.
From: Tabi Timur-B04825 <hidden> Date: 2012-02-24 03:04:41
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=
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
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.
From: Tabi Timur-B04825 <hidden> Date: 2012-02-24 03:36:44
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.
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=
From: Li Yang-R58472 <hidden> Date: 2012-02-24 03:40:26
Subject: Re: [PATCH] powerpc/85xx: allow CONFIG_PHYS_64BIT to be
selectable
=20
Li Yang-R58472 wrote:
=20
quoted
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
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
From: Tabi Timur-B04825 <hidden> Date: 2012-02-24 03:50:48
Li Yang-R58472 wrote:
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 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=
From: Li Yang-R58472 <hidden> Date: 2012-02-24 04:02:55
Subject: Re: [PATCH] powerpc/85xx: allow CONFIG_PHYS_64BIT to be
selectable
=20
Li Yang-R58472 wrote:
=20
quoted
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 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?
=20
Please remember that the Kconfig for the P1022DS already forced
PHYS_64BIT for all mpc85xx platforms. All we're doing is making it
possible to deselect PHYS_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
From: Tabi Timur-B04825 <hidden> Date: 2012-02-24 04:11:36
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
Please remember that the Kconfig for the P1022DS already forced
PHYS_64BIT for all mpc85xx platforms. All we're doing is making it
possible to deselect PHYS_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.
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=
From: Kumar Gala <hidden> Date: 2012-03-16 20:01:16
On Feb 21, 2012, at 1:53 PM, Timur Tabi wrote:
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.
=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.
=20
Signed-off-by: Timur Tabi <redacted>
---
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(-)