Re: [PATCH 2/2] resource: Make it possible to reserve memory on 64bit platform

2021-01-11 Thread Andy Shevchenko
On Mon, Jan 11, 2021 at 06:24:35PM +0100, David Hildenbrand wrote:
> On 11.01.21 17:33, Wesley Zhao wrote:
> > From: "Wesley.Zhao" 
> > 
> > For now "reserve=" is limitied to 32bit,not available on 64bit
> > platform,so we change the get_option() to get_option_ull(added in
> > patch: commit 4b6bfe96265e ("lib/cmdline: add new function
> > get_option_ull()"))
> 
> Curious, what's the target use case? (did not receive a cover letter,
> maybe it's buried in there)


Oh, I didn't received neither cover letter nor patch 2!

To author: please, address comments to patch 1 along with (re)sending cover
letter and include every stakeholder to the entire series.

-- 
With Best Regards,
Andy Shevchenko




Re: [PATCH 2/2] resource: Make it possible to reserve memory on 64bit platform

2021-01-11 Thread David Hildenbrand
On 11.01.21 17:33, Wesley Zhao wrote:
> From: "Wesley.Zhao" 
> 
> For now "reserve=" is limitied to 32bit,not available on 64bit
> platform,so we change the get_option() to get_option_ull(added in
> patch: commit 4b6bfe96265e ("lib/cmdline: add new function
> get_option_ull()"))

Curious, what's the target use case? (did not receive a cover letter,
maybe it's buried in there)

-- 
Thanks,

David / dhildenb



[PATCH 2/2] resource: Make it possible to reserve memory on 64bit platform

2021-01-11 Thread Wesley Zhao
From: "Wesley.Zhao" 

For now "reserve=" is limitied to 32bit,not available on 64bit
platform,so we change the get_option() to get_option_ull(added in
patch: commit 4b6bfe96265e ("lib/cmdline: add new function
get_option_ull()"))

Signed-off-by: Wesley.Zhao 
---
 kernel/resource.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/kernel/resource.c b/kernel/resource.c
index 833394f..ee2a0e5 100644
--- a/kernel/resource.c
+++ b/kernel/resource.c
@@ -1567,13 +1567,13 @@ static int __init reserve_setup(char *str)
static struct resource reserve[MAXRESERVE];
 
for (;;) {
-   unsigned int io_start, io_num;
+   unsigned long long io_start, io_num;
int x = reserved;
struct resource *parent;
 
-   if (get_option(, _start) != 2)
+   if (get_option_ull(, _start) != 2)
break;
-   if (get_option(, _num) == 0)
+   if (get_option_ull(, _num) == 0)
break;
if (x < MAXRESERVE) {
struct resource *res = reserve + x;
-- 
2.7.4