linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Various asmlinkage fixes for LTO
@ 2013-10-22 16:12 Andi Kleen
  2013-10-22 16:12 ` [PATCH 01/11] asmlinkage, kvm: Make kvm_rebooting visible Andi Kleen
                   ` (10 more replies)
  0 siblings, 11 replies; 26+ messages in thread
From: Andi Kleen @ 2013-10-22 16:12 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel

LTO (Link Time Optimization) requires all C symbols used from
assembler to be marked visible. This patchkit marks various
functions over the tree asmlinkage or __visible, when they
are used by assembler.

-Andi

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

* [PATCH 01/11] asmlinkage, kvm: Make kvm_rebooting visible
  2013-10-22 16:12 Various asmlinkage fixes for LTO Andi Kleen
@ 2013-10-22 16:12 ` Andi Kleen
  2013-10-30  9:27   ` Gleb Natapov
  2013-10-22 16:12 ` [PATCH 02/11] asmlinkage: Make __iowrite32_copy visible Andi Kleen
                   ` (9 subsequent siblings)
  10 siblings, 1 reply; 26+ messages in thread
From: Andi Kleen @ 2013-10-22 16:12 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel, Andi Kleen, gleb, pbonzini, kvm

From: Andi Kleen <ak@linux.intel.com>

kvm_rebooting is referenced from assembler code, thus
needs to be visible.

Cc: gleb@redhat.com
Cc: pbonzini@redhat.com
Cc: kvm@vger.kernel.org
Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
 virt/kvm/kvm_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index a9dd682..6ca3564 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -95,7 +95,7 @@ static void hardware_disable_all(void);
 
 static void kvm_io_bus_destroy(struct kvm_io_bus *bus);
 
-bool kvm_rebooting;
+__visible bool kvm_rebooting;
 EXPORT_SYMBOL_GPL(kvm_rebooting);
 
 static bool largepages_enabled = true;
-- 
1.8.3.1


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

