Re: [PATCH] powerpc/64s: Fix possible corruption on big endian due to pgd/pud_present()

2019-02-17 Thread Michael Ellerman
Segher Boessenkool writes: > Hi all, > > On Sat, Feb 16, 2019 at 09:55:11PM +1100, Balbir Singh wrote: >> On Thu, Feb 14, 2019 at 05:23:39PM +1100, Michael Ellerman wrote: >> > In v4.20 we changed our pgd/pud_present() to check for _PAGE_PRESENT >> > rather than just checking that the value is

Re: [PATCH] powerpc/64s: Fix possible corruption on big endian due to pgd/pud_present()

2019-02-17 Thread Michael Ellerman
Andreas Schwab writes: > On Feb 14 2019, Michael Ellerman wrote: > >> The fix is simple, we need to convert the result of the bitwise && to >> an int before returning it. > > Alternatively, the return type could be changed to bool, so that the > compiler does the right thing by itself. Yes

[GIT PULL] Please pull powerpc/linux.git powerpc-5.0-5 tag

2019-02-17 Thread Michael Ellerman
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Linus, Please pull one more powerpc fix for 5.0: The following changes since commit 5a3840a470c41ec0b85cd36ca80370330656b163: powerpc/papr_scm: Use the correct bind address (2019-02-01 10:13:51 +1100) are available in the git repository at:

Re: powerpc/64s: Fix possible corruption on big endian due to pgd/pud_present()

