Re: [PATCH v4 3/6] iio: fix potential out-of-bound write

2025-05-25 Thread Jonathan Cameron
On Thu, 8 May 2025 15:06:09 +0200 Markus Burri wrote: > The buffer is set to 20 characters. If a caller write more characters, > count is truncated to the max available space in "simple_write_to_buffer". > To protect from OoB access, check that the input size fit into buffer and > add a zero ter

Re: [PATCH v4 3/6] iio: fix potential out-of-bound write

2025-05-25 Thread Jonathan Cameron
On Thu, 8 May 2025 15:06:09 +0200 Markus Burri wrote: > The buffer is set to 20 characters. If a caller write more characters, > count is truncated to the max available space in "simple_write_to_buffer". > To protect from OoB access, check that the input size fit into buffer and > add a zero ter

Re: [PATCH v4 1/6] iio: backend: fix out-of-bound write

2025-05-25 Thread Jonathan Cameron
On Sun, 11 May 2025 15:27:07 +0100 Jonathan Cameron wrote: > On Thu, 8 May 2025 15:06:07 +0200 > Markus Burri wrote: > > > The buffer is set to 80 character. If a caller write more characters, > > count is truncated to the max available space in "simple_write_to_buf

Re: [PATCH v7 17/17] PCI/AER: Add sysfs attributes for log ratelimits

2025-05-22 Thread Jonathan Cameron
On Wed, 21 May 2025 17:59:42 -0500 Bjorn Helgaas wrote: > On Wed, May 21, 2025 at 11:46:00AM +0100, Jonathan Cameron wrote: > > On Tue, 20 May 2025 16:50:34 -0500 > > Bjorn Helgaas wrote: > > > > > From: Jon Pan-Doh > > > > > > Allow u

Re: [PATCH v7 15/17] PCI/AER: Ratelimit correctable and non-fatal error logging

2025-05-22 Thread Jonathan Cameron
On Wed, 21 May 2025 17:54:30 -0500 Bjorn Helgaas wrote: > On Wed, May 21, 2025 at 11:31:21AM +0100, Jonathan Cameron wrote: > > On Tue, 20 May 2025 16:50:32 -0500 > > Bjorn Helgaas wrote: > > > > > From: Jon Pan-Doh > > > > > > Spammy device

Re: [PATCH v7 17/17] PCI/AER: Add sysfs attributes for log ratelimits

2025-05-21 Thread Jonathan Cameron
On Tue, 20 May 2025 16:50:34 -0500 Bjorn Helgaas wrote: > From: Jon Pan-Doh > > Allow userspace to read/write log ratelimits per device (including > enable/disable). Create aer/ sysfs directory to store them and any > future aer configs. > > Update AER sysfs ABI filename to reflect the broader

Re: [PATCH v7 15/17] PCI/AER: Ratelimit correctable and non-fatal error logging

2025-05-21 Thread Jonathan Cameron
On Tue, 20 May 2025 16:50:32 -0500 Bjorn Helgaas wrote: > From: Jon Pan-Doh > > Spammy devices can flood kernel logs with AER errors and slow/stall > execution. Add per-device ratelimits for AER correctable and non-fatal > uncorrectable errors that use the kernel defaults (10 per 5s). Logging

Re: [PATCH v7 14/17] PCI/AER: Rename struct aer_stats to aer_info

2025-05-21 Thread Jonathan Cameron
t;aer_report" -> "aer_info"] > Signed-off-by: Karolina Stolarek > Signed-off-by: Bjorn Helgaas > Tested-by: Krzysztof Wilczyński > Reviewed-by: Ilpo Järvinen > Reviewed-by: Kuppuswamy Sathyanarayanan > Reviewed-by: Jonathan Cameron

Re: [PATCH v7 13/17] PCI/AER: Make all pci_print_aer() log levels depend on error type

2025-05-21 Thread Jonathan Cameron
aybe it would be simpler to just pass it and not care that it always takes the same value? Either way this is fine. Reviewed-by: Jonathan Cameron > --- > drivers/pci/pcie/aer.c | 16 +++- > 1 file changed, 11 insertions(+), 5 deletions(-) > > diff --git a/drive

Re: [PATCH v7 12/17] PCI/AER: Check log level once and remember it

2025-05-21 Thread Jonathan Cameron
lpo Järvinen > Reviewed-by: Kuppuswamy Sathyanarayanan > Reviewed-by: Jonathan Cameron

Re: [PATCH v7 11/17] PCI/AER: Combine trace_aer_event() with statistics updates

2025-05-21 Thread Jonathan Cameron
On Tue, 20 May 2025 16:50:28 -0500 Bjorn Helgaas wrote: > From: Bjorn Helgaas > > As with the AER statistics, we always want to emit trace events, even if > the actual dmesg logging is rate limited. > > Call trace_aer_event() directly from pci_dev_aer_stats_incr(), where we > update the statis

Re: [PATCH v7 10/17] PCI/AER: Update statistics early in logging

2025-05-21 Thread Jonathan Cameron
Reviewed-by: Kuppuswamy Sathyanarayanan > Always felt odd that a stat got updated in a _print_ function so even without the other reasoning this is a good change. Reviewed-by: Jonathan Cameron > --- > drivers/pci/pcie/aer.c | 5 - > 1 file changed, 4 insertions(+), 1 deletio

Re: [PATCH v7 09/17] PCI/AER: Simplify pci_print_aer()

2025-05-21 Thread Jonathan Cameron
t; Signed-off-by: Bjorn Helgaas > Tested-by: Krzysztof Wilczyński > Reviewed-by: Ilpo Järvinen Another nice cleanup. Reviewed-by: Jonathan Cameron

Re: [PATCH v7 08/17] PCI/AER: Initialize aer_err_info before using it

2025-05-21 Thread Jonathan Cameron
On Tue, 20 May 2025 16:50:25 -0500 Bjorn Helgaas wrote: > From: Bjorn Helgaas > > Previously the struct aer_err_info "e_info" was allocated on the stack > without being initialized, so it contained junk except for the fields we > explicitly set later. > > Initialize "e_info" at declaration wit

Re: [PATCH v7 07/17] PCI/AER: Move aer_print_source() earlier in file

2025-05-21 Thread Jonathan Cameron
d-by: Krzysztof Wilczyński > Reviewed-by: Kuppuswamy Sathyanarayanan > > Reviewed-by: Ilpo Järvinen Reviewed-by: Jonathan Cameron

Re: [PATCH v7 06/17] PCI/AER: Rename aer_print_port_info() to aer_print_source()

2025-05-21 Thread Jonathan Cameron
RR_NONFATAL, or ERR_FATAL Message. > > [bhelgaas: aer_print_rp_info() -> aer_print_source()] > Signed-off-by: Jon Pan-Doh > Signed-off-by: Bjorn Helgaas > Tested-by: Krzysztof Wilczyński > Reviewed-by: Ilpo Järvinen > Reviewed-by: Kuppuswamy Sathyanarayanan > Makes sense. Reviewed-by: Jonathan Cameron

Re: [PATCH v7 05/17] PCI/AER: Extract bus/dev/fn in aer_print_port_info() with PCI_BUS_NUM(), etc

2025-05-21 Thread Jonathan Cameron
> Signed-off-by: Bjorn Helgaas > Tested-by: Krzysztof Wilczyński > Reviewed-by: Kuppuswamy Sathyanarayanan > > Reviewed-by: Ilpo Järvinen Reviewed-by: Jonathan Cameron

Re: [PATCH v7 04/17] PCI/AER: Consolidate Error Source ID logging in aer_isr_one_error_type()

2025-05-21 Thread Jonathan Cameron
om > :02:00.0 (no details found) > > Signed-off-by: Bjorn Helgaas Nice little improvement. I'll assume you reuse details later as otherwise passing a bool and creating the (no details found) in aer_print_port_info() would have been simpler to my eyes as it would have put all the

Re: [PATCH v7 03/17] PCI/AER: Factor COR/UNCOR error handling out from aer_isr_one_error()

2025-05-21 Thread Jonathan Cameron
_one_error_type(). > > aer_isr_one_error() doesn't need the struct aer_rpc pointer, so pass it the > Root Port or RCEC pci_dev pointer instead. > > Signed-off-by: Bjorn Helgaas One passing comment inside (on neighbouring code) Otherwise it is a sensible bit of cleanup. Reviewed-by: Jonathan

Re: [PATCH v7 02/17] PCI/DPC: Log Error Source ID only when valid

2025-05-21 Thread Jonathan Cameron
G. Now the single message is at > KERN_WARNING. > > Signed-off-by: Bjorn Helgaas > Tested-by: Krzysztof Wilczyński > Reviewed-by: Kuppuswamy Sathyanarayanan > Matches the spec conditions as far as I can tell. I guess interesting debate on whether providing extra garbage info is a bug

Re: [PATCH v7 01/17] PCI/DPC: Initialize aer_err_info before using it

2025-05-21 Thread Jonathan Cameron
So maybe needs a fixes tag? info->tlp_header_valid is an easy one to follow as only set in some paths. Otherwise absolutely makes sense. Reviewed-by: Jonathan Cameron > --- > drivers/pci/pcie/dpc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/

Re: [PATCH 2/4 v2] PCI/AER: Modify pci_print_aer() to take log level

2025-05-20 Thread Jonathan Cameron
Fabio M. De Francesco Fair enough on reasoning and it does what you describe so Reviewed-by: Jonathan Cameron

Re: [PATCH 1/4 v2] ACPI: extlog: Trace CPER Non-standard Section Body

2025-05-20 Thread Jonathan Cameron
were > notified to extlog_print() via the IOMCA (I/O Machine Check > Architecture) mechanism. Bring parity to the extlog_print() path by > including a similar log_non_standard_event(). > > Cc: Dan Williams > Reviewed-by: Dan Williams > Signed-off-by: Fabio M. De Francesco Makes sen

Re: [PATCH v4 1/6] iio: backend: fix out-of-bound write

2025-05-11 Thread Jonathan Cameron
On Thu, 8 May 2025 15:06:07 +0200 Markus Burri wrote: > The buffer is set to 80 character. If a caller write more characters, > count is truncated to the max available space in "simple_write_to_buffer". > But afterwards a string terminator is written to the buffer at offset count > without bound

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

