Re: [PATCH 05/33] powerpc/powermac: remove unneeded tty includes

2025-06-11 Thread Ilpo Järvinen
include > #include > #include > #include Seems true. I had to actually scan through the file as it does have some console related setup. Reviewed-by: Ilpo Järvinen -- i.

Re: [PATCH 02/33] powerpc/legacy_serial: cache serial port and info in add_legacy_port()

2025-06-11 Thread Ilpo Järvinen
: Christophe Leroy > Cc: linuxppc-dev@lists.ozlabs.org Reviewed-by: Ilpo Järvinen -- i. > --- > arch/powerpc/kernel/legacy_serial.c | 52 ++--- > 1 file changed, 26 insertions(+), 26 deletions(-) > > diff --git a/arch/powerpc/kernel/legacy_serial.c >

Re: [PATCH v8 13/20] PCI/ERR: Add printk level to pcie_print_tlp_log()

2025-05-28 Thread Ilpo Järvinen
On Wed, 28 May 2025, Lukas Wunner wrote: > On Thu, May 22, 2025 at 06:21:19PM -0500, Bjorn Helgaas wrote: > > @@ -130,6 +132,6 @@ void pcie_print_tlp_log(const struct pci_dev *dev, > > } > > } > > > > - pci_err(dev, "%sTLP Header%s: %s\n", pfx, > > + dev_printk(level, &dev->d

Re: [PATCH v8 16/20] PCI/AER: Convert aer_get_device_error_info(), aer_print_error() to index

2025-05-23 Thread Ilpo Järvinen
onst char *level = info->level; > > + if (i >= AER_MAX_MULTI_ERR_DEVICES) > + return; Are these OoB checks actually indication of a logic error in the caller side which would perhaps warrant using if (WARN_ON_ONCE(i >= AER_MAX_MULTI_ERR_DEVICES)) ?

Re: [PATCH v8 17/20] PCI/AER: Simplify add_error_device()

2025-05-23 Thread Ilpo Järvinen
ror_dev_num++; > - return 0; > - } > - return -ENOSPC; > + int i = e_info->error_dev_num; > + > + if (i >= AER_MAX_MULTI_ERR_DEVICES) > + return -ENOSPC; > + > + e_info->dev[i] = pci_dev_get(dev); > + e_info->error_dev_num++; > + > + return 0; > } > > /** > Reviewed-by: Ilpo Järvinen -- i.

Re: [PATCH v8 13/20] PCI/ERR: Add printk level to pcie_print_tlp_log()

2025-05-23 Thread Ilpo Järvinen
uct pci_dev *dev, > - const struct pcie_tlp_log *log, const char *pfx) > + const struct pcie_tlp_log *log, const char *level, > + const char *pfx) > { > /* EE_PREFIX_STR fits the extended DW space needed for the Flit mode */ > char buf[11 * PCIE_STD_MAX_TLP_HEADERLOG + 1]; > @@ -130,6 +132,6 @@ void pcie_print_tlp_log(const struct pci_dev *dev, > } > } > > - pci_err(dev, "%sTLP Header%s: %s\n", pfx, > + dev_printk(level, &dev->dev, "%sTLP Header%s: %s\n", pfx, > log->flit ? " (Flit)" : "", buf); > } > Reviewed-by: Ilpo Järvinen -- i.

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

2025-05-21 Thread Ilpo Järvinen
On Wed, 21 May 2025, Jonathan Cameron wrote: > 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 conf

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

2025-05-21 Thread Ilpo Järvinen
[bhelgaas: commit log, factor out trace_aer_event() and aer_print_rp_info() > changes to previous patches, collect single aer_err_info.ratelimit as union > of ratelimits of all error source devices, don't ratelimit fatal errors, > "aer_report" -> "aer_info"]

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

2025-05-21 Thread Ilpo Järvinen
return false; > - } > return true; > } > > @@ -1281,9 +1275,11 @@ static inline void aer_process_err_devices(struct > aer_err_info *e_info) > static void aer_isr_one_error_type(struct pci_dev *root, > struct aer_e

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

2025-05-21 Thread Ilpo Järvinen
&e_info); > } > } > > @@ -1340,7 +1350,7 @@ static irqreturn_t aer_isr(int irq, void *context) > return IRQ_NONE; > > while (kfifo_get(&rpc->aer_fifo, &e_src)) > - aer_isr_one_error(rpc, &e_src); > + aer_isr_one_error(rpc->rpd, &e_src); > return IRQ_HANDLED; > } > > Reviewed-by: Ilpo Järvinen -- i.

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

2025-05-21 Thread Ilpo Järvinen
= status & PCI_EXP_DPC_STATUS_TRIGGER_RSN_EXT; > + pci_warn(pdev, "containment event, status:%#06x: %s detected\n", > + status, > + (ext_reason == PCI_EXP_DPC_STATUS_TRIGGER_RSN_RP_PIO) ? > + "RP PIO error" : > + (ext_reason == > PCI_EXP_DPC_STATUS_TRIGGER_RSN_SW_TRIGGER) ? > + "software trigger" : > + "reserved error"); > + /* show RP PIO error detail information */ > + if (ext_reason == PCI_EXP_DPC_STATUS_TRIGGER_RSN_RP_PIO && > + pdev->dpc_rp_extensions) > + dpc_process_rp_pio_error(pdev); > + break; > } > } > > Reviewed-by: Ilpo Järvinen -- i.

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

