From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-x242.google.com (mail-pa0-x242.google.com [IPv6:2607:f8b0:400e:c03::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3s2m0x5zDjzDqQD for ; Mon, 1 Aug 2016 14:04:01 +1000 (AEST) Received: by mail-pa0-x242.google.com with SMTP id q2so9110022pap.0 for ; Sun, 31 Jul 2016 21:04:01 -0700 (PDT) Date: Mon, 1 Aug 2016 14:03:51 +1000 From: Nicholas Piggin To: Andrey Smirnov Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Scott Wood , Alessio Igor Bogani , Paul Mackerras , Daniel Axtens Subject: Re: [PATCH v2 3/3] powerpc: Convert fsl_rstcr_restart to a reset handler Message-ID: <20160801140351.49119867@roar.ozlabs.ibm.com> In-Reply-To: <1469747238-17432-3-git-send-email-andrew.smirnov@gmail.com> References: <1469747238-17432-1-git-send-email-andrew.smirnov@gmail.com> <1469747238-17432-3-git-send-email-andrew.smirnov@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Thu, 28 Jul 2016 16:07:18 -0700 Andrey Smirnov wrote: > Convert fsl_rstcr_restart into a function to be registered with > register_reset_handler(). > > Signed-off-by: Andrey Smirnov > --- > > 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. 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? Thanks, Nick