Re: [PATCH 3/8] iommu/vt-d: Use ops->blocked_domain

2023-09-25 Thread Baolu Lu
On 9/25/23 7:41 PM, Jason Gunthorpe wrote: On Mon, Sep 25, 2023 at 10:29:52AM +0800, Baolu Lu wrote: On 9/23/23 1:07 AM, Jason Gunthorpe wrote: Trivially migrate to the ops->blocked_domain for the existing global static. Signed-off-by: Jason Gunthorpe --- drivers/iommu/intel/iommu.c | 3

Re: [Bisected] PowerMac G4 getting "BUG: Unable to handle kernel data access on write at 0x00001ff0" at boot with CONFIG_VMAP_STACK=y on kernels 6.5.x (regression over 6.4.x)

2023-09-25 Thread Liam R. Howlett
* Erhard Furtner [230925 19:02]: > Greetings! > > Had a chat on #gentoo-powerpc with another user whose G4 Mini fails booting > kernel 6.5.0 when CONFIG_VMAP_STACK=y is enabled. I was able to replicate the > issue on my PowerMac G4. Also I was able to bisect the issue. > > Kernels 6.4.x boot

Re: [Bisected] PowerMac G4 getting "BUG: Unable to handle kernel data access on write at 0x00001ff0" at boot with CONFIG_VMAP_STACK=y on kernels 6.5.x (regression over 6.4.x)

2023-09-25 Thread Bagas Sanjaya
On Tue, Sep 26, 2023 at 01:01:59AM +0200, Erhard Furtner wrote: > Greetings! > > Had a chat on #gentoo-powerpc with another user whose G4 Mini fails booting > kernel 6.5.0 when CONFIG_VMAP_STACK=y is enabled. I was able to replicate the > issue on my PowerMac G4. Also I was able to bisect the

Re: [PATCH v4 4/5] powerpc/code-patching: introduce patch_instructions()

2023-09-25 Thread Song Liu
On Fri, Sep 8, 2023 at 6:28 AM Hari Bathini wrote: > > patch_instruction() entails setting up pte, patching the instruction, > clearing the pte and flushing the tlb. If multiple instructions need > to be patched, every instruction would have to go through the above > drill unnecessarily. Instead,

Re: [PATCH V2] perf test: Fix parse-events tests to skip parametrized events

2023-09-25 Thread Arnaldo Carvalho de Melo
On Wed, Sep 13, 2023, 7:40 AM Athira Rajeev wrote: > > > > On 08-Sep-2023, at 7:48 PM, Athira Rajeev > wrote: > > > > > > > >> On 08-Sep-2023, at 11:04 AM, Sachin Sant wrote: > >> > >> > >> > >>> On 07-Sep-2023, at 10:29 PM, Athira Rajeev < > atraj...@linux.vnet.ibm.com> wrote: > >>> > >>>

Re: [PATCH v4 3/5] powerpc/bpf: use bpf_jit_binary_pack_[alloc|finalize|free]

2023-09-25 Thread Song Liu
On Fri, Sep 8, 2023 at 6:28 AM Hari Bathini wrote: > > Use bpf_jit_binary_pack_alloc in powerpc jit. The jit engine first > writes the program to the rw buffer. When the jit is done, the program > is copied to the final location with bpf_jit_binary_pack_finalize. > With multiple jit_subprogs,

[PATCH] ASoC: dt-bindings: Add missing (unevaluated|additional)Properties on child node schemas

2023-09-25 Thread Rob Herring
Just as unevaluatedProperties or additionalProperties are required at the top level of schemas, they should (and will) also be required for child node schemas. That ensures only documented properties are present for any node. Add unevaluatedProperties or additionalProperties as appropriate.

Re: [PATCH] selftests/powerpc: Fix emit_tests to work with run_kselftest.sh

2023-09-25 Thread Kees Cook
On Thu, Sep 21, 2023 at 05:26:10PM +1000, Michael Ellerman wrote: > In order to use run_kselftest.sh the list of tests must be emitted to > populate kselftest-list.txt. > > The powerpc Makefile is written to use EMIT_TESTS. But support for > EMIT_TESTS was dropped in commit d4e59a536f50

Re: [PATCH v4 1/5] powerpc/bpf: implement bpf_arch_text_copy

2023-09-25 Thread Song Liu
On Fri, Sep 8, 2023 at 6:28 AM Hari Bathini wrote: > > bpf_arch_text_copy is used to dump JITed binary to RX page, allowing > multiple BPF programs to share the same page. Use patch_instruction() > to implement it. > > Signed-off-by: Hari Bathini > --- > arch/powerpc/net/bpf_jit_comp.c | 41

