Re: [alsa-devel] [PATCH V6 3/4] ASoC: pcm_dmaengine: Extract snd_dmaengine_pcm_refine_runtime_hwparams

2020-01-16 Thread Shengjiu Wang
Hi On Thu, Jan 16, 2020 at 1:56 PM John Stultz wrote: > > On Wed, Jan 8, 2020 at 8:58 PM John Stultz wrote: > > On Thu, Sep 26, 2019 at 6:50 PM Shengjiu Wang wrote: > > > > > > When set the runtime hardware parameters, we may need to query > > > the capability of DMA to complete the

Re: [PATCH RESEND v4] reboot: support offline CPUs before reboot

2020-01-16 Thread Hsin-Yi Wang
On Fri, Jan 17, 2020 at 12:16 PM Rob Landley wrote: > > On 1/14/20 5:06 AM, Hsin-Yi Wang wrote: > > This patch adds a config ARCH_OFFLINE_CPUS_ON_REBOOT, which would offline > > cpus in > > migrate_to_reboot_cpu(). If non reboot cpus are all offlined here, the loop > > for > > checking online

Re: [PATCH RESEND v4] reboot: support offline CPUs before reboot

2020-01-16 Thread Rob Landley
On 1/14/20 5:06 AM, Hsin-Yi Wang wrote: > This patch adds a config ARCH_OFFLINE_CPUS_ON_REBOOT, which would offline > cpus in > migrate_to_reboot_cpu(). If non reboot cpus are all offlined here, the loop > for > checking online cpus would be an empty loop. If architecture don't enable this >

Re: [PATCH v3] powerpc/mm: Remove kvm radix prefetch workaround for Power9 DD2.2

2020-01-16 Thread Paul Mackerras
On Fri, Dec 06, 2019 at 02:17:22PM +1100, Jordan Niethe wrote: > Commit a25bd72badfa ("powerpc/mm/radix: Workaround prefetch issue with > KVM") introduced a number of workarounds as coming out of a guest with > the mmu enabled would make the cpu would start running in hypervisor > state with the

Re: [PATCH v4 3/9] asm-generic/tlb: Avoid potential double flush

2020-01-16 Thread Andrew Morton
On Thu, 16 Jan 2020 12:19:59 +0530 "Aneesh Kumar K.V" wrote: > On 1/16/20 12:15 PM, Aneesh Kumar K.V wrote: > > From: Peter Zijlstra > > > > Aneesh reported that: > > > > tlb_flush_mmu() > > tlb_flush_mmu_tlbonly() > > tlb_flush() <-- #1 > >

Re: [PATCH 2/2] string.h: fix incompatibility between FORTIFY_SOURCE and KASAN

2020-01-16 Thread kbuild test robot
/20200116-172838 base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 1522d9da40bdfe502c91163e6d769332897201fa config: x86_64-randconfig-s1-20200116 (attached as .config) compiler: gcc-7 (Debian 7.5.0-3) 7.5.0 reproduce: # save the attached .config to linux build tree

[PATCH 1/3] powerpc/tm: Clear the current thread's MSR[TS] after treclaim

2020-01-16 Thread Gustavo Luiz Duarte
After a treclaim, we expect to be in non-transactional state. If we don't immediately clear the current thread's MSR[TS] and we get preempted, then tm_recheckpoint_new_task() will recheckpoint and we get rescheduled in suspended transaction state. When handling a signal caught in transactional

[PATCH 3/3] selftests/powerpc: Don't rely on segfault to rerun the test

2020-01-16 Thread Gustavo Luiz Duarte
The test case tm-signal-context-force-tm expects a segfault to happen on returning from signal handler, and then does a setcontext() to run the test again. However, the test doesn't always segfault, causing the test to run a single time. This patch fixes the test by putting it within a loop and

[PATCH 2/3] selftests/powerpc: Add tm-signal-pagefault test

2020-01-16 Thread Gustavo Luiz Duarte
This test triggers a TM Bad Thing by raising a signal in transactional state and forcing a pagefault to happen in kernelspace when the kernel signal handling code first touches the user signal stack. This is inspired by the test tm-signal-context-force-tm but uses userfaultfd to make the test

Re: [PATCH v2] Fix display of Maximum Memory

2020-01-16 Thread Michael Bringmann
On 1/15/20 11:53 PM, Michael Ellerman wrote: > Michael Bringmann writes: >> Correct overflow problem in calculation+display of Maximum Memory >> value to syscfg where 32bits is insufficient. >> >> Signed-off-by: Michael Bringmann >> --- >> arch/powerpc/platforms/pseries/lparcfg.c | 8

Re: [RFC PATCH v4 08/11] lib: vdso: allow fixed clock mode

2020-01-16 Thread Thomas Gleixner
Andy Lutomirski writes: > On Thu, Jan 16, 2020 at 12:14 PM Thomas Gleixner wrote: >> Some architectures have a fixed clocksource which is known at compile >> time and cannot be replaced or disabled at runtime, e.g. timebase on >> PowerPC. For such cases the clock mode check in the VDSO code is

Re: [PATCH v12 04/22] mm: devmap: refactor 1-based refcounting for ZONE_DEVICE pages

2020-01-16 Thread John Hubbard
On 1/16/20 1:37 AM, Christoph Hellwig wrote: On Wed, Jan 15, 2020 at 01:19:41PM -0800, John Hubbard wrote: On 1/15/20 7:23 AM, Christoph Hellwig wrote: ... I'm really not sold on this scheme. Note that I think it is particularly bad, but it also doesn't seem any better than what we had

Re: [RFC PATCH v3 08/12] lib: vdso: allow arches to provide vdso data pointer

