[PATCH] macintosh: Add missing of_node_get() in do_attach()

2022-06-21 Thread Liang He
We need a of_node_get() for of_find_compatible_node() to keep refcount balance. Signed-off-by: Liang He --- drivers/macintosh/therm_windtunnel.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/macintosh/therm_windtunnel.c b/drivers/macintosh/therm_windtunnel.c index 9226b74fa08f..

Re: [PATCH RFC] drivers/usb/ehci-fsl: Fix interrupt setup in host mode.

2022-06-21 Thread Greg KH
On Tue, Jun 21, 2022 at 11:09:41PM +0100, Darren Stevens wrote: > In patch a1a2b7125e1079 (Drop static setup of IRQ resource from DT > core) we stopped platform_get_resource() from returning the IRQ, as all > drivers were supposed to have switched to platform_get_irq() > Unfortunately the Freescale

[PATCH kernel] KVM: PPC: Book3s: Fix warning about xics_rm_h_xirr_x

2022-06-21 Thread Alexey Kardashevskiy
This fixes "no previous prototype": arch/powerpc/kvm/book3s_hv_rm_xics.c:482:15: warning: no previous prototype for 'xics_rm_h_xirr_x' [-Wmissing-prototypes] Reported by the kernel test robot. Fixes: b22af9041927 ("KVM: PPC: Book3s: Remove real mode interrupt controller hcalls handlers") Signed

Re: [PATCHv2 1/2] mm: eliminate ifdef of HAVE_IOREMAP_PROT in .c files

2022-06-21 Thread kernel test robot
Hi Wang, Thank you for the patch! Yet something to improve: [auto build test ERROR on akpm-mm/mm-everything] url: https://github.com/intel-lab-lkp/linux/commits/Wang-Wenhu/mm-eliminate-ifdef-of-HAVE_IOREMAP_PROT-in-c-files/20220615-140135 base: https://git.kernel.org/pub/scm/linux/kernel/g

Re: [PATCH v5] powerpc/powernv: wire up rng during setup_arch

2022-06-21 Thread Michael Ellerman
Christophe Leroy writes: > Le 21/06/2022 à 20:47, Jason A. Donenfeld a écrit : >> On Tue, Jun 21, 2022 at 06:33:11PM +, Christophe Leroy wrote: >>> Le 21/06/2022 à 16:08, Jason A. Donenfeld a écrit : The platform's RNG must be available before random_init() in order to be useful for

Re: [PATCHv2 1/2] mm: eliminate ifdef of HAVE_IOREMAP_PROT in .c files

2022-06-21 Thread kernel test robot
Hi Wang, Thank you for the patch! Yet something to improve: [auto build test ERROR on akpm-mm/mm-everything] url: https://github.com/intel-lab-lkp/linux/commits/Wang-Wenhu/mm-eliminate-ifdef-of-HAVE_IOREMAP_PROT-in-c-files/20220615-140135 base: https://git.kernel.org/pub/scm/linux/kernel/g

[PATCH v2 4/4] hugetlb: Lazy page table copies in fork()

2022-06-21 Thread Mike Kravetz
Lazy page table copying at fork time was introduced with commit d992895ba2b2 ("[PATCH] Lazy page table copies in fork()"). At the time, hugetlb was very new and did not support page faulting. As a result, it was excluded. When full page fault support was added for hugetlb, the exclusion was not

[PATCH v2 0/4] hugetlb: speed up linear address scanning

2022-06-21 Thread Mike Kravetz
At unmap, fork and remap time hugetlb address ranges are linearly scanned. We can optimize these scans if the ranges are sparsely populated. Also, enable page table "Lazy copy" for hugetlb at fork. NOTE: Architectures not defining CONFIG_ARCH_WANT_GENERAL_HUGETLB need to add an arch specific ver

[PATCH v2 3/4] hugetlb: do not update address in huge_pmd_unshare

