qemu-arm
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-arm] [PATCH v4 2/3] utils: Add helper to read arm MIDR_EL1 reg


From: Peter Maydell
Subject: Re: [Qemu-arm] [PATCH v4 2/3] utils: Add helper to read arm MIDR_EL1 register
Date: Fri, 28 Oct 2016 10:03:35 +0100

On 28 October 2016 at 08:00, Vijay Kilari <address@hidden> wrote:
> On Thu, Oct 27, 2016 at 9:33 PM, Peter Maydell <address@hidden> wrote:
>> On 25 October 2016 at 13:12,  <address@hidden> wrote:
>>> From: Vijaya Kumar K <address@hidden>
>>>
>>> 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 <address@hidden>

>>> 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?

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]