linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6] MIPS: Use thin archives & dead code elimination
@ 2016-10-20 20:26 Paul Burton
  2016-10-20 20:26 ` Paul Burton
                   ` (7 more replies)
  0 siblings, 8 replies; 23+ messages in thread
From: Paul Burton @ 2016-10-20 20:26 UTC (permalink / raw)
  To: linux-mips; +Cc: Ralf Baechle, Nicholas Piggin, Paul Burton

This series fixes a few issues with CONFIG_LD_DEAD_CODE_DATA_ELIMINATION
and then enables it, along with CONFIG_THIN_ARCHIVES, for MIPS. This
leads to a typical generic kernel build becoming ~5% smaller:

  add/remove: 0/3028 grow/shrink: 1/14 up/down: 18/-457362 (-457344)
  ...
  Total: Before=9001030, After=8543686, chg -5.08%

Applies atop v4.9-rc1.


Paul Burton (6):
  kbuild: Keep device tree tables though dead code elimination
  kbuild: Keep .init.setup section through dead code elimination
  kbuild: Keep PCI fixups through dead code elimination
  kbuild: Keep earlycon table through dead code elimination
  MIPS: Ensure bss section ends on a long-aligned address
  MIPS: Use thin archives & dead code elimination

 arch/mips/Kconfig                 |  2 ++
 arch/mips/kernel/vmlinux.lds.S    |  7 ++++---
 include/asm-generic/vmlinux.lds.h | 24 ++++++++++++------------
 3 files changed, 18 insertions(+), 15 deletions(-)

-- 
2.10.0

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

* [PATCH 0/6] MIPS: Use thin archives & dead code elimination
  2016-10-20 20:26 [PATCH 0/6] MIPS: Use thin archives & dead code elimination Paul Burton
@ 2016-10-20 20:26 ` Paul Burton
  2016-10-20 20:27 ` [PATCH 1/6] kbuild: Keep device tree tables though " Paul Burton
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 23+ messages in thread
From: Paul Burton @ 2016-10-20 20:26 UTC (permalink / raw)
  To: linux-mips; +Cc: Ralf Baechle, Nicholas Piggin, Paul Burton

This series fixes a few issues with CONFIG_LD_DEAD_CODE_DATA_ELIMINATION
and then enables it, along with CONFIG_THIN_ARCHIVES, for MIPS. This
leads to a typical generic kernel build becoming ~5% smaller:

  add/remove: 0/3028 grow/shrink: 1/14 up/down: 18/-457362 (-457344)
  ...
  Total: Before=9001030, After=8543686, chg -5.08%

Applies atop v4.9-rc1.


Paul Burton (6):
  kbuild: Keep device tree tables though dead code elimination
  kbuild: Keep .init.setup section through dead code elimination
  kbuild: Keep PCI fixups through dead code elimination
  kbuild: Keep earlycon table through dead code elimination
  MIPS: Ensure bss section ends on a long-aligned address
  MIPS: Use thin archives & dead code elimination

 arch/mips/Kconfig                 |  2 ++
 arch/mips/kernel/vmlinux.lds.S    |  7 ++++---
 include/asm-generic/vmlinux.lds.h | 24 ++++++++++++------------
 3 files changed, 18 insertions(+), 15 deletions(-)

-- 
2.10.0

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

* [PATCH 1/6] kbuild: Keep device tree tables though dead code elimination
  2016-10-20 20:26 [PATCH 0/6] MIPS: Use thin archives & dead code elimination Paul Burton
  2016-10-20 20:26 ` Paul Burton
@ 2016-10-20 20:27 ` Paul Burton
  2016-10-20 20:27   ` Paul Burton
  2016-10-21  9:33   ` Sergei Shtylyov
  2016-10-20 20:27 ` [PATCH 2/6] kbuild: Keep .init.setup section through " Paul Burton
                   ` (5 subsequent siblings)
  7 siblings, 2 replies; 23+ messages in thread
From: Paul Burton @ 2016-10-20 20:27 UTC (permalink / raw)
  To: linux-mips; +Cc: Ralf Baechle, Nicholas Piggin, Paul Burton

