linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] EDAC, sb_edac: Fixed logic error in sb_edac driver
@ 2016-03-07 14:30 Hubert Chrzaniuk
  2016-03-07 15:24 ` Borislav Petkov
  2016-03-07 16:20 ` Aristeu Rozanski
  0 siblings, 2 replies; 5+ messages in thread
From: Hubert Chrzaniuk @ 2016-03-07 14:30 UTC (permalink / raw)
  To: hubert.chrzaniuk, lukasz.anaczkowski, mchehab, dougthompson, bp,
	linux-edac
  Cc: linux-kernel

Patch corrects a typo introduced previously.
As a result under some configurations dimms were not
correctly recognized. Problem affects only Xeon Phi architecture.

Signed-off-by: Hubert Chrzaniuk <hubert.chrzaniuk@intel.com>
---
 drivers/edac/sb_edac.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/edac/sb_edac.c b/drivers/edac/sb_edac.c
index e438ee5..f5c6b97 100644
--- a/drivers/edac/sb_edac.c
+++ b/drivers/edac/sb_edac.c
@@ -1574,7 +1574,7 @@ static int knl_get_dimm_capacity(struct sbridge_pvt *pvt, u64 *mc_sizes)
 				for (cha = 0; cha < KNL_MAX_CHAS; cha++) {
 					if (knl_get_mc_route(target,
 						mc_route_reg[cha]) == channel
-						&& participants[channel]) {
+						&& !participants[channel]) {
 						participant_count++;
 						participants[channel] = 1;
 						break;
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] EDAC, sb_edac: Fixed logic error in sb_edac driver
  2016-03-07 14:30 [PATCH] EDAC, sb_edac: Fixed logic error in sb_edac driver Hubert Chrzaniuk
@ 2016-03-07 15:24 ` Borislav Petkov
  2016-03-08  9:18   ` Chrzaniuk, Hubert
  2016-03-07 16:20 ` Aristeu Rozanski
  1 sibling, 1 reply; 5+ messages in thread
From: Borislav Petkov @ 2016-03-07 15:24 UTC (permalink / raw)
  To: Hubert Chrzaniuk
  Cc: lukasz.anaczkowski, mchehab, dougthompson, linux-edac,
	linux-kernel

On Mon, Mar 07, 2016 at 03:30:45PM +0100, Hubert Chrzaniuk wrote:
> Patch corrects a typo introduced previously.
> As a result under some configurations dimms were not
> correctly recognized. Problem affects only Xeon Phi architecture.
> 
> Signed-off-by: Hubert Chrzaniuk <hubert.chrzaniuk@intel.com>
> ---
>  drivers/edac/sb_edac.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/edac/sb_edac.c b/drivers/edac/sb_edac.c
> index e438ee5..f5c6b97 100644
> --- a/drivers/edac/sb_edac.c
> +++ b/drivers/edac/sb_edac.c
> @@ -1574,7 +1574,7 @@ static int knl_get_dimm_capacity(struct sbridge_pvt *pvt, u64 *mc_sizes)
>  				for (cha = 0; cha < KNL_MAX_CHAS; cha++) {
>  					if (knl_get_mc_route(target,
>  						mc_route_reg[cha]) == channel
> -						&& participants[channel]) {
> +						&& !participants[channel]) {
>  						participant_count++;
>  						participants[channel] = 1;
>  						break;
> -- 

Do I see it correctly this one fixes

d0cdf9003140 ("EDAC, sb_edac: Add Knights Landing (Xeon Phi gen 2) support")

and needs to go to Linus now otherwise 4.5 is b0rked on KNL?

On a related note, that knl_get_dimm_capacity() is huuuge and hard to
read and could use some nice cleanups and splitting out functionality
into helper functions...

-- 
Regards/Gruss,
    Boris.

ECO tip #101: Trim your mails when you reply.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] EDAC, sb_edac: Fixed logic error in sb_edac driver
  2016-03-07 14:30 [PATCH] EDAC, sb_edac: Fixed logic error in sb_edac driver Hubert Chrzaniuk
  2016-03-07 15:24 ` Borislav Petkov
@ 2016-03-07 16:20 ` Aristeu Rozanski
  1 sibling, 0 replies; 5+ messages in thread
From: Aristeu Rozanski @ 2016-03-07 16:20 UTC (permalink / raw)
  To: Hubert Chrzaniuk
  Cc: lukasz.anaczkowski, mchehab, dougthompson, bp, linux-edac,
	linux-kernel

On Mon, Mar 07, 2016 at 03:30:45PM +0100, Hubert Chrzaniuk wrote:
> Patch corrects a typo introduced previously.
> As a result under some configurations dimms were not
> correctly recognized. Problem affects only Xeon Phi architecture.
> 
> Signed-off-by: Hubert Chrzaniuk <hubert.chrzaniuk@intel.com>
> ---
>  drivers/edac/sb_edac.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/edac/sb_edac.c b/drivers/edac/sb_edac.c
> index e438ee5..f5c6b97 100644
> --- a/drivers/edac/sb_edac.c
> +++ b/drivers/edac/sb_edac.c
> @@ -1574,7 +1574,7 @@ static int knl_get_dimm_capacity(struct sbridge_pvt *pvt, u64 *mc_sizes)
>  				for (cha = 0; cha < KNL_MAX_CHAS; cha++) {
>  					if (knl_get_mc_route(target,
>  						mc_route_reg[cha]) == channel
> -						&& participants[channel]) {
> +						&& !participants[channel]) {
>  						participant_count++;
>  						participants[channel] = 1;
>  						break;

I can confirm this fixes the issues I've seen with the upstream driver.

Acked-by: Aristeu Rozanski <aris@redhat.com>

-- 
Aristeu

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [PATCH] EDAC, sb_edac: Fixed logic error in sb_edac driver
  2016-03-07 15:24 ` Borislav Petkov
@ 2016-03-08  9:18   ` Chrzaniuk, Hubert
  2016-03-08 10:28     ` Borislav Petkov
  0 siblings, 1 reply; 5+ messages in thread
From: Chrzaniuk, Hubert @ 2016-03-08  9:18 UTC (permalink / raw)
  To: Borislav Petkov
  Cc: Anaczkowski, Lukasz, mchehab@osg.samsung.com,
	dougthompson@xmission.com, linux-edac@vger.kernel.org,
	linux-kernel@vger.kernel.org

-----Original Message-----
From: Borislav Petkov [mailto:bp@alien8.de] 
Sent: Monday, March 7, 2016 4:24 PM

> Do I see it correctly this one fixes
> d0cdf9003140 ("EDAC, sb_edac: Add Knights Landing (Xeon Phi gen 2) support")
> and needs to go to Linus now otherwise 4.5 is b0rked on KNL?

Yes, that’s right:
1. d0cdf9003140 is the patch I am referring to
2. EDAC for KNL platform on 4.5 will not cause any problems but will not be functional for DIMMs (only for MCDRAM)

> On a related note, that knl_get_dimm_capacity() is huuuge and hard to
> read and could use some nice cleanups and splitting out functionality
> into helper functions...

Thanks, that is a valid point, it will be refactored in a separate patch.
However it would good to fix what we have now, so I still hope to have the patch merged anyway...

-Hubert

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] EDAC, sb_edac: Fixed logic error in sb_edac driver
  2016-03-08  9:18   ` Chrzaniuk, Hubert
@ 2016-03-08 10:28     ` Borislav Petkov
  0 siblings, 0 replies; 5+ messages in thread
From: Borislav Petkov @ 2016-03-08 10:28 UTC (permalink / raw)
  To: Chrzaniuk, Hubert
  Cc: Anaczkowski, Lukasz, mchehab@osg.samsung.com,
	dougthompson@xmission.com, linux-edac@vger.kernel.org,
	linux-kernel@vger.kernel.org

On Tue, Mar 08, 2016 at 09:18:33AM +0000, Chrzaniuk, Hubert wrote:
> Yes, that’s right:
> 1. d0cdf9003140 is the patch I am referring to
> 2. EDAC for KNL platform on 4.5 will not cause any problems but will not be functional for DIMMs (only for MCDRAM)

Ok, thanks for confirming.

> Thanks, that is a valid point, it will be refactored in a separate
> patch. However it would good to fix what we have now, so I still hope
> to have the patch merged anyway...

Of course - it is too late for cleanups anyway. I was suggesting that
you guys put it on your radar and start cleaning it up at some point,
when you get a chance. It is a low prio thing and can wait.

Thanks.

-- 
Regards/Gruss,
    Boris.

ECO tip #101: Trim your mails when you reply.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-03-08 10:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-07 14:30 [PATCH] EDAC, sb_edac: Fixed logic error in sb_edac driver Hubert Chrzaniuk
2016-03-07 15:24 ` Borislav Petkov
2016-03-08  9:18   ` Chrzaniuk, Hubert
2016-03-08 10:28     ` Borislav Petkov
2016-03-07 16:20 ` Aristeu Rozanski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).