Re:Re: [PATCH v3] powerpc:85xx: Add missing of_node_put() in sgy_cst1000

2022-06-16 Thread Liang He
At 2022-06-17 13:37:12, "Christophe JAILLET" wrote: >Le 17/06/2022 à 07:22, Liang He a écrit : >> In gpio_halt_probe(), of_find_matching_node() will return a node >> pointer with refcount incremented. We should use of_node_put() in >> fail path or when it is not used anymore. >> >>

Re: [PATCH v3] powerpc:85xx: Add missing of_node_put() in sgy_cst1000

2022-06-16 Thread Christophe JAILLET
Le 17/06/2022 à 07:22, Liang He a écrit : In gpio_halt_probe(), of_find_matching_node() will return a node pointer with refcount incremented. We should use of_node_put() in fail path or when it is not used anymore. Signed-off-by: Liang He --- arch/powerpc/platforms/85xx/sgy_cts1000.c | 39

Re:Re: [PATCH] powerpc: powernv: Fix refcount leak bug in opal-powercap

2022-06-16 Thread Liang He
At 2022-06-17 13:01:27, "Christophe JAILLET" wrote: >Le 17/06/2022 à 06:20, Liang He a écrit : >> In opal_powercap_init(), of_find_compatible_node() will return >> a node pointer with refcount incremented. We should use of_node_put() >> in fail path or when it is not used anymore. >> >>

[PATCH v3] powerpc:85xx: Add missing of_node_put() in sgy_cst1000

2022-06-16 Thread Liang He
In gpio_halt_probe(), of_find_matching_node() will return a node pointer with refcount incremented. We should use of_node_put() in fail path or when it is not used anymore. Signed-off-by: Liang He --- arch/powerpc/platforms/85xx/sgy_cts1000.c | 39 +++ 1 file changed, 25

Re:Re:Re: [PATCH v2] arch: powerpc: platforms: 85xx: Add missing of_node_put in sgy_cts1000.c

2022-06-16 Thread Liang He
2022-06-17 12:29:02,"Michael Ellerman" 写道: >"Liang He" writes: >> At 2022-06-17 07:37:06, "Michael Ellerman" wrote: >>>Christophe JAILLET writes: Le 16/06/2022 à 17:19, Liang He a écrit : > In gpio_halt_probe(), of_find_matching_node() will return a node pointer > with >

Re: [PATCH] powerpc: powernv: Fix refcount leak bug in opal-powercap

2022-06-16 Thread Christophe JAILLET
Le 17/06/2022 à 06:20, Liang He a écrit : In opal_powercap_init(), of_find_compatible_node() will return a node pointer with refcount incremented. We should use of_node_put() in fail path or when it is not used anymore. Besides, for_each_child_of_node() will automatically *inc* and *dec*

[PATCH] selftests/powerpc: Fix matrix multiply assist test

2022-06-16 Thread Rashmica Gupta
The ISA states: "when ACC[i] contains defined data, the contents of VSRs 4×i to 4×i+3 are undefined until either a VSX Move From ACC instruction is used to copy the contents of ACC[i] to VSRs 4×i to 4×i+3 or some other instruction directly writes to one of these VSRs." We aren't doing this. This

[PATCH] powerpc/signal: Update comment for clarity

2022-06-16 Thread Rashmica Gupta
The comment being referred to was deleted in commit af1bbc3dd3d5 ("powerpc: Remove UP only lazy floating point and vector optimisations"). Add a bit more detail so it's clear why we need to clear the FP/VEC/VSX bits here. Signed-off-by: Rashmica Gupta --- arch/powerpc/kernel/signal_64.c | 9

Re:Re: [PATCH v2] arch: powerpc: platforms: 85xx: Add missing of_node_put in sgy_cts1000.c

2022-06-16 Thread Michael Ellerman
"Liang He" writes: > At 2022-06-17 07:37:06, "Michael Ellerman" wrote: >>Christophe JAILLET writes: >>> Le 16/06/2022 à 17:19, Liang He a écrit : In gpio_halt_probe(), of_find_matching_node() will return a node pointer with refcount incremented. We should use of_node_put() in

[PATCH] powerpc: make facility_unavailable_exception 64s

