From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: linuxppc-dev@lists.ozlabs.org
Subject: [PATCH 04/12] powerpc/prom_init: Replace __initdata with __prombss when applicable
Date: Mon, 15 Oct 2018 13:49:52 +1100 [thread overview]
Message-ID: <20181015025000.4522-4-benh@kernel.crashing.org> (raw)
In-Reply-To: <20181015025000.4522-1-benh@kernel.crashing.org>
This replaces all occurrences of __initdata for uninitialized
data with a new __prombss
Currently __promdata is defined to be __initdata but we'll
eventually change that.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
arch/powerpc/kernel/prom_init.c | 55 +++++++++++++++++----------------
1 file changed, 29 insertions(+), 26 deletions(-)
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c
index 2e1ebf26e8e4..9942bfca12e4 100644
--- a/arch/powerpc/kernel/prom_init.c
+++ b/arch/powerpc/kernel/prom_init.c
@@ -48,6 +48,9 @@
#include <linux/linux_logo.h>
+/* All of prom_init bss lives here */
+#define __prombss __initdata
+
/*
* Eventually bump that one up
*/
@@ -87,7 +90,7 @@
#define OF_WORKAROUNDS 0
#else
#define OF_WORKAROUNDS of_workarounds
-static int of_workarounds __promdata;
+static int of_workarounds __prombss;
#endif
#define OF_WA_CLAIM 1 /* do phys/virt claim separately, then map */
@@ -148,26 +151,26 @@ extern void copy_and_flush(unsigned long dest, unsigned long src,
unsigned long size, unsigned long offset);
/* prom structure */
-static struct prom_t __initdata prom;
+static struct prom_t __prombss prom;
-static unsigned long prom_entry __initdata;
+static unsigned long __prombss prom_entry;
#define PROM_SCRATCH_SIZE 256
-static char __initdata of_stdout_device[256];
-static char __initdata prom_scratch[PROM_SCRATCH_SIZE];
+static char __prombss of_stdout_device[256];
+static char __prombss prom_scratch[PROM_SCRATCH_SIZE];
-static unsigned long __initdata dt_header_start;
-static unsigned long __initdata dt_struct_start, dt_struct_end;
-static unsigned long __initdata dt_string_start, dt_string_end;
+static unsigned long __prombss dt_header_start;
+static unsigned long __prombss dt_struct_start, dt_struct_end;
+static unsigned long __prombss dt_string_start, dt_string_end;
-static unsigned long __initdata prom_initrd_start, prom_initrd_end;
+static unsigned long __prombss prom_initrd_start, prom_initrd_end;
#ifdef CONFIG_PPC64
-static int __initdata prom_iommu_force_on;
-static int __initdata prom_iommu_off;
-static unsigned long __initdata prom_tce_alloc_start;
-static unsigned long __initdata prom_tce_alloc_end;
+static int __prombss prom_iommu_force_on;
+static int __prombss prom_iommu_off;
+static unsigned long __prombss prom_tce_alloc_start;
+static unsigned long __prombss prom_tce_alloc_end;
#endif
static bool prom_radix_disable __initdata = !IS_ENABLED(CONFIG_PPC_RADIX_MMU_DEFAULT);
@@ -190,22 +193,22 @@ struct platform_support {
#define PLATFORM_GENERIC 0x0500
#define PLATFORM_OPAL 0x0600
-static int __initdata of_platform;
+static int __prombss of_platform;
-static char __initdata prom_cmd_line[COMMAND_LINE_SIZE];
+static char __prombss prom_cmd_line[COMMAND_LINE_SIZE];
-static unsigned long __initdata prom_memory_limit;
+static unsigned long __prombss prom_memory_limit;
-static unsigned long __initdata alloc_top;
-static unsigned long __initdata alloc_top_high;
-static unsigned long __initdata alloc_bottom;
-static unsigned long __initdata rmo_top;
-static unsigned long __initdata ram_top;
+static unsigned long __prombss alloc_top;
+static unsigned long __prombss alloc_top_high;
+static unsigned long __prombss alloc_bottom;
+static unsigned long __prombss rmo_top;
+static unsigned long __prombss ram_top;
-static struct mem_map_entry __initdata mem_reserve_map[MEM_RESERVE_MAP_SIZE];
-static int __initdata mem_reserve_cnt;
+static struct mem_map_entry __prombss mem_reserve_map[MEM_RESERVE_MAP_SIZE];
+static int __prombss mem_reserve_cnt;
-static cell_t __initdata regbuf[1024];
+static cell_t __prombss regbuf[1024];
static bool rtas_has_query_cpu_stopped;
@@ -1565,8 +1568,8 @@ static void __init prom_close_stdin(void)
#ifdef CONFIG_PPC_POWERNV
#ifdef CONFIG_PPC_EARLY_DEBUG_OPAL
-static u64 __initdata prom_opal_base;
-static u64 __initdata prom_opal_entry;
+static u64 __prombss prom_opal_base;
+static u64 __prombss prom_opal_entry;
#endif
/*
--
2.17.1
next prev parent reply other threads:[~2018-10-15 3:09 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-15 2:49 [PATCH 01/12] powerpc/prom_init: Make of_workarounds static Benjamin Herrenschmidt
2018-10-15 2:49 ` [PATCH 02/12] powerpc/prom_init: Make "fake_elf" const Benjamin Herrenschmidt
2018-10-15 2:49 ` [PATCH 03/12] powerpc/prom_init: Make "default_colors" const Benjamin Herrenschmidt
2018-10-15 2:49 ` Benjamin Herrenschmidt [this message]
2018-10-19 2:51 ` [04/12] powerpc/prom_init: Replace __initdata with __prombss when applicable Michael Ellerman
2018-10-15 2:49 ` [PATCH 05/12] powerpc/prom_init: Remove support for OPAL v2 Benjamin Herrenschmidt
2018-10-19 2:51 ` [05/12] " Michael Ellerman
2018-10-15 2:49 ` [PATCH 06/12] powerpc/prom_init: Move prom_radix_disable to __prombss Benjamin Herrenschmidt
2018-10-19 2:51 ` [06/12] " Michael Ellerman
2018-10-15 2:49 ` [PATCH 07/12] powerpc/prom_init: Move ibm_arch_vec " Benjamin Herrenschmidt
2018-10-19 2:51 ` [07/12] " Michael Ellerman
2018-10-15 2:49 ` [PATCH 08/12] powerpc/prom_init: Move const structures to __initconst Benjamin Herrenschmidt
2018-10-19 2:51 ` [08/12] " Michael Ellerman
2018-10-15 2:49 ` [PATCH 09/12] powerpc/prom_init: Move a few remaining statics to appropriate sections Benjamin Herrenschmidt
2018-10-19 2:51 ` [09/12] " Michael Ellerman
2018-10-15 2:49 ` [PATCH 10/12] powerpc/prom_init: Move __prombss to it's own section and store it in .bss Benjamin Herrenschmidt
2018-10-19 2:51 ` [10/12] " Michael Ellerman
2018-10-15 2:49 ` [PATCH 11/12] powerpc: Check prom_init for disallowed sections Benjamin Herrenschmidt
2018-10-19 2:51 ` [11/12] " Michael Ellerman
2018-10-15 2:50 ` [PATCH 12/12] powerpc/prom_init: Generate "phandle" instead of "linux, phandle" Benjamin Herrenschmidt
2018-10-19 2:51 ` [12/12] " Michael Ellerman
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=20181015025000.4522-4-benh@kernel.crashing.org \
--to=benh@kernel.crashing.org \
--cc=linuxppc-dev@lists.ozlabs.org \
/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).