2025-03-13 Thread Jonathan Cameron
e SMT-X (X>1) core > platform the SMT control is also supported as expected but only > by writing the "on/off" method. > > [1] > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/ABI/testing/sysfs-devices-system-cpu#n542 > Reviewed-by: Pierre Gondois > Reviewed-by: Dietmar Eggemann > Signed-off-by: Yicong Yang Reviewed-by: Jonathan Cameron

Re: [PATCH v9 3/8] PCI: Add defines for TLP Header/Prefix log sizes

2025-01-14 Thread Jonathan Cameron
On Tue, 14 Jan 2025 19:08:35 +0200 Ilpo Järvinen wrote: > Add defines for AER and DPC capabilities TLP Header Logging register > sizes (PCIe r6.2, sec 7.8.4 / 7.9.14) and replace literals with them. > > Suggested-by: Yazen Ghannam > Signed-off-by: Ilpo Järvinen Hi Ilpo, Where it is simply th

Re: [PATCH v8 4/7] PCI: Use unsigned int i in pcie_read_tlp_log()

2025-01-03 Thread Jonathan Cameron
Reviewed-by: Jonathan Cameron > --- > drivers/pci/pcie/tlp.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/pci/pcie/tlp.c b/drivers/pci/pcie/tlp.c > index 2bf15749cd31..65ac7b5d8a87 100644 > --- a/drivers/pci/pcie/tlp.c > +++ b/dri

Re: [PATCH v8 5/7] PCI: Store # of supported End-End TLP Prefixes

2025-01-03 Thread Jonathan Cameron
x handling happens autonomously on a low layer and the > value in eetlp_prefix_max is not programmed anywhere by the kernel > (i.e., there is no limiter OS can control to prevent sending more > than n TLP Prefixes). > > Signed-off-by: Ilpo Järvinen Extra explanation looks good to me. Reviewed-by: Jonathan Cameron

Re: [PATCH] PCI/AER:Add error message when unable to handle additional devices

2025-01-03 Thread Jonathan Cameron
On Fri, 3 Jan 2025 18:50:35 +0530 Atharva Tiwari wrote: > i completed the todo on line 886 thats why > It is a question, not a todo. So if you wish to make the change you need to discuss why the answer to that question was 'yes it makes sense to print an error message here'. Jonathan

Re: [PATCH] PCI/AER:Add error message when unable to handle additional devices