2020-01-16 Thread Andy Lutomirski
On Thu, Jan 16, 2020 at 2:35 AM Thomas Gleixner wrote: > > static __maybe_unused int > __cvdso_data_clock_gettime(clockid_t clock, struct __kernel_timespec *ts, >const struct vdso_data *vd) > { > . > } > > static __maybe_unused int >

Re: [RFC PATCH v4 10/11] lib: vdso: Allow arches to override the ns shift operation

2020-01-16 Thread Andy Lutomirski
On Thu, Jan 16, 2020 at 11:57 AM Thomas Gleixner wrote: > > Andy Lutomirski writes: > > On Thu, Jan 16, 2020 at 9:58 AM Christophe Leroy > > > > Would mul_u64_u64_shr() be a good alternative? Could we adjust it to > > assume the shift is less than 32? That function exists to benefit > > 32-bit

Re: [RFC PATCH v4 08/11] lib: vdso: allow fixed clock mode

2020-01-16 Thread Andy Lutomirski
On Thu, Jan 16, 2020 at 12:14 PM Thomas Gleixner wrote: > > Christophe Leroy writes: > > Can you please adjust the prefix for future patches to lib/vdso: and > start the sentence after the colon with an uppercase letter? > > > On arches like POWERPC, the clock is always the timebase, it > >

Re: [RFC PATCH v4 08/11] lib: vdso: allow fixed clock mode

2020-01-16 Thread Thomas Gleixner
Christophe Leroy writes: Can you please adjust the prefix for future patches to lib/vdso: and start the sentence after the colon with an uppercase letter? > On arches like POWERPC, the clock is always the timebase, it Please spell out architectures. Changelogs are not space constraint. >

Re: [RFC PATCH v4 10/11] lib: vdso: Allow arches to override the ns shift operation

2020-01-16 Thread Thomas Gleixner
Andy Lutomirski writes: > On Thu, Jan 16, 2020 at 9:58 AM Christophe Leroy > > Would mul_u64_u64_shr() be a good alternative? Could we adjust it to > assume the shift is less than 32? That function exists to benefit > 32-bit arches. We'd want mul_u64_u32_shr() for this. The rules for mult and

Re: [PATCH] powerpc: Do not consider weak unresolved symbol relocations as bad

2020-01-16 Thread Alex Ghiti
Hi Stephen, On 1/15/20 6:39 PM, Stephen Rothwell wrote: Hi Alexandre, Thanks for sorting this out. Just a few comments below. On Wed, 15 Jan 2020 15:46:48 -0500 Alexandre Ghiti wrote: # Have Kbuild supply the path to objdump so we handle cross compilation.

Re: [RFC PATCH v4 10/11] lib: vdso: Allow arches to override the ns shift operation

2020-01-16 Thread Andy Lutomirski
On Thu, Jan 16, 2020 at 9:58 AM Christophe Leroy wrote: > > On powerpc/32, GCC (8.1) generates pretty bad code for the > ns >>= vd->shift operation taking into account that the > shift is always < 32 and the upper part of the result is > likely to be nul. GCC makes reversed assumptions

Re: [PATCH vdsotest] Use vdso wrapper for gettimeofday()

2020-01-16 Thread Christophe Leroy
Le 16/01/2020 à 17:56, Nathan Lynch a écrit : Hi Christophe, Christophe Leroy writes: To properly handle errors returned by gettimeofday(), the DO_VDSO_CALL() macro has to be used, otherwise vdsotest misinterpret VDSO function return on error. This has gone unnoticed until now because the

[RFC PATCH v4 11/11] powerpc/32: provide vdso_shift_ns()

2020-01-16 Thread Christophe Leroy
The generic x >> s gives the following result: 18: 35 25 ff e0 addic. r9,r5,-32 1c: 41 80 00 10 blt 2c 20: 7c 64 4c 30 srw r4,r3,r9 24: 38 60 00 00 li r3,0 ... 2c: 54 69 08 3c rlwinm r9,r3,1,0,30 30: 21 45 00 1f subfic r10,r5,31

[RFC PATCH v4 10/11] lib: vdso: Allow arches to override the ns shift operation

2020-01-16 Thread Christophe Leroy
On powerpc/32, GCC (8.1) generates pretty bad code for the ns >>= vd->shift operation taking into account that the shift is always < 32 and the upper part of the result is likely to be nul. GCC makes reversed assumptions considering the shift to be likely >= 32 and the upper part to be like not

[RFC PATCH v4 09/11] powerpc/vdso: override __arch_vdso_capable()

2020-01-16 Thread Christophe Leroy
When the timebase is used, make __arch_vdso_capable() always return true. When the RTC clock is used, make __arch_vdso_capable() always return false. Before the patch: clock-gettime-realtime:vdso: 1086 nsec/call After the patch: clock-gettime-realtime:vdso: 1033 nsec/call Signed-off-by:

[RFC PATCH v4 08/11] lib: vdso: allow fixed clock mode

2020-01-16 Thread Christophe Leroy
On arches like POWERPC, the clock is always the timebase, it cannot be changed on the fly and it is always VDSO capable. Therefore, give arches the opportunity to redefine the way clock_mode is checked by moving the check into an overridable __arch_vdso_capable() macro. Signed-off-by: Christophe

[RFC PATCH v4 07/11] powerpc/vdso: provide vdso data pointer from the ASM caller.

2020-01-16 Thread Christophe Leroy
__arch_get_vdso_data() clobbers the link register, requiring the caller to save it. As the ASM calling function already has to set a stack frame and saves the link register before calling the C vdso function, retriving the vdso data pointer there is lighter. The improvement is significant:

[RFC PATCH v4 06/11] powerpc/vdso: provide inline alternative to __get_datapage()

