diff mbox

Revert "ARM: 8433/1: add a VMSPLIT_3G_OPT config option"

Message ID 1496825972-26829-1-git-send-email-xieyisheng1@huawei.com (mailing list archive)
State New, archived
Headers show

Commit Message

Xie Yisheng June 7, 2017, 8:59 a.m. UTC
This reverts commit 63ce446c9b5787a94ed875bab20772e1a2b3092f.

When enable VMSPLIT_3G_OPT, the PAGE_OFFSET will be 0xB0000000, and then
we will get the value "1" for TTBR1_SIZE(T1SZ) as the following MACRO:

   #define TTBR1_SIZE     (((PAGE_OFFSET >> 30) - 1) << 16)

which means TTBR1's range will be 0x80000000 to 0xffffffff, and it is
waster of VA [0x80000000, 0xB0000000). So it is better to use VMSPLIT_2G
instead, to achieve the goal "allows for 1GB systems to have their RAM
entirely mapped as low memory".

Meanwhile, It will trigger a bug of boot fail with CONFIG_ARM_LPAE=y,
which I reported:
    https://patchwork.kernel.org/patch/9768573/

For ARM_LPAE only support 3:1, 2:2, 1:3 split of TTBR1, which mention in:
  http://elinux.org/images/6/6a/Elce11_marinas.pdf - p16

Signed-off-by: Yisheng Xie <xieyisheng1@huawei.com>
---
 arch/arm/Kconfig | 3 ---
 1 file changed, 3 deletions(-)

Comments

Russell King (Oracle) June 7, 2017, 9:33 a.m. UTC | #1
On Wed, Jun 07, 2017 at 04:59:32PM +0800, Yisheng Xie wrote:
> This reverts commit 63ce446c9b5787a94ed875bab20772e1a2b3092f.

There's no real reason to revert this, thereby removing it from non-LPAE
cases where it does work.  You've already shown adding a dependency for
LPAE on this option (or even vice versa) is enough to stop the problem
occuring.

IMHO, It would be better to make VMSPLIT_3G_OPT depend on !ARM_LPAE.
Xie Yisheng June 8, 2017, 1:23 a.m. UTC | #2
Hi Russell,

Thanks for comment!
On 2017/6/7 17:33, Russell King - ARM Linux wrote:
> On Wed, Jun 07, 2017 at 04:59:32PM +0800, Yisheng Xie wrote:
>> This reverts commit 63ce446c9b5787a94ed875bab20772e1a2b3092f.
> 
> There's no real reason to revert this, thereby removing it from non-LPAE
> cases where it does work.  You've already shown adding a dependency for
> LPAE on this option (or even vice versa) is enough to stop the problem
> occuring.
> 
> IMHO, It would be better to make VMSPLIT_3G_OPT depend on !ARM_LPAE.

OK, I will send a patch as your suggestion.

Thanks
Yisheng Xie
diff mbox

Patch

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 4c1a35f..5961835a 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1415,8 +1415,6 @@  choice
 
 	config VMSPLIT_3G
 		bool "3G/1G user/kernel split"
-	config VMSPLIT_3G_OPT
-		bool "3G/1G user/kernel split (for full 1G low memory)"
 	config VMSPLIT_2G
 		bool "2G/2G user/kernel split"
 	config VMSPLIT_1G
@@ -1428,7 +1426,6 @@  config PAGE_OFFSET
 	default PHYS_OFFSET if !MMU
 	default 0x40000000 if VMSPLIT_1G
 	default 0x80000000 if VMSPLIT_2G
-	default 0xB0000000 if VMSPLIT_3G_OPT
 	default 0xC0000000
 
 config NR_CPUS