2025-05-21 Thread Ilpo Järvinen
t pci_dev *pdev) > { > u16 cap = pdev->dpc_cap, status, source, reason, ext_reason; > - struct aer_err_info info; > + struct aer_err_info info = {}; > > pci_read_config_word(pdev, cap + PCI_EXP_DPC_STATUS, &status); > pci_read_config_word(pdev, cap + PCI_EXP_DPC_SOURCE_ID, &source); > Reviewed-by: Ilpo Järvinen -- i.

Re: [PATCH v6 14/16] PCI/AER: Introduce ratelimit for error logs

2025-05-21 Thread Ilpo Järvinen
On Tue, 20 May 2025, Bjorn Helgaas wrote: > On Tue, May 20, 2025 at 02:55:32PM +0300, Ilpo Järvinen wrote: > > On Mon, 19 May 2025, Bjorn Helgaas wrote: > > > > > From: Jon Pan-Doh > > > > > > Spammy devices can flood kernel logs with AER errors and

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

2025-05-20 Thread Ilpo Järvinen
On Tue, 20 May 2025, Bjorn Helgaas wrote: > On Mon, May 19, 2025 at 04:15:56PM -0700, Sathyanarayanan Kuppuswamy wrote: > > On 5/19/25 2:35 PM, Bjorn Helgaas wrote: > > > From: Bjorn Helgaas > > > > > > DPC Error Source ID is only valid when the DPC Trigger Reason indicates > > > that DPC was tr

Re: [PATCH v6 03/16] PCI/AER: Consolidate Error Source ID logging in aer_print_port_info()

2025-05-20 Thread Ilpo Järvinen
aer_print_port_info(pdev, &e_info, ""); > aer_process_err_devices(&e_info); > + } > } > > if (e_src->status & PCI_ERR_ROOT_UNCOR_RCV) { > @@ -1316,10 +1318,10 @@ static void aer_isr_one_error(struc

Re: [PATCH v6 16/16] PCI/AER: Add sysfs attributes for log ratelimits

2025-05-20 Thread Ilpo Järvinen
On Mon, 19 May 2025, 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 scope of AER s

Re: [PATCH v6 14/16] PCI/AER: Introduce ratelimit for error logs

2025-05-20 Thread Ilpo Järvinen
On Mon, 19 May 2025, 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 uncorrectable > errors that use the kernel defaults (10 per 5s). > > There are two AER logging ent

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

2025-05-20 Thread Ilpo Järvinen
On Mon, 19 May 2025, Bjorn Helgaas wrote: > From: Bjorn Helgaas > > DPC Error Source ID is only valid when the DPC Trigger Reason indicates > that DPC was triggered due to reception of an ERR_NONFATAL or ERR_FATAL > Message (PCIe r6.0, sec 7.9.14.5). > > When DPC was triggered by ERR_NONFATAL (

Re: [PATCH v6 13/16] PCI/AER: Rename struct aer_stats to aer_report

2025-05-20 Thread Ilpo Järvinen
;rootport_total_nonfatal_errs++; > + aer_report->rootport_total_nonfatal_errs++; > } > } > > diff --git a/include/linux/pci.h b/include/linux/pci.h > index 0e8e3fd77e96..4b11a90107cb 100644 > --- a/include/linux/pci.h > +++ b/include/linux/pci.h > @@ -346,7 +346,7 @@ struct pci_dev { > u8 hdr_type; /* PCI header type (`multi' flag masked > out) */ > #ifdef CONFIG_PCIEAER > u16 aer_cap;/* AER capability offset */ > - struct aer_stats *aer_stats;/* AER stats for this device */ > + struct aer_report *aer_report; /* AER report for this device */ > #endif > #ifdef CONFIG_PCIEPORTBUS > struct rcec_ea *rcec_ea; /* RCEC cached endpoint association */ > Reviewed-by: Ilpo Järvinen -- i.

Re: [PATCH v6 12/16] PCI/AER: Make all pci_print_aer() log levels depend on error type

2025-05-20 Thread Ilpo Järvinen
ader_log, dev_fmt(" ")); There's another similar callsite but only this has the comment added. I was thinking if this call could be made from __aer_print_error(). There would be small change in order of messages but I can't seem to decide if it would be bad/good. Reviewed-by: Ilpo Järvinen > } > -- i.

Re: [PATCH v6 11/16] PCI/AER: Check log level once and remember it

2025-05-20 Thread Ilpo Järvinen
l; /* printk level */ As a general direction, wouldn't it be better to start adding these comments in the kerneldoc compatible format (even if not yet enabling the kerneldoc with /**)? Reviewed-by: Ilpo Järvinen -- i. > > unsigned int id:16; > > diff --gi

Re: [PATCH v6 10/16] PCI/AER: Combine trace_aer_event() with statistics updates