2020-01-16 Thread Christophe Leroy
__get_datapage() is only a few instructions to retrieve the address of the page where the kernel stores data to the VDSO. By inlining this function into its users, a bl/blr pair and a mflr/mtlr pair is avoided, plus a few reg moves. The improvement is noticeable (about 55 nsec/call on an 8xx)

[RFC PATCH v4 05/11] lib: vdso: allow arches to provide vdso data pointer

2020-01-16 Thread Christophe Leroy
On powerpc, __arch_get_vdso_data() clobbers the link register, requiring the caller to save it. As the parent function already has to set a stack frame and saves the link register before calling the C vdso function, retriving the vdso data pointer there is lighter. Give arches the opportunity to

[RFC PATCH v4 04/11] powerpc/vdso: simplify __get_datapage()

2020-01-16 Thread Christophe Leroy
The VDSO datapage and the text pages are always located immediately next to each other, so it can be hardcoded without an indirection through __kernel_datapage_offset In order to ease things, move the data page in front like other arches, that way there is no need to know the size of the library

[RFC PATCH v4 03/11] lib: vdso: only read hrtimer_res when needed in __cvdso_clock_getres()

2020-01-16 Thread Christophe Leroy
Only perform READ_ONCE(vd[CS_HRES_COARSE].hrtimer_res) for HRES and RAW clocks. Signed-off-by: Christophe Leroy --- lib/vdso/gettimeofday.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/vdso/gettimeofday.c b/lib/vdso/gettimeofday.c index 9563be3cb5fa..8b3084d9a3ec

[RFC PATCH v4 02/11] powerpc/vdso: Switch VDSO to generic C implementation.

2020-01-16 Thread Christophe Leroy
This is a minimalistic conversion to VDSO generic C implementation. On powerpc 8xx, performance is degraded by 40-45% for gettime and by 50% for getres. Optimisations will follow in next patches, some in the core VDSO functions, some in the powerpc arch. powerpc is a bit special for VDSO as

[RFC PATCH v4 01/11] powerpc/64: Don't provide time functions in compat VDSO32

2020-01-16 Thread Christophe Leroy
In order to allow use of generic C VDSO, remove time functions from the 32 bits VDSO on PPC64. This (temporary) removal is needed because powerpc kernel C headers are not prepared for building 32 bits code on PPC64. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/vdso32/Makefile |

[RFC PATCH v4 00/11] powerpc: switch VDSO to C implementation.

2020-01-16 Thread Christophe Leroy
This is a fourth tentative to switch powerpc VDSO to generic C implementation. This version should work on PPC64 (untested). VDSO32 for PPC64 is impossible to build and has been de-activated, because the powerpc ASM header files for C are not prepared to build 32 bits code with CONFIG_PPC64.

[PATCH AUTOSEL 4.4 174/174] powerpc/archrandom: fix arch_get_random_seed_int()

2020-01-16 Thread Sasha Levin
From: Ard Biesheuvel [ Upstream commit b6afd1234cf93aa0d71b4be4788c47534905f0be ] Commit 01c9348c7620ec65 powerpc: Use hardware RNG for arch_get_random_seed_* not arch_get_random_* updated arch_get_random_[int|long]() to be NOPs, and moved the hardware RNG backing to

[PATCH AUTOSEL 4.4 115/174] ALSA: aoa: onyx: always initialize register read value

2020-01-16 Thread Sasha Levin
From: Johannes Berg [ Upstream commit f474808acb3c4b30552d9c59b181244e0300d218 ] A lot of places in the driver use onyx_read_register() without checking the return value, and it's been working OK for ~10 years or so, so probably never fails ... Rather than trying to check the return value

[PATCH AUTOSEL 4.4 100/174] powerpc/cacheinfo: add cacheinfo_teardown, cacheinfo_rebuild

2020-01-16 Thread Sasha Levin
From: Nathan Lynch [ Upstream commit d4aa219a074a5abaf95a756b9f0d190b5c03a945 ] Allow external callers to force the cacheinfo code to release all its references to cache nodes, e.g. before processing device tree updates post-migration, and to rebuild the hierarchy afterward. CPU online/offline

Re: [linux-next/mainline][bisected 3acac06][ppc] Oops when unloading mpt3sas driver

2020-01-16 Thread Christoph Hellwig
Hi Abdul, I think the problem is that mpt3sas has some convoluted logic to do some DMA allocations with a 32-bit coherent mask, and then switches to a 63 or 64 bit mask, which is not supported by the DMA API. Can you try the patch below? --- >From 0738b1704ed528497b41b0408325f6828a8e51f6 Mon

[PATCH AUTOSEL 4.4 077/174] powerpc: vdso: Make vdso32 installation conditional in vdso_install

2020-01-16 Thread Sasha Levin
From: Ben Hutchings [ Upstream commit ff6d27823f619892ab96f7461764840e0d786b15 ] The 32-bit vDSO is not needed and not normally built for 64-bit little-endian configurations. However, the vdso_install target still builds and installs it. Add the same config condition as is normally used for

[PATCH AUTOSEL 4.4 070/174] soc/fsl/qe: Fix an error code in qe_pin_request()

2020-01-16 Thread Sasha Levin
From: Dan Carpenter [ Upstream commit 5674a92ca4b7e5a6a19231edd10298d30324cd27 ] We forgot to set "err" on this error path. Fixes: 1a2d397a6eb5 ("gpio/powerpc: Eliminate duplication of of_get_named_gpio_flags()") Signed-off-by: Dan Carpenter Signed-off-by: Li Yang Signed-off-by: Sasha Levin

[PATCH AUTOSEL 4.4 034/174] ASoC: imx-sgtl5000: put of nodes if finding codec fails

