Re: [PATCH] cxl/mem: Force array size of mem_commands[] to CXL_MEM_COMMAND_ID_MAX

2021-03-25 Thread Robert Richter
On 24.03.21 12:08:20, Dan Williams wrote: > On Wed, Mar 24, 2021 at 11:43 AM Ira Weiny wrote: > > Can't we use ARRAY_SIZE? > > An ARRAY_SIZE() check in cxl_validate_cmd_from_user() would work too, > but it wouldn't give the compiler protection that Robert mentions for > going the other way

[PATCH] cxl/mem: Force array size of mem_commands[] to CXL_MEM_COMMAND_ID_MAX

2021-03-24 Thread Robert Richter
lead then further to an out-of-bounds array access in cxl_validate_cmd_from_user(). Fix this by forcing the array size to CXL_MEM_COMMAND_ID_MAX. This also adds range checks for array items in mem_commands[] at compile time. Signed-off-by: Robert Richter --- drivers/cxl/mem.c | 2 +- 1 file

Re: [PATCH v5 0/4] Introduce pcim_alloc_irq_vectors()

2021-02-26 Thread Robert Richter
as a device-managed function, So > replace it with pcim_alloc_irq_vectors(). For the whole series: Reviewed-by: Robert Richter Thanks.

Re: [PATCH v5 4/4] i2c: thunderx: Use pcim_alloc_irq_vectors() to allocate IRQ vectors

2021-02-26 Thread Robert Richter
as a device-managed function, So replace it > with pcim_alloc_irq_vectors(). > > Signed-off-by: Dejin Zheng Acked-by: Robert Richter

Re: [PATCH 2/2] PCI: controller: avoid building empty drivers

2021-02-26 Thread Robert Richter
n isn't really nice here, but it should work that way. Also, the menu entry for the driver is in fact only for the OF case, as it is always included for ACPI even if the option is disabled (and thus the choice is useless). But this is unrelated to this patch. Anyway: Reviewed-by: Robert Richter

Re: [PATCH 1/2] PCI: controller: thunder: fix compile testing

2021-02-26 Thread Robert Richter
ources' [-Werror,-Wimplicit-function-declaration] > > Fix them with the obvious one-line changes. > > Signed-off-by: Arnd Bergmann Reviewed-by: Robert Richter > --- > drivers/pci/controller/pci-thunder-ecam.c | 2 +- > drivers/pci/controller/pci-thunder-pem.c | 13 ++

Re: [PATCH] Documentation/submitting-patches: Extend commit message layout description

2021-02-25 Thread Robert Richter
/20181107171010.421878...@linutronix.de > > and incorporates follow-on comments. > > Signed-off-by: Borislav Petkov Reviewed-by: Robert Richter

Re: [PATCH v4 1/4] PCI: Introduce pcim_alloc_irq_vectors()

2021-02-25 Thread Robert Richter
On 23.02.21 22:14:35, Dejin Zheng wrote: > On Tue, Feb 23, 2021 at 09:02:54AM +0100, Robert Richter wrote: > > On 22.02.21 23:14:15, Dejin Zheng wrote: > > > On Mon, Feb 22, 2021 at 11:56:08AM +0100, Robert Richter wrote: > > > > On 20.02.21 00:46:49, Dejin Zheng wro

Re: [PATCH v4 1/4] PCI: Introduce pcim_alloc_irq_vectors()

2021-02-23 Thread Robert Richter
On 22.02.21 23:14:15, Dejin Zheng wrote: > On Mon, Feb 22, 2021 at 11:56:08AM +0100, Robert Richter wrote: > > On 20.02.21 00:46:49, Dejin Zheng wrote: > > > > On 18.02.21 23:04:55, Dejin Zheng wrote: > > > > > > > + if (!dr || !dr->enabled) > &

Re: [PATCH v4 1/4] PCI: Introduce pcim_alloc_irq_vectors()

2021-02-22 Thread Robert Richter
On 19.02.21 17:15:50, Krzysztof Wilczyński wrote: > Hi Robert, > > [...] > > Obiously this is meant here: > > > > if (!pci_is_managed(dev)) > [...] > > A question to improve my understanding for future reference. Was the > previous approach of checking for "enabled" flag from struct

Re: [PATCH v4 1/4] PCI: Introduce pcim_alloc_irq_vectors()

2021-02-22 Thread Robert Richter
On 20.02.21 00:46:49, Dejin Zheng wrote: > > On 18.02.21 23:04:55, Dejin Zheng wrote: > > > + if (!dr || !dr->enabled) > here checks whether the pci device is enabled. What is the purpose of this? The device "is_managed" or not. -Robert

Re: [PATCH v4 4/4] i2c: thunderx: Use the correct name of device-managed function

2021-02-19 Thread Robert Richter
On 18.02.21 23:04:58, Dejin Zheng wrote: > Use the new function pcim_alloc_irq_vectors() to allocate IRQ vectors, > the pcim_alloc_irq_vectors() function, an explicit device-managed version > of pci_alloc_irq_vectors(). If pcim_enable_device() has been called > before, then pci_alloc_irq_vectors()

Re: [PATCH v4 1/4] PCI: Introduce pcim_alloc_irq_vectors()

2021-02-19 Thread Robert Richter
On 19.02.21 16:48:57, Andy Shevchenko wrote: > On Fri, Feb 19, 2021 at 03:40:05PM +0100, Robert Richter wrote: > > On 18.02.21 23:04:55, Dejin Zheng wrote: > > > Introduce pcim_alloc_irq_vectors(), a device-managed version of > > > pci_alloc_irq_vectors(). Introducing

Re: [PATCH v4 1/4] PCI: Introduce pcim_alloc_irq_vectors()

2021-02-19 Thread Robert Richter
On 19.02.21 15:40:11, Robert Richter wrote: > static inline int pcim_alloc_irq_vectors(struct pci_dev *dev, > unsigned int min_vecs, unsigned int max_vecs, unsigned int flags) > { > if (!pci_is_managed(dev, min_vecs, max_vecs, flags)) Obiously this i

Re: [PATCH v4 1/4] PCI: Introduce pcim_alloc_irq_vectors()

2021-02-19 Thread Robert Richter
On 18.02.21 23:04:55, Dejin Zheng wrote: > Introduce pcim_alloc_irq_vectors(), a device-managed version of > pci_alloc_irq_vectors(). Introducing this function can simplify > the error handling path in many drivers. > > And use pci_free_irq_vectors() to replace some code in pcim_release(), > they

Re: [PATCH v3 0/4] Introduce pcim_alloc_irq_vectors()

2021-02-19 Thread Robert Richter
On 18.02.21 16:01:56, Andy Shevchenko wrote: > The problem this series solves is an imbalanced API. This (added) API is bloated and incomplete. It adds functions without benefit, the only is to have a single pcim alloc function in addition to the pairing of alloc/free functions. I agree, it is

Re: [PATCH] i2c: thunderx: Fix an issue about missing call to 'pci_free_irq_vectors()'

2021-02-18 Thread Robert Richter
On 14.02.21 22:37:34, Dejin Zheng wrote: > Call to 'pci_free_irq_vectors()' are missing both in the error handling > path of the probe function, and in the remove function. So add them. > > Fixes: 4c21541d8da17fb ("i2c: thunderx: Replace pci_enable_msix()") > Signed-off-by: Dejin Zheng > --- >

Re: [PATCH v3 0/4] Introduce pcim_alloc_irq_vectors()

2021-02-18 Thread Robert Richter
On 17.02.21 00:02:45, Dejin Zheng wrote: > Introduce pcim_alloc_irq_vectors(), a device-managed version of > pci_alloc_irq_vectors(), In some i2c drivers, If pcim_enable_device() > has been called before, then pci_alloc_irq_vectors() is actually a > device-managed function. It is used as a

Re: [PATCH] i2c: thunderx: Fix an issue about missing call to 'pci_free_irq_vectors()'

2021-02-18 Thread Robert Richter
On 14.02.21 22:37:34, Dejin Zheng wrote: > Call to 'pci_free_irq_vectors()' are missing both in the error handling > path of the probe function, and in the remove function. So add them. > > Fixes: 4c21541d8da17fb ("i2c: thunderx: Replace pci_enable_msix()") > Signed-off-by: Dejin Zheng This is

Re: [PATCH 02/29] alpha: Avoid comma separated statements

2021-02-16 Thread Robert Richter
On 30.01.21 10:54:42, Joe Perches wrote: > On Mon, 2020-08-24 at 21:55 -0700, Joe Perches wrote: > > Use semicolons and braces. > > ping? > > > > > Signed-off-by: Joe Perches > > --- > >  arch/alpha/kernel/pci_iommu.c | 8 +--- > >  arch/alpha/oprofile/op_model_ev4.c | 22

Re: [PATCH 06/13] staging: octeon: Switch from strlcpy to strscpy

2021-02-16 Thread Robert Richter
1 file changed, 3 insertions(+), 3 deletions(-) Reviewed-by: Robert Richter

Re: [PATCH 0/8] cpupower: Updates and cleanup to support AMD Family 0x19

2021-01-22 Thread Robert Richter
tate enabled bit checks in decode_pstates() > cpupower: Remove family arg to decode_pstates() > cpupower: Add cpuid cap flag for MSR_AMD_HWCR support > > Robert Richter (1): > cpupower: Correct macro name for CPB caps flag For the whole series: Reviewed-by: Robert Richter

Re: [PATCH 00/18] drivers: Remove oprofile and dcookies

2021-01-14 Thread Robert Richter
ed on the mailing list for quite a while, which indicates there are no or less users. Users (if any) should switch to oprofile 1.x or the perf tool. No need to carry kernel support any longer with us. So time to get rid of it. For the whole series: Acked-by: Robert Richter

Re: [PATCH v2] edac: remove redundant error print in xgene_edac_probe

2021-01-12 Thread Robert Richter
rq_optional' in place of > 'platform_get_irq', as Robert suggested. > > Signed-off-by: Menglong Dong > --- > v2: > - use 'platform_get_irq_optional' instead of 'platform_get_irq' > --- Reviewed-by: Robert Richter

Re: [PATCH] edac: remove redundant error print in xgene_edac_probe

2021-01-12 Thread Robert Richter
On 12.01.21 00:46:05, menglong8.d...@gmail.com wrote: > From: Menglong Dong > > Coccinelle reports a redundant error print in xgene_edac_probe. > As 'platform_get_irq' already prints the error message, error > print here is redundant and can be removed. > > Signed-off-by: Menglong Dong > --- >

Re: [PATCH 4/8] i2c: octeon: check correct size of maximum RECV_LEN packet

2021-01-11 Thread Robert Richter
On 09.01.21 13:43:08, Wolfram Sang wrote: > I2C_SMBUS_BLOCK_MAX defines already the maximum number as defined in the > SMBus 2.0 specs. No reason to add one to it. > > Fixes: 886f6f8337dd ("i2c: octeon: Support I2C_M_RECV_LEN") > Signed-off-by: Wolfram Sang Reviewed-by: Robert Richter

Re: [PATCH] edac: amd64_edac: remove unneeded break

2020-10-19 Thread Robert Richter
On 19.10.20 12:35:24, t...@redhat.com wrote: > From: Tom Rix > > A break is not needed if it is preceded by a return > > Signed-off-by: Tom Rix Reviewed-by: Robert Richter

Re: [PATCH 02/29] alpha: Avoid comma separated statements

2020-08-25 Thread Robert Richter
-- > 3 files changed, 24 insertions(+), 14 deletions(-) For oprofile: Acked-by: Robert Richter

[PATCH] MAINTAINERS, edac: Calxeda Highbank, handover maintenance to Andre Przywara

2020-08-24 Thread Robert Richter
I do not have hardware anymore, nor there is ongoing development. So handover maintenance to Andre who already maintains the last remainings of Calxeda. Cc: Andre Przywara Signed-off-by: Robert Richter --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] MAINTAINERS: Update Cavium/Marvell entries