2019-02-17 Thread Michael Ellerman
On Thu, 2019-02-14 at 06:23:39 UTC, Michael Ellerman wrote: > In v4.20 we changed our pgd/pud_present() to check for _PAGE_PRESENT > rather than just checking that the value is non-zero, e.g.: > > static inline int pgd_present(pgd_t pgd) > { > - return !pgd_none(pgd); > + return

Re: [PATCH] powerpc/64s: Fix possible corruption on big endian due to pgd/pud_present()

2019-02-17 Thread Michael Ellerman
Balbir Singh writes: > On Sat, Feb 16, 2019 at 08:22:12AM -0600, Segher Boessenkool wrote: >> Hi all, >> >> On Sat, Feb 16, 2019 at 09:55:11PM +1100, Balbir Singh wrote: >> > On Thu, Feb 14, 2019 at 05:23:39PM +1100, Michael Ellerman wrote: >> > > In v4.20 we changed our pgd/pud_present() to

Re: [RFC PATCH 3/5] kasan: allow architectures to provide an outline readiness check

2019-02-17 Thread christophe leroy
Le 15/02/2019 à 01:04, Daniel Axtens a écrit : In powerpc (as I understand it), we spend a lot of time in boot running in real mode before MMU paging is initalised. During this time we call a lot of generic code, including printk(). If we try to access the shadow region during this time,

Re: [GIT PULL] Please pull powerpc/linux.git powerpc-5.0-5 tag

2019-02-17 Thread pr-tracker-bot
The pull request you sent on Sun, 17 Feb 2019 19:20:50 +1100: > https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git > tags/powerpc-5.0-5 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/c5f1ac5e9afb199638414be77cbc22eb68e14d97 Thank you! --

Re: [PATCH v3] hugetlb: allow to free gigantic pages regardless of the configuration

2019-02-17 Thread Alex Ghiti
On 2/15/19 12:34 PM, Dave Hansen wrote: -#if (defined(CONFIG_MEMORY_ISOLATION) && defined(CONFIG_COMPACTION)) || defined(CONFIG_CMA) +#ifdef CONFIG_CONTIG_ALLOC /* The below functions must be run on a range from a single zone. */ extern int alloc_contig_range(unsigned long start, unsigned

Re: [RFC PATCH 4/5] powerpc: move KASAN into its own subdirectory

2019-02-17 Thread christophe leroy
Le 15/02/2019 à 01:04, Daniel Axtens a écrit : In preparation for adding ppc64 implementations, break out the code into its own subdirectory. That's not a bad idea, arch/powerpc/mm is rather messy with lot of subarch stuff. I'll take it in my series. Christophe Signed-off-by: Daniel

Re: [PATCH] cpufreq: powernv: fix missing check of return value in init_powernv_pstates()

2019-02-17 Thread Akshay Adiga
On Sat, Feb 16, 2019 at 12:06:23PM -0500, Yangtao Li wrote: > kmalloc() could fail, so insert a check of its return value. And > if it fails, returns -ENOMEM. > > And remove (struct pstate_idx_revmap_data *) to fix coccinelle WARNING > by the way. > > WARNING: casting value returned by memory

Re: [RFC PATCH 5/5] powerpc: KASAN for 64bit Book3E

2019-02-17 Thread christophe leroy
Le 15/02/2019 à 01:04, Daniel Axtens a écrit : Wire up KASAN. Only outline instrumentation is supported. The KASAN shadow area is mapped into vmemmap space: 0x8000 0400 to 0x8000 0600 . To do this we require that vmemmap be disabled. (This is the default in the kernel

[PATCH V2] ASoC: fsl_esai: fix register setting issue in RIGHT_J mode

2019-02-17 Thread S.j. Wang
Fixes commit 43d24e76b698 ("ASoC: fsl_esai: Add ESAI CPU DAI driver") The ESAI_xCR_xWA is xCR's bit, not the xCCR's bit, driver set it to wrong register, correct it. Signed-off-by: Shengjiu Wang Reviewed-by: Fabio Estevam Ackedy-by: Nicolin Chen --- Changes in v2 - add Fixes tag and cc stable

Re: [PATCH 10/11] lib: consolidate the GENERIC_HWEIGHT symbol

2019-02-17 Thread Masahiro Yamada
On Thu, Feb 14, 2019 at 2:41 AM Christoph Hellwig wrote: > > Introduce a new ARCH_HAS_HWEIGHT symbol for alpha and ia64, I think this is really confusing. "ARCH has its own optimized hweight implementation" is not equivalent to "ARCH does not need generic hweight at all". For example,

Re: [PATCH] powerpc/pseries: export timebase register sample in lparcfg

2019-02-17 Thread Tyrel Datwyler
Ping? Any objections to this patch? A fix is already upstream in powerpc-utils to utilize the timebase value if available. -Tyrel On 12/08/2018 03:48 PM, Tyrel Datwyler wrote: > The Processor Utilzation of Resource Registers (PURR) provide an estimate of > resources used by a cpu thread. Section

Re: [PATCH v6] powerpc/64s: reimplement book3s idle code in C

2019-02-17 Thread Paul Mackerras
On Sat, Oct 13, 2018 at 10:04:09PM +1000, Nicholas Piggin wrote: > Reimplement Book3S idle code in C, moving POWER7/8/9 implementation > speific HV idle code to the powernv platform code. > [...] > @@ -2760,21 +2744,47 @@ BEGIN_FTR_SECTION > li r4, LPCR_PECE_HVEE@higher > sldi

Re: [PATCH] cpufreq: powernv: fix missing check of return value in init_powernv_pstates()

2019-02-17 Thread Viresh Kumar
On 16-02-19, 12:06, Yangtao Li wrote: > kmalloc() could fail, so insert a check of its return value. And > if it fails, returns -ENOMEM. > > And remove (struct pstate_idx_revmap_data *) to fix coccinelle WARNING > by the way. > > WARNING: casting value returned by memory allocation function to

Re: [PATCH kernel] powerpc/powernv/sriov: Register IOMMU groups for VFs

2019-02-17 Thread Alexey Kardashevskiy
On 18/02/2019 16:58, Alexey Kardashevskiy wrote: > The compound IOMMU group rework moved iommu_register_group() together in > pnv_pci_ioda_setup_iommu_api() (which is a part of ppc_md.pcibios_fixup). > As the result, pnv_ioda_setup_bus_iommu_group() does not create groups > any more, it only

Re: [PATCH] powerpc/64s: Fix possible corruption on big endian due to pgd/pud_present()

2019-02-17 Thread Balbir Singh
On Sun, Feb 17, 2019 at 07:34:20PM +1100, Michael Ellerman wrote: > Balbir Singh writes: > > On Sat, Feb 16, 2019 at 08:22:12AM -0600, Segher Boessenkool wrote: > >> Hi all, > >> > >> On Sat, Feb 16, 2019 at 09:55:11PM +1100, Balbir Singh wrote: > >> > On Thu, Feb 14, 2019 at 05:23:39PM +1100,

Re: [PATCH v2 6/7] powerpc/eeh: Allow disabling recovery

2019-02-17 Thread Oliver
On Fri, Feb 15, 2019 at 4:58 PM Sam Bobroff wrote: > > On Fri, Feb 15, 2019 at 11:48:16AM +1100, Oliver O'Halloran wrote: > > Currently when we detect an error we automatically invoke the EEH recovery > > handler. This can be annoying when debugging EEH problems, or when working > > on EEH itself

Re: [PATCH] powerpc/pseries: export timebase register sample in lparcfg

2019-02-17 Thread Michael Ellerman
Tyrel Datwyler writes: > Ping? Any objections to this patch? A fix is already upstream in powerpc-utils > to utilize the timebase value if available. I'm slightly wary of adding things to lparcfg as it's world-readable and hard to remove things once they're added (because tools rely on it). But

[PATCH kernel] powerpc/powernv/sriov: Register IOMMU groups for VFs

2019-02-17 Thread Alexey Kardashevskiy
The compound IOMMU group rework moved iommu_register_group() together in pnv_pci_ioda_setup_iommu_api() (which is a part of ppc_md.pcibios_fixup). As the result, pnv_ioda_setup_bus_iommu_group() does not create groups any more, it only adds devices to groups. This works fine for boot time

Re: [PATCH] powerpc/64s: Fix possible corruption on big endian due to pgd/pud_present()

2019-02-17 Thread Michael Ellerman
Balbir Singh writes: > On Sun, Feb 17, 2019 at 07:34:20PM +1100, Michael Ellerman wrote: >> Balbir Singh writes: >> > On Sat, Feb 16, 2019 at 08:22:12AM -0600, Segher Boessenkool wrote: >> >> On Sat, Feb 16, 2019 at 09:55:11PM +1100, Balbir Singh wrote: >> >> > On Thu, Feb 14, 2019 at 05:23:39PM

Re: [RFC PATCH 3/5] kasan: allow architectures to provide an outline readiness check

2019-02-17 Thread Daniel Axtens
christophe leroy writes: > Le 15/02/2019 à 01:04, Daniel Axtens a écrit : >> In powerpc (as I understand it), we spend a lot of time in boot >> running in real mode before MMU paging is initalised. During >> this time we call a lot of generic code, including printk(). If >> we try to access the