From: "Michael S. Tsirkin" <mst@redhat.com>
To: Isaku Yamahata <yamahata@valinux.co.jp>
Cc: blauwirbel@gmail.com, mtosatti@redhat.com, qemu-devel@nongnu.org,
armbru@redhat.com
Subject: [Qemu-devel] Re: pci_default_config_write() clean up
Date: Fri, 8 May 2009 17:21:00 +0300 [thread overview]
Message-ID: <20090508142100.GB3073@redhat.com> (raw)
In-Reply-To: <20090508034301.GF25512%yamahata@valinux.co.jp>
On Fri, May 08, 2009 at 12:43:01PM +0900, Isaku Yamahata wrote:
>
> Here is the ver2 pci_default_config_write() clean up
> following to comments.
>
> I didn't use per-dword callback. Although special cycles
> specifies dword address, qemu emulation is not bus level,
> but instruction level.
>
> Maybe callback function signature might be arguable.
> But at this moment there is no real user, so I'd like
> to postpone its argument until real user appears.
>
> thanks,
>
> >From 491830066972faf3f87ba170273c97b7f90a1ea3 Mon Sep 17 00:00:00 2001
> From: Isaku Yamahata <yamahata@valinux.co.jp>
> Date: Thu, 7 May 2009 16:14:04 +0900
> Subject: [PATCH] pci: pci_default_config_write() clean up.
>
> clean up of pci_default_config_write() by table driven code.
>
> Changes v2
> - converted static table into dynamic initialization.
> - changed callback signature.
>
> Cc: Michael S. Tsirkin <mst@redhat.com>
> Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
> @@ -236,11 +239,122 @@ int pci_assign_devaddr(const char *addr, int *domp, int *busp, unsigned *slotp)
> return pci_parse_devaddr(devaddr, domp, busp, slotp);
> }
>
> +static void pci_conf_init(struct PCIConfigReg *config_regs,
> + uint32_t addr, pci_config_written_t callback,
> + uint32_t wmask, int len)
> +{
> + int i;
> +
> + for (i = 0; i < len; i++) {
> + config_regs[addr].wmask = wmask & 0xff;
> + config_regs[addr].shift = 8 * i;
> + config_regs[addr].callback = callback;
> +
> + wmask >>= 8;
> + }
> +}
Could you please post an incremental patch,
that adds callbacks, on top of mine adding masks?
--
MST
next prev parent reply other threads:[~2009-05-08 14:22 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-08 3:43 [Qemu-devel] pci_default_config_write() clean up Isaku Yamahata
2009-05-08 14:21 ` Michael S. Tsirkin [this message]
2009-05-10 8:38 ` [Qemu-devel] " Michael S. Tsirkin
-- strict thread matches above, loose matches on Subject: below --
2009-05-07 8:40 [Qemu-devel] " Isaku Yamahata
2009-05-07 8:50 ` [Qemu-devel] " Michael S. Tsirkin
2009-05-07 9:06 ` Isaku Yamahata
2009-05-07 9:34 ` Michael S. Tsirkin
2009-05-07 9:29 ` Michael S. Tsirkin
2009-05-07 9:55 ` Isaku Yamahata
2009-05-07 10:25 ` Michael S. Tsirkin
2009-05-07 11:13 ` Isaku Yamahata
2009-05-07 11:46 ` Michael S. Tsirkin
2009-05-07 11:57 ` Paul Brook
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=20090508142100.GB3073@redhat.com \
--to=mst@redhat.com \
--cc=armbru@redhat.com \
--cc=blauwirbel@gmail.com \
--cc=mtosatti@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=yamahata@valinux.co.jp \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).