2025-05-20 Thread Ilpo Järvinen
pcie_print_tlp_log(dev, &aer->header_log, dev_fmt(" ")); > - > - trace_aer_event(pci_name(dev), (status & ~mask), > - aer_severity, tlp_header_valid, &aer->header_log); > } > EXPORT_SYMBOL_NS_GPL(pci_print_aer, "CXL"); > > Reviewed-by: Ilpo Järvinen -- i.

Re: [PATCH v6 09/16] PCI/AER: Update statistics early in logging

2025-05-20 Thread Ilpo Järvinen
atus; > info.mask = mask; > > + pci_dev_aer_stats_incr(dev, &info); > + > layer = AER_GET_LAYER_ERROR(aer_severity, status); > agent = AER_GET_AGENT(aer_severity, status); > > Reviewed-by: Ilpo Järvinen -- i.

Re: [PATCH v6 06/16] PCI/AER: Move aer_print_source() earlier in file

2025-05-20 Thread Ilpo Järvinen
; > - > - pci_info(dev, "%s%s error message received from %04x:%02x:%02x.%d%s\n", > - info->multi_error_valid ? "Multiple " : "", > - aer_error_severity_string[info->severity], > - pci_domain_nr(dev->bus), PCI_BUS_NUM(source), > - PCI_SLOT(source), PCI_FUNC(source), details); > -} > - > #ifdef CONFIG_ACPI_APEI_PCIEAER > int cper_severity_to_aer(int cper_severity) > { > Reviewed-by: Ilpo Järvinen -- i.

Re: [PATCH v6 08/16] PCI/AER: Simplify pci_print_aer()

2025-05-20 Thread Ilpo Järvinen
quot;)); > > - trace_aer_event(dev_name(&dev->dev), (status & ~mask), > + trace_aer_event(pci_name(dev), (status & ~mask), > aer_severity, tlp_header_valid, &aer->header_log); > } > EXPORT_SYMBOL_NS_GPL(pci_print_aer, "CXL"); > Reviewed-by: Ilpo Järvinen -- i.

Re: [PATCH v6 04/16] PCI/AER: Extract bus/dev/fn in aer_print_port_info() with PCI_BUS_NUM(), etc

2025-05-20 Thread Ilpo Järvinen
aer_error_severity_string[info->severity], > - pci_domain_nr(dev->bus), bus, PCI_SLOT(devfn), > - PCI_FUNC(devfn), details); > + pci_domain_nr(dev->bus), PCI_BUS_NUM(source), > + PCI_SLOT(source), PCI_FUNC(source), details); > } > > #ifdef CONFIG_ACPI_APEI_PCIEAER > Reviewed-by: Ilpo Järvinen -- i.

Re: [PATCH v6 07/16] PCI/AER: Initialize aer_err_info before using it

2025-05-20 Thread Ilpo Järvinen
> diff --git a/drivers/pci/pcie/aer.c b/drivers/pci/pcie/aer.c > index 95a4cab1d517..40f003eca1c5 100644 > --- a/drivers/pci/pcie/aer.c > +++ b/drivers/pci/pcie/aer.c > @@ -1281,7 +1281,7 @@ static void aer_isr_one_error(struct aer_rpc *rpc, > struct aer_err_source *e_src)

Re: [PATCH v6 05/16] PCI/AER: Rename aer_print_port_info() to aer_print_source()

2025-05-20 Thread Ilpo Järvinen
e_info.multi_error_valid = 0; > > if (find_source_device(pdev, &e_info)) { > - aer_print_port_info(pdev, &e_info, ""); > + aer_print_source(pdev, &e_info, ""); > aer_process_err_devices(&e_info); > } > } > Reviewed-by: Ilpo Järvinen -- i.

Re: [PATCH v6 01/16] PCI/DPC: Initialize aer_err_info before using it

2025-05-20 Thread Ilpo Järvinen
On Mon, 19 May 2025, Bjorn Helgaas wrote: > From: Bjorn Helgaas > > Previously the struct aer_err_info "info" was allocated on the stack > without being initialized, so it contained junk except for the fields we > explicitly set later. > > Initialize "info" at declaration so it starts as all ze

Re: [PATCH 3/4] PCI: shpchp: Cleanup logging and debug wrappers

2025-02-14 Thread Ilpo Järvinen
On Thu, 13 Feb 2025, Bjorn Helgaas wrote: > On Mon, Dec 16, 2024 at 06:10:11PM +0200, Ilpo Järvinen wrote: > > The shpchp hotplug driver defines logging wrappers ctrl_*() and another > > set of wrappers with generic names which are just duplicates of > > existing generic pr

Re: [PATCH 4/4] PCI: Descope pci_printk() to aer_printk()

2025-02-14 Thread Ilpo Järvinen
On Thu, 13 Feb 2025, Bjorn Helgaas wrote: > On Mon, Dec 16, 2024 at 06:10:12PM +0200, Ilpo Järvinen wrote: > > include/linux/pci.h provides low-level pci_printk() interface that is > > only used by AER because it needs to print the same message with > > different levels d

[PATCH v2 1/2] PCI: Track Flit Mode Status & print it with link status

2025-02-07 Thread Ilpo Järvinen
link is using, store the Flit Mode Status (PCIe r6.1 sec 7.5.3.20) information in addition to the link speed into struct pci_bus in pcie_update_link_speed(). Signed-off-by: Ilpo Järvinen --- drivers/pci/hotplug/pciehp_hpc.c | 5 +++-- drivers/pci/pci.c| 12 drivers

