From: Sascha Hauer <s.hauer@pengutronix.de>
To: Alexander Aring <alex.aring@gmail.com>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 1/6] ARM: make cpu architecture detection available as static inline function
Date: Tue, 5 Mar 2013 11:34:47 +0100 [thread overview]
Message-ID: <20130305103447.GQ1906@pengutronix.de> (raw)
In-Reply-To: <20130304204656.GD911@x61s.8.8.8.8>
On Mon, Mar 04, 2013 at 09:46:56PM +0100, Alexander Aring wrote:
> Hi,
>
> > +/*
> > + * Early version to get the ARM cpu architecture. Only needed during
> > + * early startup when the C environment is not yet fully initialized.
> > + * Normally you should use cpu_architecture() instead.
> > + */
> > +static inline int arm_early_get_cpu_architecture(void)
> > +{
> > + int cpu_arch;
> > +
> > + if ((read_cpuid_id() & 0x0008f000) == 0) {
> > + cpu_arch = CPU_ARCH_UNKNOWN;
> > + } else if ((read_cpuid_id() & 0x0008f000) == 0x00007000) {
> > + cpu_arch = (read_cpuid_id() & (1 << 23)) ? CPU_ARCH_ARMv4T : CPU_ARCH_ARMv3;
> > + } else if ((read_cpuid_id() & 0x00080000) == 0x00000000) {
> > + cpu_arch = (read_cpuid_id() >> 16) & 7;
> > + if (cpu_arch)
> > + cpu_arch += CPU_ARCH_ARMv3;
>
> I know... it's only a movement, but is cpu += CPU_ARCH_ARMv3 correct
> here? All other has only a assignment.
This particular line is present in the Kernel since the pre-git days, so
I assume it's correct ;)
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2013-03-05 10:34 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-04 20:03 [PATCH] ARM: Add relocatable binary support Sascha Hauer
2013-03-04 20:03 ` [PATCH 1/6] ARM: make cpu architecture detection available as static inline function Sascha Hauer
2013-03-04 20:46 ` Alexander Aring
2013-03-05 10:34 ` Sascha Hauer [this message]
2013-03-04 20:03 ` [PATCH 2/6] ARM: add early mmu cache flush function and use it in setup_c Sascha Hauer
2013-03-04 20:03 ` [PATCH 3/6] ARM: provide accessor functions for linker variables Sascha Hauer
2013-03-04 20:03 ` [PATCH 4/6] ARM boards: Use accessor functions to access " Sascha Hauer
2013-03-04 20:03 ` [PATCH 5/6] ARN: fixup vector addresses for relocatable binaries Sascha Hauer
2013-03-04 20:03 ` [PATCH 6/6] ARM: Add relocatable binary support Sascha Hauer
2013-03-04 20:10 ` Alexander Shiyan
2013-03-04 20:19 ` Sascha Hauer
2013-03-05 4:32 ` Re[2]: " Alexander Shiyan
2013-03-05 7:25 ` Sascha Hauer
2013-03-04 20:53 ` Alexander Aring
2013-03-05 10:46 ` Sascha Hauer
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=20130305103447.GQ1906@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=alex.aring@gmail.com \
--cc=barebox@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