All of lore.kernel.org
 help / color / mirror / Atom feed
From: mark.rutland@arm.com (Mark Rutland)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v11 4/5] edac: Add APM X-Gene SoC EDAC driver
Date: Mon, 1 Jun 2015 16:17:57 +0100	[thread overview]
Message-ID: <20150601151757.GD7443@leverpostej> (raw)
In-Reply-To: <20150601151131.GD14192@e104818-lin.cambridge.arm.com>

On Mon, Jun 01, 2015 at 04:11:31PM +0100, Catalin Marinas wrote:
> On Mon, Jun 01, 2015 at 04:42:58PM +0200, Arnd Bergmann wrote:
> > On Friday 22 May 2015 17:32:59 Loc Ho wrote:
> > > +static bool xgene_edac_pmd_l2c_version1(void)
> > > +{
> > > +       /* Check all chips with PMD L2C version 1 HW */
> > > +       #define REVIDR_MINOR_REV(revidr)        ((revidr) & 0x00000007)
> > > +
> > > +       switch (MIDR_VARIANT(read_cpuid_id())) {
> > > +       case 0:
> > > +               switch (MIDR_REVISION(read_cpuid_id())) {
> > > +               case 0:
> > > +
> > > +                       switch (REVIDR_MINOR_REV(read_cpuid(REVIDR_EL1))) {
> > > +                       case 1:
> > > +                       case 2:
> > > +                               return true;
> > > +                       };
> > > +                       break;
> > > +               case 1:
> > > +                       if (REVIDR_MINOR_REV(read_cpuid(REVIDR_EL1)) == 1)
> > > +                               return true;
> > > +                       break;
> > > +               }
> > > +               break;
> > > +       case 1:
> > > +               switch (MIDR_REVISION(read_cpuid_id())) {
> > > +               case 0:
> > > +                       switch (REVIDR_MINOR_REV(read_cpuid(REVIDR_EL1))) {
> > > +                       case 1:
> > > +                               return true;
> > > +                       };
> > > +                       break;
> > > +               case 1:
> > > +                       switch (REVIDR_MINOR_REV(read_cpuid(REVIDR_EL1))) {
> > > +                       case 1:
> > > +                       case 0:
> > > +                               return true;
> > > +                       };
> > > +                       break;
> > > +               }
> > > +               break;
> > > +       }
> > > +
> > 
> > As this is causing build errors on other architectures with COMPILE_TEST
> > now, I'd suggest removing the function completely.
> > 
> > Please use different compatible strings for IP blocks that are different
> > and undetectable, instead of reading the ID of another IP block.
> 
> I fully agree, the MIDR_* macros shouldn't be used by anything under
> drivers/.

Likewise.

Mark.

WARNING: multiple messages have this Message-ID (diff)
From: Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>
To: Catalin Marinas <catalin.marinas-5wv7dgnIgG8@public.gmane.org>
Cc: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>,
	"linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
	<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
	"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"mchehab-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org"
	<mchehab-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org>,
	"jcm-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org"
	<jcm-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	"ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org"
	<ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>,
	"patches-qTEPVZfXA3Y@public.gmane.org"
	<patches-qTEPVZfXA3Y@public.gmane.org>,
	"robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org"
	<robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	"bp-Gina5bIWoIWzQB+pC5nmwQ@public.gmane.org"
	<bp-Gina5bIWoIWzQB+pC5nmwQ@public.gmane.org>,
	Loc Ho <lho-qTEPVZfXA3Y@public.gmane.org>,
	"dougthompson-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org"
	<dougthompson-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>,
	"linux-edac-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-edac-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH v11 4/5] edac: Add APM X-Gene SoC EDAC driver
Date: Mon, 1 Jun 2015 16:17:57 +0100	[thread overview]
Message-ID: <20150601151757.GD7443@leverpostej> (raw)
In-Reply-To: <20150601151131.GD14192-M2fw3Uu6cmfZROr8t4l/smS4ubULX0JqMm0uRHvK7Nw@public.gmane.org>

On Mon, Jun 01, 2015 at 04:11:31PM +0100, Catalin Marinas wrote:
> On Mon, Jun 01, 2015 at 04:42:58PM +0200, Arnd Bergmann wrote:
> > On Friday 22 May 2015 17:32:59 Loc Ho wrote:
> > > +static bool xgene_edac_pmd_l2c_version1(void)
> > > +{
> > > +       /* Check all chips with PMD L2C version 1 HW */
> > > +       #define REVIDR_MINOR_REV(revidr)        ((revidr) & 0x00000007)
> > > +
> > > +       switch (MIDR_VARIANT(read_cpuid_id())) {
> > > +       case 0:
> > > +               switch (MIDR_REVISION(read_cpuid_id())) {
> > > +               case 0:
> > > +
> > > +                       switch (REVIDR_MINOR_REV(read_cpuid(REVIDR_EL1))) {
> > > +                       case 1:
> > > +                       case 2:
> > > +                               return true;
> > > +                       };
> > > +                       break;
> > > +               case 1:
> > > +                       if (REVIDR_MINOR_REV(read_cpuid(REVIDR_EL1)) == 1)
> > > +                               return true;
> > > +                       break;
> > > +               }
> > > +               break;
> > > +       case 1:
> > > +               switch (MIDR_REVISION(read_cpuid_id())) {
> > > +               case 0:
> > > +                       switch (REVIDR_MINOR_REV(read_cpuid(REVIDR_EL1))) {
> > > +                       case 1:
> > > +                               return true;
> > > +                       };
> > > +                       break;
> > > +               case 1:
> > > +                       switch (REVIDR_MINOR_REV(read_cpuid(REVIDR_EL1))) {
> > > +                       case 1:
> > > +                       case 0:
> > > +                               return true;
> > > +                       };
> > > +                       break;
> > > +               }
> > > +               break;
> > > +       }
> > > +
> > 
> > As this is causing build errors on other architectures with COMPILE_TEST
> > now, I'd suggest removing the function completely.
> > 
> > Please use different compatible strings for IP blocks that are different
> > and undetectable, instead of reading the ID of another IP block.
> 
> I fully agree, the MIDR_* macros shouldn't be used by anything under
> drivers/.

Likewise.

Mark.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2015-06-01 15:17 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-22 23:32 [PATCH v11 0/4] edac: Add APM X-Gene SoC EDAC driver Loc Ho
2015-05-22 23:32 ` Loc Ho
2015-05-22 23:32 ` [PATCH v11 1/5] arm64: Enable EDAC on ARM64 Loc Ho
2015-05-22 23:32   ` Loc Ho
2015-05-22 23:32   ` [PATCH v11 2/5] MAINTAINERS: Add entry for APM X-Gene SoC EDAC driver Loc Ho
2015-05-22 23:32     ` Loc Ho
2015-05-22 23:32     ` [PATCH v11 3/5] Documentation: Add documentation for the APM X-Gene SoC EDAC DTS binding Loc Ho
2015-05-22 23:32       ` Loc Ho
2015-05-22 23:32       ` [PATCH v11 4/5] edac: Add APM X-Gene SoC EDAC driver Loc Ho
2015-05-22 23:32         ` Loc Ho
2015-05-22 23:33         ` [PATCH v11 5/5] arm64: Add APM X-Gene SoC EDAC DTS entries Loc Ho
2015-05-22 23:33           ` Loc Ho
2015-06-01 14:42         ` [PATCH v11 4/5] edac: Add APM X-Gene SoC EDAC driver Arnd Bergmann
2015-06-01 14:42           ` Arnd Bergmann
2015-06-01 15:11           ` Catalin Marinas
2015-06-01 15:11             ` Catalin Marinas
2015-06-01 15:17             ` Mark Rutland [this message]
2015-06-01 15:17               ` Mark Rutland
2015-06-01 15:27               ` [PATCH] edac: xgene: fix cpuid abuse Arnd Bergmann
2015-06-01 15:27                 ` Arnd Bergmann
2015-06-01 17:04                 ` Loc Ho
2015-06-01 17:04                   ` Loc Ho
2015-06-01 18:09                   ` Arnd Bergmann
2015-06-01 18:09                     ` Arnd Bergmann
2015-05-29  9:46 ` [PATCH v11 0/4] edac: Add APM X-Gene SoC EDAC driver Borislav Petkov
2015-05-29  9:46   ` Borislav Petkov
2015-05-29 18:06   ` Loc Ho
2015-05-29 18:06     ` Loc Ho
2015-05-29 18:59     ` Borislav Petkov
2015-05-29 18:59       ` Borislav Petkov
2015-05-29 20:05       ` [PATCH] EDAC, edac_stub: Drop arch-specific include Borislav Petkov
2015-05-29 20:05         ` Borislav Petkov
2015-05-29 21:25         ` Loc Ho
2015-05-29 21:25           ` Loc Ho
2015-05-29 21:41           ` Borislav Petkov
2015-05-29 21:41             ` Borislav Petkov
2015-05-29 20:18       ` [PATCH v11 0/4] edac: Add APM X-Gene SoC EDAC driver Loc Ho
2015-05-29 20:18         ` Loc Ho

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150601151757.GD7443@leverpostej \
    --to=mark.rutland@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.