Re: [PATCH v9 02/10] Makefile: Prepare for using macros for inline asm

2018-11-12 Thread Logan Gunthorpe
On 10/11/18 03:04 PM, Nadav Amit wrote: > Err.. I hate makefiles and distcc doesn’t make life easier. For instance, if > it sees two source files on the command-line, it freaks out and compiles it > locally. It also has an option to distribute assembly, but it is not enabled > by default. > > A

Re: [PATCH v9 02/10] Makefile: Prepare for using macros for inline asm

2018-11-10 Thread Nadav Amit
ux Kbuild mailing list >> , Stephen Bates >> Subject: Re: [PATCH v9 02/10] Makefile: Prepare for using macros for inline >> asm >> >> >> >> >> On 2018-11-08 12:54 p.m., Nadav Amit wrote: >>> I don’t think the assembly stage needs to

Re: [PATCH v9 02/10] Makefile: Prepare for using macros for inline asm

2018-11-08 Thread Nadav Amit
From: Logan Gunthorpe Sent: November 8, 2018 at 8:00:33 PM GMT > To: Nadav Amit , h...@zytor.com , Ingo > Molnar > Cc: LKML , X86 ML , Sam > Ravnborg , Michal Marek , Thomas > Gleixner , Linux Kbuild mailing list > , Stephen Bates > Subject: Re: [PATCH v9 02/10] Makefi

Re: [PATCH v9 02/10] Makefile: Prepare for using macros for inline asm

2018-11-08 Thread Logan Gunthorpe
On 2018-11-08 12:54 p.m., Nadav Amit wrote: > I don’t think the assembly stage needs to be done locally. gcc can still be > used to deploy the assembler. I am not too familiar with distcc, so I don’t > know whether the preprocessing supports multiple source-files, and whether > it has some stran

Re: [PATCH v9 02/10] Makefile: Prepare for using macros for inline asm

2018-11-08 Thread Nadav Amit
From: Logan Gunthorpe Sent: November 8, 2018 at 5:14:58 PM GMT > To: Nadav Amit , h...@zytor.com , Ingo > Molnar > Cc: LKML , X86 ML , Sam > Ravnborg , Michal Marek , Thomas > Gleixner , Linux Kbuild mailing list > , Stephen Bates > Subject: Re: [PATCH v9 02/10] Makefi

Re: [PATCH v9 02/10] Makefile: Prepare for using macros for inline asm

2018-11-08 Thread Logan Gunthorpe
On 2018-11-07 11:18 p.m., Nadav Amit wrote: >> Apparently gcc will treat them like basic blocks and possibly move them >> around. > > Maybe it is possible to break the compilation of each object into two > stages: first, compile the source without assembly, and then take the > generated .s fil

Re: [PATCH v9 02/10] Makefile: Prepare for using macros for inline asm

2018-11-07 Thread Nadav Amit
From: h...@zytor.com Sent: November 7, 2018 at 9:50:28 PM GMT > To: Logan Gunthorpe , Nadav Amit , > Ingo Molnar > Cc: LKML , X86 ML , Sam > Ravnborg , Michal Marek , Thomas > Gleixner , Linux Kbuild mailing list > , Stephen Bates > Subject: Re: [PATCH v9 02/10] Makefi

Re: [PATCH v9 02/10] Makefile: Prepare for using macros for inline asm

2018-11-07 Thread hpa
On November 7, 2018 1:43:39 PM PST, Logan Gunthorpe wrote: > > >On 2018-11-07 11:56 a.m., Nadav Amit wrote: >> HPA indicated more than once that this is wrong (and that was indeed >my >> initial solution), since it is not guaranteed that the compiler would >put >> the macro assembly before its use

Re: [PATCH v9 02/10] Makefile: Prepare for using macros for inline asm

2018-11-07 Thread Logan Gunthorpe
On 2018-11-07 11:56 a.m., Nadav Amit wrote: > HPA indicated more than once that this is wrong (and that was indeed my > initial solution), since it is not guaranteed that the compiler would put > the macro assembly before its use. Hmm, that's very unfortunate. I don't really understand why the

Re: [PATCH v9 02/10] Makefile: Prepare for using macros for inline asm

2018-11-07 Thread Nadav Amit
From: Logan Gunthorpe Sent: November 7, 2018 at 6:53:02 PM GMT > Subject: Re: [PATCH v9 02/10] Makefile: Prepare for using macros for inline > asm > > > > > On 2018-11-07 11:01 a.m., Nadav Amit wrote: >> Ideas? Do people care about it? > > Just spit balling

Re: [PATCH v9 02/10] Makefile: Prepare for using macros for inline asm

2018-11-07 Thread Logan Gunthorpe
On 2018-11-07 11:01 a.m., Nadav Amit wrote: > Ideas? Do people care about it? Just spit balling, but is there a reason we didn't just put the macros for inline assembly directly in the header? Something like this: asm(".macro ANNOTATE_UNREACHABLE counter:req\n\t" "\\counter:\n\t" "

Re: [PATCH v9 02/10] Makefile: Prepare for using macros for inline asm

2018-11-07 Thread Nadav Amit
From: Logan Gunthorpe Sent: November 6, 2018 at 8:01:31 PM GMT > To: Nadav Amit , Ingo Molnar > Cc: LKML , X86 ML , Sam > Ravnborg , Michal Marek , Thomas > Gleixner , H. Peter Anvin , Linux Kbuild > mailing list , Stephen Bates > > Subject: Re: [PATCH v9 02/10] Makefi

Re: [PATCH v9 02/10] Makefile: Prepare for using macros for inline asm

2018-11-06 Thread Logan Gunthorpe
On 2018-11-06 12:18 p.m., Nadav Amit wrote: > Err.. I don’t have a dist-cc environment. I wonder whether something like > that would do the trick: I tested it to be sure -- but, no, this does not have any affect on distcc. Distcc usually does pre-processing locally and then sends the single out

Re: [PATCH v9 02/10] Makefile: Prepare for using macros for inline asm

2018-11-06 Thread Logan Gunthorpe
On 2018-10-03 3:30 p.m., Nadav Amit wrote: > +ASM_MACRO_FLAGS = -Wa,arch/x86/kernel/macros.s -Wa,- > +export ASM_MACRO_FLAGS > +KBUILD_CFLAGS += $(ASM_MACRO_FLAGS) I'm not sure how much we care about this or what we can do about it, but adding the macros.s to the command line like this has effe

Re: [PATCH v9 02/10] Makefile: Prepare for using macros for inline asm

2018-11-06 Thread Nadav Amit
; Subject: Re: [PATCH v9 02/10] Makefile: Prepare for using macros for inline > asm > > > > > On 2018-10-03 3:30 p.m., Nadav Amit wrote: >> +ASM_MACRO_FLAGS = -Wa,arch/x86/kernel/macros.s -Wa,- >> +export ASM_MACRO_FLAGS >> +KBUILD_CFLAGS += $(ASM_MACRO_FLAG

[PATCH v9 02/10] Makefile: Prepare for using macros for inline asm

2018-10-03 Thread Nadav Amit
Using macros for inline assembly improves both readability and compilation decisions that are distorted by big assembly blocks that use alternative sections. Compile macros.S and use it to assemble all C files. Currently, only x86 will use it. Cc: Sam Ravnborg Cc: Michal Marek Cc: Thomas Gleixne