[PATCH v2 2/2] PCI: Handle TLP Log in Flit mode

2025-02-07 Thread Ilpo Järvinen
t in certain Link states (PCIe r6.1 sec 7.5.3.20). As a workaround, use the flit_mode value stored into the struct pci_bus. Signed-off-by: Ilpo Järvinen --- drivers/pci/pci.h | 3 +- drivers/pci/pcie/aer.c| 1 + drivers/pci/pcie/dpc.c| 18 +-- drivers/pci/

[PATCH v2 0/2] PCI: Add support for logging Flit Mode TLPs (PCIe6)

2025-02-07 Thread Ilpo Järvinen
This series adds support for Flit Mode (PCIe6). v2: - Rebased Ilpo Järvinen (2): PCI: Track Flit Mode Status & print it with link status PCI: Handle TLP Log in Flit mode drivers/pci/hotplug/pciehp_hpc.c | 5 +-- drivers/pci/pci.c| 12 --- drivers/pci/p

[PATCH v9 6/8] PCI: Store # of supported End-End TLP Prefixes

2025-01-14 Thread Ilpo Järvinen
igned-off-by: Ilpo Järvinen Reviewed-by: Jonathan Cameron Reviewed-by: Yazen Ghannam --- drivers/pci/ats.c | 2 +- drivers/pci/probe.c | 14 +- include/linux/pci.h | 2 +- include/uapi/linux/pci_regs.h | 1 + 4 files changed, 12 insertions(+), 7

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

2025-01-14 Thread Ilpo Järvinen
not compatible with pci_err() and prints on a separate line. When I asked about this, Andy Shevchenko suggested pr_cont() should not be used in the first place (to eventually get rid of it) so pr_cont() is now replaced with building the string first. Signed-off-by: Ilpo Järvinen Reviewed-by

[PATCH v9 7/8] PCI: Add TLP Prefix reading into pcie_read_tlp_log()

2025-01-14 Thread Ilpo Järvinen
ter 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 Reviewed-by: Jonathan Cameron --- drivers/pci/pci.h | 5 +++- drivers/pci/pcie/aer.c| 5 +++- drivers/pci/pci

[PATCH v9 5/8] PCI: Use unsigned int i in pcie_read_tlp_log()

2025-01-14 Thread Ilpo Järvinen
Loop variable i counting from 0 upwards does not need to be signed so make it unsigned int. Signed-off-by: Ilpo Järvinen 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

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

2025-01-14 Thread Ilpo Järvinen
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 --- drivers/pci/pcie/dpc.c | 10 ++ drivers/pci/pcie/tlp.c | 2 +- drivers/pci/quirks.c

[PATCH v9 4/8] PCI: Make pcie_read_tlp_log() signature same

2025-01-14 Thread Ilpo Järvinen
pcie_read_tlp_log()'s prototype and function signature diverged due to changes made while applying. Make the parameters of pcie_read_tlp_log() named identically. Signed-off-by: Ilpo Järvinen Reviewed-by: Jonathan Cameron Reviewed-by: Yazen Ghannam --- drivers/pci/pcie/tlp.c

[PATCH v9 0/8] PCI: Consolidate TLP Log reading and printing

2025-01-14 Thread Ilpo Järvinen
n't add EXPORT()s - Don't include igxbe changes - Don't use pr_cont() as it's incompatible with pci_err() and according to Andy Shevchenko should not be used in the first place Ilpo Järvinen (8): PCI: Don't expose pcie_read_tlp_log() outside of PCI subsystem PCI: Move T

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

2025-01-14 Thread Ilpo Järvinen
/ subdirectory and include it only when AER is enabled. Signed-off-by: Ilpo Järvinen Reviewed-by: Jonathan Cameron Reviewed-by: Yazen Ghannam --- drivers/pci/pci.c | 27 --- drivers/pci/pci.h | 2 +- drivers/pci/pcie/Makefile | 2 +- drivers/pci/pcie/tlp.c| 39

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

2025-01-14 Thread Ilpo Järvinen
/lore.kernel.org/all/20240322193011.GA701027@bhelgaas/ Signed-off-by: Ilpo Järvinen Reviewed-by: Jonathan Cameron Reviewed-by: Yazen Ghannam --- drivers/pci/pci.c | 1 - drivers/pci/pci.h | 4 include/linux/aer.h | 2 -- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a

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

2025-01-09 Thread Ilpo Järvinen
On Wed, 8 Jan 2025, Yazen Ghannam wrote: > On Wed, Dec 18, 2024 at 04:37:46PM +0200, Ilpo Järvinen wrote: > > pcie_read_tlp_log() handles only 4 Header Log DWORDs but TLP Prefix Log > > (PCIe r6.1 secs 7.8.4.12 & 7.9.14.13) may also be present. > > > > Generalize

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

2024-12-18 Thread Ilpo Järvinen
not compatible with pci_err() and prints on a separate line. When I asked about this, Andy Shevchenko suggested pr_cont() should not be used in the first place (to eventually get rid of it) so pr_cont() is now replaced with building the string first. Signed-off-by: Ilpo Järvinen Reviewed-by

