Re: [PATCH v5 3/4] arm64: topology: Support SMT control on ACPI based system

2024-08-19 Thread Yicong Yang
On 2024/8/16 23:55, Dietmar Eggemann wrote: > On 06/08/2024 10:53, Yicong Yang wrote: >> From: Yicong Yang >> >> For ACPI we'll build the topology from PPTT and we cannot directly >> get the SMT number of each core. Instead using a temporary xarray >> to record the SMT number of each core when bui

Re: [PATCH v5 1/4] cpu/SMT: Provide a default topology_is_primary_thread()

2024-08-19 Thread Yicong Yang
On 2024/8/16 23:54, Dietmar Eggemann wrote: > On 06/08/2024 10:53, Yicong Yang wrote: >> From: Yicong Yang >> >> Currently if architectures want to support HOTPLUG_SMT they need to >> provide a topology_is_primary_thread() telling the framework which >> thread in the SMT cannot offline. However ar

Re: [RFC PATCH v2 4/6] ASoC: fsl_asrc_m2m: Add memory to memory function

2024-08-19 Thread Pierre-Louis Bossart
On 8/16/24 12:42, Shengjiu Wang wrote: > Implement the ASRC memory to memory function using > the compress framework, user can use this function with > compress ioctl interface. > > Define below private metadata key value for output > format, output rate and ratio modifier configuration. > ASRC

Re: [PATCH v5 2/4] arch_topology: Support SMT control for OF based system

2024-08-19 Thread Yicong Yang
On 2024/8/16 23:55, Dietmar Eggemann wrote: > On 06/08/2024 10:53, Yicong Yang wrote: >> From: Yicong Yang >> >> On building the topology from the devicetree, we've already >> gotten the SMT thread number of each core. Update the largest >> SMT thread number to enable the SMT control. > > Do we h

Re: [PATCH v2] Document/kexec: Generalize crash hotplug description

2024-08-19 Thread Baoquan He
Add Jonathan and Andew. On 08/12/24 at 09:46am, Sourabh Jain wrote: > Commit 79365026f869 ("crash: add a new kexec flag for hotplug support") > generalizes the crash hotplug support to allow architectures to update > multiple kexec segments on CPU/Memory hotplug and not just elfcorehdr. > Therefor

[PATCH] ata: pata_macio: Fix DMA table overflow

