All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Jean-Christophe DUBOIS <jcd@tribudubois.net>
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
	"Peter Crosthwaite" <peter.crosthwaite@xilinx.com>,
	"Anthony Liguori" <aliguori@us.ibm.com>,
	qemu-devel@nongnu.org, "Paul Brook" <paul@codesourcery.com>,
	"Andreas Färber" <afaerber@suse.de>
Subject: Re: [Qemu-devel] [PULL 2/8] i.MX: Implement a more complete version of the GPT timer.
Date: Wed, 26 Jun 2013 23:18:48 +0200	[thread overview]
Message-ID: <51CB5AB8.9030409@redhat.com> (raw)
In-Reply-To: <51CB5995.6020702@tribudubois.net>

Il 26/06/2013 23:13, Jean-Christophe DUBOIS ha scritto:
> On 06/26/2013 08:58 PM, Jean-Christophe DUBOIS wrote:
>> On 06/26/2013 09:21 AM, Peter Crosthwaite wrote:
>>> Hi
>>>
>>> On Wed, Jun 26, 2013 at 4:56 PM, Paolo Bonzini <pbonzini@redhat.com>
>>> wrote:
>>>> Il 25/06/2013 22:53, Peter Maydell ha scritto:
>>>>> On 25 June 2013 19:42, Paolo Bonzini <pbonzini@redhat.com> wrote:
>>>>>> Il 25/06/2013 20:21, Peter Maydell ha scritto:
>>>>>>> @@ -416,7 +513,7 @@ static int imx_timerg_init(SysBusDevice *dev)
>>>>>>>
>>>>>>>       sysbus_init_irq(dev, &s->irq);
>>>>>>>       memory_region_init_io(&s->iomem, &imx_timerg_ops,
>>>>>>> -                          s, "imxg-timer",
>>>>>>> +                          s, TYPE_IMX_GPT,
>>>>>>>                             0x00001000);
>>>>>>>       sysbus_init_mmio(dev, &s->iomem);
>>>>>>>
>>>>>> There was some agreement that this is not a good change.
>>>>> I agree (and more so regarding the use of the macro in the
>>>>> vmstate name), but nobody actually posted any comment to
>>>>> that effect against any of the versions of this patch that
>>>>> got sent out for review...
>>>> Yeah, the timing was bad... Can you post a revert, though?
>>>>
>>> The original string being replaced was a poor choice as well. IIUC the
>>> consensus was string field of the memory regions is supposed to
>>> indicate the purpose of the memory region for the device. Good
>>> examples would be "Control regs" or "MMIO". Naming the memory region
>>> after the device type is a redundancy as that info will come via
>>> memory region owners.
>>>
>>> So rather than revert could you just choose something more descriptive?
>> Peter (Maydell),
>>
>> How do you want to work this out?
>>
>> Do you revert it and we start over?
>>
>> Or should I provide a patch on top of the actual file to change the
>> "wrong name"?
>>
>> Please advise.
> 
> I browsed through the various timer implementations in the hw/timer
> directory and I was not able to spot one that would follow the
> convention you indicated.
> 
> Could you point me to a "good citizen" example?

Here is one example (hw/pci-host/piix.c):

    memory_region_init_io(&s->conf_mem, &pci_host_conf_le_ops, s,
                          "pci-conf-idx", 4);
    sysbus_add_io(dev, 0xcf8, &s->conf_mem);
    sysbus_init_ioports(&s->busdev, 0xcf8, 4);

    memory_region_init_io(&s->data_mem, &pci_host_data_le_ops, s,
                          "pci-conf-data", 4);
    sysbus_add_io(dev, 0xcfc, &s->data_mem);
    sysbus_init_ioports(&s->busdev, 0xcfc, 4);

Just reverting the changes to memory regions and vmstate names is enough
for now.

Paolo

  reply	other threads:[~2013-06-26 21:18 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-25 18:21 [Qemu-devel] [PULL 0/8] arm-devs queue Peter Maydell
2013-06-25 18:21 ` [Qemu-devel] [PULL 1/8] ARM: Allow dumping of device tree Peter Maydell
2013-06-25 18:21 ` [Qemu-devel] [PULL 2/8] i.MX: Implement a more complete version of the GPT timer Peter Maydell
2013-06-25 18:42   ` Paolo Bonzini
2013-06-25 20:53     ` Peter Maydell
2013-06-26  6:56       ` Paolo Bonzini
2013-06-26  7:08         ` jcd
2013-06-26  7:11           ` Paolo Bonzini
2013-06-26  7:17             ` jcd
2013-06-26  7:21         ` Peter Crosthwaite
2013-06-26 18:58           ` Jean-Christophe DUBOIS
2013-06-26 21:13             ` Jean-Christophe DUBOIS
2013-06-26 21:18               ` Paolo Bonzini [this message]
2013-06-26 21:57                 ` Jean-Christophe DUBOIS
2013-06-26 22:15                   ` Peter Maydell
2013-06-26 22:32                     ` Jean-Christophe DUBOIS
2013-06-27 10:46                       ` Peter Maydell
2013-06-26 22:17                   ` Andreas Färber
2013-06-25 18:21 ` [Qemu-devel] [PULL 3/8] i.MX: Rework functions/types name and use new style initialization Peter Maydell
2013-06-25 18:21 ` [Qemu-devel] [PULL 4/8] arm/boot: Free dtb blob memory after use Peter Maydell
2013-06-25 18:21 ` [Qemu-devel] [PULL 5/8] i.MX31: Fix PRCS bit test Peter Maydell
2013-06-25 18:21 ` [Qemu-devel] [PULL 6/8] block/nand: QOM casting sweep Peter Maydell
2013-06-25 18:21 ` [Qemu-devel] [PULL 7/8] block/nand: Convert Sysbus::init to Device::realize Peter Maydell
2013-06-25 18:21 ` [Qemu-devel] [PULL 8/8] nand: Don't inherit from Sysbus Peter Maydell
2013-06-25 19:07 ` [Qemu-devel] [PULL 0/8] arm-devs queue Anthony Liguori
2013-06-25 20:49   ` Peter Maydell
2013-06-25 21:45     ` Anthony Liguori
2013-06-25 22:01       ` Peter Maydell

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=51CB5AB8.9030409@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=afaerber@suse.de \
    --cc=aliguori@us.ibm.com \
    --cc=jcd@tribudubois.net \
    --cc=paul@codesourcery.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.