2020-01-16 Thread Sasha Levin
From: Stefan Agner [ Upstream commit d9866572486802bc598a3e8576a5231378d190de ] Make sure to properly put the of node in case finding the codec fails. Fixes: 81e8e4926167 ("ASoC: fsl: add sgtl5000 clock support for imx-sgtl5000") Signed-off-by: Stefan Agner Reviewed-by: Daniel Baluta

Re: [PosibleSpam] Re: z constraint in powerpc inline assembly ?

2020-01-16 Thread Gabriel Paubert
On Thu, Jan 16, 2020 at 07:57:29AM -0600, Segher Boessenkool wrote: > On Thu, Jan 16, 2020 at 09:06:08AM +0100, Gabriel Paubert wrote: > > On Thu, Jan 16, 2020 at 07:11:36AM +0100, Christophe Leroy wrote: > > > Hi Segher, > > > > > > I'm trying to see if we could enhance TCP checksum calculations

[PATCH AUTOSEL 4.9 250/251] powerpc/archrandom: fix arch_get_random_seed_int()

2020-01-16 Thread Sasha Levin
From: Ard Biesheuvel [ Upstream commit b6afd1234cf93aa0d71b4be4788c47534905f0be ] Commit 01c9348c7620ec65 powerpc: Use hardware RNG for arch_get_random_seed_* not arch_get_random_* updated arch_get_random_[int|long]() to be NOPs, and moved the hardware RNG backing to

[PATCH AUTOSEL 4.9 246/251] powerpc/powernv: Disable native PCIe port management

2020-01-16 Thread Sasha Levin
From: Oliver O'Halloran [ Upstream commit 9d72dcef891030545f39ad386a30cf91df517fb2 ] On PowerNV the PCIe topology is (currently) managed by the powernv platform code in Linux in cooperation with the platform firmware. Linux's native PCIe port service drivers operate independently of both and

[PATCH AUTOSEL 4.9 174/251] ALSA: aoa: onyx: always initialize register read value

2020-01-16 Thread Sasha Levin
From: Johannes Berg [ Upstream commit f474808acb3c4b30552d9c59b181244e0300d218 ] A lot of places in the driver use onyx_read_register() without checking the return value, and it's been working OK for ~10 years or so, so probably never fails ... Rather than trying to check the return value

[PATCH AUTOSEL 4.9 159/251] perf/ioctl: Add check for the sample_period value

2020-01-16 Thread Sasha Levin
From: Ravi Bangoria [ Upstream commit 913a90bc5a3a06b1f04c337320e9aeee2328dd77 ] perf_event_open() limits the sample_period to 63 bits. See: 0819b2e30ccb ("perf: Limit perf_event_attr::sample_period to 63 bits") Make ioctl() consistent with it. Also on PowerPC, negative sample_period could

[PATCH AUTOSEL 4.9 152/251] powerpc/cacheinfo: add cacheinfo_teardown, cacheinfo_rebuild

2020-01-16 Thread Sasha Levin
From: Nathan Lynch [ Upstream commit d4aa219a074a5abaf95a756b9f0d190b5c03a945 ] Allow external callers to force the cacheinfo code to release all its references to cache nodes, e.g. before processing device tree updates post-migration, and to rebuild the hierarchy afterward. CPU online/offline

[PATCH AUTOSEL 4.9 117/251] powerpc: vdso: Make vdso32 installation conditional in vdso_install

2020-01-16 Thread Sasha Levin
From: Ben Hutchings [ Upstream commit ff6d27823f619892ab96f7461764840e0d786b15 ] The 32-bit vDSO is not needed and not normally built for 64-bit little-endian configurations. However, the vdso_install target still builds and installs it. Add the same config condition as is normally used for

[PATCH AUTOSEL 4.9 110/251] soc/fsl/qe: Fix an error code in qe_pin_request()

2020-01-16 Thread Sasha Levin
From: Dan Carpenter [ Upstream commit 5674a92ca4b7e5a6a19231edd10298d30324cd27 ] We forgot to set "err" on this error path. Fixes: 1a2d397a6eb5 ("gpio/powerpc: Eliminate duplication of of_get_named_gpio_flags()") Signed-off-by: Dan Carpenter Signed-off-by: Li Yang Signed-off-by: Sasha Levin

[PATCH AUTOSEL 4.9 043/251] ASoC: imx-sgtl5000: put of nodes if finding codec fails

2020-01-16 Thread Sasha Levin
From: Stefan Agner [ Upstream commit d9866572486802bc598a3e8576a5231378d190de ] Make sure to properly put the of node in case finding the codec fails. Fixes: 81e8e4926167 ("ASoC: fsl: add sgtl5000 clock support for imx-sgtl5000") Signed-off-by: Stefan Agner Reviewed-by: Daniel Baluta

[PATCH AUTOSEL 4.14 369/371] powerpc/archrandom: fix arch_get_random_seed_int()

2020-01-16 Thread Sasha Levin
From: Ard Biesheuvel [ Upstream commit b6afd1234cf93aa0d71b4be4788c47534905f0be ] Commit 01c9348c7620ec65 powerpc: Use hardware RNG for arch_get_random_seed_* not arch_get_random_* updated arch_get_random_[int|long]() to be NOPs, and moved the hardware RNG backing to

[PATCH AUTOSEL 4.14 360/371] powerpc/powernv: Disable native PCIe port management

2020-01-16 Thread Sasha Levin
From: Oliver O'Halloran [ Upstream commit 9d72dcef891030545f39ad386a30cf91df517fb2 ] On PowerNV the PCIe topology is (currently) managed by the powernv platform code in Linux in cooperation with the platform firmware. Linux's native PCIe port service drivers operate independently of both and

[PATCH AUTOSEL 4.14 257/371] ALSA: aoa: onyx: always initialize register read value

