[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-arm] [RFC PATCH v1 1/2] utils: Add helper to read arm MIDR_EL1
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-arm] [RFC PATCH v1 1/2] utils: Add helper to read arm MIDR_EL1 register |
Date: |
Thu, 4 Aug 2016 08:16:10 -0400 (EDT) |
> > Third, it's probably a bad idea to call this function from generic code, so
> > make it static and add the detection function from patch 2/2 already here.
> > By making it static, it's also possible to define it only if CONFIG_LINUX
> > is defined; the ThunderX detection will then return false if !CONFIG_LINUX.
> >
>
> You mean to say, move contents of this patch to util/cutils.c and make it
> static and define under __aarch64__ and CONFIG_LINUX?.
I don't think util/cutils.c is the right file. It should be a new file,
something
like util/aarch64-cpuid.c.
If CONFIG_LINUX is not defined, the ThunderX detection function should return
zero.
If __aarch64__ is not defined, the function should not be defined at all.
Paolo