All of lore.kernel.org
 help / color / mirror / Atom feed
From: Neil Bird <neil@fnxweb.com>
To: linux-acpi@vger.kernel.org
Subject: sleeping function called from invalid context
Date: Mon, 11 Sep 2006 09:50:12 +0100	[thread overview]
Message-ID: <45052344.6040200@fnxweb.com> (raw)


   Not entirely sure this is the correct place for this, but Google didn't 
show up anything obviously better.


   I'm trying to add functionality to a kernel module which processes 
various input from Sony Vaio laptops (brightness and the Fn keys) by reading 
from ACPI.  This originally did the ACPI reads during a /proc entry read 
(user driven).

   I'm now trying to drive this read automatically by catching key press 
events and using that as a trigger.

   However, in the input event callback, and also (as another attempt) in a 
tasklet process/callback the necessary call 'acpi_evaluate_object()' fails 
with an error “sleeping function called from invalid context”.

   The kernel trace suggests this is something to do with a kmalloc() under 
a variant of the acpi read that involves having a 'relative ACPI path' (the 
string names of the registers (?) are 4-chars, not fully qualified†);  I'm 
afraid I forget the exact function called by acpi_evaluate_object() that's 
listed.


   Does anyone know the rules for when acpi_evaluate_object() can be called, 
or maybe suggest another way of getting the data?  (please bear in mind I 
know little of ACPI!).  I tried to determine the full path in case the call 
worked in that context;  it looked like it ought to be something like 
_SB.xxx.xxx.GBRT instead of GBRT, and I can find this sort of hierarchy 
under acpi under /sys but I *can't* find the actual fields I want (e.g., 
GBRT) listed, even though they work (I may well be mis-interpreting this 
/sys tree).

   This is on Fedora Core 5, kernel 2.6.17-1.2174_FC5.

-- 
[neil@fnx ~]# rm -f .signature
[neil@fnx ~]# ls -l .signature
ls: .signature: No such file or directory
[neil@fnx ~]# exit

-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

             reply	other threads:[~2006-09-11  8:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-11  8:50 Neil Bird [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-05-10  5:38 BUG: sleeping function called from invalid context Amit Virdi
2011-05-10  9:32 ` Alan Cox
2011-05-11  8:43   ` Amit Virdi
2011-05-11  8:43     ` Amit Virdi
2011-05-11  8:43     ` Amit Virdi
2003-09-09 15:03 Samuel Flory
2003-09-09 19:47 ` Matt Mackall
2003-09-09 20:10   ` Samuel Flory

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=45052344.6040200@fnxweb.com \
    --to=neil@fnxweb.com \
    --cc=linux-acpi@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 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.