2020-01-16 Thread Sasha Levin
From: Johannes Berg [ Upstream commit f474808acb3c4b30552d9c59b181244e0300d218 ] A lot of places in the driver use onyx_read_register() without checking the return value, and it's been working OK for ~10 years or so, so probably never fails ... Rather than trying to check the return value

[PATCH AUTOSEL 4.14 237/371] perf/ioctl: Add check for the sample_period value

2020-01-16 Thread Sasha Levin
From: Ravi Bangoria [ Upstream commit 913a90bc5a3a06b1f04c337320e9aeee2328dd77 ] perf_event_open() limits the sample_period to 63 bits. See: 0819b2e30ccb ("perf: Limit perf_event_attr::sample_period to 63 bits") Make ioctl() consistent with it. Also on PowerPC, negative sample_period could

[PATCH AUTOSEL 4.14 229/371] powerpc/pseries/mobility: rebuild cacheinfo hierarchy post-migration

2020-01-16 Thread Sasha Levin
From: Nathan Lynch [ Upstream commit e610a466d16a086e321f0bd421e2fc75cff28605 ] It's common for the platform to replace the cache device nodes after a migration. Since the cacheinfo code is never informed about this, it never drops its references to the source system's cache nodes, causing it

[PATCH AUTOSEL 4.14 228/371] powerpc/cacheinfo: add cacheinfo_teardown, cacheinfo_rebuild

2020-01-16 Thread Sasha Levin
From: Nathan Lynch [ Upstream commit d4aa219a074a5abaf95a756b9f0d190b5c03a945 ] Allow external callers to force the cacheinfo code to release all its references to cache nodes, e.g. before processing device tree updates post-migration, and to rebuild the hierarchy afterward. CPU online/offline

[PATCH AUTOSEL 4.14 166/371] powerpc: vdso: Make vdso32 installation conditional in vdso_install

2020-01-16 Thread Sasha Levin
From: Ben Hutchings [ Upstream commit ff6d27823f619892ab96f7461764840e0d786b15 ] The 32-bit vDSO is not needed and not normally built for 64-bit little-endian configurations. However, the vdso_install target still builds and installs it. Add the same config condition as is normally used for

[PATCH AUTOSEL 4.14 155/371] soc/fsl/qe: Fix an error code in qe_pin_request()

2020-01-16 Thread Sasha Levin
From: Dan Carpenter [ Upstream commit 5674a92ca4b7e5a6a19231edd10298d30324cd27 ] We forgot to set "err" on this error path. Fixes: 1a2d397a6eb5 ("gpio/powerpc: Eliminate duplication of of_get_named_gpio_flags()") Signed-off-by: Dan Carpenter Signed-off-by: Li Yang Signed-off-by: Sasha Levin

[PATCH AUTOSEL 4.14 129/371] powerpc/mm: Check secondary hash page table

2020-01-16 Thread Sasha Levin
From: Rashmica Gupta [ Upstream commit 790845e2f12709d273d08ea7a2af7c2593689519 ] We were always calling base_hpte_find() with primary = true, even when we wanted to check the secondary table. mpe: I broke this when refactoring Rashmica's original patch. Fixes: 1515ab932156 ("powerpc/mm: Dump

[PATCH AUTOSEL 4.14 116/371] powerpc/64s: Fix logic when handling unknown CPU features

2020-01-16 Thread Sasha Levin
From: Michael Ellerman [ Upstream commit 8cfaf106918a8c13abb24c641556172afbb9545c ] In cpufeatures_process_feature(), if a provided CPU feature is unknown and enable_unknown is false, we erroneously print that the feature is being enabled and return true, even though no feature has been

[PATCH AUTOSEL 4.14 103/371] KVM: PPC: Release all hardware TCE tables attached to a group

2020-01-16 Thread Sasha Levin
From: Alexey Kardashevskiy [ Upstream commit a67614cc05a5052b265ea48196dab2fce11f5f2e ] The SPAPR TCE KVM device references all hardware IOMMU tables assigned to some IOMMU group to ensure that in-kernel KVM acceleration of H_PUT_TCE can work. The tables are references when an IOMMU group gets

[PATCH AUTOSEL 4.14 062/371] ASoC: imx-sgtl5000: put of nodes if finding codec fails

2020-01-16 Thread Sasha Levin
From: Stefan Agner [ Upstream commit d9866572486802bc598a3e8576a5231378d190de ] Make sure to properly put the of node in case finding the codec fails. Fixes: 81e8e4926167 ("ASoC: fsl: add sgtl5000 clock support for imx-sgtl5000") Signed-off-by: Stefan Agner Reviewed-by: Daniel Baluta

RE: z constraint in powerpc inline assembly ?

2020-01-16 Thread David Laight
> You mean the mpc8xx , but I'm also using the mpc832x which has a e300c2 > core and is capable of executing 2 insns in parallel if not in the same > Unit. That should let you do a memory read and an add. (I can't remember if the ppc has 'add from memory' but that is likely to use both units

[PATCH AUTOSEL 4.14 013/371] powerpc/kgdb: add kgdb_arch_set/remove_breakpoint()

2020-01-16 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit fb978ca207743badfe7efd9eebe68bcbb4969f79 ] Generic implementation fails to remove breakpoints after init when CONFIG_STRICT_KERNEL_RWX is selected: [ 13.251285] KGDB: BP remove failed: c001c338 [ 13.259587] kgdbts: ERROR PUT: end of test buffer on

[PATCH AUTOSEL 4.19 665/671] powerpc/archrandom: fix arch_get_random_seed_int()

2020-01-16 Thread Sasha Levin
From: Ard Biesheuvel [ Upstream commit b6afd1234cf93aa0d71b4be4788c47534905f0be ] Commit 01c9348c7620ec65 powerpc: Use hardware RNG for arch_get_random_seed_* not arch_get_random_* updated arch_get_random_[int|long]() to be NOPs, and moved the hardware RNG backing to