2022-06-21 Thread Mike Kravetz
As an optimization for loops sequentially processing hugetlb address ranges, huge_pmd_unshare would update a passed address if it unshared a pmd. Updating a loop control variable outside the loop like this is generally a bad idea. These loops are now using hugetlb_mask_last_page to optimize scann

[PATCH v2 2/4] arm64/hugetlb: Implement arm64 specific hugetlb_mask_last_page

2022-06-21 Thread Mike Kravetz
From: Baolin Wang The HugeTLB address ranges are linearly scanned during fork, unmap and remap operations, and the linear scan can skip to the end of range mapped by the page table page if hitting a non-present entry, which can help to speed linear scanning of the HugeTLB address ranges. So huge

[PATCH v2 1/4] hugetlb: skip to end of PT page mapping when pte not present

2022-06-21 Thread Mike Kravetz
HugeTLB address ranges are linearly scanned during fork, unmap and remap operations. If a non-present entry is encountered, the code currently continues to the next huge page aligned address. However, a non-present entry implies that the page table page for that entry is not present. Therefore,

Re: [PATCH v2 1/4] powerpc/pseries: hvcall.h: add H_WATCHDOG opcode, H_NOOP return code

2022-06-21 Thread Nathan Lynch
Segher Boessenkool writes: > Hi! > > On Tue, Jun 21, 2022 at 09:44:42AM -0500, Nathan Lynch wrote: >> Not a problem to fix in your series, but I guess these should be >> parenthesized i.e. >> >> #define H_P7 (-60) >> #define H_P8 (-61) >> #define H_P9 (-62) >> #define H_N

[PATCH RFC] drivers/usb/ehci-fsl: Fix interrupt setup in host mode.

2022-06-21 Thread Darren Stevens
In patch a1a2b7125e1079 (Drop static setup of IRQ resource from DT core) we stopped platform_get_resource() from returning the IRQ, as all drivers were supposed to have switched to platform_get_irq() Unfortunately the Freescale EHCI driver in host mode got missed. Fix it. Also fix allocation of res

[linux-next:master] BUILD REGRESSION 34d1d36073ea4d4c532e8c8345627a9702be799e

2022-06-21 Thread kernel test robot
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master branch HEAD: 34d1d36073ea4d4c532e8c8345627a9702be799e Add linux-next specific files for 20220621 Error/Warning reports: https://lore.kernel.org/linux-mm/202206212029.yr5m7cd3-...@intel.com https

Re: [PATCH v2 2/3] scsi: BusLogic remove bus_to_virt

2022-06-21 Thread Khalid Aziz
On 6/17/22 06:57, Arnd Bergmann wrote: From: Arnd Bergmann The BusLogic driver is the last remaining driver that relies on the deprecated bus_to_virt() function, which in turn only works on a few architectures, and is incompatible with both swiotlb and iommu support. Before commit 391e2f25601e

Re: [PATCH v5] powerpc/powernv: wire up rng during setup_arch

2022-06-21 Thread Christophe Leroy
Le 21/06/2022 à 20:47, Jason A. Donenfeld a écrit : > Hi Christophe, > > On Tue, Jun 21, 2022 at 06:33:11PM +, Christophe Leroy wrote: >> Le 21/06/2022 à 16:08, Jason A. Donenfeld a écrit : >>> The platform's RNG must be available before random_init() in order to be >>> useful for initial se

Re: [PATCH v5] powerpc/powernv: wire up rng during setup_arch

2022-06-21 Thread Jason A. Donenfeld
Hi Christophe, On Tue, Jun 21, 2022 at 06:33:11PM +, Christophe Leroy wrote: > Le 21/06/2022 à 16:08, Jason A. Donenfeld a écrit : > > The platform's RNG must be available before random_init() in order to be > > useful for initial seeding, which in turn means that it needs to be > > called fro

Re: [PATCH v5] powerpc/powernv: wire up rng during setup_arch

