Message ID | 20230214074925.228106-11-alexghiti@rivosinc.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | Remove COMMAND_LINE_SIZE from uapi | expand |
On 2/14/23 10:49 AM, Alexandre Ghiti wrote: > From: Palmer Dabbelt <palmer@rivosinc.com> > > As far as I can tell this is not used by userspace and thus should not > be part of the user-visible API. > > Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com> > --- > arch/sparc/include/asm/setup.h | 6 +++++- > arch/sparc/include/uapi/asm/setup.h | 7 ------- > 2 files changed, 5 insertions(+), 8 deletions(-) > > diff --git a/arch/sparc/include/asm/setup.h b/arch/sparc/include/asm/setup.h > index 72205684e51e..d1384ed92547 100644 > --- a/arch/sparc/include/asm/setup.h > +++ b/arch/sparc/include/asm/setup.h > @@ -7,7 +7,11 @@ > > #include <linux/interrupt.h> > > -#include <uapi/asm/setup.h> > +#if defined(__sparc__) && defined(__arch64__) Mhm, I don't think these two can be #define'd simulaneously... > +# define COMMAND_LINE_SIZE 2048 > +#else > +# define COMMAND_LINE_SIZE 256 > +#endif > > extern char reboot_command[]; > > diff --git a/arch/sparc/include/uapi/asm/setup.h b/arch/sparc/include/uapi/asm/setup.h > index 3c208a4dd464..c3cf1b0d30b3 100644 > --- a/arch/sparc/include/uapi/asm/setup.h > +++ b/arch/sparc/include/uapi/asm/setup.h > @@ -6,11 +6,4 @@ > #ifndef _UAPI_SPARC_SETUP_H > #define _UAPI_SPARC_SETUP_H > > -#if defined(__sparc__) && defined(__arch64__) > -# define COMMAND_LINE_SIZE 2048 > -#else > -# define COMMAND_LINE_SIZE 256 > -#endif > - > - > #endif /* _UAPI_SPARC_SETUP_H */ MBR, Sergey
On 2023/2/14 16:50, Sergey Shtylyov wrote: > On 2/14/23 10:49 AM, Alexandre Ghiti wrote: > >> From: Palmer Dabbelt <palmer@rivosinc.com> >> >> As far as I can tell this is not used by userspace and thus should not >> be part of the user-visible API. >> >> Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com> >> --- >> arch/sparc/include/asm/setup.h | 6 +++++- >> arch/sparc/include/uapi/asm/setup.h | 7 ------- >> 2 files changed, 5 insertions(+), 8 deletions(-) >> >> diff --git a/arch/sparc/include/asm/setup.h b/arch/sparc/include/asm/setup.h >> index 72205684e51e..d1384ed92547 100644 >> --- a/arch/sparc/include/asm/setup.h >> +++ b/arch/sparc/include/asm/setup.h >> @@ -7,7 +7,11 @@ >> >> #include <linux/interrupt.h> >> >> -#include <uapi/asm/setup.h> >> +#if defined(__sparc__) && defined(__arch64__) > > Mhm, I don't think these two can be #define'd simulaneously... I believe it's just a SPARC-ism [1] [2] that may look strange and be easily confused for __aarch64__ (notice the extra 'a')... [1]: https://github.com/gcc-mirror/gcc/blob/basepoints/gcc-12/gcc/config/sparc/sparc.h#L301 [2]: https://github.com/llvm/llvm-project/blob/llvmorg-17-init/clang/lib/Basic/Targets/Sparc.cpp#L241
On 2/14/23 11:59 AM, WANG Xuerui wrote: [...] >>> From: Palmer Dabbelt <palmer@rivosinc.com> >>> >>> As far as I can tell this is not used by userspace and thus should not >>> be part of the user-visible API. >>> >>> Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com> >>> --- >>> arch/sparc/include/asm/setup.h | 6 +++++- >>> arch/sparc/include/uapi/asm/setup.h | 7 ------- >>> 2 files changed, 5 insertions(+), 8 deletions(-) >>> >>> diff --git a/arch/sparc/include/asm/setup.h b/arch/sparc/include/asm/setup.h >>> index 72205684e51e..d1384ed92547 100644 >>> --- a/arch/sparc/include/asm/setup.h >>> +++ b/arch/sparc/include/asm/setup.h >>> @@ -7,7 +7,11 @@ >>> #include <linux/interrupt.h> >>> -#include <uapi/asm/setup.h> >>> +#if defined(__sparc__) && defined(__arch64__) >> >> Mhm, I don't think these two can be #define'd simulaneously... > > I believe it's just a SPARC-ism [1] [2] that may look strange and be easily confused for __aarch64__ (notice the extra 'a')... Yeah, sorry, I did confuse it with AArgh64. :-) [...] MNR, Sergey
On Tue, 2023-02-14 at 16:59 +0800, WANG Xuerui wrote: > On 2023/2/14 16:50, Sergey Shtylyov wrote: > > On 2/14/23 10:49 AM, Alexandre Ghiti wrote: > > > > > From: Palmer Dabbelt <palmer@rivosinc.com> > > > > > > As far as I can tell this is not used by userspace and thus should not > > > be part of the user-visible API. > > > > > > Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com> > > > --- > > > arch/sparc/include/asm/setup.h | 6 +++++- > > > arch/sparc/include/uapi/asm/setup.h | 7 ------- > > > 2 files changed, 5 insertions(+), 8 deletions(-) > > > > > > diff --git a/arch/sparc/include/asm/setup.h b/arch/sparc/include/asm/setup.h > > > index 72205684e51e..d1384ed92547 100644 > > > --- a/arch/sparc/include/asm/setup.h > > > +++ b/arch/sparc/include/asm/setup.h > > > @@ -7,7 +7,11 @@ > > > > > > #include <linux/interrupt.h> > > > > > > -#include <uapi/asm/setup.h> > > > +#if defined(__sparc__) && defined(__arch64__) > > > > Mhm, I don't think these two can be #define'd simulaneously... > > I believe it's just a SPARC-ism [1] [2] that may look strange and be > easily confused for __aarch64__ (notice the extra 'a')... Yep, that's correct. On 64-bit Linux/SPARC, gcc/clang define __sparc__ AND __arch64__. Adrian
diff --git a/arch/sparc/include/asm/setup.h b/arch/sparc/include/asm/setup.h index 72205684e51e..d1384ed92547 100644 --- a/arch/sparc/include/asm/setup.h +++ b/arch/sparc/include/asm/setup.h @@ -7,7 +7,11 @@ #include <linux/interrupt.h> -#include <uapi/asm/setup.h> +#if defined(__sparc__) && defined(__arch64__) +# define COMMAND_LINE_SIZE 2048 +#else +# define COMMAND_LINE_SIZE 256 +#endif extern char reboot_command[]; diff --git a/arch/sparc/include/uapi/asm/setup.h b/arch/sparc/include/uapi/asm/setup.h index 3c208a4dd464..c3cf1b0d30b3 100644 --- a/arch/sparc/include/uapi/asm/setup.h +++ b/arch/sparc/include/uapi/asm/setup.h @@ -6,11 +6,4 @@ #ifndef _UAPI_SPARC_SETUP_H #define _UAPI_SPARC_SETUP_H -#if defined(__sparc__) && defined(__arch64__) -# define COMMAND_LINE_SIZE 2048 -#else -# define COMMAND_LINE_SIZE 256 -#endif - - #endif /* _UAPI_SPARC_SETUP_H */