From: Ralf Baechle <ralf@linux-mips.org>
To: Paul Burton <paul.burton@imgtec.com>
Cc: linux-mips@linux-mips.org
Subject: Re: [PATCH 4/5] MIPS: Malta: hang on halt
Date: Fri, 30 May 2014 18:50:52 +0200 [thread overview]
Message-ID: <20140530165052.GM17197@linux-mips.org> (raw)
In-Reply-To: <1399461660-17623-5-git-send-email-paul.burton@imgtec.com>
On Wed, May 07, 2014 at 12:20:59PM +0100, Paul Burton wrote:
> When the system is halted it makes little sense to reset it. Instead,
> hang by executing an infinite loop.
>
> Suggested-by: Maciej W. Rozycki <macro@linux-mips.org>
> Signed-off-by: Paul Burton <paul.burton@imgtec.com>
> ---
> arch/mips/mti-malta/malta-reset.c | 11 +++++++----
> 1 file changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/arch/mips/mti-malta/malta-reset.c b/arch/mips/mti-malta/malta-reset.c
> index d627d4b..4471dea 100644
> --- a/arch/mips/mti-malta/malta-reset.c
> +++ b/arch/mips/mti-malta/malta-reset.c
> @@ -24,17 +24,20 @@ static void mips_machine_restart(char *command)
>
> static void mips_machine_halt(void)
> {
> - unsigned int __iomem *softres_reg =
> - ioremap(SOFTRES_REG, sizeof(unsigned int));
> + pr_info("Halting\n");
> + while (true);
> +}
I don't think this should print anything - communication with the user
is up to userland.
while (true) is going to burn lots of power - undesirable on a virtualized
system in particular. How about something like while (cpu_wait()); instead?
The invocation of cpu_wait() is a little tricky however in this case I think
it's ok if the CPU goes terminally goes to sleep which simplifies things
over the idle loop :-)
Ralf
next prev parent reply other threads:[~2014-05-30 16:50 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-07 11:20 [PATCH 0/5] MIPS Malta halt & power off Paul Burton
2014-05-07 11:20 ` Paul Burton
2014-05-07 11:20 ` [PATCH 1/5] MIPS: define some more PIIX4 registers & values Paul Burton
2014-05-07 11:20 ` Paul Burton
2014-05-07 11:20 ` [PATCH 2/5] MIPS: Malta: add suspend state entry code Paul Burton
2014-05-07 11:20 ` Paul Burton
2014-05-07 11:20 ` [PATCH 3/5] MIPS: Malta: let PIIX4 respond to PCI special cycles Paul Burton
2014-05-07 11:20 ` Paul Burton
2014-05-07 11:20 ` [PATCH 4/5] MIPS: Malta: hang on halt Paul Burton
2014-05-07 11:20 ` Paul Burton
2014-05-30 16:50 ` Ralf Baechle [this message]
2014-05-07 11:22 ` [PATCH v2 5/5] MIPS: Malta: support powering down Paul Burton
2014-05-07 11:22 ` Paul Burton
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=20140530165052.GM17197@linux-mips.org \
--to=ralf@linux-mips.org \
--cc=linux-mips@linux-mips.org \
--cc=paul.burton@imgtec.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.