2022-06-16 Thread Rashmica Gupta
The facility unavailable exception is only available on ppc book3s machines so use CONFIG_PPC_BOOK3S_64 rather than CONFIG_PPC64. tm_unavailable is only called from facility_unavailable_exception so can also be under this Kconfig symbol. Signed-off-by: Rashmica Gupta ---

[PATCH] powerpc: powernv: Fix refcount leak bug in opal-powercap

2022-06-16 Thread Liang He
In opal_powercap_init(), of_find_compatible_node() will return a node pointer with refcount incremented. We should use of_node_put() in fail path or when it is not used anymore. Besides, for_each_child_of_node() will automatically *inc* and *dec* refcount during iteration. However, we should add

Re:Re: [PATCH v2] arch: powerpc: platforms: 85xx: Add missing of_node_put in sgy_cts1000.c

2022-06-16 Thread Liang He
At 2022-06-17 07:37:06, "Michael Ellerman" wrote: >Christophe JAILLET writes: >> Le 16/06/2022 à 17:19, Liang He a écrit : >>> In gpio_halt_probe(), of_find_matching_node() will return a node pointer >>> with >>> refcount incremented. We should use of_node_put() in each fail path or when

Re: [PATCH] ibmvfc: multiqueue bug fixes

2022-06-16 Thread Martin K. Petersen
On Thu, 16 Jun 2022 12:11:24 -0700, Tyrel Datwyler wrote: > Fixes for a couple observed crashes of the ibmvfc driver when in MQ mode. > > Tyrel Datwyler (2): > ibmvfc: store vhost pointer during subcrq allocation > ibmvfc: alloc/free queue resource only during probe/remove > >

Re:Re: [PATCH v2] arch: powerpc: platforms: 85xx: Add missing of_node_put in sgy_cts1000.c

2022-06-16 Thread Liang He
At 2022-06-17 07:37:06, "Michael Ellerman" wrote: >Christophe JAILLET writes: >> Le 16/06/2022 à 17:19, Liang He a écrit : >>> In gpio_halt_probe(), of_find_matching_node() will return a node pointer >>> with >>> refcount incremented. We should use of_node_put() in each fail path or when

[powerpc:next-test] BUILD SUCCESS 028de148fa5a5465ed75d39ea79ad8ebd1b35e2f

2022-06-16 Thread kernel test robot
randconfig-a014 x86_64randconfig-a016 i386 randconfig-a011 i386 randconfig-a013 i386 randconfig-a015 riscvrandconfig-r042-20220616 hexagon randconfig

[powerpc:merge] BUILD SUCCESS bcd1c02813b8ab4ae019c65ffb716c9f579868e7

2022-06-16 Thread kernel test robot
randconfig-a013 x86_64randconfig-a011 x86_64randconfig-a015 i386 randconfig-a012 i386 randconfig-a014 i386 randconfig-a016 arc randconfig-r043-20220616 riscv

[powerpc:fixes-test] BUILD SUCCESS 294958ca9dd4be4204d6cf1ece8f403801dad2b2

2022-06-16 Thread kernel test robot
randconfig-a014 x86_64randconfig-a016 i386 randconfig-a011 i386 randconfig-a013 i386 randconfig-a015 riscvrandconfig-r042-20220616 hexagon randconfig

Re: [PATCH v2] arch: powerpc: platforms: 85xx: Add missing of_node_put in sgy_cts1000.c

2022-06-16 Thread Michael Ellerman
Christophe JAILLET writes: > Le 16/06/2022 à 17:19, Liang He a écrit : >> In gpio_halt_probe(), of_find_matching_node() will return a node pointer with >> refcount incremented. We should use of_node_put() in each fail path or when >> it >> is not used anymore. >> >> Signed-off-by: Liang He >>

[PATCH v2] macintosh: via-pmu-backlight: Use backlight helper

2022-06-16 Thread Stephen Kitt
backlight_properties.fb_blank is deprecated. The states it represents are handled by other properties; but instead of accessing those properties directly, drivers should use the helpers provided by backlight.h. Instead of retrieving the backlight brightness in struct backlight_properties

[PATCH 07/11] ASoC: fsl: fsl_sai: use pm_runtime_resume_and_get()