* [PATCH 02/11] asmlinkage: Make __iowrite32_copy visible
  2013-10-22 16:12 Various asmlinkage fixes for LTO Andi Kleen
  2013-10-22 16:12 ` [PATCH 01/11] asmlinkage, kvm: Make kvm_rebooting visible Andi Kleen
@ 2013-10-22 16:12 ` Andi Kleen
  2013-10-26 10:02   ` Ingo Molnar
  2013-10-22 16:12 ` [PATCH 03/11] asmlinkage: Make jiffies visible Andi Kleen
                   ` (8 subsequent siblings)
  10 siblings, 1 reply; 26+ messages in thread
From: Andi Kleen @ 2013-10-22 16:12 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel, Andi Kleen, x86

From: Andi Kleen <ak@linux.intel.com>

This is a assembler function on x86, so it should be visible.

Cc: x86@kernel.org
Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
 include/linux/io.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/io.h b/include/linux/io.h
index f4f42fa..8a18e75 100644
--- a/include/linux/io.h
+++ b/include/linux/io.h
@@ -24,7 +24,7 @@
 
 struct device;
 
-void __iowrite32_copy(void __iomem *to, const void *from, size_t count);
+__visible void __iowrite32_copy(void __iomem *to, const void *from, size_t count);
 void __iowrite64_copy(void __iomem *to, const void *from, size_t count);
 
 #ifdef CONFIG_MMU
-- 
1.8.3.1


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

* [PATCH 03/11] asmlinkage: Make jiffies visible
  2013-10-22 16:12 Various asmlinkage fixes for LTO Andi Kleen
  2013-10-22 16:12 ` [PATCH 01/11] asmlinkage, kvm: Make kvm_rebooting visible Andi Kleen
  2013-10-22 16:12 ` [PATCH 02/11] asmlinkage: Make __iowrite32_copy visible Andi Kleen
@ 2013-10-22 16:12 ` Andi Kleen
  2013-10-22 16:12 ` [PATCH 04/11] asmlinkage, pnp: Make variables used from assembler code visible Andi Kleen
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 26+ messages in thread
From: Andi Kleen @ 2013-10-22 16:12 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel, Andi Kleen, x86

From: Andi Kleen <ak@linux.intel.com>

Jiffies is referenced by the linker script, so it has to be visible.

Handled both the generic and the x86 version.

Cc: x86@kernel.org
Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
 arch/x86/kernel/time.c | 2 +-
 kernel/timer.c         | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/time.c b/arch/x86/kernel/time.c
index 24d3c91..6ec91c0 100644
--- a/arch/x86/kernel/time.c
+++ b/arch/x86/kernel/time.c
@@ -23,7 +23,7 @@
 #include <asm/time.h>
 
 #ifdef CONFIG_X86_64
-DEFINE_VVAR(volatile unsigned long, jiffies) = INITIAL_JIFFIES;
+__visible DEFINE_VVAR(volatile unsigned long, jiffies) = INITIAL_JIFFIES;
 #endif
 
 unsigned long profile_pc(struct pt_regs *regs)
diff --git a/kernel/timer.c b/kernel/timer.c
index 4296d13..a3ae2da 100644
--- a/kernel/timer.c
+++ b/kernel/timer.c
@@ -52,7 +52,7 @@
 #define CREATE_TRACE_POINTS
 #include <trace/events/timer.h>
 
-u64 jiffies_64 __cacheline_aligned_in_smp = INITIAL_JIFFIES;
+__visible u64 jiffies_64 __cacheline_aligned_in_smp = INITIAL_JIFFIES;
 
 EXPORT_SYMBOL(jiffies_64);
 
-- 
1.8.3.1


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

* [PATCH 04/11] asmlinkage, pnp: Make variables used from assembler code visible
  2013-10-22 16:12 Various asmlinkage fixes for LTO Andi Kleen
                   ` (2 preceding siblings ...)
  2013-10-22 16:12 ` [PATCH 03/11] asmlinkage: Make jiffies visible Andi Kleen
@ 2013-10-22 16:12 ` Andi Kleen
  2013-10-22 16:12 ` [PATCH 05/11] asmlinkage: Make lockdep_sys_exit asmlinkage Andi Kleen
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 26+ messages in thread
From: Andi Kleen @ 2013-10-22 16:12 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel, Andi Kleen, perex

From: Andi Kleen <ak@linux.intel.com>

Mark variables referenced from assembler files visible.

This fixes compile problems with LTO

Cc: perex@perex.cz
Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
 drivers/pnp/pnpbios/bioscalls.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/pnp/pnpbios/bioscalls.c b/drivers/pnp/pnpbios/bioscalls.c
index 769d265..deb7f4b 100644
--- a/drivers/pnp/pnpbios/bioscalls.c
+++ b/drivers/pnp/pnpbios/bioscalls.c
@@ -21,7 +21,7 @@
 
 #include "pnpbios.h"
 
-static struct {
+__visible struct {
 	u16 offset;
 	u16 segment;
 } pnp_bios_callpoint;
@@ -41,6 +41,7 @@ asmlinkage void pnp_bios_callfunc(void);
 
 __asm__(".text			\n"
 	__ALIGN_STR "\n"
+	".globl pnp_bios_callfunc\n"
 	"pnp_bios_callfunc:\n"
 	"	pushl %edx	\n"
 	"	pushl %ecx	\n"
@@ -66,9 +67,9 @@ static struct desc_struct bad_bios_desc = GDT_ENTRY_INIT(0x4092,
  * after PnP BIOS oopses.
  */
 
-u32 pnp_bios_fault_esp;
-u32 pnp_bios_fault_eip;
-u32 pnp_bios_is_utter_crap = 0;
+__visible u32 pnp_bios_fault_esp;
+__visible u32 pnp_bios_fault_eip;
+__visible u32 pnp_bios_is_utter_crap = 0;
 
 static spinlock_t pnp_bios_lock;
 
-- 
1.8.3.1


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

* [PATCH 05/11] asmlinkage: Make lockdep_sys_exit asmlinkage
  2013-10-22 16:12 Various asmlinkage fixes for LTO Andi Kleen
                   ` (3 preceding siblings ...)
  2013-10-22 16:12 ` [PATCH 04/11] asmlinkage, pnp: Make variables used from assembler code visible Andi Kleen
@ 2013-10-22 16:12 ` Andi Kleen
  2013-10-22 16:12 ` [PATCH 06/11] asmlinkage: Make trace_hardirq visible Andi Kleen
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 26+ messages in thread
From: Andi Kleen @ 2013-10-22 16:12 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel, Andi Kleen, peterz, mingo

From: Andi Kleen <ak@linux.intel.com>

lockdep_sys_exit can be called from assembler code, so make it
asmlinkage

Cc: peterz@infradead.org
Cc: mingo@kernel.org
Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
 include/linux/lockdep.h | 2 +-
 kernel/lockdep.c        | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h
index cfc2f11..18e19e4 100644
--- a/include/linux/lockdep.h
+++ b/include/linux/lockdep.h
@@ -265,7 +265,7 @@ extern void lockdep_info(void);
 extern void lockdep_reset(void);
 extern void lockdep_reset_lock(struct lockdep_map *lock);
 extern void lockdep_free_key_range(void *start, unsigned long size);
-extern void lockdep_sys_exit(void);
+extern asmlinkage void lockdep_sys_exit(void);
 
 extern void lockdep_off(void);
 extern void lockdep_on(void);
diff --git a/kernel/lockdep.c b/kernel/lockdep.c
index e16c45b..d3749fe 100644
--- a/kernel/lockdep.c
+++ b/kernel/lockdep.c
@@ -4187,7 +4187,7 @@ void debug_show_held_locks(struct task_struct *task)
 }
 EXPORT_SYMBOL_GPL(debug_show_held_locks);
 
-void lockdep_sys_exit(void)
+asmlinkage void lockdep_sys_exit(void)
 {
 	struct task_struct *curr = current;
 
-- 
1.8.3.1


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

* [PATCH 06/11] asmlinkage: Make trace_hardirq visible
  2013-10-22 16:12 Various asmlinkage fixes for LTO Andi Kleen
                   ` (4 preceding siblings ...)
  2013-10-22 16:12 ` [PATCH 05/11] asmlinkage: Make lockdep_sys_exit asmlinkage Andi Kleen
@ 2013-10-22 16:12 ` Andi Kleen
  2013-10-22 20:18   ` Peter Zijlstra
  2013-10-22 16:12 ` [PATCH 07/11] asmlinkage, module: Make ksymtab and kcrctab symbols and __this_module __visible Andi Kleen
                   ` (4 subsequent siblings)
  10 siblings, 1 reply; 26+ messages in thread
From: Andi Kleen @ 2013-10-22 16:12 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel, Andi Kleen, peterz, mingo

From: Andi Kleen <ak@linux.intel.com>

Can be called from assembler code.

Cc: peterz@infradead.org
Cc: mingo@kernel.org
Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
 kernel/lockdep.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/lockdep.c b/kernel/lockdep.c
index d3749fe..d1a047d 100644
--- a/kernel/lockdep.c
+++ b/kernel/lockdep.c
@@ -2555,7 +2555,7 @@ static void __trace_hardirqs_on_caller(unsigned long ip)
 	debug_atomic_inc(hardirqs_on_events);
 }
 
-void trace_hardirqs_on_caller(unsigned long ip)
+__visible void trace_hardirqs_on_caller(unsigned long ip)
 {
 	time_hardirqs_on(CALLER_ADDR0, ip);
 
@@ -2608,7 +2608,7 @@ EXPORT_SYMBOL(trace_hardirqs_on);
 /*
  * Hardirqs were disabled:
  */
-void trace_hardirqs_off_caller(unsigned long ip)
+__visible void trace_hardirqs_off_caller(unsigned long ip)
 {
 	struct task_struct *curr = current;
 
-- 
1.8.3.1


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

* [PATCH 07/11] asmlinkage, module: Make ksymtab and kcrctab symbols and __this_module __visible
  2013-10-22 16:12 Various asmlinkage fixes for LTO Andi Kleen
                   ` (5 preceding siblings ...)
  2013-10-22 16:12 ` [PATCH 06/11] asmlinkage: Make trace_hardirq visible Andi Kleen
@ 2013-10-22 16:12 ` Andi Kleen
  2013-10-23  1:09   ` Rusty Russell
  2013-10-22 16:12 ` [PATCH 08/11] asmlinkage, mutex: Mark __visible Andi Kleen
                   ` (3 subsequent siblings)
  10 siblings, 1 reply; 26+ messages in thread
From: Andi Kleen @ 2013-10-22 16:12 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel, Andi Kleen, rusty

From: Andi Kleen <ak@linux.intel.com>

Make the ksymtab symbols for EXPORT_SYMBOL visible.
This prevents the LTO compiler from adding a .NUMBER prefix,
which avoids various problems in later export processing.

Cc: rusty@rustcorp.com.au
Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
 include/linux/export.h | 4 ++--
 scripts/mod/modpost.c  | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/linux/export.h b/include/linux/export.h
index 412cd50..3f2793d 100644
--- a/include/linux/export.h
+++ b/include/linux/export.h
@@ -43,7 +43,7 @@ extern struct module __this_module;
 /* Mark the CRC weak since genksyms apparently decides not to
  * generate a checksums for some symbols */
 #define __CRC_SYMBOL(sym, sec)					\
-	extern void *__crc_##sym __attribute__((weak));		\
+	extern __visible void *__crc_##sym __attribute__((weak));		\
 	static const unsigned long __kcrctab_##sym		\
 	__used							\
 	__attribute__((section("___kcrctab" sec "+" #sym), unused))	\
@@ -59,7 +59,7 @@ extern struct module __this_module;
 	static const char __kstrtab_##sym[]			\
 	__attribute__((section("__ksymtab_strings"), aligned(1))) \
 	= VMLINUX_SYMBOL_STR(sym);				\
-	static const struct kernel_symbol __ksymtab_##sym	\
+	__visible const struct kernel_symbol __ksymtab_##sym	\
 	__used							\
 	__attribute__((section("___ksymtab" sec "+" #sym), unused))	\
 	= { (unsigned long)&sym, __kstrtab_##sym }
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 8247979..0971bac 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -1853,7 +1853,7 @@ static void add_header(struct buffer *b, struct module *mod)
 	buf_printf(b, "\n");
 	buf_printf(b, "MODULE_INFO(vermagic, VERMAGIC_STRING);\n");
 	buf_printf(b, "\n");
-	buf_printf(b, "struct module __this_module\n");
+	buf_printf(b, "__visible struct module __this_module\n");
 	buf_printf(b, "__attribute__((section(\".gnu.linkonce.this_module\"))) = {\n");
 	buf_printf(b, "\t.name = KBUILD_MODNAME,\n");
 	if (mod->has_init)
-- 
1.8.3.1


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

* [PATCH 08/11] asmlinkage, mutex: Mark __visible
  2013-10-22 16:12 Various asmlinkage fixes for LTO Andi Kleen
                   ` (6 preceding siblings ...)
  2013-10-22 16:12 ` [PATCH 07/11] asmlinkage, module: Make ksymtab and kcrctab symbols and __this_module __visible Andi Kleen
@ 2013-10-22 16:12 ` Andi Kleen
  2013-10-22 16:12 ` [PATCH 09/11] asmlinkage: Make main_extable_sort_needed visible Andi Kleen
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 26+ messages in thread
From: Andi Kleen @ 2013-10-22 16:12 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel, Andi Kleen, mingo

From: Andi Kleen <ak@linux.intel.com>

Various kernel/mutex.c functions can be called from
inline assembler, so they should be all global and
__visible

Cc: mingo@kernel.org
Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
 kernel/mutex.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/kernel/mutex.c b/kernel/mutex.c
index 6d647ae..ffba8e9 100644
--- a/kernel/mutex.c
+++ b/kernel/mutex.c
@@ -67,8 +67,7 @@ EXPORT_SYMBOL(__mutex_init);
  * We also put the fastpath first in the kernel image, to make sure the
  * branch is predicted by the CPU as default-untaken.
  */
-static __used noinline void __sched
-__mutex_lock_slowpath(atomic_t *lock_count);
+__visible void __sched __mutex_lock_slowpath(atomic_t *lock_count);
 
 /**
  * mutex_lock - acquire the mutex
@@ -225,7 +224,8 @@ static inline int mutex_can_spin_on_owner(struct mutex *lock)
 }
 #endif
 
-static __used noinline void __sched __mutex_unlock_slowpath(atomic_t *lock_count);
+__visible __used noinline
+void __sched __mutex_unlock_slowpath(atomic_t *lock_count);
 
 /**
  * mutex_unlock - release the mutex
@@ -746,7 +746,7 @@ __mutex_unlock_common_slowpath(atomic_t *lock_count, int nested)
 /*
  * Release the lock, slowpath:
  */
-static __used noinline void
+__visible void
 __mutex_unlock_slowpath(atomic_t *lock_count)
 {
 	__mutex_unlock_common_slowpath(lock_count, 1);
@@ -803,7 +803,7 @@ int __sched mutex_lock_killable(struct mutex *lock)
 }
 EXPORT_SYMBOL(mutex_lock_killable);
 
-static __used noinline void __sched
+__visible void __sched
 __mutex_lock_slowpath(atomic_t *lock_count)
 {
 	struct mutex *lock = container_of(lock_count, struct mutex, count);
-- 
1.8.3.1


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

* [PATCH 09/11] asmlinkage: Make main_extable_sort_needed visible
  2013-10-22 16:12 Various asmlinkage fixes for LTO Andi Kleen
                   ` (7 preceding siblings ...)
  2013-10-22 16:12 ` [PATCH 08/11] asmlinkage, mutex: Mark __visible Andi Kleen
@ 2013-10-22 16:12 ` Andi Kleen
  2013-10-22 16:12 ` [PATCH 10/11] asmlinkage: Mark rwsem functions that can be called from assembler asmlinkage Andi Kleen
  2013-10-22 16:12 ` [PATCH 11/11] asmlinkage, wan/sbni: Make inline assembler symbols visible and assembler global Andi Kleen
  10 siblings, 0 replies; 26+ messages in thread
