From: "Andreas Färber" <afaerber@suse.de>
To: Peter Maydell <peter.maydell@linaro.org>,
Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Cc: QEMU Developers <qemu-devel@nongnu.org>,
Mark Langsdorf <mark.langsdorf@calxeda.com>
Subject: Re: [Qemu-devel] [PATCH arm-devs v1 2/6] target-arm/cpu: Convert reset CBAR to a property
Date: Wed, 27 Nov 2013 10:42:30 +0100 [thread overview]
Message-ID: <5295BE86.9050109@suse.de> (raw)
In-Reply-To: <CAFEAcA-Rqny-KeR9Z6zsMD=vUkyfw+MxwJAea8pbYiCsJ=JtJA@mail.gmail.com>
Am 27.11.2013 10:14, schrieb Peter Maydell:
> On 27 November 2013 09:01, Peter Crosthwaite
> <peter.crosthwaite@xilinx.com> wrote:
>> The reset Value of the CP15 CBAR is a vendor (machine) configurable
>> property. Define arm_cpu_properties and add it.
>>
>> Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
>> ---
>>
>> target-arm/cpu.c | 7 +++++++
>> 1 file changed, 7 insertions(+)
>>
>> diff --git a/target-arm/cpu.c b/target-arm/cpu.c
>> index a82fa61..f1c5f6b 100644
>> --- a/target-arm/cpu.c
>> +++ b/target-arm/cpu.c
>> @@ -20,6 +20,7 @@
>>
>> #include "cpu.h"
>> #include "qemu-common.h"
>> +#include "hw/qdev-properties.h"
>> #if !defined(CONFIG_USER_ONLY)
>> #include "hw/loader.h"
>> #endif
>> @@ -847,6 +848,11 @@ typedef struct ARMCPUInfo {
>> void (*class_init)(ObjectClass *oc, void *data);
>> } ARMCPUInfo;
>>
>> +static Property arm_cpu_properties[] = {
>> + DEFINE_PROP_UINT32("cbar", ARMCPU, reset_cbar, 0),
>> + DEFINE_PROP_END_OF_LIST(),
>> +};
>> +
>> static const ARMCPUInfo arm_cpus[] = {
>> #if !defined(CONFIG_USER_ONLY) || !defined(TARGET_AARCH64)
>> { .name = "arm926", .initfn = arm926_initfn },
>> @@ -895,6 +901,7 @@ static void arm_cpu_class_init(ObjectClass *oc, void *data)
>>
>> acc->parent_realize = dc->realize;
>> dc->realize = arm_cpu_realizefn;
>> + dc->props = arm_cpu_properties;
>>
>> acc->parent_reset = cc->reset;
>> cc->reset = arm_cpu_reset;
>
> Hmm. This means we end up with a cbar property on every
> ARM CPU whether that ARM CPU has a cbar or not...
If we turn it into a dynamic property, we could register it conditional
to ARM_FEATURE_CBAR.
The overall idea of the series makes sense to me. I would caution to
think about the naming scheme though - we might want to have a "cbar"
property to access the current value whereas we'll likely end up having
several reset values to configure over time.
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
next prev parent reply other threads:[~2013-11-27 9:42 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-27 9:00 [Qemu-devel] [PATCH arm-devs v1 0/6] Fix Support for ARM A9 CBAR Peter Crosthwaite
2013-11-27 9:01 ` [Qemu-devel] [PATCH arm-devs v1 1/6] target-arm: Define and use ARM_FEATURE_CBAR Peter Crosthwaite
2013-11-27 9:01 ` [Qemu-devel] [PATCH arm-devs v1 2/6] target-arm/cpu: Convert reset CBAR to a property Peter Crosthwaite
2013-11-27 9:14 ` Peter Maydell
2013-11-27 9:42 ` Andreas Färber [this message]
2013-11-27 10:15 ` Peter Maydell
2013-11-27 10:27 ` Andreas Färber
2013-11-27 10:35 ` Peter Maydell
2013-11-27 11:39 ` Peter Crosthwaite
2013-11-27 11:47 ` Peter Maydell
2013-11-28 1:48 ` Peter Crosthwaite
2013-11-27 13:10 ` Andreas Färber
2013-11-27 9:02 ` [Qemu-devel] [PATCH arm-devs v1 3/6] arm/highbank: Use object_new() rather than cpu_arm_init() Peter Crosthwaite
2013-11-27 9:10 ` Peter Maydell
2013-11-27 9:52 ` Andreas Färber
2013-11-27 9:02 ` [Qemu-devel] [PATCH arm-devs v1 4/6] arm/highbank: Fix CBAR intialisation Peter Crosthwaite
2013-11-27 9:03 ` [Qemu-devel] [PATCH arm-devs v1 5/6] arm/xilinx_zynq: Use object_new() rather than cpu_arm_init() Peter Crosthwaite
2013-11-27 9:04 ` [Qemu-devel] [PATCH arm-devs v1 6/6] arm/xilinx_zynq: Implement CBAR intialisation Peter Crosthwaite
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=5295BE86.9050109@suse.de \
--to=afaerber@suse.de \
--cc=mark.langsdorf@calxeda.com \
--cc=peter.crosthwaite@xilinx.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.