2022-06-21 Thread Christophe Leroy
Le 21/06/2022 à 16:08, Jason A. Donenfeld a écrit : > The platform's RNG must be available before random_init() in order to be > useful for initial seeding, which in turn means that it needs to be > called from setup_arch(), rather than from an init call. Fortunately, > each platform already has

Re: [PATCH v2 1/4] powerpc/pseries: hvcall.h: add H_WATCHDOG opcode, H_NOOP return code

2022-06-21 Thread Segher Boessenkool
Hi! On Tue, Jun 21, 2022 at 09:44:42AM -0500, Nathan Lynch wrote: > Not a problem to fix in your series, but I guess these should be > parenthesized i.e. > > #define H_P7 (-60) > #define H_P8 (-61) > #define H_P9 (-62) > #define H_NOOP(-63) Why? It doe

Re: [PATCH v3 2/5] of: remove __of_node_dup() allocflags parameter

2022-06-21 Thread Bjorn Helgaas
On Mon, Jun 20, 2022 at 12:41:20PM +0200, Clément Léger wrote: > The alloclags are always set to GFP_KERNEL so remove this specific flag. > Moreover, this function is going to be based on one that does not > provides passing gfp flags, so be prepared for this. s/alloclags/allocflags/ s/provides p

Re: [PATCH v2 1/4] powerpc/mobility: Wait for memory transfer to complete

2022-06-21 Thread Nathan Lynch
Laurent Dufour writes: > In pseries_migration_partition(), loop until the memory transfer is > complete. This way the calling drmgr process will not exit earlier, > allowing callbacks to be run only once the migration is fully completed. > > If reading the VASI state is done after the hypervisor

Re: [PATCH] cxl: drop unexpected word "the" in the comments