[PATCH v8 6/7] PCI: Add TLP Prefix reading into pcie_read_tlp_log()

2024-12-18 Thread Ilpo Järvinen
ter 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 Reviewed-by: Jonathan Cameron --- drivers/pci/pci.h | 5 +++- drivers/pci/pcie/aer.c| 5 +++- drivers/pci/pci

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

2024-12-18 Thread Ilpo Järvinen
igned-off-by: Ilpo Järvinen --- drivers/pci/ats.c | 2 +- drivers/pci/probe.c | 14 +- include/linux/pci.h | 2 +- include/uapi/linux/pci_regs.h | 1 + 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/drivers/pci/ats.c b/drivers/pci/at

[PATCH v8 1/7] PCI: Don't expose pcie_read_tlp_log() outside of PCI subsystem

2024-12-18 Thread Ilpo Järvinen
/lore.kernel.org/all/20240322193011.GA701027@bhelgaas/ Signed-off-by: Ilpo Järvinen Reviewed-by: Jonathan Cameron --- drivers/pci/pci.c | 1 - drivers/pci/pci.h | 4 include/linux/aer.h | 2 -- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/pci/pci.c b/dri

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

2024-12-18 Thread Ilpo Järvinen
Loop variable i counting from 0 upwards does not need to be signed so make it unsigned int. Signed-off-by: Ilpo Järvinen --- 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

[PATCH v8 3/7] PCI: Make pcie_read_tlp_log() signature same

2024-12-18 Thread Ilpo Järvinen
pcie_read_tlp_log()'s prototype and function signature diverged due to changes made while applying. Make the parameters of pcie_read_tlp_log() named identically. Signed-off-by: Ilpo Järvinen Reviewed-by: Jonathan Cameron --- drivers/pci/pcie/tlp.c | 11 +-- 1 file chang

[PATCH v8 2/7] PCI: Move TLP Log handling to own file

2024-12-18 Thread Ilpo Järvinen
/ subdirectory and include it only when AER is enabled. Signed-off-by: Ilpo Järvinen Reviewed-by: Jonathan Cameron --- drivers/pci/pci.c | 27 --- drivers/pci/pci.h | 2 +- drivers/pci/pcie/Makefile | 2 +- drivers/pci/pcie/tlp.c| 39

[PATCH v8 0/7] PCI: Consolidate TLP Log reading and printing

2024-12-18 Thread Ilpo Järvinen
n't use pr_cont() as it's incompatible with pci_err() and according to Andy Shevchenko should not be used in the first place Ilpo Järvinen (7): PCI: Don't expose pcie_read_tlp_log() outside of PCI subsystem PCI: Move TLP Log handling to own file PCI: Make pcie_read_tlp_log

Re: [PATCH 0/3] PCI: Add support for logging Flit Mode TLPs (PCIe6)

2024-12-18 Thread Ilpo Järvinen
On Tue, 17 Dec 2024, Yazen Ghannam wrote: > On Fri, Jun 14, 2024 at 06:09:18PM +0300, Ilpo Järvinen wrote: > > This series adds support for Flit Mode (PCIe6). The series is built on > > top of the TLP Logging refactoring series: > > > > > >

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

2024-12-18 Thread Ilpo Järvinen
On Tue, 17 Dec 2024, Yazen Ghannam wrote: > On Tue, Dec 17, 2024 at 03:53:58PM +0200, Ilpo Järvinen wrote: > > Only part of the AER diagnostic printouts use "AER:" prefix because > > they use low-level pci_printk() directly to allow selecting level. > > > >

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

2024-12-17 Thread Ilpo Järvinen
On Tue, 17 Dec 2024, Ilpo Järvinen wrote: > pcie_read_tlp_log() handles only 4 Header Log DWORDs but TLP Prefix Log > (PCIe r6.1 secs 7.8.4.12 & 7.9.14.13) may also be present. > > Generalize pcie_read_tlp_log() and struct pcie_tlp_log to handle also > TLP Prefix Log. The rel

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

2024-12-17 Thread Ilpo Järvinen
Only part of the AER diagnostic printouts use "AER:" prefix because they use low-level pci_printk() directly to allow selecting level. Add "AER:" prefix to lines that are printed with pci_printk(). Signed-off-by: Ilpo Järvinen Reviewed-by: Jonathan Cameron --- drivers

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

2024-12-17 Thread Ilpo Järvinen
igned-off-by: Ilpo Järvinen --- drivers/pci/ats.c | 2 +- drivers/pci/probe.c | 14 +- include/linux/pci.h | 2 +- include/uapi/linux/pci_regs.h | 1 + 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/drivers/pci/ats.c b/drivers/pci/at

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

2024-12-17 Thread Ilpo Järvinen
not compatible with pci_err() and prints on a separate line. When I asked about this, Andy Shevchenko suggested pr_cont() should not be used in the first place (to eventually get rid of it) so pr_cont() is now replaced with building the string first. Signed-off-by: Ilpo Järvinen Reviewed-by

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

2024-12-17 Thread Ilpo Järvinen
ter 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 Reviewed-by: Jonathan Cameron --- drivers/pci/pci.h | 5 +++- drivers/pci/pcie/aer.c| 5 +++- drivers/pci/pci

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