2024-08-19 Thread Michael Ellerman
Kolbjørn and Jonáš reported that their 32-bit PowerMacs were crashing in pata-macio since commit 09fe2bfa6b83 ("ata: pata_macio: Fix max_segment_size with PAGE_SIZE == 64K"). For example: kernel BUG at drivers/ata/pata_macio.c:544! Oops: Exception in kernel mode, sig: 5 [#1] BE PAGE_SIZE=4K

[RFC PATCH] ata: pata_macio: Use WARN instead of BUG

2024-08-19 Thread Michael Ellerman
The overflow/underflow conditions in pata_macio_qc_prep() should never happen. But if they do there's no need to kill the system entirely, a WARN and failing the IO request should be sufficient and might allow the system to keep running. Signed-off-by: Michael Ellerman --- drivers/ata/pata_macio

Re: [PATCH v12 1/6] uaccess: add generic fallback version of copy_mc_to_user()

2024-08-19 Thread Jonathan Cameron
On Tue, 28 May 2024 16:59:10 +0800 Tong Tiangen wrote: > x86/powerpc has it's implementation of copy_mc_to_user(), we add generic > fallback in include/linux/uaccess.h prepare for other architechures to > enable CONFIG_ARCH_HAS_COPY_MC. > > Signed-off-by: Tong Tiangen > Acked-by: Michael Ellerm

Re: [PATCH v12 2/6] arm64: add support for ARCH_HAS_COPY_MC

2024-08-19 Thread Jonathan Cameron
On Tue, 28 May 2024 16:59:11 +0800 Tong Tiangen wrote: > For the arm64 kernel, when it processes hardware memory errors for > synchronize notifications(do_sea()), if the errors is consumed within the > kernel, the current processing is panic. However, it is not optimal. > > Take copy_from/to_use

Re: [PATCH] ata: pata_macio: Fix DMA table overflow

2024-08-19 Thread Damien Le Moal
On 8/19/24 19:17, Michael Ellerman wrote: > Kolbjørn and Jonáš reported that their 32-bit PowerMacs were crashing > in pata-macio since commit 09fe2bfa6b83 ("ata: pata_macio: Fix > max_segment_size with PAGE_SIZE == 64K"). > > For example: > > kernel BUG at drivers/ata/pata_macio.c:544! > Oop

Re: [RFC PATCH] ata: pata_macio: Use WARN instead of BUG

2024-08-19 Thread Damien Le Moal
On 8/19/24 19:19, Michael Ellerman wrote: > The overflow/underflow conditions in pata_macio_qc_prep() should never > happen. But if they do there's no need to kill the system entirely, a > WARN and failing the IO request should be sufficient and might allow the > system to keep running. > > Signed

Re: [PATCH v3] PCI: Fix crash during pci_dev hot-unplug on pseries KVM guest

2024-08-19 Thread Amit Machhiwal
Hi Michael, On 2024/08/17 08:59 AM, Michael Ellerman wrote: > Amit Machhiwal writes: > > On 2024/08/15 01:20 PM, Michael Ellerman wrote: > >> Bjorn Helgaas writes: > >> > On Sat, Aug 03, 2024 at 12:03:25AM +0530, Amit Machhiwal wrote: > >> >> With CONFIG_PCI_DYNAMIC_OF_NODES [1], a hot-plug and

Re: [PATCH v12 3/6] mm/hwpoison: return -EFAULT when copy fail in copy_mc_[user]_highpage()

2024-08-19 Thread Jonathan Cameron
On Tue, 28 May 2024 16:59:12 +0800 Tong Tiangen wrote: > If hardware errors are encountered during page copying, returning the bytes > not copied is not meaningful, and the caller cannot do any processing on > the remaining data. Returning -EFAULT is more reasonable, which represents > a hardware

Re: [PATCH v12 4/6] arm64: support copy_mc_[user]_highpage()

2024-08-19 Thread Jonathan Cameron
On Tue, 28 May 2024 16:59:13 +0800 Tong Tiangen wrote: > Currently, many scenarios that can tolerate memory errors when copying page > have been supported in the kernel[1~5], all of which are implemented by > copy_mc_[user]_highpage(). arm64 should also support this mechanism. > > Due to mte, ar

Re: [PATCH v6 6/7] arm64: dts: imx8m: update spdif sound card node properties

2024-08-19 Thread Elinor Montmasson
> From: "Shawn Guo" > Sent: Sunday, 4 August, 2024 16:31:11 > On Thu, Jun 27, 2024 at 10:31:03AM +0200, Elinor Montmasson wrote: >> The merge of imx-spdif driver into fsl-asoc-card brought >> new DT properties that can be used with the "fsl,imx-audio-spdif" >> compatible: >> * The "spdif-controlle

Re: [PATCH v12 6/6] arm64: send SIGBUS to user process for SEA exception

2024-08-19 Thread Jonathan Cameron
On Tue, 28 May 2024 16:59:15 +0800 Tong Tiangen wrote: > For SEA exception, kernel require take some action to recover from memory > error, such as isolate poison page adn kill failure thread, which are done > in memory_failure(). > > During our test, the failure thread cannot be killed due to t

[PATCH] powerpc/pseries: Fix dtl_access_lock to be a rw_semaphore

2024-08-19 Thread Michael Ellerman
The dtl_access_lock needs to be a rw_sempahore, a sleeping lock, because the code calls kmalloc() while holding it, which can sleep: # echo 1 > /proc/powerpc/vcpudispatch_stats BUG: sleeping function called from invalid context at include/linux/sched/mm.h:337 in_atomic(): 1, irqs_disabled()

Re: [PATCH v4 18/29] arm64: add POE signal support

2024-08-19 Thread Catalin Marinas
On Thu, Aug 15, 2024 at 04:09:26PM +0100, Dave P Martin wrote: > On Thu, Aug 15, 2024 at 02:18:15PM +0100, Joey Gouly wrote: > > That's a lot of words to say, or ask, do you agree with the approach of only > > saving POR_EL0 in the signal frame if num_allocated_pkeys() > 1? > > > > Thanks, > > Joe

Re: [PATCH v12 1/6] uaccess: add generic fallback version of copy_mc_to_user()

2024-08-19 Thread Tong Tiangen
在 2024/8/19 17:57, Jonathan Cameron 写道: On Tue, 28 May 2024 16:59:10 +0800 Tong Tiangen wrote: x86/powerpc has it's implementation of copy_mc_to_user(), we add generic fallback in include/linux/uaccess.h prepare for other architechures to enable CONFIG_ARCH_HAS_COPY_MC. Signed-off-by: Tong

Re: [PATCH v12 2/6] arm64: add support for ARCH_HAS_COPY_MC

2024-08-19 Thread Mark Rutland
Hi Tong, On Tue, May 28, 2024 at 04:59:11PM +0800, Tong Tiangen wrote: > For the arm64 kernel, when it processes hardware memory errors for > synchronize notifications(do_sea()), if the errors is consumed within the > kernel, the current processing is panic. However, it is not optimal. > > Take c

Re: [PATCH v2 1/4] mm: Add optional close() to struct vm_special_mapping

2024-08-19 Thread Nathan Chancellor
) > { > + const struct vm_special_mapping *sm = vma->vm_private_data; > + > + if (sm->close) > + sm->close(sm, vma); > } > > static const char *special_mapping_name(struct vm_area_struct *vma) > -- > 2.45.2 > This change is

