From: Mark Rutland mark.rutland@arm.com
In some cases (e.g. the awk for CONFIG_RANDOMIZE_TEXT_OFFSET) we would like to make use of PAGE_SHIFT outside of code that can include the usual header files.
Add a new CONFIG_ARM64_PAGE_SHIFT for this, likewise with ARM64_CONT_SHIFT for consistency.
Signed-off-by: Mark Rutland mark.rutland@arm.com Cc: Ard Biesheuvel ard.biesheuvel@linaro.org Cc: Catalin Marinas catalin.marinas@arm.com Cc: Sudeep Holla sudeep.holla@arm.com Cc: Will Deacon will.deacon@arm.com Signed-off-by: Will Deacon will.deacon@arm.com (cherry picked from commit 030c4d24447cbf2bd612baea5695952e5f62c042) Signed-off-by: Amit Pundir amit.pundir@linaro.org --- Few arm64 builds (including allmodconfig) are broken in lsk-v4.4 and family, due to missing definition of CONFIG_ARM64_PAGE_SHIFT in arch/arm64/Makefile, while running awk command. This upstream cherry-pick fix those build failures.
arch/arm64/Kconfig | 12 ++++++++++++ arch/arm64/include/asm/page.h | 12 ++---------- 2 files changed, 14 insertions(+), 10 deletions(-)
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index bf87f37..ba16dae 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -114,6 +114,18 @@ config ARCH_PHYS_ADDR_T_64BIT config MMU def_bool y
+config ARM64_PAGE_SHIFT + int + default 16 if ARM64_64K_PAGES + default 14 if ARM64_16K_PAGES + default 12 + +config ARM64_CONT_SHIFT + int + default 5 if ARM64_64K_PAGES + default 7 if ARM64_16K_PAGES + default 4 + config ARCH_MMAP_RND_BITS_MIN default 14 if ARM64_64K_PAGES default 16 if ARM64_16K_PAGES diff --git a/arch/arm64/include/asm/page.h b/arch/arm64/include/asm/page.h index fbafd0a..fb2617d 100644 --- a/arch/arm64/include/asm/page.h +++ b/arch/arm64/include/asm/page.h @@ -23,16 +23,8 @@
/* PAGE_SHIFT determines the page size */ /* CONT_SHIFT determines the number of pages which can be tracked together */ -#ifdef CONFIG_ARM64_64K_PAGES -#define PAGE_SHIFT 16 -#define CONT_SHIFT 5 -#elif defined(CONFIG_ARM64_16K_PAGES) -#define PAGE_SHIFT 14 -#define CONT_SHIFT 7 -#else -#define PAGE_SHIFT 12 -#define CONT_SHIFT 4 -#endif +#define PAGE_SHIFT CONFIG_ARM64_PAGE_SHIFT +#define CONT_SHIFT CONFIG_ARM64_CONT_SHIFT #define PAGE_SIZE (_AC(1, UL) << PAGE_SHIFT) #define PAGE_MASK (~(PAGE_SIZE-1))
On 04/10/2017 05:26 PM, Amit Pundir wrote:
From: Mark Rutland mark.rutland@arm.com
In some cases (e.g. the awk for CONFIG_RANDOMIZE_TEXT_OFFSET) we would like to make use of PAGE_SHIFT outside of code that can include the usual header files.
Add a new CONFIG_ARM64_PAGE_SHIFT for this, likewise with ARM64_CONT_SHIFT for consistency.
Signed-off-by: Mark Rutland mark.rutland@arm.com Cc: Ard Biesheuvel ard.biesheuvel@linaro.org Cc: Catalin Marinas catalin.marinas@arm.com Cc: Sudeep Holla sudeep.holla@arm.com Cc: Will Deacon will.deacon@arm.com Signed-off-by: Will Deacon will.deacon@arm.com (cherry picked from commit 030c4d24447cbf2bd612baea5695952e5f62c042) Signed-off-by: Amit Pundir amit.pundir@linaro.org
Few arm64 builds (including allmodconfig) are broken in lsk-v4.4 and family, due to missing definition of CONFIG_ARM64_PAGE_SHIFT in arch/arm64/Makefile, while running awk command. This upstream cherry-pick fix those build failures.
Hi Amit,
Above part will cause 'git am' failed: == $ git am ~/[PATCH\ for-lsk-v4.4]\ arm64:\ move\ {PAGE,CONT}_SHIFT\ into\ Kconfig.eml Applying: arm64: move {PAGE,CONT}_SHIFT into Kconfig error: patch failed: arch/arm64/Kconfig:114 error: arch/arm64/Kconfig: patch does not apply Patch failed at 0001 arm64: move {PAGE,CONT}_SHIFT into Kconfig The copy of the patch that failed is found in: .git/rebase-apply/patch When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort". ==
you could add above comments into commit log instead of extra comments. Could you please send again after correction?
Thanks!
On 10 April 2017 at 19:29, Alex Shi alex.shi@linaro.org wrote:
On 04/10/2017 05:26 PM, Amit Pundir wrote:
From: Mark Rutland mark.rutland@arm.com
In some cases (e.g. the awk for CONFIG_RANDOMIZE_TEXT_OFFSET) we would like to make use of PAGE_SHIFT outside of code that can include the usual header files.
Add a new CONFIG_ARM64_PAGE_SHIFT for this, likewise with ARM64_CONT_SHIFT for consistency.
Signed-off-by: Mark Rutland mark.rutland@arm.com Cc: Ard Biesheuvel ard.biesheuvel@linaro.org Cc: Catalin Marinas catalin.marinas@arm.com Cc: Sudeep Holla sudeep.holla@arm.com Cc: Will Deacon will.deacon@arm.com Signed-off-by: Will Deacon will.deacon@arm.com (cherry picked from commit 030c4d24447cbf2bd612baea5695952e5f62c042) Signed-off-by: Amit Pundir amit.pundir@linaro.org
Few arm64 builds (including allmodconfig) are broken in lsk-v4.4 and family, due to missing definition of CONFIG_ARM64_PAGE_SHIFT in arch/arm64/Makefile, while running awk command. This upstream cherry-pick fix those build failures.
Hi Amit,
Above part will cause 'git am' failed:
$ git am ~/[PATCH\ for-lsk-v4.4]\ arm64:\ move\ {PAGE,CONT}_SHIFT\ into\ Kconfig.eml Applying: arm64: move {PAGE,CONT}_SHIFT into Kconfig error: patch failed: arch/arm64/Kconfig:114 error: arch/arm64/Kconfig: patch does not apply Patch failed at 0001 arm64: move {PAGE,CONT}_SHIFT into Kconfig The copy of the patch that failed is found in: .git/rebase-apply/patch When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort". ==
you could add above comments into commit log instead of extra comments. Could you please send again after correction?
Or you can just cherry-pick upstream commit 030c4d24447cbf2bd612baea5695952e5f62c042 as is. That build failure information there was more of an FYI :)
Regards, Amit Pundir
Thanks!
On 04/10/2017 10:03 PM, Amit Pundir wrote:
Or you can just cherry-pick upstream commit 030c4d24447cbf2bd612baea5695952e5f62c042 as is. That build failure information there was more of an FYI :)
It can not simple work since a following conflict found. I will look into it tomorrow.
Regards Alex
++<<<<<<< HEAD ++======= + config ARM64_PAGE_SHIFT + int + default 16 if ARM64_64K_PAGES + default 14 if ARM64_16K_PAGES + default 12 + + config ARM64_CONT_SHIFT + int + default 5 if ARM64_64K_PAGES + default 7 if ARM64_16K_PAGES + default 4 + + config ARCH_MMAP_RND_BITS_MIN + default 14 if ARM64_64K_PAGES + default 16 if ARM64_16K_PAGES + default 18 + + # max bits determined by the following formula: + # VA_BITS - PAGE_SHIFT - 3 + config ARCH_MMAP_RND_BITS_MAX + default 19 if ARM64_VA_BITS=36 + default 24 if ARM64_VA_BITS=39 + default 27 if ARM64_VA_BITS=42 + default 30 if ARM64_VA_BITS=47 + default 29 if ARM64_VA_BITS=48 && ARM64_64K_PAGES + default 31 if ARM64_VA_BITS=48 && ARM64_16K_PAGES + default 33 if ARM64_VA_BITS=48 + default 14 if ARM64_64K_PAGES + default 16 if ARM64_16K_PAGES + default 18 + + config ARCH_MMAP_RND_COMPAT_BITS_MIN + default 7 if ARM64_64K_PAGES + default 9 if ARM64_16K_PAGES + default 11 + + config ARCH_MMAP_RND_COMPAT_BITS_MAX + default 16 + ++>>>>>>> 030c4d2... arm64: move {PAGE,CONT}_SHIFT into Kconfig config NO_IOPORT_MAP
On 10 April 2017 at 19:41, Alex Shi alex.shi@linaro.org wrote:
On 04/10/2017 10:03 PM, Amit Pundir wrote:
Or you can just cherry-pick upstream commit 030c4d24447cbf2bd612baea5695952e5f62c042 as is. That build failure information there was more of an FYI :)
It can not simple work since a following conflict found. I will look into it tomorrow.
My apologies for ignoring that. This patch applied cleanly on lsk-v4.4-android branch, so I assumed it will go cleanly on lsk-v4.4 as well but I see the merge conflict on lsk-v4.4 too. I'll rebase the changes and send you the revised patch.
Regards, Amit Pundir
Regards Alex
++<<<<<<< HEAD ++=======
- config ARM64_PAGE_SHIFT
int
default 16 if ARM64_64K_PAGES
default 14 if ARM64_16K_PAGES
default 12
- config ARM64_CONT_SHIFT
int
default 5 if ARM64_64K_PAGES
default 7 if ARM64_16K_PAGES
default 4
- config ARCH_MMAP_RND_BITS_MIN
default 14 if ARM64_64K_PAGES
default 16 if ARM64_16K_PAGES
default 18
- # max bits determined by the following formula:
- # VA_BITS - PAGE_SHIFT - 3
- config ARCH_MMAP_RND_BITS_MAX
default 19 if ARM64_VA_BITS=36
default 24 if ARM64_VA_BITS=39
default 27 if ARM64_VA_BITS=42
default 30 if ARM64_VA_BITS=47
default 29 if ARM64_VA_BITS=48 && ARM64_64K_PAGES
default 31 if ARM64_VA_BITS=48 && ARM64_16K_PAGES
default 33 if ARM64_VA_BITS=48
default 14 if ARM64_64K_PAGES
default 16 if ARM64_16K_PAGES
default 18
- config ARCH_MMAP_RND_COMPAT_BITS_MIN
default 7 if ARM64_64K_PAGES
default 9 if ARM64_16K_PAGES
default 11
- config ARCH_MMAP_RND_COMPAT_BITS_MAX
default 16
++>>>>>>> 030c4d2... arm64: move {PAGE,CONT}_SHIFT into Kconfig config NO_IOPORT_MAP
linaro-kernel@lists.linaro.org