2022-06-16 Thread Pierre-Louis Bossart
Simplify the flow. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Kai Vehmanen Reviewed-by: Ranjani Sridharan --- sound/soc/fsl/fsl_sai.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c index

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

2022-06-16 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

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

2022-06-16 Thread Mike Kravetz
Lazy page table copying at fork time was introduced with commit 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

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

2022-06-16 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

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

2022-06-16 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,

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

2022-06-16 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

Re: [RFC PATCH 3/6] testing/pkeys: Add additional test for pkey_alloc()

2022-06-16 Thread Dave Hansen
On 6/16/22 12:25, Sohil Mehta wrote: > Should we have different return error codes when compile support is > disabled vs when runtime support is missing? It doesn't *really* matter. Programs have to be able to run on old kernels which will return ENOSYS. So, _when_ new kernels return ENOSYS or

Re: [RFC PATCH 4/6] pkeys: Lift pkey hardware check for pkey_alloc()

2022-06-16 Thread Sohil Mehta
diff --git a/mm/mprotect.c b/mm/mprotect.c index ba5592655ee3..56d35de33725 100644 --- a/mm/mprotect.c +++ b/mm/mprotect.c @@ -773,6 +773,9 @@ SYSCALL_DEFINE2(pkey_alloc, unsigned long, flags, unsigned long, init_val) int pkey; int ret; + if (!arch_pkeys_enabled()) +

Re: [RFC PATCH 3/6] testing/pkeys: Add additional test for pkey_alloc()

