powerpc/mpic: Fix use of "flags" variable in mpic_alloc()
authorKyle Moffett <Kyle.D.Moffett@boeing.com>
Thu, 22 Dec 2011 10:19:09 +0000 (10:19 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 22 Feb 2012 23:49:58 +0000 (10:49 +1100)
commit3a7a7176e840f448aae929f7761ea80cf892c665
tree8e4c90c6cb951801fa01db37ba278e4e1f4da17b
parent27e74da9800289e69ba907777df1e2085231eff7
powerpc/mpic: Fix use of "flags" variable in mpic_alloc()

The mpic_alloc() function takes a "flags" parameter and assigns it into
the mpic->flags variable fairly early on, but several later pieces of
code detect various device-tree properties and save them into the
"mpic->flags" variable (EG: "big-endian" => MPIC_BIG_ENDIAN).

Unfortunately, a number of codepaths (including several which test the
flag MPIC_BIG_ENDIAN!) test "flags" instead of "mpic->flags", and get
wrong answers as a result.

Consolidate the device-tree flag tests early in mpic_alloc() and change
all of the checks after "mpic->flags" is init'ed to use "mpic->flags".

[BenH: Fixed up use of mpic->node before it's initialized]

Signed-off-by: Kyle Moffett <Kyle.D.Moffett@boeing.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/sysdev/mpic.c
This page took 0.024429 seconds and 5 git commands to generate.