Re: [PATCH v2 1/4] mm: Add optional close() to struct vm_special_mapping

2024-08-19 Thread Linus Torvalds
On Mon, 19 Aug 2024 at 11:53, Nathan Chancellor wrote: > > > Modules linked in: > Pid: 24, comm: mount Not tainted 6.11.0-rc4-next-20240819 > RIP: 0033:0x68006f6c > RSP: 6c8bfc68 EFLAGS: 00010206 > RAX: 68006f6c RBX: 68a0aa18 RCX: 600d8b09 &g

Re: [PATCH v2 1/4] mm: Add optional close() to struct vm_special_mapping

2024-08-19 Thread Nathan Chancellor
On Mon, Aug 19, 2024 at 12:29:34PM -0700, Linus Torvalds wrote: > On Mon, 19 Aug 2024 at 11:53, Nathan Chancellor wrote: > > > > > > Modules linked in: > > Pid: 24, comm: mount Not tainted 6.11.0-rc4-next-20240819 > > RIP: 0033:0x68006f6c > > RSP: 000

Re: [PATCH v2 1/4] mm: Add optional close() to struct vm_special_mapping

2024-08-19 Thread Linus Torvalds
On Mon, 19 Aug 2024 at 12:51, Nathan Chancellor wrote: > > Yes, that appears to fix it for me. I don't have much to say about the > rest but others might :) Ok, I did a quick hack-job to remove that disgusting install_special_mapping() legacy case. With this, the old "install_special_mapping()"

Re: [PATCH v2 1/4] mm: Add optional close() to struct vm_special_mapping

2024-08-19 Thread Linus Torvalds
On Mon, 19 Aug 2024 at 13:15, Linus Torvalds wrote: > > Ok, I did a quick hack-job to remove that disgusting > install_special_mapping() legacy case. > > With this [..] I forgot to actually attach that "this". Here it is. For real, this time. Linus arch/csky/kernel/vdso.c

Re: [PATCH v3 14/16] modules: Support extended MODVERSIONS info

2024-08-19 Thread Matthew Maurer
On Fri, Aug 16, 2024 at 4:04 PM Michael Ellerman wrote: > > Matthew Maurer writes: > > Adds a new format for MODVERSIONS which stores each field in a separate > > ELF section. This initially adds support for variable length names, but > > could later be used to add additional fields to MODVERSION

