Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1659565 > unrolled thread

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

Started byYisheng Xie <xieyisheng1@huawei.com>
First post2017-06-07 11:10 +0200
Last post2017-06-08 03:30 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] Revert "ARM: 8433/1: add a VMSPLIT_3G_OPT config option" Yisheng Xie <xieyisheng1@huawei.com> - 2017-06-07 11:10 +0200
    Re: [PATCH] Revert "ARM: 8433/1: add a VMSPLIT_3G_OPT config option" Russell King - ARM Linux <linux@armlinux.org.uk> - 2017-06-07 11:40 +0200
      Re: [PATCH] Revert "ARM: 8433/1: add a VMSPLIT_3G_OPT config option" Yisheng Xie <xieyisheng1@huawei.com> - 2017-06-08 03:30 +0200

#1659565 — [PATCH] Revert "ARM: 8433/1: add a VMSPLIT_3G_OPT config option"

FromYisheng Xie <xieyisheng1@huawei.com>
Date2017-06-07 11:10 +0200
Subject[PATCH] Revert "ARM: 8433/1: add a VMSPLIT_3G_OPT config option"
Message-ID<tPF8u-4Fk-11@gated-at.bofh.it>
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(-)

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
-- 
1.7.12.4

[toc] | [next] | [standalone]


#1659604

FromRussell King - ARM Linux <linux@armlinux.org.uk>
Date2017-06-07 11:40 +0200
Message-ID<tPFBx-4Pg-43@gated-at.bofh.it>
In reply to#1659565
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.

-- 
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.

[toc] | [prev] | [next] | [standalone]


#1660645

FromYisheng Xie <xieyisheng1@huawei.com>
Date2017-06-08 03:30 +0200
Message-ID<tPUqR-5YQ-1@gated-at.bofh.it>
In reply to#1659604
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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web