2022-06-21 Thread Andrew Donnellan
On Tue, 2022-06-21 at 20:53 +0800, Jiang Jian wrote: > there is an unexpected word "the" in the comments that need to be > dropped > > file: drivers/misc/cxl/cxl.h > line: 1107 > +/* check if the given pci_dev is on the the cxl vphb bus */ > changed to > +/* check if the given pci_dev is on the cx

Re: [PATCH v2 4/4] watchdog/pseries-wdt: initial support for H_WATCHDOG-based watchdog timers

2022-06-21 Thread Nathan Lynch
Scott Cheloha writes: > PAPR v2.12 defines a new hypercall, H_WATCHDOG. The hypercall permits > guest control of one or more virtual watchdog timers. The timers have > millisecond granularity. The guest is terminated when a timer > expires. > > This patch adds a watchdog driver for these timers

Re: [PATCH v2 3/4] powerpc/pseries: register pseries-wdt device with platform bus

2022-06-21 Thread Nathan Lynch
Scott Cheloha writes: > PAPR v2.12 defines a new hypercall, H_WATCHDOG. The hypercall permits > guest control of one or more virtual watchdog timers. > > These timers do not conform to PowerPC device conventions. They are > not affixed to any extant bus, nor do they have full representation in >

Re: [PATCH v2 2/4] powerpc/pseries: add FW_FEATURE_WATCHDOG flag

2022-06-21 Thread Nathan Lynch
Scott Cheloha writes: > PAPR v2.12 specifies a new optional function set, "hcall-watchdog", > for the /rtas/ibm,hypertas-functions property. The presence of this > function set indicates support for the H_WATCHDOG hypercall. > > Check for this function set and, if present, set the new > FW_FEATUR

Re: [PATCH v2 1/4] powerpc/pseries: hvcall.h: add H_WATCHDOG opcode, H_NOOP return code

2022-06-21 Thread Nathan Lynch
Scott Cheloha writes: > PAPR v2.12 defines a new hypercall, H_WATCHDOG. The hypercall permits > guest control of one or more virtual watchdog timers. > > Add the opcode for the H_WATCHDOG hypercall to hvcall.h. While here, > add a definition for H_NOOP, a possible return code for H_WATCHDOG. > >

[PATCH v5] powerpc/powernv: wire up rng during setup_arch

2022-06-21 Thread Jason A. Donenfeld
The platform's RNG must be available before random_init() in order to be useful for initial seeding, which in turn means that it needs to be called from setup_arch(), rather than from an init call. Fortunately, each platform already has a setup_arch function pointer, which means we can wire it up t

Re: [PATCH 4/4] ASoC: wm8904: add DMIC support

2022-06-21 Thread Mark Brown
On Mon, Jun 20, 2022 at 07:53:56PM +, Pierluigi Passaro wrote: > > This means that DMICDAT2 is not usefully selectable at runtime, you've > > got IN1 as digital and IN2 as analogue, so while the DMIC/ADC switch is > > useful the DMIC1/2 switch is not. > A customer could have the following wor

[PATCH] powerpc/pseries: Hold reference and fix refcount leak bugs

2022-06-21 Thread Liang He
In pseries_cpuhp_cache_use_count() and pseries_cpuhp_detach_nodes(), we need carefully hold the reference returned by of_find_next_cache_node() and use it to call of_node_put() to keep refcount balance. Signed-off-by: Liang He --- arch/powerpc/platforms/pseries/hotplug-cpu.c | 15 +++

Re: [PATCH v5 1/5] powerpc/kexec: make update_cpus_node non-static

2022-06-21 Thread Laurent Dufour
On 20/06/2022, 09:01:02, Sourabh Jain wrote: > Make the update_cpus_node function non-static and export it for > usage in other kexec components. > > The update_cpus_node definition is moved to core_64.c so that it > can be used with both kexec_load and kexec_file_load system calls. > > No functi

Re: [PATCH v2 2/3] scsi: BusLogic remove bus_to_virt

2022-06-21 Thread Hannes Reinecke
On 6/17/22 14:57, Arnd Bergmann wrote: From: Arnd Bergmann The BusLogic driver is the last remaining driver that relies on the deprecated bus_to_virt() function, which in turn only works on a few architectures, and is incompatible with both swiotlb and iommu support. Before commit 391e2f25601e

Re: [PATCH v2 1/3] scsi: dpt_i2o: drop stale VIRT_TO_BUS dependency

2022-06-21 Thread Hannes Reinecke
On 6/17/22 14:57, Arnd Bergmann wrote: From: Arnd Bergmann The dpt_i2o driver was fixed to stop using virt_to_bus() in 2008, but it still has a stale reference in an error handling code path that could never work. Fix it up to build without VIRT_TO_BUS and remove the Kconfig dependency. The a

[PATCH] powerpc/83xx: Hold the reference returned by of_find_compatible_node

2022-06-21 Thread Liang He
In mpc832x_spi_init(), we should hold the reference returned by of_find_compatible_node() and use it to call of_node_put() for refcount balance. Signed-off-by: Liang He --- arch/powerpc/platforms/83xx/mpc832x_rdb.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/pow

[PATCH] powerpc/512x: Hold the reference returned by of_find_compatible_node

2022-06-21 Thread Liang He
In mpc5121_clk_provide_migration_support(), we need to hold the reference returned by of_find_compatible_node() and use it to call of_node_put for refcount balance. Signed-off-by: Liang He --- arch/powerpc/platforms/512x/clock-commonclk.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(

[PATCH] powerpc/cell: Hold reference returned by of_find_node_by_xxx APIs

2022-06-21 Thread Liang He
In cell_iommu_init_disabled() and cbe_get_be_node(), we need to hold the reference returned by of_find_node_by_xxx APIs and use it to call of_node_put() for refcount balance. Signed-off-by: Liang He --- arch/powerpc/platforms/cell/cbe_regs.c | 10 -- arch/powerpc/platforms/cell/iommu.c