public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] More section-related cleanups
@ 2014-08-29 20:18 Geert Uytterhoeven
  2014-08-29 20:18 ` [PATCH 1/4] frv: Remove unused declarations of __start___ex_table and __stop___ex_table Geert Uytterhoeven
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Geert Uytterhoeven @ 2014-08-29 20:18 UTC (permalink / raw)
  To: Andrew Morton
  Cc: David Howells, Tony Luck, Fenghua Yu, Chris Metcalf,
	Rusty Russell, linux-kernel, Geert Uytterhoeven

	Hi Andrew,

Here's a resend of 4 more patches from the series "[PATCH 00/17]
<asm/sections.h> related cleanups" I sent almost one year ago
(https://lkml.org/lkml/2013/11/12/510).

3 of them received acks from their maintainers.

Thanks for applying!

Geert Uytterhoeven (4):
  frv: Remove unused declarations of __start___ex_table and
    __stop___ex_table
  ia64: Remove duplicate declarations of __per_cpu_start[] and
    __per_cpu_end[]
  tile: Remove tile-specific _sinitdata and _einitdata
  kernel/param: Consolidate __{start,stop}___param[] in
    <linux/moduleparam.h>

 arch/frv/mm/extable.c            |  2 --
 arch/ia64/include/asm/sections.h |  2 +-
 arch/tile/include/asm/sections.h |  3 ---
 arch/tile/kernel/vmlinux.lds.S   |  2 --
 arch/tile/mm/init.c              | 10 +++++-----
 include/linux/moduleparam.h      |  2 ++
 init/main.c                      |  2 --
 kernel/params.c                  |  7 +++----
 8 files changed, 11 insertions(+), 19 deletions(-)

-- 
1.9.1

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

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

* [PATCH 1/4] frv: Remove unused declarations of __start___ex_table and __stop___ex_table
  2014-08-29 20:18 [PATCH 0/4] More section-related cleanups Geert Uytterhoeven
@ 2014-08-29 20:18 ` Geert Uytterhoeven
  2014-08-29 20:18 ` [PATCH 2/4] ia64: Remove duplicate declarations of __per_cpu_start[] and __per_cpu_end[] Geert Uytterhoeven
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Geert Uytterhoeven @ 2014-08-29 20:18 UTC (permalink / raw)
  To: Andrew Morton
  Cc: David Howells, Tony Luck, Fenghua Yu, Chris Metcalf,
	Rusty Russell, linux-kernel, Geert Uytterhoeven

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: David Howells <dhowells@redhat.com>
---
 arch/frv/mm/extable.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/frv/mm/extable.c b/arch/frv/mm/extable.c
index 6aea124f574d..2fb9b3ab57b9 100644
--- a/arch/frv/mm/extable.c
+++ b/arch/frv/mm/extable.c
@@ -6,8 +6,6 @@
 #include <linux/spinlock.h>
 #include <asm/uaccess.h>
 
-extern const struct exception_table_entry __attribute__((aligned(8))) __start___ex_table[];
-extern const struct exception_table_entry __attribute__((aligned(8))) __stop___ex_table[];
 extern const void __memset_end, __memset_user_error_lr, __memset_user_error_handler;
 extern const void __memcpy_end, __memcpy_user_error_lr, __memcpy_user_error_handler;
 extern spinlock_t modlist_lock;
-- 
1.9.1


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

* [PATCH 2/4] ia64: Remove duplicate declarations of __per_cpu_start[] and __per_cpu_end[]
  2014-08-29 20:18 [PATCH 0/4] More section-related cleanups Geert Uytterhoeven
  2014-08-29 20:18 ` [PATCH 1/4] frv: Remove unused declarations of __start___ex_table and __stop___ex_table Geert Uytterhoeven
