* [PATCH v2] kexec: Increase the upper limit for RAM segments
@ 2016-11-11 22:21 Sameer Goel
2016-11-14 5:50 ` Dave Young
2016-11-14 10:51 ` Xunlei Pang
0 siblings, 2 replies; 4+ messages in thread
From: Sameer Goel @ 2016-11-11 22:21 UTC (permalink / raw)
To: geoff; +Cc: Sameer Goel, kexec, bhe
On a newer UEFI based Qualcomm target the number of system ram regions
retrieved from /proc/iomem are ~40. So increasing the current hardcoded
values to 64 from 16.
Signed-off-by: Sameer Goel <sgoel@codeaurora.org>
---
kexec/arch/arm64/kexec-arm64.h | 2 +-
kexec/kexec-syscall.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/kexec/arch/arm64/kexec-arm64.h b/kexec/arch/arm64/kexec-arm64.h
index bac62f8..bd4c20e 100644
--- a/kexec/arch/arm64/kexec-arm64.h
+++ b/kexec/arch/arm64/kexec-arm64.h
@@ -11,7 +11,7 @@
#include "image-header.h"
#include "kexec.h"
-#define KEXEC_SEGMENT_MAX 16
+#define KEXEC_SEGMENT_MAX 64
#define BOOT_BLOCK_VERSION 17
#define BOOT_BLOCK_LAST_COMP_VERSION 16
diff --git a/kexec/kexec-syscall.h b/kexec/kexec-syscall.h
index c0d0bea..f84c937 100644
--- a/kexec/kexec-syscall.h
+++ b/kexec/kexec-syscall.h
@@ -115,7 +115,7 @@ static inline long kexec_file_load(int kernel_fd, int initrd_fd,
#define KEXEC_ARCH_MIPS ( 8 << 16)
#define KEXEC_ARCH_CRIS (76 << 16)
-#define KEXEC_MAX_SEGMENTS 16
+#define KEXEC_MAX_SEGMENTS 64
#ifdef __i386__
#define KEXEC_ARCH_NATIVE KEXEC_ARCH_386
--
Qualcomm Datacenter Technologies as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] kexec: Increase the upper limit for RAM segments
2016-11-11 22:21 [PATCH v2] kexec: Increase the upper limit for RAM segments Sameer Goel
@ 2016-11-14 5:50 ` Dave Young
2016-11-14 10:51 ` Xunlei Pang
1 sibling, 0 replies; 4+ messages in thread
From: Dave Young @ 2016-11-14 5:50 UTC (permalink / raw)
To: Sameer Goel; +Cc: geoff, kexec, bhe
On 11/11/16 at 03:21pm, Sameer Goel wrote:
> On a newer UEFI based Qualcomm target the number of system ram regions
> retrieved from /proc/iomem are ~40. So increasing the current hardcoded
> values to 64 from 16.
There is below uapi in kernel:
include/uapi/linux/kexec.h:#define KEXEC_SEGMENT_MAX 16
So you should fix it in kernel first and update the kexec-tools to use
the kernel header file instead.
Thanks
Dave
>
> Signed-off-by: Sameer Goel <sgoel@codeaurora.org>
> ---
> kexec/arch/arm64/kexec-arm64.h | 2 +-
> kexec/kexec-syscall.h | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/kexec/arch/arm64/kexec-arm64.h b/kexec/arch/arm64/kexec-arm64.h
> index bac62f8..bd4c20e 100644
> --- a/kexec/arch/arm64/kexec-arm64.h
> +++ b/kexec/arch/arm64/kexec-arm64.h
> @@ -11,7 +11,7 @@
> #include "image-header.h"
> #include "kexec.h"
>
> -#define KEXEC_SEGMENT_MAX 16
> +#define KEXEC_SEGMENT_MAX 64
>
> #define BOOT_BLOCK_VERSION 17
> #define BOOT_BLOCK_LAST_COMP_VERSION 16
> diff --git a/kexec/kexec-syscall.h b/kexec/kexec-syscall.h
> index c0d0bea..f84c937 100644
> --- a/kexec/kexec-syscall.h
> +++ b/kexec/kexec-syscall.h
> @@ -115,7 +115,7 @@ static inline long kexec_file_load(int kernel_fd, int initrd_fd,
> #define KEXEC_ARCH_MIPS ( 8 << 16)
> #define KEXEC_ARCH_CRIS (76 << 16)
>
> -#define KEXEC_MAX_SEGMENTS 16
> +#define KEXEC_MAX_SEGMENTS 64
>
> #ifdef __i386__
> #define KEXEC_ARCH_NATIVE KEXEC_ARCH_386
> --
> Qualcomm Datacenter Technologies as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.
>
>
> _______________________________________________
> kexec mailing list
> kexec@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/kexec
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] kexec: Increase the upper limit for RAM segments
2016-11-11 22:21 [PATCH v2] kexec: Increase the upper limit for RAM segments Sameer Goel
2016-11-14 5:50 ` Dave Young
@ 2016-11-14 10:51 ` Xunlei Pang
2016-11-14 16:23 ` Goel, Sameer
1 sibling, 1 reply; 4+ messages in thread
From: Xunlei Pang @ 2016-11-14 10:51 UTC (permalink / raw)
To: Sameer Goel, geoff; +Cc: kexec, bhe
On 2016/11/12 at 06:21, Sameer Goel wrote:
> On a newer UEFI based Qualcomm target the number of system ram regions
> retrieved from /proc/iomem are ~40. So increasing the current hardcoded
> values to 64 from 16.
I am a little confused, memory regions from /proc/iomem should be MAX_MEMORY_RANGES used
as the elfcorehdr, while KEXEC_SEGMENT_MAX stands for the kexec segments passed to the kexec
syscall, like kernel image, initrd image, purgatory, etc.
Do you mean KEXEC_SEGMENT_MAX or MAX_MEMORY_RANGES?
Regards,
Xunlei
>
> Signed-off-by: Sameer Goel <sgoel@codeaurora.org>
> ---
> kexec/arch/arm64/kexec-arm64.h | 2 +-
> kexec/kexec-syscall.h | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/kexec/arch/arm64/kexec-arm64.h b/kexec/arch/arm64/kexec-arm64.h
> index bac62f8..bd4c20e 100644
> --- a/kexec/arch/arm64/kexec-arm64.h
> +++ b/kexec/arch/arm64/kexec-arm64.h
> @@ -11,7 +11,7 @@
> #include "image-header.h"
> #include "kexec.h"
>
> -#define KEXEC_SEGMENT_MAX 16
> +#define KEXEC_SEGMENT_MAX 64
>
> #define BOOT_BLOCK_VERSION 17
> #define BOOT_BLOCK_LAST_COMP_VERSION 16
> diff --git a/kexec/kexec-syscall.h b/kexec/kexec-syscall.h
> index c0d0bea..f84c937 100644
> --- a/kexec/kexec-syscall.h
> +++ b/kexec/kexec-syscall.h
> @@ -115,7 +115,7 @@ static inline long kexec_file_load(int kernel_fd, int initrd_fd,
> #define KEXEC_ARCH_MIPS ( 8 << 16)
> #define KEXEC_ARCH_CRIS (76 << 16)
>
> -#define KEXEC_MAX_SEGMENTS 16
> +#define KEXEC_MAX_SEGMENTS 64
>
> #ifdef __i386__
> #define KEXEC_ARCH_NATIVE KEXEC_ARCH_386
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] kexec: Increase the upper limit for RAM segments
2016-11-14 10:51 ` Xunlei Pang
@ 2016-11-14 16:23 ` Goel, Sameer
0 siblings, 0 replies; 4+ messages in thread
From: Goel, Sameer @ 2016-11-14 16:23 UTC (permalink / raw)
To: xlpang, geoff; +Cc: kexec, bhe
I meant MAX_MEMORY_RANGES. Updated KEXEC_SEGMENT_MAX to just match this.
I can revert KEXEC_SEGMENT_MAX.
Thanks,
Sameer
On 11/14/2016 3:51 AM, Xunlei Pang wrote:
> On 2016/11/12 at 06:21, Sameer Goel wrote:
>> On a newer UEFI based Qualcomm target the number of system ram regions
>> retrieved from /proc/iomem are ~40. So increasing the current hardcoded
>> values to 64 from 16.
>
> I am a little confused, memory regions from /proc/iomem should be MAX_MEMORY_RANGES used
> as the elfcorehdr, while KEXEC_SEGMENT_MAX stands for the kexec segments passed to the kexec
> syscall, like kernel image, initrd image, purgatory, etc.
>
> Do you mean KEXEC_SEGMENT_MAX or MAX_MEMORY_RANGES?
>
> Regards,
> Xunlei
>
>>
>> Signed-off-by: Sameer Goel <sgoel@codeaurora.org>
>> ---
>> kexec/arch/arm64/kexec-arm64.h | 2 +-
>> kexec/kexec-syscall.h | 2 +-
>> 2 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/kexec/arch/arm64/kexec-arm64.h b/kexec/arch/arm64/kexec-arm64.h
>> index bac62f8..bd4c20e 100644
>> --- a/kexec/arch/arm64/kexec-arm64.h
>> +++ b/kexec/arch/arm64/kexec-arm64.h
>> @@ -11,7 +11,7 @@
>> #include "image-header.h"
>> #include "kexec.h"
>>
>> -#define KEXEC_SEGMENT_MAX 16
>> +#define KEXEC_SEGMENT_MAX 64
>>
>> #define BOOT_BLOCK_VERSION 17
>> #define BOOT_BLOCK_LAST_COMP_VERSION 16
>> diff --git a/kexec/kexec-syscall.h b/kexec/kexec-syscall.h
>> index c0d0bea..f84c937 100644
>> --- a/kexec/kexec-syscall.h
>> +++ b/kexec/kexec-syscall.h
>> @@ -115,7 +115,7 @@ static inline long kexec_file_load(int kernel_fd, int initrd_fd,
>> #define KEXEC_ARCH_MIPS ( 8 << 16)
>> #define KEXEC_ARCH_CRIS (76 << 16)
>>
>> -#define KEXEC_MAX_SEGMENTS 16
>> +#define KEXEC_MAX_SEGMENTS 64
>>
>> #ifdef __i386__
>> #define KEXEC_ARCH_NATIVE KEXEC_ARCH_386
>
>
--
Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project.
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-11-14 16:23 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-11 22:21 [PATCH v2] kexec: Increase the upper limit for RAM segments Sameer Goel
2016-11-14 5:50 ` Dave Young
2016-11-14 10:51 ` Xunlei Pang
2016-11-14 16:23 ` Goel, Sameer
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.