Question about code which uses MPIC_NO_RESET on 85XX

2 messages, 2 authors, 2016-02-16 · open the first message on its own page

Question about code which uses MPIC_NO_RESET on 85XX

From: Alessio Igor Bogani <hidden>
Date: 2016-02-04 13:56:49

Hi,

Can we change this code (from mpc85xx_ds.c)

if (of_flat_dt_is_compatible(root, "fsl,MPC8572DS-CAMP")) {
    mpic = mpic_alloc(NULL, 0,
        MPIC_NO_RESET |
        MPIC_BIG_ENDIAN |
        MPIC_SINGLE_DEST_CPU,
        0, 256, " OpenPIC  ");
} else {
    mpic = mpic_alloc(NULL, 0,
        MPIC_BIG_ENDIAN |
        MPIC_SINGLE_DEST_CPU,
        0, 256, " OpenPIC  ");
}

in this one

mpic = mpic_alloc(NULL, 0,
    MPIC_BIG_ENDIAN |
    MPIC_SINGLE_DEST_CPU,
    0, 256, " OpenPIC  ");

using "pic-no-reset" in the device tree?

Thanks!

Ciao,
Alessio

Re: Question about code which uses MPIC_NO_RESET on 85XX

From: Scott Wood <oss@buserror.net>
Date: 2016-02-16 21:40:26

On Thu, 2016-02-04 at 14:56 +0100, Alessio Igor Bogani wrote:
Hi,

Can we change this code (from mpc85xx_ds.c)

if (of_flat_dt_is_compatible(root, "fsl,MPC8572DS-CAMP")) {
    mpic = mpic_alloc(NULL, 0,
        MPIC_NO_RESET |
        MPIC_BIG_ENDIAN |
        MPIC_SINGLE_DEST_CPU,
        0, 256, " OpenPIC  ");
} else {
    mpic = mpic_alloc(NULL, 0,
        MPIC_BIG_ENDIAN |
        MPIC_SINGLE_DEST_CPU,
        0, 256, " OpenPIC  ");
}

in this one

mpic = mpic_alloc(NULL, 0,
    MPIC_BIG_ENDIAN |
    MPIC_SINGLE_DEST_CPU,
    0, 256, " OpenPIC  ");

using "pic-no-reset" in the device tree?
In theory that breaks existing device trees that don't specify pic-no-reset. 
 I'm not sure how much it matters in this case as it's primarily meant as an
example of how to do AMP rather than something that works out-of-the-box.

BTW, Kyle, it looks like there was a meaningful difference between
!MPIC_WANTS_RESET and MPIC_NO_RESET -- the former did not inhibit
initialization of non-protected vectors and was the behavior of fsl,MPC8572DS
-CAMP before your "powerpc/mpic: Remove duplicate MPIC_WANTS_RESET flag"
patch.  It's no longer possible to initialize all MPIC vectors except
protected ones.  Again, I'm not sure it matters much, but I'm also not sure
how much continued  value the protected-source code has.

-Scott
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help