* [PATCH v2 2/2] resource: Make it possible to reserve memory on 64bit platform
@ 2021-01-16 10:45 Wesley Zhao
0 siblings, 0 replies; only message in thread
From: Wesley Zhao @ 2021-01-16 10:45 UTC (permalink / raw)
To: akpm
Cc: andriy.shevchenko, keescook, tglx, kerneldev, nivedita, joe,
gpiccoli, aquini, gustavoars, zhaowei1102, ojeda, ndesaulniers,
linux-kernel, david, dan.j.williams, guohanjun, mchehab+huawei
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 <zhaowei1102@thundersoft.com>
---
kernel/resource.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/kernel/resource.c b/kernel/resource.c
index 833394f9c608..ee2a0e5d196f 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(&str, &io_start) != 2)
+ if (get_option_ull(&str, &io_start) != 2)
break;
- if (get_option(&str, &io_num) == 0)
+ if (get_option_ull(&str, &io_num) == 0)
break;
if (x < MAXRESERVE) {
struct resource *res = reserve + x;
--
2.7.4
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-01-16 10:47 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-16 10:45 [PATCH v2 2/2] resource: Make it possible to reserve memory on 64bit platform Wesley Zhao
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®