From: Vijay Kilari <vijay.kilari@gmail.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-arm <qemu-arm@nongnu.org>,
Paolo Bonzini <pbonzini@redhat.com>,
Richard Henderson <rth@twiddle.net>,
"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
QEMU Developers <qemu-devel@nongnu.org>,
Vijaya Kumar K <Vijaya.Kumar@cavium.com>
Subject: Re: [Qemu-devel] [PATCH v4 2/3] utils: Add helper to read arm MIDR_EL1 register
Date: Fri, 28 Oct 2016 15:39:40 +0530 [thread overview]
Message-ID: <CALicx6sgPM_qBnnYGCsRk8XUarKZSiOJEJGTgjYOppzquAj70A@mail.gmail.com> (raw)
In-Reply-To: <CAFEAcA_AFW-N5siUp1+kM3Z2+ixwKbD35YK+97tCX-g3ENXpPA@mail.gmail.com>
On Fri, Oct 28, 2016 at 2:33 PM, Peter Maydell <peter.maydell@linaro.org> wrote:
> On 28 October 2016 at 08:00, Vijay Kilari <vijay.kilari@gmail.com> wrote:
>> On Thu, Oct 27, 2016 at 9:33 PM, Peter Maydell <peter.maydell@linaro.org> wrote:
>>> On 25 October 2016 at 13:12, <vijay.kilari@gmail.com> wrote:
>>>> From: Vijaya Kumar K <Vijaya.Kumar@cavium.com>
>>>>
>>>> Add helper API to read MIDR_EL1 registers to fetch
>>>> cpu identification information. This helps in
>>>> adding errata's and architecture specific features.
>>>>
>>>> This is implemented only for arm architecture.
>>>>
>>>> Signed-off-by: Vijaya Kumar K <Vijaya.Kumar@cavium.com>
>
>>>> diff --git a/util/Makefile.objs b/util/Makefile.objs
>>>> index 36c7dcc..d14a455 100644
>>>> --- a/util/Makefile.objs
>>>> +++ b/util/Makefile.objs
>>>> @@ -37,3 +37,4 @@ util-obj-y += log.o
>>>> util-obj-y += qdist.o
>>>> util-obj-y += qht.o
>>>> util-obj-y += range.o
>>>> +util-obj-y += aarch64-cpuid.o
>
>>>
>>>> +#include "qemu/cutils.h"
>>>> +#include "qemu/aarch64-cpuid.h"
>>>> +
>>>> +#if defined(__aarch64__)
>>>> +static uint64_t qemu_read_aarch64_midr_el1(void)
>>>> +{
>>>> +#ifdef CONFIG_LINUX
>>>
>>> When will CONFIG_LINUX not be defined but __aarch64__ is?
>> The contents of this file is compiled only for aarch64
>
> Your makefile change compiles it for everything.
>
>> and hence
>> all the contents are under this __aarch64__.
>> Also the code is only for linux, have added CONFIG_LINUX.
>
> ...and you haven't answered the question: in what
> circumstances could __aarch64__ be defined but
> CONFIG_LINUX is not, ie why is there any point in
> checking both defines?
Ok. You mean __aarch64__ and __linux__ both are defined by gcc.
we can rely on __aarch64__ define here?.
AFAIK, the caller of this function bufferiszero.c is compiled
for everything, I case of bufferiszero.c is compiled for other than
linux for aarch64, compilation might fail. In such case, the header file
needs to have dummy/empty functions.
next prev parent reply other threads:[~2016-10-28 10:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1477397577-25251-1-git-send-email-vijay.kilari@gmail.com>
[not found] ` <1477397577-25251-3-git-send-email-vijay.kilari@gmail.com>
2016-10-27 16:03 ` [Qemu-devel] [PATCH v4 2/3] utils: Add helper to read arm MIDR_EL1 register Peter Maydell
2016-10-28 7:00 ` Vijay Kilari
2016-10-28 9:03 ` Peter Maydell
2016-10-28 10:09 ` Vijay Kilari [this message]
2016-11-04 14:54 ` Vijay Kilari
2016-11-04 14:58 ` Peter Maydell
[not found] ` <1477397577-25251-4-git-send-email-vijay.kilari@gmail.com>
2016-10-31 15:12 ` [Qemu-devel] [PATCH v4 3/3] utils: Add prefetch for Thunderx platform Peter Maydell
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=CALicx6sgPM_qBnnYGCsRk8XUarKZSiOJEJGTgjYOppzquAj70A@mail.gmail.com \
--to=vijay.kilari@gmail.com \
--cc=Vijaya.Kumar@cavium.com \
--cc=dgilbert@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/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;
as well as URLs for NNTP newsgroup(s).