linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Milton Miller <miltonm@bga.com>
To: linuxppc-dev@ozlabs.org,
	Ben Herrenschmidt <benh@kernel.crashing.org>,
	Paul Mackerrus <paulus@samba.org>
Subject: [PATCH 14/16] powerpc mpic: use smp_request_message_ipi
Date: Fri, 10 Oct 2008 06:56:50 -0500 (CDT)	[thread overview]
Message-ID: <patch-ipi-3@bga.com> (raw)
In-Reply-To: <patch-ipi-2@bga.com>

mpic has 4 ipis so use the new smp_request_message_ipi to reduce
pathlength when reciving an ipi.

This has the side effect of using the common ipi names, and also
continuing to try request the remaining messages when one fails.

Signed-off-by: Milton Miller <miltonm@bga.com>

Index: next.git/arch/powerpc/sysdev/mpic.c
===================================================================
--- next.git.orig/arch/powerpc/sysdev/mpic.c	2008-10-05 00:20:41.000000000 -0500
+++ next.git/arch/powerpc/sysdev/mpic.c	2008-10-05 00:21:41.000000000 -0500
@@ -616,17 +616,6 @@ static inline void mpic_eoi(struct mpic 
 	(void)mpic_cpu_read(MPIC_INFO(CPU_WHOAMI));
 }
 
-#ifdef CONFIG_SMP
-static irqreturn_t mpic_ipi_action(int irq, void *data)
-{
-	long ipi = (long)data;
-
-	smp_message_recv(ipi);
-
-	return IRQ_HANDLED;
-}
-#endif /* CONFIG_SMP */
-
 /*
  * Linux descriptor level callbacks
  */
@@ -1492,13 +1481,7 @@ unsigned int mpic_get_mcirq(void)
 void mpic_request_ipis(void)
 {
 	struct mpic *mpic = mpic_primary;
-	long i, err;
-	static char *ipi_names[] = {
-		"IPI0 (call function)",
-		"IPI1 (reschedule)",
-		"IPI2 (call function single)",
-		"IPI3 (debugger break)",
-	};
+	int i;
 	BUG_ON(mpic == NULL);
 
 	printk(KERN_INFO "mpic: requesting IPIs ... \n");
@@ -1507,17 +1490,10 @@ void mpic_request_ipis(void)
 		unsigned int vipi = irq_create_mapping(mpic->irqhost,
 						       mpic->ipi_vecs[0] + i);
 		if (vipi == NO_IRQ) {
-			printk(KERN_ERR "Failed to map IPI %ld\n", i);
-			break;
-		}
-		err = request_irq(vipi, mpic_ipi_action,
-				  IRQF_DISABLED|IRQF_PERCPU,
-				  ipi_names[i], (void *)i);
-		if (err) {
-			printk(KERN_ERR "Request of irq %d for IPI %ld failed\n",
-			       vipi, i);
-			break;
+			printk(KERN_ERR "Failed to map %s\n", smp_ipi_name[i]);
+			continue;
 		}
+		smp_request_message_ipi(vipi, i);
 	}
 }
 

  reply	other threads:[~2008-10-10 11:56 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-10 11:56 [PATCH 00/16] xics and ipi cleanups for 2.6.28 Milton Miller
2008-10-10 11:56 ` [PATCH 1/16] powerpc pseries: eoi unmapped xics irqs after disable Milton Miller
2008-10-10 11:56 ` [PATCH 2/16] xics: update default_server during migrate_irqs_away Milton Miller
2008-10-13 20:04   ` Nathan Fontenot
2008-10-10 11:56 ` [PATCH 3/16] xics: consolidate ipi message encode and decode Milton Miller
2008-10-10 11:56 ` [PATCH 4/16] xics: rearrange file to group code by function Milton Miller
2008-10-10 11:56 ` [PATCH 5/16] xics: change arg type to remove casts Milton Miller
2008-10-10 11:56 ` [PATCH 6/16] xics: trim includes Milton Miller
2008-10-10 11:56 ` [PATCH 7/16] xics: initialization cleanups Milton Miller
2008-10-13  0:55   ` Benjamin Herrenschmidt
2008-10-10 11:56 ` [PATCH 8/16] xics: factor out giq set and unset Milton Miller
2008-10-10 11:56 ` [PATCH 9/16] powerpc: eoi xics ipi by hand in kexec Milton Miller
2008-10-10 11:56 ` [PATCH 11/16] powerpc: mark xics ipi percpu Milton Miller
2008-10-10 11:56 ` [PATCH 10/16] xics: make printk formats fit on one line Milton Miller
2008-10-10 11:56 ` [PATCH 12/16] powerpc: reduce and comment xics ipi memory barrier Milton Miller
2008-10-10 11:56 ` [PATCH 13/16] powerpc smp: no need to set_need_resched in resched ipi Milton Miller
2008-10-10 11:56   ` [PATCH 14/16] powerpc: expand vs demux ipi actions per message Milton Miller
2008-10-10 11:56     ` Milton Miller [this message]
2008-10-10 11:56     ` [PATCH 15/16] powerpc cell: use smp_request_message_ipi Milton Miller
2008-10-10 11:56     ` [PATCH 16/16] powerpc ps3: " Milton Miller
2008-10-10 12:55     ` [PATCH 14/16] powerpc: expand vs demux ipi actions per message Geert Uytterhoeven
2008-10-21  1:37     ` [PATCH 14/16 v2] " Milton Miller
2008-11-06  4:42       ` Paul Mackerras
2008-11-11 16:12         ` Milton Miller
2008-10-13  5:28 ` [PATCH 00/16] xics and ipi cleanups for 2.6.28 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=patch-ipi-3@bga.com \
    --to=miltonm@bga.com \
    --cc=benh@kernel.crashing.org \
    --cc=linuxppc-dev@ozlabs.org \
    --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).