public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Ducrot Bruno <ducrot-kk6yZipjEM5g9hUCZPvPmw@public.gmane.org>
To: "Li, Shaohua" <shaohua.li-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: "Sérgio Monteiro Basto"
	<sergiomb-hHo3WeeoaswVhHzd4jOs4w@public.gmane.org>,
	"Karol Kozimor" <sziwan-DETuoxkZsSqrDJvtcaxF/A@public.gmane.org>,
	acpi-devel
	<acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
Subject: Re: 2.6.0-test9 regression: panic on Fn+F7 hotkey
Date: Tue, 28 Oct 2003 14:57:46 +0100	[thread overview]
Message-ID: <20031028135746.GZ28351@poupinou.org> (raw)
In-Reply-To: <571ACEFD467F7749BC50E0A98C17CDD8D5FDC1-4yWAQGcml64gGBtAFL8yw7fspsVTdybXVpNB7YpNyf8@public.gmane.org>

On Tue, Oct 28, 2003 at 08:33:16PM +0800, Li, Shaohua wrote:
> 
> > -----Original Message-----
> > From: Ducrot Bruno [mailto:ducrot-kk6yZipjEM5g9hUCZPvPmw@public.gmane.org]
> > Sent: 2003??10??28?? 18:04
> > To: Li, Shaohua
> > Cc: Sérgio Monteiro Basto; Karol Kozimor; acpi-devel
> > Subject: Re: [ACPI] 2.6.0-test9 regression: panic on Fn+F7 hotkey
> > 
> > On Tue, Oct 28, 2003 at 04:14:56PM +0800, Li, Shaohua wrote:
> > > Hi,
> > >
> > > I missed non-ECDT situation. Try this one.
> > >
> > 
> > Please don't apply.  This is not OK.  You missed the
> > point that an interrupt handler can not sleep.  Anyway,
> > from my point-of-view, ec.c is not buggy, but
> > events/exviface.c::acpi_remove_.*().
> > 
> > IMHO, we should have our own acpi workqueue, at first, and
> > then wait for completion when removing any events handlers.
> > Those, the correct fix should be in osl.c, and in events/evxface.c
> > calling this wait for completition implemented in osl.c.
> 
>    yes, I know it's a bad idea to execute GPE query in interrupt handler. I do such thing is because this situation is rare. The interrupts seldom occur before EC device is initialized. 
> 
>    But even though acpi has own workqueue, When replace ECDT with EC, we still have a wrong context. 

Yes, there is still a little window where unlikely this may happens (that why
I think that should go in osl.c, because anyway this is more generic than
the EC problem, and have to be done in OS fashion).

> 
>    I think a better solution is when replace ECDT with EC, we can change the context in the event queue. Or we can use indirectly accessed context. Like this:
> 
> --- ec.c	2003-10-09 03:24:07.000000000 +0800
> +++ ec.c.new	2003-10-28 20:17:05.643232728 +0800
> @@ -93,7 +93,7 @@
>  
>  /* External interfaces use first EC only, so remember */
>  static struct acpi_device *first_ec;
> -
> +static struct acpi_device *ec_context = NULL;
>  /* --------------------------------------------------------------------------
>                               Transaction Management
>     -------------------------------------------------------------------------- */
> @@ -386,7 +386,7 @@
>  	void			*data)
>  {
>  	acpi_status		status = AE_OK;
> -	struct acpi_ec		*ec = (struct acpi_ec *) data;
> +	struct acpi_ec		*ec = ec_context;
>  
>  	if (!ec)
>  		return;

...

What happens if you have more than one EC?  Toshiba Satellite 190x
series have 2 EC IIRC, and only one will have an interrupt handler.

Cheers,

-- 
Ducrot Bruno

--  Which is worse:  ignorance or apathy?
--  Don't know.  Don't care.


-------------------------------------------------------
This SF.net email is sponsored by: The SF.net Donation Program.
Do you like what SourceForge.net is doing for the Open
Source Community?  Make a contribution, and help us add new
features and functionality. Click here: http://sourceforge.net/donate/

  parent reply	other threads:[~2003-10-28 13:57 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-28 12:33 2.6.0-test9 regression: panic on Fn+F7 hotkey Li, Shaohua
     [not found] ` <571ACEFD467F7749BC50E0A98C17CDD8D5FDC1-4yWAQGcml64gGBtAFL8yw7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2003-10-28 13:57   ` Ducrot Bruno [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-10-28 13:42 Li, Shaohua
     [not found] ` <571ACEFD467F7749BC50E0A98C17CDD8E84DAF-4yWAQGcml64gGBtAFL8yw7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2003-10-28 13:59   ` Ducrot Bruno
2003-10-28  8:14 Li, Shaohua
     [not found] ` <571ACEFD467F7749BC50E0A98C17CDD8D5FDBE-4yWAQGcml64gGBtAFL8yw7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2003-10-28 10:03   ` Ducrot Bruno
2003-10-28  2:30 Li, Shaohua
     [not found] ` <571ACEFD467F7749BC50E0A98C17CDD8E84DA8-4yWAQGcml64gGBtAFL8yw7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2003-10-28  6:22   ` Sérgio Monteiro Basto
2003-10-27 17:08 Karol Kozimor
     [not found] ` <20031027170800.GC11206-DETuoxkZsSqrDJvtcaxF/A@public.gmane.org>
2003-11-03  9:37   ` Luca Capello
     [not found]     ` <3FA621EC.5010000-wlebWZzHoyE@public.gmane.org>
2003-11-03 10:58       ` Nikolaus Filus
     [not found]         ` <20031103105802.GB909-u75qzGzWA6cb1SvskN2V4Q@public.gmane.org>
2003-11-03 11:10           ` Ducrot Bruno
2003-11-03 11:27           ` Luca Capello
     [not found]             ` <3FA63BB8.60503-wlebWZzHoyE@public.gmane.org>
2003-11-03 12:17               ` Karol Kozimor

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=20031028135746.GZ28351@poupinou.org \
    --to=ducrot-kk6yzipjem5g9huczpvpmw@public.gmane.org \
    --cc=acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --cc=sergiomb-hHo3WeeoaswVhHzd4jOs4w@public.gmane.org \
    --cc=shaohua.li-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=sziwan-DETuoxkZsSqrDJvtcaxF/A@public.gmane.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