Message ID | 1329853995-7533-1-git-send-email-timur@freescale.com (mailing list archive) |
---|---|
State | Accepted, archived |
Delegated to: | Kumar Gala |
Headers | show |
I have one similar patch to remove the "select PHYS_64BIT". http://patchwork.ozlabs.org/patch/132351/ Thanks Jerry Huang > -----Original Message----- > From: linuxppc-dev-bounces+r66093=freescale.com@lists.ozlabs.org > [mailto:linuxppc-dev-bounces+r66093=freescale.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 > > 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 <timur@freescale.com> > --- > 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(-) > > diff --git a/arch/powerpc/configs/mpc85xx_defconfig > b/arch/powerpc/configs/mpc85xx_defconfig > index f37a2ab..5fb0c8a 100644 > --- a/arch/powerpc/configs/mpc85xx_defconfig > +++ b/arch/powerpc/configs/mpc85xx_defconfig > @@ -1,4 +1,5 @@ > CONFIG_PPC_85xx=y > +CONFIG_PHYS_64BIT=y > CONFIG_EXPERIMENTAL=y > CONFIG_SYSVIPC=y > CONFIG_POSIX_MQUEUE=y > diff --git a/arch/powerpc/configs/mpc85xx_smp_defconfig > b/arch/powerpc/configs/mpc85xx_smp_defconfig > index abdcd31..fb51bc9 100644 > --- a/arch/powerpc/configs/mpc85xx_smp_defconfig > +++ b/arch/powerpc/configs/mpc85xx_smp_defconfig > @@ -1,4 +1,5 @@ > CONFIG_PPC_85xx=y > +CONFIG_PHYS_64BIT=y > CONFIG_SMP=y > CONFIG_NR_CPUS=8 > CONFIG_EXPERIMENTAL=y > diff --git a/arch/powerpc/platforms/85xx/Kconfig > b/arch/powerpc/platforms/85xx/Kconfig > index d7946be..93d27e2 100644 > --- a/arch/powerpc/platforms/85xx/Kconfig > +++ b/arch/powerpc/platforms/85xx/Kconfig > @@ -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. > -- > 1.7.3.4 > > > _______________________________________________ > Linuxppc-dev mailing list > Linuxppc-dev@lists.ozlabs.org > https://lists.ozlabs.org/listinfo/linuxppc-dev
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_64BIT enabled.
> -----Original Message----- > From: Tabi Timur-B04825 > Sent: Thursday, February 23, 2012 8:25 PM > To: Huang Changming-R66093 > Cc: galak@kernel.crashing.org; benh@kernel.crashing.org; Wood Scott- > B07421; Li Yang-R58472; linuxppc-dev@ozlabs.org > Subject: Re: [PATCH] powerpc/85xx: allow CONFIG_PHYS_64BIT to be > selectable > > 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_64BIT enabled. I think it is not necessary to enable the 64BIT, if customer want to enable it, he can do it manually.
> > Subject: Re: [PATCH] powerpc/85xx: allow CONFIG_PHYS_64BIT to be > > selectable > > > > 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_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. For 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 unnecessary to most people as default. Also all these platforms supports 32-bit mode. - Leo
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
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.
> -----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: > > > 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 > 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. 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: > > > > > 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 > > 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. > > 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. > Yes, u-boot must has the same address mode with DTS, otherwise, we can't boot the kernel.
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 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.
> > 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 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. > > -- 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.
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 address. > 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 slightly mismatched), but Kumar rejected it. I could add some more checks, but the 90% of the time, the only problem is using the wrong size (32-bit vs 36-bit) DT.
> Subject: Re: [PATCH] powerpc/85xx: allow CONFIG_PHYS_64BIT to be > selectable > > 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 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 the support for them? - Leo
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 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 for all mpc85xx platforms. All we're doing is making it possible to deselect PHYS_64BIT.
> Subject: Re: [PATCH] powerpc/85xx: allow CONFIG_PHYS_64BIT to be > selectable > > 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 > 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? > > 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 fixed. There was no mentioning of enforcing 36-bit for all mpc85xx platforms. - Leo
Li Yang-R58472 wrote: > It's a good point. Why can't we decide to use 32-bit/36-bit TLB at runtime even for e500v2? That's not what PHYS_64BIT does. PHYS_64BIT determines whether phys_addr_t is a u64 or a u32. This is something that must be determined at compilation time. >> 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 fixed. Exactly. That's what these patches do. And these patches have been applied to the SDK. I'm just waiting for Kumar to apply them to his 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 mpc85xx_smp_defconfig, then you'll get a 36-bit kernel. But now you can also use menuconfig to turn off PHYS_64BIT. Before these fixes, that was not possible.
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. > > 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 <timur@freescale.com> > --- > 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
diff --git a/arch/powerpc/configs/mpc85xx_defconfig b/arch/powerpc/configs/mpc85xx_defconfig index f37a2ab..5fb0c8a 100644 --- a/arch/powerpc/configs/mpc85xx_defconfig +++ b/arch/powerpc/configs/mpc85xx_defconfig @@ -1,4 +1,5 @@ CONFIG_PPC_85xx=y +CONFIG_PHYS_64BIT=y CONFIG_EXPERIMENTAL=y CONFIG_SYSVIPC=y CONFIG_POSIX_MQUEUE=y diff --git a/arch/powerpc/configs/mpc85xx_smp_defconfig b/arch/powerpc/configs/mpc85xx_smp_defconfig index abdcd31..fb51bc9 100644 --- a/arch/powerpc/configs/mpc85xx_smp_defconfig +++ b/arch/powerpc/configs/mpc85xx_smp_defconfig @@ -1,4 +1,5 @@ CONFIG_PPC_85xx=y +CONFIG_PHYS_64BIT=y CONFIG_SMP=y CONFIG_NR_CPUS=8 CONFIG_EXPERIMENTAL=y diff --git a/arch/powerpc/platforms/85xx/Kconfig b/arch/powerpc/platforms/85xx/Kconfig index d7946be..93d27e2 100644 --- a/arch/powerpc/platforms/85xx/Kconfig +++ b/arch/powerpc/platforms/85xx/Kconfig @@ -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.
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 <timur@freescale.com> --- 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(-)