* Portable assmbler code - newline (was Re: [PATCH] kernel/modsign_certificate.S: use real contents instead of macro GLOBAL()) [not found] ` <CAFLxGvzERDqwZhb_5d=bXKmqz6-Yrema_TLMTM7rjyeFeDJG_w@mail.gmail.com> @ 2013-10-24 17:28 ` Vineet Gupta 2013-10-24 19:41 ` Geert Uytterhoeven 0 siblings, 1 reply; 7+ messages in thread From: Vineet Gupta @ 2013-10-24 17:28 UTC (permalink / raw) To: Richard Weinberger, Chen Gang Cc: Joern Rennecke, James Hogan, Rusty Russell, Takashi Iwai, Vineet Gupta, jeremy.bennett@embecosm.com, linux-kernel@vger.kernel.org, Claudiu Zissulescu, Francois Bedard, Sam Ravnborg, Joe Perches, linux-arch@vger.kernel.org +CC linux-arch On 10/24/2013 11:33 AM, Richard Weinberger wrote: > On Thu, Oct 24, 2013 at 7:31 AM, Chen Gang <gang.chen@asianux.com> wrote: >> > For some architectures, tool chain is not smart enough to recognize the >> > macro with multiple lines (e.g. arc tool chain), and for common ".S" >> > file, this kind of macro is also rarely used. > Does not "not smart enough" mean than the said toolchain is broken/buggy > or is the kernel using an unsupported notation? > IMHO this is not broken - rather the code is not fully portable - given that gas ports of arches have differnet notions of what to treat as comment and what newline. Looking as binutils/gas/config, I can see that avr, cris,...are likely broken in the same way as ARC is. Historically ARC has had ';' as comment char, which Joern relatively recently augmented to have '#' as well. However there's legacy codebase which relies on ';' being a comment and we can't change that fact. So can we introduce an ARCH over-ridable newline annotation in linkage.h and other places after auditing. Since asm/linkage.h preempts linux/linkage.h by way of #include it shd be pretty strightforward. Something like below. I can send the formal patch if people think the approach is OK. -----------------> diff --git a/include/linux/linkage.h b/include/linux/linkage.h index d3e8ad23a8e0..4188c632f2b8 100644 --- a/include/linux/linkage.h +++ b/include/linux/linkage.h @@ -6,6 +6,10 @@ #include <linux/export.h> #include <asm/linkage.h> +#ifndef __ARCH_NL +#define __ARCH_NL +#endif + #ifdef __cplusplus #define CPP_ASMLINKAGE extern "C" #else @@ -75,7 +79,7 @@ #ifndef ENTRY #define ENTRY(name) \ - .globl name; \ + .globl name; __ARCH_NL \ ALIGN; \ name: #endif @@ -83,7 +87,7 @@ #ifndef WEAK #define WEAK(name) \ - .weak name; \ + .weak name; __ARCH_NL \ name: #endif ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: Portable assmbler code - newline (was Re: [PATCH] kernel/modsign_certificate.S: use real contents instead of macro GLOBAL()) 2013-10-24 17:28 ` Portable assmbler code - newline (was Re: [PATCH] kernel/modsign_certificate.S: use real contents instead of macro GLOBAL()) Vineet Gupta @ 2013-10-24 19:41 ` Geert Uytterhoeven 2013-10-25 5:10 ` Vineet Gupta 0 siblings, 1 reply; 7+ messages in thread From: Geert Uytterhoeven @ 2013-10-24 19:41 UTC (permalink / raw) To: Vineet Gupta Cc: Richard Weinberger, Chen Gang, Joern Rennecke, James Hogan, Rusty Russell, Takashi Iwai, Vineet Gupta, jeremy.bennett@embecosm.com, linux-kernel@vger.kernel.org, Claudiu Zissulescu, Francois Bedard, Sam Ravnborg, Joe Perches, linux-arch@vger.kernel.org On Thu, Oct 24, 2013 at 7:28 PM, Vineet Gupta <vineetg76@gmail.com> wrote: > +CC linux-arch > > On 10/24/2013 11:33 AM, Richard Weinberger wrote: >> On Thu, Oct 24, 2013 at 7:31 AM, Chen Gang <gang.chen@asianux.com> wrote: >>> > For some architectures, tool chain is not smart enough to recognize the >>> > macro with multiple lines (e.g. arc tool chain), and for common ".S" >>> > file, this kind of macro is also rarely used. >> Does not "not smart enough" mean than the said toolchain is broken/buggy >> or is the kernel using an unsupported notation? >> > > IMHO this is not broken - rather the code is not fully portable - given that gas > ports of arches have differnet notions of what to treat as comment and what newline. > > Looking as binutils/gas/config, I can see that avr, cris,...are likely broken in > the same way as ARC is. > > Historically ARC has had ';' as comment char, which Joern relatively recently > augmented to have '#' as well. However there's legacy codebase which relies on ';' > being a comment and we can't change that fact. > > So can we introduce an ARCH over-ridable newline annotation in linkage.h and other > places after auditing. Since asm/linkage.h preempts linux/linkage.h by way of > #include it shd be pretty strightforward. > > Something like below. I can send the formal patch if people think the approach is OK. By what are you gonna override __ARCH_NL on ARC? I'm afraid cpp will still turn it into a single line. > -----------------> > diff --git a/include/linux/linkage.h b/include/linux/linkage.h > index d3e8ad23a8e0..4188c632f2b8 100644 > --- a/include/linux/linkage.h > +++ b/include/linux/linkage.h > @@ -6,6 +6,10 @@ > #include <linux/export.h> > #include <asm/linkage.h> > > +#ifndef __ARCH_NL > +#define __ARCH_NL > +#endif > + > #ifdef __cplusplus > #define CPP_ASMLINKAGE extern "C" > #else > @@ -75,7 +79,7 @@ > > #ifndef ENTRY > #define ENTRY(name) \ > - .globl name; \ > + .globl name; __ARCH_NL \ > ALIGN; \ > name: > #endif > @@ -83,7 +87,7 @@ > > #ifndef WEAK > #define WEAK(name) \ > - .weak name; \ > + .weak name; __ARCH_NL \ > name: > #endif Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Portable assmbler code - newline (was Re: [PATCH] kernel/modsign_certificate.S: use real contents instead of macro GLOBAL()) 2013-10-24 19:41 ` Geert Uytterhoeven @ 2013-10-25 5:10 ` Vineet Gupta 2013-10-26 13:38 ` Chen Gang 0 siblings, 1 reply; 7+ messages in thread From: Vineet Gupta @ 2013-10-25 5:10 UTC (permalink / raw) To: Geert Uytterhoeven Cc: Richard Weinberger, Chen Gang, Joern Rennecke, James Hogan, Rusty Russell, Takashi Iwai, Vineet Gupta, jeremy.bennett@embecosm.com, linux-kernel@vger.kernel.org, Claudiu Zissulescu, Francois Bedard, Sam Ravnborg, Joe Perches, linux-arch@vger.kernel.org On 10/25/2013 01:11 AM, Geert Uytterhoeven wrote: > On Thu, Oct 24, 2013 at 7:28 PM, Vineet Gupta <vineetg76@gmail.com> wrote: >> > +CC linux-arch >> > >> > On 10/24/2013 11:33 AM, Richard Weinberger wrote: >>> >> On Thu, Oct 24, 2013 at 7:31 AM, Chen Gang <gang.chen@asianux.com> wrote: >>>>> >>> > For some architectures, tool chain is not smart enough to recognize the >>>>> >>> > macro with multiple lines (e.g. arc tool chain), and for common ".S" >>>>> >>> > file, this kind of macro is also rarely used. >>> >> Does not "not smart enough" mean than the said toolchain is broken/buggy >>> >> or is the kernel using an unsupported notation? >>> >> >> > >> > IMHO this is not broken - rather the code is not fully portable - given that gas >> > ports of arches have differnet notions of what to treat as comment and what newline. >> > >> > Looking as binutils/gas/config, I can see that avr, cris,...are likely broken in >> > the same way as ARC is. >> > >> > Historically ARC has had ';' as comment char, which Joern relatively recently >> > augmented to have '#' as well. However there's legacy codebase which relies on ';' >> > being a comment and we can't change that fact. >> > >> > So can we introduce an ARCH over-ridable newline annotation in linkage.h and other >> > places after auditing. Since asm/linkage.h preempts linux/linkage.h by way of >> > #include it shd be pretty strightforward. >> > >> > Something like below. I can send the formal patch if people think the approach is OK. > By what are you gonna override __ARCH_NL on ARC? > I'm afraid cpp will still turn it into a single line. > Eh ! My untested patch was broken but not because of what you mentioned. For ARC, the ; negating the newline annotation. So the following works (backquote is new line for ARC) diff --git a/arch/arc/include/asm/linkage.h b/arch/arc/include/asm/linkage.h index 0283e9e44e0d..b3eea2999322 100644 --- a/arch/arc/include/asm/linkage.h +++ b/arch/arc/include/asm/linkage.h @@ -9,6 +9,8 @@ #ifndef __ASM_LINKAGE_H #define __ASM_LINKAGE_H +#define __ARCH_NL ` + #ifdef __ASSEMBLY__ diff --git a/include/linux/linkage.h b/include/linux/linkage.h index d3e8ad23a8e0..969e70ad231a 100644 --- a/include/linux/linkage.h +++ b/include/linux/linkage.h @@ -6,6 +6,10 @@ #include <linux/export.h> #include <asm/linkage.h> +#ifndef __ARCH_NL +#define __ARCH_NL ; +#endif + #ifdef __cplusplus #define CPP_ASMLINKAGE extern "C" #else @@ -75,7 +79,7 @@ #ifndef ENTRY #define ENTRY(name) \ - .globl name; \ + .globl name __ARCH_NL \ ALIGN; \ name: #endif ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: Portable assmbler code - newline (was Re: [PATCH] kernel/modsign_certificate.S: use real contents instead of macro GLOBAL()) 2013-10-25 5:10 ` Vineet Gupta @ 2013-10-26 13:38 ` Chen Gang 2013-10-27 7:28 ` Portable assmbler code - newline Vineet Gupta 0 siblings, 1 reply; 7+ messages in thread From: Chen Gang @ 2013-10-26 13:38 UTC (permalink / raw) To: Vineet Gupta Cc: Geert Uytterhoeven, Richard Weinberger, Joern Rennecke, James Hogan, Rusty Russell, Takashi Iwai, Vineet Gupta, jeremy.bennett@embecosm.com, linux-kernel@vger.kernel.org, Claudiu Zissulescu, Francois Bedard, Sam Ravnborg, Joe Perches, linux-arch@vger.kernel.org On 10/25/2013 01:10 PM, Vineet Gupta wrote: > On 10/25/2013 01:11 AM, Geert Uytterhoeven wrote: >> On Thu, Oct 24, 2013 at 7:28 PM, Vineet Gupta <vineetg76@gmail.com> wrote: >>>> +CC linux-arch >>>> >>>> On 10/24/2013 11:33 AM, Richard Weinberger wrote: >>>>>> On Thu, Oct 24, 2013 at 7:31 AM, Chen Gang <gang.chen@asianux.com> wrote: >>>>>>>>>> For some architectures, tool chain is not smart enough to recognize the >>>>>>>>>> macro with multiple lines (e.g. arc tool chain), and for common ".S" >>>>>>>>>> file, this kind of macro is also rarely used. >>>>>> Does not "not smart enough" mean than the said toolchain is broken/buggy >>>>>> or is the kernel using an unsupported notation? >>>>>> >>>> >>>> IMHO this is not broken - rather the code is not fully portable - given that gas >>>> ports of arches have differnet notions of what to treat as comment and what newline. >>>> >>>> Looking as binutils/gas/config, I can see that avr, cris,...are likely broken in >>>> the same way as ARC is. >>>> >>>> Historically ARC has had ';' as comment char, which Joern relatively recently >>>> augmented to have '#' as well. However there's legacy codebase which relies on ';' >>>> being a comment and we can't change that fact. >>>> >>>> So can we introduce an ARCH over-ridable newline annotation in linkage.h and other >>>> places after auditing. Since asm/linkage.h preempts linux/linkage.h by way of >>>> #include it shd be pretty strightforward. >>>> >>>> Something like below. I can send the formal patch if people think the approach is OK. >> By what are you gonna override __ARCH_NL on ARC? >> I'm afraid cpp will still turn it into a single line. >> > > Eh ! My untested patch was broken but not because of what you mentioned. > > For ARC, the ; negating the newline annotation. So the following works (backquote > is new line for ARC) > > diff --git a/arch/arc/include/asm/linkage.h b/arch/arc/include/asm/linkage.h > index 0283e9e44e0d..b3eea2999322 100644 > --- a/arch/arc/include/asm/linkage.h > +++ b/arch/arc/include/asm/linkage.h > @@ -9,6 +9,8 @@ > #ifndef __ASM_LINKAGE_H > #define __ASM_LINKAGE_H > > +#define __ARCH_NL ` > + > #ifdef __ASSEMBLY__ > > > diff --git a/include/linux/linkage.h b/include/linux/linkage.h > index d3e8ad23a8e0..969e70ad231a 100644 > --- a/include/linux/linkage.h > +++ b/include/linux/linkage.h > @@ -6,6 +6,10 @@ > #include <linux/export.h> > #include <asm/linkage.h> > > +#ifndef __ARCH_NL > +#define __ARCH_NL ; > +#endif > + > #ifdef __cplusplus > #define CPP_ASMLINKAGE extern "C" > #else > @@ -75,7 +79,7 @@ > > #ifndef ENTRY > #define ENTRY(name) \ > - .globl name; \ > + .globl name __ARCH_NL \ > ALIGN; \ Do we also need consider about "ALIGN;"? > name: > #endif > For next-20130927 tree, do we also need consider about WEAK, ENDPROC? I am not quite sure about it, but I will try. Now, I am just analyzing another issue -- maybe the last issue for allmodconfig under arc, which may be related with this patch, the errors are: 1 Building modules, stage 2. 2 MODPOST 2994 modules 3 ERROR: "__st_r13_to_r20" [sound/usb/snd-usbmidi-lib.ko] undefined! 4 ERROR: "__ld_r13_to_r15" [sound/usb/snd-usbmidi-lib.ko] undefined! 5 ERROR: "__st_r13_to_r18" [sound/usb/snd-usbmidi-lib.ko] undefined! 6 ERROR: "__ld_r13_to_r14_ret" [sound/usb/snd-usbmidi-lib.ko] undefined! 7 ERROR: "__ld_r13_to_r22" [sound/usb/snd-usbmidi-lib.ko] undefined! 8 ERROR: "__ld_r13_to_r15_ret" [sound/usb/snd-usbmidi-lib.ko] undefined! 9 ERROR: "__ld_r13_to_r16" [sound/usb/snd-usbmidi-lib.ko] undefined! 10 ERROR: "__ld_r13_to_r18_ret" [sound/usb/snd-usbmidi-lib.ko] undefined! 11 ERROR: "__ld_r13_to_r24_ret" [sound/usb/snd-usbmidi-lib.ko] undefined! ... ... 28095 ERROR: "__st_r13_to_r17" [arch/arc/oprofile/oprofile.ko] undefined! 28096 ERROR: "__st_r13_to_r22" [arch/arc/oprofile/oprofile.ko] undefined! 28097 ERROR: "__ld_r13_to_r19_ret" [Documentation/filesystems/configfs/configfs_example_macros.ko] undefined! 28098 ERROR: "__st_r13_to_r19" [Documentation/filesystems/configfs/configfs_example_macros.ko] undefined! 28099 ERROR: "__ld_r13_to_r14_ret" [Documentation/filesystems/configfs/configfs_example_macros.ko] undefined! 28100 ERROR: "__ld_r13_to_r19_ret" [Documentation/filesystems/configfs/configfs_example_explicit.ko] undefined! 28101 ERROR: "__st_r13_to_r19" [Documentation/filesystems/configfs/configfs_example_explicit.ko] undefined! 28102 ERROR: "__ld_r13_to_r14_ret" [Documentation/filesystems/configfs/configfs_example_explicit.ko] undefined! 28103 ERROR: "__ld_r13_to_r14_ret" [Documentation/connector/cn_test.ko] undefined! 28104 make[1]: *** [__modpost] Error 1 28105 make: *** [modules] Error 2 Thanks. -- Chen Gang ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Portable assmbler code - newline 2013-10-26 13:38 ` Chen Gang @ 2013-10-27 7:28 ` Vineet Gupta 2013-10-27 12:34 ` Chen Gang 0 siblings, 1 reply; 7+ messages in thread From: Vineet Gupta @ 2013-10-27 7:28 UTC (permalink / raw) To: Chen Gang Cc: Geert Uytterhoeven, Richard Weinberger, Joern Rennecke, James Hogan, Rusty Russell, Takashi Iwai, Vineet Gupta, jeremy.bennett@embecosm.com, linux-kernel@vger.kernel.org, Claudiu Zissulescu, Francois Bedard, Sam Ravnborg, Joe Perches, linux-arch@vger.kernel.org On 10/26/2013 07:08 PM, Chen Gang wrote: > On 10/25/2013 01:10 PM, Vineet Gupta wrote: >> On 10/25/2013 01:11 AM, Geert Uytterhoeven wrote: >>> On Thu, Oct 24, 2013 at 7:28 PM, Vineet Gupta <vineetg76@gmail.com> wrote: >>>>> +CC linux-arch >>>>> >>>>> On 10/24/2013 11:33 AM, Richard Weinberger wrote: >>>>>>> On Thu, Oct 24, 2013 at 7:31 AM, Chen Gang <gang.chen@asianux.com> wrote: >>>>>>>>>>> For some architectures, tool chain is not smart enough to recognize the >>>>>>>>>>> macro with multiple lines (e.g. arc tool chain), and for common ".S" >>>>>>>>>>> file, this kind of macro is also rarely used. >>>>>>> Does not "not smart enough" mean than the said toolchain is broken/buggy >>>>>>> or is the kernel using an unsupported notation? >>>>>>> >>>>> >>>>> IMHO this is not broken - rather the code is not fully portable - given that gas >>>>> ports of arches have differnet notions of what to treat as comment and what newline. >>>>> >>>>> Looking as binutils/gas/config, I can see that avr, cris,...are likely broken in >>>>> the same way as ARC is. >>>>> >>>>> Historically ARC has had ';' as comment char, which Joern relatively recently >>>>> augmented to have '#' as well. However there's legacy codebase which relies on ';' >>>>> being a comment and we can't change that fact. >>>>> >>>>> So can we introduce an ARCH over-ridable newline annotation in linkage.h and other >>>>> places after auditing. Since asm/linkage.h preempts linux/linkage.h by way of >>>>> #include it shd be pretty strightforward. >>>>> >>>>> Something like below. I can send the formal patch if people think the approach is OK. >>> By what are you gonna override __ARCH_NL on ARC? >>> I'm afraid cpp will still turn it into a single line. >>> >> >> Eh ! My untested patch was broken but not because of what you mentioned. >> >> For ARC, the ; negating the newline annotation. So the following works (backquote >> is new line for ARC) >> >> diff --git a/arch/arc/include/asm/linkage.h b/arch/arc/include/asm/linkage.h >> index 0283e9e44e0d..b3eea2999322 100644 >> --- a/arch/arc/include/asm/linkage.h >> +++ b/arch/arc/include/asm/linkage.h >> @@ -9,6 +9,8 @@ >> #ifndef __ASM_LINKAGE_H >> #define __ASM_LINKAGE_H >> >> +#define __ARCH_NL ` >> + >> #ifdef __ASSEMBLY__ >> >> >> diff --git a/include/linux/linkage.h b/include/linux/linkage.h >> index d3e8ad23a8e0..969e70ad231a 100644 >> --- a/include/linux/linkage.h >> +++ b/include/linux/linkage.h >> @@ -6,6 +6,10 @@ >> #include <linux/export.h> >> #include <asm/linkage.h> >> >> +#ifndef __ARCH_NL >> +#define __ARCH_NL ; >> +#endif >> + >> #ifdef __cplusplus >> #define CPP_ASMLINKAGE extern "C" >> #else >> @@ -75,7 +79,7 @@ >> >> #ifndef ENTRY >> #define ENTRY(name) \ >> - .globl name; \ >> + .globl name __ARCH_NL \ >> ALIGN; \ > > Do we also need consider about "ALIGN;"? Right - as I said already, above was not a formal patch but a RFC whether we are on right track. The proper fix will have to audit all such places. >> name: >> #endif >> > > For next-20130927 tree, do we also need consider about WEAK, ENDPROC? Indeed. > I am not quite sure about it, but I will try. So you volunteer to send out a patch base don __ARCH_NL I proposed above ? > Now, I am just analyzing > another issue -- maybe the last issue for allmodconfig under arc, which > may be related with this patch, the errors are: > > 1 Building modules, stage 2. > 2 MODPOST 2994 modules > 3 ERROR: "__st_r13_to_r20" [sound/usb/snd-usbmidi-lib.ko] undefined! Yes we know about this already. This is to do with libgcc linkage. The fix is non trivial - I'll get back to you on this. For now disable CONFIG_CC_OPTIMIZE_FOR_SIZE. -Vineet ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Portable assmbler code - newline 2013-10-27 7:28 ` Portable assmbler code - newline Vineet Gupta @ 2013-10-27 12:34 ` Chen Gang 2013-10-27 13:57 ` Chen Gang 0 siblings, 1 reply; 7+ messages in thread From: Chen Gang @ 2013-10-27 12:34 UTC (permalink / raw) To: Vineet Gupta Cc: Geert Uytterhoeven, Richard Weinberger, Joern Rennecke, James Hogan, Rusty Russell, Takashi Iwai, Vineet Gupta, jeremy.bennett@embecosm.com, linux-kernel@vger.kernel.org, Claudiu Zissulescu, Francois Bedard, Sam Ravnborg, Joe Perches, linux-arch@vger.kernel.org On 10/27/2013 03:28 PM, Vineet Gupta wrote: > On 10/26/2013 07:08 PM, Chen Gang wrote: >> On 10/25/2013 01:10 PM, Vineet Gupta wrote: >>> Eh ! My untested patch was broken but not because of what you mentioned. >>> >>> For ARC, the ; negating the newline annotation. So the following works (backquote >>> is new line for ARC) >>> >>> diff --git a/arch/arc/include/asm/linkage.h b/arch/arc/include/asm/linkage.h >>> index 0283e9e44e0d..b3eea2999322 100644 >>> --- a/arch/arc/include/asm/linkage.h >>> +++ b/arch/arc/include/asm/linkage.h >>> @@ -9,6 +9,8 @@ >>> #ifndef __ASM_LINKAGE_H >>> #define __ASM_LINKAGE_H >>> >>> +#define __ARCH_NL ` >>> + >>> #ifdef __ASSEMBLY__ >>> >>> >>> diff --git a/include/linux/linkage.h b/include/linux/linkage.h >>> index d3e8ad23a8e0..969e70ad231a 100644 >>> --- a/include/linux/linkage.h >>> +++ b/include/linux/linkage.h >>> @@ -6,6 +6,10 @@ >>> #include <linux/export.h> >>> #include <asm/linkage.h> >>> >>> +#ifndef __ARCH_NL >>> +#define __ARCH_NL ; >>> +#endif >>> + >>> #ifdef __cplusplus >>> #define CPP_ASMLINKAGE extern "C" >>> #else >>> @@ -75,7 +79,7 @@ >>> >>> #ifndef ENTRY >>> #define ENTRY(name) \ >>> - .globl name; \ >>> + .globl name __ARCH_NL \ >>> ALIGN; \ >> >> Do we also need consider about "ALIGN;"? > > Right - as I said already, above was not a formal patch but a RFC whether we are > on right track. The proper fix will have to audit all such places. > > >>> name: >>> #endif >>> >> >> For next-20130927 tree, do we also need consider about WEAK, ENDPROC? > > Indeed. > > >> I am not quite sure about it, but I will try. > > So you volunteer to send out a patch base don __ARCH_NL I proposed above ? > > OK, I will/should try. Hmm... I am 'almost' a volunteer: my company support what I have done for Public Open Source, they treat it as important thing. Now you are mainly focusing on arc, and I want/try to focus on kernel wide. This patch belongs to kernel wide, and at least now, nobody rejects me for it, so I will/should try. >> Now, I am just analyzing >> another issue -- maybe the last issue for allmodconfig under arc, which >> may be related with this patch, the errors are: >> >> 1 Building modules, stage 2. >> 2 MODPOST 2994 modules >> 3 ERROR: "__st_r13_to_r20" [sound/usb/snd-usbmidi-lib.ko] undefined! > > Yes we know about this already. This is to do with libgcc linkage. The fix is non > trivial - I'll get back to you on this. For now disable CONFIG_CC_OPTIMIZE_FOR_SIZE. > OK, thank you for your valuable information in time, at least, it saves my time resources, after pass this issue, hope our arc can pass allmodconfig. :-) > -Vineet > -- > To unsubscribe from this list: send the line "unsubscribe linux-arch" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Thanks. -- Chen Gang -- Chen Gang ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Portable assmbler code - newline 2013-10-27 12:34 ` Chen Gang @ 2013-10-27 13:57 ` Chen Gang 0 siblings, 0 replies; 7+ messages in thread From: Chen Gang @ 2013-10-27 13:57 UTC (permalink / raw) To: Chen Gang Cc: Vineet Gupta, Geert Uytterhoeven, Richard Weinberger, Joern Rennecke, James Hogan, Rusty Russell, Takashi Iwai, Vineet Gupta, jeremy.bennett@embecosm.com, linux-kernel@vger.kernel.org, Claudiu Zissulescu, Francois Bedard, Sam Ravnborg, Joe Perches, linux-arch@vger.kernel.org On 10/27/2013 08:34 PM, Chen Gang wrote: > On 10/27/2013 03:28 PM, Vineet Gupta wrote: >> On 10/26/2013 07:08 PM, Chen Gang wrote: >>> On 10/25/2013 01:10 PM, Vineet Gupta wrote: >>>> Eh ! My untested patch was broken but not because of what you mentioned. >>>> >>>> For ARC, the ; negating the newline annotation. So the following works (backquote >>>> is new line for ARC) >>>> >>>> diff --git a/arch/arc/include/asm/linkage.h b/arch/arc/include/asm/linkage.h >>>> index 0283e9e44e0d..b3eea2999322 100644 >>>> --- a/arch/arc/include/asm/linkage.h >>>> +++ b/arch/arc/include/asm/linkage.h >>>> @@ -9,6 +9,8 @@ >>>> #ifndef __ASM_LINKAGE_H >>>> #define __ASM_LINKAGE_H >>>> >>>> +#define __ARCH_NL ` >>>> + >>>> #ifdef __ASSEMBLY__ >>>> >>>> >>>> diff --git a/include/linux/linkage.h b/include/linux/linkage.h >>>> index d3e8ad23a8e0..969e70ad231a 100644 >>>> --- a/include/linux/linkage.h >>>> +++ b/include/linux/linkage.h >>>> @@ -6,6 +6,10 @@ >>>> #include <linux/export.h> >>>> #include <asm/linkage.h> >>>> >>>> +#ifndef __ARCH_NL >>>> +#define __ARCH_NL ; >>>> +#endif >>>> + >>>> #ifdef __cplusplus >>>> #define CPP_ASMLINKAGE extern "C" >>>> #else >>>> @@ -75,7 +79,7 @@ >>>> >>>> #ifndef ENTRY >>>> #define ENTRY(name) \ >>>> - .globl name; \ >>>> + .globl name __ARCH_NL \ >>>> ALIGN; \ >>> >>> Do we also need consider about "ALIGN;"? >> >> Right - as I said already, above was not a formal patch but a RFC whether we are >> on right track. The proper fix will have to audit all such places. >> >> >>>> name: >>>> #endif >>>> >>> >>> For next-20130927 tree, do we also need consider about WEAK, ENDPROC? >> >> Indeed. >> >> >>> I am not quite sure about it, but I will try. >> >> So you volunteer to send out a patch base don __ARCH_NL I proposed above ? >> >> > > OK, I will/should try. > > Hmm... I am 'almost' a volunteer: my company support what I have done > for Public Open Source, they treat it as important thing. > > Now you are mainly focusing on arc, and I want/try to focus on kernel > wide. This patch belongs to kernel wide, and at least now, nobody > rejects me for it, so I will/should try. > > >>> Now, I am just analyzing >>> another issue -- maybe the last issue for allmodconfig under arc, which >>> may be related with this patch, the errors are: >>> >>> 1 Building modules, stage 2. >>> 2 MODPOST 2994 modules >>> 3 ERROR: "__st_r13_to_r20" [sound/usb/snd-usbmidi-lib.ko] undefined! >> >> Yes we know about this already. This is to do with libgcc linkage. The fix is non >> trivial - I'll get back to you on this. For now disable CONFIG_CC_OPTIMIZE_FOR_SIZE. >> > > OK, thank you for your valuable information in time, at least, it saves > my time resources, after pass this issue, hope our arc can pass > allmodconfig. > > :-) > In "include/asm-generic/vmlinux.lds.h", I guess "*(...)" also can express an individual line, is it generic enough to arc, too? Thanks. >> -Vineet >> -- >> To unsubscribe from this list: send the line "unsubscribe linux-arch" in >> the body of a message to majordomo@vger.kernel.org >> More majordomo info at http://vger.kernel.org/majordomo-info.html >> > > Thanks. > -- Chen Gang ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-10-27 13:58 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <523FD9E7.3050303@asianux.com>
[not found] ` <523FDBD7.4040602@asianux.com>
[not found] ` <C2D7FE5348E1B147BCA15975FBA2307514DED9@IN01WEMBXA.internal.synopsys.com>
[not found] ` <523FE578.5060801@asianux.com>
[not found] ` <52672DAC.1030307@asianux.com>
[not found] ` <CAMqJFCou4SObPni5Lb_tX=0hQ__kF_9MLDC-6a1opptc9dxT-A@mail.gmail.com>
[not found] ` <52673E41.6040606@asianux.com>
[not found] ` <5267AF98.1010800@asianux.com>
[not found] ` <5268B0B1.9050009@asianux.com>
[not found] ` <CAFLxGvzERDqwZhb_5d=bXKmqz6-Yrema_TLMTM7rjyeFeDJG_w@mail.gmail.com>
2013-10-24 17:28 ` Portable assmbler code - newline (was Re: [PATCH] kernel/modsign_certificate.S: use real contents instead of macro GLOBAL()) Vineet Gupta
2013-10-24 19:41 ` Geert Uytterhoeven
2013-10-25 5:10 ` Vineet Gupta
2013-10-26 13:38 ` Chen Gang
2013-10-27 7:28 ` Portable assmbler code - newline Vineet Gupta
2013-10-27 12:34 ` Chen Gang
2013-10-27 13:57 ` Chen Gang
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).