2020-08-24 Thread Robert Richter
for a while until someone from Marvell takes it over. Since I might have limited access to hardware and also limited time I changed state to 'Odd Fixes' for those entries. Cc: Ganapatrao Kulkarni Cc: Sunil Goutham Signed-off-by: Robert Richter --- MAINTAINERS | 28

Re: [PATCH] EDAC, {skx, i10nm}: Advice mcelog that the error were handled

2020-06-10 Thread Robert Richter
On 10.06.20 14:58:01, Zhenzhong Duan wrote: > If one MCE error has been processed in kernel, it's not necessory > to pass it to user level mcelog. > > Signed-off-by: Zhenzhong Duan Reviewed-by: Robert Richter > --- > drivers/edac/skx_common.c | 3 ++- > 1 file change

Re: [PATCH v4] EDAC/ghes: Setup DIMM label from DMI and use it in error reports

2020-06-03 Thread Robert Richter
On 02.06.20 17:48:43, Borislav Petkov wrote: > On Thu, May 28, 2020 at 12:13:06PM +0200, Robert Richter wrote: > > v4: > > > > * dimm->label: Only update dimm->label in if bank/device is found in > >the SMBIOS table, this keeps current behavior for ma

[PATCH v4] EDAC/ghes: Setup DIMM label from DMI and use it in error reports

2020-05-28 Thread Robert Richter
0x0 grain:1 syndrome:0x0 - APEI location: node:0 card:0 module:0 rank:1 bank:259 col:3 bit_pos:16 DIMM location:N0 DIMM_A0 status(0x0400): Storage error in DRAM memory) Signed-off-by: Robert Richter --- v4: * dimm->label: Only update dimm->label in if bank/device

Re: [PATCH v3] EDAC/ghes: Setup DIMM label from DMI and use it in error reports

2020-05-20 Thread Robert Richter
Thanks for testing. On 19.05.20 22:25:35, Borislav Petkov wrote: > -/sys/devices/system/edac/mc/mc0/csrow15/ch0_dimm_label:1:mc#0memory#15 > +/sys/devices/system/edac/mc/mc0/csrow15/ch0_dimm_label:1:unknown memory > (handle: 0x0030) Looks like on that system device locator or bank locator (or

[PATCH v3 4/5] EDAC/ghes: Have a separate code path for creating the fake MC

2020-05-19 Thread Robert Richter
The code in ghes_edac_register() switches back and forth between standard and fake controller creation. Do one thing only and separate the code path that creates the fake MC. Note: For better review the code is not yet carved out in separate functions. Signed-off-by: Robert Richter --- drivers

[PATCH v3 1/5] EDAC/ghes: Remove unused members of struct ghes_edac_pvt, rename it to ghes_pvt

2020-05-19 Thread Robert Richter
The struct members list and ghes of struct ghes_edac_pvt are unused, remove them. On that occasion, rename it to the shorter name struct ghes_pvt. Signed-off-by: Robert Richter --- drivers/edac/ghes_edac.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers

[PATCH v3 0/5] EDAC/ghes: Cleanup and reworks

2020-05-19 Thread Robert Richter
mm_fill, * renamed local variable dimms to dimm_list to avoid conflict with the global variable, * removed dimm list for "fake" controller, * fixed return code check to use (rc < 0), * added: EDAC/mc: Fix usage of snprintf() and dimm location setup v1: * https://lore.kernel.org/patch

[PATCH v3 2/5] EDAC/ghes: Cleanup struct dimm_fill

2020-05-19 Thread Robert Richter
The struct is used to store temporary data for the dmidecode callback. Clean this up a bit: 1) Rename member count to index since this is what it is used for. 2) Move code close to ghes_edac_dmidecode() where it is used. 3) While at it, use edac_get_dimm_by_index(). Signed-off-by: Robert

[PATCH v3 3/5] EDAC/ghes: Carve out MC device handling into separate functions

