Re: [PATCH] powerpc/powernv: Avoid to set EEH_PE_ISOLATED for passed PE
Hi, all After discussing with Gavin offline, it's inappropriate to drop ISOLATED state. Please ignore this patch. Otherwise, somebody will merge that to mainline, which would be a problem. Thanks, Mike On 08/13/2014 07:14 PM, Mike Qiu wrote: When PE passed to guest, and guest EEH occured with this PE, EEH_PE_ISOLATED maybe set in host. It is a big issue when the PE is reused by host, host EEH will not work on this PE because it was set to EEH_PE_ISOLATED unexpectly. Signed-off-by: Mike Qiu --- arch/powerpc/platforms/powernv/eeh-ioda.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/powernv/eeh-ioda.c b/arch/powerpc/platforms/powernv/eeh-ioda.c index c945bed..e88eaf6 100644 --- a/arch/powerpc/platforms/powernv/eeh-ioda.c +++ b/arch/powerpc/platforms/powernv/eeh-ioda.c @@ -371,7 +371,8 @@ static int ioda_eeh_get_pe_state(struct eeh_pe *pe) !(result & EEH_STATE_UNAVAILABLE) && !(result & EEH_STATE_MMIO_ACTIVE) && !(result & EEH_STATE_DMA_ACTIVE) && - !(pe->state & EEH_PE_ISOLATED)) { + !(pe->state & EEH_PE_ISOLATED)&& + !eeh_pe_passed(pe)) { if (phb->freeze_pe) phb->freeze_pe(phb, pe->addr); ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v2] PC, KVM, CMA: Fix regression caused by wrong get_order() use
On 08/14/2014 11:40 PM, Alexander Graf wrote: > > On 14.08.14 07:13, Aneesh Kumar K.V wrote: >> Alexey Kardashevskiy writes: >> >>> fc95ca7284bc54953165cba76c3228bd2cdb9591 claims that there is no >>> functional change but this is not true as it calls get_order() (which >>> takes bytes) where it should have called ilog2() and the kernel stops >>> on VM_BUG_ON(). >>> >>> This replaces get_order() with order_base_2() (round-up version of ilog2). >>> >>> Suggested-by: Paul Mackerras >>> Cc: Alexander Graf >>> Cc: Aneesh Kumar K.V >>> Cc: Joonsoo Kim >>> Cc: Benjamin Herrenschmidt >>> Signed-off-by: Alexey Kardashevskiy >> Reviewed-by: Aneesh Kumar K.V > > So this affects 3.17? Yes. -- Alexey ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH 2/3] MSI: Use __read_msi_msg() instead of read_msi_msg()
Read_msi_msg() only be called in rtas_setup_msi_irqs(), use __read_msi_msg() instead of read_msi_msg for simplification. And rename __read_msi_msg() to read_msi_msg(). Signed-off-by: Yijing Wang CC: Benjamin Herrenschmidt CC: linuxppc-dev@lists.ozlabs.org --- arch/powerpc/platforms/pseries/msi.c |2 +- arch/x86/pci/xen.c |2 +- drivers/pci/msi.c|9 + include/linux/msi.h |3 +-- 4 files changed, 4 insertions(+), 12 deletions(-) diff --git a/arch/powerpc/platforms/pseries/msi.c b/arch/powerpc/platforms/pseries/msi.c index 0c882e8..591650b 100644 --- a/arch/powerpc/platforms/pseries/msi.c +++ b/arch/powerpc/platforms/pseries/msi.c @@ -484,7 +484,7 @@ again: irq_set_msi_desc(virq, entry); /* Read config space back so we can restore after reset */ - read_msi_msg(virq, &msg); + read_msi_msg(entry, &msg); entry->msg = msg; } diff --git a/arch/x86/pci/xen.c b/arch/x86/pci/xen.c index 905956f..4656099 100644 --- a/arch/x86/pci/xen.c +++ b/arch/x86/pci/xen.c @@ -228,7 +228,7 @@ static int xen_hvm_setup_msi_irqs(struct pci_dev *dev, int nvec, int type) return 1; list_for_each_entry(msidesc, &dev->msi_list, list) { - __read_msi_msg(msidesc, &msg); + read_msi_msg(msidesc, &msg); pirq = MSI_ADDR_EXT_DEST_ID(msg.address_hi) | ((msg.address_lo >> MSI_ADDR_DEST_ID_SHIFT) & 0xff); if (msg.data != XEN_PIRQ_MSI_DATA || diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c index 988224f..cbb41d6 100644 --- a/drivers/pci/msi.c +++ b/drivers/pci/msi.c @@ -259,7 +259,7 @@ void default_restore_msi_irqs(struct pci_dev *dev) } } -void __read_msi_msg(struct msi_desc *entry, struct msi_msg *msg) +void read_msi_msg(struct msi_desc *entry, struct msi_msg *msg) { BUG_ON(entry->dev->current_state != PCI_D0); @@ -289,13 +289,6 @@ void __read_msi_msg(struct msi_desc *entry, struct msi_msg *msg) } } -void read_msi_msg(unsigned int irq, struct msi_msg *msg) -{ - struct msi_desc *entry = irq_get_msi_desc(irq); - - __read_msi_msg(entry, msg); -} - void get_cached_msi_msg(struct msi_desc *entry, struct msi_msg *msg) { /* Assert that the cache is valid, assuming that diff --git a/include/linux/msi.h b/include/linux/msi.h index e3adf93..4d7c0f5 100644 --- a/include/linux/msi.h +++ b/include/linux/msi.h @@ -15,10 +15,9 @@ struct irq_data; struct msi_desc; void mask_msi_irq(struct irq_data *data); void unmask_msi_irq(struct irq_data *data); -void __read_msi_msg(struct msi_desc *entry, struct msi_msg *msg); +void read_msi_msg(struct msi_desc *entry, struct msi_msg *msg); void get_cached_msi_msg(struct msi_desc *entry, struct msi_msg *msg); void __write_msi_msg(struct msi_desc *entry, struct msi_msg *msg); -void read_msi_msg(unsigned int irq, struct msi_msg *msg); void write_msi_msg(unsigned int irq, struct msi_msg *msg); struct msi_desc { -- 1.7.1 ___ 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
Re: [RFC PATCH v3 1/4] topology: add support for node_to_mem_node() to determine the fallback node
On 14.08.2014 [09:35:37 -0500], Christoph Lameter wrote: > On Wed, 13 Aug 2014, Nishanth Aravamudan wrote: > > > +++ b/include/linux/topology.h > > @@ -119,11 +119,20 @@ static inline int numa_node_id(void) > > * Use the accessor functions set_numa_mem(), numa_mem_id() and > > cpu_to_mem(). > > */ > > DECLARE_PER_CPU(int, _numa_mem_); > > +extern int _node_numa_mem_[MAX_NUMNODES]; > > Why are these variables starting with an _ ? > Maybe _numa_mem was defined that way because it is typically not defined. > We dont do this in other situations. That's how it was in Joonsoo's patch and I was trying to minimize the changes from his version (beyond making it compile). I can of course update it to not have a prefixing _ if that's preferred. Thanks, Nish ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [RFC PATCH v3 1/4] topology: add support for node_to_mem_node() to determine the fallback node
On Wed, 13 Aug 2014, Nishanth Aravamudan wrote: > +++ b/include/linux/topology.h > @@ -119,11 +119,20 @@ static inline int numa_node_id(void) > * Use the accessor functions set_numa_mem(), numa_mem_id() and cpu_to_mem(). > */ > DECLARE_PER_CPU(int, _numa_mem_); > +extern int _node_numa_mem_[MAX_NUMNODES]; Why are these variables starting with an _ ? Maybe _numa_mem was defined that way because it is typically not defined. We dont do this in other situations. ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v2] PC, KVM, CMA: Fix regression caused by wrong get_order() use
On 14.08.14 07:13, Aneesh Kumar K.V wrote: Alexey Kardashevskiy writes: fc95ca7284bc54953165cba76c3228bd2cdb9591 claims that there is no functional change but this is not true as it calls get_order() (which takes bytes) where it should have called ilog2() and the kernel stops on VM_BUG_ON(). This replaces get_order() with order_base_2() (round-up version of ilog2). Suggested-by: Paul Mackerras Cc: Alexander Graf Cc: Aneesh Kumar K.V Cc: Joonsoo Kim Cc: Benjamin Herrenschmidt Signed-off-by: Alexey Kardashevskiy Reviewed-by: Aneesh Kumar K.V So this affects 3.17? Alex ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH] cpufreq: powernv: Register the driver with reboot notifier
This patch ensures the cpus to kexec/reboot at nominal frequency. Nominal frequency is the highest cpu frequency on PowerPC at which the cores can run without getting throttled. If the host kernel had set the cpus to a low pstate and then it kexecs/reboots to a cpufreq disabled kernel it would cause the target kernel to perform poorly. It will also increase the boot up time of the target kernel. So set the cpus to high pstate, in this case to nominal frequency before rebooting to avoid such scenarios. The reboot notifier will suspend the cpufreq governor and enable nominal frequency to be set during a reboot/kexec similar to the suspend operartion. Signed-off-by: Shilpasri G Bhat Reviewed-by: Preeti U Murthy --- drivers/cpufreq/powernv-cpufreq.c | 16 1 file changed, 16 insertions(+) diff --git a/drivers/cpufreq/powernv-cpufreq.c b/drivers/cpufreq/powernv-cpufreq.c index 379c083..e9f3d3a 100644 --- a/drivers/cpufreq/powernv-cpufreq.c +++ b/drivers/cpufreq/powernv-cpufreq.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -314,9 +315,21 @@ static int powernv_cpufreq_cpu_init(struct cpufreq_policy *policy) for (i = 0; i < threads_per_core; i++) cpumask_set_cpu(base + i, policy->cpus); + policy->suspend_freq = pstate_id_to_freq(powernv_pstate_info.nominal); return cpufreq_table_validate_and_show(policy, powernv_freqs); } +static int powernv_cpufreq_reboot_notifier(struct notifier_block *nb, + unsigned long action, void *unused) +{ + cpufreq_suspend(); + return NOTIFY_DONE; +} + +static struct notifier_block powernv_cpufreq_reboot_nb = { + .notifier_call = powernv_cpufreq_reboot_notifier, +}; + static struct cpufreq_driver powernv_cpufreq_driver = { .name = "powernv-cpufreq", .flags = CPUFREQ_CONST_LOOPS, @@ -325,6 +338,7 @@ static struct cpufreq_driver powernv_cpufreq_driver = { .target_index = powernv_cpufreq_target_index, .get= powernv_cpufreq_get, .attr = powernv_cpu_freq_attr, + .suspend= cpufreq_generic_suspend, }; static int __init powernv_cpufreq_init(void) @@ -342,12 +356,14 @@ static int __init powernv_cpufreq_init(void) return rc; } + register_reboot_notifier(&powernv_cpufreq_reboot_nb); return cpufreq_register_driver(&powernv_cpufreq_driver); } module_init(powernv_cpufreq_init); static void __exit powernv_cpufreq_exit(void) { + unregister_reboot_notifier(&powernv_cpufreq_reboot_nb); cpufreq_unregister_driver(&powernv_cpufreq_driver); } module_exit(powernv_cpufreq_exit); -- 1.9.3 ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH] tools/perf/powerpc: Fix build break
CC arch/powerpc/util/skip-callchain-idx.o arch/powerpc/util/skip-callchain-idx.c: In function ‘check_return_reg’: arch/powerpc/util/skip-callchain-idx.c:55:3: error: implicit declaration of function ‘pr_debug’ [-Werror=implicit-function-declaration] pr_debug("dwarf_frame_register() %s\n", dwarf_errmsg(-1)); Signed-off-by: Aneesh Kumar K.V --- tools/perf/arch/powerpc/util/skip-callchain-idx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/perf/arch/powerpc/util/skip-callchain-idx.c b/tools/perf/arch/powerpc/util/skip-callchain-idx.c index a7c23a4b3778..d73ef8bb08c7 100644 --- a/tools/perf/arch/powerpc/util/skip-callchain-idx.c +++ b/tools/perf/arch/powerpc/util/skip-callchain-idx.c @@ -15,6 +15,7 @@ #include "util/thread.h" #include "util/callchain.h" +#include "util/debug.h" /* * When saving the callchain on Power, the kernel conservatively saves -- 1.9.1 ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH] powerpc/boot: Don't install zImage.* from make install
in commit 29f1aff2c (powerpc: Copy bootable images in the default install script) we changed to copying all the built boot targets based on the assumption that it's backwards compatible. It turns out that debian devived installkernel scripts will barf if not given exactly 4 args. This change reverts make install to just install the vmlinux (we can change the dfault in a seperate patch) and introduces a new make zInstall which works with a more flexible installkernel script. Cc: Grant Likely Signed-off-by: Tony Breeds --- arch/powerpc/boot/Makefile | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile index ccc25ed..8a5bc1c 100644 --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile @@ -389,7 +389,12 @@ $(obj)/zImage: $(addprefix $(obj)/, $(image-y)) $(obj)/zImage.initrd: $(addprefix $(obj)/, $(initrd-y)) @rm -f $@; ln $< $@ +# Only install the vmlinux install: $(CONFIGURE) $(addprefix $(obj)/, $(image-y)) + sh -x $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" vmlinux System.map "$(INSTALL_PATH)" + +# Install the vmlinux and other built boot targets. +zInstall: $(CONFIGURE) $(addprefix $(obj)/, $(image-y)) sh -x $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" vmlinux System.map "$(INSTALL_PATH)" $^ # anything not in $(targets) -- 1.9.3 Yours Tony ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev