All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Andreas Färber" <afaerber@suse.de>
To: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	QEMU Developers <qemu-devel@nongnu.org>,
	Anthony Liguori <aliguori@amazon.com>
Subject: Re: [Qemu-devel] [PATCH target-arm v4 2/3] zynq_slcr: Add links to the CPUs
Date: Fri, 10 Jan 2014 21:54:07 +0100	[thread overview]
Message-ID: <52D05DEF.1080208@suse.de> (raw)
In-Reply-To: <CAEgOgz4T7285x8KQiSoS5QsTjSKVcsUsALAFGh8ephdKtJx2-g@mail.gmail.com>

Am 10.01.2014 21:20, schrieb Peter Crosthwaite:
> On Sat, Jan 11, 2014 at 4:11 AM, Peter Maydell <peter.maydell@linaro.org> wrote:
>> On 2 January 2014 07:31, Peter Crosthwaite <peter.crosthwaite@xilinx.com> wrote:
>>> The SLCR needs to be able to reset the CPUs, so link the CPUs to the
>>> SLCR.
>>
>>> @@ -496,10 +500,17 @@ static const MemoryRegionOps slcr_ops = {
>>>  static int zynq_slcr_init(SysBusDevice *dev)
>>>  {
>>>      ZynqSLCRState *s = ZYNQ_SLCR(dev);
>>> +    int i;
>>>
>>>      memory_region_init_io(&s->iomem, OBJECT(s), &slcr_ops, s, "slcr", 0x1000);
>>>      sysbus_init_mmio(dev, &s->iomem);
>>>
>>> +    for (i = 0; i < NUM_CPUS; ++i) {
>>> +        gchar *name = g_strdup_printf("cpu%d", i);
>>> +        object_property_add_link(OBJECT(dev), name, TYPE_CPU,
>>> +                                 (Object **)&s->cpus[i], NULL);
>>> +        g_free(name);
>>> +    }
>>
>> This is where we get into the nasty questions of how
>> we ought to be modelling reset. I don't think that
>> reset controllers ought to work by having direct links
>> to a pile of QOM device objects. I'd much rather we tried
>> to work towards modelling this the way the hardware does,
>> ie a QOM device has one or more inbound GPIO lines
>> corresponding to the hardware's reset signals, and the
>> SoC or board wires those up to the reset controller
>> appropriately.
>>
> 
> So all nice solutions to this really want named GPIOs which is
> something of a long term sore-point. Are you happy to take a simple
> addition of a reset GPIO to ARMCPU  (which itself just calls
> cpu_reset) without the need for the big planned GPIO fixups (whether
> than be pins of Andreas' QOMification)?

Pins are Anthony's topic, not mine. :) I rather recently suggested to do
a transparent QOM'ification. I thus have no objections against adding a
reset IRQ! That had BTW been discussed as possible solution for
partial/soft resets in PReP and x86 context.

Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

  reply	other threads:[~2014-01-10 20:54 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-02  7:30 [Qemu-devel] [PATCH target-arm v4 0/3] Reset and Halting modifications + Zynq SMP Peter Crosthwaite
2014-01-02  7:30 ` [Qemu-devel] [PATCH target-arm v4 1/3] xilinx_zynq: added SMP support: Peter Crosthwaite
2014-01-10 18:08   ` Peter Maydell
2014-01-15  6:47     ` Peter Crosthwaite
2014-01-02  7:31 ` [Qemu-devel] [PATCH target-arm v4 2/3] zynq_slcr: Add links to the CPUs Peter Crosthwaite
2014-01-10 18:11   ` Peter Maydell
2014-01-10 20:20     ` Peter Crosthwaite
2014-01-10 20:54       ` Andreas Färber [this message]
2014-01-02  7:32 ` [Qemu-devel] [PATCH target-arm v4 3/3] zynq_slcr: Implement CPU reset Peter Crosthwaite
2014-01-10  4:34 ` [Qemu-devel] [PATCH target-arm v4 0/3] Reset and Halting modifications + Zynq SMP 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=52D05DEF.1080208@suse.de \
    --to=afaerber@suse.de \
    --cc=aliguori@amazon.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.