@ 2014-08-29 20:18 ` Geert Uytterhoeven
  2014-08-29 20:18 ` [PATCH 3/4] tile: Remove tile-specific _sinitdata and _einitdata Geert Uytterhoeven
  2014-08-29 20:18 ` [PATCH 4/4] kernel/param: Consolidate __{start,stop}___param[] in <linux/moduleparam.h> Geert Uytterhoeven
  3 siblings, 0 replies; 6+ messages in thread
From: Geert Uytterhoeven @ 2014-08-29 20:18 UTC (permalink / raw)
  To: Andrew Morton
  Cc: David Howells, Tony Luck, Fenghua Yu, Chris Metcalf,
	Rusty Russell, linux-kernel, Geert Uytterhoeven

They're already provided by <asm/sections.h>.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
 arch/ia64/include/asm/sections.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/ia64/include/asm/sections.h b/arch/ia64/include/asm/sections.h
index 1a873b36a4a1..2ab2003698ef 100644
--- a/arch/ia64/include/asm/sections.h
+++ b/arch/ia64/include/asm/sections.h
@@ -10,7 +10,7 @@
 #include <linux/uaccess.h>
 #include <asm-generic/sections.h>
 
-extern char __per_cpu_start[], __per_cpu_end[], __phys_per_cpu_start[];
+extern char __phys_per_cpu_start[];
 #ifdef	CONFIG_SMP
 extern char __cpu0_per_cpu[];
 #endif
-- 
1.9.1


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

* [PATCH 3/4] tile: Remove tile-specific _sinitdata and _einitdata
  2014-08-29 20:18 [PATCH 0/4] More section-related cleanups Geert Uytterhoeven
  2014-08-29 20:18 ` [PATCH 1/4] frv: Remove unused declarations of __start___ex_table and __stop___ex_table Geert Uytterhoeven
  2014-08-29 20:18 ` [PATCH 2/4] ia64: Remove duplicate declarations of __per_cpu_start[] and __per_cpu_end[] Geert Uytterhoeven
@ 2014-08-29 20:18 ` Geert Uytterhoeven
  2014-08-29 20:28   ` Chris Metcalf
  2014-08-29 20:18 ` [PATCH 4/4] kernel/param: Consolidate __{start,stop}___param[] in <linux/moduleparam.h> Geert Uytterhoeven
  3 siblings, 1 reply; 6+ messages in thread
From: Geert Uytterhoeven @ 2014-08-29 20:18 UTC (permalink / raw)
  To: Andrew Morton
  Cc: David Howells, Tony Luck, Fenghua Yu, Chris Metcalf,
	Rusty Russell, linux-kernel, Geert Uytterhoeven

Use standard __init_begin and __init_end instead.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Chris Metcalf <cmetcalf@tilera.com>
---
 arch/tile/include/asm/sections.h |  3 ---
 arch/tile/kernel/vmlinux.lds.S   |  2 --
 arch/tile/mm/init.c              | 10 +++++-----
 3 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/arch/tile/include/asm/sections.h b/arch/tile/include/asm/sections.h
index 5d5d3b739a6b..86a746243dc8 100644
--- a/arch/tile/include/asm/sections.h
+++ b/arch/tile/include/asm/sections.h
@@ -19,9 +19,6 @@
 
 #include <asm-generic/sections.h>
 
-/* Text and data are at different areas in the kernel VA space. */
-extern char _sinitdata[], _einitdata[];
-
 /* Write-once data is writable only till the end of initialization. */
 extern char __w1data_begin[], __w1data_end[];
 
diff --git a/arch/tile/kernel/vmlinux.lds.S b/arch/tile/kernel/vmlinux.lds.S
index f1819423ffc9..0e059a0101ea 100644
--- a/arch/tile/kernel/vmlinux.lds.S
+++ b/arch/tile/kernel/vmlinux.lds.S
@@ -66,11 +66,9 @@ SECTIONS
 
   . = ALIGN(PAGE_SIZE);
   __init_begin = .;
-  VMLINUX_SYMBOL(_sinitdata) = .;
   INIT_DATA_SECTION(16) :data =0
   PERCPU_SECTION(L2_CACHE_BYTES)
   . = ALIGN(PAGE_SIZE);
-  VMLINUX_SYMBOL(_einitdata) = .;
   __init_end = .;
 
   _sdata = .;                   /* Start of data section */