Re: [PATCH v2 1/4] mm: Add optional close() to struct vm_special_mapping

2024-08-19 Thread Andrew Morton
On Mon, 19 Aug 2024 13:16:32 -0700 Linus Torvalds wrote: > On Mon, 19 Aug 2024 at 13:15, Linus Torvalds > wrote: > > > > Ok, I did a quick hack-job to remove that disgusting > > install_special_mapping() legacy case. > > > > With this [..] > > I forgot to actually attach that "this". Here it i

Re: [PATCH v2 1/4] mm: Add optional close() to struct vm_special_mapping

2024-08-19 Thread Linus Torvalds
On Mon, 19 Aug 2024 at 18:05, Andrew Morton wrote: > > > > > I forgot to actually attach that "this". Here it is. For real, this time. > > Thanks. Do you think your one-liner remains desirable with this fix in > place? That patch actually removes the whole 'legacy_special_mapping_vmops' that my

Re: [PATCH v12 2/6] arm64: add support for ARCH_HAS_COPY_MC

2024-08-19 Thread Tong Tiangen
在 2024/8/20 1:29, Mark Rutland 写道: Hi Tong, On Tue, May 28, 2024 at 04:59:11PM +0800, Tong Tiangen wrote: For the arm64 kernel, when it processes hardware memory errors for synchronize notifications(do_sea()), if the errors is consumed within the kernel, the current processing is panic. Howe

Re: [PATCH] ata: pata_macio: Fix DMA table overflow

2024-08-19 Thread Michael Ellerman
Damien Le Moal writes: > On 8/19/24 19:17, Michael Ellerman wrote: >> Kolbjørn and Jonáš reported that their 32-bit PowerMacs were crashing >> in pata-macio since commit 09fe2bfa6b83 ("ata: pata_macio: Fix >> max_segment_size with PAGE_SIZE == 64K"). >> >> For example: >> >> kernel BUG at driv

Re: [RFC PATCH] ata: pata_macio: Use WARN instead of BUG

2024-08-19 Thread Michael Ellerman
Damien Le Moal writes: > On 8/19/24 19:19, Michael Ellerman wrote: >> The overflow/underflow conditions in pata_macio_qc_prep() should never >> happen. But if they do there's no need to kill the system entirely, a >> WARN and failing the IO request should be sufficient and might allow the >> syste

Re: [PATCH v12 2/6] arm64: add support for ARCH_HAS_COPY_MC

2024-08-19 Thread Tong Tiangen
在 2024/8/19 18:30, Jonathan Cameron 写道: On Tue, 28 May 2024 16:59:11 +0800 Tong Tiangen wrote: For the arm64 kernel, when it processes hardware memory errors for synchronize notifications(do_sea()), if the errors is consumed within the kernel, the current processing is panic. However, it is

Re: [PATCH v3 14/16] modules: Support extended MODVERSIONS info

2024-08-19 Thread Michael Ellerman
Matthew Maurer writes: > On Fri, Aug 16, 2024 at 4:04 PM Michael Ellerman wrote: >> Matthew Maurer writes: >> > Adds a new format for MODVERSIONS which stores each field in a separate >> > ELF section. This initially adds support for variable length names, but >> > could later be used to add add

Re: [RFC PATCH v2 4/6] ASoC: fsl_asrc_m2m: Add memory to memory function

2024-08-19 Thread Shengjiu Wang
On Mon, Aug 19, 2024 at 3:42 PM Pierre-Louis Bossart wrote: > > > > On 8/16/24 12:42, Shengjiu Wang wrote: > > Implement the ASRC memory to memory function using > > the compress framework, user can use this function with > > compress ioctl interface. > > > > Define below private metadata key valu

Re: [PATCH v12 4/6] arm64: support copy_mc_[user]_highpage()

