From: Scott Wood <scottwood@freescale.com>
To: Alexander Graf <agraf@suse.de>
Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] PPC: Bring EPR support closer to reality
Date: Mon, 7 Jan 2013 11:42:22 -0600 [thread overview]
Message-ID: <1357580542.1113.2@snotra> (raw)
In-Reply-To: <1357342602-11279-1-git-send-email-agraf@suse.de> (from agraf@suse.de on Fri Jan 4 17:36:42 2013)
On 01/04/2013 05:36:42 PM, Alexander Graf wrote:
> @@ -667,6 +671,20 @@ static void openpic_gbl_write(void *opaque,
> hwaddr addr, uint64_t val,
> case 0x1020: /* GCR */
> if (val & GCR_RESET) {
> openpic_reset(&opp->busdev.qdev);
> + } else if (opp->mpic_mode_mask) {
> + CPUArchState *env;
> + int mpic_proxy = 0;
> +
> + opp->gcr &= ~opp->mpic_mode_mask;
> + opp->gcr |= val & opp->mpic_mode_mask;
> +
> + /* Set external proxy mode */
> + if ((val & opp->mpic_mode_mask) == GCR_MODE_PROXY) {
> + mpic_proxy = 1;
> + }
> + for (env = first_cpu; env != NULL; env = env->next_cpu) {
> + env->mpic_proxy = mpic_proxy;
> + }
> }
> break;
> case 0x1080: /* VIR */
Why is "if (opp->mpic_mode_mask)" needed? The code should already be a
no-op if mpic_mode_mask is zero.
Can get rid of the "else" by having the reset code do a "break".
> @@ -1407,6 +1425,9 @@ static int openpic_init(SysBusDevice *dev)
> opp->irq_tim0 = FSL_MPIC_20_TMR_IRQ;
> opp->irq_msi = FSL_MPIC_20_MSI_IRQ;
> opp->brr1 = FSL_BRR1_IPID | FSL_BRR1_IPMJ | FSL_BRR1_IPMN;
> + /* XXX really only available as of MPIC 4.0 */
> + opp->mpic_mode_mask = GCR_MODE_PROXY;
> +
Shouldn't mpic_mode_mask be set to GCR_MODE_MIXED for Raven?
-Scott
next prev parent reply other threads:[~2013-01-07 17:42 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-04 23:36 [Qemu-devel] [PATCH] PPC: Bring EPR support closer to reality Alexander Graf
2013-01-07 17:42 ` Scott Wood [this message]
2013-01-07 17:50 ` Alexander Graf
2013-01-07 19:04 ` Scott Wood
-- strict thread matches above, loose matches on Subject: below --
2013-01-04 10:24 Alexander Graf
2013-01-04 18:50 ` Scott Wood
2013-01-04 18:54 ` Alexander Graf
2013-01-04 19:07 ` Scott Wood
2013-01-04 22:57 ` Alexander Graf
2013-01-04 20:21 ` Anthony Liguori
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=1357580542.1113.2@snotra \
--to=scottwood@freescale.com \
--cc=agraf@suse.de \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@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 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).