linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Michael Ellerman <michael@ellerman.id.au>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [RFC/PATCH 2/4] Turn xics_setup_8259_cascade() into a generic pseries_setup_i8259_cascade()
Date: Fri, 18 Apr 2008 14:05:10 +1000	[thread overview]
Message-ID: <1208491510.6958.388.camel@pasglop> (raw)
In-Reply-To: <f82f14fe5748aa91cafc9341ba02544c05090a28.1207032121.git.michael@ellerman.id.au>


On Tue, 2008-04-01 at 17:42 +1100, Michael Ellerman wrote:
> Remove the xics references from xics_setup_8259_cascade(), and merge the
> good bits from the almost identical logic in pseries_mpic_init_IRQ().
> 
> Signed-off-by: Michael Ellerman <michael@ellerman.id.au>

Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

> ---
>  arch/powerpc/platforms/pseries/setup.c |   20 ++++++++++++--------
>  1 files changed, 12 insertions(+), 8 deletions(-)
> 
> diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c
> index 43e4801..1e1faa1 100644
> --- a/arch/powerpc/platforms/pseries/setup.c
> +++ b/arch/powerpc/platforms/pseries/setup.c
> @@ -127,28 +127,32 @@ void pseries_8259_cascade(unsigned int irq, struct irq_desc *desc)
>  	desc->chip->eoi(irq);
>  }
>  
> -static void __init xics_setup_8259_cascade(void)
> +static void __init pseries_setup_i8259_cascade(void)
>  {
>  	struct device_node *np, *old, *found = NULL;
> -	int cascade, naddr;
> +	unsigned int cascade;
>  	const u32 *addrp;
>  	unsigned long intack = 0;
> +	int naddr;
>  
> -	for_each_node_by_type(np, "interrupt-controller")
> +	for_each_node_by_type(np, "interrupt-controller") {
>  		if (of_device_is_compatible(np, "chrp,iic")) {
>  			found = np;
>  			break;
>  		}
> +	}
> +
>  	if (found == NULL) {
> -		printk(KERN_DEBUG "xics: no ISA interrupt controller\n");
> +		printk(KERN_DEBUG "pic: no ISA interrupt controller\n");
>  		return;
>  	}
> +
>  	cascade = irq_of_parse_and_map(found, 0);
>  	if (cascade == NO_IRQ) {
> -		printk(KERN_ERR "xics: failed to map cascade interrupt");
> +		printk(KERN_ERR "pic: failed to map cascade interrupt");
>  		return;
>  	}
> -	pr_debug("xics: cascade mapped to irq %d\n", cascade);
> +	pr_debug("pic: cascade mapped to irq %d\n", cascade);
>  
>  	for (old = of_node_get(found); old != NULL ; old = np) {
>  		np = of_get_parent(old);
> @@ -166,7 +170,7 @@ static void __init xics_setup_8259_cascade(void)
>  			intack |= ((unsigned long)addrp[naddr-2]) << 32;
>  	}
>  	if (intack)
> -		printk(KERN_DEBUG "xics: PCI 8259 intack at 0x%016lx\n", intack);
> +		printk(KERN_DEBUG "pic: PCI 8259 intack at 0x%016lx\n", intack);
>  	i8259_init(found, intack);
>  	of_node_put(found);
>  	set_irq_chained_handler(cascade, pseries_8259_cascade);
> @@ -254,7 +258,7 @@ static void __init pseries_mpic_init_IRQ(void)
>  static void __init pseries_xics_init_IRQ(void)
>  {
>  	xics_init_IRQ();
> -	xics_setup_8259_cascade();
> +	pseries_setup_i8259_cascade();
>  }
>  
>  static void pseries_lpar_enable_pmcs(void)

  reply	other threads:[~2008-04-18  4:05 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-01  6:42 [RFC/PATCH 1/4] Move xics_setup_8259_cascade() into platforms/pseries/setup.c Michael Ellerman
2008-04-01  6:42 ` [RFC/PATCH 2/4] Turn xics_setup_8259_cascade() into a generic pseries_setup_i8259_cascade() Michael Ellerman
2008-04-18  4:05   ` Benjamin Herrenschmidt [this message]
2008-04-01  6:42 ` [RFC/PATCH 3/4] Use pseries_setup_i8259_cascade() in pseries_mpic_init_IRQ() Michael Ellerman
2008-04-18  4:15   ` Benjamin Herrenschmidt
2008-04-18  4:47     ` Michael Ellerman
2008-04-01  6:42 ` [RFC/PATCH 4/4] Simplify xics direct/lpar irq_host setup Michael Ellerman
2008-04-18  4:16   ` Benjamin Herrenschmidt
2008-04-18  3:59 ` [RFC/PATCH 1/4] Move xics_setup_8259_cascade() into platforms/pseries/setup.c Benjamin Herrenschmidt

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=1208491510.6958.388.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=michael@ellerman.id.au \
    /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).