Re: [PATCH v4 5/7] kexec_file, ricv: print out debugging message if required

2023-12-19 Thread Baoquan He
On 12/19/23 at 02:44pm, Conor Dooley wrote: > On Wed, Dec 13, 2023 at 01:57:45PM +0800, Baoquan He wrote: > > Then when specifying '-d' for kexec_file_load interface, loaded > > locations of kernel/initrd/cmdline etc can be printed out to help debug. > > > > Here replace pr_debug() with the newly

Re: [PATCH 09/13] mm/gup: Cache *pudp in follow_pud_mask()

2023-12-19 Thread Peter Xu
On Tue, Dec 19, 2023 at 11:28:54AM -0500, James Houghton wrote: > On Tue, Dec 19, 2023 at 2:57 AM wrote: > > > > From: Peter Xu > > > > Introduce "pud_t pud" in the function, so the code won't dereference *pudp > > multiple time. Not only because that looks less straightforward, but also > > bec

Re: [PATCH 09/13] mm/gup: Cache *pudp in follow_pud_mask()

2023-12-19 Thread James Houghton
On Tue, Dec 19, 2023 at 2:57 AM wrote: > > From: Peter Xu > > Introduce "pud_t pud" in the function, so the code won't dereference *pudp > multiple time. Not only because that looks less straightforward, but also > because if the dereference really happened, it's not clear whether there > can be

Re: [PATCH v2] i2c: cpm: Remove linux,i2c-index conversion from be32

2023-12-19 Thread Wolfram Sang
On Wed, Dec 06, 2023 at 11:24:03PM +0100, Christophe Leroy wrote: > sparse reports an error on some data that gets converted from be32. > > That's because that data is typed u32 instead of __be32. > > The type is correct, the be32_to_cpu() conversion is not. > > Remove the conversion. > > Repor

Re: [PATCH v2] ASoC: fsl_sai: Fix channel swap issue on i.MX8MP

2023-12-19 Thread Mark Brown
On Tue, 19 Dec 2023 10:30:57 +0800, Shengjiu Wang wrote: > When flag mclk_with_tere and mclk_direction_output enabled, > The SAI transmitter or receiver will be enabled in very early > stage, that if FSL_SAI_xMR is set by previous case, > for example previous case is one channel, current case is >

Re: [PATCH v4 5/7] kexec_file, ricv: print out debugging message if required

2023-12-19 Thread Conor Dooley
On Wed, Dec 13, 2023 at 01:57:45PM +0800, Baoquan He wrote: > Then when specifying '-d' for kexec_file_load interface, loaded > locations of kernel/initrd/cmdline etc can be printed out to help debug. > > Here replace pr_debug() with the newly added kexec_dprintk() in kexec_file > loading related

Re: [kvm-unit-tests PATCH v5 29/29] powerpc: Add timebase tests

2023-12-19 Thread Thomas Huth
On 16/12/2023 14.42, Nicholas Piggin wrote: This has a known failure on QEMU TCG machines where the decrementer interrupt is not lowered when the DEC wraps from -ve to +ve. Signed-off-by: Nicholas Piggin --- lib/powerpc/asm/ppc_asm.h | 1 + lib/powerpc/asm/processor.h | 22 +++ powerpc

Re: [kvm-unit-tests PATCH v5 25/29] powerpc: Add rtas stop-self support

2023-12-19 Thread Thomas Huth
On 16/12/2023 14.42, Nicholas Piggin wrote: In preparation for improved SMP support, add stop-self support to the harness. This is non-trivial because it requires an unlocked rtas call: a CPU can't be holding a spin lock when it goes offline or it will deadlock other CPUs. rtas permits stop-self

Re: [kvm-unit-tests PATCH v5 24/29] powerpc: interrupt tests

2023-12-19 Thread Thomas Huth
On 16/12/2023 14.42, Nicholas Piggin wrote: Add basic testing of various kinds of interrupts, machine check, page fault, illegal, decrementer, trace, syscall, etc. This has a known failure on QEMU TCG pseries machines where MSR[ME] can be incorrectly set to 0. Signed-off-by: Nicholas Piggin --

Re: powerpc: several early boot regressions on MPC52xx

2023-12-19 Thread Matthias Schiffer
On Mon, 2023-12-18 at 19:48 +, Christophe Leroy wrote: > > Achtung externe E-Mail: Öffnen Sie Anhänge und Links nur, wenn Sie wissen, > dass diese aus einer sicheren Quelle stammen und sicher sind. Leiten Sie die > E-Mail im Zweifelsfall zur Prüfung an den IT-Helpdesk wei

Re: [kvm-unit-tests PATCH v5 22/29] powerpc: Fix emulator illegal instruction test for powernv

2023-12-19 Thread Thomas Huth
On 16/12/2023 14.42, Nicholas Piggin wrote: Illegal instructions cause 0xe40 (HEAI) interrupts rather than program interrupts. Signed-off-by: Nicholas Piggin --- powerpc/emulator.c | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) Acked-by: Thomas Huth