2024-08-19 Thread Tong Tiangen
在 2024/8/19 19:56, Jonathan Cameron 写道: On Tue, 28 May 2024 16:59:13 +0800 Tong Tiangen wrote: Currently, many scenarios that can tolerate memory errors when copying page have been supported in the kernel[1~5], all of which are implemented by copy_mc_[user]_highpage(). arm64 should also sup

[PATCH v2] ata: pata_macio: Fix DMA table overflow

2024-08-19 Thread Michael Ellerman
Kolbjørn and Jonáš reported that their 32-bit PowerMacs were crashing in pata-macio since commit 09fe2bfa6b83 ("ata: pata_macio: Fix max_segment_size with PAGE_SIZE == 64K"). For example: kernel BUG at drivers/ata/pata_macio.c:544! Oops: Exception in kernel mode, sig: 5 [#1] BE PAGE_SIZE=4K

[PATCH v2] ata: pata_macio: Use WARN instead of BUG

2024-08-19 Thread Michael Ellerman
The overflow/underflow conditions in pata_macio_qc_prep() should never happen. But if they do there's no need to kill the system entirely, a WARN and failing the IO request should be sufficient and might allow the system to keep running. Signed-off-by: Michael Ellerman --- drivers/ata/pata_macio

Re: [PATCH v12 6/6] arm64: send SIGBUS to user process for SEA exception

2024-08-19 Thread Tong Tiangen
在 2024/8/19 20:08, Jonathan Cameron 写道: On Tue, 28 May 2024 16:59:15 +0800 Tong Tiangen wrote: For SEA exception, kernel require take some action to recover from memory error, such as isolate poison page adn kill failure thread, which are done in memory_failure(). During our test, the fail

Re: [PATCH v2 1/4] mm: Add optional close() to struct vm_special_mapping

2024-08-19 Thread Michael Ellerman
Linus Torvalds writes: > On Mon, 19 Aug 2024 at 13:15, Linus Torvalds > wrote: >> >> Ok, I did a quick hack-job to remove that disgusting >> install_special_mapping() legacy case. >> >> With this [..] > > I forgot to actually attach that "this". Here it is. For real, this time. > >

Re: [PATCH] kexec/crash: no crash update when kexec in progress

2024-08-19 Thread Sourabh Jain
Hello Baoquan, On 19/08/24 11:45, Baoquan He wrote: On 08/19/24 at 09:45am, Sourabh Jain wrote: Hello Michael and Boaquan On 01/08/24 12:21, Sourabh Jain wrote: Hello Michael, On 01/08/24 08:04, Michael Ellerman wrote: Sourabh Jain writes: The following errors are observed when kexec is d

[PATCH] powerpc/configs/64s: Enable DEFERRED_STRUCT_PAGE_INIT

2024-08-19 Thread Michael Ellerman
It can speed up initialisation of page structs at boot on large machines. Signed-off-by: Michael Ellerman --- arch/powerpc/configs/ppc64_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/configs/ppc64_defconfig b/arch/powerpc/configs/ppc64_defconfig index 544a65fda77b..

Re: [RFC PATCH v2 4/6] ASoC: fsl_asrc_m2m: Add memory to memory function

2024-08-19 Thread Pierre-Louis Bossart
On 8/20/24 04:53, Shengjiu Wang wrote: > On Mon, Aug 19, 2024 at 3:42 PM Pierre-Louis Bossart > wrote: >> >> >> >> On 8/16/24 12:42, Shengjiu Wang wrote: >>> Implement the ASRC memory to memory function using >>> the compress framework, user can use this function with >>> compress ioctl interfa

Re: [PATCH v4 3/5] powerpc/64: Convert patch_instruction() to patch_u32()

2024-08-19 Thread Hari Bathini
On 15/05/24 8:14 am, Benjamin Gray wrote: This use of patch_instruction() is working on 32 bit data, and can fail if the data looks like a prefixed instruction and the extra write crosses a page boundary. Use patch_u32() to fix the write size. Fixes: 8734b41b3efe ("powerpc/module_64: Fix live