public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: "Maciej Rutecki" <maciej.rutecki@gmail.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	"Rafael J. Wysocki" <rjw@sisk.pl>,
	"lenb@kernel.org" <lenb@kernel.org>,
	linux-acpi@vger.kernel.org
Subject: Re: [Linux 2.6.28-rc4] BUG: using smp_processor_id() in preemptible [00000000] code: suspend_to_disk/2934
Date: Wed, 12 Nov 2008 21:34:54 +0100	[thread overview]
Message-ID: <8db1092f0811121234p3be15e29n5fd684e387977dab@mail.gmail.com> (raw)
In-Reply-To: <20081112192128.GA17667@elte.hu>

2008/11/12 Ingo Molnar <mingo@elte.hu>:

>
> i've queued up the fix below in tip/sched/urgent - Maciej, could you
> please test it? I've build and boot tested it.
>

Suspend to disk works OK now. Thanks.

Tested-by: Maciej Rutecki <maciej.rutecki@gmail.com>
>
> Reported-by: Maciej Rutecki <maciej.rutecki@gmail.com>
> Signed-off-by: Ingo Molnar <mingo@elte.hu>
> ---
>  kernel/sched.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/kernel/sched.c b/kernel/sched.c
> index 3bafbe3..c94baf2 100644
> --- a/kernel/sched.c
> +++ b/kernel/sched.c
> @@ -5870,6 +5870,8 @@ void __cpuinit init_idle(struct task_struct *idle, int cpu)
>        struct rq *rq = cpu_rq(cpu);
>        unsigned long flags;
>
> +       spin_lock_irqsave(&rq->lock, flags);
> +
>        __sched_fork(idle);
>        idle->se.exec_start = sched_clock();
>
> @@ -5877,7 +5879,6 @@ void __cpuinit init_idle(struct task_struct *idle, int cpu)
>        idle->cpus_allowed = cpumask_of_cpu(cpu);
>        __set_task_cpu(idle, cpu);
>
> -       spin_lock_irqsave(&rq->lock, flags);
>        rq->curr = rq->idle = idle;
>  #if defined(CONFIG_SMP) && defined(__ARCH_WANT_UNLOCKED_CTXSW)
>        idle->oncpu = 1;
>
>

Regards
-- 
Maciej Rutecki
http://www.maciek.unixy.pl

  reply	other threads:[~2008-11-12 20:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-12 18:30 [Linux 2.6.28-rc4] BUG: using smp_processor_id() in preemptible [00000000] code: suspend_to_disk/2934 Maciej Rutecki
2008-11-12 18:56 ` Linus Torvalds
2008-11-12 19:21   ` Ingo Molnar
2008-11-12 20:34     ` Maciej Rutecki [this message]
2008-11-12 20:40       ` Ingo Molnar

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=8db1092f0811121234p3be15e29n5fd684e387977dab@mail.gmail.com \
    --to=maciej.rutecki@gmail.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rjw@sisk.pl \
    --cc=torvalds@linux-foundation.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