Re: [PATCHv3 RESEND 00/10] ASoC: fsl-asoc-card: compatibility integration of a generic codec use case for use with S/PDIF controller

2023-12-19 Thread Elinor Montmasson
On Monday, 18 December, 2023 14:54:03, Daniel Baluta wrote > > > * fsl-asoc-card.txt currently follows the old dt-bindings format. > > Should we update it to DT schema format in this patch series > > before adding my new properties? > > I know this is extra-work but we would greatly appreciate

Re: [kvm-unit-tests PATCH v5 20/29] scripts: Accommodate powerpc powernv machine differences

2023-12-19 Thread Thomas Huth
On 16/12/2023 14.42, Nicholas Piggin wrote: The QEMU powerpc powernv machine has minor differences that must be accommodated for in output parsing: - Summary parsing must search more lines of output for the summary line, to accommodate OPAL message on shutdown. - Premature failure testing mus

Re: [PATCH v2 00/10] Don't let i2c adapters declare I2C_CLASS_SPD support if they support I2C_CLASS_HWMON

2023-12-19 Thread Wolfram Sang
> This series and my other series are sitting idle in patchwork > for 3 weeks now. AFAICS they have the needed ack's. > Anything missing before they can be applied? Applied to for-next, thanks! signature.asc Description: PGP signature

Re: [PATCH] powerpc/64s: Increase default stack size to 32KB

2023-12-19 Thread Michael Ellerman
Michael Ellerman writes: > There are reports of kernels crashing due to stack overflow while > running OpenShift (Kubernetes). The primary contributor to the stack > usage seems to be openvswitch, which is used by OVN-Kubernetes (based on > OVN (Open Virtual Network)), but NFS also contributes in

Re: [kvm-unit-tests PATCH v5 19/29] scripts: allow machine option to be specified in unittests.cfg

2023-12-19 Thread Thomas Huth
On 16/12/2023 14.42, Nicholas Piggin wrote: This allows different machines with different requirements to be supported by run_tests.sh, similarly to how different accelerators are handled. Signed-off-by: Nicholas Piggin --- scripts/common.bash | 8 ++-- scripts/runtime.bash | 16 ++

Re: [kvm-unit-tests PATCH v5 18/29] powerpc: Fix stack backtrace termination

2023-12-19 Thread Thomas Huth
On 16/12/2023 14.42, Nicholas Piggin wrote: The backtrace handler terminates when it sees a NULL caller address, but the powerpc stack setup does not keep such a NULL caller frame at the start of the stack. This happens to work on pseries because the memory at 0 is mapped and it contains 0 at th

Re: [kvm-unit-tests PATCH v5 16/29] powerpc: Set .got section alignment to 256 bytes

2023-12-19 Thread Thomas Huth
On 16/12/2023 14.42, Nicholas Piggin wrote: Modern powerpc64 toolchains require the .got section have alignment of 256 bytes. Incorrect alignment ends up causing the .data section ELF load address to move by 8 bytes from its file offset, relative to previous sections. This is not a problem for th

Re: [kvm-unit-tests PATCH v5 14/29] powerpc: Expand exception handler vector granularity

2023-12-19 Thread Thomas Huth
On 16/12/2023 14.42, Nicholas Piggin wrote: Exception handlers are currently indexed in units of 0x100, but powerpc can have vectors that are aligned to as little as 0x20 bytes. Increase granularity of the handler functions before adding support for those vectors. Signed-off-by: Nicholas Piggin

Re: [kvm-unit-tests PATCH v5 13/29] powerpc: Make interrupt handler error more readable

2023-12-19 Thread Thomas Huth
On 16/12/2023 14.42, Nicholas Piggin wrote: Installing the same handler twice reports a shifted trap vector address which is hard to decipher. Print the unshifed address. Signed-off-by: Nicholas Piggin --- lib/powerpc/processor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --

Re: [kvm-unit-tests PATCH v5 12/29] powerpc/sprs: Avoid taking async interrupts caused by register fuzzing

2023-12-19 Thread Thomas Huth
On 16/12/2023 14.42, Nicholas Piggin wrote: Storing certain values in some registers can cause asynchronous interrupts that can crash the test case, for example decrementer or PMU interrupts. Change the msleep to mdelay which does not enable MSR[EE] and so avoids the problem. This allows removin

Re: [kvm-unit-tests PATCH v5 11/29] powerpc/sprs: Don't fail changed SPRs that are used by the test harness

2023-12-19 Thread Thomas Huth
On 16/12/2023 14.42, Nicholas Piggin wrote: SPRs annotated with SPR_HARNESS can change between consecutive reads because the test harness code has changed them. Avoid failing the test in this case. [XER was observed to change after the next changeset to use mdelay.] Signed-off-by: Nicholas Pigg

Re: [PATCH v14 5/6] powerpc: add crash CPU hotplug support