diff --git a/arch/tile/mm/init.c b/arch/tile/mm/init.c
index bfb3127b4df9..930c95526762 100644
--- a/arch/tile/mm/init.c
+++ b/arch/tile/mm/init.c
@@ -254,7 +254,7 @@ static pgprot_t __init init_pgprot(ulong address)
 	 * Everything else that isn't data or bss is heap, so mark it
 	 * with the initial heap home (hash-for-home, or this cpu).  This
 	 * includes any addresses after the loaded image and any address before
-	 * _einitdata, since we already captured the case of text before
+	 * __init_end, since we already captured the case of text before
 	 * _sinittext, and __pa(einittext) is approximately __pa(sinitdata).
 	 *
 	 * All the LOWMEM pages that we mark this way will get their
@@ -263,7 +263,7 @@ static pgprot_t __init init_pgprot(ulong address)
 	 * homes, but with a zero free_time we don't have to actually
 	 * do a flush action the first time we use them, either.
 	 */
-	if (address >= (ulong) _end || address < (ulong) _einitdata)
+	if (address >= (ulong) _end || address < (ulong) __init_end)
 		return construct_pgprot(PAGE_KERNEL, initial_heap_home());
 
 	/* Use hash-for-home if requested for data/bss. */
@@ -632,7 +632,7 @@ int devmem_is_allowed(unsigned long pagenr)
 {
 	return pagenr < kaddr_to_pfn(_end) &&
 		!(pagenr >= kaddr_to_pfn(&init_thread_union) ||
-		  pagenr < kaddr_to_pfn(_einitdata)) &&
+		  pagenr < kaddr_to_pfn(__init_end)) &&
 		!(pagenr >= kaddr_to_pfn(_sinittext) ||
 		  pagenr <= kaddr_to_pfn(_einittext-1));
 }
