Skip to contentSkip to conversation

resource: Make it possible to reserve memory on 64bit platform

PATCH Superseded Wesley Zhao 1 participant 1 message Jan 16, 2021

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

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

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()"))

---
 kernel/resource.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
kernel/resource.c +3 -3
index 833394f9c608..ee2a0e5d196f 100644
@@ -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;
Signature · 1 line
2.7.4