From: Andi Kleen @ 2013-10-22 16:12 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel, Andi Kleen

From: Andi Kleen <ak@linux.intel.com>

main_extable_sort_needed is used by the build system and needs
to be a normal ELF symbol. Make it visible so that LTO
does not remove or mangle it.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
 kernel/extable.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/extable.c b/kernel/extable.c
index 832cb28..829afaa 100644
--- a/kernel/extable.c
+++ b/kernel/extable.c
@@ -36,7 +36,7 @@ extern struct exception_table_entry __start___ex_table[];
 extern struct exception_table_entry __stop___ex_table[];
 
 /* Cleared by build time tools if the table is already sorted. */
-u32 __initdata main_extable_sort_needed = 1;
+u32 __initdata __visible main_extable_sort_needed = 1;
 
 /* Sort the kernel's built-in exception table */
 void __init sort_main_extable(void)
-- 
1.8.3.1


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

* [PATCH 10/11] asmlinkage: Mark rwsem functions that can be called from assembler asmlinkage
  2013-10-22 16:12 Various asmlinkage fixes for LTO Andi Kleen
                   ` (8 preceding siblings ...)
  2013-10-22 16:12 ` [PATCH 09/11] asmlinkage: Make main_extable_sort_needed visible Andi Kleen
@ 2013-10-22 16:12 ` Andi Kleen
  2013-10-22 16:12 ` [PATCH 11/11] asmlinkage, wan/sbni: Make inline assembler symbols visible and assembler global Andi Kleen
  10 siblings, 0 replies; 26+ messages in thread