When CONFIG_LD_DEAD_CODE_DATA_ELIMINATION is enabled we must ensure that
we still keep the device tree tables, otherwise we end up unable to
probe drivers on systems that do so using device tree & we throw away
the bulk of those drivers because they cease to be referenced.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: Nicholas Piggin <npiggin@gmail.com>
---

 include/asm-generic/vmlinux.lds.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index 3074796..b648d97 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -169,8 +169,8 @@
 #define _OF_TABLE_1(name)						\
 	. = ALIGN(8);							\
 	VMLINUX_SYMBOL(__##name##_of_table) = .;			\
-	*(__##name##_of_table)						\
-	*(__##name##_of_table_end)
+	KEEP(*(__##name##_of_table))					\
+	KEEP(*(__##name##_of_table_end))
 
 #define CLKSRC_OF_TABLES()	OF_TABLE(CONFIG_CLKSRC_OF, clksrc)
 #define IRQCHIP_OF_MATCH_TABLE() OF_TABLE(CONFIG_IRQCHIP, irqchip)
-- 
2.10.0

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

* [PATCH 1/6] kbuild: Keep device tree tables though dead code elimination
  2016-10-20 20:27 ` [PATCH 1/6] kbuild: Keep device tree tables though " Paul Burton
@ 2016-10-20 20:27   ` Paul Burton
  2016-10-21  9:33   ` Sergei Shtylyov
  1 sibling, 0 replies; 23+ messages in thread
From: Paul Burton @ 2016-10-20 20:27 UTC (permalink / raw)
  To: linux-mips; +Cc: Ralf Baechle, Nicholas Piggin, Paul Burton

When CONFIG_LD_DEAD_CODE_DATA_ELIMINATION is enabled we must ensure that
we still keep the device tree tables, otherwise we end up unable to
probe drivers on systems that do so using device tree & we throw away
the bulk of those drivers because they cease to be referenced.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: Nicholas Piggin <npiggin@gmail.com>
---

 include/asm-generic/vmlinux.lds.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index 3074796..b648d97 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -169,8 +169,8 @@
 #define _OF_TABLE_1(name)						\
 	. = ALIGN(8);							\
 	VMLINUX_SYMBOL(__##name##_of_table) = .;			\
-	*(__##name##_of_table)						\
-	*(__##name##_of_table_end)
+	KEEP(*(__##name##_of_table))					\
+	KEEP(*(__##name##_of_table_end))
 
 #define CLKSRC_OF_TABLES()	OF_TABLE(CONFIG_CLKSRC_OF, clksrc)
 #define IRQCHIP_OF_MATCH_TABLE() OF_TABLE(CONFIG_IRQCHIP, irqchip)
-- 
2.10.0

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

* [PATCH 2/6] kbuild: Keep .init.setup section through dead code elimination
  2016-10-20 20:26 [PATCH 0/6] MIPS: Use thin archives & dead code elimination Paul Burton
  2016-10-20 20:26 ` Paul Burton
  2016-10-20 20:27 ` [PATCH 1/6] kbuild: Keep device tree tables though " Paul Burton
@ 2016-10-20 20:27 ` Paul Burton
  2016-10-20 20:27   ` Paul Burton
  2016-10-20 20:27 ` [PATCH 3/6] kbuild: Keep PCI fixups " Paul Burton
                   ` (4 subsequent siblings)
  7 siblings, 1 reply; 23+ messages in thread
From: Paul Burton @ 2016-10-20 20:27 UTC (permalink / raw)
  To: linux-mips; +Cc: Ralf Baechle, Nicholas Piggin, Paul Burton

With CONFIG_LD_DEAD_CODE_DATA_ELIMINATION we must keep the .init.setup
section or we'll throw away support for kernel parameters.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: Nicholas Piggin <npiggin@gmail.com>
---

 include/asm-generic/vmlinux.lds.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index b648d97..06673d6 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -688,7 +688,7 @@
 #define INIT_SETUP(initsetup_align)					\
 		. = ALIGN(initsetup_align);				\
 		VMLINUX_SYMBOL(__setup_start) = .;			\
-		*(.init.setup)						\
+		KEEP(*(.init.setup))					\
 		VMLINUX_SYMBOL(__setup_end) = .;
 
 #define INIT_CALLS_LEVEL(level)						\
-- 
2.10.0

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

* [PATCH 2/6] kbuild: Keep .init.setup section through dead code elimination
  2016-10-20 20:27 ` [PATCH 2/6] kbuild: Keep .init.setup section through " Paul Burton
@ 2016-10-20 20:27   ` Paul Burton
  0 siblings, 0 replies; 23+ messages in thread
From: Paul Burton @ 2016-10-20 20:27 UTC (permalink / raw)
  To: linux-mips; +Cc: Ralf Baechle, Nicholas Piggin, Paul Burton

With CONFIG_LD_DEAD_CODE_DATA_ELIMINATION we must keep the .init.setup
section or we'll throw away support for kernel parameters.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: Nicholas Piggin <npiggin@gmail.com>
---

 include/asm-generic/vmlinux.lds.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index b648d97..06673d6 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -688,7 +688,7 @@
 #define INIT_SETUP(initsetup_align)					\
 		. = ALIGN(initsetup_align);				\
 		VMLINUX_SYMBOL(__setup_start) = .;			\
-		*(.init.setup)						\
+		KEEP(*(.init.setup))					\
 		VMLINUX_SYMBOL(__setup_end) = .;
 
 #define INIT_CALLS_LEVEL(level)						\
-- 
2.10.0

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

* [PATCH 3/6] kbuild: Keep PCI fixups through dead code elimination
  2016-10-20 20:26 [PATCH 0/6] MIPS: Use thin archives & dead code elimination Paul Burton
                   ` (2 preceding siblings ...)
  2016-10-20 20:27 ` [PATCH 2/6] kbuild: Keep .init.setup section through " Paul Burton
@ 2016-10-20 20:27 ` Paul Burton
  2016-10-20 20:27   ` Paul Burton
  2016-10-20 20:27 ` [PATCH 4/6] kbuild: Keep earlycon table " Paul Burton
                   ` (3 subsequent siblings)
  7 siblings, 1 reply; 23+ messages in thread
From: Paul Burton @ 2016-10-20 20:27 UTC (permalink / raw)
  To: linux-mips; +Cc: Ralf Baechle, Nicholas Piggin, Paul Burton

With CONFIG_LD_DEAD_CODE_DATA_ELIMINATION enabled we must ensure that we
keep PCI fixups or they will be discarded during the link & we'll lose
support for any PCI fixups.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: Nicholas Piggin <npiggin@gmail.com>
---

 include/asm-generic/vmlinux.lds.h | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index 06673d6..e710593 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -288,28 +288,28 @@
 	/* PCI quirks */						\
 	.pci_fixup        : AT(ADDR(.pci_fixup) - LOAD_OFFSET) {	\
 		VMLINUX_SYMBOL(__start_pci_fixups_early) = .;		\
-		*(.pci_fixup_early)					\
+		KEEP(*(.pci_fixup_early))				\
 		VMLINUX_SYMBOL(__end_pci_fixups_early) = .;		\
 		VMLINUX_SYMBOL(__start_pci_fixups_header) = .;		\
-		*(.pci_fixup_header)					\
+		KEEP(*(.pci_fixup_header))				\
 		VMLINUX_SYMBOL(__end_pci_fixups_header) = .;		\
 		VMLINUX_SYMBOL(__start_pci_fixups_final) = .;		\
-		*(.pci_fixup_final)					\
+		KEEP(*(.pci_fixup_final))				\
 		VMLINUX_SYMBOL(__end_pci_fixups_final) = .;		\
 		VMLINUX_SYMBOL(__start_pci_fixups_enable) = .;		\
-		*(.pci_fixup_enable)					\
+		KEEP(*(.pci_fixup_enable))				\
 		VMLINUX_SYMBOL(__end_pci_fixups_enable) = .;		\
 		VMLINUX_SYMBOL(__start_pci_fixups_resume) = .;		\
-		*(.pci_fixup_resume)					\
+		KEEP(*(.pci_fixup_resume))				\
 		VMLINUX_SYMBOL(__end_pci_fixups_resume) = .;		\
 		VMLINUX_SYMBOL(__start_pci_fixups_resume_early) = .;	\
-		*(.pci_fixup_resume_early)				\
+		KEEP(*(.pci_fixup_resume_early))			\
 		VMLINUX_SYMBOL(__end_pci_fixups_resume_early) = .;	\
 		VMLINUX_SYMBOL(__start_pci_fixups_suspend) = .;		\
-		*(.pci_fixup_suspend)					\
+		KEEP(*(.pci_fixup_suspend))				\
 		VMLINUX_SYMBOL(__end_pci_fixups_suspend) = .;		\
 		VMLINUX_SYMBOL(__start_pci_fixups_suspend_late) = .;	\
-		*(.pci_fixup_suspend_late)				\
+		KEEP(*(.pci_fixup_suspend_late))			\
 		VMLINUX_SYMBOL(__end_pci_fixups_suspend_late) = .;	\
 	}								\
 									\
-- 
2.10.0

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

* [PATCH 3/6] kbuild: Keep PCI fixups through dead code elimination
  2016-10-20 20:27 ` [PATCH 3/6] kbuild: Keep PCI fixups " Paul Burton
@ 2016-10-20 20:27   ` Paul Burton
  0 siblings, 0 replies; 23+ messages in thread
From: Paul Burton @ 2016-10-20 20:27 UTC (permalink / raw)
  To: linux-mips; +Cc: Ralf Baechle, Nicholas Piggin, Paul Burton

With CONFIG_LD_DEAD_CODE_DATA_ELIMINATION enabled we must ensure that we
keep PCI fixups or they will be discarded during the link & we'll lose
support for any PCI fixups.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: Nicholas Piggin <npiggin@gmail.com>
---

 include/asm-generic/vmlinux.lds.h | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index 06673d6..e710593 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -288,28 +288,28 @@
 	/* PCI quirks */						\
 	.pci_fixup        : AT(ADDR(.pci_fixup) - LOAD_OFFSET) {	\
 		VMLINUX_SYMBOL(__start_pci_fixups_early) = .;		\
-		*(.pci_fixup_early)					\
+		KEEP(*(.pci_fixup_early))				\
 		VMLINUX_SYMBOL(__end_pci_fixups_early) = .;		\
 		VMLINUX_SYMBOL(__start_pci_fixups_header) = .;		\
-		*(.pci_fixup_header)					\
+		KEEP(*(.pci_fixup_header))				\
 		VMLINUX_SYMBOL(__end_pci_fixups_header) = .;		\
 		VMLINUX_SYMBOL(__start_pci_fixups_final) = .;		\
-		*(.pci_fixup_final)					\
+		KEEP(*(.pci_fixup_final))				\
 		VMLINUX_SYMBOL(__end_pci_fixups_final) = .;		\
 		VMLINUX_SYMBOL(__start_pci_fixups_enable) = .;		\
-		*(.pci_fixup_enable)					\
+		KEEP(*(.pci_fixup_enable))				\
 		VMLINUX_SYMBOL(__end_pci_fixups_enable) = .;		\
 		VMLINUX_SYMBOL(__start_pci_fixups_resume) = .;		\
-		*(.pci_fixup_resume)					\
+		KEEP(*(.pci_fixup_resume))				\
 		VMLINUX_SYMBOL(__end_pci_fixups_resume) = .;		\
 		VMLINUX_SYMBOL(__start_pci_fixups_resume_early) = .;	\
-		*(.pci_fixup_resume_early)				\
+		KEEP(*(.pci_fixup_resume_early))			\
 		VMLINUX_SYMBOL(__end_pci_fixups_resume_early) = .;	\
 		VMLINUX_SYMBOL(__start_pci_fixups_suspend) = .;		\
-		*(.pci_fixup_suspend)					\
+		KEEP(*(.pci_fixup_suspend))				\
 		VMLINUX_SYMBOL(__end_pci_fixups_suspend) = .;		\
 		VMLINUX_SYMBOL(__start_pci_fixups_suspend_late) = .;	\
-		*(.pci_fixup_suspend_late)				\
+		KEEP(*(.pci_fixup_suspend_late))			\
 		VMLINUX_SYMBOL(__end_pci_fixups_suspend_late) = .;	\
 	}								\
 									\
-- 
2.10.0

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

* [PATCH 4/6] kbuild: Keep earlycon table through dead code elimination
  2016-10-20 20:26 [PATCH 0/6] MIPS: Use thin archives & dead code elimination Paul Burton
                   ` (3 preceding siblings ...)
  2016-10-20 20:27 ` [PATCH 3/6] kbuild: Keep PCI fixups " Paul Burton
@ 2016-10-20 20:27 ` Paul Burton
  2016-10-20 20:27   ` Paul Burton
  2016-10-20 20:27 ` [PATCH 5/6] MIPS: Ensure bss section ends on a long-aligned address Paul Burton
                   ` (2 subsequent siblings)
  7 siblings, 1 reply; 23+ messages in thread
From: Paul Burton @ 2016-10-20 20:27 UTC (permalink / raw)
  To: linux-mips; +Cc: Ralf Baechle, Nicholas Piggin, Paul Burton

With CONFIG_LD_DEAD_CODE_DATA_ELIMINATION enabled we must ensure that we
keep the earlycon table or we discard all entries leading to no earlycon
devices being found.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: Nicholas Piggin <npiggin@gmail.com>
---

 include/asm-generic/vmlinux.lds.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index e710593..abe79e3 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -156,7 +156,7 @@
 #ifdef CONFIG_SERIAL_EARLYCON
 #define EARLYCON_TABLE() STRUCT_ALIGN();			\
 			 VMLINUX_SYMBOL(__earlycon_table) = .;	\
-			 *(__earlycon_table)			\
+			 KEEP(*(__earlycon_table))		\
 			 VMLINUX_SYMBOL(__earlycon_table_end) = .;
 #else
 #define EARLYCON_TABLE()
-- 
2.10.0

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

* [PATCH 4/6] kbuild: Keep earlycon table through dead code elimination
  2016-10-20 20:27 ` [PATCH 4/6] kbuild: Keep earlycon table " Paul Burton
@ 2016-10-20 20:27   ` Paul Burton
  0 siblings, 0 replies; 23+ messages in thread
From: Paul Burton @ 2016-10-20 20:27 UTC (permalink / raw)
  To: linux-mips; +Cc: Ralf Baechle, Nicholas Piggin, Paul Burton

With CONFIG_LD_DEAD_CODE_DATA_ELIMINATION enabled we must ensure that we
keep the earlycon table or we discard all entries leading to no earlycon
devices being found.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: Nicholas Piggin <npiggin@gmail.com>
---

 include/asm-generic/vmlinux.lds.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index e710593..abe79e3 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -156,7 +156,7 @@
 #ifdef CONFIG_SERIAL_EARLYCON
 #define EARLYCON_TABLE() STRUCT_ALIGN();			\
 			 VMLINUX_SYMBOL(__earlycon_table) = .;	\
-			 *(__earlycon_table)			\
+			 KEEP(*(__earlycon_table))		\
 			 VMLINUX_SYMBOL(__earlycon_table_end) = .;
 #else
 #define EARLYCON_TABLE()
-- 
2.10.0

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

* [PATCH 5/6] MIPS: Ensure bss section ends on a long-aligned address
  2016-10-20 20:26 [PATCH 0/6] MIPS: Use thin archives & dead code elimination Paul Burton
                   ` (4 preceding siblings ...)
  2016-10-20 20:27 ` [PATCH 4/6] kbuild: Keep earlycon table " Paul Burton
@ 2016-10-20 20:27 ` Paul Burton
  2016-10-20 20:27   ` Paul Burton
  2016-11-04  8:46   ` Marcin Nowakowski
  2016-10-20 20:27 ` [PATCH 6/6] MIPS: Use thin archives & dead code elimination Paul Burton
  2016-10-21  0:51 ` [PATCH 0/6] " Nicholas Piggin
  7 siblings, 2 replies; 23+ messages in thread
From: Paul Burton @ 2016-10-20 20:27 UTC (permalink / raw)
  To: linux-mips; +Cc: Ralf Baechle, Nicholas Piggin, Paul Burton

When clearing the .bss section in kernel_entry we do so using LONG_S
instructions, and branch whilst the current write address doesn't equal
the end of the .bss section minus the size of a long integer. The .bss
section always begins at a long-aligned address and we always increment
the write pointer by the size of a long integer - we therefore rely upon
the .bss section ending at a long-aligned address. If this is not the
case then the long-aligned write address can never be equal to the
non-long-aligned end address & we will continue to increment past the
end of the .bss section, attempting to zero the rest of memory.

Despite this requirement that .bss end at a long-aligned address we pass
0 as the end alignment requirement to the BSS_SECTION macro and thus
don't guarantee any particular alignment, allowing us to hit the error
condition described above.

Fix this by instead passing LONGSIZE as the end alignment argument to
the BSS_SECTION macro.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: linux-mips@linux-mips.org
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Nicholas Piggin <npiggin@gmail.com>
---

 arch/mips/kernel/vmlinux.lds.S | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/mips/kernel/vmlinux.lds.S b/arch/mips/kernel/vmlinux.lds.S
index d5de675..d1f5401 100644
--- a/arch/mips/kernel/vmlinux.lds.S
+++ b/arch/mips/kernel/vmlinux.lds.S
@@ -1,3 +1,4 @@
+#include <asm/asm.h>
 #include <asm/asm-offsets.h>
 #include <asm/thread_info.h>
 
@@ -182,7 +183,7 @@ SECTIONS
 	 * Force .bss to 64K alignment so that .bss..swapper_pg_dir
 	 * gets that alignment.	 .sbss should be empty, so there will be
 	 * no holes after __init_end. */
-	BSS_SECTION(0, 0x10000, 0)
+	BSS_SECTION(0, 0x10000, LONGSIZE)
 
 	_end = . ;
 
-- 
2.10.0

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

* [PATCH 5/6] MIPS: Ensure bss section ends on a long-aligned address
  2016-10-20 20:27 ` [PATCH 5/6] MIPS: Ensure bss section ends on a long-aligned address Paul Burton
@ 2016-10-20 20:27   ` Paul Burton
  2016-11-04  8:46   ` Marcin Nowakowski
  1 sibling, 0 replies; 23+ messages in thread
From: Paul Burton @ 2016-10-20 20:27 UTC (permalink / raw)
  To: linux-mips; +Cc: Ralf Baechle, Nicholas Piggin, Paul Burton

When clearing the .bss section in kernel_entry we do so using LONG_S
instructions, and branch whilst the current write address doesn't equal
the end of the .bss section minus the size of a long integer. The .bss
section always begins at a long-aligned address and we always increment
the write pointer by the size of a long integer - we therefore rely upon
the .bss section ending at a long-aligned address. If this is not the
case then the long-aligned write address can never be equal to the
non-long-aligned end address & we will continue to increment past the
end of the .bss section, attempting to zero the rest of memory.

Despite this requirement that .bss end at a long-aligned address we pass
0 as the end alignment requirement to the BSS_SECTION macro and thus
don't guarantee any particular alignment, allowing us to hit the error
condition described above.

Fix this by instead passing LONGSIZE as the end alignment argument to
the BSS_SECTION macro.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: linux-mips@linux-mips.org
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Nicholas Piggin <npiggin@gmail.com>
---

 arch/mips/kernel/vmlinux.lds.S | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/mips/kernel/vmlinux.lds.S b/arch/mips/kernel/vmlinux.lds.S
index d5de675..d1f5401 100644
--- a/arch/mips/kernel/vmlinux.lds.S
+++ b/arch/mips/kernel/vmlinux.lds.S
@@ -1,3 +1,4 @@
+#include <asm/asm.h>
 #include <asm/asm-offsets.h>
 #include <asm/thread_info.h>
 
@@ -182,7 +183,7 @@ SECTIONS
 	 * Force .bss to 64K alignment so that .bss..swapper_pg_dir
 	 * gets that alignment.	 .sbss should be empty, so there will be
 	 * no holes after __init_end. */
-	BSS_SECTION(0, 0x10000, 0)
+	BSS_SECTION(0, 0x10000, LONGSIZE)
 
 	_end = . ;
 
-- 
2.10.0

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

* [PATCH 6/6] MIPS: Use thin archives & dead code elimination
  2016-10-20 20:26 [PATCH 0/6] MIPS: Use thin archives & dead code elimination Paul Burton
                   ` (5 preceding siblings ...)
  2016-10-20 20:27 ` [PATCH 5/6] MIPS: Ensure bss section ends on a long-aligned address Paul Burton
@ 2016-10-20 20:27 ` Paul Burton
  2016-10-20 20:27   ` Paul Burton
  2016-10-21  0:51 ` [PATCH 0/6] " Nicholas Piggin
  7 siblings, 1 reply; 23+ messages in thread
From: Paul Burton @ 2016-10-20 20:27 UTC (permalink / raw)
  To: linux-mips; +Cc: Ralf Baechle, Nicholas Piggin, Paul Burton

Enable CONFIG_THIN_ARCHIVES & CONFIG_LD_DEAD_CODE_DATA_ELIMINATION for
MIPS, ensuring that we keep the data bus exception table & the machine
list which would be discarded without marking them with KEEP.

This shrinks a typical generic kernel build with drivers enabled for
Boston, Ci40 & SEAD-3 by around 5%, or ~450kb. As reported by
bloat-o-meter:

  add/remove: 0/3028 grow/shrink: 1/14 up/down: 18/-457362 (-457344)
  ...
  Total: Before=9001030, After=8543686, chg -5.08%

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: linux-mips@linux-mips.org
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Nicholas Piggin <npiggin@gmail.com>

---

 arch/mips/Kconfig              | 2 ++
 arch/mips/kernel/vmlinux.lds.S | 4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index b3c5bde..8557667 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -66,6 +66,8 @@ config MIPS
 	select HAVE_EXIT_THREAD
 	select HAVE_REGS_AND_STACK_ACCESS_API
 	select HAVE_ARCH_HARDENED_USERCOPY
+	select THIN_ARCHIVES
+	select LD_DEAD_CODE_DATA_ELIMINATION
 
 menu "Machine selection"
 
diff --git a/arch/mips/kernel/vmlinux.lds.S b/arch/mips/kernel/vmlinux.lds.S
index d1f5401..a43ba2a 100644
--- a/arch/mips/kernel/vmlinux.lds.S
+++ b/arch/mips/kernel/vmlinux.lds.S
@@ -72,7 +72,7 @@ SECTIONS
 	/* Exception table for data bus errors */
 	__dbe_table : {
 		__start___dbe_table = .;
-		*(__dbe_table)
+		KEEP(*(__dbe_table))
 		__stop___dbe_table = .;
 	}
 
@@ -122,7 +122,7 @@ SECTIONS
 	. = ALIGN(4);
 	.mips.machines.init : AT(ADDR(.mips.machines.init) - LOAD_OFFSET) {
 		__mips_machines_start = .;
-		*(.mips.machines.init)
+		KEEP(*(.mips.machines.init))
 		__mips_machines_end = .;
 	}
 
-- 
2.10.0

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

* [PATCH 6/6] MIPS: Use thin archives & dead code elimination
  2016-10-20 20:27 ` [PATCH 6/6] MIPS: Use thin archives & dead code elimination Paul Burton
@ 2016-10-20 20:27   ` Paul Burton
  0 siblings, 0 replies; 23+ messages in thread
From: Paul Burton @ 2016-10-20 20:27 UTC (permalink / raw)
  To: linux-mips; +Cc: Ralf Baechle, Nicholas Piggin, Paul Burton

Enable CONFIG_THIN_ARCHIVES & CONFIG_LD_DEAD_CODE_DATA_ELIMINATION for
MIPS, ensuring that we keep the data bus exception table & the machine
list which would be discarded without marking them with KEEP.

This shrinks a typical generic kernel build with drivers enabled for
Boston, Ci40 & SEAD-3 by around 5%, or ~450kb. As reported by
bloat-o-meter:

  add/remove: 0/3028 grow/shrink: 1/14 up/down: 18/-457362 (-457344)
  ...
  Total: Before=9001030, After=8543686, chg -5.08%

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: linux-mips@linux-mips.org
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Nicholas Piggin <npiggin@gmail.com>

---

 arch/mips/Kconfig              | 2 ++
 arch/mips/kernel/vmlinux.lds.S | 4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index b3c5bde..8557667 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -66,6 +66,8 @@ config MIPS
 	select HAVE_EXIT_THREAD
 	select HAVE_REGS_AND_STACK_ACCESS_API
 	select HAVE_ARCH_HARDENED_USERCOPY
+	select THIN_ARCHIVES
+	select LD_DEAD_CODE_DATA_ELIMINATION
 
 menu "Machine selection"
 
diff --git a/arch/mips/kernel/vmlinux.lds.S b/arch/mips/kernel/vmlinux.lds.S
index d1f5401..a43ba2a 100644
--- a/arch/mips/kernel/vmlinux.lds.S
+++ b/arch/mips/kernel/vmlinux.lds.S
@@ -72,7 +72,7 @@ SECTIONS
 	/* Exception table for data bus errors */
 	__dbe_table : {
 		__start___dbe_table = .;
-		*(__dbe_table)
+		KEEP(*(__dbe_table))
 		__stop___dbe_table = .;
 	}
 
@@ -122,7 +122,7 @@ SECTIONS
 	. = ALIGN(4);
 	.mips.machines.init : AT(ADDR(.mips.machines.init) - LOAD_OFFSET) {
 		__mips_machines_start = .;
-		*(.mips.machines.init)
+		KEEP(*(.mips.machines.init))
 		__mips_machines_end = .;
 	}
 
-- 
2.10.0

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

* Re: [PATCH 0/6] MIPS: Use thin archives & dead code elimination
  2016-10-20 20:26 [PATCH 0/6] MIPS: Use thin archives & dead code elimination Paul Burton
                   ` (6 preceding siblings ...)
  2016-10-20 20:27 ` [PATCH 6/6] MIPS: Use thin archives & dead code elimination Paul Burton
@ 2016-10-21  0:51 ` Nicholas Piggin
  2016-10-21  0:51   ` Nicholas Piggin
  2016-10-21  7:45   ` Paul Burton
  7 siblings, 2 replies; 23+ messages in thread
From: Nicholas Piggin @ 2016-10-21  0:51 UTC (permalink / raw)
  To: Paul Burton; +Cc: linux-mips, Ralf Baechle

Hey Paul,

On Thu, 20 Oct 2016 21:26:59 +0100
Paul Burton <paul.burton@imgtec.com> wrote:

> This series fixes a few issues with CONFIG_LD_DEAD_CODE_DATA_ELIMINATION
> and then enables it, along with CONFIG_THIN_ARCHIVES, for MIPS. This
> leads to a typical generic kernel build becoming ~5% smaller:
> 
>   add/remove: 0/3028 grow/shrink: 1/14 up/down: 18/-457362 (-457344)
>   ...
>   Total: Before=9001030, After=8543686, chg -5.08%
> 
> Applies atop v4.9-rc1.


Very nice, and thanks for the kbuild fixes, I think they all look sane.

Let's try to get those kbuild fixes in through the kbuild tree first
(which has some other fixes required for 4.9). I can take them and send
them to kbuild maintainer if you like.

On powerpc we'll likely provide an option to select these manually for
4.9 because there has been the odd toolchain issue come up, so that's
something to consider.

For your linker script, you may consider putting the function sections
into the same input as other text. TEXT_TEXT does not include .text.*,
so mips's .text.* below it will catch those.

You may just open-code your TEXT_TEXT, and have:

*(.text.hot .text .text.fixup .text.unlikely .text.[0-9a-zA-Z_]*)

or similar.

Thanks,
Nick

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

* Re: [PATCH 0/6] MIPS: Use thin archives & dead code elimination
  2016-10-21  0:51 ` [PATCH 0/6] " Nicholas Piggin
@ 2016-10-21  0:51   ` Nicholas Piggin
  2016-10-21  7:45   ` Paul Burton
  1 sibling, 0 replies; 23+ messages in thread
From: Nicholas Piggin @ 2016-10-21  0:51 UTC (permalink / raw)
  To: Paul Burton; +Cc: linux-mips, Ralf Baechle

Hey Paul,

On Thu, 20 Oct 2016 21:26:59 +0100
Paul Burton <paul.burton@imgtec.com> wrote:

> This series fixes a few issues with CONFIG_LD_DEAD_CODE_DATA_ELIMINATION
> and then enables it, along with CONFIG_THIN_ARCHIVES, for MIPS. This
> leads to a typical generic kernel build becoming ~5% smaller:
> 
>   add/remove: 0/3028 grow/shrink: 1/14 up/down: 18/-457362 (-457344)
>   ...
>   Total: Before=9001030, After=8543686, chg -5.08%
> 
> Applies atop v4.9-rc1.


Very nice, and thanks for the kbuild fixes, I think they all look sane.

Let's try to get those kbuild fixes in through the kbuild tree first
(which has some other fixes required for 4.9). I can take them and send
them to kbuild maintainer if you like.

On powerpc we'll likely provide an option to select these manually for
4.9 because there has been the odd toolchain issue come up, so that's
something to consider.

For your linker script, you may consider putting the function sections
into the same input as other text. TEXT_TEXT does not include .text.*,
so mips's .text.* below it will catch those.

You may just open-code your TEXT_TEXT, and have:

*(.text.hot .text .text.fixup .text.unlikely .text.[0-9a-zA-Z_]*)

or similar.

Thanks,
Nick

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

* Re: [PATCH 0/6] MIPS: Use thin archives & dead code elimination
  2016-10-21  0:51 ` [PATCH 0/6] " Nicholas Piggin
  2016-10-21  0:51   ` Nicholas Piggin
@ 2016-10-21  7:45   ` Paul Burton
  2016-10-21  7:45     ` Paul Burton
  2016-10-21  8:47     ` Nicholas Piggin
  1 sibling, 2 replies; 23+ messages in thread
From: Paul Burton @ 2016-10-21  7:45 UTC (permalink / raw)
  To: Nicholas Piggin; +Cc: linux-mips, Ralf Baechle

[-- Attachment #1: Type: text/plain, Size: 1625 bytes --]

Hi Nick,

On Friday, 21 October 2016 11:51:47 BST Nicholas Piggin wrote:
> Paul Burton <paul.burton@imgtec.com> wrote:
> > This series fixes a few issues with CONFIG_LD_DEAD_CODE_DATA_ELIMINATION
> > and then enables it, along with CONFIG_THIN_ARCHIVES, for MIPS. This
> > 
> > leads to a typical generic kernel build becoming ~5% smaller:
> >   add/remove: 0/3028 grow/shrink: 1/14 up/down: 18/-457362 (-457344)
> >   ...
> >   Total: Before=9001030, After=8543686, chg -5.08%
> > 
> > Applies atop v4.9-rc1.
> 
> Very nice, and thanks for the kbuild fixes, I think they all look sane.
> 
> Let's try to get those kbuild fixes in through the kbuild tree first
> (which has some other fixes required for 4.9). I can take them and send
> them to kbuild maintainer if you like.

That sounds great :)

> On powerpc we'll likely provide an option to select these manually for
> 4.9 because there has been the odd toolchain issue come up, so that's
> something to consider.

I imagine the MIPS bits will probably be v4.10 material, but hopefully Ralf 
can get them into -next as soon as possible after the kbuild bits are in, 
which should give us some time to discover any toolchain issues.

> For your linker script, you may consider putting the function sections
> into the same input as other text. TEXT_TEXT does not include .text.*,
> so mips's .text.* below it will catch those.
> 
> You may just open-code your TEXT_TEXT, and have:
> 
> *(.text.hot .text .text.fixup .text.unlikely .text.[0-9a-zA-Z_]*)
> 
> or similar.

Ah, so are you saying that would give the linker more scope for discarding 
things?

Thanks,
    Paul

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

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

* Re: [PATCH 0/6] MIPS: Use thin archives & dead code elimination
  2016-10-21  7:45   ` Paul Burton
@ 2016-10-21  7:45     ` Paul Burton
  2016-10-21  8:47     ` Nicholas Piggin
  1 sibling, 0 replies; 23+ messages in thread
From: Paul Burton @ 2016-10-21  7:45 UTC (permalink / raw)
  To: Nicholas Piggin; +Cc: linux-mips, Ralf Baechle

[-- Attachment #1: Type: text/plain, Size: 1625 bytes --]

Hi Nick,

On Friday, 21 October 2016 11:51:47 BST Nicholas Piggin wrote:
> Paul Burton <paul.burton@imgtec.com> wrote:
> > This series fixes a few issues with CONFIG_LD_DEAD_CODE_DATA_ELIMINATION
> > and then enables it, along with CONFIG_THIN_ARCHIVES, for MIPS. This
> > 
> > leads to a typical generic kernel build becoming ~5% smaller:
> >   add/remove: 0/3028 grow/shrink: 1/14 up/down: 18/-457362 (-457344)
> >   ...
> >   Total: Before=9001030, After=8543686, chg -5.08%
> > 
> > Applies atop v4.9-rc1.
> 
> Very nice, and thanks for the kbuild fixes, I think they all look sane.
> 
> Let's try to get those kbuild fixes in through the kbuild tree first
> (which has some other fixes required for 4.9). I can take them and send
> them to kbuild maintainer if you like.

That sounds great :)

> On powerpc we'll likely provide an option to select these manually for
> 4.9 because there has been the odd toolchain issue come up, so that's
> something to consider.

I imagine the MIPS bits will probably be v4.10 material, but hopefully Ralf 
can get them into -next as soon as possible after the kbuild bits are in, 
which should give us some time to discover any toolchain issues.

> For your linker script, you may consider putting the function sections
> into the same input as other text. TEXT_TEXT does not include .text.*,
> so mips's .text.* below it will catch those.
> 
> You may just open-code your TEXT_TEXT, and have:
> 
> *(.text.hot .text .text.fixup .text.unlikely .text.[0-9a-zA-Z_]*)
> 
> or similar.

Ah, so are you saying that would give the linker more scope for discarding 
things?

Thanks,
    Paul

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

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

* Re: [PATCH 0/6] MIPS: Use thin archives & dead code elimination
  2016-10-21  7:45   ` Paul Burton
  2016-10-21  7:45     ` Paul Burton
@ 2016-10-21  8:47     ` Nicholas Piggin
  2016-10-21  8:47       ` Nicholas Piggin
  1 sibling, 1 reply; 23+ messages in thread
From: Nicholas Piggin @ 2016-10-21  8:47 UTC (permalink / raw)
  To: Paul Burton; +Cc: linux-mips, Ralf Baechle

On Fri, 21 Oct 2016 08:45:47 +0100
Paul Burton <paul.burton@imgtec.com> wrote:

> Hi Nick,
> 
> On Friday, 21 October 2016 11:51:47 BST Nicholas Piggin wrote:
> > Paul Burton <paul.burton@imgtec.com> wrote:  
> > > This series fixes a few issues with CONFIG_LD_DEAD_CODE_DATA_ELIMINATION
> > > and then enables it, along with CONFIG_THIN_ARCHIVES, for MIPS. This
> > > 
> > > leads to a typical generic kernel build becoming ~5% smaller:
> > >   add/remove: 0/3028 grow/shrink: 1/14 up/down: 18/-457362 (-457344)
> > >   ...
> > >   Total: Before=9001030, After=8543686, chg -5.08%
> > > 
> > > Applies atop v4.9-rc1.  
> > 
> > Very nice, and thanks for the kbuild fixes, I think they all look sane.
> > 
> > Let's try to get those kbuild fixes in through the kbuild tree first
> > (which has some other fixes required for 4.9). I can take them and send
> > them to kbuild maintainer if you like.  
> 
> That sounds great :)
> 
> > On powerpc we'll likely provide an option to select these manually for
> > 4.9 because there has been the odd toolchain issue come up, so that's
> > something to consider.  
> 
> I imagine the MIPS bits will probably be v4.10 material, but hopefully Ralf 
> can get them into -next as soon as possible after the kbuild bits are in, 
> which should give us some time to discover any toolchain issues.

Okay, whatever works for you.


> > For your linker script, you may consider putting the function sections
> > into the same input as other text. TEXT_TEXT does not include .text.*,
> > so mips's .text.* below it will catch those.
> > 
> > You may just open-code your TEXT_TEXT, and have:
> > 
> > *(.text.hot .text .text.fixup .text.unlikely .text.[0-9a-zA-Z_]*)
> > 
> > or similar.  
> 
> Ah, so are you saying that would give the linker more scope for discarding 
> things?

I don't think discarding, but it will allow those sections to be placed
together with more scope for reordering. This can reduce the amount of
branch trampolines required.

Aside from that, it just gives less change in behaviour. Without
-ffunction-sections, those functions would be placed in .text section,
so you ideally want to keep them there when enabling it.

Thanks,
Nick

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

* Re: [PATCH 0/6] MIPS: Use thin archives & dead code elimination
  2016-10-21  8:47     ` Nicholas Piggin
@ 2016-10-21  8:47       ` Nicholas Piggin
  0 siblings, 0 replies; 23+ messages in thread
From: Nicholas Piggin @ 2016-10-21  8:47 UTC (permalink / raw)
  To: Paul Burton; +Cc: linux-mips, Ralf Baechle

On Fri, 21 Oct 2016 08:45:47 +0100
Paul Burton <paul.burton@imgtec.com> wrote:

> Hi Nick,
> 
> On Friday, 21 October 2016 11:51:47 BST Nicholas Piggin wrote:
> > Paul Burton <paul.burton@imgtec.com> wrote:  
> > > This series fixes a few issues with CONFIG_LD_DEAD_CODE_DATA_ELIMINATION
> > > and then enables it, along with CONFIG_THIN_ARCHIVES, for MIPS. This
> > > 
> > > leads to a typical generic kernel build becoming ~5% smaller:
> > >   add/remove: 0/3028 grow/shrink: 1/14 up/down: 18/-457362 (-457344)
> > >   ...
> > >   Total: Before=9001030, After=8543686, chg -5.08%
> > > 
> > > Applies atop v4.9-rc1.  
> > 
> > Very nice, and thanks for the kbuild fixes, I think they all look sane.
> > 
> > Let's try to get those kbuild fixes in through the kbuild tree first
> > (which has some other fixes required for 4.9). I can take them and send
> > them to kbuild maintainer if you like.  
> 
> That sounds great :)
> 
> > On powerpc we'll likely provide an option to select these manually for
> > 4.9 because there has been the odd toolchain issue come up, so that's
> > something to consider.  
> 
> I imagine the MIPS bits will probably be v4.10 material, but hopefully Ralf 
> can get them into -next as soon as possible after the kbuild bits are in, 
> which should give us some time to discover any toolchain issues.

Okay, whatever works for you.


> > For your linker script, you may consider putting the function sections
> > into the same input as other text. TEXT_TEXT does not include .text.*,
> > so mips's .text.* below it will catch those.
> > 
> > You may just open-code your TEXT_TEXT, and have:
> > 
> > *(.text.hot .text .text.fixup .text.unlikely .text.[0-9a-zA-Z_]*)
> > 
> > or similar.  
> 
> Ah, so are you saying that would give the linker more scope for discarding 
> things?

I don't think discarding, but it will allow those sections to be placed
together with more scope for reordering. This can reduce the amount of
branch trampolines required.

Aside from that, it just gives less change in behaviour. Without
-ffunction-sections, those functions would be placed in .text section,
so you ideally want to keep them there when enabling it.

Thanks,
Nick

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

* Re: [PATCH 1/6] kbuild: Keep device tree tables though dead code elimination
  2016-10-20 20:27 ` [PATCH 1/6] kbuild: Keep device tree tables though " Paul Burton
  2016-10-20 20:27   ` Paul Burton
@ 2016-10-21  9:33   ` Sergei Shtylyov
  1 sibling, 0 replies; 23+ messages in thread
From: Sergei Shtylyov @ 2016-10-21  9:33 UTC (permalink / raw)
  To: Paul Burton, linux-mips; +Cc: Ralf Baechle, Nicholas Piggin

Hello.

    s/though/through/ in the subject.

MBR, Sergei

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

* Re: [PATCH 5/6] MIPS: Ensure bss section ends on a long-aligned address
  2016-10-20 20:27 ` [PATCH 5/6] MIPS: Ensure bss section ends on a long-aligned address Paul Burton
  2016-10-20 20:27   ` Paul Burton
@ 2016-11-04  8:46   ` Marcin Nowakowski
  2016-11-04  8:46     ` Marcin Nowakowski
  1 sibling, 1 reply; 23+ messages in thread
From: Marcin Nowakowski @ 2016-11-04  8:46 UTC (permalink / raw)
  To: Paul Burton, linux-mips; +Cc: Ralf Baechle

Hi Paul,

On 20.10.2016 22:27, Paul Burton wrote:
> diff --git a/arch/mips/kernel/vmlinux.lds.S b/arch/mips/kernel/vmlinux.lds.S
> index d5de675..d1f5401 100644
> --- a/arch/mips/kernel/vmlinux.lds.S
> +++ b/arch/mips/kernel/vmlinux.lds.S
> @@ -1,3 +1,4 @@
> +#include <asm/asm.h>
>  #include <asm/asm-offsets.h>
>  #include <asm/thread_info.h>

This patch (and specifically including asm/asm.h) causes a build error 
when CONFIG_RELOCATABLE=y as there's a LONG() linker command that gets 
converted to '.[d]word' as a result of including the assembly macros ...

Marcin

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

* Re: [PATCH 5/6] MIPS: Ensure bss section ends on a long-aligned address
  2016-11-04  8:46   ` Marcin Nowakowski
@ 2016-11-04  8:46     ` Marcin Nowakowski
  0 siblings, 0 replies; 23+ messages in thread
From: Marcin Nowakowski @ 2016-11-04  8:46 UTC (permalink / raw)
  To: Paul Burton, linux-mips; +Cc: Ralf Baechle

Hi Paul,

On 20.10.2016 22:27, Paul Burton wrote:
> diff --git a/arch/mips/kernel/vmlinux.lds.S b/arch/mips/kernel/vmlinux.lds.S
> index d5de675..d1f5401 100644
> --- a/arch/mips/kernel/vmlinux.lds.S
> +++ b/arch/mips/kernel/vmlinux.lds.S
> @@ -1,3 +1,4 @@
> +#include <asm/asm.h>
>  #include <asm/asm-offsets.h>
>  #include <asm/thread_info.h>

This patch (and specifically including asm/asm.h) causes a build error 
when CONFIG_RELOCATABLE=y as there's a LONG() linker command that gets 
converted to '.[d]word' as a result of including the assembly macros ...

Marcin

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

end of thread, other threads:[~2016-11-04  8:46 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-20 20:26 [PATCH 0/6] MIPS: Use thin archives & dead code elimination Paul Burton
2016-10-20 20:26 ` Paul Burton
2016-10-20 20:27 ` [PATCH 1/6] kbuild: Keep device tree tables though " Paul Burton
2016-10-20 20:27   ` Paul Burton
2016-10-21  9:33   ` Sergei Shtylyov
2016-10-20 20:27 ` [PATCH 2/6] kbuild: Keep .init.setup section through " Paul Burton
2016-10-20 20:27   ` Paul Burton
2016-10-20 20:27 ` [PATCH 3/6] kbuild: Keep PCI fixups " Paul Burton
2016-10-20 20:27   ` Paul Burton
2016-10-20 20:27 ` [PATCH 4/6] kbuild: Keep earlycon table " Paul Burton
2016-10-20 20:27   ` Paul Burton
2016-10-20 20:27 ` [PATCH 5/6] MIPS: Ensure bss section ends on a long-aligned address Paul Burton
2016-10-20 20:27   ` Paul Burton
2016-11-04  8:46   ` Marcin Nowakowski
2016-11-04  8:46     ` Marcin Nowakowski
2016-10-20 20:27 ` [PATCH 6/6] MIPS: Use thin archives & dead code elimination Paul Burton
2016-10-20 20:27   ` Paul Burton
2016-10-21  0:51 ` [PATCH 0/6] " Nicholas Piggin
2016-10-21  0:51   ` Nicholas Piggin
2016-10-21  7:45   ` Paul Burton
2016-10-21  7:45     ` Paul Burton
2016-10-21  8:47     ` Nicholas Piggin
2016-10-21  8:47       ` Nicholas Piggin

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).