2025-01-03 Thread Jonathan Cameron
On Fri, 27 Dec 2024 12:49:10 +0530 Atharva Tiwari wrote: > Log an error message in `find_device_iter' > when the system cannot handle more error devices. Needs a statement of 'why' Jonathan > > Signed-off-by: Atharva Tiwari > --- > drivers/pci/pcie/aer.c | 2 +- > 1 file changed, 1 insertion

Re: [PATCH] PCI/ERR: use panic instead pci_info for device recovery failure in PCIe

2025-01-03 Thread Jonathan Cameron
On Fri, 27 Dec 2024 12:22:53 +0530 Atharva Tiwari wrote: > update failed in drivers/pci/pcie/err.c to > trigger a kernel panic instead of pci_info > > Thanks Rewrite message as described in submitting patches documentation. Key thing here is question of 'why?' A question was in that comment, w

Re: [PATCH v10 4/4] arm64: Kconfig: Enable HOTPLUG_SMT

2024-12-23 Thread Jonathan Cameron
On Fri, 20 Dec 2024 15:53:13 +0800 Yicong Yang wrote: > From: Yicong Yang > > Enable HOTPLUG_SMT for SMT control. > > Signed-off-by: Yicong Yang FWIW LGTM Reviewed-by: Jonathan Cameron > --- > arch/arm64/Kconfig | 1 + > 1 file changed, 1 insertion(+) > > d

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

2024-12-23 Thread Jonathan Cameron
ps://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/ABI/testing/sysfs-devices-system-cpu#n542 > Signed-off-by: Yicong Yang A few trivial things inline. Either way it's fine as really just my style preferences Reviewed-by: Jonathan Cameron > --- &

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

2024-12-23 Thread Jonathan Cameron
smt]# cat control > > off > > [root@localhost smt]# cat ../online > > 0,2 > > [root@localhost smt]# echo on > control > > [root@localhost smt]# cat control > > on > > [root@localhost smt]# cat ../online > > 0-3 > > Tested with below

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

2024-12-23 Thread Jonathan Cameron
On Fri, 20 Dec 2024 15:53:11 +0800 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 and enable the SMT control by the end of > topology parsing. > > The cor

Re: [PATCH v6 6/8] PCI: Add TLP Prefix reading into pcie_read_tlp_log()

2024-12-13 Thread Jonathan Cameron
On Thu, 12 Dec 2024 20:48:38 +0200 (EET) Ilpo Järvinen wrote: > On Thu, 12 Dec 2024, Ilpo Järvinen wrote: > > > On Wed, 11 Dec 2024, Jonathan Cameron wrote: > > > > > On Fri, 13 Sep 2024 17:36:30 +0300 > > > Ilpo Järvinen wrote: > > > > >

Re: [PATCH v6 4/8] PCI: Use unsigned int i in pcie_read_tlp_log()

2024-12-11 Thread Jonathan Cameron
On Fri, 13 Sep 2024 17:36:28 +0300 Ilpo Järvinen wrote: > Loop variable i counting from 0 upwards does not need to be signed so > make it unsigned int. > > Signed-off-by: Ilpo Järvinen To me this is unnecessary noise, but it's harmless so no problem if you really like it. Jonathan > --- > dr

Re: [PATCH v6 8/8] PCI/AER: Add prefixes to printouts

2024-12-11 Thread Jonathan Cameron
gt; > Signed-off-by: Ilpo Järvinen Makes sense. Reviewed-by: Jonathan Cameron

Re: [PATCH v6 7/8] PCI: Create helper to print TLP Header and Prefix Log

2024-12-11 Thread Jonathan Cameron
it) so pr_cont() is now replaced with building the string first. > > Signed-off-by: Ilpo Järvinen A couple of trivial things inline but looks good to me either way. Reviewed-by: Jonathan Cameron > diff --git a/drivers/pci/pcie/tlp.c b/drivers/pci/pcie/tlp.c > index def9dd7b73e8..097ac

Re: [PATCH v6 6/8] PCI: Add TLP Prefix reading into pcie_read_tlp_log()

2024-12-11 Thread Jonathan Cameron
TLP Prefix Log register > and the entire length to pcie_read_tlp_log() to be able to read the > correct number of TLP Prefix DWORDs from the correct offset. > > Signed-off-by: Ilpo Järvinen Trivial comments below Reviewed-by: Jonathan Cameron Would have been nice if they'd jus

Re: [PATCH v6 5/8] PCI: Store # of supported End-End TLP Prefixes

2024-12-11 Thread Jonathan Cameron
On Fri, 13 Sep 2024 17:36:29 +0300 Ilpo Järvinen wrote: > eetlp_prefix_path in the struct pci_dev tells if End-End TLP Prefixes > are supported by the path or not, the value is only calculated if > CONFIG_PCI_PASID is set. > > The Max End-End TLP Prefixes field in the Device Capabilities Registe

Re: [PATCH v6 1/8] PCI: Don't expose pcie_read_tlp_log() outside of PCI subsystem

2024-12-11 Thread Jonathan Cameron
t; Remove the unwanted EXPORT of pcie_read_tlp_log() and remove it from > include/linux/aer.h. > > Link: https://lore.kernel.org/all/20240322193011.GA701027@bhelgaas/ > Signed-off-by: Ilpo Järvinen FWIW LGTM Reviewed-by: Jonathan Cameron

Re: [PATCH v6 3/8] PCI: Make pcie_read_tlp_log() signature same

2024-12-11 Thread Jonathan Cameron
an this up. Reviewed-by: Jonathan Cameron

Re: [PATCH v6 2/8] PCI: Move TLP Log handling to own file

2024-12-11 Thread Jonathan Cameron
n a separate file. > > Move TLP Log handling code to own file under pcie/ subdirectory and > include it only when AER is enabled. > > Signed-off-by: Ilpo Järvinen Reviewed-by: Jonathan Cameron Can sort of see this might get used outside AER sometime in the future but for now this seems sensible. Jonathan

Re: [PATCH -next 8/8] soc: ti: knav_qmss_queue: Simplify with scoped for each OF child loop

2024-08-31 Thread Jonathan Cameron
On Fri, 30 Aug 2024 11:24:14 +0800 Jinjie Ruan wrote: > On 2024/8/29 23:58, Kousik Sanagavarapu wrote: > > Jinjie Ruan writes: > >> @@ -1080,17 +1080,13 @@ static int knav_queue_setup_regions(struct > >> knav_device *kdev, > >> { > >>struct device *dev = kdev->dev; > >>struct knav_re

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

2024-08-21 Thread Jonathan Cameron
On Tue, 20 Aug 2024 11:02:05 +0800 Tong Tiangen wrote: > 在 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 > >>

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

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 v12 3/6] mm/hwpoison: return -EFAULT when copy fail in copy_mc_[user]_highpage()

2024-08-19 Thread Jonathan Cameron
sents > a hardware error encountered during the copying. > > Signed-off-by: Tong Tiangen LGTM Reviewed-by: Jonathan Cameron > --- > include/linux/highmem.h | 8 > mm/khugepaged.c | 4 ++-- > 2 files changed, 6 insertions(+), 6 deletions(-) > > diff --git

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 v12 1/6] uaccess: add generic fallback version of copy_mc_to_user()

2024-08-19 Thread Jonathan Cameron
some small differences but I've not analyzed if they matter or not. Reviewed-by: Jonathan Cameron > --- > arch/powerpc/include/asm/uaccess.h | 1 + > arch/x86/include/asm/uaccess.h | 1 + > include/linux/uaccess.h| 8 > 3 files changed, 10 insertion

Re: [PATCH v3 07/26] mm: drop CONFIG_HAVE_ARCH_NODEDATA_EXTENSION

2024-08-04 Thread Jonathan Cameron
On Sun, 4 Aug 2024 10:24:15 +0300 Mike Rapoport wrote: > On Sat, Aug 03, 2024 at 11:58:13AM -0700, Andrew Morton wrote: > > On Fri, 2 Aug 2024 10:49:22 +0100 Jonathan Cameron > > wrote: > > > > > > --- a/mm/mm_init.c > > > > +++ b/mm/mm_init.

Re: [PATCH v3 00/26] mm: introduce numa_memblks

2024-08-02 Thread Jonathan Cameron
PI and FDT > more consistent and I believe will reduce maintenance burden. > > And with generic numa_memblks it is (almost) straightforward to enable NUMA > emulation on arm64 and riscv. Tested-by: Jonathan Cameron #arm64 + CXL via QEMU With that one fix in patch 7. Feel free to figure

Re: [PATCH v3 26/26] docs: move numa=fake description to kernel-parameters.txt

2024-08-02 Thread Jonathan Cameron
meters.txt > > Suggested-by: Zi Yan > Signed-off-by: Mike Rapoport (Microsoft) Reviewed-by: Jonathan Cameron

Re: [PATCH v3 24/26] arch_numa: switch over to numa_memblks

2024-08-02 Thread Jonathan Cameron
and add > functions required by numa_emulation. > > Signed-off-by: Mike Rapoport (Microsoft) > Tested-by: Zi Yan # for x86_64 and arm64 Reviewed-by: Jonathan Cameron

Re: [PATCH v3 23/26] of, numa: return -EINVAL when no numa-node-id is found

2024-08-02 Thread Jonathan Cameron
ning is not desirable. > > Make sure of_numa_init() returns -EINVAL when no NUMA node information > was found in the device tree. > > Signed-off-by: Mike Rapoport (Microsoft) Reviewed-by: Jonathan Cameron

Re: [PATCH v3 19/26] mm: introduce numa_emulation

2024-08-02 Thread Jonathan Cameron
ike Rapoport (Microsoft) > Tested-by: Zi Yan # for x86_64 and arm64 I ran some basic tests on ARM with this. Seems to do the job. Reviewed-by: Jonathan Cameron Tested-by: Jonathan Cameron Works on both ACPI and dsdt boots.

Re: [PATCH v3 22/26] mm: numa_memblks: use memblock_{start,end}_of_DRAM() when sanitizing meminfo

2024-08-02 Thread Jonathan Cameron
ace the memory range boundaries with more portable > memblock_start_of_DRAM() and memblock_end_of_DRAM(). > > Signed-off-by: Mike Rapoport (Microsoft) > Tested-by: Zi Yan # for x86_64 and arm64 Makes sense Reviewed-by: Jonathan Cameron > --- > mm/numa_memblks.c | 4 ++-

Re: [PATCH v3 21/26] mm: numa_memblks: make several functions and variables static

2024-08-02 Thread Jonathan Cameron
ation. > > Signed-off-by: Mike Rapoport (Microsoft) > Tested-by: Zi Yan # for x86_64 and arm64 Good. I was wondering why some of this internal detail was in the header. Much nicer after this. Reviewed-by: Jonathan Cameron

Re: [PATCH v3 20/26] mm: numa_memblks: introduce numa_memblks_init

2024-08-02 Thread Jonathan Cameron
> architecture specific code. > > Signed-off-by: Mike Rapoport (Microsoft) > Tested-by: Zi Yan # for x86_64 and arm64 Just code motion as expected. Reviewed-by: Jonathan Cameron

Re: [PATCH v3 18/26] mm: move numa_distance and related code from x86 to numa_memblks

2024-08-02 Thread Jonathan Cameron
> > Signed-off-by: Mike Rapoport (Microsoft) > Tested-by: Zi Yan # for x86_64 and arm64 As you say, simple code move and I'll cope with the confusion of stuff that isn't numa_memblk in that file given the convenience. Reviewed-by: Jonathan Cameron

Re: [PATCH v3 17/26] mm: introduce numa_memblks

2024-08-02 Thread Jonathan Cameron
. > > No functional changes. > > Signed-off-by: Mike Rapoport (Microsoft) > Tested-by: Zi Yan # for x86_64 and arm64 Reviewed-by: Jonathan Cameron

Re: [PATCH v3 11/26] x86/numa: use get_pfn_range_for_nid to verify that node spans memory

2024-08-02 Thread Jonathan Cameron
lift numa_memblks to generic code. > > Signed-off-by: Mike Rapoport (Microsoft) > Tested-by: Zi Yan # for x86_64 and arm64 Fair enough given code a few lines up has set the node for all the memblocks so this should I think give the same effective result. Reviewed-by: Jonathan

Re: [PATCH v3 10/26] x86/numa: simplify numa_distance allocation

2024-08-02 Thread Jonathan Cameron
; Tested-by: Zi Yan # for x86_64 and arm64 Seems sensible. FWIW (which might just be me not bothering to read this one again ;) Reviewed-by: Jonathan Cameron

Re: [PATCH v3 09/26] arch, mm: pull out allocation of NODE_DATA to generic code

2024-08-02 Thread Jonathan Cameron
when allocation granularity was > PAGE_SIZE anyway. > > Signed-off-by: Mike Rapoport (Microsoft) > Acked-by: David Hildenbrand > Reviewed-by: Jonathan Cameron > Tested-by: Zi Yan # for x86_64 and arm64 One comment unrelated to this patch set as such, just made more obvious by

Re: [PATCH v3 07/26] mm: drop CONFIG_HAVE_ARCH_NODEDATA_EXTENSION

2024-08-02 Thread Jonathan Cameron
On Thu, 1 Aug 2024 09:08:07 +0300 Mike Rapoport wrote: > From: "Mike Rapoport (Microsoft)" > > There are no users of HAVE_ARCH_NODEDATA_EXTENSION left, so > arch_alloc_nodedata() and arch_refresh_nodedata() are not needed > anymore. > > Replace the call to arch_alloc_nodedata() in free_area_i

Re: [PATCH v3 06/26] MIPS: loongson64: drop HAVE_ARCH_NODEDATA_EXTENSION

2024-08-01 Thread Jonathan Cameron
user of HAVE_ARCH_NODEDATA_EXTENSION config option > also remove this option from arch/mips/Kconfig. > > Signed-off-by: Mike Rapoport (Microsoft) These are as you say now identical to the generic form, so don't need a special version for any reason I can see. Reviewed-by: Jonatha

Re: [PATCH v3 04/26] MIPS: sgi-ip27: drop HAVE_ARCH_NODEDATA_EXTENSION

2024-08-01 Thread Jonathan Cameron
arch_alloc_nodedata() and HAVE_ARCH_NODEDATA_EXTENSION > from sgi-ip27. > > Signed-off-by: Mike Rapoport (Microsoft) Reviewed-by: Jonathan Cameron > --- > arch/mips/Kconfig| 1 - > arch/mips/sgi-ip27/ip27-memory.c | 10 -- > 2 files changed, 11

Re: [PATCH v3 03/26] MIPS: sgi-ip27: ensure node_possible_map only contains valid nodes

2024-08-01 Thread Jonathan Cameron
nodes present in the system. > > Signed-off-by: Mike Rapoport (Microsoft) Reviewed-by: Jonathan Cameron > --- > arch/mips/sgi-ip27/ip27-smp.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/arch/mips/sgi-ip27/ip27-smp.c b/arch/mips/sgi-ip27/ip27-smp.c > index 5d2

Re: [PATCH v3 02/26] MIPS: sgi-ip27: make NODE_DATA() the same as on all other architectures

2024-08-01 Thread Jonathan Cameron
hus is fine. So with that in mind (and it could be completely wrong ;) Reviewed-by: Jonathan Cameron > --- > arch/mips/include/asm/mach-ip27/mmzone.h | 5 - > arch/mips/sgi-ip27/ip27-memory.c | 5 - > 2 files changed, 8 insertions(+), 2 deletions(-) > > diff

Re: [PATCH 17/17] mm: make range-to-target_node lookup facility a part of numa_memblks

2024-07-19 Thread Jonathan Cameron
lks are now part of the generic code, move these > functions from x86 to mm/numa_memblks.c and select > CONFIG_NUMA_KEEP_MEMINFO when CONFIG_NUMA_MEMBLKS=y for dax and cxl. > > Signed-off-by: Mike Rapoport (Microsoft) Reviewed-by: Jonathan Cameron Thanks. I'll poke around more next week. Have a good weekend. Jonathan

Re: [PATCH 12/17] mm: introduce numa_memblks

2024-07-19 Thread Jonathan Cameron
On Tue, 16 Jul 2024 14:13:41 +0300 Mike Rapoport wrote: > From: "Mike Rapoport (Microsoft)" > > Move code dealing with numa_memblks from arch/x86 to mm/ and add Kconfig > options to let x86 select it in its Kconfig. > > This code will be later reused by arch_numa. > > No functional changes. >

Re: [PATCH 16/17] arch_numa: switch over to numa_memblks

2024-07-19 Thread Jonathan Cameron
On Tue, 16 Jul 2024 14:13:45 +0300 Mike Rapoport wrote: > From: "Mike Rapoport (Microsoft)" > > Until now arch_numa was directly translating firmware NUMA information > to memblock. > > Using numa_memblks as an intermediate step has a few advantages: > * alignment with more battle tested x86 i

Re: [PATCH 15/17] mm: make numa_memblks more self-contained

2024-07-19 Thread Jonathan Cameron
On Tue, 16 Jul 2024 14:13:44 +0300 Mike Rapoport wrote: > From: "Mike Rapoport (Microsoft)" > > Introduce numa_memblks_init() and move some code around to avoid several > global variables in numa_memblks. Hi Mike, Adding the effectively always on memblock_force_top_down deserves a comment on

Re: [PATCH 13/17] mm: move numa_distance and related code from x86 to numa_memblks

2024-07-19 Thread Jonathan Cameron
On Tue, 16 Jul 2024 14:13:42 +0300 Mike Rapoport wrote: > From: "Mike Rapoport (Microsoft)" > > Move code dealing with numa_distance array from arch/x86 to > mm/numa_memblks.c It's not really numa memblock related. Is this the best place to put it? > > This code will be later reused by arch_

Re: [PATCH 10/17] x86/numa_emu: use a helper function to get MAX_DMA32_PFN

2024-07-19 Thread Jonathan Cameron
ort (Microsoft) Reviewed-by: Jonathan Cameron

Re: [PATCH 09/17] x86/numa_emu: split __apicid_to_node update to a helper function

2024-07-19 Thread Jonathan Cameron
t (Microsoft) Not the most intuitive of function names but I can't immediately think of a better one. Reviewed-by: Jonathan Cameron

Re: [PATCH 08/17] x86/numa_emu: simplify allocation of phys_dist

2024-07-19 Thread Jonathan Cameron
allocation. > > Replace memblock_phys_alloc_range() with memblock_alloc(). > > Signed-off-by: Mike Rapoport (Microsoft) Indeed seems to be after mapping physical memory, so this looks fine. Reviewed-by: Jonathan Cameron

Re: [PATCH 07/17] x86/numa: move FAKE_NODE_* defines to numa_emu

2024-07-19 Thread Jonathan Cameron
t; Signed-off-by: Mike Rapoport (Microsoft) Reviewed-by: Jonathan Cameron

Re: [PATCH 06/17] x86/numa: simplify numa_distance allocation

2024-07-19 Thread Jonathan Cameron
On Tue, 16 Jul 2024 14:13:35 +0300 Mike Rapoport wrote: > From: "Mike Rapoport (Microsoft)" > > Allocation of numa_distance uses memblock_phys_alloc_range() to limit > allocation to be below the last mapped page. > > But NUMA initializaition runs after the direct map is populated and initiali

Re: [PATCH 05/17] arch, mm: pull out allocation of NODE_DATA to generic code

2024-07-19 Thread Jonathan Cameron
given that file already has mix and match of those and normal prints in single functions I assume this change is fine and we'll just see the prints a bit later. Reviewed-by: Jonathan Cameron

Re: [PATCH 05/17] arch, mm: pull out allocation of NODE_DATA to generic code

2024-07-19 Thread Jonathan Cameron
On Fri, 19 Jul 2024 17:07:35 +0200 David Hildenbrand wrote: > >>> - * Allocate node data. Try node-local memory and then any node. > >>> - * Never allocate in DMA zone. > >>> - */ > >>> - nd_pa = memblock_phys_alloc_try_nid(nd_size, SMP_CACHE_BYTES, nid); > >>> - if (!nd_pa) { > >>> -

Re: [PATCH 04/17] arch, mm: move definition of node_data to generic code

2024-07-19 Thread Jonathan Cameron
igned-off-by: Mike Rapoport (Microsoft) Reviewed-by: Jonathan Cameron

Re: [PATCH 03/17] MIPS: loongson64: rename __node_data to node_data

2024-07-19 Thread Jonathan Cameron
t; Signed-off-by: Mike Rapoport (Microsoft) FWIW rename looks fine Reviewed-by: Jonathan Cameron

Re: [PATCH 02/17] MIPS: sgi-ip27: make NODE_DATA() the same as on all other architectures

2024-07-19 Thread Jonathan Cameron
On Wed, 17 Jul 2024 16:32:59 +0200 David Hildenbrand wrote: > On 16.07.24 13:13, Mike Rapoport wrote: > > From: "Mike Rapoport (Microsoft)" > > > > sgi-ip27 is the only system that defines NODE_DATA() differently than > > the rest of NUMA machines. > > > > Add node_data array of struct pglist

Re: [PATCH 01/17] mm: move kernel/numa.c to mm/

2024-07-19 Thread Jonathan Cameron
are in arch/*/mm not arch/*/kernel so this makes it more consistent with that. Reviewed-by: Jonathan Cameron

Re: [PATCH 00/17] mm: introduce numa_memblks

2024-07-19 Thread Jonathan Cameron
On Tue, 16 Jul 2024 14:13:29 +0300 Mike Rapoport wrote: > From: "Mike Rapoport (Microsoft)" > > Hi, > > Following the discussion about handling of CXL fixed memory windows on > arm64 [1] I decided to bite the bullet and move numa_memblks from x86 to > the generic code so they will be available

Re: [PATCH 12/20] iio: adc: ti_am335x_adc: convert to of_property_for_each_u32_new()

2024-07-03 Thread Jonathan Cameron
On Wed, 03 Jul 2024 12:36:56 +0200 Luca Ceresoli wrote: > Simplify code using of_property_for_each_u32_new() as the two additional > parameters in of_property_for_each_u32() are not used here. > > Signed-off-by: Luca Ceresoli Acked-by: Jonathan Cameron

Re: [PATCH v4 2/3] PCI/AER: Print UNCOR_STATUS bits that might be ANFE

2024-06-06 Thread Jonathan Cameron
d-by: "Wang, Qingshun" > Signed-off-by: "Wang, Qingshun" > Signed-off-by: Zhenzhong Duan Reviewed-by: Jonathan Cameron

Re: [PATCH v4 1/3] PCI/AER: Store UNCOR_STATUS bits that might be ANFE in aer_err_info

2024-06-06 Thread Jonathan Cameron
uan Not my most confident review ever as this is nasty and gives me a headache but your description is good and I think the implementation looks reasonable. Reviewed-by: Jonathan Cameron

Re: [PATCH v4 3/3] PCI/AER: Clear UNCOR_STATUS bits that might be ANFE

2024-06-06 Thread Jonathan Cameron
r status/mask=2000/ > [13] NonFatalErr > Uncorrectable errors that may cause Advisory Non-Fatal: > [18] TLP > > Tested-by: Yudong Wang > Co-developed-by: "Wang, Qingshun" > Signed-off-by: "Wang, Qingshun" > Signed-off-by:

Re: [PATCH v3 1/3] PCI/AER: Store UNCOR_STATUS bits that might be ANFE in aer_err_info

2024-05-01 Thread Jonathan Cameron
On Sun, 28 Apr 2024 03:31:11 + "Duan, Zhenzhong" wrote: > Hi Jonathan, > > >-Original Message----- > >From: Jonathan Cameron > >Subject: Re: [PATCH v3 1/3] PCI/AER: Store UNCOR_STATUS bits that might > >be ANFE in aer_err_info > >

Re: [PATCH v3 1/3] PCI/AER: Store UNCOR_STATUS bits that might be ANFE in aer_err_info

2024-04-26 Thread Jonathan Cameron
On Tue, 23 Apr 2024 02:25:05 + "Duan, Zhenzhong" wrote: > >-Original Message- > >From: Jonathan Cameron > >Subject: Re: [PATCH v3 1/3] PCI/AER: Store UNCOR_STATUS bits that might > >be ANFE in aer_err_info > > > >On Wed, 17 Ap

Re: [PATCH v3 1/3] PCI/AER: Store UNCOR_STATUS bits that might be ANFE in aer_err_info

2024-04-22 Thread Jonathan Cameron
On Wed, 17 Apr 2024 14:14:05 +0800 Zhenzhong Duan wrote: > In some cases the detector of a Non-Fatal Error(NFE) is not the most > appropriate agent to determine the type of the error. For example, > when software performs a configuration read from a non-existent > device or Function, completer wi

Re: [PATCH 1/3] PCI/AER: Use 'Correctable' and 'Uncorrectable' spec terms for errors

2023-12-08 Thread Jonathan Cameron
On Wed, 6 Dec 2023 16:42:29 -0600 Bjorn Helgaas wrote: > From: Bjorn Helgaas > > The PCIe spec classifies errors as either "Correctable" or "Uncorrectable". > Previously we printed these as "Corrected" or "Uncorrected". To avoid > confusion, use the same terms as the spec. > > One confusing

Re: [PATCH 3/3] PCI/AER: Use explicit register sizes for struct members

2023-12-08 Thread Jonathan Cameron
"u32" as well. > > No functional changes intended. > > Signed-off-by: Bjorn Helgaas Another sensible cleanup. FWIW on such simple patches Reviewed-by: Jonathan Cameron

Re: [PATCH 2/3] PCI/AER: Decode Requester ID when no error info found

2023-12-08 Thread Jonathan Cameron
cieport :00:1c.5: AER: Correctable error received: :00:1c.5 > - pcieport :00:1c.5: AER: can't find device of ID00e5 > + pcieport :00:1c.5: AER: Correctable error message received from > :00:1c.5 > + pcieport :00:1c.5: AER: found no error details for :00:1c.5 > > Signed-off-by: Bjorn Helgaas LGTM Reviewed-by: Jonathan Cameron

Re: [PATCH 0/8] devm_led_classdev_register() usage problem

2023-11-25 Thread Jonathan Cameron
On Sat, 25 Nov 2023 03:47:41 +0300 George Stark wrote: > Hello Andy > > Thanks for the review. > > On 11/24/23 18:28, Andy Shevchenko wrote: > > On Wed, Oct 25, 2023 at 04:07:29PM +0300, George Stark wrote: > >> Lots of drivers use devm_led_classdev_register() to register their led > >> obje

Re: [PATCH v4 22/23] PCI/AER: Forward RCH downstream port-detected errors to the CXL.mem dev handler

2023-06-01 Thread Jonathan Cameron
.1.3 PCIe DVSEC for CXL Devices > > Co-developed-by: Terry Bowman > Signed-off-by: Terry Bowman > Signed-off-by: Robert Richter > Cc: "Oliver O'Halloran" > Cc: Bjorn Helgaas > Cc: linuxppc-dev@lists.ozlabs.org > Cc: linux-...@vger.kernel.org > --- Reviewed-by: Jonathan Cameron

Re: [PATCH v4 1/3] PCI/AER: Factor out interrupt toggling into helpers

2023-05-05 Thread Jonathan Cameron
On Mon, 24 Apr 2023 13:52:47 +0800 Kai-Heng Feng wrote: > There are many places that enable and disable AER interrput, so move interrupt > them into helpers. Otherwise looks like a good clean up to me. FWIW Reviewed-by: Jonathan Cameron > > Reviewed-by: Mika Westerberg &

  1   2   >