[PATCH AUTOSEL 4.19 655/671] powerpc/powernv: Disable native PCIe port management

2020-01-16 Thread Sasha Levin
From: Oliver O'Halloran [ Upstream commit 9d72dcef891030545f39ad386a30cf91df517fb2 ] On PowerNV the PCIe topology is (currently) managed by the powernv platform code in Linux in cooperation with the platform firmware. Linux's native PCIe port service drivers operate independently of both and

[PATCH AUTOSEL 4.19 557/671] powerpc/mm/mce: Keep irqs disabled during lockless page table walk

2020-01-16 Thread Sasha Levin
From: "Aneesh Kumar K.V" [ Upstream commit d9101bfa6adc831bda8836c4d774820553c14942 ] __find_linux_mm_pte() returns a page table entry pointer after walking the page table without holding locks. To make it safe against a THP split and/or collapse, we disable interrupts around the lockless page

Re: z constraint in powerpc inline assembly ?

2020-01-16 Thread Christophe Leroy
Le 16/01/2020 à 17:21, Segher Boessenkool a écrit : Christophe uses a very primitive 32-bit cpu, not even superscalar. A loop doing adde is pretty much optimal, probably wants some unrolling though. You mean the mpc8xx , but I'm also using the mpc832x which has a e300c2 core and is

[PATCH AUTOSEL 4.19 499/671] powerpc/64s/radix: Fix memory hot-unplug page table split

2020-01-16 Thread Sasha Levin
From: Nicholas Piggin [ Upstream commit 31f210cf42d4b308eacef89b6cb0b1459338b8de ] create_physical_mapping expects physical addresses, but splitting these mapping on hot unplug is supplying virtual (effective) addresses. Fixes: 4dd5f8a99e791 ("powerpc/mm/radix: Split linear mapping on

[PATCH AUTOSEL 4.19 475/671] ALSA: aoa: onyx: always initialize register read value

2020-01-16 Thread Sasha Levin
From: Johannes Berg [ Upstream commit f474808acb3c4b30552d9c59b181244e0300d218 ] A lot of places in the driver use onyx_read_register() without checking the return value, and it's been working OK for ~10 years or so, so probably never fails ... Rather than trying to check the return value

[PATCH AUTOSEL 4.19 432/671] perf/ioctl: Add check for the sample_period value

2020-01-16 Thread Sasha Levin
From: Ravi Bangoria [ Upstream commit 913a90bc5a3a06b1f04c337320e9aeee2328dd77 ] perf_event_open() limits the sample_period to 63 bits. See: 0819b2e30ccb ("perf: Limit perf_event_attr::sample_period to 63 bits") Make ioctl() consistent with it. Also on PowerPC, negative sample_period could

[PATCH AUTOSEL 4.19 416/671] powerpc/pseries/mobility: rebuild cacheinfo hierarchy post-migration

2020-01-16 Thread Sasha Levin
From: Nathan Lynch [ Upstream commit e610a466d16a086e321f0bd421e2fc75cff28605 ] It's common for the platform to replace the cache device nodes after a migration. Since the cacheinfo code is never informed about this, it never drops its references to the source system's cache nodes, causing it

[PATCH AUTOSEL 4.19 415/671] powerpc/cacheinfo: add cacheinfo_teardown, cacheinfo_rebuild

2020-01-16 Thread Sasha Levin
From: Nathan Lynch [ Upstream commit d4aa219a074a5abaf95a756b9f0d190b5c03a945 ] Allow external callers to force the cacheinfo code to release all its references to cache nodes, e.g. before processing device tree updates post-migration, and to rebuild the hierarchy afterward. CPU online/offline

[PATCH AUTOSEL 4.19 319/671] KVM: PPC: Book3S HV: Fix lockdep warning when entering the guest

2020-01-16 Thread Sasha Levin
From: Alexey Kardashevskiy [ Upstream commit 3309bec85e60d60d6394802cb8e183a4f4a72def ] The trace_hardirqs_on() sets current->hardirqs_enabled and from here the lockdep assumes interrupts are enabled although they are remain disabled until the context switches to the guest. Consequent

[PATCH AUTOSEL 4.19 304/671] powerpc: vdso: Make vdso32 installation conditional in vdso_install

2020-01-16 Thread Sasha Levin
From: Ben Hutchings [ Upstream commit ff6d27823f619892ab96f7461764840e0d786b15 ] The 32-bit vDSO is not needed and not normally built for 64-bit little-endian configurations. However, the vdso_install target still builds and installs it. Add the same config condition as is normally used for

[PATCH AUTOSEL 4.19 273/671] soc/fsl/qe: Fix an error code in qe_pin_request()

2020-01-16 Thread Sasha Levin
From: Dan Carpenter [ Upstream commit 5674a92ca4b7e5a6a19231edd10298d30324cd27 ] We forgot to set "err" on this error path. Fixes: 1a2d397a6eb5 ("gpio/powerpc: Eliminate duplication of of_get_named_gpio_flags()") Signed-off-by: Dan Carpenter Signed-off-by: Li Yang Signed-off-by: Sasha Levin

[PATCH AUTOSEL 4.19 233/671] powerpc/mm: Check secondary hash page table

2020-01-16 Thread Sasha Levin
From: Rashmica Gupta [ Upstream commit 790845e2f12709d273d08ea7a2af7c2593689519 ] We were always calling base_hpte_find() with primary = true, even when we wanted to check the secondary table. mpe: I broke this when refactoring Rashmica's original patch. Fixes: 1515ab932156 ("powerpc/mm: Dump

[PATCH AUTOSEL 4.19 210/671] powerpc/64s: Fix logic when handling unknown CPU features

2020-01-16 Thread Sasha Levin
From: Michael Ellerman [ Upstream commit 8cfaf106918a8c13abb24c641556172afbb9545c ] In cpufeatures_process_feature(), if a provided CPU feature is unknown and enable_unknown is false, we erroneously print that the feature is being enabled and return true, even though no feature has been

[PATCH AUTOSEL 4.19 192/671] KVM: PPC: Release all hardware TCE tables attached to a group

2020-01-16 Thread Sasha Levin
From: Alexey Kardashevskiy [ Upstream commit a67614cc05a5052b265ea48196dab2fce11f5f2e ] The SPAPR TCE KVM device references all hardware IOMMU tables assigned to some IOMMU group to ensure that in-kernel KVM acceleration of H_PUT_TCE can work. The tables are references when an IOMMU group gets

[PATCH AUTOSEL 4.19 122/671] ASoC: imx-sgtl5000: put of nodes if finding codec fails

2020-01-16 Thread Sasha Levin
From: Stefan Agner [ Upstream commit d9866572486802bc598a3e8576a5231378d190de ] Make sure to properly put the of node in case finding the codec fails. Fixes: 81e8e4926167 ("ASoC: fsl: add sgtl5000 clock support for imx-sgtl5000") Signed-off-by: Stefan Agner Reviewed-by: Daniel Baluta

Re: [PATCH vdsotest] Use vdso wrapper for gettimeofday()

2020-01-16 Thread Nathan Lynch
Hi Christophe, Christophe Leroy writes: > To properly handle errors returned by gettimeofday(), the > DO_VDSO_CALL() macro has to be used, otherwise vdsotest > misinterpret VDSO function return on error. > > This has gone unnoticed until now because the powerpc VDSO > gettimeofday() always

[PATCH AUTOSEL 4.19 038/671] powerpc/kgdb: add kgdb_arch_set/remove_breakpoint()

2020-01-16 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit fb978ca207743badfe7efd9eebe68bcbb4969f79 ] Generic implementation fails to remove breakpoints after init when CONFIG_STRICT_KERNEL_RWX is selected: [ 13.251285] KGDB: BP remove failed: c001c338 [ 13.259587] kgdbts: ERROR PUT: end of test buffer on