2024-12-17 Thread Ilpo Järvinen
Loop variable i counting from 0 upwards does not need to be signed so make it unsigned int. Signed-off-by: Ilpo Järvinen --- 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

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

2024-12-17 Thread Ilpo Järvinen
pcie_read_tlp_log()'s prototype and function signature diverged due to changes made while applying. Make the parameters of pcie_read_tlp_log() named identically. Signed-off-by: Ilpo Järvinen Reviewed-by: Jonathan Cameron --- drivers/pci/pcie/tlp.c | 11 +-- 1 file chang

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

2024-12-17 Thread Ilpo Järvinen
/ subdirectory and include it only when AER is enabled. Signed-off-by: Ilpo Järvinen Reviewed-by: Jonathan Cameron --- drivers/pci/pci.c | 27 --- drivers/pci/pci.h | 2 +- drivers/pci/pcie/Makefile | 2 +- drivers/pci/pcie/tlp.c| 39

[PATCH v7 0/8] PCI: Consolidate TLP Log reading and printing

2024-12-17 Thread Ilpo Järvinen
ncompatible with pci_err() and according to Andy Shevchenko should not be used in the first place Ilpo Järvinen (8): PCI: Don't expose pcie_read_tlp_log() outside of PCI subsystem PCI: Move TLP Log handling to own file PCI: Make pcie_read_tlp_log() signature same PCI: Use unsigned

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

2024-12-17 Thread Ilpo Järvinen
/lore.kernel.org/all/20240322193011.GA701027@bhelgaas/ Signed-off-by: Ilpo Järvinen Reviewed-by: Jonathan Cameron --- drivers/pci/pci.c | 1 - drivers/pci/pci.h | 4 include/linux/aer.h | 2 -- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/pci/pci.c b/dri

[PATCH 3/4] PCI: shpchp: Cleanup logging and debug wrappers

2024-12-16 Thread Ilpo Järvinen
EBUG level. Convert ctrl_dbg() to use the pci_dbg() and remove "shpchp_debug" check from it. Removing the non-ctrl variants of logging wrappers and "shpchp_debug" module parameter as they are no longer used. Signed-off-by: Ilpo Järvinen --- drivers/pci/hotplug/shpchp.h |

[PATCH 1/4] PCI: shpchp: Remove logging from module init/exit functions

2024-12-16 Thread Ilpo Järvinen
The logging in shpchp module init/exit functions is not very useful. Remove it. Signed-off-by: Ilpo Järvinen --- drivers/pci/hotplug/shpchp_core.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/pci/hotplug/shpchp_core.c b/drivers/pci/hotplug/shpchp_core.c

[PATCH 0/4] PCI: pci_printk() removal (+ related cleanups)

2024-12-16 Thread Ilpo Järvinen
include/linux/pci.h provides pci_printk() which is a low-level interface with level that is only useful for AER due to error severity variations. This series cleans up shpchp logging wrappers to avoid using low-level pci_printk() unnecessarily and replaces pci_printk() with aer_printk(). Ilpo

[PATCH 4/4] PCI: Descope pci_printk() to aer_printk()

2024-12-16 Thread Ilpo Järvinen
. Descope pci_printk() into AER as aer_printk(). Signed-off-by: Ilpo Järvinen --- drivers/pci/pcie/aer.c | 10 +++--- include/linux/pci.h| 3 --- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/pci/pcie/aer.c b/drivers/pci/pcie/aer.c index 80c5ba8d8296

[PATCH 2/4] PCI: shpchp: Change dbg() -> ctrl_dbg()

2024-12-16 Thread Ilpo Järvinen
Convert the last user of dbg() to use ctrl_dbg(). Signed-off-by: Ilpo Järvinen --- drivers/pci/hotplug/shpchp_hpc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/hotplug/shpchp_hpc.c b/drivers/pci/hotplug/shpchp_hpc.c index 012b9e3fe5b0..bfbec7c1a6b1 100644

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

