mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Ingo Molnar <mingo@elte.hu>
Cc: Jiri Kosina <jkosina@suse.cz>, "Rafael J. Wysocki" <rjw@sisk.pl>,
	Andi Kleen <andi@firstfloor.org>,
	Zdenek Kabelac <zdenek.kabelac@gmail.com>,
	Kernel development list <linux-kernel@vger.kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: Re: BUG: using smp_processor_id() during suspend with 2.6.25-rc8
Date: Fri, 11 Apr 2008 12:54:45 +0200	[thread overview]
Message-ID: <20080411105445.GB18770@elf.ucw.cz> (raw)
In-Reply-To: <20080411105108.GA1844@elte.hu>

On Fri 2008-04-11 12:51:09, Ingo Molnar wrote:
> 
> * Pavel Machek <pavel@ucw.cz> wrote:
> 
> > diff --git a/lib/smp_processor_id.c b/lib/smp_processor_id.c
> > index 6c90fb9..8195c37 100644
> > --- a/lib/smp_processor_id.c
> > +++ b/lib/smp_processor_id.c
> > @@ -35,6 +35,13 @@ unsigned int debug_smp_processor_id(void
> >  		goto out;
> >  
> >  	/*
> > +	 * It is valid to assume CPU-locality if there's just one
> > +	 * CPU active
> > +	 */
> > +	if (num_online_cpus() == 1)
> > +		goto out;
> 
> thanks Pavel, i picked this up into sched-devel.git - it makes sense 
> independently of whether it solves the warning.

Thanks!

(I just want to fix the underlying problem in suspend, too. I guess
I'll just do something like

diff --git a/drivers/base/sys.c b/drivers/base/sys.c
index 8e13fd9..adb7850 100644
--- a/drivers/base/sys.c
+++ b/drivers/base/sys.c
@@ -367,6 +367,7 @@ int sysdev_suspend(pm_message_t state)
 			/* Call auxillary drivers first */
 			list_for_each_entry(drv, &cls->drivers, entry) {
 				if (drv->suspend) {
+					BUG_ON(!in_interrupt());
 					ret = drv->suspend(sysdev, state);
 					if (ret)
 						goto aux_driver;
@@ -442,6 +443,7 @@ int sysdev_resume(void)
 		list_for_each_entry(sysdev, &cls->kset.list, kobj.entry) {
 			pr_debug(" %s\n", kobject_name(&sysdev->kobj));
 
+			BUG_ON(!in_interrupt());
 			__sysdev_resume(sysdev);
 		}
 	}

...to catch this kind of problems early).
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

  reply	other threads:[~2008-04-11 10:54 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-07 13:25 Zdenek Kabelac
2008-04-07 21:54 ` Jiri Kosina
2008-04-07 22:02   ` Andi Kleen
2008-04-07 22:04     ` Jiri Kosina
2008-04-07 22:12       ` Andi Kleen
2008-04-07 22:11         ` Jiri Kosina
2008-04-07 22:14           ` Jiri Kosina
2008-04-07 22:23           ` Andi Kleen
2008-04-07 22:29             ` Rafael J. Wysocki
2008-04-07 22:33               ` Jiri Kosina
2008-04-07 22:53                 ` Zdenek Kabelac
2008-04-07 23:10                   ` Rafael J. Wysocki
2008-04-08  8:09                   ` Jiri Kosina
2008-04-10 11:16                     ` Zdenek Kabelac
2008-04-07 22:56                 ` Rafael J. Wysocki
2008-04-10  9:45                 ` Pavel Machek
2008-04-10 23:25                   ` Jiri Kosina
2008-04-11 10:49                     ` Pavel Machek
2008-04-11 10:51                       ` Ingo Molnar
2008-04-11 10:54                         ` Pavel Machek [this message]
2008-04-11 11:09                           ` Ingo Molnar
2008-04-12  9:51                             ` Pavel Machek
2008-04-11 15:29                           ` Rafael J. Wysocki
2008-04-11 11:37                         ` Andi Kleen
2008-04-11 15:27                           ` Rafael J. Wysocki
2008-04-07 22:35               ` Andi Kleen
2008-04-07 22:54                 ` Rafael J. Wysocki
2008-04-11 10:25   ` Ingo Molnar
2008-04-11 10:34     ` Jiri Kosina
2008-04-11 10:40       ` Ingo Molnar
2008-04-11 10:39     ` Andi Kleen

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=20080411105445.GB18770@elf.ucw.cz \
    --to=pavel@ucw.cz \
    --cc=andi@firstfloor.org \
    --cc=jkosina@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rjw@sisk.pl \
    --cc=tglx@linutronix.de \
    --cc=zdenek.kabelac@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®