All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Kevin D. Kissell" <kevink@mips.com>
To: Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
Cc: Ralf Baechle <ralf@linux-mips.org>,
	linux-mips <linux-mips@linux-mips.org>
Subject: Re: [PATCH 2.6.11-rc1] add local_irq_enable() to cpu_idle()
Date: Mon, 17 Jan 2005 17:59:38 +0100	[thread overview]
Message-ID: <41EBEEFA.6040701@mips.com> (raw)
In-Reply-To: <20050118014958.1d9e484e.yuasa@hh.iij4u.or.jp>

There have been times when having local_irq_enable() in my idle loop
would have prevented a hang in some of my experimental kernels, too,
but it's always been because I had screwed up somewhere else and
forgotten to re-enable interrupts.  Is there some good reason why
the kernel should end up in idle with interrupts turned off?

		Regards,

		Kevin K.

Yoichi Yuasa wrote:
> Hi Ralf,
> 
> We need to add local_irq_enable() to cpu_idle().
> Please add this patch to v2.6.
> 
> I don't have any information about R3081.
> I didn't fix r3081_wait().
> 
> Yoichi
> 
> Signed-off-by: Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
> 
> diff -urN -X dontdiff a-orig/arch/mips/kernel/cpu-probe.c a/arch/mips/kernel/cpu-probe.c
> --- a-orig/arch/mips/kernel/cpu-probe.c	Sun Oct 31 21:49:07 2004
> +++ a/arch/mips/kernel/cpu-probe.c	Tue Jan 18 00:26:12 2005
> @@ -42,10 +42,12 @@
>  {
>  	unsigned long cfg = read_c0_conf();
>  	write_c0_conf(cfg | TX39_CONF_HALT);
> +	local_irq_enable();
>  }
>  
>  static void r4k_wait(void)
>  {
> +	local_irq_enable();
>  	__asm__(".set\tmips3\n\t"
>  		"wait\n\t"
>  		".set\tmips0");
> @@ -61,6 +63,7 @@
>  
>  void au1k_wait(void)
>  {
> +	local_irq_enable();
>  #ifdef CONFIG_PM
>  	/* using the wait instruction makes CP0 counter unusable */
>  	__asm__(".set\tmips3\n\t"
> diff -urN -X dontdiff a-orig/arch/mips/kernel/process.c a/arch/mips/kernel/process.c
> --- a-orig/arch/mips/kernel/process.c	Sat Jan  8 23:19:16 2005
> +++ a/arch/mips/kernel/process.c	Mon Jan 17 21:43:08 2005
> @@ -58,6 +58,8 @@
>  		while (!need_resched())
>  			if (cpu_wait)
>  				(*cpu_wait)();
> +			else
> +				local_irq_enable();
>  		schedule();
>  	}
>  }
> 

  reply	other threads:[~2005-01-17 16:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-17 16:49 [PATCH 2.6.11-rc1] add local_irq_enable() to cpu_idle() Yoichi Yuasa
2005-01-17 16:59 ` Kevin D. Kissell [this message]
2005-01-17 21:31   ` Ralf Baechle
2005-01-18  2:11   ` Yoichi Yuasa
2005-01-19  2:43     ` Ralf Baechle

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=41EBEEFA.6040701@mips.com \
    --to=kevink@mips.com \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.org \
    --cc=yuasa@hh.iij4u.or.jp \
    /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.