From: mark.rutland@arm.com (Mark Rutland)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCHv2 4/4] arm64: add runtime system sanity checks
Date: Thu, 19 Jun 2014 13:33:19 +0100 [thread overview]
Message-ID: <20140619123319.GD22217@leverpostej> (raw)
In-Reply-To: <20140618172036.GH17851@arm.com>
On Wed, Jun 18, 2014 at 06:20:36PM +0100, Will Deacon wrote:
> On Tue, Jun 17, 2014 at 06:04:34PM +0100, Mark Rutland wrote:
> > Unexpected variation in certain system register values across CPUs is an
> > indicator of potential problems with a system. The kernel expects CPUs
> > to be mostly identical in terms of supported features, even in systems
> > with heterogeneous CPUs, with uniform instruction set support being
> > critical for the correct operation of userspace.
> >
> > To help detect issues early where hardware violates the expectations of
> > the kernel, this patch adds simple runtime sanity checks on important ID
> > registers in the bring up path of each CPU.
> >
> > Signed-off-by: Mark Rutland <mark.rutland@arm.com>
>
> [...]
>
> > +/*
> > + * Verify that CPUs don't have unexpected differences that will cause problems.
> > + */
> > +void cpuinfo_sanity_check(struct cpuinfo_arm64 *cur)
> > +{
> > + struct cpuinfo_arm64 *boot = &per_cpu(cpu_data, 0);
> > + int cpu = smp_processor_id();
>
> You could just as easily pass in the cpu number here, like you do for
> cpuinfo_detect_icache_policy.
Sure; done.
Mark.
next prev parent reply other threads:[~2014-06-19 12:33 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-17 17:04 [PATCHv2 0/4] arm64: handle heterogeneous system register values Mark Rutland
2014-06-17 17:04 ` [PATCHv2 1/4] arm64: add MIDR_EL1 field accessors Mark Rutland
2014-06-17 17:04 ` [PATCHv2 2/4] arm64: cpuinfo: print info for all CPUs Mark Rutland
2014-06-18 17:15 ` Will Deacon
2014-06-19 10:56 ` Mark Rutland
2014-06-18 18:29 ` Ard Biesheuvel
2014-06-19 11:31 ` Mark Rutland
2014-06-19 12:54 ` Ard Biesheuvel
2014-06-17 17:04 ` [PATCHv2 3/4] arm64: cachetype: report weakest cache policy Mark Rutland
2014-06-18 17:18 ` Will Deacon
2014-06-17 17:04 ` [PATCHv2 4/4] arm64: add runtime system sanity checks Mark Rutland
2014-06-18 17:20 ` Will Deacon
2014-06-19 12:33 ` Mark Rutland [this message]
2014-06-18 17:23 ` [PATCHv2 0/4] arm64: handle heterogeneous system register values Will Deacon
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=20140619123319.GD22217@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox