linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nicholas Piggin <npiggin@gmail.com>
To: Andrey Smirnov <andrew.smirnov@gmail.com>
Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
	Scott Wood <oss@buserror.net>,
	Alessio Igor Bogani <alessio.bogani@elettra.eu>,
	Paul Mackerras <paulus@samba.org>, Daniel Axtens <dja@axtens.net>
Subject: Re: [PATCH v2 3/3] powerpc: Convert fsl_rstcr_restart to a reset handler
Date: Wed, 10 Aug 2016 10:58:43 +1000	[thread overview]
Message-ID: <20160810105843.0941fecb@roar.ozlabs.ibm.com> (raw)
In-Reply-To: <CAHQ1cqFCfS52zaGEPJU-KRTRc7rjnFmUQwQgZYms3jaaYb41bQ@mail.gmail.com>

On Tue, 9 Aug 2016 11:47:37 -0700
Andrey Smirnov <andrew.smirnov@gmail.com> wrote:

> On Sun, Jul 31, 2016 at 9:03 PM, Nicholas Piggin <npiggin@gmail.com> wrote:
> > On Thu, 28 Jul 2016 16:07:18 -0700
> > Andrey Smirnov <andrew.smirnov@gmail.com> wrote:
> >  
> >> Convert fsl_rstcr_restart into a function to be registered with
> >> register_reset_handler().
> >>
> >> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
> >> ---
> >>
> >> Changes since v1:
> >>
> >>       - fsl_rstcr_restart is registered as a reset handler in
> >>           setup_rstcr, replacing per-board arch_initcall approach  
> >
> > Bear in mind I don't know much about the embedded or platform code!
> >
> > The documentation for reset notifiers says that they are expected
> > to be registered from drivers, not arch code. That seems to only be
> > intended to mean that the standard ISA or platform reset would
> > normally be handled directly by the arch, whereas if you have an
> > arch specific driver for a reset hardware that just happens to live
> > under arch/, then fsl_rstcr_restart / mpc85xx_cds_restart would be
> > valid use of reset notifier.  
> 
> Yeah, IMHO there's quite a bit of code in sysdev/ which in ideal world
> would go into drivers/ and I think fsl_rstcr_restart is among it
> (similar example on MIPS is drivers/power/reset/brcmstb-reboot.c).
> 
> >
> > So this change seems reasonable to me. One small question:
> >
> >  
> >> +static int mpc85xx_cds_restart_register(void)
> >> +{
> >> +     static struct notifier_block restart_handler;
> >> +
> >> +     restart_handler.notifier_call = mpc85xx_cds_restart;
> >> +     restart_handler.priority = 192;  
> >
> > Should there be a header with #define's for these priorities?  
> 
> I don't have any strong preference either way, I do however think that
> introducing such #define should go into a separate patch-set, since
> you'd probably want to propagate that change across all of the users
> of the API.

You're probably right. I was thinking because powerpc has not used it
before we could use local defines, but it really does need a global
location.

Thanks,
Nick

  reply	other threads:[~2016-08-10  0:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-28 23:07 [PATCH v2 1/3] powerpc: Factor out common code in setup-common.c Andrey Smirnov
2016-07-28 23:07 ` [PATCH v2 2/3] powerpc: Call chained reset handlers during reset Andrey Smirnov
2016-08-01  3:47   ` Nicholas Piggin
2016-08-09 18:27     ` Andrey Smirnov
2016-07-28 23:07 ` [PATCH v2 3/3] powerpc: Convert fsl_rstcr_restart to a reset handler Andrey Smirnov
2016-08-01  4:03   ` Nicholas Piggin
2016-08-09 18:47     ` Andrey Smirnov
2016-08-10  0:58       ` Nicholas Piggin [this message]
2016-08-01  3:40 ` [PATCH v2 1/3] powerpc: Factor out common code in setup-common.c Nicholas Piggin
2016-08-09 16:30   ` Andrey Smirnov
2016-08-10  0:54     ` Nicholas Piggin

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=20160810105843.0941fecb@roar.ozlabs.ibm.com \
    --to=npiggin@gmail.com \
    --cc=alessio.bogani@elettra.eu \
    --cc=andrew.smirnov@gmail.com \
    --cc=dja@axtens.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=oss@buserror.net \
    --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).