Re: [PATCH] powerpc/stacktrace: Fix arch_stack_walk_reliable()

2023-09-25 Thread Joe Lawrence
On Fri, Sep 22, 2023 at 09:24:41AM +1000, Michael Ellerman wrote: > The changes to copy_thread() made in commit eed7c420aac7 ("powerpc: > copy_thread differentiate kthreads and user mode threads") inadvertently > broke arch_stack_walk_reliable() because it has knowledge of the stack > layout. > >

[PATCH v2] cpufreq: pmac32: Use of_property_read_reg() to parse "reg"

2023-09-25 Thread Rob Herring
Use the recently added of_property_read_reg() helper to get the untranslated "reg" address value. Acked-by: Viresh Kumar Signed-off-by: Rob Herring --- v2: - Add missing include --- drivers/cpufreq/pmac32-cpufreq.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git

[PATCH v2 37/37] powerpc: Support execute-only on all powerpc

2023-09-25 Thread Christophe Leroy
Introduce PAGE_EXECONLY_X macro which provides exec-only rights. The _X may be seen as redundant with the EXECONLY but it helps keep consistancy, all macros having the EXEC right have _X. And put it next to PAGE_NONE as PAGE_EXECONLY_X is somehow PAGE_NONE + EXEC just like all other SOMETHING_X

[PATCH v2 27/37] powerpc/64s: Use generic permission masks

2023-09-25 Thread Christophe Leroy
book3s64 need specific masks because it needs _PAGE_PRIVILEGED for PAGE_NONE. book3s64 already has _PAGE_RW and _PAGE_RWX. So add _PAGE_NA, _PAGE_RO and _PAGE_ROX and remove specific permission masks. Signed-off-by: Christophe Leroy --- Not sure why it needs _PAGE_PRIVILEGED as it also have

[PATCH v2 25/37] powerpc: Refactor permission masks used for __P/__S table and kernel memory flags

2023-09-25 Thread Christophe Leroy
Prepare a common version of the permission masks that will be based on _PAGE_NA, _PAGE_RO, _PAGE_ROX, _PAGE_RW, _PAGE_RWX that will be defined in platform specific headers in later patches. Put them in a new header pgtable-masks.h which will be included by platforms. And prepare a common version

[PATCH v2 33/37] powerpc/32s: Add _PAGE_WRITE to supplement _PAGE_RW

2023-09-25 Thread Christophe Leroy
Several places, _PAGE_RW maps to write permission and don't always imply read. To make it more clear, do as book3s/64 in commit c7d54842deb1 ("powerpc/mm: Use _PAGE_READ to indicate Read access") and use _PAGE_WRITE when more relevant. For the time being _PAGE_WRITE is equivalent to _PAGE_RW but

[PATCH v2 30/37] powerpc/e500: Introduce _PAGE_READ and remove _PAGE_USER

2023-09-25 Thread Christophe Leroy
e500 MMU has 6 page protection bits: - R, W, X for supervisor - R, W, X for user It means that it can support X without R. To do that, _PAGE_READ flag is needed. With 32 bits PTE there is no bit available for it in PTE. On the other hand the only real use of _PAGE_USER is to implement PAGE_NONE

[PATCH v2 28/37] powerpc/nohash: Add _PAGE_WRITE to supplement _PAGE_RW

2023-09-25 Thread Christophe Leroy
Several places, _PAGE_RW maps to write permission and don't always imply read. To make it more clear, do as book3s/64 in commit c7d54842deb1 ("powerpc/mm: Use _PAGE_READ to indicate Read access") and use _PAGE_WRITE when more relevant. For the time being _PAGE_WRITE is equivalent to _PAGE_RW but

[PATCH v2 31/37] powerpc/44x: Introduce _PAGE_READ and remove _PAGE_USER

2023-09-25 Thread Christophe Leroy
44x MMU has 6 page protection bits: - R, W, X for supervisor - R, W, X for user It means that it can support X without R. To do that, _PAGE_READ flag is needed but there is no bit available for it in PTE. On the other hand the only real use of _PAGE_USER is to implement PAGE_NONE by clearing

[PATCH v2 23/37] powerpc: Remove pte_mkuser() and pte_mkpriviledged()

2023-09-25 Thread Christophe Leroy
pte_mkuser() is never used. Remove it. pte_mkpriviledged() is not used anymore. Remove it too. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/book3s/32/pgtable.h | 10 -- arch/powerpc/include/asm/book3s/64/pgtable.h | 10 --

[PATCH v2 26/37] powerpc/8xx: Use generic permission masks

2023-09-25 Thread Christophe Leroy
8xx already has _PAGE_NA and _PAGE_RO. So add _PAGE_ROX, _PAGE_RW and _PAGE_RWX and remove specific permission masks. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/nohash/32/pte-8xx.h | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git

[PATCH v2 32/37] powerpc/40x: Introduce _PAGE_READ and remove _PAGE_USER

2023-09-25 Thread Christophe Leroy
_PAGE_USER is used to select the zone. Today zone 0 is kernel and zone 1 is user. To implement _PAGE_NONE, _PAGE_USER is cleared, leading to no access for user but kernel still has access to the page so it's possible for a user application to write in that page by using a kernel function as

[PATCH v2 36/37] powerpc: Finally remove _PAGE_USER

2023-09-25 Thread Christophe Leroy
_PAGE_USER is now gone on all targets. Remove it completely. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/nohash/pgtable.h | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/arch/powerpc/include/asm/nohash/pgtable.h

[PATCH v2 35/37] powerpc/ptdump: Display _PAGE_READ and _PAGE_WRITE

2023-09-25 Thread Christophe Leroy
Instead of always displaying either 'rw' or 'r ' depending on _PAGE_RW, display 'r' or ' ' for _PAGE_READ and 'w' or ' ' for _PAGE_WRITE. Signed-off-by: Christophe Leroy --- arch/powerpc/mm/ptdump/shared.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git

[PATCH v2 29/37] powerpc/nohash: Replace pte_user() by pte_read()

2023-09-25 Thread Christophe Leroy
pte_user() is now only used in pte_access_permitted() to check access on vmas. User flag is cleared to make a page unreadable. So rename it pte_read() and remove pte_user() which isn't used anymore. For the time being it checks _PAGE_USER but in the near futur all plateforms will be converted to

[PATCH v2 22/37] powerpc: Fail ioremap() instead of silently ignoring flags when PAGE_USER is set

2023-09-25 Thread Christophe Leroy
Calling ioremap() with _PAGE_USER (or _PAGE_PRIVILEDGE unset) is wrong. Loudly fail the call to ioremap() instead of blindly clearing the flags. Signed-off-by: Christophe Leroy --- arch/powerpc/mm/ioremap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[PATCH v2 24/37] powerpc: Rely on address instead of pte_user()

2023-09-25 Thread Christophe Leroy
pte_user() may return 'false' when a user page is PAGE_NONE. In that case it is still a user page and needs to be handled as such. So use is_kernel_addr() instead. And remove "user" text from ptdump as ptdump only dumps kernel tables. Note: no change done for book3s/64 which still has it

[PATCH v2 34/37] powerpc/32s: Introduce _PAGE_READ and remove _PAGE_USER

2023-09-25 Thread Christophe Leroy
On 603 MMU, TLB missed are handled by SW and there are separated DTLB and ITLB. It is therefore possible to implement execute-only protection by not loading DTLB when read access is not permitted. To do that, _PAGE_READ flag is needed but there is no bit available for it in PTE. On the other hand

[PATCH v2 04/37] powerpc: Remove pte_ERROR()

2023-09-25 Thread Christophe Leroy
pte_ERROR() is used neither in powerpc code nor in common mm code. Remove it. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/book3s/32/pgtable.h | 3 --- arch/powerpc/include/asm/book3s/64/pgtable.h | 2 -- arch/powerpc/include/asm/nohash/32/pgtable.h | 3 ---

[PATCH v2 19/37] powerpc/nohash: Refactor __ptep_set_access_flags()

2023-09-25 Thread Christophe Leroy
nohash/32 version of __ptep_set_access_flags() does the same as nohash/64 version, the only difference is that nohash/32 version is more complete and uses pte_update(). Make it common and remove the nohash/64 version. Signed-off-by: Christophe Leroy ---

[PATCH v2 06/37] powerpc: Refactor update_mmu_cache_range()

2023-09-25 Thread Christophe Leroy
On nohash, this function voids except for E500 with hugepages. On book3s, this function is for hash MMUs only. Combine those tests and rename E500 update_mmu_cache_range() as __update_mmu_cache() which gets called by update_mmu_cache_range(). Signed-off-by: Christophe Leroy --- v2: Fix the

[PATCH v2 10/37] powerpc/nohash: Move 8xx version of pte_update() into pte-8xx.h

2023-09-25 Thread Christophe Leroy
No point in having 8xx special pte_update() in common header, move it into pte-8xx.h Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/nohash/32/pgtable.h | 57 +--- arch/powerpc/include/asm/nohash/32/pte-8xx.h | 57 2 files changed, 58

[PATCH v2 20/37] powerpc/e500: Simplify pte_mkexec()

2023-09-25 Thread Christophe Leroy
Commit b6cb20fdc273 ("powerpc/book3e: Fix set_memory_x() and set_memory_nx()") implemented a more elaborated version of pte_mkwrite() suitable for both kernel and user pages. That was needed because set_memory_x() was using pte_mkwrite(). But since commit a4c182ecf335 ("powerpc/set_memory: Avoid

[PATCH v2 21/37] powerpc: Implement and use pgprot_nx()

2023-09-25 Thread Christophe Leroy
ioremap_page_range() calls pgprot_nx() vmap() and vmap_pfn() clear execute permission by calling pgprot_nx(). When pgprot_nx() is not defined it falls back to a nop. Implement it for powerpc then use it in early_ioremap_range(). Then the call to pte_exprotect() can be removed from

[PATCH v2 07/37] powerpc: Untangle fixmap.h and pgtable.h and mmu.h

2023-09-25 Thread Christophe Leroy
fixmap.h need pgtable.h for [un]map_kernel_page() pgtable.h need fixmap.h for FIXADDR_TOP. Untangle the two files by moving FIXADDR_TOP into pgtable.h Also move VIRT_IMMR_BASE to fixmap.h to avoid fixmap.h in mmu.h Signed-off-by: Christophe Leroy --- v2: Add asm/fixmap.h to

[PATCH v2 03/37] powerpc/40x: Remove stale PTE_ATOMIC_UPDATES macro

2023-09-25 Thread Christophe Leroy
40x TLB handlers were reworked by commit 2c74e2586bb9 ("powerpc/40x: Rework 40x PTE access and TLB miss") to not require PTE_ATOMIC_UPDATES anymore. Then commit 4e1df545e2fa ("powerpc/pgtable: Drop PTE_ATOMIC_UPDATES") removed all code related to PTE_ATOMIC_UPDATES. Remove left over

[PATCH v2 09/37] powerpc/nohash: Refactor declaration of {map/unmap}_kernel_page()

2023-09-25 Thread Christophe Leroy
map_kernel_page() and unmap_kernel_page() have the same prototypes on nohash/32 and nohash/64, keep only one declaration. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/nohash/32/pgtable.h | 8 arch/powerpc/include/asm/nohash/64/pgtable.h | 2 --

[PATCH v2 08/37] powerpc/nohash: Remove {pte/pmd}_protnone()

2023-09-25 Thread Christophe Leroy
Only book3s/64 selects ARCH_SUPPORTS_NUMA_BALANCING so CONFIG_NUMA_BALANCING can't be selected on nohash targets. Remove pte_protnone() and pmd_protnone(). Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/nohash/pgtable.h | 17 - 1 file changed, 17 deletions(-)

[PATCH v2 13/37] powerpc/nohash: Refactor checking of no-change in pte_update()

2023-09-25 Thread Christophe Leroy
On nohash/64, a few callers of pte_update() check if there is really a change in order to avoid an unnecessary write. Refactor that inside pte_update(). Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/nohash/64/pgtable.h | 9 - arch/powerpc/include/asm/nohash/pgtable.h

[PATCH v2 18/37] powerpc/nohash: Refactor pte_clear()

2023-09-25 Thread Christophe Leroy
pte_clear() are doing the same on nohash/32 and nohash/64, Keep the static inline version of nohash/64, make it common and remove the macro version of nohash/32. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/nohash/32/pgtable.h | 3 ---

[PATCH v2 16/37] powerpc/nohash: Refactor ptep_test_and_clear_young()

2023-09-25 Thread Christophe Leroy
Remove ptep_test_and_clear_young() macro, make __ptep_test_and_clear_young() common to nohash/32 and nohash/64 and change it to become ptep_test_and_clear_young() Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/nohash/32/pgtable.h | 11 ---

[PATCH v2 15/37] powerpc/nohash: Deduplicate pte helpers

2023-09-25 Thread Christophe Leroy
Deduplicate following helpers that are identical on nohash/32 and nohash/64: pte_mkwrite_novma() pte_mkdirty() pte_mkyoung() pte_wrprotect() pte_mkexec() pte_young() Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/nohash/32/pgtable.h | 36

[PATCH v2 14/37] powerpc/nohash: Deduplicate _PAGE_CHG_MASK

2023-09-25 Thread Christophe Leroy
_PAGE_CHG_MASK is identical between nohash/32 and nohash/64, deduplicate it. While at it, clean the #ifdef for PTE_RPN_MASK in nohash/32 as it is already CONFIG_PPC32. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/nohash/32/pgtable.h | 8 +---

[PATCH v2 17/37] powerpc/nohash: Deduplicate ptep_set_wrprotect() and ptep_get_and_clear()

2023-09-25 Thread Christophe Leroy
ptep_set_wrprotect() and ptep_get_and_clear are identical for nohash/32 and nohash/64. Make them common. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/nohash/32/pgtable.h | 16 arch/powerpc/include/asm/nohash/64/pgtable.h | 15 ---

[PATCH v2 12/37] powerpc/nohash: Refactor pte_update()

2023-09-25 Thread Christophe Leroy
pte_update() is similar. Take the nohash/32 version which works on nohash/64 and add the debug call to assert_pte_locked() which is only on nohash/64. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/nohash/32/pgtable.h | 33 ---

[PATCH v2 05/37] powerpc: Deduplicate prototypes of ptep_set_access_flags() and phys_mem_access_prot()

2023-09-25 Thread Christophe Leroy
Prototypes of ptep_set_access_flags() and phys_mem_access_prot() are identical for book3s and nohash. Deduplicate them. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/book3s/pgtable.h | 9 - arch/powerpc/include/asm/nohash/pgtable.h | 10 --

[PATCH v2 11/37] powerpc/nohash: Replace #ifdef CONFIG_44x by IS_ENABLED(CONFIG_44x) in pgtable.h

2023-09-25 Thread Christophe Leroy
No need of a #ifdef, use IS_ENABLED(CONFIG_44x) Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/nohash/32/pgtable.h | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/arch/powerpc/include/asm/nohash/32/pgtable.h

[PATCH v2 00/37] Implement execute-only protection on powerpc

2023-09-25 Thread Christophe Leroy
This series reworks _PAGE_FLAGS on all platforms in order to implement execute-only protection on all powerpc. For all targets except 40x and 604 it will be a real execute-only protection as the hardware and/or software allows a distinct protection. For 40x and 604 that's a poor's man

[PATCH v2 02/37] powerpc/64e: Fix wrong test in __ptep_test_and_clear_young()

2023-09-25 Thread Christophe Leroy
Commit 45201c879469 ("powerpc/nohash: Remove hash related code from nohash headers.") replaced: if ((pte_val(*ptep) & (_PAGE_ACCESSED | _PAGE_HASHPTE)) == 0) return 0; By: if (pte_young(*ptep)) return 0; But it should be: if (!pte_young(*ptep)) return 0; Fix it.

[PATCH v2 01/37] powerpc/8xx: Fix pte_access_permitted() for PAGE_NONE

2023-09-25 Thread Christophe Leroy
On 8xx, PAGE_NONE is handled by setting _PAGE_NA instead of clearing _PAGE_USER. But then pte_user() returns 1 also for PAGE_NONE. As _PAGE_NA prevent reads, add a specific version of pte_read() that returns 0 when _PAGE_NA is set instead of always returning 1. Fixes: 351750331fc1 ("powerpc/mm:

Re: [RFC PATCH v12 11/33] KVM: Introduce per-page memory attributes

2023-09-25 Thread Sean Christopherson
On Thu, Sep 21, 2023, Yan Zhao wrote: > On Wed, Sep 20, 2023 at 02:00:22PM -0700, Sean Christopherson wrote: > > On Fri, Sep 15, 2023, Yan Zhao wrote: > > > On Wed, Sep 13, 2023 at 06:55:09PM -0700, Sean Christopherson wrote: > > > > +/* Set @attributes for the gfn range [@start, @end). */ > > > >

[PATCH] powerpc/85xx: Fix math emulation exception

2023-09-25 Thread Christophe Leroy
Booting mpc85xx_defconfig kernel on QEMU leads to: Bad trap at PC: fe9bab0, SR: 2d000, vector=800 awk[82]: unhandled trap (5) at 0 nip fe9bab0 lr fe9e01c code 5 in libc-2.27.so[fe5a000+17a000] awk[82]: code: 3aa0 3a800010 4bffe03c 9421fff0 7ca62b78 38a0 93c10008 83c10008 awk[82]: code:

Re: [PATCH v3 3/3] doc: trusted-encrypted: add DCP as new trust source

2023-09-25 Thread Jarkko Sakkinen
On Mon Sep 18, 2023 at 5:18 PM EEST, David Gstir wrote: > Update the documentation for trusted and encrypted KEYS with DCP as new > trust source: > > - Describe security properties of DCP trust source > - Describe key usage > - Document blob format > > Co-developed-by: Richard Weinberger >

Re: [PATCH v3 2/3] KEYS: trusted: Introduce support for NXP DCP-based trusted keys

2023-09-25 Thread Jarkko Sakkinen
On Mon Sep 18, 2023 at 5:18 PM EEST, David Gstir wrote: > DCP (Data Co-Processor) is the little brother of NXP's CAAM IP. > > Beside of accelerated crypto operations, it also offers support for > hardware-bound keys. Using this feature it is possible to implement a blob > mechanism just like CAAM

Re: [PATCH v3 1/3] crypto: mxs-dcp: Add support for hardware provided keys

2023-09-25 Thread Jarkko Sakkinen
On Mon Sep 18, 2023 at 5:18 PM EEST, David Gstir wrote: > DCP is capable to performing AES with hardware-bound keys. > These keys are not stored in main memory and are therefore not directly > accessible by the operating system. > > So instead of feeding the key into DCP, we need to place a >

Re: [PATCH v6 08/30] dt-bindings: soc: fsl: cpm_qe: cpm1-scc-qmc: Add support for QMC HDLC

2023-09-25 Thread Herve Codina
On Mon, 25 Sep 2023 12:44:35 +0200 Krzysztof Kozlowski wrote: > On 25/09/2023 12:27, Herve Codina wrote: > > On Mon, 25 Sep 2023 10:21:15 +0200 > > Krzysztof Kozlowski wrote: > > > >> On 25/09/2023 10:17, Herve Codina wrote: > >>> Hi Krzysztof, > >>> > >>> On Sat, 23 Sep 2023 19:39:49

Re: [PATCH 00/40] soc: Convert to platform remove callback returning void

2023-09-25 Thread Konrad Dybcio
On 25.09.2023 11:54, Uwe Kleine-König wrote: > Hello, > > this series converts all platform drivers below drivers/soc to use > .remove_new(). The motivation is to get rid of an integer return code > that is (mostly) ignored by the platform driver core and error prone on > the driver side. > >

Re: [PATCH v2 1/2] ASoC: dt-bindings: fsl_rpmsg: List DAPM endpoints ignoring system suspend

2023-09-25 Thread Mark Brown
On Mon, Sep 25, 2023 at 07:09:45PM +0800, Chancel Liu wrote: > + fsl,lpa-widgets: > +$ref: /schemas/types.yaml#/definitions/non-unique-string-array > +description: | > + A list of DAPM endpoints which mark paths between these endpoints > should > + not be disabled when system

Re: [PATCH 3/8] iommu/vt-d: Use ops->blocked_domain

2023-09-25 Thread Jason Gunthorpe
On Mon, Sep 25, 2023 at 10:29:52AM +0800, Baolu Lu wrote: > On 9/23/23 1:07 AM, Jason Gunthorpe wrote: > > Trivially migrate to the ops->blocked_domain for the existing global > > static. > > > > Signed-off-by: Jason Gunthorpe > > --- > > drivers/iommu/intel/iommu.c | 3 +-- > > 1 file

[PATCH v2 1/2] ASoC: dt-bindings: fsl_rpmsg: List DAPM endpoints ignoring system suspend

2023-09-25 Thread Chancel Liu
Add a property to list DAPM endpoints which mark paths between these endpoints should not be disabled when system enters in suspend state. LPA means low power audio case. On asymmetric multiprocessor, there are Cortex-A core and Cortex-M core, Linux is running on Cortex-A core, RTOS or other OS

[PATCH v2 2/2] ASoC: imx-rpmsg: Force codec power on in low power audio mode

2023-09-25 Thread Chancel Liu
Low power audio mode requires binding codec still power on while Acore enters into suspend so Mcore can continue playback music. ASoC machine driver acquires DAPM endpoints through reading "fsl,lpa-widgets" property from DT and then forces the path between these endpoints ignoring suspend. If

Re: [PATCH v6 08/30] dt-bindings: soc: fsl: cpm_qe: cpm1-scc-qmc: Add support for QMC HDLC

2023-09-25 Thread Krzysztof Kozlowski
On 25/09/2023 12:27, Herve Codina wrote: > On Mon, 25 Sep 2023 10:21:15 +0200 > Krzysztof Kozlowski wrote: > >> On 25/09/2023 10:17, Herve Codina wrote: >>> Hi Krzysztof, >>> >>> On Sat, 23 Sep 2023 19:39:49 +0200 >>> Krzysztof Kozlowski wrote: >>> On 22/09/2023 09:58, Herve Codina

Re: [PATCH V4 2/2] tools/perf/tests: Fix object code reading to skip address that falls out of text section

2023-09-25 Thread kajoljain
Patch looks good to me. Reviewed-by: Kajol Jain Thanks, Kajol Jain On 9/15/23 11:07, Athira Rajeev wrote: > The testcase "Object code reading" fails in somecases > for "fs_something" sub test as below: > > Reading object code for memory address: 0xc00807f0142c > File is:

Re: [PATCH V4 1/2] tools/perf: Add text_end to "struct dso" to save .text section size

2023-09-25 Thread kajoljain
Patch looks good to me. Reviewed-by: Kajol Jain Thanks, Kajol Jain On 9/15/23 11:07, Athira Rajeev wrote: > Update "struct dso" to include new member "text_end". > This new field will represent the offset for end of text > section for a dso. For elf, this value is derived as: > sh_size (Size

Re: [PATCH v6 08/30] dt-bindings: soc: fsl: cpm_qe: cpm1-scc-qmc: Add support for QMC HDLC

2023-09-25 Thread Herve Codina
On Mon, 25 Sep 2023 10:21:15 +0200 Krzysztof Kozlowski wrote: > On 25/09/2023 10:17, Herve Codina wrote: > > Hi Krzysztof, > > > > On Sat, 23 Sep 2023 19:39:49 +0200 > > Krzysztof Kozlowski wrote: > > > >> On 22/09/2023 09:58, Herve Codina wrote: > >>> The QMC (QUICC mutichannel

[PATCH 00/40] soc: Convert to platform remove callback returning void

2023-09-25 Thread Uwe Kleine-König
Hello, this series converts all platform drivers below drivers/soc to use .remove_new(). The motivation is to get rid of an integer return code that is (mostly) ignored by the platform driver core and error prone on the driver side. See commit 5c5a7680e67b ("platform: Provide a remove callback

[PATCH 06/40] soc/fsl: cpm: qmc: Convert to platform remove callback returning void

2023-09-25 Thread Uwe Kleine-König
The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve

[PATCH 05/40] soc/fsl: dpaa2-console: Convert to platform remove callback returning void

2023-09-25 Thread Uwe Kleine-König
The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve

[PATCH 07/40] soc/fsl: cpm: tsa: Convert to platform remove callback returning void

2023-09-25 Thread Uwe Kleine-König
The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve

Re: [PATCH v8 00/24] iommu: Make default_domain's mandatory

2023-09-25 Thread Joerg Roedel
On Wed, Sep 13, 2023 at 10:43:33AM -0300, Jason Gunthorpe wrote: > Jason Gunthorpe (24): > iommu: Add iommu_ops->identity_domain > iommu: Add IOMMU_DOMAIN_PLATFORM > powerpc/iommu: Setup a default domain and remove set_platform_dma_ops > iommu: Add IOMMU_DOMAIN_PLATFORM for S390 >

Re: [PATCH 1/2] ASoC: dt-bindings: fsl_rpmsg: List DAPM endpoints ignoring suspend

2023-09-25 Thread Krzysztof Kozlowski
On 25/09/2023 10:20, Chancel Liu wrote: >>> Add a property to list DAPM endpoints which mark paths between these >>> endpoints ignoring suspend. These DAPM paths can still be power on >>> when system enters into suspend. >>> >>> Signed-off-by: Chancel Liu >>> --- >>>

Re: [PATCH v6 08/30] dt-bindings: soc: fsl: cpm_qe: cpm1-scc-qmc: Add support for QMC HDLC

2023-09-25 Thread Krzysztof Kozlowski
On 25/09/2023 10:17, Herve Codina wrote: > Hi Krzysztof, > > On Sat, 23 Sep 2023 19:39:49 +0200 > Krzysztof Kozlowski wrote: > >> On 22/09/2023 09:58, Herve Codina wrote: >>> The QMC (QUICC mutichannel controller) is a controller present in some >>> PowerQUICC SoC such as MPC885. >>> The QMC

RE: Re: [PATCH 1/2] ASoC: dt-bindings: fsl_rpmsg: List DAPM endpoints ignoring suspend

2023-09-25 Thread Chancel Liu
> > Add a property to list DAPM endpoints which mark paths between these > > endpoints ignoring suspend. These DAPM paths can still be power on > > when system enters into suspend. > > > > Signed-off-by: Chancel Liu > > --- > > Documentation/devicetree/bindings/sound/fsl,rpmsg.yaml | 6 ++ >

Re: [PATCH v6 08/30] dt-bindings: soc: fsl: cpm_qe: cpm1-scc-qmc: Add support for QMC HDLC

2023-09-25 Thread Herve Codina
Hi Krzysztof, On Sat, 23 Sep 2023 19:39:49 +0200 Krzysztof Kozlowski wrote: > On 22/09/2023 09:58, Herve Codina wrote: > > The QMC (QUICC mutichannel controller) is a controller present in some > > PowerQUICC SoC such as MPC885. > > The QMC HDLC uses the QMC controller to transfer HDLC data. >

RE: Questions: Should kernel panic when PCIe fatal error occurs?

2023-09-25 Thread David Laight
From: Shuai Xue > Sent: 25 September 2023 02:44 > > On 2023/9/21 21:20, David Laight wrote: > > ... > > I've got a target to generate AER errors by generating read cycles > > that are inside the address range that the bridge forwards but > > outside of any BAR because there are 2 different sized

Re: [PATCH 0/3] Fix for shellcheck issues with version "0.6"

2023-09-25 Thread kajoljain
On 9/7/23 22:45, Athira Rajeev wrote: > From: root > > shellcheck was run on perf tool shell scripts s a pre-requisite > to include a build option for shellcheck discussed here: > https://www.spinics.net/lists/linux-perf-users/msg25553.html > > And fixes were added for the coding/formatting

Re: [PATCH V2] perf test: Fix parse-events tests to skip parametrized events

2023-09-25 Thread kajoljain
On 9/7/23 22:29, Athira Rajeev wrote: > Testcase "Parsing of all PMU events from sysfs" parse events for > all PMUs, and not just cpu. In case of powerpc, the PowerVM > environment supports events from hv_24x7 and hv_gpci PMU which > is of example format like below: > > -

Re: [PATCH v5 0/5] ppc, fbdev: Clean up fbdev mmap helper

2023-09-25 Thread Thomas Zimmermann
FYI, I intent to merge patches 1 and 2 of this patchset into drm-misc-next. The updates for PowerPC can be merged through PPC trees later. Let me know if this does not work for you. Best regards Thomas Am 22.09.23 um 10:04 schrieb Thomas Zimmermann: Clean up and rename fb_pgprotect() to work

[PATCHv7 4/4] powerpc/setup: alloc extra paca_ptrs to hold boot_cpuid

2023-09-25 Thread Pingfan Liu
paca_ptrs should be large enough to hold the boot_cpuid, hence, its lower boundary is set to the bigger one between boot_cpuid+1 and nr_cpus. On the other hand, some kernel component: -1. the timer assumes cpu0 online since the timer_list->flags subfield 'TIMER_CPUMASK' is zero if not initialized

[PATCHv7 3/4] powerpc/setup: Handle the case when boot_cpuid greater than nr_cpus

2023-09-25 Thread Pingfan Liu
If the boot_cpuid is smaller than nr_cpus, it requires extra effort to ensure the boot_cpu is in cpu_present_mask. This can be achieved by reserving the last quota for the boot cpu. Note: the restriction on nr_cpus will be lifted with more effort in the next patch Signed-off-by: Pingfan Liu Cc:

[PATCHv7 2/4] powerpc/setup: Loosen the mapping between cpu logical id and its seq in dt

2023-09-25 Thread Pingfan Liu
*** Idea *** For kexec -p, the boot cpu can be not the cpu0, this causes the problem of allocating memory for paca_ptrs[]. However, in theory, there is no requirement to assign cpu's logical id as its present sequence in the device tree. But there is something like cpu_first_thread_sibling(),

[PATCHv7 1/4] powerpc/setup : Enable boot_cpu_hwid for PPC32

2023-09-25 Thread Pingfan Liu
In order to identify the boot cpu, its intserv[] should be recorded and checked in smp_setup_cpu_maps(). smp_setup_cpu_maps() is shared between PPC64 and PPC32. Since PPC64 has already used boot_cpu_hwid to carry that information, enabling this variable on PPC32 so later it can also be used to

[PATCHv7 0/4] enable nr_cpus for powerpc

2023-09-25 Thread Pingfan Liu
Since my last v4 [1], the code has undergone great changes. The paca[] array has been reorganized and indexed by paca_ptrs[], which dramatically decreases the memory consumption even if there are many unpresent cpus in the middle. However, reordering the logical cpu numbers can further decrease

Re: [PATCH v4 0/5] powerpc/bpf: use BPF prog pack allocator

2023-09-25 Thread Hari Bathini
Ping! Comments, please.. On 08/09/23 6:57 pm, Hari Bathini wrote: Most BPF programs are small, but they consume a page each. For systems with busy traffic and many BPF programs, this may also add significant pressure on instruction TLB. High iTLB pressure usually slows down the whole system

Re: [PATCH 1/2] ASoC: dt-bindings: fsl_rpmsg: List DAPM endpoints ignoring suspend

2023-09-25 Thread Krzysztof Kozlowski
On 25/09/2023 04:48, Chancel Liu wrote: > Add a property to list DAPM endpoints which mark paths between these > endpoints ignoring suspend. These DAPM paths can still be power on when > system enters into suspend. > > Signed-off-by: Chancel Liu > --- >