* [PATCH 0/3] Little error fix and cleanup.
@ 2013-04-15 9:46 Tang Chen
2013-04-15 9:46 ` [PATCH 1/3] mm: Remove unused parameter of pages_correctly_reserved() Tang Chen
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Tang Chen @ 2013-04-15 9:46 UTC (permalink / raw)
To: gregkh, tglx, mingo, hpa, yinghai, akpm, wency, mgorman, tj,
liwanp
Cc: tangchen, linux-mm, x86, linux-kernel
This patch-set did the following things:
patch1: Remove unused parameter "nr_pages" of pages_correctly_reserved().
patch2: Use CONFIG_MEMORY_HOTREMOVE to protect kernel_physical_mapping_remove().
patch3: Add comments for parameter "nid" for memblock_insert_region().
Tang Chen (3):
mm: Remove unused parameter of pages_correctly_reserved().
mem-hotplug: Put kernel_physical_mapping_remove() declaration in
CONFIG_MEMORY_HOTREMOVE.
memblock: Fix missing comment of memblock_insert_region().
arch/x86/mm/init_64.c | 2 +-
drivers/base/memory.c | 5 ++---
mm/memblock.c | 9 +++++----
3 files changed, 8 insertions(+), 8 deletions(-)
--
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>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/3] mm: Remove unused parameter of pages_correctly_reserved()
2013-04-15 9:46 [PATCH 0/3] Little error fix and cleanup Tang Chen
@ 2013-04-15 9:46 ` Tang Chen
2013-04-15 16:30 ` Greg KH
2013-04-15 9:46 ` [PATCH 2/3] mem-hotplug: Put kernel_physical_mapping_remove() declaration in CONFIG_MEMORY_HOTREMOVE Tang Chen
2013-04-15 9:46 ` [PATCH 3/3] memblock: Fix missing comment of memblock_insert_region() Tang Chen
2 siblings, 1 reply; 6+ messages in thread
From: Tang Chen @ 2013-04-15 9:46 UTC (permalink / raw)
To: gregkh, tglx, mingo, hpa, yinghai, akpm, wency, mgorman, tj,
liwanp
Cc: tangchen, linux-mm, x86, linux-kernel
nr_pages is not used in pages_correctly_reserved().
So remove it.
Signed-off-by: Tang Chen <tangchen@cn.fujitsu.com>
Reviewed-by: Wang Shilong <wangsl-fnst@cn.fujitsu.com>
Reviewed-by: Wen Congyang <wency@cn.fujitsu.com>
---
drivers/base/memory.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/base/memory.c b/drivers/base/memory.c
index a51007b..f926b9c 100644
--- a/drivers/base/memory.c
+++ b/drivers/base/memory.c
@@ -217,8 +217,7 @@ int memory_isolate_notify(unsigned long val, void *v)
* The probe routines leave the pages reserved, just as the bootmem code does.
* Make sure they're still that way.
*/
-static bool pages_correctly_reserved(unsigned long start_pfn,
- unsigned long nr_pages)
+static bool pages_correctly_reserved(unsigned long start_pfn)
{
int i, j;
struct page *page;
@@ -266,7 +265,7 @@ memory_block_action(unsigned long phys_index, unsigned long action, int online_t
switch (action) {
case MEM_ONLINE:
- if (!pages_correctly_reserved(start_pfn, nr_pages))
+ if (!pages_correctly_reserved(start_pfn))
return -EBUSY;
ret = online_pages(start_pfn, nr_pages, online_type);
--
1.7.1
--
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>
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/3] mem-hotplug: Put kernel_physical_mapping_remove() declaration in CONFIG_MEMORY_HOTREMOVE.
2013-04-15 9:46 [PATCH 0/3] Little error fix and cleanup Tang Chen
2013-04-15 9:46 ` [PATCH 1/3] mm: Remove unused parameter of pages_correctly_reserved() Tang Chen
@ 2013-04-15 9:46 ` Tang Chen
2013-04-16 21:16 ` Andrew Morton
2013-04-15 9:46 ` [PATCH 3/3] memblock: Fix missing comment of memblock_insert_region() Tang Chen
2 siblings, 1 reply; 6+ messages in thread
From: Tang Chen @ 2013-04-15 9:46 UTC (permalink / raw)
To: gregkh, tglx, mingo, hpa, yinghai, akpm, wency, mgorman, tj,
liwanp
Cc: tangchen, linux-mm, x86, linux-kernel
kernel_physical_mapping_remove() is only called by arch_remove_memory() in
init_64.c, which is enclosed in CONFIG_MEMORY_HOTREMOVE. So when we don't
configure CONFIG_MEMORY_HOTREMOVE, the compiler will give a warning:
warning: ‘kernel_physical_mapping_remove’ defined but not used
So put kernel_physical_mapping_remove() in CONFIG_MEMORY_HOTREMOVE.
Signed-off-by: Tang Chen <tangchen@cn.fujitsu.com>
---
arch/x86/mm/init_64.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c
index 474e28f..dafdeb2 100644
--- a/arch/x86/mm/init_64.c
+++ b/arch/x86/mm/init_64.c
@@ -1019,6 +1019,7 @@ void __ref vmemmap_free(struct page *memmap, unsigned long nr_pages)
remove_pagetable(start, end, false);
}
+#ifdef CONFIG_MEMORY_HOTREMOVE
static void __meminit
kernel_physical_mapping_remove(unsigned long start, unsigned long end)
{
@@ -1028,7 +1029,6 @@ kernel_physical_mapping_remove(unsigned long start, unsigned long end)
remove_pagetable(start, end, true);
}
-#ifdef CONFIG_MEMORY_HOTREMOVE
int __ref arch_remove_memory(u64 start, u64 size)
{
unsigned long start_pfn = start >> PAGE_SHIFT;
--
1.7.1
--
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>
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/3] memblock: Fix missing comment of memblock_insert_region().
2013-04-15 9:46 [PATCH 0/3] Little error fix and cleanup Tang Chen
2013-04-15 9:46 ` [PATCH 1/3] mm: Remove unused parameter of pages_correctly_reserved() Tang Chen
2013-04-15 9:46 ` [PATCH 2/3] mem-hotplug: Put kernel_physical_mapping_remove() declaration in CONFIG_MEMORY_HOTREMOVE Tang Chen
@ 2013-04-15 9:46 ` Tang Chen
2 siblings, 0 replies; 6+ messages in thread
From: Tang Chen @ 2013-04-15 9:46 UTC (permalink / raw)
To: gregkh, tglx, mingo, hpa, yinghai, akpm, wency, mgorman, tj,
liwanp
Cc: tangchen, linux-mm, x86, linux-kernel
There is no comment for parameter nid of memblock_insert_region().
This patch adds comment for it.
Signed-off-by: Tang Chen <tangchen@cn.fujitsu.com>
---
mm/memblock.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/mm/memblock.c b/mm/memblock.c
index b8d9147..16eda3d 100644
--- a/mm/memblock.c
+++ b/mm/memblock.c
@@ -322,10 +322,11 @@ static void __init_memblock memblock_merge_regions(struct memblock_type *type)
/**
* memblock_insert_region - insert new memblock region
- * @type: memblock type to insert into
- * @idx: index for the insertion point
- * @base: base address of the new region
- * @size: size of the new region
+ * @type: memblock type to insert into
+ * @idx: index for the insertion point
+ * @base: base address of the new region
+ * @size: size of the new region
+ * @nid: node id of the new region
*
* Insert new memblock region [@base,@base+@size) into @type at @idx.
* @type must already have extra room to accomodate the new region.
--
1.7.1
--
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>
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/3] mm: Remove unused parameter of pages_correctly_reserved()
2013-04-15 9:46 ` [PATCH 1/3] mm: Remove unused parameter of pages_correctly_reserved() Tang Chen
@ 2013-04-15 16:30 ` Greg KH
0 siblings, 0 replies; 6+ messages in thread
From: Greg KH @ 2013-04-15 16:30 UTC (permalink / raw)
To: Tang Chen
Cc: tglx, mingo, hpa, yinghai, akpm, wency, mgorman, tj, liwanp,
linux-mm, x86, linux-kernel
On Mon, Apr 15, 2013 at 05:46:45PM +0800, Tang Chen wrote:
> nr_pages is not used in pages_correctly_reserved().
> So remove it.
>
> Signed-off-by: Tang Chen <tangchen@cn.fujitsu.com>
> Reviewed-by: Wang Shilong <wangsl-fnst@cn.fujitsu.com>
> Reviewed-by: Wen Congyang <wency@cn.fujitsu.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
--
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>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/3] mem-hotplug: Put kernel_physical_mapping_remove() declaration in CONFIG_MEMORY_HOTREMOVE.
2013-04-15 9:46 ` [PATCH 2/3] mem-hotplug: Put kernel_physical_mapping_remove() declaration in CONFIG_MEMORY_HOTREMOVE Tang Chen
@ 2013-04-16 21:16 ` Andrew Morton
0 siblings, 0 replies; 6+ messages in thread
From: Andrew Morton @ 2013-04-16 21:16 UTC (permalink / raw)
To: Tang Chen
Cc: gregkh, tglx, mingo, hpa, yinghai, wency, mgorman, tj, liwanp,
linux-mm, x86, linux-kernel
On Mon, 15 Apr 2013 17:46:46 +0800 Tang Chen <tangchen@cn.fujitsu.com> wrote:
> kernel_physical_mapping_remove() is only called by arch_remove_memory() in
> init_64.c, which is enclosed in CONFIG_MEMORY_HOTREMOVE. So when we don't
> configure CONFIG_MEMORY_HOTREMOVE, the compiler will give a warning:
>
> warning: ___kernel_physical_mapping_remove___ defined but not used
>
> So put kernel_physical_mapping_remove() in CONFIG_MEMORY_HOTREMOVE.
>
> Signed-off-by: Tang Chen <tangchen@cn.fujitsu.com>
> ---
> arch/x86/mm/init_64.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c
> index 474e28f..dafdeb2 100644
> --- a/arch/x86/mm/init_64.c
> +++ b/arch/x86/mm/init_64.c
> @@ -1019,6 +1019,7 @@ void __ref vmemmap_free(struct page *memmap, unsigned long nr_pages)
> remove_pagetable(start, end, false);
> }
>
> +#ifdef CONFIG_MEMORY_HOTREMOVE
> static void __meminit
> kernel_physical_mapping_remove(unsigned long start, unsigned long end)
> {
> @@ -1028,7 +1029,6 @@ kernel_physical_mapping_remove(unsigned long start, unsigned long end)
> remove_pagetable(start, end, true);
> }
>
> -#ifdef CONFIG_MEMORY_HOTREMOVE
> int __ref arch_remove_memory(u64 start, u64 size)
> {
> unsigned long start_pfn = start >> PAGE_SHIFT;
Thanks. I already have this one queued in
http://ozlabs.org/~akpm/mmots/broken-out/arch-x86-mm-init_64c-fix-build-warning-when-config_memory_hotremove=n.patch,
within my "send it to the x86 maintainers" section.
--
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>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-04-16 21:16 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-15 9:46 [PATCH 0/3] Little error fix and cleanup Tang Chen
2013-04-15 9:46 ` [PATCH 1/3] mm: Remove unused parameter of pages_correctly_reserved() Tang Chen
2013-04-15 16:30 ` Greg KH
2013-04-15 9:46 ` [PATCH 2/3] mem-hotplug: Put kernel_physical_mapping_remove() declaration in CONFIG_MEMORY_HOTREMOVE Tang Chen
2013-04-16 21:16 ` Andrew Morton
2013-04-15 9:46 ` [PATCH 3/3] memblock: Fix missing comment of memblock_insert_region() Tang Chen
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).