2023-12-19 Thread Hari Bathini
Hi Sourabh On 11/12/23 2:00 pm, Sourabh Jain wrote: Due to CPU/Memory hotplug or online/offline events the elfcorehdr (which describes the CPUs and memory of the crashed kernel) and FDT (Flattened Device Tree) of kdump image becomes outdated. Consequently, attempting dump collection with an outd

[PATCH] powerpc/hvcall: Reorder Nestedv2 hcall opcodes

2023-12-19 Thread Vaibhav Jain
This trivial patch reorders the newly introduced hcall opcodes for Nestedv2 to follow the increasing-opcode-number convention followed in 'hvcall.h'. The patch also updates the value for MAX_HCALL_OPCODE which is at various places in arch code for range checking. Fixes: 19d31c5f1157 ("KVM: PPC: Ad

Re: [PATCH v2] ASoC: fsl_sai: Fix channel swap issue on i.MX8MP

2023-12-19 Thread Daniel Baluta
On Tue, Dec 19, 2023 at 5:12 AM Shengjiu Wang wrote: > > When flag mclk_with_tere and mclk_direction_output enabled, > The SAI transmitter or receiver will be enabled in very early > stage, that if FSL_SAI_xMR is set by previous case, > for example previous case is one channel, current case is > t

[PATCH 13/13] mm/gup: Handle hugetlb in the generic follow_page_mask code

2023-12-19 Thread peterx
From: Peter Xu Now follow_page() is ready to handle hugetlb pages in whatever form, and over all architectures. Switch to the generic code path. Time to retire hugetlb_follow_page_mask(), following the previous retirement of follow_hugetlb_page() in 4849807114b8. There may be a slight differen

[PATCH 12/13] mm/gup: Handle hugepd for follow_page()

2023-12-19 Thread peterx
From: Peter Xu Hugepd is only used in PowerPC so far on 4K page size kernels where hash mmu is used. follow_page_mask() used to leverage hugetlb APIs to access hugepd entries. Teach follow_page_mask() itself on hugepd. With previous refactors on fast-gup gup_huge_pd(), most of the code can be

[PATCH 11/13] mm/gup: Handle huge pmd for follow_pmd_mask()

2023-12-19 Thread peterx
From: Peter Xu Replace pmd_trans_huge() with pmd_thp_or_huge() to also cover pmd_huge() as long as enabled. FOLL_TOUCH and FOLL_SPLIT_PMD only apply to THP, not yet huge. Since now follow_trans_huge_pmd() can process hugetlb pages, renaming it into follow_huge_pmd() to match what it does. Move

[PATCH 10/13] mm/gup: Handle huge pud for follow_pud_mask()

2023-12-19 Thread peterx
From: Peter Xu Teach follow_pud_mask() to be able to handle normal PUD pages like hugetlb. Rename follow_devmap_pud() to follow_huge_pud() so that it can process either huge devmap or hugetlb. Move it out of TRANSPARENT_HUGEPAGE_PUD and and huge_memory.c (which relies on CONFIG_THP). In the new

[PATCH 09/13] mm/gup: Cache *pudp in follow_pud_mask()

2023-12-19 Thread peterx
From: Peter Xu Introduce "pud_t pud" in the function, so the code won't dereference *pudp multiple time. Not only because that looks less straightforward, but also because if the dereference really happened, it's not clear whether there can be race to see different *pudp values if it's being mod

[PATCH 08/13] mm/gup: Handle hugetlb for no_page_table()

2023-12-19 Thread peterx
From: Peter Xu no_page_table() is not yet used for hugetlb code paths. Make it prepared. The major difference here is hugetlb will return -EFAULT as long as page cache does not exist, even if VM_SHARED. See hugetlb_follow_page_mask(). Pass "address" into no_page_table() too, as hugetlb will ne

[PATCH 07/13] mm/gup: Refactor record_subpages() to find 1st small page

2023-12-19 Thread peterx
From: Peter Xu All the fast-gup functions take a tail page to operate, always need to do page mask calculations before feeding that into record_subpages(). Merge that logic into record_subpages(), so that it will do the nth_page() calculation. Signed-off-by: Peter Xu --- mm/gup.c | 25 +++

[PATCH 06/13] mm/gup: Drop folio_fast_pin_allowed() in hugepd processing

2023-12-19 Thread peterx
From: Peter Xu Hugepd format for GUP is only used in PowerPC with hugetlbfs. There are some kernel usage of hugepd (can refer to hugepd_populate_kernel() for PPC_8XX), however those pages are not candidates for GUP. Commit a6e79df92e4a ("mm/gup: disallow FOLL_LONGTERM GUP-fast writing to file-b

[PATCH 05/13] mm: Introduce vma_pgtable_walk_{begin|end}()

2023-12-19 Thread peterx
From: Peter Xu Introduce per-vma begin()/end() helpers for pgtable walks. This is a preparation work to merge hugetlb pgtable walkers with generic mm. The helpers need to be called before and after a pgtable walk, will start to be needed if the pgtable walker code supports hugetlb pages. It's