mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] x86/apic: Mark parse_mem_block_size as __init
@ 2018-07-30  7:59 Dou Liyang
  2018-07-30 17:57 ` [tip:x86/platform] x86/platform/UV: Mark memblock related init code and data correctly tip-bot for Dou Liyang
  0 siblings, 1 reply; 2+ messages in thread
From: Dou Liyang @ 2018-07-30  7:59 UTC (permalink / raw)
  To: linux-kernel, x86; +Cc: tglx, mingo, hpa, Dou Liyang

The early_param() is only called during kernel initialization, So Linux
marks the functions of it with __init macro to save memory.

But it forgot to mark parse_mem_block_size(). So, Make it __init as well.
Aslo mark mem_block_size variable __initdata.

Signed-off-by: Dou Liyang <douly.fnst@cn.fujitsu.com>
---
 arch/x86/kernel/apic/x2apic_uv_x.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/apic/x2apic_uv_x.c b/arch/x86/kernel/apic/x2apic_uv_x.c
index d492752f79e1..391f358ebb4c 100644
--- a/arch/x86/kernel/apic/x2apic_uv_x.c
+++ b/arch/x86/kernel/apic/x2apic_uv_x.c
@@ -394,10 +394,10 @@ extern int uv_hub_info_version(void)
 EXPORT_SYMBOL(uv_hub_info_version);
 
 /* Default UV memory block size is 2GB */
-static unsigned long mem_block_size = (2UL << 30);
+static unsigned long mem_block_size __initdata = (2UL << 30);
 
 /* Kernel parameter to specify UV mem block size */
-static int parse_mem_block_size(char *ptr)
+static int __init parse_mem_block_size(char *ptr)
 {
 	unsigned long size = memparse(ptr, NULL);
 
-- 
2.14.3




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-07-30 17:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-30  7:59 [PATCH] x86/apic: Mark parse_mem_block_size as __init Dou Liyang
2018-07-30 17:57 ` [tip:x86/platform] x86/platform/UV: Mark memblock related init code and data correctly tip-bot for Dou Liyang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome