On 28 October 2016 at 08:00, Vijay Kilari <vijay.kil...@gmail.com> wrote: > On Thu, Oct 27, 2016 at 9:33 PM, Peter Maydell <peter.mayd...@linaro.org> > wrote: >> On 25 October 2016 at 13:12, <vijay.kil...@gmail.com> wrote: >>> From: Vijaya Kumar K <vijaya.ku...@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.ku...@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? thanks -- PMM