Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit be8bec56 authored by Kyle Moffett's avatar Kyle Moffett Committed by Benjamin Herrenschmidt
Browse files

powerpc/mpic: Invert the meaning of MPIC_PRIMARY



It turns out that there are only 2 in-tree platforms which use MPICs
which are not "primary":  IBM Cell and PowerMac.  To reduce the
complexity of the typical board setup code, invert the MPIC_PRIMARY bit
into MPIC_SECONDARY.

Signed-off-by: default avatarKyle Moffett <Kyle.D.Moffett@boeing.com>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent 996983b7
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -334,11 +334,11 @@ struct mpic
 * Note setting any ID (leaving those bits to 0) means standard MPIC
 */

/* This is the primary controller, only that one has IPIs and
 * has afinity control. A non-primary MPIC always uses CPU0
 * registers only
/*
 * This is a secondary ("chained") controller; it only uses the CPU0
 * registers.  Primary controllers have IPIs and affinity control.
 */
#define MPIC_PRIMARY			0x00000001
#define MPIC_SECONDARY			0x00000001

/* Set this for a big-endian MPIC */
#define MPIC_BIG_ENDIAN			0x00000002
+1 −1
Original line number Diff line number Diff line
@@ -71,7 +71,7 @@ static void __init iss4xx_init_irq(void)
		/* The MPIC driver will get everything it needs from the
		 * device-tree, just pass 0 to all arguments
		 */
		struct mpic *mpic = mpic_alloc(np, 0, MPIC_PRIMARY, 0, 0,
		struct mpic *mpic = mpic_alloc(np, 0, 0, 0, 0,
					       " MPIC     ");
		BUG_ON(mpic == NULL);
		mpic_init(mpic);
+1 −1
Original line number Diff line number Diff line
@@ -36,7 +36,7 @@
void __init corenet_ds_pic_init(void)
{
	struct mpic *mpic;
	unsigned int flags = MPIC_PRIMARY | MPIC_BIG_ENDIAN |
	unsigned int flags = MPIC_BIG_ENDIAN |
				MPIC_BROKEN_FRR_NIRQS | MPIC_SINGLE_DEST_CPU;

	if (ppc_md.get_irq == mpic_get_coreint_irq)
+1 −1
Original line number Diff line number Diff line
@@ -58,7 +58,7 @@ static void machine_restart(char *cmd)
static void __init ksi8560_pic_init(void)
{
	struct mpic *mpic = mpic_alloc(NULL, 0,
			MPIC_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN,
			MPIC_WANTS_RESET | MPIC_BIG_ENDIAN,
			0, 256, " OpenPIC  ");
	BUG_ON(mpic == NULL);
	mpic_init(mpic);
+1 −1
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@
void __init mpc8536_ds_pic_init(void)
{
	struct mpic *mpic = mpic_alloc(NULL, 0,
			  MPIC_PRIMARY | MPIC_WANTS_RESET |
			  MPIC_WANTS_RESET |
			  MPIC_BIG_ENDIAN | MPIC_BROKEN_FRR_NIRQS,
			0, 256, " OpenPIC  ");
	BUG_ON(mpic == NULL);
Loading