From: Michael Ellerman <michael@ellerman.id.au>
To: Olof Johansson <olof@lixom.net>
Cc: linuxppc-dev@ozlabs.org, paulus@samba.org
Subject: Re: [PATCH] [v2] powerpc: MPIC: support more than 256 sources
Date: Mon, 29 Jan 2007 18:23:48 +1100 [thread overview]
Message-ID: <1170055428.19887.62.camel@concordia.ozlabs.ibm.com> (raw)
In-Reply-To: <20070129053318.GA7561@lixom.net>
[-- Attachment #1: Type: text/plain, Size: 1541 bytes --]
On Sun, 2007-01-28 at 23:33 -0600, Olof Johansson wrote:
> Allow more than the default 256 MPIC sources. Allocates a new flag
> (MPIC_LARGE_VECTORS) to be used by platform code when instantiating
> the mpic.
>
> I picked 11 bits worth right now since it would cover the number of
> sources on any hardware I have seen. It can always be increased later
> if needed.
>
>
> Signed-off-by: Olof Johansson <olof@lixom.net>
>
> Index: merge/arch/powerpc/sysdev/mpic.c
> ===================================================================
> --- merge.orig/arch/powerpc/sysdev/mpic.c
> +++ merge/arch/powerpc/sysdev/mpic.c
> @@ -944,6 +954,21 @@ struct mpic * __init mpic_alloc(struct d
> mpic->irq_count = irq_count;
> mpic->num_sources = 0; /* so far */
>
> + if (flags & MPIC_LARGE_VECTORS)
> + intvec_top = 2047;
> + else
> + intvec_top = 255;
> +
> + mpic->timer_vecs[0] = intvec_top - 8;
> + mpic->timer_vecs[1] = intvec_top - 7;
> + mpic->timer_vecs[2] = intvec_top - 6;
> + mpic->timer_vecs[3] = intvec_top - 5;
> + mpic->ipi_vecs[0] = intvec_top - 4;
> + mpic->ipi_vecs[1] = intvec_top - 3;
> + mpic->ipi_vecs[2] = intvec_top - 2;
> + mpic->ipi_vecs[3] = intvec_top - 1;
> + mpic->spurious_vec = intvec_top;
I like it :)
cheers
--
Michael Ellerman
OzLabs, IBM Australia Development Lab
wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)
We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
prev parent reply other threads:[~2007-01-29 7:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-25 21:38 [PATCH] powerpc: MPIC: support more than 256 sources Olof Johansson
2007-01-25 21:37 ` Jimi Xenidis
2007-01-25 22:16 ` Olof Johansson
2007-01-26 0:49 ` Michael Ellerman
2007-01-29 2:58 ` Olof Johansson
2007-01-29 5:33 ` [PATCH] [v2] " Olof Johansson
2007-01-29 7:23 ` Michael Ellerman [this message]
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=1170055428.19887.62.camel@concordia.ozlabs.ibm.com \
--to=michael@ellerman.id.au \
--cc=linuxppc-dev@ozlabs.org \
--cc=olof@lixom.net \
--cc=paulus@samba.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).