2020-05-19 Thread Robert Richter
The functions are too long, carve out code that handles MC devices into the new functions ghes_mc_create(), ghes_mc_add_or_free() and ghes_mc_free(). Apart from better code readability the functions can be reused and the implementation of the error paths becomes easier. Signed-off-by: Robert

[PATCH v3 5/5] EDAC/ghes: Carve out code into ghes_edac_register_{one,fake}()

2020-05-19 Thread Robert Richter
Factor out code to register a memory controller including DIMMs. Do this for standard and fake memory controller in the two functions ghes_edac_register_one() and ghes_edac_register_fake(). Function ghes_edac_register_one() could be reused to register multiple *mci structs. Signed-off-by: Robert

Re: [PATCH v2 08/10] EDAC/ghes: Carve out MC device handling into separate functions

2020-05-19 Thread Robert Richter
On 11.05.20 15:32:03, Borislav Petkov wrote: > see below. It probably doesn't work but this is what it should do - > straightforward and simple. > > And now that I've looked at this in more detail, this whole DIMM > counting is still not doing what it should do. > > So lemme try again: As you

Re: [PATCH v2 07/10] EDAC/ghes: Cleanup struct ghes_edac_dimm_fill, rename it to ghes_dimm_fill

2020-05-19 Thread Robert Richter
On 27.04.20 16:00:43, Borislav Petkov wrote: > On Wed, Apr 22, 2020 at 01:58:11PM +0200, Robert Richter wrote: > > The struct is used to store temporary data for the dmidecode callback. > > Clean this up a bit: > > > > 1) Rename member count to index si

Re: [PATCH v2 06/10] EDAC/ghes: Remove local variable rdr_mask in ghes_edac_dmidecode()

2020-05-19 Thread Robert Richter
On 27.04.20 19:34:02, Borislav Petkov wrote: > On Mon, Apr 27, 2020 at 10:24:08AM -0700, Luck, Tony wrote: > > That isn't the same. The previous version checked that BOTH bits > > 7 and 13 were set. Your version checks for either bit. > > Whoops, I'm confused again. ;-\ > > > Looks like the

Re: [PATCH v2 02/10] EDAC/mc: Use int type for parameters of edac_mc_alloc()

2020-05-19 Thread Robert Richter
On 23.04.20 19:49:34, Borislav Petkov wrote: > On Wed, Apr 22, 2020 at 01:58:06PM +0200, Robert Richter wrote: > > Most iterators use int type as index. mci->mc_idx is also type int. So > > use int type for parameters of edac_mc_alloc(). Extend the range check > > to c

Re: [PATCH v2 01/10] EDAC/mc: Fix usage of snprintf() and dimm location setup

2020-05-19 Thread Robert Richter
On 22.04.20 22:52:43, Borislav Petkov wrote: > On Wed, Apr 22, 2020 at 01:58:05PM +0200, Robert Richter wrote: > > The setup of the dimm->location may be incomplete in case writing to > > dimm->label fails due to small buffer size. Fix this by iterating > >

[PATCH v3] EDAC/ghes: Setup DIMM label from DMI and use it in error reports

2020-05-18 Thread Robert Richter
n:1 syndrome:0x0 - APEI location: node:0 card:0 module:0 rank:0 bank:769 col:1 bit_pos:16 DIMM location:foobar status(0x0400): Storage error in DRAM memory) Signed-off-by: Robert Richter --- This patch is a self-contained version of: [v2,05/10] EDAC/ghes: Setup DIMM label from

Re: [PATCH v2 00/10] EDAC/mc/ghes: Fixes, cleanup and reworks

