Re: [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly
Hello all: It seems no any additional rejections for it. I guess, I need split the 'big' patch into pieces, and each send to its' related mailing list, so let it not like a spam. And the schedule may like: - Firstly, send patch for "init/Kconfig" to add CPU_*_ENDIAN. If pass checking (hope it can be passed checking), then - Send each related patch to each related architectures which already knew their ENDIAN attributes in config time (24 patches, I guess), then - Make patch for Kbuild to support __BUILDING_TIME_BIG_ENDIAN__, and pass checking (hope I can finish), then - Finish left architectures which need __BUILDING_TIME_BIG_ENDIAN__ (4 patches, I guess). Welcome any ideas, suggestions, or completions. And if no additional reply, I shall not send any additional information any more to avoid spam to other members. Thanks. On 08/24/2014 04:38 PM, Chen Gang wrote: > Hello Maintainers: > > Is this patch OK? If it pass basic checking, please let me know, and I > shall try to make another related patch for KBuild (I can do nothing > related with Kbuild, before get confirmation for this patch). > > Thanks. > > On 8/15/14 17:01, Chen Gang wrote: >> >> >> On 8/15/14 6:14, Chen Gang wrote: >>> On 08/15/2014 02:04 AM, Ralf Baechle wrote: >>> >>> OK, thanks, I assumes when support both endian, the default choice is >>> CPU_BIG_ENDIAN, although no default value for choice (originally, I did >>> worry about it). >>> So I think you can just drop the MIPS segment from your patch. >>> >>> If what I assumes is correct, what you said sounds reasonable to me. >>> >>> >> >> So for me, it is harmless to add CPU_*_ENDIAN explicitly, and can let >> other members don't need think of. >> >> By the way, for sh, it is almost the same case, except it contents the >> default value, for me, it is clear enough, so I skip sh architecture in >> this patch. >> >> >> Thanks >> > -- Chen Gang Open, share, and attitude like air, water, and life which God blessed ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly
Hello Maintainers: Is this patch OK? If it pass basic checking, please let me know, and I shall try to make another related patch for KBuild (I can do nothing related with Kbuild, before get confirmation for this patch). Thanks. On 8/15/14 17:01, Chen Gang wrote: > > > On 8/15/14 6:14, Chen Gang wrote: >> On 08/15/2014 02:04 AM, Ralf Baechle wrote: >>> >> >> OK, thanks, I assumes when support both endian, the default choice is >> CPU_BIG_ENDIAN, although no default value for choice (originally, I did >> worry about it). >> >>> So I think you can just drop the MIPS segment from your patch. >>> >> >> If what I assumes is correct, what you said sounds reasonable to me. >> >> > > So for me, it is harmless to add CPU_*_ENDIAN explicitly, and can let > other members don't need think of. > > By the way, for sh, it is almost the same case, except it contents the > default value, for me, it is clear enough, so I skip sh architecture in > this patch. > > > Thanks > -- Chen Gang Open, share, and attitude like air, water, and life which God blessed ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly
On 8/15/14 6:14, Chen Gang wrote: > On 08/15/2014 02:04 AM, Ralf Baechle wrote: >> > > OK, thanks, I assumes when support both endian, the default choice is > CPU_BIG_ENDIAN, although no default value for choice (originally, I did > worry about it). > >> So I think you can just drop the MIPS segment from your patch. >> > > If what I assumes is correct, what you said sounds reasonable to me. > > So for me, it is harmless to add CPU_*_ENDIAN explicitly, and can let other members don't need think of. By the way, for sh, it is almost the same case, except it contents the default value, for me, it is clear enough, so I skip sh architecture in this patch. Thanks -- Chen Gang Open, share, and attitude like air, water, and life which God blessed ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly
On 8/15/14 9:52, Max Filippov wrote: > On Fri, Aug 15, 2014 at 5:47 AM, Max Filippov wrote: >> Hi Chen, >> >> On Thu, Aug 14, 2014 at 8:54 PM, Chen Gang wrote: >>> Normal architectures: >>> >>> - Big endian: avr32, frv, m68k, openrisc, parisc, s390, sparc >>> >>> - Little endian: alpha, blackfin, cris, hexagon, ia64, metag, mn10300, >>> score, unicore32, x86 >>> >>> - Choose in config time: arc, arm, arm64, c6x, m32r, mips, powerpc, sh >>> >>> Special architectures: >>> >>> - Deside by compiler: microblaze, tile, xtensa. >>> >>> - Deside by building host: um >>> >>> - Next, need improve Kbuild to probe endian to deside whether need mark >>>__BUILDING_TIME_BIG_ENDIAN__ before real config. Please check this comments, thanks. >> >> [...] >> >>> diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig >>> index 3a617af..a3e8f7e 100644 >>> --- a/arch/xtensa/Kconfig >>> +++ b/arch/xtensa/Kconfig >>> @@ -22,6 +22,8 @@ config XTENSA >>> select HAVE_IRQ_TIME_ACCOUNTING >>> select HAVE_PERF_EVENTS >>> select COMMON_CLK >>> + select CPU_BIG_ENDIAN if __BUILDING_TIME_BIG_ENDIAN__ >>> + select CPU_LITTLE_ENDIAN if !CPU_BIG_ENDIAN >>> help >>> Xtensa processors are 32-bit RISC machines designed by Tensilica >>> primarily for embedded systems. These processors are both >> >> I've tested this part and it doesn't select neither CPU_BIG_ENDIAN, >> nor CPU_LITTLE_ENDIAN. And looking into the Kconfig/Kbuild I cound't > > Correction: it always selects CPU_LITTLE_ENDIAN, regardless of the > compiler endianness. > Yeah, at present, it always select CPU_LITTLE_ENDIAN, next, Kbuild need be improved for it, just the comments said. If this patch can be pass checking, I shall improve the Kbuild for it, also will modify some individual drivers to use CPU_*_ENDIAN. I guess, we need Cc to kbuild for getting more ideas, suggestions, or completions. THanks. -- Chen Gang Open, share, and attitude like air, water, and life which God blessed ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly
On Fri, Aug 15, 2014 at 5:47 AM, Max Filippov wrote: > Hi Chen, > > On Thu, Aug 14, 2014 at 8:54 PM, Chen Gang wrote: >> Normal architectures: >> >> - Big endian: avr32, frv, m68k, openrisc, parisc, s390, sparc >> >> - Little endian: alpha, blackfin, cris, hexagon, ia64, metag, mn10300, >> score, unicore32, x86 >> >> - Choose in config time: arc, arm, arm64, c6x, m32r, mips, powerpc, sh >> >> Special architectures: >> >> - Deside by compiler: microblaze, tile, xtensa. >> >> - Deside by building host: um >> >> - Next, need improve Kbuild to probe endian to deside whether need mark >>__BUILDING_TIME_BIG_ENDIAN__ before real config. > > [...] > >> diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig >> index 3a617af..a3e8f7e 100644 >> --- a/arch/xtensa/Kconfig >> +++ b/arch/xtensa/Kconfig >> @@ -22,6 +22,8 @@ config XTENSA >> select HAVE_IRQ_TIME_ACCOUNTING >> select HAVE_PERF_EVENTS >> select COMMON_CLK >> + select CPU_BIG_ENDIAN if __BUILDING_TIME_BIG_ENDIAN__ >> + select CPU_LITTLE_ENDIAN if !CPU_BIG_ENDIAN >> help >> Xtensa processors are 32-bit RISC machines designed by Tensilica >> primarily for embedded systems. These processors are both > > I've tested this part and it doesn't select neither CPU_BIG_ENDIAN, > nor CPU_LITTLE_ENDIAN. And looking into the Kconfig/Kbuild I cound't Correction: it always selects CPU_LITTLE_ENDIAN, regardless of the compiler endianness. > find anything related to __BUILDING_TIME_BIG_ENDIAN__. Am I missing > something? -- Thanks. -- Max ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly
Hi Chen, On Thu, Aug 14, 2014 at 8:54 PM, Chen Gang wrote: > Normal architectures: > > - Big endian: avr32, frv, m68k, openrisc, parisc, s390, sparc > > - Little endian: alpha, blackfin, cris, hexagon, ia64, metag, mn10300, > score, unicore32, x86 > > - Choose in config time: arc, arm, arm64, c6x, m32r, mips, powerpc, sh > > Special architectures: > > - Deside by compiler: microblaze, tile, xtensa. > > - Deside by building host: um > > - Next, need improve Kbuild to probe endian to deside whether need mark >__BUILDING_TIME_BIG_ENDIAN__ before real config. [...] > diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig > index 3a617af..a3e8f7e 100644 > --- a/arch/xtensa/Kconfig > +++ b/arch/xtensa/Kconfig > @@ -22,6 +22,8 @@ config XTENSA > select HAVE_IRQ_TIME_ACCOUNTING > select HAVE_PERF_EVENTS > select COMMON_CLK > + select CPU_BIG_ENDIAN if __BUILDING_TIME_BIG_ENDIAN__ > + select CPU_LITTLE_ENDIAN if !CPU_BIG_ENDIAN > help > Xtensa processors are 32-bit RISC machines designed by Tensilica > primarily for embedded systems. These processors are both I've tested this part and it doesn't select neither CPU_BIG_ENDIAN, nor CPU_LITTLE_ENDIAN. And looking into the Kconfig/Kbuild I cound't find anything related to __BUILDING_TIME_BIG_ENDIAN__. Am I missing something? -- Thanks. -- Max ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly
On 8/15/14 7:12, Vineet Gupta wrote: > On Thursday 14 August 2014 03:22 PM, Chen Gang wrote: >> For many individual modules may need check CPU_LITTLE_ENDIAN or >> CPU_BIG_ENDIAN, which is an architecture's attribute. >> >> Or they have to list many architectures which they support, which they >> don't support. And still, it is not precise. >> >> For architecture API, endian is a main architecture's attribute which >> may be used by outside, so every architecture need let outside know >> about it, explicitly. > > I don't think that is correct. The modules need to use standard API e.g. swab > which will take care of proper endian handling anyways. Why would a module do > anything endian specific outside of those APIs. > For building time, modules can check endians with various API. But for config time, at present, we have no related standard API for it. > And again is this churn just theoretical or do you really have a issue at > hand ! I > would not accept a change for ARC unless you prove that something is broken > (or > atleast potentially broken) ! > An issue for allmodconfig under microblaze, the original patch is below (I guess, not only one module may match this case): Forwarded Message Subject: [PATCH] drivers/isdn/hisax/Kconfig: Let HISAX_NETJET skip microblaze architecture Date: Tue, 05 Aug 2014 02:24:09 +0800 From: Chen Gang To: i...@linux-pingi.de CC: da...@davemloft.net, Jean Delvare , net...@vger.kernel.org, linux-ker...@vger.kernel.org , mon...@monstr.eu For HISAX_NETJET, HISAX_NETJET_U or related config needs !__BIG_ENDIAN, so skip microblaze, just like skip all other architectures which have no CONFIG_*_ENDIAN. The related error (with allmodconfig under microblaze): CC [M] drivers/isdn/hisax/nj_s.o drivers/isdn/hisax/nj_s.c: In function 'setup_netjet_s': drivers/isdn/hisax/nj_s.c:265:2: error: #error "not running on big endian machines now" #error "not running on big endian machines now" ^ Signed-off-by: Chen Gang --- drivers/isdn/hisax/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/isdn/hisax/Kconfig b/drivers/isdn/hisax/Kconfig index 97465ac..eb83d94 100644 --- a/drivers/isdn/hisax/Kconfig +++ b/drivers/isdn/hisax/Kconfig @@ -237,7 +237,7 @@ config HISAX_MIC config HISAX_NETJET bool "NETjet card" - depends on PCI && (BROKEN || !(PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV || (XTENSA && !CPU_LITTLE_ENDIAN))) + depends on PCI && (BROKEN || !(PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV || (XTENSA && !CPU_LITTLE_ENDIAN) || MICROBLAZE)) depends on VIRT_TO_BUS help This enables HiSax support for the NetJet from Traverse @@ -249,7 +249,7 @@ config HISAX_NETJET config HISAX_NETJET_U bool "NETspider U card" - depends on PCI && (BROKEN || !(PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV || (XTENSA && !CPU_LITTLE_ENDIAN))) + depends on PCI && (BROKEN || !(PPC || PARISC || M68K || (MIPS && !CPU_LITTLE_ENDIAN) || FRV || (XTENSA && !CPU_LITTLE_ENDIAN) || MICROBLAZE)) depends on VIRT_TO_BUS help This enables HiSax support for the Netspider U interface ISDN card Thanks. -- Chen Gang Open, share, and attitude like air, water, and life which God blessed ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly
On Thursday 14 August 2014 03:22 PM, Chen Gang wrote: > For many individual modules may need check CPU_LITTLE_ENDIAN or > CPU_BIG_ENDIAN, which is an architecture's attribute. > > Or they have to list many architectures which they support, which they > don't support. And still, it is not precise. > > For architecture API, endian is a main architecture's attribute which > may be used by outside, so every architecture need let outside know > about it, explicitly. I don't think that is correct. The modules need to use standard API e.g. swab which will take care of proper endian handling anyways. Why would a module do anything endian specific outside of those APIs. And again is this churn just theoretical or do you really have a issue at hand ! I would not accept a change for ARC unless you prove that something is broken (or atleast potentially broken) ! -Vineet ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly
On 08/15/2014 02:27 AM, Lennox Wu wrote: > I don't think it's necessary, what's the benfit? > > 2014-08-15 2:21 GMT+08:00 Vineet Gupta : > >> On Thursday 14 August 2014 09:55 AM, Chen Gang wrote: [...] >>> diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig >>> index 9596b0a..e939abd 100644 >>> --- a/arch/arc/Kconfig >>> +++ b/arch/arc/Kconfig >>> @@ -35,6 +35,7 @@ config ARC >>> select OF_EARLY_FLATTREE >>> select PERF_USE_VMALLOC >>> select HAVE_DEBUG_STACKOVERFLOW >>> + select CPU_LITTLE_ENDIAN if !CPU_BIG_ENDIAN >> >> It is not clear what exactly are you trying to fix. What doesn't work w/o >> this >> patch ! >> For many individual modules may need check CPU_LITTLE_ENDIAN or CPU_BIG_ENDIAN, which is an architecture's attribute. Or they have to list many architectures which they support, which they don't support. And still, it is not precise. For architecture API, endian is a main architecture's attribute which may be used by outside, so every architecture need let outside know about it, explicitly. Thanks. -- Chen Gang Open share and attitude like air water and life which God blessed ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly
On 08/15/2014 02:04 AM, Ralf Baechle wrote: > On Fri, Aug 15, 2014 at 12:54:53AM +0800, Chen Gang wrote: > >> Normal architectures: >> >> - Big endian: avr32, frv, m68k, openrisc, parisc, s390, sparc >> >> - Little endian: alpha, blackfin, cris, hexagon, ia64, metag, mn10300, >> score, unicore32, x86 >> >> - Choose in config time: arc, arm, arm64, c6x, m32r, mips, powerpc, sh > > Nak for MIPS. On MIPS Kconfig already always sets one of CPU_BIG_ENDIAN > and CPU_LITTLE_ENDIAN depending on platforms and where both endianess are > supported by a platform, user choice: > > config FOO > bool "foo" > select SYS_SUPPORTS_LITTLE_ENDIAN > > config FOO > bool "foo" > select SYS_SUPPORTS_BIG_ENDIAN > select SYS_SUPPORTS_LITTLE_ENDIAN > [...] > choice > prompt "Endianess selection" > help > Some MIPS machines can be configured for either little or big endian > byte order. These modes require different kernels and a different > Linux distribution. In general there is one preferred byteorder > for a > particular system but some systems are just as commonly used in the > one or the other endianness. > > config CPU_BIG_ENDIAN > bool "Big endian" > depends on SYS_SUPPORTS_BIG_ENDIAN > > config CPU_LITTLE_ENDIAN > bool "Little endian" > depends on SYS_SUPPORTS_LITTLE_ENDIAN > help > > endchoice > OK, thanks, I assumes when support both endian, the default choice is CPU_BIG_ENDIAN, although no default value for choice (originally, I did worry about it). > So I think you can just drop the MIPS segment from your patch. > If what I assumes is correct, what you said sounds reasonable to me. Thanks. -- Chen Gang Open share and attitude like air water and life which God blessed ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly
On Thursday 14 August 2014 09:55 AM, Chen Gang wrote: > Normal architectures: > > - Big endian: avr32, frv, m68k, openrisc, parisc, s390, sparc > > - Little endian: alpha, blackfin, cris, hexagon, ia64, metag, mn10300, > score, unicore32, x86 > > - Choose in config time: arc, arm, arm64, c6x, m32r, mips, powerpc, sh > > Special architectures: > > - Deside by compiler: microblaze, tile, xtensa. > > - Deside by building host: um > > - Next, need improve Kbuild to probe endian to deside whether need mark >__BUILDING_TIME_BIG_ENDIAN__ before real config. > > Another improvements: > > - score: use '\t' instead of ' '. > > - s390: sort the select value in alpha order. > > Signed-off-by: Chen Gang > --- > arch/alpha/Kconfig | 1 + > arch/arc/Kconfig| 1 + > arch/arm/Kconfig| 1 + > arch/arm64/Kconfig | 1 + > arch/avr32/Kconfig | 1 + > arch/blackfin/Kconfig | 1 + > arch/c6x/Kconfig| 1 + > arch/cris/Kconfig | 1 + > arch/frv/Kconfig| 1 + > arch/hexagon/Kconfig| 1 + > arch/ia64/Kconfig | 1 + > arch/m32r/Kconfig | 1 + > arch/m68k/Kconfig | 1 + > arch/metag/Kconfig | 1 + > arch/microblaze/Kconfig | 2 ++ > arch/mips/Kconfig | 1 + > arch/mn10300/Kconfig| 1 + > arch/openrisc/Kconfig | 1 + > arch/parisc/Kconfig | 1 + > arch/powerpc/Kconfig| 1 + > arch/s390/Kconfig | 3 ++- > arch/score/Kconfig | 21 +++-- > arch/sparc/Kconfig | 1 + > arch/tile/Kconfig | 2 ++ > arch/um/Kconfig.common | 2 ++ > arch/unicore32/Kconfig | 1 + > arch/x86/Kconfig| 1 + > arch/xtensa/Kconfig | 2 ++ > init/Kconfig| 6 ++ > 29 files changed, 49 insertions(+), 11 deletions(-) > > diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig > index b7ff9a3..1cb7426 100644 > --- a/arch/alpha/Kconfig > +++ b/arch/alpha/Kconfig > @@ -27,6 +27,7 @@ config ALPHA > select MODULES_USE_ELF_RELA > select ODD_RT_SIGACTION > select OLD_SIGSUSPEND > + select CPU_LITTLE_ENDIAN > help > The Alpha is a 64-bit general-purpose processor designed and > marketed by the Digital Equipment Corporation of blessed memory, > diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig > index 9596b0a..e939abd 100644 > --- a/arch/arc/Kconfig > +++ b/arch/arc/Kconfig > @@ -35,6 +35,7 @@ config ARC > select OF_EARLY_FLATTREE > select PERF_USE_VMALLOC > select HAVE_DEBUG_STACKOVERFLOW > + select CPU_LITTLE_ENDIAN if !CPU_BIG_ENDIAN It is not clear what exactly are you trying to fix. What doesn't work w/o this patch ! -Vineet ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly
I don't think it's necessary, what's the benfit? 2014-08-15 2:21 GMT+08:00 Vineet Gupta : > On Thursday 14 August 2014 09:55 AM, Chen Gang wrote: > > Normal architectures: > > > > - Big endian: avr32, frv, m68k, openrisc, parisc, s390, sparc > > > > - Little endian: alpha, blackfin, cris, hexagon, ia64, metag, mn10300, > > score, unicore32, x86 > > > > - Choose in config time: arc, arm, arm64, c6x, m32r, mips, powerpc, sh > > > > Special architectures: > > > > - Deside by compiler: microblaze, tile, xtensa. > > > > - Deside by building host: um > > > > - Next, need improve Kbuild to probe endian to deside whether need mark > >__BUILDING_TIME_BIG_ENDIAN__ before real config. > > > > Another improvements: > > > > - score: use '\t' instead of ' '. > > > > - s390: sort the select value in alpha order. > > > > Signed-off-by: Chen Gang > > --- > > arch/alpha/Kconfig | 1 + > > arch/arc/Kconfig| 1 + > > arch/arm/Kconfig| 1 + > > arch/arm64/Kconfig | 1 + > > arch/avr32/Kconfig | 1 + > > arch/blackfin/Kconfig | 1 + > > arch/c6x/Kconfig| 1 + > > arch/cris/Kconfig | 1 + > > arch/frv/Kconfig| 1 + > > arch/hexagon/Kconfig| 1 + > > arch/ia64/Kconfig | 1 + > > arch/m32r/Kconfig | 1 + > > arch/m68k/Kconfig | 1 + > > arch/metag/Kconfig | 1 + > > arch/microblaze/Kconfig | 2 ++ > > arch/mips/Kconfig | 1 + > > arch/mn10300/Kconfig| 1 + > > arch/openrisc/Kconfig | 1 + > > arch/parisc/Kconfig | 1 + > > arch/powerpc/Kconfig| 1 + > > arch/s390/Kconfig | 3 ++- > > arch/score/Kconfig | 21 +++-- > > arch/sparc/Kconfig | 1 + > > arch/tile/Kconfig | 2 ++ > > arch/um/Kconfig.common | 2 ++ > > arch/unicore32/Kconfig | 1 + > > arch/x86/Kconfig| 1 + > > arch/xtensa/Kconfig | 2 ++ > > init/Kconfig| 6 ++ > > 29 files changed, 49 insertions(+), 11 deletions(-) > > > > diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig > > index b7ff9a3..1cb7426 100644 > > --- a/arch/alpha/Kconfig > > +++ b/arch/alpha/Kconfig > > @@ -27,6 +27,7 @@ config ALPHA > > select MODULES_USE_ELF_RELA > > select ODD_RT_SIGACTION > > select OLD_SIGSUSPEND > > + select CPU_LITTLE_ENDIAN > > help > > The Alpha is a 64-bit general-purpose processor designed and > > marketed by the Digital Equipment Corporation of blessed memory, > > diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig > > index 9596b0a..e939abd 100644 > > --- a/arch/arc/Kconfig > > +++ b/arch/arc/Kconfig > > @@ -35,6 +35,7 @@ config ARC > > select OF_EARLY_FLATTREE > > select PERF_USE_VMALLOC > > select HAVE_DEBUG_STACKOVERFLOW > > + select CPU_LITTLE_ENDIAN if !CPU_BIG_ENDIAN > > It is not clear what exactly are you trying to fix. What doesn't work w/o > this > patch ! > > -Vineet > ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly
On Fri, Aug 15, 2014 at 12:54:53AM +0800, Chen Gang wrote: > Normal architectures: > > - Big endian: avr32, frv, m68k, openrisc, parisc, s390, sparc > > - Little endian: alpha, blackfin, cris, hexagon, ia64, metag, mn10300, > score, unicore32, x86 > > - Choose in config time: arc, arm, arm64, c6x, m32r, mips, powerpc, sh Nak for MIPS. On MIPS Kconfig already always sets one of CPU_BIG_ENDIAN and CPU_LITTLE_ENDIAN depending on platforms and where both endianess are supported by a platform, user choice: config FOO bool "foo" select SYS_SUPPORTS_LITTLE_ENDIAN config FOO bool "foo" select SYS_SUPPORTS_BIG_ENDIAN select SYS_SUPPORTS_LITTLE_ENDIAN [...] choice prompt "Endianess selection" help Some MIPS machines can be configured for either little or big endian byte order. These modes require different kernels and a different Linux distribution. In general there is one preferred byteorder for a particular system but some systems are just as commonly used in the one or the other endianness. config CPU_BIG_ENDIAN bool "Big endian" depends on SYS_SUPPORTS_BIG_ENDIAN config CPU_LITTLE_ENDIAN bool "Little endian" depends on SYS_SUPPORTS_LITTLE_ENDIAN help endchoice So I think you can just drop the MIPS segment from your patch. Ralf ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH v3] arch: Kconfig: Let all architectures set endian explicitly
Normal architectures: - Big endian: avr32, frv, m68k, openrisc, parisc, s390, sparc - Little endian: alpha, blackfin, cris, hexagon, ia64, metag, mn10300, score, unicore32, x86 - Choose in config time: arc, arm, arm64, c6x, m32r, mips, powerpc, sh Special architectures: - Deside by compiler: microblaze, tile, xtensa. - Deside by building host: um - Next, need improve Kbuild to probe endian to deside whether need mark __BUILDING_TIME_BIG_ENDIAN__ before real config. Another improvements: - score: use '\t' instead of ' '. - s390: sort the select value in alpha order. Signed-off-by: Chen Gang --- arch/alpha/Kconfig | 1 + arch/arc/Kconfig| 1 + arch/arm/Kconfig| 1 + arch/arm64/Kconfig | 1 + arch/avr32/Kconfig | 1 + arch/blackfin/Kconfig | 1 + arch/c6x/Kconfig| 1 + arch/cris/Kconfig | 1 + arch/frv/Kconfig| 1 + arch/hexagon/Kconfig| 1 + arch/ia64/Kconfig | 1 + arch/m32r/Kconfig | 1 + arch/m68k/Kconfig | 1 + arch/metag/Kconfig | 1 + arch/microblaze/Kconfig | 2 ++ arch/mips/Kconfig | 1 + arch/mn10300/Kconfig| 1 + arch/openrisc/Kconfig | 1 + arch/parisc/Kconfig | 1 + arch/powerpc/Kconfig| 1 + arch/s390/Kconfig | 3 ++- arch/score/Kconfig | 21 +++-- arch/sparc/Kconfig | 1 + arch/tile/Kconfig | 2 ++ arch/um/Kconfig.common | 2 ++ arch/unicore32/Kconfig | 1 + arch/x86/Kconfig| 1 + arch/xtensa/Kconfig | 2 ++ init/Kconfig| 6 ++ 29 files changed, 49 insertions(+), 11 deletions(-) diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig index b7ff9a3..1cb7426 100644 --- a/arch/alpha/Kconfig +++ b/arch/alpha/Kconfig @@ -27,6 +27,7 @@ config ALPHA select MODULES_USE_ELF_RELA select ODD_RT_SIGACTION select OLD_SIGSUSPEND + select CPU_LITTLE_ENDIAN help The Alpha is a 64-bit general-purpose processor designed and marketed by the Digital Equipment Corporation of blessed memory, diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig index 9596b0a..e939abd 100644 --- a/arch/arc/Kconfig +++ b/arch/arc/Kconfig @@ -35,6 +35,7 @@ config ARC select OF_EARLY_FLATTREE select PERF_USE_VMALLOC select HAVE_DEBUG_STACKOVERFLOW + select CPU_LITTLE_ENDIAN if !CPU_BIG_ENDIAN config TRACE_IRQFLAGS_SUPPORT def_bool y diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 32cbbd5..3a806b3 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -12,6 +12,7 @@ config ARM select ARCH_WANT_IPC_PARSE_VERSION select BUILDTIME_EXTABLE_SORT if MMU select CLONE_BACKWARDS + select CPU_LITTLE_ENDIAN if !CPU_BIG_ENDIAN select CPU_PM if (SUSPEND || CPU_IDLE) select DCACHE_WORD_ACCESS if HAVE_EFFICIENT_UNALIGNED_ACCESS select GENERIC_ATOMIC64 if (CPU_V7M || CPU_V6 || !CPU_32v6K || !AEABI) diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 62b4ae1..c5a91de 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -17,6 +17,7 @@ config ARM64 select BUILDTIME_EXTABLE_SORT select CLONE_BACKWARDS select COMMON_CLK + select CPU_LITTLE_ENDIAN if !CPU_BIG_ENDIAN select CPU_PM if (SUSPEND || CPU_IDLE) select DCACHE_WORD_ACCESS select GENERIC_CLOCKEVENTS diff --git a/arch/avr32/Kconfig b/arch/avr32/Kconfig index b6878eb..fab44ee 100644 --- a/arch/avr32/Kconfig +++ b/arch/avr32/Kconfig @@ -17,6 +17,7 @@ config AVR32 select GENERIC_CLOCKEVENTS select HAVE_MOD_ARCH_SPECIFIC select MODULES_USE_ELF_RELA + select CPU_BIG_ENDIAN help AVR32 is a high-performance 32-bit RISC microprocessor core, designed for cost-sensitive embedded applications, with particular diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig index ed30699..348f16d 100644 --- a/arch/blackfin/Kconfig +++ b/arch/blackfin/Kconfig @@ -40,6 +40,7 @@ config BLACKFIN select HAVE_MOD_ARCH_SPECIFIC select MODULES_USE_ELF_RELA select HAVE_DEBUG_STACKOVERFLOW + select CPU_LITTLE_ENDIAN config GENERIC_CSUM def_bool y diff --git a/arch/c6x/Kconfig b/arch/c6x/Kconfig index 77ea09b..7e74d14 100644 --- a/arch/c6x/Kconfig +++ b/arch/c6x/Kconfig @@ -17,6 +17,7 @@ config C6X select OF_EARLY_FLATTREE select GENERIC_CLOCKEVENTS select MODULES_USE_ELF_RELA + select CPU_LITTLE_ENDIAN if !CPU_BIG_ENDIAN config MMU def_bool n diff --git a/arch/cris/Kconfig b/arch/cris/Kconfig index 52731e2..405a097 100644 --- a/arch/cris/Kconfig +++ b/arch/cris/Kconfig @@ -52,6 +52,7 @@ config CRIS select CLONE_BACKWARDS2 select OLD_SIGSUSPEND select OLD_SIGACTION + select CPU_LITTLE_ENDIAN config HZ int diff --git a/arch/frv/Kconfig b/arch/frv/Kconfig index 34aa193..aa21ccc 100644 --- a/arch/frv/Kco