From: Domenico Andreoli <cavokz@gmail.com>
To: Vineet Gupta <Vineet.Gupta1@synopsys.com>
Cc: Domenico Andreoli <domenico.andreoli@linux.com>,
linux-arch@vger.kernel.org, Russell King <linux@arm.linux.org.uk>,
Arnd Bergmann <arnd@arndb.de>, Ralf Baechle <ralf@linux-mips.org>,
linux-mips@linux-mips.org, Olof Johansson <olof@lixom.net>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 04/11] MIPS: use the common machine reset handling
Date: Fri, 1 Nov 2013 06:26:14 +0100 [thread overview]
Message-ID: <20131101052614.GB28233@glitch> (raw)
In-Reply-To: <5273381A.9020103@synopsys.com>
On Fri, Nov 01, 2013 at 10:41:54AM +0530, Vineet Gupta wrote:
> On 10/31/2013 11:57 AM, Domenico Andreoli wrote:
> > From: Domenico Andreoli <domenico.andreoli@linux.com>
> >
> > Proof of concept: MIPS as a consumer of the machine reset hooks.
> >
> > Cc: Ralf Baechle <ralf@linux-mips.org>
> > Cc: linux-arch@vger.kernel.org
> > Cc: linux-mips@vger.kernel.org
> > Signed-off-by: Domenico Andreoli <domenico.andreoli@linux.com>
> > ---
> > arch/mips/kernel/reset.c | 7 +++++++
> > kernel/power/Kconfig | 2 +-
> > 2 files changed, 8 insertions(+), 1 deletion(-)
> >
> > Index: b/arch/mips/kernel/reset.c
> > ===================================================================
> > --- a/arch/mips/kernel/reset.c
> > +++ b/arch/mips/kernel/reset.c
> > @@ -11,6 +11,7 @@
> > #include <linux/pm.h>
> > #include <linux/types.h>
> > #include <linux/reboot.h>
> > +#include <linux/machine_reset.h>
> >
> > #include <asm/reboot.h>
> >
> > @@ -29,16 +30,22 @@ void machine_restart(char *command)
> > {
> > if (_machine_restart)
> > _machine_restart(command);
> > + else
> > + default_restart(reboot_mode, command);
> > }
> >
> > void machine_halt(void)
> > {
> > if (_machine_halt)
> > _machine_halt();
> > + else
> > + default_halt();
> > }
> >
> > void machine_power_off(void)
> > {
> > if (pm_power_off)
> > pm_power_off();
> > + else
> > + default_power_off();
> > }
> > Index: b/kernel/power/Kconfig
> > ===================================================================
> > --- a/kernel/power/Kconfig
> > +++ b/kernel/power/Kconfig
> > @@ -297,4 +297,4 @@ config CPU_PM
> > config MACHINE_RESET
> > bool
> > default n
> > - depends on ARM || ARM64
> > + depends on ARM || ARM64 || MIPS
>
> This particular idiom is frowned upon for new code. As new arches get added this
> list keeps getting bigger and then those who don't need the feature need to add
> the anti dependency. Also in this particular case the dependency is trivial so you
> can just "select" it in arch/*/Kconfig
this dependency guarantees only that the option is available only on the
supported arches.
anyway I've not a strong opinion, I only picked the least invasive solution
I was able to think.
thanks,
Domenico
next prev parent reply other threads:[~2013-11-01 5:26 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-31 6:27 [PATCH 00/11] RFC: Common machine reset handling Domenico Andreoli
2013-10-31 6:27 ` [PATCH 01/11] machine-reset: platform generic handling Domenico Andreoli
2013-10-31 6:27 ` [PATCH 02/11] ARM: use the common machine reset handling Domenico Andreoli
2013-10-31 6:27 ` [PATCH 03/11] ARM64: " Domenico Andreoli
2013-10-31 6:27 ` [PATCH 04/11] MIPS: " Domenico Andreoli
2013-11-01 5:11 ` Vineet Gupta
2013-11-01 5:26 ` Domenico Andreoli [this message]
2013-10-31 6:27 ` [PATCH 05/11] ARM: vexpress: consolidate machine reset func Domenico Andreoli
2013-10-31 6:27 ` [PATCH 06/11] ARM: vexpress: use the common machine reset handling Domenico Andreoli
2013-10-31 6:27 ` [PATCH 07/11] ARM: bcm2835: " Domenico Andreoli
2013-10-31 6:27 ` [PATCH 08/11] ARM: u300: " Domenico Andreoli
2013-10-31 14:40 ` Linus Walleij
2013-10-31 15:19 ` Domenico Andreoli
2013-10-31 6:27 ` [PATCH 09/11] ARM: tps65910: " Domenico Andreoli
2013-10-31 6:27 ` [PATCH 10/11] max8907: " Domenico Andreoli
2013-10-31 6:27 ` [PATCH 11/11] ARM: sp805: " Domenico Andreoli
2013-10-31 10:21 ` [PATCH 00/11] RFC: Common " Russell King - ARM Linux
2013-10-31 21:49 ` Stephen Warren
2013-11-01 5:16 ` Domenico Andreoli
2013-11-01 15:58 ` Stephen Warren
2013-11-01 16:12 ` Russell King - ARM Linux
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=20131101052614.GB28233@glitch \
--to=cavokz@gmail.com \
--cc=Vineet.Gupta1@synopsys.com \
--cc=arnd@arndb.de \
--cc=domenico.andreoli@linux.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-mips@linux-mips.org \
--cc=linux@arm.linux.org.uk \
--cc=olof@lixom.net \
--cc=ralf@linux-mips.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).