2020-05-06 Thread Robert Richter
Boris, On 22.04.20 13:58:04, Robert Richter wrote: > This series contains edac fixes and a significant cleanup and rework > of the ghes driver: > > * fixes and updates for edac_mc (patches #1, #2), > > * removed smbios_handle from struct dimm_info (patch #4), > &

Re: [PATCH v2 08/10] EDAC/ghes: Carve out MC device handling into separate functions

2020-05-06 Thread Robert Richter
On 27.04.20 18:38:56, Borislav Petkov wrote: > On Wed, Apr 22, 2020 at 01:58:12PM +0200, Robert Richter wrote: > > +static int ghes_mc_add_or_free(struct mem_ctl_info *mci, > > + struct list_head *dimm_list) > > No, I think we talked about this already.

Re: [PATCH v2 04/10] EDAC/ghes: Make SMBIOS handle private data to ghes

2020-05-05 Thread Robert Richter
On 24.04.20 18:21:57, Borislav Petkov wrote: > On Wed, Apr 22, 2020 at 01:58:08PM +0200, Robert Richter wrote: > > @@ -562,6 +647,7 @@ void ghes_edac_unregister(struct ghes *ghes) > > { > > struct mem_ctl_info *mci; > > unsigned long flags;

Re: [PATCH v2 03/10] EDAC/ghes: Remove unused members of struct ghes_edac_pvt, rename it to ghes_mci

2020-05-05 Thread Robert Richter
On 23.04.20 19:55:17, Borislav Petkov wrote: > On Wed, Apr 22, 2020 at 01:58:07PM +0200, Robert Richter wrote: > > diff --git a/drivers/edac/ghes_edac.c b/drivers/edac/ghes_edac.c > > index cb3dab56a875..39efce0df881 100644 > > --- a/drivers/edac/ghes_edac.c > > +++

Re: [PATCH 00/19] EDAC: Rework edac_mc and ghes drivers

2019-10-14 Thread Robert Richter
On 10.10.19 20:25:01, Robert Richter wrote: > This patch set is a rework of the ghes_edac and edac_mc driver. It > addresses issues found during code review and while working with the > code. The changes include: Thanks Mauro for your review of the whole series. I hope I could all your

Re: [PATCH 14/19] EDAC, mc: Create new function edac_inc_csrow()

2019-10-14 Thread Robert Richter
On 11.10.19 08:08:25, Mauro Carvalho Chehab wrote: > Em Thu, 10 Oct 2019 20:25:33 + > Robert Richter escreveu: > > > Have a separate function to count errors in csrow/channel. This better > > separates code and reduces the indentation level. No functional > > cha

Re: [PATCH 12/19] EDAC: Store error type in struct edac_raw_error_desc

2019-10-14 Thread Robert Richter
On 11.10.19 07:54:19, Mauro Carvalho Chehab wrote: > Em Thu, 10 Oct 2019 20:25:29 + > Robert Richter escreveu: > > > Store the error type in struct edac_raw_error_desc. This makes the > > type parameter of edac_raw_mc_handle_error() obsolete. > > I don't s

Re: [PATCH 06/19] EDAC, mc: Remove per layer counters

2019-10-14 Thread Robert Richter
On 11.10.19 07:40:31, Mauro Carvalho Chehab wrote: > Em Thu, 10 Oct 2019 20:25:16 + > Robert Richter escreveu: > > > Looking at how mci->{ue,ce}_per_layer[EDAC_MAX_LAYERS] is used, it > > turns out that only the leaves in the memory hierarchy ar

Re: [PATCH 05/19] EDAC, mc: Reduce indentation level in edac_mc_handle_error()

2019-10-11 Thread Robert Richter
On 11.10.19 03:50:23, Joe Perches wrote: > On Fri, 2019-10-11 at 07:20 -0300, Mauro Carvalho Chehab wrote: > > Em Thu, 10 Oct 2019 15:10:53 -0700 > > Joe Perches escreveu: > > > > > On Thu, 2019-10-10 at 20:25 +, Robert Richter wrote: > &

Re: [PATCH 01/19] EDAC: Replace EDAC_DIMM_PTR() macro with edac_get_dimm() function

2019-10-11 Thread Robert Richter
On 11.10.19 06:58:57, Mauro Carvalho Chehab wrote: > Anyway, if you have a good reason to add this idx, please place > it on a separate patch, with a proper description about why > it is needed. Right, see next patch. Will change. -Robert

Re: [PATCH 02/19] EDAC: Remove EDAC_DIMM_OFF() macro

2019-10-11 Thread Robert Richter
Thanks for review. On 11.10.19 07:09:03, Mauro Carvalho Chehab wrote: > Em Thu, 10 Oct 2019 20:25:07 + > Robert Richter escreveu: > > > The EDAC_DIMM_OFF() macro takes 5 arguments to get the DIMM's index. > > This can be much simplified now as the offset is already

Re: [PATCH 05/19] EDAC, mc: Reduce indentation level in edac_mc_handle_error()

2019-10-11 Thread Robert Richter
On 10.10.19 15:10:53, Joe Perches wrote: > On Thu, 2019-10-10 at 20:25 +0000, Robert Richter wrote: > > Reduce the indentation level in edac_mc_handle_error() a bit by using > > continue. No functional changes. > > Seems fine, but trivially below: > > > diff --

Re: [PATCH 00/19] EDAC: Rework edac_mc and ghes drivers

2019-10-10 Thread Robert Richter
On 10.10.19 20:25:01, Robert Richter wrote: > This patch set is a rework of the ghes_edac and edac_mc driver. It > addresses issues found during code review and while working with the > code. The changes include: Sorry for the: Content-Transfer-Encoding: quoted-printable I defini

[PATCH 07/19] EDAC, mc: Rename iterator variable to idx

2019-10-10 Thread Robert Richter
Rename iterator variable to idx. The name is more handy, esp. when searching it in the code. Signed-off-by: Robert Richter --- drivers/edac/edac_mc.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/edac/edac_mc.c b/drivers/edac/edac_mc.c index

[PATCH 12/19] EDAC: Store error type in struct edac_raw_error_desc

2019-10-10 Thread Robert Richter
Store the error type in struct edac_raw_error_desc. This makes the type parameter of edac_raw_mc_handle_error() obsolete. Signed-off-by: Robert Richter --- drivers/edac/edac_mc.c | 8 drivers/edac/edac_mc.h | 4 +--- drivers/edac/ghes_edac.c | 13 ++--- include/linux

[PATCH 11/19] EDAC: Remove misleading comment in struct edac_raw_error_desc

2019-10-10 Thread Robert Richter
There never has been such function edac_raw_error_desc_clean() and in function ghes_edac_report_mem_error() the whole struct is zero'ed including the string arrays. Remove that comment. Signed-off-by: Robert Richter --- include/linux/edac.h | 5 - 1 file changed, 5 deletions(-) diff --git

[PATCH 17/19] EDAC, ghes: Remove intermediate buffer pvt->detail_location

2019-10-10 Thread Robert Richter
and code can be unified. Reviewed-by: James Morse Signed-off-by: Robert Richter --- drivers/edac/ghes_edac.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/edac/ghes_edac.c b/drivers/edac/ghes_edac.c index 97242cf18a88..8d9d3c4dbebb 100644 --- a/drivers/edac

[PATCH 15/19] EDAC, ghes: Use standard kernel macros for page calculations

2019-10-10 Thread Robert Richter
Use standard macros for page calculations. Reviewed-by: James Morse Signed-off-by: Robert Richter --- drivers/edac/ghes_edac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/edac/ghes_edac.c b/drivers/edac/ghes_edac.c index 8078d4ec9631..851aad92e42d 100644

[PATCH 16/19] EDAC, ghes: Fix grain calculation

2019-10-10 Thread Robert Richter
assumed to be contiguous, but this is not sanity-checked. However, in case the mask is non-contiguous, a conversion to grain_bits effectively converts the grain bit mask to a power of 2 by rounding up. Suggested-by: James Morse Signed-off-by: Robert Richter --- drivers/edac/ghes_edac.c | 10

[PATCH 06/19] EDAC, mc: Remove per layer counters

2019-10-10 Thread Robert Richter
nly add complexity, remove them. The error counter values are directly stored in struct dimm_info now. Signed-off-by: Robert Richter --- drivers/edac/edac_mc.c | 104 --- drivers/edac/edac_mc_sysfs.c | 20 +++ drivers/edac/ghes_edac.c | 5 +- in

[PATCH 09/19] EDAC, mc: Reorder functions edac_mc_alloc*()

2019-10-10 Thread Robert Richter
Reorder the new created functions edac_mc_alloc_csrows() and edac_mc_alloc_dimms() and move them before edac_mc_alloc(). No further code changes. Signed-off-by: Robert Richter --- drivers/edac/edac_mc.c | 171 - 1 file changed, 84 insertions(+), 87

[PATCH 18/19] EDAC, ghes: Unify trace_mc_event() code with edac_mc driver

2019-10-10 Thread Robert Richter
The code in ghes_edac.c and edac_mc.c for grain_bits calculation and calling trace_mc_event() is now the same. Move it to a single location in edac_raw_mc_handle_error(). The only difference is the missing IS_ENABLED(CONFIG_RAS) switch, but this is needed for ghes too. Signed-off-by: Robert

[PATCH 14/19] EDAC, mc: Create new function edac_inc_csrow()

2019-10-10 Thread Robert Richter
Have a separate function to count errors in csrow/channel. This better separates code and reduces the indentation level. No functional changes. Signed-off-by: Robert Richter --- drivers/edac/edac_mc.c | 40 +--- 1 file changed, 25 insertions(+), 15 deletions

[PATCH 19/19] EDAC, Documentation: Describe CPER module definition and DIMM ranks

2019-10-10 Thread Robert Richter
Update on CPER DIMM naming convention and DIMM ranks. Signed-off-by: Robert Richter --- Documentation/admin-guide/ras.rst | 31 +++ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/Documentation/admin-guide/ras.rst b/Documentation/admin-guide/ras.rst

[PATCH 13/19] EDAC, mc: Determine mci pointer from the error descriptor

2019-10-10 Thread Robert Richter
of edac_raw_mc_handle_error(). Signed-off-by: Robert Richter --- drivers/edac/edac_mc.c | 13 + drivers/edac/edac_mc.h | 8 +++- drivers/edac/ghes_edac.c | 2 +- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/drivers/edac/edac_mc.c b/drivers/edac/edac_mc.c

[PATCH 02/19] EDAC: Remove EDAC_DIMM_OFF() macro

2019-10-10 Thread Robert Richter
of the layers is unknown. Only the number of DIMMs would be needed. Signed-off-by: Robert Richter --- drivers/edac/edac_mc.c | 15 + drivers/edac/edac_mc_sysfs.c | 20 -- include/linux/edac.h | 41 3 files changed, 9

[PATCH 08/19] EDAC, mc: Split edac_mc_alloc() into smaller functions

2019-10-10 Thread Robert Richter
edac_mc_alloc() is huge. Factor out code by moving it to the two new functions edac_mc_alloc_csrows() and edac_mc_alloc_dimms(). Do not move code yet for better review. Signed-off-by: Robert Richter --- drivers/edac/edac_mc.c | 104 +++-- 1 file changed, 69

[PATCH 05/19] EDAC, mc: Reduce indentation level in edac_mc_handle_error()

2019-10-10 Thread Robert Richter
Reduce the indentation level in edac_mc_handle_error() a bit by using continue. No functional changes. Signed-off-by: Robert Richter --- drivers/edac/edac_mc.c | 59 +- 1 file changed, 30 insertions(+), 29 deletions(-) diff --git a/drivers/edac/edac_mc.c

[PATCH 10/19] EDAC, mc: Rework edac_raw_mc_handle_error() to use struct dimm_info

2019-10-10 Thread Robert Richter
The error handling functions have the pos[] array argument for determing the dimm handle. Rework those functions to use the dimm handle directly. Signed-off-by: Robert Richter --- drivers/edac/edac_mc.c | 28 +--- drivers/edac/edac_mc.h | 2 ++ drivers/edac

[PATCH 03/19] EDAC: Introduce mci_for_each_dimm() iterator

2019-10-10 Thread Robert Richter
Introduce the mci_for_each_dimm() iterator. It returns a pointer to a struct dimm_info. This makes the declaration and use of an index obsolete and avoids access to internal data of struct mci (direct array access etc). Signed-off-by: Robert Richter --- drivers/edac/edac_mc.c | 19

[PATCH 04/19] EDAC, mc: Do not BUG_ON() in edac_mc_alloc()

2019-10-10 Thread Robert Richter
No need to crash the system in case edac_mc_alloc() is called with invalid arguments, just warn and return. This would cause a checkpatch warning when touching the code later, so just fix it. Signed-off-by: Robert Richter --- drivers/edac/edac_mc.c | 4 +++- 1 file changed, 3 insertions(+), 1

[PATCH 01/19] EDAC: Replace EDAC_DIMM_PTR() macro with edac_get_dimm() function

2019-10-10 Thread Robert Richter
->layers, mci->dimms, mci->n_layers, a, b, c) +edac_get_dimm(mci, a, b, c) Signed-off-by: Robert Richter --- drivers/edac/edac_mc.c | 1 + drivers/edac/ghes_edac.c| 7 +-- drivers/edac/i10nm_base.c | 3 +- drivers/edac/i3200_edac.c | 3 +- drivers/edac/i5000_edac.c | 5 +-

[PATCH 00/19] EDAC: Rework edac_mc and ghes drivers

2019-10-10 Thread Robert Richter
et_dimm() function" * use unsigned type for dimm->idx to avoid need for negative range check * fixed mci_for_each_dimm() loop in i5100_init_csrows() * fixed off-by-one in mci_for_each_dimm() Robert Richter (19): EDAC: Replace EDAC_DIMM_PTR() macro with edac_get_dimm() function

Re: [PATCH] PCI: Enhance the ACS quirk for Cavium devices

2019-10-08 Thread Robert Richter
On 04.10.19 14:48:13, Bjorn Helgaas wrote: > commit 37b22fbfec2d > Author: George Cherian > Date: Thu Sep 19 02:43:34 2019 + > > PCI: Apply Cavium ACS quirk to CN99xx and CN11xxx Root Ports > > Add an array of Cavium Root Port device IDs and apply the quirk only to > the >

Re: [PATCH v4 1/2] edac: Add an API for edac device to report for multiple errors

2019-10-01 Thread Robert Richter
On 01.10.19 12:25:39, Borislav Petkov wrote: > On Tue, Oct 01, 2019 at 09:47:07AM +0000, Robert Richter wrote: > > If you move to static inline for edac_device_handle_{ce,ue} the > > symbols vanish and this breaks the abi. That's why the split in two > > patches. > >

Re: [PATCH v4 1/2] edac: Add an API for edac device to report for multiple errors

2019-10-01 Thread Robert Richter
On 01.10.19 10:32:42, Borislav Petkov wrote: > -- > On Tue, Oct 01, 2019 at 06:56:58AM +, Robert Richter wrote: > > It is *not* the counterpart. The __* version already has the... > > Lemme cut to the

Re: [PATCH v4 1/2] edac: Add an API for edac device to report for multiple errors

2019-10-01 Thread Robert Richter
On 30.09.19 16:50:46, Borislav Petkov wrote: > -- > On Mon, Sep 23, 2019 at 08:17:40PM +0100, Hanna Hawa wrote: > > +void edac_device_handle_ce(struct edac_device_ctl_info *edac_dev, > > + int inst_nr, int

Re: [PATCH v4 0/2] Add an API for edac device, for mulriple errors

2019-09-24 Thread Robert Richter
On 23.09.19 20:17:39, Hanna Hawa wrote: > Add an API for EDAC device to report for multiple errors, and move the > old report function to use the new API. > > Changes from v3: > > - Move count check to inline function > - Fix count variable describtion > (Reported-by: kbuild

Re: [PATCH] EDAC: Armada XP: Use devm_platform_ioremap_resource() in two functions

2019-09-23 Thread Robert Richter
Hi Markus, On 21.09.19 17:57:24, Markus Elfring wrote: > From: Markus Elfring > Date: Sat, 21 Sep 2019 17:50:17 +0200 > > Simplify these function implementations by using a known function. > > This issue was detected by using the Coccinelle software. Which semantic patch did you use here?

Re: [PATCH 07/32] x86: Use pr_warn instead of pr_warning

2019-09-20 Thread Robert Richter
| 6 ++-- > arch/x86/mm/numa_emulation.c | 4 +-- > arch/x86/mm/testmmiotrace.c| 6 ++-- > arch/x86/oprofile/op_x86_model.h | 6 ++-- For oprofile: Acked-by: Robert Richter But see below: > arch/x86/platform/olpc/olpc-xo15-sci.c | 2 +- >

Re: [PATCH 17/32] oprofile: Use pr_warn instead of pr_warning

2019-09-20 Thread Robert Richter
On 20.09.19 14:25:29, Kefeng Wang wrote: > As said in commit f2c2cbcc35d4 ("powerpc: Use pr_warn instead of > pr_warning"), removing pr_warning so all logging messages use a > consistent _warn style. Let's do it. > > Cc: Robert Richter > Signed-off-by: Kefeng Wan

Re: [PATCH v3 2/2] edac: move edac_device_handle_*() API functions to header

2019-09-20 Thread Robert Richter
On 19.09.19 18:17:13, Hanna Hawa wrote: > Move edac_device_handle_*() functions from source file to header file as > inline funtcion that use the new API with single error. > > Signed-off-by: Hanna Hawa With the changes below it looks good to me: Acked-by: Robert Richter Than

Re: [PATCH v3 1/2] edac: Add an API for edac device to report for multiple errors

2019-09-20 Thread Robert Richter
On 19.09.19 18:17:12, Hanna Hawa wrote: > Add an API for EDAC device to report multiple errors with same type. > > Signed-off-by: Hanna Hawa With the change below it looks good to me: Acked-by: Robert Richter Thanks, -Robert > --- > drivers/edac/eda

Re: [PATCH v2 1/2] edac: Add an API for edac device to report for multiple errors

2019-09-19 Thread Robert Richter
On 12.09.19 15:53:04, Hanna Hawa wrote: > Add an API for EDAC device to report multiple errors with same type. > > Signed-off-by: Hanna Hawa > --- > drivers/edac/edac_device.c | 91 ++ > drivers/edac/edac_device.h | 40 + > 2 files changed,

Re: [PATCH 1/1] edac: Add an API for edac device to report for multiple errors

2019-09-10 Thread Robert Richter
On 08.09.19 10:58:31, Hawa, Hanna wrote: > On 9/5/2019 12:56 PM, Robert Richter wrote: > > > diff --git a/drivers/edac/edac_device.c b/drivers/edac/edac_device.c > > > index 65cf2b9355c4..bf6a4fd9831b 100644 > > > --- a/drivers/edac/edac_device.c > >

Re: [PATCH 1/1] edac: Add an API for edac device to report for multiple errors

2019-09-05 Thread Robert Richter
Hi Hanna, thanks for the update. See below. On 05.09.19 09:37:45, Hanna Hawa wrote: > Add an API for edac device to report multiple errors with same type. > > Signed-off-by: Hanna Hawa > --- > drivers/edac/edac_device.c | 66 +- > drivers/edac/edac_device.h

Re: [PATCH v3 4/4] edac: Add support for Amazon's Annapurna Labs L2 EDAC

2019-09-03 Thread Robert Richter
On 03.09.19 10:58:16, Borislav Petkov wrote: > On Tue, Sep 03, 2019 at 08:46:24AM +0000, Robert Richter wrote: > > This is good, but recent practice is also to have all the drivers for > > the same piece of hardware in a single file, see e.g. thunderx_edac.c. > > I do

Re: [PATCH v3 4/4] edac: Add support for Amazon's Annapurna Labs L2 EDAC

2019-09-03 Thread Robert Richter
On 03.09.19 11:28:41, Hawa, Hanna wrote: > On 9/3/2019 10:27 AM, Robert Richter wrote: > > On 15.07.19 16:24:09, Hanna Hawa wrote: > > > Adds support for Amazon's Annapurna Labs L2 EDAC driver to detect and > > > report L2 errors. > > &

Re: [PATCH v3 4/4] edac: Add support for Amazon's Annapurna Labs L2 EDAC

2019-09-03 Thread Robert Richter
On 15.07.19 16:24:09, Hanna Hawa wrote: > Adds support for Amazon's Annapurna Labs L2 EDAC driver to detect and > report L2 errors. > > Signed-off-by: Hanna Hawa > --- > MAINTAINERS | 6 ++ > drivers/edac/Kconfig | 8 ++ > drivers/edac/Makefile | 1 + >

Re: [PATCH v3 2/4] edac: Add support for Amazon's Annapurna Labs L1 EDAC

2019-09-03 Thread Robert Richter
On 15.07.19 16:24:07, Hanna Hawa wrote: > Adds support for Amazon's Annapurna Labs L1 EDAC driver to detect and > report L1 errors. > > Signed-off-by: Hanna Hawa > Reviewed-by: James Morse > --- > MAINTAINERS | 6 ++ > drivers/edac/Kconfig | 8 +++ >

[PATCH 5/5] MAINTAINERS: update EDAC's reviewer entry

2019-09-02 Thread Robert Richter
I did some significant work with code in edac_mc.c and ghes_edac.c already, so I guess I can probably helping out a bit as code reviewer here. Signed-off-by: Robert Richter --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 97912d8333a9

[PATCH 1/5] EDAC: Prefer 'unsigned int' to bare use of 'unsigned'

2019-09-02 Thread Robert Richter
: + const unsigned chan = i5100_csrow_to_chan(mci, dimm->idx); Signed-off-by: Robert Richter --- drivers/edac/edac_mc.c | 20 ++-- drivers/edac/edac_mc.h | 6 +++--- drivers/edac/edac_mc_sysfs.c | 6 +++--- drivers/edac/ghes_edac.c | 2 +- drivers/e

[PATCH 4/5] EDAC, mc_sysfs: Make debug messages consistent

2019-09-02 Thread Robert Richter
messages more consistent. Additionally, unify the error messages to have the same terms for the same operations of the device. Signed-off-by: Robert Richter --- drivers/edac/edac_mc_sysfs.c | 63 +--- 1 file changed, 29 insertions(+), 34 deletions(-) diff --git

[PATCH 0/5] EDAC: Small cleanups and fixes

2019-09-02 Thread Robert Richter
is an updated version of a patch reviewed before: https://lore.kernel.org/patchwork/patch/1093466/ Some references to ml discussions that are related to this series: https://lore.kernel.org/patchwork/patch/1093480/#1312590 https://lore.kernel.org/patchwork/patch/1093466/#1310572 Robert Richter

  1   2   3   4   5   6   7   8   9   10   >