linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wesley Zhao <zhaowei1102@thundersoft.com>
To: akpm@linux-foundation.org
Cc: andriy.shevchenko@linux.intel.com, keescook@chromium.org,
	tglx@linutronix.de, kerneldev@karsmulder.nl,
	nivedita@alum.mit.edu, joe@perches.com, gpiccoli@canonical.com,
	aquini@redhat.com, gustavoars@kernel.org,
	zhaowei1102@thundersoft.com, ojeda@kernel.org,
	ndesaulniers@gooogle.com, linux-kernel@vger.kernel.org,
	david@redhat.com, dan.j.williams@intel.com, guohanjun@huawei.com,
	mchehab+huawei@kernel.org
Subject: [PATCH v3 2/2] resource: Make it possible to reserve memory on 64bit platform
Date: Fri, 22 Jan 2021 07:55:37 -0800	[thread overview]
Message-ID: <1611330937-22654-3-git-send-email-zhaowei1102@thundersoft.com> (raw)
In-Reply-To: <1611330937-22654-1-git-send-email-zhaowei1102@thundersoft.com>

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


  parent reply	other threads:[~2021-01-22 16:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-22 15:55 [PATCH v3 0/2] Make it possible to reserve memory on 64bit platform Wesley Zhao
2021-01-22 15:55 ` [PATCH v3 1/2] lib/cmdline: add new function get_option_ull() Wesley Zhao
2021-01-22 16:27   ` Andy Shevchenko
2021-01-22 15:55 ` Wesley Zhao [this message]
2021-01-22 16:31   ` [PATCH v3 2/2] resource: Make it possible to reserve memory on 64bit platform Andy Shevchenko
2021-01-22 16:26 ` [PATCH v3 0/2] " Andy Shevchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1611330937-22654-3-git-send-email-zhaowei1102@thundersoft.com \
    --to=zhaowei1102@thundersoft.com \
    --cc=akpm@linux-foundation.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=aquini@redhat.com \
    --cc=dan.j.williams@intel.com \
    --cc=david@redhat.com \
    --cc=gpiccoli@canonical.com \
    --cc=guohanjun@huawei.com \
    --cc=gustavoars@kernel.org \
    --cc=joe@perches.com \
    --cc=keescook@chromium.org \
    --cc=kerneldev@karsmulder.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab+huawei@kernel.org \
    --cc=ndesaulniers@gooogle.com \
    --cc=nivedita@alum.mit.edu \
    --cc=ojeda@kernel.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).