All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] NDS32: export __trace_hardirqs_on/_offf for entry/exit
@ 2021-09-28  5:26 Randy Dunlap
  2021-09-28 13:15 ` Greentime Hu
  0 siblings, 1 reply; 3+ messages in thread
From: Randy Dunlap @ 2021-09-28  5:26 UTC (permalink / raw)
  To: linux-kernel; +Cc: Randy Dunlap, Nick Hu, Greentime Hu, Vincent Chen

Add exports for __trace_hardirqs_on/_off and use them in
kernel/ex-entry.S and kernel/ex-exit.S to fix build/linker errors.

nds32le-linux-ld: arch/nds32/kernel/ex-entry.o: in function `fucop_ctl_done':
(.text+0x12a): undefined reference to `__trace_hardirqs_off'
(.text+0x12a): relocation truncated to fit: R_NDS32_25_PCREL_RELA against undefined symbol `__trace_hardirqs_off'
nds32le-linux-ld: arch/nds32/kernel/ex-exit.o: in function `no_work_pending':
(.text+0xea): undefined reference to `__trace_hardirqs_off'
nds32le-linux-ld: (.text+0xee): undefined reference to `__trace_hardirqs_off'
nds32le-linux-ld: (.text+0xf2): undefined reference to `__trace_hardirqs_on'
nds32le-linux-ld: (.text+0xf6): undefined reference to `__trace_hardirqs_on'

Fixes: 0cde56e0280d ("nds32: Fix a kernel panic issue because of wrong frame pointer access.")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Nick Hu <nickhu@andestech.com>
Cc: Greentime Hu <green.hu@gmail.com>
Cc: Vincent Chen <deanbo422@gmail.com>
---
 arch/nds32/include/asm/ftrace.h |    3 +++
 arch/nds32/kernel/ex-entry.S    |    1 +
 arch/nds32/kernel/ex-exit.S     |    2 +-
 arch/nds32/kernel/ftrace.c      |    3 +++
 4 files changed, 8 insertions(+), 1 deletion(-)

--- linux-next-20210917.orig/arch/nds32/kernel/ftrace.c
+++ linux-next-20210917/arch/nds32/kernel/ftrace.c
@@ -276,8 +276,11 @@ noinline void __trace_hardirqs_off(void)
 {
 	trace_hardirqs_off();
 }
+EXPORT_SYMBOL(__trace_hardirqs_off);
+
 noinline void __trace_hardirqs_on(void)
 {
 	trace_hardirqs_on();
 }
+EXPORT_SYMBOL(__trace_hardirqs_on);
 #endif /* CONFIG_TRACE_IRQFLAGS */
--- linux-next-20210917.orig/arch/nds32/include/asm/ftrace.h
+++ linux-next-20210917/arch/nds32/include/asm/ftrace.h
@@ -15,6 +15,9 @@
 
 extern void _mcount(unsigned long parent_ip);
 
+extern void __trace_hardirqs_off(void);
+extern void __trace_hardirqs_on(void);
+
 #ifdef CONFIG_DYNAMIC_FTRACE
 
 #define FTRACE_ADDR ((unsigned long)_ftrace_caller)
--- linux-next-20210917.orig/arch/nds32/kernel/ex-entry.S
+++ linux-next-20210917/arch/nds32/kernel/ex-entry.S
@@ -8,6 +8,7 @@
 #include <asm/asm-offsets.h>
 #include <asm/page.h>
 #include <asm/fpu.h>
+#include <asm/ftrace.h>
 
 #ifdef CONFIG_HWZOL
 	.macro push_zol
--- linux-next-20210917.orig/arch/nds32/kernel/ex-exit.S
+++ linux-next-20210917/arch/nds32/kernel/ex-exit.S
@@ -9,7 +9,7 @@
 #include <asm/thread_info.h>
 #include <asm/current.h>
 #include <asm/fpu.h>
-
+#include <asm/ftrace.h>
 
 
 #ifdef CONFIG_HWZOL

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

* Re: [PATCH] NDS32: export __trace_hardirqs_on/_offf for entry/exit
  2021-09-28  5:26 [PATCH] NDS32: export __trace_hardirqs_on/_offf for entry/exit Randy Dunlap
@ 2021-09-28 13:15 ` Greentime Hu
  2022-02-17 19:02   ` Randy Dunlap
  0 siblings, 1 reply; 3+ messages in thread
From: Greentime Hu @ 2021-09-28 13:15 UTC (permalink / raw)
  To: Randy Dunlap, Alan Kao
  Cc: Linux Kernel Mailing List, Nick Hu, Vincent Chen, kclin

Randy Dunlap <rdunlap@infradead.org> 於 2021年9月28日 週二 下午1:27寫道:
>
> Add exports for __trace_hardirqs_on/_off and use them in
> kernel/ex-entry.S and kernel/ex-exit.S to fix build/linker errors.
>
> nds32le-linux-ld: arch/nds32/kernel/ex-entry.o: in function `fucop_ctl_done':
> (.text+0x12a): undefined reference to `__trace_hardirqs_off'
> (.text+0x12a): relocation truncated to fit: R_NDS32_25_PCREL_RELA against undefined symbol `__trace_hardirqs_off'
> nds32le-linux-ld: arch/nds32/kernel/ex-exit.o: in function `no_work_pending':
> (.text+0xea): undefined reference to `__trace_hardirqs_off'
> nds32le-linux-ld: (.text+0xee): undefined reference to `__trace_hardirqs_off'
> nds32le-linux-ld: (.text+0xf2): undefined reference to `__trace_hardirqs_on'
> nds32le-linux-ld: (.text+0xf6): undefined reference to `__trace_hardirqs_on'
>
> Fixes: 0cde56e0280d ("nds32: Fix a kernel panic issue because of wrong frame pointer access.")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Nick Hu <nickhu@andestech.com>
> Cc: Greentime Hu <green.hu@gmail.com>
> Cc: Vincent Chen <deanbo422@gmail.com>
> ---
>  arch/nds32/include/asm/ftrace.h |    3 +++
>  arch/nds32/kernel/ex-entry.S    |    1 +
>  arch/nds32/kernel/ex-exit.S     |    2 +-
>  arch/nds32/kernel/ftrace.c      |    3 +++
>  4 files changed, 8 insertions(+), 1 deletion(-)
>
> --- linux-next-20210917.orig/arch/nds32/kernel/ftrace.c
> +++ linux-next-20210917/arch/nds32/kernel/ftrace.c
> @@ -276,8 +276,11 @@ noinline void __trace_hardirqs_off(void)
>  {
>         trace_hardirqs_off();
>  }
> +EXPORT_SYMBOL(__trace_hardirqs_off);
> +
>  noinline void __trace_hardirqs_on(void)
>  {
>         trace_hardirqs_on();
>  }
> +EXPORT_SYMBOL(__trace_hardirqs_on);
>  #endif /* CONFIG_TRACE_IRQFLAGS */
> --- linux-next-20210917.orig/arch/nds32/include/asm/ftrace.h
> +++ linux-next-20210917/arch/nds32/include/asm/ftrace.h
> @@ -15,6 +15,9 @@
>
>  extern void _mcount(unsigned long parent_ip);
>
> +extern void __trace_hardirqs_off(void);
> +extern void __trace_hardirqs_on(void);
> +
>  #ifdef CONFIG_DYNAMIC_FTRACE
>
>  #define FTRACE_ADDR ((unsigned long)_ftrace_caller)
> --- linux-next-20210917.orig/arch/nds32/kernel/ex-entry.S
> +++ linux-next-20210917/arch/nds32/kernel/ex-entry.S
> @@ -8,6 +8,7 @@
>  #include <asm/asm-offsets.h>
>  #include <asm/page.h>
>  #include <asm/fpu.h>
> +#include <asm/ftrace.h>
>
>  #ifdef CONFIG_HWZOL
>         .macro push_zol
> --- linux-next-20210917.orig/arch/nds32/kernel/ex-exit.S
> +++ linux-next-20210917/arch/nds32/kernel/ex-exit.S
> @@ -9,7 +9,7 @@
>  #include <asm/thread_info.h>
>  #include <asm/current.h>
>  #include <asm/fpu.h>
> -
> +#include <asm/ftrace.h>
>
>
>  #ifdef CONFIG_HWZOL

loop in Alan and KC.

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

* Re: [PATCH] NDS32: export __trace_hardirqs_on/_offf for entry/exit
  2021-09-28 13:15 ` Greentime Hu