[PATCH AUTOSEL 4.19 034/671] powerpc/pseries/memory-hotplug: Fix return value type of find_aa_index

2020-01-16 Thread Sasha Levin
From: YueHaibing [ Upstream commit b45e9d761ba2d60044b610297e3ef9f947ac157f ] The variable 'aa_index' is defined as an unsigned value in update_lmb_associativity_index(), but find_aa_index() may return -1 when dlpar_clone_property() fails. So change find_aa_index() to return a bool, which

[PATCH AUTOSEL 4.19 023/671] usb: gadget: fsl_udc_core: check allocation return value and cleanup on failure

2020-01-16 Thread Sasha Levin
From: Nicholas Mc Guire [ Upstream commit 4ab2b48c98f2ec9712452d520a381917f91ac3d2 ] The allocation with fsl_alloc_request() and kmalloc() were unchecked fixed this up with a NULL check and appropriate cleanup. Additionally udc->ep_qh_size was reset to 0 on failure of allocation. Similar

[PATCH AUTOSEL 5.4 190/205] powerpc/archrandom: fix arch_get_random_seed_int()

2020-01-16 Thread Sasha Levin
From: Ard Biesheuvel [ Upstream commit b6afd1234cf93aa0d71b4be4788c47534905f0be ] Commit 01c9348c7620ec65 powerpc: Use hardware RNG for arch_get_random_seed_* not arch_get_random_* updated arch_get_random_[int|long]() to be NOPs, and moved the hardware RNG backing to

[PATCH AUTOSEL 5.4 189/205] powerpc/kasan: Fix boot failure with RELOCATABLE && FSL_BOOKE

2020-01-16 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit 71eb40fc53371bc247c8066ae76ad9e22ae1e18d ] When enabling CONFIG_RELOCATABLE and CONFIG_KASAN on FSL_BOOKE, the kernel doesn't boot. relocate_init() requires KASAN early shadow area to be set up because it needs access to the device tree through generic

[PATCH AUTOSEL 5.4 162/205] powerpc/powernv: Disable native PCIe port management

2020-01-16 Thread Sasha Levin
From: Oliver O'Halloran [ Upstream commit 9d72dcef891030545f39ad386a30cf91df517fb2 ] On PowerNV the PCIe topology is (currently) managed by the powernv platform code in Linux in cooperation with the platform firmware. Linux's native PCIe port service drivers operate independently of both and

RE: z constraint in powerpc inline assembly ?

2020-01-16 Thread David Laight
From: Segher Boessenkool > Sent: 16 January 2020 16:22 ... > > However a loop of 'add with carry' instructions may not be the > > fastest code by any means. > > Because the carry flag is needed for every 'adc' you can't do more > > that one adc per clock. > > This limits you to 8 bytes/clock on a

[PATCH AUTOSEL 5.4 099/205] powerpc/security: Fix debugfs data leak on 32-bit

2020-01-16 Thread Sasha Levin
From: Geert Uytterhoeven [ Upstream commit 3b05a1e517e1a8cfda4866ec31d28b2bc4fee4c4 ] "powerpc_security_features" is "unsigned long", i.e. 32-bit or 64-bit, depending on the platform (PPC_FSL_BOOK3E or PPC_BOOK3S_64). Hence casting its address to "u64 *", and calling debugfs_create_x64() is

[PATCH AUTOSEL 5.4 072/205] ASoC: fsl_esai: Add spin lock to protect reset, stop and start

