mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Zwane Mwaikambo <zwane@arm.linux.org.uk>
To: Pierre Ossman <drzeus-list@drzeus.cx>
Cc: LKML <linux-kernel@vger.kernel.org>,
	cpufreq@lists.linux.org.uk, davej@codemonkey.org.uk
Subject: Re: sleeping function called from cpufreq
Date: Mon, 7 Nov 2005 00:57:23 -0800 (PST)	[thread overview]
Message-ID: <Pine.LNX.4.61.0511070051150.28199@montezuma.fsmlabs.com> (raw)
In-Reply-To: <436F1214.6000307@drzeus.cx>

On Mon, 7 Nov 2005, Pierre Ossman wrote:

> As of lately I've been getting tonnes of these:
> 
> [  610.185635] Debug: sleeping function called from invalid context at
> include/linux/rwsem.h:43
> [  610.185647] in_atomic():1, irqs_disabled():0
> [  610.185653]  [<c01041be>] dump_stack+0x1e/0x20
> [  610.185667]  [<c0119b62>] __might_sleep+0xa2/0xc0
> [  610.185678]  [<c029de86>] cpufreq_notify_transition+0x46/0x220
> [  610.185690]  [<e09d08fc>] centrino_target+0xfc/0x130 [speedstep_centrino]
> [  610.185708]  [<c029f17f>] __cpufreq_driver_target+0x5f/0x70
> [  610.185718]  [<c02a029d>] cpufreq_set+0x7d/0xa0
> [  610.185728]  [<c02a0339>] store_speed+0x49/0x50
> [  610.185737]  [<c029e6c6>] store+0x46/0x60
> [  610.185745]  [<c01a5f27>] flush_write_buffer+0x37/0x40
> [  610.185754]  [<c01a5f98>] sysfs_write_file+0x68/0x90
> [  610.185763]  [<c01639b8>] vfs_write+0xa8/0x190
> [  610.185773]  [<c0163b57>] sys_write+0x47/0x70
> [  610.185781]  [<c01032bb>] sysenter_past_esp+0x54/0x75
> 
> Ideas on solving it?

There is a fix for it in 2.6.14-mm1 but i think it also requires the 
following patch in order to link. I'm not actually advocating the hotplug 
in progress flag and would prefer using a previously posted 
preempt_disable/enable method.

--- linux-mm/include/linux/cpu.h.old	2005-11-06 22:08:39.000000000 -0500
+++ linux-mm/include/linux/cpu.h	2005-11-06 22:41:17.000000000 -0500
@@ -33,7 +33,6 @@
 
 extern int register_cpu(struct cpu *, int, struct node *);
 extern struct sys_device *get_cpu_sysdev(int cpu);
-extern int current_in_cpu_hotplug(void);
 #ifdef CONFIG_HOTPLUG_CPU
 extern void unregister_cpu(struct cpu *, struct node *);
 #endif
@@ -43,6 +42,7 @@
 /* Need to know about CPUs going up/down? */
 extern int register_cpu_notifier(struct notifier_block *nb);
 extern void unregister_cpu_notifier(struct notifier_block *nb);
+extern int current_in_cpu_hotplug(void);
 
 int cpu_up(unsigned int cpu);
 
@@ -55,6 +55,10 @@
 static inline void unregister_cpu_notifier(struct notifier_block *nb)
 {
 }
+static inline int current_in_cpu_hotplug(void)
+{
+	return 0;
+}
 
 #endif /* CONFIG_SMP */
 extern struct sysdev_class cpu_sysdev_class;

      reply	other threads:[~2005-11-07  8:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-07  8:36 Pierre Ossman
2005-11-07  8:57 ` Zwane Mwaikambo [this message]

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=Pine.LNX.4.61.0511070051150.28199@montezuma.fsmlabs.com \
    --to=zwane@arm.linux.org.uk \
    --cc=cpufreq@lists.linux.org.uk \
    --cc=davej@codemonkey.org.uk \
    --cc=drzeus-list@drzeus.cx \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®