Skip to content

Commit c378ddd

Browse files
htejunH. Peter Anvin
authored andcommitted
memblock, x86: Make ARCH_DISCARD_MEMBLOCK a config option
From 6839454ae63f1eb21e515c10229ca95c22955fec Mon Sep 17 00:00:00 2001 From: Tejun Heo <tj@kernel.org> Date: Thu, 14 Jul 2011 11:22:17 +0200 Make ARCH_DISCARD_MEMBLOCK a config option so that it can be handled together with other MEMBLOCK options. Signed-off-by: Tejun Heo <tj@kernel.org> Link: http://lkml.kernel.org/r/20110714094603.GH3455@htj.dyndns.org Cc: Yinghai Lu <yinghai@kernel.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
1 parent 474b881 commit c378ddd

5 files changed

Lines changed: 6 additions & 4 deletions

File tree

‎arch/x86/Kconfig‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ config X86
2626
select HAVE_KPROBES
2727
select HAVE_MEMBLOCK
2828
select HAVE_MEMBLOCK_NODE_MAP
29+
select ARCH_DISCARD_MEMBLOCK
2930
select ARCH_WANT_OPTIONAL_GPIOLIB
3031
select ARCH_WANT_FRAME_POINTERS
3132
select HAVE_DMA_ATTRS

‎arch/x86/include/asm/memblock.h‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
#ifndef _X86_MEMBLOCK_H
22
#define _X86_MEMBLOCK_H
33

4-
#define ARCH_DISCARD_MEMBLOCK
5-
64
void memblock_x86_reserve_range(u64 start, u64 end, char *name);
75
void memblock_x86_free_range(u64 start, u64 end);
86

‎include/linux/memblock.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ static inline unsigned long memblock_region_reserved_end_pfn(const struct memblo
197197
region++)
198198

199199

200-
#ifdef ARCH_DISCARD_MEMBLOCK
200+
#ifdef CONFIG_ARCH_DISCARD_MEMBLOCK
201201
#define __init_memblock __meminit
202202
#define __initdata_memblock __meminitdata
203203
#else

‎mm/Kconfig‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,9 @@ config HAVE_MEMBLOCK
134134
config HAVE_MEMBLOCK_NODE_MAP
135135
boolean
136136

137+
config ARCH_DISCARD_MEMBLOCK
138+
boolean
139+
137140
# eventually, we can have this option just 'select SPARSEMEM'
138141
config MEMORY_HOTPLUG
139142
bool "Allow for memory hot-add"

‎mm/memblock.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -959,7 +959,7 @@ static int __init early_memblock(char *p)
959959
}
960960
early_param("memblock", early_memblock);
961961

962-
#if defined(CONFIG_DEBUG_FS) && !defined(ARCH_DISCARD_MEMBLOCK)
962+
#if defined(CONFIG_DEBUG_FS) && !defined(CONFIG_ARCH_DISCARD_MEMBLOCK)
963963

964964
static int memblock_debug_show(struct seq_file *m, void *private)
965965
{

0 commit comments

Comments
 (0)