2020-01-16 Thread Sasha Levin
From: Shengjiu Wang [ Upstream commit 35dac627471938eda89fa39ee4ead1f7667e0f57 ] xrun may happen at the end of stream, the trigger->fsl_esai_trigger_stop maybe called in the middle of fsl_esai_hw_reset, this may cause esai in wrong state after stop, and there may be endless xrun interrupt.

Re: z constraint in powerpc inline assembly ?

2020-01-16 Thread Segher Boessenkool
Hi! On Thu, Jan 16, 2020 at 03:54:58PM +, David Laight wrote: > if you are trying to 'loop carry' the 'carry flag' with 'add with carry' > instructions you'll almost certainly need to write the loop in asm. > Since the loop itself is simple, this probably doesn't matter. Agreed. > However a

RE: z constraint in powerpc inline assembly ?

2020-01-16 Thread David Laight
From: Christophe Leroy > Sent: 16 January 2020 06:12 > > I'm trying to see if we could enhance TCP checksum calculations by > splitting inline assembly blocks to give GCC the opportunity to mix it > with other stuff, but I'm getting difficulties with the carry. if you are trying to 'loop carry'

Re: [FSL P5020 P5040 PPC] Onboard SD card doesn't work anymore after the 'mmc-v5.4-2' updates

2020-01-16 Thread Ulf Hansson
On Thu, 16 Jan 2020 at 12:18, Christian Zigotzky wrote: > > Hi All, > > We still need the attached patch for our onboard SD card interface > [1,2]. Could you please add this patch to the tree? No, because according to previous discussion that isn't the correct solution and more importantly it

Re: z constraint in powerpc inline assembly ?

2020-01-16 Thread Segher Boessenkool
Hi! On Thu, Jan 16, 2020 at 07:11:36AM +0100, Christophe Leroy wrote: > I'm trying to see if we could enhance TCP checksum calculations by > splitting inline assembly blocks to give GCC the opportunity to mix it > with other stuff, but I'm getting difficulties with the carry. > > As far as I

Re: z constraint in powerpc inline assembly ?

2020-01-16 Thread Segher Boessenkool
On Thu, Jan 16, 2020 at 09:06:08AM +0100, Gabriel Paubert wrote: > On Thu, Jan 16, 2020 at 07:11:36AM +0100, Christophe Leroy wrote: > > Hi Segher, > > > > I'm trying to see if we could enhance TCP checksum calculations by splitting > > inline assembly blocks to give GCC the opportunity to mix it

Re: [PATCH v5] reboot: support offline CPUs before reboot

2020-01-16 Thread Thomas Gleixner
Hsin-Yi Wang writes: > On Thu, Jan 16, 2020 at 8:30 AM Thomas Gleixner wrote: > We saw this issue on regular reboot (not panic) on arm64: If tick > broadcast and smp_send_stop() happen together and the first broadcast > arrives to some idled CPU that hasn't already executed reboot ipi to > run

[FSL P5020 P5040 PPC] Onboard SD card doesn't work anymore after the 'mmc-v5.4-2' updates

2020-01-16 Thread Christian Zigotzky
Hi All, We still need the attached patch for our onboard SD card interface [1,2]. Could you please add this patch to the tree? Thanks, Christian [1] https://www.spinics.net/lists/linux-mmc/msg56211.html [2] http://forum.hyperion-entertainment.com/viewtopic.php?f=58=4349=20#p49012 diff

[PATCH] powerpc: drmem: avoid NULL pointer dereference when drmem is unavailable

2020-01-16 Thread Libor Pechacek
In KVM guests drmem structure is only zero initialized. Trying to manipulate DLPAR parameters results in a crash in this environment. $ echo "memory add count 1" > /sys/kernel/dlpar Oops: Kernel access of bad area, sig: 11 [#1] LE PAGE_SIZE=64K MMU=Hash SMP NR_CPUS=2048 NUMA pSeries Modules

Re: [RFC PATCH v3 08/12] lib: vdso: allow arches to provide vdso data pointer

2020-01-16 Thread Thomas Gleixner
Christophe Leroy writes: > Le 15/01/2020 à 07:15, Christophe Leroy a écrit : > From your point of view, what should I do: > A/ __arch_get_vdso_data() handled entirely at arch level and arches > handing over the vdso data pointer to generic C VDSO functions all the > time (as in my v2 series) ?

Re: [PATCH] powerpc/xive: discard ESB load value when interrupt is invalid

2020-01-16 Thread Cédric Le Goater
>> You might want to use 'git tag --contains': >> >> [greg@bahia kernel-linus]$ git tag --contains da15c03b047d >> for-linus >> kvm-5.4-2 >> next-20191118 >> next-20191126 >> tags/kvm-5.4-1 >> tags/kvm-5.4-2 >> v5.4 >> v5.4-rc1 > > Or: > > $ git describe --match "v[0-9]*" --contains

Re: [PATCH v12 04/22] mm: devmap: refactor 1-based refcounting for ZONE_DEVICE pages

2020-01-16 Thread Christoph Hellwig
On Wed, Jan 15, 2020 at 01:19:41PM -0800, John Hubbard wrote: > On 1/15/20 7:23 AM, Christoph Hellwig wrote: > ... > > > > I'm really not sold on this scheme. Note that I think it is > > particularly bad, but it also doesn't seem any better than what > > we had before, and it introduced quite a

Re: [PATCH v5 0/4] KASAN for powerpc64 radix

2020-01-16 Thread Christophe Leroy
Le 09/01/2020 à 08:08, Daniel Axtens a écrit : Building on the work of Christophe, Aneesh and Balbir, I've ported KASAN to 64-bit Book3S kernels running on the Radix MMU. This provides full inline instrumentation on radix, but does require that you be able to specify the amount of physically

  1   2   >