2022-06-16 Thread Sohil Mehta
On 6/10/2022 4:35 PM, ira.we...@intel.com wrote: +void test_pkey_alloc_on_unsupported_cpu(void) +{ + int test_pkey = sys_pkey_alloc(0, 0); + + dprintf1("pkey_alloc: %d (%d %s)\n", test_pkey, errno, +strerror(errno)); + pkey_assert(test_pkey < 0); +

[PATCH] ibmvfc: alloc/free queue resource only during probe/remove

2022-06-16 Thread Tyrel Datwyler
Currently, the sub-queues and event pool resources are alloc/free'd for every CRQ connection event such as reset and LPM. This exposes the driver to a couple issues. First the inefficiency of freeing and reallocating memory that can simply be resued after being sanitized. Further, a system under

[PATCH] ibmvfc: store vhost pointer during subcrq allocation

2022-06-16 Thread Tyrel Datwyler
Currently the back pointer from a queue to the vhost adapter isn't set until after subcrq interrupt registration. The value is available when a queue is first allocated and can/should be also set for primary and async queues as well as subcrq's. This fixes a crash observed during kexec/kdump on

[PATCH] ibmvfc: multiqueue bug fixes

2022-06-16 Thread Tyrel Datwyler
Fixes for a couple observed crashes of the ibmvfc driver when in MQ mode. Tyrel Datwyler (2): ibmvfc: store vhost pointer during subcrq allocation ibmvfc: alloc/free queue resource only during probe/remove drivers/scsi/ibmvscsi/ibmvfc.c | 82 ++

Re: [PATCH v2] arch: powerpc: platforms: 85xx: Add missing of_node_put in sgy_cts1000.c

2022-06-16 Thread Christophe JAILLET
Le 16/06/2022 à 17:19, Liang He a écrit : In gpio_halt_probe(), of_find_matching_node() will return a node pointer with refcount incremented. We should use of_node_put() in each fail path or when it is not used anymore. Signed-off-by: Liang He --- changelog: v2: use goto-label patch style

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

2022-06-16 Thread Daniel Henrique Barboza
Hi, Update: checking out 'dmesg' more carefully I found out that the module probe is failing with the following message: [ 186.298424][ T811] pseries-wdt: probe of pseries-wdt.0 failed with error -5 This fail is consistent. If I remove the module and modprobe it again the same error happens.

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

2022-06-16 Thread Daniel Henrique Barboza
On 6/16/22 13:44, Tyrel Datwyler wrote: On 6/15/22 18:43, Daniel Henrique Barboza wrote: Hi, I tried this series out with mainline QEMU built with Alexey's patch [1] and I wasn't able to get it to work. I'm using a simple QEMU command line booting a fedora36 guest in a Power9 boston host:

Re: [FSL P50x0] Keyboard and mouse don't work anymore after the devicetree updates for 5.19

2022-06-16 Thread Christian Zigotzky
On 13 June 2022 at 05:57 pm, Rob Herring wrote: On Thu, Jun 9, 2022 at 12:03 PM Christian Zigotzky wrote: On 06 June 2022 at 07:06 pm, Rob Herring wrote: On Mon, Jun 6, 2022 at 11:14 AM Christian Zigotzky wrote: On 06 June 2022 at 04:58 pm, Rob Herring wrote: On Fri, May 27, 2022 at 9:23

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

2022-06-16 Thread Tyrel Datwyler
On 6/15/22 18:43, Daniel Henrique Barboza wrote: > Hi, > > I tried this series out with mainline QEMU built with Alexey's patch [1] > and I wasn't able to get it to work. I'm using a simple QEMU command line > booting a fedora36 guest in a Power9 boston host: I would assume the H_WATCHDOG

[PATCH] powerpc: sysdev: xive: Fix refcount leak in native.c

2022-06-16 Thread Liang He
In xive_native_init(), of_find_compatible_node() will return a node pointer with refcount incremented. We should use of_node_put() in each fail path or when it is not used anymore. Signed-off-by: Liang He --- arch/powerpc/sysdev/xive/native.c | 15 ++- 1 file changed, 10

[PATCH v2] arch: powerpc: platforms: 85xx: Add missing of_node_put in sgy_cts1000.c

2022-06-16 Thread Liang He
In gpio_halt_probe(), of_find_matching_node() will return a node pointer with refcount incremented. We should use of_node_put() in each fail path or when it is not used anymore. Signed-off-by: Liang He --- changelog: v2: use goto-label patch style advised by Christophe. v1: add of_node_put()

Re:Re: [PATCH] arch: powerpc: platforms: 85xx: Add missing of_node_put in sgy_cts1000.c

2022-06-16 Thread Liang He
At 2022-06-16 22:49:36, "Christophe Leroy" wrote: > > >Le 15/06/2022 à 14:07, Liang He a écrit : >> [You don't often get email from win...@126.com. Learn why this is important >> at https://aka.ms/LearnAboutSenderIdentification ] >> >> Signed-off-by: Liang He >> --- >>

Re: [PATCH] arch: powerpc: platforms: 85xx: Add missing of_node_put in sgy_cts1000.c

2022-06-16 Thread Christophe Leroy
Le 15/06/2022 à 14:07, Liang He a écrit : > [You don't often get email from win...@126.com. Learn why this is important > at https://aka.ms/LearnAboutSenderIdentification ] > > Signed-off-by: Liang He > --- > arch/powerpc/platforms/85xx/sgy_cts1000.c | 10 ++ > 1 file changed, 10

[PATCH] powerpc: platforms: 52xx: Fix refcount leak in media5200.c

2022-06-16 Thread Liang He
In media5200_init_irq(), of_find_compatible_node() will return a node pointer with refcount incremented. We should use of_node_put() in fail path or when it is not used anymore. Don't worry about 'fpga_np==NULL' as of_node_put() can correctly handle it. Signed-off-by: Liang He ---

Re: [RFC PATCH 4/4] objtool/powerpc: Add --mcount specific implementation

2022-06-16 Thread Christophe Leroy
Le 16/06/2022 à 15:57, Peter Zijlstra a écrit : > On Thu, Jun 16, 2022 at 01:40:34PM +, Christophe Leroy wrote: >> sizeof(u64) is always 8 by definition. >> >> So if size is 8 we are working on a binary file for a 64 bits target, if >> not it means we are working for a 32 bits target. > >

[PATCH] arch: powerpc: platforms: 85xx: Fix refcount leak bug in ksi8560.c

2022-06-16 Thread Liang He
In ksi8560_setup_arch(), of_find_compatible_node() will return a node pointer with refcount incremented. We should use of_node_put() when it is not used anymore. Signed-off-by: Liang He --- arch/powerpc/platforms/85xx/ksi8560.c | 2 ++ 1 file changed, 2 insertions(+) diff --git

Re: [RFC PATCH 4/4] objtool/powerpc: Add --mcount specific implementation

2022-06-16 Thread Peter Zijlstra
On Thu, Jun 16, 2022 at 01:40:34PM +, Christophe Leroy wrote: > sizeof(u64) is always 8 by definition. > > So if size is 8 we are working on a binary file for a 64 bits target, if > not it means we are working for a 32 bits target. Cross-builds invalidate this I think. Best to look at

Re: [RFC PATCH 4/4] objtool/powerpc: Add --mcount specific implementation

2022-06-16 Thread Christophe Leroy
Le 16/06/2022 à 15:34, Naveen N. Rao a écrit : > Christophe Leroy wrote: >> >> >> Le 25/05/2022 à 19:27, Christophe Leroy a écrit : >>> >>> >>> Le 24/05/2022 à 15:33, Christophe Leroy a écrit : Le 24/05/2022 à 13:00, Sathvika Vasireddy a écrit : >> >>> +{ >>> +   

Re: [RFC PATCH 4/4] objtool/powerpc: Add --mcount specific implementation

2022-06-16 Thread Naveen N. Rao
Christophe Leroy wrote: Le 25/05/2022 à 19:27, Christophe Leroy a écrit : Le 24/05/2022 à 15:33, Christophe Leroy a écrit : Le 24/05/2022 à 13:00, Sathvika Vasireddy a écrit : +{ +    switch (elf->ehdr.e_machine) { +    case EM_X86_64: +    return R_X86_64_64; +    case

Re: [PATCH] powerpc/mm: Move CMA reservations after initmem_init()

2022-06-16 Thread Zi Yan
On 16 Jun 2022, at 8:00, Michael Ellerman wrote: > After commit 11ac3e87ce09 ("mm: cma: use pageblock_order as the single > alignment") there is an error at boot about the KVM CMA reservation > failing, eg: > > kvm_cma_reserve: reserving 6553 MiB for global area > cma: Failed to reserve

Re: [PATCH] powerpc/mm: Move CMA reservations after initmem_init()

2022-06-16 Thread Aneesh Kumar K.V
Michael Ellerman writes: > After commit 11ac3e87ce09 ("mm: cma: use pageblock_order as the single > alignment") there is an error at boot about the KVM CMA reservation > failing, eg: > > kvm_cma_reserve: reserving 6553 MiB for global area > cma: Failed to reserve 6553 MiB > > That makes it

[PATCH] powerpc/mm: Move CMA reservations after initmem_init()

2022-06-16 Thread Michael Ellerman
After commit 11ac3e87ce09 ("mm: cma: use pageblock_order as the single alignment") there is an error at boot about the KVM CMA reservation failing, eg: kvm_cma_reserve: reserving 6553 MiB for global area cma: Failed to reserve 6553 MiB That makes it impossible to start KVM guests using the

[PATCH kernel] pseries/iommu/ddw: Fix kdump to work in absence of ibm,dma-window

2022-06-16 Thread Alexey Kardashevskiy
The pseries platform uses 32bit default DMA window (always 4K pages) and optional 64bit DMA window available via DDW ("Dynamic DMA Windows"), 64K or 2M pages. For ages the default one was not removed and a huge window was created in addition. Things changed with SRIOV-enabled PowerVM which creates

Re: [PATCH 2/6] powerpc: Provide syscall wrapper

2022-06-16 Thread Arnd Bergmann
On Thu, Jun 16, 2022 at 7:42 AM Rohan McLure wrote: > > As for SPU's, the issue here is that include/linux/syscalls.h only > provides prototypes for sys_... handlers. So spu_callbacks.c must > reference these symbols for the translation unit to compile. A solution > may be for spu_syscall_table

[PATCH] selftests/powerpc: Add missing files to .gitignores

2022-06-16 Thread Michael Ellerman
These were missed when the respective tests were added, add them now. Signed-off-by: Michael Ellerman --- tools/testing/selftests/powerpc/math/.gitignore | 1 + tools/testing/selftests/powerpc/mce/.gitignore | 1 + tools/testing/selftests/powerpc/pmu/ebb/.gitignore | 1 +