From: Andi Kleen @ 2013-10-22 16:12 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel, Andi Kleen

From: Andi Kleen <ak@linux.intel.com>

Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
 lib/rwsem.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/rwsem.c b/lib/rwsem.c
index 19c5fa9..1d66e08 100644
--- a/lib/rwsem.c
+++ b/lib/rwsem.c
@@ -143,6 +143,7 @@ __rwsem_do_wake(struct rw_semaphore *sem, enum rwsem_wake_type wake_type)
 /*
  * wait for the read lock to be granted
  */
+__visible
 struct rw_semaphore __sched *rwsem_down_read_failed(struct rw_semaphore *sem)
 {
 	long count, adjustment = -RWSEM_ACTIVE_READ_BIAS;
@@ -190,6 +191,7 @@ struct rw_semaphore __sched *rwsem_down_read_failed(struct rw_semaphore *sem)
 /*
  * wait until we successfully acquire the write lock
  */
+__visible
 struct rw_semaphore __sched *rwsem_down_write_failed(struct rw_semaphore *sem)
 {
 	long count, adjustment = -RWSEM_ACTIVE_WRITE_BIAS;
@@ -252,6 +254,7 @@ struct rw_semaphore __sched *rwsem_down_write_failed(struct rw_semaphore *sem)
  * handle waking up a waiter on the semaphore
  * - up_read/up_write has decremented the active part of count if we come here
  */
+__visible
 struct rw_semaphore *rwsem_wake(struct rw_semaphore *sem)
 {
 	unsigned long flags;
@@ -272,6 +275,7 @@ struct rw_semaphore *rwsem_wake(struct rw_semaphore *sem)
  * - caller incremented waiting part of count and discovered it still negative
  * - just wake up any readers at the front of the queue
  */
+__visible
 struct rw_semaphore *rwsem_downgrade_wake(struct rw_semaphore *sem)
 {
 	unsigned long flags;
-- 
1.8.3.1


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

* [PATCH 11/11] asmlinkage, wan/sbni: Make inline assembler symbols visible and assembler global
  2013-10-22 16:12 Various asmlinkage fixes for LTO Andi Kleen
                   ` (9 preceding siblings ...)
  2013-10-22 16:12 ` [PATCH 10/11] asmlinkage: Mark rwsem functions that can be called from assembler asmlinkage Andi Kleen
@ 2013-10-22 16:12 ` Andi Kleen
  2013-10-22 17:59   ` David Miller
  10 siblings, 1 reply; 26+ messages in thread
From: Andi Kleen @ 2013-10-22 16:12 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel, Andi Kleen, netdev

From: Andi Kleen <ak@linux.intel.com>

- Inline assembler defining C callable code has to be global
- The function has to be visible

Do this in wan/sbni

Cc: netdev@vger.kernel.org
Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
 drivers/net/wan/sbni.c | 6 +++---
 drivers/net/wan/sbni.h | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wan/sbni.c b/drivers/net/wan/sbni.c
index 5bbcb5e..571db25 100644
--- a/drivers/net/wan/sbni.c
+++ b/drivers/net/wan/sbni.c
@@ -160,7 +160,7 @@ static int  scandone	__initdata = 0;
 static int  num		__initdata = 0;
 
 static unsigned char  rxl_tab[];
-static u32  crc32tab[];
+__visible u32  sbni_crc32tab[];
 
 /* A list of all installed devices, for removing the driver module. */
 static struct net_device  *sbni_cards[ SBNI_MAX_NUM_CARDS ];
@@ -1563,7 +1563,7 @@ calc_crc32( u32  crc,  u8  *p,  u32  len )
 		"xorl	%%ebx, %%ebx\n"
 		"movl	%2, %%esi\n" 
 		"movl	%3, %%ecx\n" 
-		"movl	$crc32tab, %%edi\n"
+		"movl	$sbni_crc32tab, %%edi\n"
 		"shrl	$2, %%ecx\n"
 		"jz	1f\n"
 
@@ -1645,7 +1645,7 @@ calc_crc32( u32  crc,  u8  *p,  u32  len )
 #endif	/* ASM_CRC */
 
 
-static u32  crc32tab[] __attribute__ ((aligned(8))) = {
+__visible u32  sbni_crc32tab[] __attribute__ ((aligned(8))) = {
 	0xD202EF8D,  0xA505DF1B,  0x3C0C8EA1,  0x4B0BBE37,
 	0xD56F2B94,  0xA2681B02,  0x3B614AB8,  0x4C667A2E,
 	0xDCD967BF,  0xABDE5729,  0x32D70693,  0x45D03605,
diff --git a/drivers/net/wan/sbni.h b/drivers/net/wan/sbni.h
index 8426451..7e6d980 100644
--- a/drivers/net/wan/sbni.h
+++ b/drivers/net/wan/sbni.h
@@ -132,7 +132,7 @@ struct sbni_flags {
 /*
  * CRC-32 stuff
  */
-#define CRC32(c,crc) (crc32tab[((size_t)(crc) ^ (c)) & 0xff] ^ (((crc) >> 8) & 0x00FFFFFF))
+#define CRC32(c,crc) (sbni_crc32tab[((size_t)(crc) ^ (c)) & 0xff] ^ (((crc) >> 8) & 0x00FFFFFF))
       /* CRC generator 0xEDB88320 */
       /* CRC remainder 0x2144DF1C */
       /* CRC initial value 0x00000000 */
-- 
1.8.3.1


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

* Re: [PATCH 11/11] asmlinkage, wan/sbni: Make inline assembler symbols visible and assembler global
  2013-10-22 16:12 ` [PATCH 11/11] asmlinkage, wan/sbni: Make inline assembler symbols visible and assembler global Andi Kleen
@ 2013-10-22 17:59   ` David Miller
  2013-10-22 18:36     ` [PATCH] net: wan: sbni: remove assembly crc32 code Sebastian Andrzej Siewior
  2013-10-23  2:09     ` [PATCH 11/11] asmlinkage, wan/sbni: Make inline assembler symbols visible and assembler global Andi Kleen
  0 siblings, 2 replies; 26+ messages in thread
From: David Miller @ 2013-10-22 17:59 UTC (permalink / raw)
  To: andi; +Cc: akpm, linux-kernel, ak, netdev

From: Andi Kleen <andi@firstfloor.org>
Date: Tue, 22 Oct 2013 09:12:26 -0700

> From: Andi Kleen <ak@linux.intel.com>
> 
> - Inline assembler defining C callable code has to be global
> - The function has to be visible
> 
> Do this in wan/sbni
> 
> Cc: netdev@vger.kernel.org
> Signed-off-by: Andi Kleen <ak@linux.intel.com>

Is it really impossible to use the generic crc32 support instead of this
unsightly custom inline assembler?

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

* [PATCH] net: wan: sbni: remove assembly crc32 code
  2013-10-22 17:59   ` David Miller
@ 2013-10-22 18:36     ` Sebastian Andrzej Siewior
  2013-10-22 18:38       ` David Miller
                         ` (2 more replies)
  2013-10-23  2:09     ` [PATCH 11/11] asmlinkage, wan/sbni: Make inline assembler symbols visible and assembler global Andi Kleen
  1 sibling, 3 replies; 26+ messages in thread
From: Sebastian Andrzej Siewior @ 2013-10-22 18:36 UTC (permalink / raw)
  To: David Miller; +Cc: andi, akpm, linux-kernel, ak, netdev


There is also a C function doing the same thing. Unless the asm code is
110% faster we could stick to the C function.

Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
---

On Tue, Oct 22, 2013 at 01:59:28PM -0400, David Miller wrote:
> 
> Is it really impossible to use the generic crc32 support instead of this
> unsightly custom inline assembler?

Since you asked for this here step 1.

 drivers/net/wan/sbni.c | 89 --------------------------------------------------
 1 file changed, 89 deletions(-)

diff --git a/drivers/net/wan/sbni.c b/drivers/net/wan/sbni.c
index 5bbcb5e..388ddf6 100644
--- a/drivers/net/wan/sbni.c
+++ b/drivers/net/wan/sbni.c
@@ -148,10 +148,6 @@ static int  enslave( struct net_device *, struct net_device * );
 static int  emancipate( struct net_device * );
 #endif
 
-#ifdef __i386__
-#define ASM_CRC 1
-#endif
-
 static const char  version[] =
 	"Granch SBNI12 driver ver 5.0.1  Jun 22 2001  Denis I.Timofeev.\n";
 
@@ -1551,88 +1547,6 @@ __setup( "sbni=", sbni_setup );
 
 /* -------------------------------------------------------------------------- */
 
-#ifdef ASM_CRC
-
-static u32
-calc_crc32( u32  crc,  u8  *p,  u32  len )
-{
-	register u32  _crc;
-	_crc = crc;
-	
-	__asm__ __volatile__ (
-		"xorl	%%ebx, %%ebx\n"
-		"movl	%2, %%esi\n" 
-		"movl	%3, %%ecx\n" 
-		"movl	$crc32tab, %%edi\n"
-		"shrl	$2, %%ecx\n"
-		"jz	1f\n"
-
-		".align 4\n"
-	"0:\n"
-		"movb	%%al, %%bl\n"
-		"movl	(%%esi), %%edx\n"
-		"shrl	$8, %%eax\n"
-		"xorb	%%dl, %%bl\n"
-		"shrl	$8, %%edx\n"
-		"xorl	(%%edi,%%ebx,4), %%eax\n"
-
-		"movb	%%al, %%bl\n"
-		"shrl	$8, %%eax\n"
-		"xorb	%%dl, %%bl\n"
-		"shrl	$8, %%edx\n"
-		"xorl	(%%edi,%%ebx,4), %%eax\n"
-
-		"movb	%%al, %%bl\n"
-		"shrl	$8, %%eax\n"
-		"xorb	%%dl, %%bl\n"
-		"movb	%%dh, %%dl\n" 
-		"xorl	(%%edi,%%ebx,4), %%eax\n"
-
-		"movb	%%al, %%bl\n"
-		"shrl	$8, %%eax\n"
-		"xorb	%%dl, %%bl\n"
-		"addl	$4, %%esi\n"
-		"xorl	(%%edi,%%ebx,4), %%eax\n"
-
-		"decl	%%ecx\n"
-		"jnz	0b\n"
-
-	"1:\n"
-		"movl	%3, %%ecx\n"
-		"andl	$3, %%ecx\n"
-		"jz	2f\n"
-
-		"movb	%%al, %%bl\n"
-		"shrl	$8, %%eax\n"
-		"xorb	(%%esi), %%bl\n"
-		"xorl	(%%edi,%%ebx,4), %%eax\n"
-
-		"decl	%%ecx\n"
-		"jz	2f\n"
-
-		"movb	%%al, %%bl\n"
-		"shrl	$8, %%eax\n"
-		"xorb	1(%%esi), %%bl\n"
-		"xorl	(%%edi,%%ebx,4), %%eax\n"
-
-		"decl	%%ecx\n"
-		"jz	2f\n"
-
-		"movb	%%al, %%bl\n"
-		"shrl	$8, %%eax\n"
-		"xorb	2(%%esi), %%bl\n"
-		"xorl	(%%edi,%%ebx,4), %%eax\n"
-	"2:\n"
-		: "=a" (_crc)
-		: "0" (_crc), "g" (p), "g" (len)
-		: "bx", "cx", "dx", "si", "di"
-	);
-
-	return  _crc;
-}
-
-#else	/* ASM_CRC */
-
 static u32
 calc_crc32( u32  crc,  u8  *p,  u32  len )
 {
@@ -1642,9 +1556,6 @@ calc_crc32( u32  crc,  u8  *p,  u32  len )
 	return  crc;
 }
 
-#endif	/* ASM_CRC */
-
-
 static u32  crc32tab[] __attribute__ ((aligned(8))) = {
 	0xD202EF8D,  0xA505DF1B,  0x3C0C8EA1,  0x4B0BBE37,
 	0xD56F2B94,  0xA2681B02,  0x3B614AB8,  0x4C667A2E,
-- 
1.8.4.rc3


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

* Re: [PATCH] net: wan: sbni: remove assembly crc32 code
  2013-10-22 18:36     ` [PATCH] net: wan: sbni: remove assembly crc32 code Sebastian Andrzej Siewior
@ 2013-10-22 18:38       ` David Miller
  2013-10-23  2:11       ` Andi Kleen
  2013-10-25 23:27       ` David Miller
  2 siblings, 0 replies; 26+ messages in thread
From: David Miller @ 2013-10-22 18:38 UTC (permalink / raw)
  To: sebastian; +Cc: andi, akpm, linux-kernel, ak, netdev

From: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Date: Tue, 22 Oct 2013 20:36:25 +0200

> 
> There is also a C function doing the same thing. Unless the asm code is
> 110% faster we could stick to the C function.
> 
> Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
> ---
> 
> On Tue, Oct 22, 2013 at 01:59:28PM -0400, David Miller wrote:
>> 
>> Is it really impossible to use the generic crc32 support instead of this
>> unsightly custom inline assembler?
> 
> Since you asked for this here step 1.

If it's that simple, this is definitely what we should do.

On the off chance, is there anyone actually able to test this
change? :-)))

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

* Re: [PATCH 06/11] asmlinkage: Make trace_hardirq visible
  2013-10-22 16:12 ` [PATCH 06/11] asmlinkage: Make trace_hardirq visible Andi Kleen
@ 2013-10-22 20:18   ` Peter Zijlstra
  2013-10-23  2:15     ` Andi Kleen
  0 siblings, 1 reply; 26+ messages in thread
From: Peter Zijlstra @ 2013-10-22 20:18 UTC (permalink / raw)
  To: Andi Kleen; +Cc: akpm, linux-kernel, Andi Kleen, mingo

On Tue, Oct 22, 2013 at 09:12:21AM -0700, Andi Kleen wrote:
> From: Andi Kleen <ak@linux.intel.com>
> 
> Can be called from assembler code.
> 
> Cc: peterz@infradead.org
> Cc: mingo@kernel.org
> Signed-off-by: Andi Kleen <ak@linux.intel.com>
> ---
>  kernel/lockdep.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/kernel/lockdep.c b/kernel/lockdep.c
> index d3749fe..d1a047d 100644
> --- a/kernel/lockdep.c
> +++ b/kernel/lockdep.c
> @@ -2555,7 +2555,7 @@ static void __trace_hardirqs_on_caller(unsigned long ip)
>  	debug_atomic_inc(hardirqs_on_events);
>  }
>  
> -void trace_hardirqs_on_caller(unsigned long ip)
> +__visible void trace_hardirqs_on_caller(unsigned long ip)
>  {
>  	time_hardirqs_on(CALLER_ADDR0, ip);
>  

$sub talks about asmlinkage, yet here you insert __visible; 'sup?

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

* Re: [PATCH 07/11] asmlinkage, module: Make ksymtab and kcrctab symbols and __this_module __visible
  2013-10-22 16:12 ` [PATCH 07/11] asmlinkage, module: Make ksymtab and kcrctab symbols and __this_module __visible Andi Kleen
@ 2013-10-23  1:09   ` Rusty Russell
  0 siblings, 0 replies; 26+ messages in thread
From: Rusty Russell @ 2013-10-23  1:09 UTC (permalink / raw)
  To: Andi Kleen, akpm; +Cc: linux-kernel, Andi Kleen

Andi Kleen <andi@firstfloor.org> writes:
> From: Andi Kleen <ak@linux.intel.com>
>
> Make the ksymtab symbols for EXPORT_SYMBOL visible.
> This prevents the LTO compiler from adding a .NUMBER prefix,
> which avoids various problems in later export processing.

Applied, thanks.

Cheers,
Rusty.

> Cc: rusty@rustcorp.com.au
> Signed-off-by: Andi Kleen <ak@linux.intel.com>
> ---
>  include/linux/export.h | 4 ++--
>  scripts/mod/modpost.c  | 2 +-
>  2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/include/linux/export.h b/include/linux/export.h
> index 412cd50..3f2793d 100644
> --- a/include/linux/export.h
> +++ b/include/linux/export.h
> @@ -43,7 +43,7 @@ extern struct module __this_module;
>  /* Mark the CRC weak since genksyms apparently decides not to
>   * generate a checksums for some symbols */
>  #define __CRC_SYMBOL(sym, sec)					\
> -	extern void *__crc_##sym __attribute__((weak));		\
> +	extern __visible void *__crc_##sym __attribute__((weak));		\
>  	static const unsigned long __kcrctab_##sym		\
>  	__used							\
>  	__attribute__((section("___kcrctab" sec "+" #sym), unused))	\
> @@ -59,7 +59,7 @@ extern struct module __this_module;
>  	static const char __kstrtab_##sym[]			\
>  	__attribute__((section("__ksymtab_strings"), aligned(1))) \
>  	= VMLINUX_SYMBOL_STR(sym);				\
> -	static const struct kernel_symbol __ksymtab_##sym	\
> +	__visible const struct kernel_symbol __ksymtab_##sym	\
>  	__used							\
>  	__attribute__((section("___ksymtab" sec "+" #sym), unused))	\
>  	= { (unsigned long)&sym, __kstrtab_##sym }
> diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
> index 8247979..0971bac 100644
> --- a/scripts/mod/modpost.c
> +++ b/scripts/mod/modpost.c
> @@ -1853,7 +1853,7 @@ static void add_header(struct buffer *b, struct module *mod)
>  	buf_printf(b, "\n");
>  	buf_printf(b, "MODULE_INFO(vermagic, VERMAGIC_STRING);\n");
>  	buf_printf(b, "\n");
> -	buf_printf(b, "struct module __this_module\n");
> +	buf_printf(b, "__visible struct module __this_module\n");
>  	buf_printf(b, "__attribute__((section(\".gnu.linkonce.this_module\"))) = {\n");
>  	buf_printf(b, "\t.name = KBUILD_MODNAME,\n");
>  	if (mod->has_init)
> -- 
> 1.8.3.1

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

* Re: [PATCH 11/11] asmlinkage, wan/sbni: Make inline assembler symbols visible and assembler global
  2013-10-22 17:59   ` David Miller
  2013-10-22 18:36     ` [PATCH] net: wan: sbni: remove assembly crc32 code Sebastian Andrzej Siewior
@ 2013-10-23  2:09     ` Andi Kleen
  2013-10-23  2:15       ` Florian Fainelli
  1 sibling, 1 reply; 26+ messages in thread
From: Andi Kleen @ 2013-10-23  2:09 UTC (permalink / raw)
  To: David Miller; +Cc: andi, akpm, linux-kernel, ak, netdev

On Tue, Oct 22, 2013 at 01:59:28PM -0400, David Miller wrote:
> From: Andi Kleen <andi@firstfloor.org>
> Date: Tue, 22 Oct 2013 09:12:26 -0700
> 
> > From: Andi Kleen <ak@linux.intel.com>
> > 
> > - Inline assembler defining C callable code has to be global
> > - The function has to be visible
> > 
> > Do this in wan/sbni
> > 
> > Cc: netdev@vger.kernel.org
> > Signed-off-by: Andi Kleen <ak@linux.intel.com>
> 
> Is it really impossible to use the generic crc32 support instead of this
> unsightly custom inline assembler?

Yes it's impossible.

There's no way for me to test it, and this would be a far too big change
to submit untested.

Also my only interest here is this thing not breaking my LTO
allyesconfig build. I'm not even sure what it does.

Just because some legacy driver breaks my build you cannot make me
accountable for maintaining it now. 

If it's not possible to get this trivial change in I would need
to mark it "depends on !LTO" in Kconfig.

-Andi

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

* Re: [PATCH] net: wan: sbni: remove assembly crc32 code
  2013-10-22 18:36     ` [PATCH] net: wan: sbni: remove assembly crc32 code Sebastian Andrzej Siewior
  2013-10-22 18:38       ` David Miller
@ 2013-10-23  2:11       ` Andi Kleen
  2013-10-25 23:27       ` David Miller
  2 siblings, 0 replies; 26+ messages in thread
From: Andi Kleen @ 2013-10-23  2:11 UTC (permalink / raw)
  To: Sebastian Andrzej Siewior
  Cc: David Miller, andi, akpm, linux-kernel, ak, netdev

On Tue, Oct 22, 2013 at 08:36:25PM +0200, Sebastian Andrzej Siewior wrote:
> 
> There is also a C function doing the same thing. Unless the asm code is
> 110% faster we could stick to the C function.

I have no idea if it is or not. But doing it this way would be
acceptable for me.

Thanks for the patch.

-Andi

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

* Re: [PATCH 06/11] asmlinkage: Make trace_hardirq visible
  2013-10-22 20:18   ` Peter Zijlstra
@ 2013-10-23  2:15     ` Andi Kleen
  0 siblings, 0 replies; 26+ messages in thread
From: Andi Kleen @ 2013-10-23  2:15 UTC (permalink / raw)
  To: Peter Zijlstra; +Cc: Andi Kleen, akpm, linux-kernel, Andi Kleen, mingo

> $sub talks about asmlinkage, yet here you insert __visible; 'sup?

I use __visible for anything with arguments, because asmlinkage
changes the ABI from register to stack on i386.

I still used "asmlinkage" as the generic patch group name as that is more
descriptive, and "asmlinkage/visible" would look too ugly.

-Andi

-- 
ak@linux.intel.com -- Speaking for myself only.

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

* Re: [PATCH 11/11] asmlinkage, wan/sbni: Make inline assembler symbols visible and assembler global
  2013-10-23  2:09     ` [PATCH 11/11] asmlinkage, wan/sbni: Make inline assembler symbols visible and assembler global Andi Kleen
@ 2013-10-23  2:15       ` Florian Fainelli
  2013-10-23  2:22         ` Andi Kleen
  2013-10-23  6:28         ` Francois Romieu
  0 siblings, 2 replies; 26+ messages in thread
From: Florian Fainelli @ 2013-10-23  2:15 UTC (permalink / raw)
  To: Andi Kleen; +Cc: David Miller, Andrew Morton, linux-kernel, ak, netdev

2013/10/22 Andi Kleen <andi@firstfloor.org>:
> On Tue, Oct 22, 2013 at 01:59:28PM -0400, David Miller wrote:
>> From: Andi Kleen <andi@firstfloor.org>
>> Date: Tue, 22 Oct 2013 09:12:26 -0700
>>
>> > From: Andi Kleen <ak@linux.intel.com>
>> >
>> > - Inline assembler defining C callable code has to be global
>> > - The function has to be visible
>> >
>> > Do this in wan/sbni
>> >
>> > Cc: netdev@vger.kernel.org
>> > Signed-off-by: Andi Kleen <ak@linux.intel.com>
>>
>> Is it really impossible to use the generic crc32 support instead of this
>> unsightly custom inline assembler?
>
> Yes it's impossible.
>
> There's no way for me to test it, and this would be a far too big change
> to submit untested.
>
> Also my only interest here is this thing not breaking my LTO
> allyesconfig build. I'm not even sure what it does.
>
> Just because some legacy driver breaks my build you cannot make me
> accountable for maintaining it now.
>
> If it's not possible to get this trivial change in I would need
> to mark it "depends on !LTO" in Kconfig.

How about scheduling the WAN drivers for removal? Does anybody
actually use them nowadays?
--
Florian

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

* Re: [PATCH 11/11] asmlinkage, wan/sbni: Make inline assembler symbols visible and assembler global
  2013-10-23  2:15       ` Florian Fainelli
@ 2013-10-23  2:22         ` Andi Kleen
  2013-10-23  6:28         ` Francois Romieu
  1 sibling, 0 replies; 26+ messages in thread
From: Andi Kleen @ 2013-10-23  2:22 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: Andi Kleen, David Miller, Andrew Morton, linux-kernel, ak, netdev

> How about scheduling the WAN drivers for removal? Does anybody
> actually use them nowadays?

Perhaps at least the ISA devices? ISA hardware should be nearing
end of live by now.

Looking at the git log there doesn't seem to be any real changes,
other than tree sweeps or build fixes.

But I must admit I don't really know much about them.

-Andi

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

* Re: [PATCH 11/11] asmlinkage, wan/sbni: Make inline assembler symbols visible and assembler global
  2013-10-23  2:15       ` Florian Fainelli
  2013-10-23  2:22         ` Andi Kleen
@ 2013-10-23  6:28         ` Francois Romieu
  1 sibling, 0 replies; 26+ messages in thread
From: Francois Romieu @ 2013-10-23  6:28 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: Andi Kleen, David Miller, Andrew Morton, linux-kernel, ak,
	netdev, Christophe Leroy

Florian Fainelli <f.fainelli@gmail.com> :
[...]
> How about scheduling the WAN drivers for removal? Does anybody
> actually use them nowadays?

There is still some interest in WAN drivers, see Christophe Leroy
posting on 2013/10/13 "[PATCH] WAN: Adding support for Infineon PEF2256
E1 chipset" (buggy but it's a different topic).

-- 
Ueimor

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

* Re: [PATCH] net: wan: sbni: remove assembly crc32 code
  2013-10-22 18:36     ` [PATCH] net: wan: sbni: remove assembly crc32 code Sebastian Andrzej Siewior
  2013-10-22 18:38       ` David Miller
  2013-10-23  2:11       ` Andi Kleen
@ 2013-10-25 23:27       ` David Miller
  2 siblings, 0 replies; 26+ messages in thread
From: David Miller @ 2013-10-25 23:27 UTC (permalink / raw)
  To: sebastian; +Cc: andi, akpm, linux-kernel, ak, netdev

From: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Date: Tue, 22 Oct 2013 20:36:25 +0200

> There is also a C function doing the same thing. Unless the asm code is
> 110% faster we could stick to the C function.
> 
> Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>

Applied.

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

* Re: [PATCH 02/11] asmlinkage: Make __iowrite32_copy visible
  2013-10-22 16:12 ` [PATCH 02/11] asmlinkage: Make __iowrite32_copy visible Andi Kleen
@ 2013-10-26 10:02   ` Ingo Molnar
  0 siblings, 0 replies; 26+ messages in thread
From: Ingo Molnar @ 2013-10-26 10:02 UTC (permalink / raw)
  To: Andi Kleen; +Cc: akpm, linux-kernel, Andi Kleen, x86


* Andi Kleen <andi@firstfloor.org> wrote:

> From: Andi Kleen <ak@linux.intel.com>
> 
> This is a assembler function on x86, so it should be visible.
> 
> Cc: x86@kernel.org
> Signed-off-by: Andi Kleen <ak@linux.intel.com>
> ---
>  include/linux/io.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

NAK for this and all the other patches, for two technical reasons:

- Please squash most of these trivial patches into a single patch 
  that also describes the context completely, at least the x86 and 
  core kernel ones that I'd apply within a single maintenance 
  domain.

- Please use the customary changelog style we use in the kernel:

   " Current code does (A), this has a problem when (B).
     We can improve this doing (C), because (D)."

Just saying 'because of LTO' is not enough, obviously. You need to 
talk about and explain things Andi. Being cryptic, mysterious and 
curt might work with some ladies, but it's outright harmful on lkml.

Thanks,

	Ingo

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

* Re: [PATCH 01/11] asmlinkage, kvm: Make kvm_rebooting visible
  2013-10-22 16:12 ` [PATCH 01/11] asmlinkage, kvm: Make kvm_rebooting visible Andi Kleen
@ 2013-10-30  9:27   ` Gleb Natapov
  0 siblings, 0 replies; 26+ messages in thread
From: Gleb Natapov @ 2013-10-30  9:27 UTC (permalink / raw)
  To: Andi Kleen; +Cc: akpm, linux-kernel, Andi Kleen, pbonzini, kvm

On Tue, Oct 22, 2013 at 09:12:16AM -0700, Andi Kleen wrote:
> From: Andi Kleen <ak@linux.intel.com>
> 
> kvm_rebooting is referenced from assembler code, thus
> needs to be visible.
> 
> Cc: gleb@redhat.com
> Cc: pbonzini@redhat.com
> Cc: kvm@vger.kernel.org
> Signed-off-by: Andi Kleen <ak@linux.intel.com>
Acked-by: Gleb Natapov <gleb@redhat.com>

> ---
>  virt/kvm/kvm_main.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
> index a9dd682..6ca3564 100644
> --- a/virt/kvm/kvm_main.c
> +++ b/virt/kvm/kvm_main.c
> @@ -95,7 +95,7 @@ static void hardware_disable_all(void);
>  
>  static void kvm_io_bus_destroy(struct kvm_io_bus *bus);
>  
> -bool kvm_rebooting;
> +__visible bool kvm_rebooting;
>  EXPORT_SYMBOL_GPL(kvm_rebooting);
>  
>  static bool largepages_enabled = true;
> -- 
> 1.8.3.1

--
			Gleb.

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

end of thread, other threads:[~2013-10-30  9:28 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-22 16:12 Various asmlinkage fixes for LTO Andi Kleen
2013-10-22 16:12 ` [PATCH 01/11] asmlinkage, kvm: Make kvm_rebooting visible Andi Kleen
2013-10-30  9:27   ` Gleb Natapov
2013-10-22 16:12 ` [PATCH 02/11] asmlinkage: Make __iowrite32_copy visible Andi Kleen
2013-10-26 10:02   ` Ingo Molnar
2013-10-22 16:12 ` [PATCH 03/11] asmlinkage: Make jiffies visible Andi Kleen
2013-10-22 16:12 ` [PATCH 04/11] asmlinkage, pnp: Make variables used from assembler code visible Andi Kleen
2013-10-22 16:12 ` [PATCH 05/11] asmlinkage: Make lockdep_sys_exit asmlinkage Andi Kleen
2013-10-22 16:12 ` [PATCH 06/11] asmlinkage: Make trace_hardirq visible Andi Kleen
2013-10-22 20:18   ` Peter Zijlstra
2013-10-23  2:15     ` Andi Kleen
2013-10-22 16:12 ` [PATCH 07/11] asmlinkage, module: Make ksymtab and kcrctab symbols and __this_module __visible Andi Kleen
2013-10-23  1:09   ` Rusty Russell
2013-10-22 16:12 ` [PATCH 08/11] asmlinkage, mutex: Mark __visible Andi Kleen
2013-10-22 16:12 ` [PATCH 09/11] asmlinkage: Make main_extable_sort_needed visible Andi Kleen
2013-10-22 16:12 ` [PATCH 10/11] asmlinkage: Mark rwsem functions that can be called from assembler asmlinkage Andi Kleen
2013-10-22 16:12 ` [PATCH 11/11] asmlinkage, wan/sbni: Make inline assembler symbols visible and assembler global Andi Kleen
2013-10-22 17:59   ` David Miller
2013-10-22 18:36     ` [PATCH] net: wan: sbni: remove assembly crc32 code Sebastian Andrzej Siewior
2013-10-22 18:38       ` David Miller
2013-10-23  2:11       ` Andi Kleen
2013-10-25 23:27       ` David Miller
2013-10-23  2:09     ` [PATCH 11/11] asmlinkage, wan/sbni: Make inline assembler symbols visible and assembler global Andi Kleen
2013-10-23  2:15       ` Florian Fainelli
2013-10-23  2:22         ` Andi Kleen
2013-10-23  6:28         ` Francois Romieu

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