@ 2022-02-17 19:02   ` Randy Dunlap
  0 siblings, 0 replies; 3+ messages in thread
From: Randy Dunlap @ 2022-02-17 19:02 UTC (permalink / raw)
  To: Greentime Hu, Alan Kao
  Cc: Linux Kernel Mailing List, Nick Hu, Vincent Chen, kclin

Hi--

I have an updated patch for this one ... if anyone is out there
to apply arch/nds32/ patches.


On 9/28/21 06:15, Greentime Hu wrote:
> Randy Dunlap <rdunlap@infradead.org> 於 2021年9月28日 週二 下午1:27寫道:
>>
>> Add exports for __trace_hardirqs_on/_off and use them in
>> kernel/ex-entry.S and kernel/ex-exit.S to fix build/linker errors.
>>
>> nds32le-linux-ld: arch/nds32/kernel/ex-entry.o: in function `fucop_ctl_done':
>> (.text+0x12a): undefined reference to `__trace_hardirqs_off'
>> (.text+0x12a): relocation truncated to fit: R_NDS32_25_PCREL_RELA against undefined symbol `__trace_hardirqs_off'
>> nds32le-linux-ld: arch/nds32/kernel/ex-exit.o: in function `no_work_pending':
>> (.text+0xea): undefined reference to `__trace_hardirqs_off'
>> nds32le-linux-ld: (.text+0xee): undefined reference to `__trace_hardirqs_off'
>> nds32le-linux-ld: (.text+0xf2): undefined reference to `__trace_hardirqs_on'
>> nds32le-linux-ld: (.text+0xf6): undefined reference to `__trace_hardirqs_on'
>>
>> Fixes: 0cde56e0280d ("nds32: Fix a kernel panic issue because of wrong frame pointer access.")
>> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
>> Cc: Nick Hu <nickhu@andestech.com>
>> Cc: Greentime Hu <green.hu@gmail.com>
>> Cc: Vincent Chen <deanbo422@gmail.com>
>> ---
>>  arch/nds32/include/asm/ftrace.h |    3 +++
>>  arch/nds32/kernel/ex-entry.S    |    1 +
>>  arch/nds32/kernel/ex-exit.S     |    2 +-
>>  arch/nds32/kernel/ftrace.c      |    3 +++
>>  4 files changed, 8 insertions(+), 1 deletion(-)
>>
>> --- linux-next-20210917.orig/arch/nds32/kernel/ftrace.c
>> +++ linux-next-20210917/arch/nds32/kernel/ftrace.c
>> @@ -276,8 +276,11 @@ noinline void __trace_hardirqs_off(void)
>>  {
>>         trace_hardirqs_off();
>>  }
>> +EXPORT_SYMBOL(__trace_hardirqs_off);
>> +
>>  noinline void __trace_hardirqs_on(void)
>>  {
>>         trace_hardirqs_on();
>>  }
>> +EXPORT_SYMBOL(__trace_hardirqs_on);
>>  #endif /* CONFIG_TRACE_IRQFLAGS */
>> --- linux-next-20210917.orig/arch/nds32/include/asm/ftrace.h
>> +++ linux-next-20210917/arch/nds32/include/asm/ftrace.h
>> @@ -15,6 +15,9 @@
>>
>>  extern void _mcount(unsigned long parent_ip);
>>
>> +extern void __trace_hardirqs_off(void);
>> +extern void __trace_hardirqs_on(void);
>> +
>>  #ifdef CONFIG_DYNAMIC_FTRACE
>>
>>  #define FTRACE_ADDR ((unsigned long)_ftrace_caller)
>> --- linux-next-20210917.orig/arch/nds32/kernel/ex-entry.S
>> +++ linux-next-20210917/arch/nds32/kernel/ex-entry.S
>> @@ -8,6 +8,7 @@
>>  #include <asm/asm-offsets.h>
>>  #include <asm/page.h>
>>  #include <asm/fpu.h>
>> +#include <asm/ftrace.h>
>>
>>  #ifdef CONFIG_HWZOL
>>         .macro push_zol
>> --- linux-next-20210917.orig/arch/nds32/kernel/ex-exit.S
>> +++ linux-next-20210917/arch/nds32/kernel/ex-exit.S
>> @@ -9,7 +9,7 @@
>>  #include <asm/thread_info.h>
>>  #include <asm/current.h>
>>  #include <asm/fpu.h>
>> -
>> +#include <asm/ftrace.h>
>>
>>
>>  #ifdef CONFIG_HWZOL
> 
> loop in Alan and KC.

-- 
~Randy

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

end of thread, other threads:[~2022-02-17 19:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-28  5:26 [PATCH] NDS32: export __trace_hardirqs_on/_offf for entry/exit Randy Dunlap
2021-09-28 13:15 ` Greentime Hu
2022-02-17 19:02   ` Randy Dunlap

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.