2024-12-12 Thread Ilpo Järvinen
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: > > > > > pcie_read_tlp_log() handles only 4 Header Log DWORDs but TLP Prefix Log > > > (PCIe r

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

2024-12-12 Thread Ilpo Järvinen
On Wed, 11 Dec 2024, Jonathan Cameron wrote: > 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

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

2024-12-12 Thread Ilpo Järvinen
On Wed, 11 Dec 2024, Jonathan Cameron wrote: > On Fri, 13 Sep 2024 17:36:30 +0300 > Ilpo Järvinen wrote: > > > pcie_read_tlp_log() handles only 4 Header Log DWORDs but TLP Prefix Log > > (PCIe r6.1 secs 7.8.4.12 & 7.9.14.13) may also be present. > > > &g

Re: [PATCH v6 0/8] PCI: Consolidate TLP Log reading and printing

2024-12-10 Thread Ilpo Järvinen
On Wed, 23 Oct 2024, Ilpo Järvinen wrote: > On Fri, 13 Sep 2024, Ilpo Järvinen wrote: > > > This series has the remaining patches of the AER & DPC TLP Log handling > > consolidation and now includes a few minor improvements to the earlier > > accepted T

Re: [PATCH v2 05/10] sysfs: treewide: constify attribute callback of bin_is_visible()

2024-11-04 Thread Ilpo Järvinen
On Sun, 3 Nov 2024, Thomas Weißschuh wrote: > The is_bin_visible() callbacks should not modify the struct > bin_attribute passed as argument. > Enforce this by marking the argument as const. > > As there are not many callback implementers perform this change > throughout the tree at once. > > Si

Re: [PATCH v6 0/8] PCI: Consolidate TLP Log reading and printing

2024-10-23 Thread Ilpo Järvinen
On Fri, 13 Sep 2024, Ilpo Järvinen wrote: > This series has the remaining patches of the AER & DPC TLP Log handling > consolidation and now includes a few minor improvements to the earlier > accepted TLP Logging code. > > v6: > - Preserve "AER:"/"DPC:&qu

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

2024-09-13 Thread Ilpo Järvinen
Only part of the AER diagnostic printouts use "AER:" prefix because they use low-level pci_printk() directly to allow selecting level. Add "AER:" prefix to lines that are printed with pci_printk(). Signed-off-by: Ilpo Järvinen --- drivers/pci/pcie/aer.c | 12 ++-

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

2024-09-13 Thread Ilpo Järvinen
not compatible with pci_err() and prints on a separate line. When I asked about this, Andy Shevchenko suggested pr_cont() should not be used in the first place (to eventually get rid of it) so pr_cont() is now replaced with building the string first. Signed-off-by: Ilpo Järvinen --- drivers/pci

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

2024-09-13 Thread Ilpo Järvinen
Prefix DWORDs from the correct offset. Signed-off-by: Ilpo Järvinen --- drivers/pci/pci.h | 5 +++- drivers/pci/pcie/aer.c| 4 ++- drivers/pci/pcie/dpc.c| 13 +- drivers/pci/pcie/tlp.c| 49 +++ include/linux/aer.h

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

2024-09-13 Thread Ilpo Järvinen
CONFIG_PCI_PASID so that an upcoming commit generalizing TLP Prefix Log register reading does not have to read extra DWORDs for End-End Prefixes that never will be there. Signed-off-by: Ilpo Järvinen --- drivers/pci/ats.c | 2 +- drivers/pci/probe.c | 14

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

2024-09-13 Thread Ilpo Järvinen
Loop variable i counting from 0 upwards does not need to be signed so make it unsigned int. Signed-off-by: Ilpo Järvinen --- 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

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

2024-09-13 Thread Ilpo Järvinen
/ subdirectory and include it only when AER is enabled. Signed-off-by: Ilpo Järvinen --- drivers/pci/pci.c | 27 --- drivers/pci/pci.h | 2 +- drivers/pci/pcie/Makefile | 2 +- drivers/pci/pcie/tlp.c| 39 +++ 4 files changed

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

2024-09-13 Thread Ilpo Järvinen
/lore.kernel.org/all/20240322193011.GA701027@bhelgaas/ Signed-off-by: Ilpo Järvinen --- drivers/pci/pci.c | 1 - drivers/pci/pci.h | 4 include/linux/aer.h | 2 -- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index e3a49f66982d..378fc

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

2024-09-13 Thread Ilpo Järvinen
pcie_read_tlp_log()'s prototype and function signature diverged due to changes made while applying. Make the parameters of pcie_read_tlp_log() named identically. Signed-off-by: Ilpo Järvinen --- drivers/pci/pcie/tlp.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-)

[PATCH v6 0/8] PCI: Consolidate TLP Log reading and printing

2024-09-13 Thread Ilpo Järvinen
rewording in a commit message v2: - Don't add EXPORT()s - Don't include igxbe changes - Don't use pr_cont() as it's incompatible with pci_err() and according to Andy Shevchenko should not be used in the first place Ilpo Järvinen (8): PCI: Don't expose pcie_read_tlp

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

2024-09-02 Thread Ilpo Järvinen
On Fri, 30 Aug 2024, Bjorn Helgaas wrote: > On Tue, May 14, 2024 at 02:31:09PM +0300, Ilpo Järvinen wrote: > > Add pcie_print_tlp_log() helper to print TLP Header and Prefix Log. > > Print End-End Prefixes only if they are non-zero. > > > > Consolidate the few place

Re: [PATCH v5 0/7] PCI: Consolidate TLP Log reading and printing

2024-08-30 Thread Ilpo Järvinen
On Tue, 14 May 2024, Ilpo Järvinen wrote: > This series has the remaining patches of the AER & DPC TLP Log handling > consolidation and now includes a few minor improvements to the earlier > accepted TLP Logging code. > > v5: > - Fix build with AER=y and DPC=n > - Mat

Re: PCI: Work around PCIe link training failures

2024-07-29 Thread Ilpo Järvinen
On Fri, 26 Jul 2024, Matthew W Carlis wrote: > On Mon, 22 Jul 2024, Maciej W. Rozycki wrote: > > > The main reason is it is believed that it is the downstream device > > causing the issue, and obviously you can't fetch its ID if you can't > > negotiate link so as to talk to it in the first place.

[PATCH 2/3] PCI: Track Flit Mode Status & print it with link status

2024-06-14 Thread Ilpo Järvinen
link is using, store the Flit Mode Status (PCIe r6.1 sec 7.5.3.20) information in addition to the link speed into struct pci_bus in pcie_update_link_speed(). Signed-off-by: Ilpo Järvinen --- drivers/pci/hotplug/pciehp_hpc.c | 5 +++-- drivers/pci/pci.c| 12 drivers

[PATCH 0/3] PCI: Add support for logging Flit Mode TLPs (PCIe6)

2024-06-14 Thread Ilpo Järvinen
that is almost identical with a patch in the PCIe BW controller series. The patch itself is basically the same but the context has minor difference. This will need to be considered if applying both series within the same kernel cycle. Ilpo Järvinen (3): PCI: Refactor pcie_update_link_speed

[PATCH 3/3] PCI: Handle TLP Log in Flit mode

2024-06-14 Thread Ilpo Järvinen
t in certain Link states (PCIe r6.1 sec 7.5.3.20). As a workaround, use the flit_mode value stored into the struct pci_bus. Signed-off-by: Ilpo Järvinen --- drivers/pci/pci.h | 5 +-- drivers/pci/pcie/aer.c| 4 ++- drivers/pci/pcie/dpc.c| 23 +++--- drivers

[PATCH 1/3] PCI: Refactor pcie_update_link_speed()

2024-06-14 Thread Ilpo Järvinen
hotplug code that has the register value at hand beforehand (and needs the value for other purposes). Signed-off-by: Ilpo Järvinen --- drivers/pci/hotplug/pciehp_hpc.c | 2 +- drivers/pci/pci.h| 7 ++- drivers/pci/probe.c | 12 +++- 3 files changed, 14

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

2024-05-14 Thread Ilpo Järvinen
not compatible with pci_err() and prints on a separate line. When I asked about this, Andy Shevchenko suggested pr_cont() should not be used in the first place (to eventually get rid of it) so pr_cont() is now replaced with building the string first. Signed-off-by: Ilpo Järvinen --- drivers/pci

[PATCH v5 6/7] PCI: Add TLP Prefix reading into pcie_read_tlp_log()

2024-05-14 Thread Ilpo Järvinen
Prefix DWORDs from the correct offset. Signed-off-by: Ilpo Järvinen --- drivers/pci/pci.h | 5 +++- drivers/pci/pcie/aer.c| 4 ++- drivers/pci/pcie/dpc.c| 13 +- drivers/pci/pcie/tlp.c| 49 +++ include/linux/aer.h

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

2024-05-14 Thread Ilpo Järvinen
CONFIG_PCI_PASID so that an upcoming commit generalizing TLP Prefix Log register reading does not have to read extra DWORDs for End-End Prefixes that never will be there. Signed-off-by: Ilpo Järvinen --- drivers/pci/ats.c | 2 +- drivers/pci/probe.c | 14

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

2024-05-14 Thread Ilpo Järvinen
Loop variable i counting from 0 upwards does not need to be signed so make it unsigned int. Signed-off-by: Ilpo Järvinen --- 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

[PATCH v5 3/7] PCI: Make pcie_read_tlp_log() signature same

2024-05-14 Thread Ilpo Järvinen
pcie_read_tlp_log()'s prototype and function signature diverged due to changes made while applying. Make the parameters of pcie_read_tlp_log() named identically. Signed-off-by: Ilpo Järvinen --- drivers/pci/pcie/tlp.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-)

[PATCH v5 2/7] PCI: Move TLP Log handling to own file

2024-05-14 Thread Ilpo Järvinen
/ subdirectory and include it only when AER is enabled. Signed-off-by: Ilpo Järvinen --- drivers/pci/pci.c | 27 --- drivers/pci/pci.h | 2 +- drivers/pci/pcie/Makefile | 2 +- drivers/pci/pcie/tlp.c| 39 +++ 4 files changed

[PATCH v5 1/7] PCI: Don't expose pcie_read_tlp_log() outside of PCI subsystem

2024-05-14 Thread Ilpo Järvinen
/lore.kernel.org/all/20240322193011.GA701027@bhelgaas/ Signed-off-by: Ilpo Järvinen --- drivers/pci/pci.c | 1 - drivers/pci/pci.h | 4 include/linux/aer.h | 2 -- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index e5f243dd4288..54ab1

[PATCH v5 0/7] PCI: Consolidate TLP Log reading and printing

2024-05-14 Thread Ilpo Järvinen
ith pci_err() and according to Andy Shevchenko should not be used in the first place Ilpo Järvinen (7): PCI: Don't expose pcie_read_tlp_log() outside of PCI subsystem PCI: Move TLP Log handling to own file PCI: Make pcie_read_tlp_log() signature same PCI: Use unsigned int i in pcie_read_tlp

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

2024-05-10 Thread Ilpo Järvinen
On Fri, 10 May 2024, Ilpo Järvinen wrote: > pcie_read_tlp_log() handles only 4 Header Log DWORDs but TLP Prefix Log > (PCIe r6.1 secs 7.8.4.12 & 7.9.14.13) may also be present. > > Generalize pcie_read_tlp_log() and struct pcie_tlp_log to handle also > TLP Prefix Log. The rel

  1   2   >