From: Laura Abbott <lauraa@codeaurora.org>
To: linux-mm@kvack.org, Andrew Morton <akpm@linux-foundation.org>
Cc: Laura Abbott <lauraa@codeaurora.org>,
linux-kernel@vger.kernel.org,
Leif Lindholm <leif.lindholm@linaro.org>,
Grygorii Strashko <grygorii.strashko@ti.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Rob Herring <robherring2@gmail.com>,
Ard Biesheuvel <ard.biesheuvel@linaro.org>,
Will Deacon <will.deacon@arm.com>,
Nicolas Pitre <nicolas.pitre@linaro.org>,
Santosh Shilimkar <santosh.shilimkar@ti.com>
Subject: [PATCHv2 1/2] mm/memblock: add memblock_get_current_limit
Date: Tue, 4 Feb 2014 16:02:30 -0800 [thread overview]
Message-ID: <1391558551-31395-2-git-send-email-lauraa@codeaurora.org> (raw)
In-Reply-To: <1391558551-31395-1-git-send-email-lauraa@codeaurora.org>
Appart from setting the limit of memblock, it's also useful to be able
to get the limit to avoid recalculating it every time. Add the function
to do so.
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
---
include/linux/memblock.h | 2 ++
mm/memblock.c | 5 +++++
2 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/include/linux/memblock.h b/include/linux/memblock.h
index 1ef6636..8a20a51 100644
--- a/include/linux/memblock.h
+++ b/include/linux/memblock.h
@@ -252,6 +252,8 @@ static inline void memblock_dump_all(void)
void memblock_set_current_limit(phys_addr_t limit);
+phys_addr_t memblock_get_current_limit(void);
+
/*
* pfn conversion functions
*
diff --git a/mm/memblock.c b/mm/memblock.c
index 87d21a6..3820e29 100644
--- a/mm/memblock.c
+++ b/mm/memblock.c
@@ -1404,6 +1404,11 @@ void __init_memblock memblock_set_current_limit(phys_addr_t limit)
memblock.current_limit = limit;
}
+phys_addr_t __init_memblock memblock_get_current_limit(void)
+{
+ return memblock.current_limit;
+}
+
static void __init_memblock memblock_dump(struct memblock_type *type, char *name)
{
unsigned long long base, size;
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
WARNING: multiple messages have this Message-ID (diff)
From: Laura Abbott <lauraa@codeaurora.org>
To: linux-mm@kvack.org, Andrew Morton <akpm@linux-foundation.org>
Cc: Laura Abbott <lauraa@codeaurora.org>,
linux-kernel@vger.kernel.org,
Leif Lindholm <leif.lindholm@linaro.org>,
Grygorii Strashko <grygorii.strashko@ti.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Rob Herring <robherring2@gmail.com>,
Ard Biesheuvel <ard.biesheuvel@linaro.org>,
Will Deacon <will.deacon@arm.com>,
Nicolas Pitre <nicolas.pitre@linaro.org>,
Santosh Shilimkar <santosh.shilimkar@ti.com>
Subject: [PATCHv2 1/2] mm/memblock: add memblock_get_current_limit
Date: Tue, 4 Feb 2014 16:02:30 -0800 [thread overview]
Message-ID: <1391558551-31395-2-git-send-email-lauraa@codeaurora.org> (raw)
In-Reply-To: <1391558551-31395-1-git-send-email-lauraa@codeaurora.org>
Appart from setting the limit of memblock, it's also useful to be able
to get the limit to avoid recalculating it every time. Add the function
to do so.
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
---
include/linux/memblock.h | 2 ++
mm/memblock.c | 5 +++++
2 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/include/linux/memblock.h b/include/linux/memblock.h
index 1ef6636..8a20a51 100644
--- a/include/linux/memblock.h
+++ b/include/linux/memblock.h
@@ -252,6 +252,8 @@ static inline void memblock_dump_all(void)
void memblock_set_current_limit(phys_addr_t limit);
+phys_addr_t memblock_get_current_limit(void);
+
/*
* pfn conversion functions
*
diff --git a/mm/memblock.c b/mm/memblock.c
index 87d21a6..3820e29 100644
--- a/mm/memblock.c
+++ b/mm/memblock.c
@@ -1404,6 +1404,11 @@ void __init_memblock memblock_set_current_limit(phys_addr_t limit)
memblock.current_limit = limit;
}
+phys_addr_t __init_memblock memblock_get_current_limit(void)
+{
+ return memblock.current_limit;
+}
+
static void __init_memblock memblock_dump(struct memblock_type *type, char *name)
{
unsigned long long base, size;
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation
next prev parent reply other threads:[~2014-02-05 0:02 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-05 0:02 [PATCHv2 0/2] Remove ARM meminfo Laura Abbott
2014-02-05 0:02 ` Laura Abbott
2014-02-05 0:02 ` Laura Abbott [this message]
2014-02-05 0:02 ` [PATCHv2 1/2] mm/memblock: add memblock_get_current_limit Laura Abbott
2014-02-05 22:01 ` Andrew Morton
2014-02-05 22:01 ` Andrew Morton
2014-02-05 23:19 ` Santosh Shilimkar
2014-02-05 23:19 ` Santosh Shilimkar
2014-02-05 0:02 ` [PATCHv2 2/2] arm: Get rid of meminfo Laura Abbott
2014-02-05 0:02 ` Laura Abbott
2014-02-05 2:00 ` Jason Cooper
2014-02-05 2:00 ` Jason Cooper
2014-02-05 13:43 ` Leif Lindholm
2014-02-05 13:43 ` Leif Lindholm
2014-02-05 23:21 ` Santosh Shilimkar
2014-02-05 23:21 ` Santosh Shilimkar
2014-02-05 23:21 ` Santosh Shilimkar
2014-02-07 2:09 ` Courtney Cavin
2014-02-07 2:09 ` Courtney Cavin
2014-02-07 2:09 ` Courtney Cavin
2014-02-10 3:25 ` Laura Abbott
2014-02-10 3:25 ` Laura Abbott
2014-02-10 3:25 ` Laura Abbott
2014-02-10 10:11 ` Catalin Marinas
2014-02-10 10:11 ` Catalin Marinas
2014-02-10 10:11 ` Catalin Marinas
2014-02-10 17:28 ` Courtney Cavin
2014-02-10 17:28 ` Courtney Cavin
2014-02-10 17:28 ` Courtney Cavin
2014-02-10 21:59 ` Laura Abbott
2014-02-10 21:59 ` Laura Abbott
2014-02-10 21:59 ` Laura Abbott
2014-02-10 21:58 ` Grant Likely
2014-02-10 21:58 ` Grant Likely
2014-02-10 21:58 ` Grant Likely
2014-02-11 9:47 ` Marek Szyprowski
2014-02-11 9:47 ` Marek Szyprowski
2014-02-05 13:55 ` [PATCHv2 0/2] Remove ARM meminfo Catalin Marinas
2014-02-05 13:55 ` Catalin Marinas
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=1391558551-31395-2-git-send-email-lauraa@codeaurora.org \
--to=lauraa@codeaurora.org \
--cc=akpm@linux-foundation.org \
--cc=ard.biesheuvel@linaro.org \
--cc=catalin.marinas@arm.com \
--cc=grygorii.strashko@ti.com \
--cc=leif.lindholm@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=nicolas.pitre@linaro.org \
--cc=robherring2@gmail.com \
--cc=santosh.shilimkar@ti.com \
--cc=will.deacon@arm.com \
/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 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.