@@ -975,8 +975,8 @@ void free_initmem(void)
 
 	/* Free the data pages that we won't use again after init. */
 	free_init_pages("unused kernel data",
-			(unsigned long)_sinitdata,
-			(unsigned long)_einitdata);
+			(unsigned long)__init_begin,
+			(unsigned long)__init_end);
 
 	/*
 	 * Free the pages mapped from 0xc0000000 that correspond to code
-- 
1.9.1


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

* [PATCH 4/4] kernel/param: Consolidate __{start,stop}___param[] in <linux/moduleparam.h>
  2014-08-29 20:18 [PATCH 0/4] More section-related cleanups Geert Uytterhoeven
                   ` (2 preceding siblings ...)
  2014-08-29 20:18 ` [PATCH 3/4] tile: Remove tile-specific _sinitdata and _einitdata Geert Uytterhoeven
@ 2014-08-29 20:18 ` Geert Uytterhoeven
  3 siblings, 0 replies; 6+ messages in thread
From: Geert Uytterhoeven @ 2014-08-29 20:18 UTC (permalink / raw)
  To: Andrew Morton
  Cc: David Howells, Tony Luck, Fenghua Yu, Chris Metcalf,
	Rusty Russell, linux-kernel, Geert Uytterhoeven

Consolidate the various external const and non-const declarations of
__start___param[] and __stop___param in <linux/moduleparam.h>.
This requires making a few struct kernel_param pointers in kernel/params.c
const.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
---
 include/linux/moduleparam.h | 2 ++
 init/main.c                 | 2 --
 kernel/params.c             | 7 +++----
 3 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h
index 494f99e852da..af582591e05a 100644
--- a/include/linux/moduleparam.h
+++ b/include/linux/moduleparam.h
@@ -68,6 +68,8 @@ struct kernel_param {
 	};
 };
 
+extern const struct kernel_param __start___param[], __stop___param[];
+
 /* Special one for strings we want to copy into */
 struct kparam_string {
 	unsigned int maxlen;
diff --git a/init/main.c b/init/main.c
index bb1aed928f21..8197dfc738bc 100644
--- a/init/main.c
+++ b/init/main.c
@@ -501,7 +501,6 @@ asmlinkage __visible void __init start_kernel(void)
 {
 	char *command_line;
 	char *after_dashes;
-	extern const struct kernel_param __start___param[], __stop___param[];
 
 	/*
 	 * Need to run as early as possible, to initialize the
@@ -843,7 +842,6 @@ static char *initcall_level_names[] __initdata = {
 
 static void __init do_initcall_level(int level)
 {
-	extern const struct kernel_param __start___param[], __stop___param[];
 	initcall_t *fn;
 
 	strcpy(initcall_command_line, saved_command_line);
diff --git a/kernel/params.c b/kernel/params.c
index 34f527023794..27c0320fae36 100644
--- a/kernel/params.c
+++ b/kernel/params.c
@@ -19,6 +19,7 @@
 #include <linux/string.h>
 #include <linux/errno.h>
 #include <linux/module.h>
+#include <linux/moduleparam.h>
 #include <linux/device.h>
 #include <linux/err.h>
 #include <linux/slab.h>
@@ -503,8 +504,6 @@ EXPORT_SYMBOL(param_ops_string);
 #define to_module_attr(n) container_of(n, struct module_attribute, attr)
 #define to_module_kobject(n) container_of(n, struct module_kobject, kobj)
 
-extern struct kernel_param __start___param[], __stop___param[];
-
 struct param_attribute
 {
 	struct module_attribute mattr;
@@ -763,7 +762,7 @@ static struct module_kobject * __init locate_module_kobject(const char *name)
 }
 
 static void __init kernel_add_sysfs_param(const char *name,
-					  struct kernel_param *kparam,
+					  const struct kernel_param *kparam,
 					  unsigned int name_skip)
 {
 	struct module_kobject *mk;
@@ -798,7 +797,7 @@ static void __init kernel_add_sysfs_param(const char *name,
  */
 static void __init param_sysfs_builtin(void)
 {
-	struct kernel_param *kp;
+	const struct kernel_param *kp;
 	unsigned int name_len;
 	char modname[MODULE_NAME_LEN];
 
-- 
1.9.1


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

* Re: [PATCH 3/4] tile: Remove tile-specific _sinitdata and _einitdata
  2014-08-29 20:18 ` [PATCH 3/4] tile: Remove tile-specific _sinitdata and _einitdata Geert Uytterhoeven
@ 2014-08-29 20:28   ` Chris Metcalf
  0 siblings, 0 replies; 6+ messages in thread
From: Chris Metcalf @ 2014-08-29 20:28 UTC (permalink / raw)
  To: Geert Uytterhoeven, Andrew Morton
  Cc: David Howells, Tony Luck, Fenghua Yu, Rusty Russell, linux-kernel

On 8/29/2014 4:18 PM, Geert Uytterhoeven wrote:
> Use standard __init_begin and __init_end instead.
>
> Signed-off-by: Geert Uytterhoeven<geert@linux-m68k.org>
> Acked-by: Chris Metcalf<cmetcalf@tilera.com>
> ---
>   arch/tile/include/asm/sections.h |  3 ---
>   arch/tile/kernel/vmlinux.lds.S   |  2 --
>   arch/tile/mm/init.c              | 10 +++++-----
>   3 files changed, 5 insertions(+), 10 deletions(-)

This is still in the tile tree; I missed the merge window for 3.17
since I was lazing around on the beach, but I'll push it to Linus
for 3.18.

-- 
Chris Metcalf, Tilera Corp.
http://www.tilera.com


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

end of thread, other threads:[~2014-08-29 20:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-29 20:18 [PATCH 0/4] More section-related cleanups Geert Uytterhoeven
2014-08-29 20:18 ` [PATCH 1/4] frv: Remove unused declarations of __start___ex_table and __stop___ex_table Geert Uytterhoeven
2014-08-29 20:18 ` [PATCH 2/4] ia64: Remove duplicate declarations of __per_cpu_start[] and __per_cpu_end[] Geert Uytterhoeven
2014-08-29 20:18 ` [PATCH 3/4] tile: Remove tile-specific _sinitdata and _einitdata Geert Uytterhoeven
2014-08-29 20:28   ` Chris Metcalf
2014-08-29 20:18 ` [PATCH 4/4] kernel/param: Consolidate __{start,stop}___param[] in <linux/moduleparam.h> Geert Uytterhoeven

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