All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexey Starikovskiy <astarikovskiy@suse.de>
To: Zhao Yakui <yakui.zhao@intel.com>
Cc: Carlos Corbacho <carlos@strangeworlds.co.uk>,
	linux-acpi@vger.kernel.org, Len Brown <len.brown@intel.com>,
	Len Brown <lenb@kernel.org>
Subject: Re: [PATCH 091/171] ACPI: GPE enabling should happen after EC	installation
Date: Wed, 30 Apr 2008 14:04:13 +0400	[thread overview]
Message-ID: <4818441D.2010800@suse.de> (raw)
In-Reply-To: <1209573782.16111.32.camel@yakui_zhao.sh.intel.com>

Zhao Yakui wrote:
> On Wed, 2008-04-30 at 08:17 +0100, Carlos Corbacho wrote:
>> On Wednesday 30 April 2008 07:58:53 Carlos Corbacho wrote:
>>> On Wednesday 30 April 2008 11:25:34 Zhao Yakui wrote:
>>>> On Tue, 2008-04-29 at 04:44 -0400, Len Brown wrote:
>>>>> From: Alexey Starikovskiy <astarikovskiy@suse.de>
>>>>>
>>>>> GPE could try to access EC region, so should not be enabled before
>>>>> EC is installed
>>>> It is caused by broken bios if GPE method tries to access EC region
>>>> before EC is initialized correctly. It is more appropriate to fix this
>>>> issue by upgrading bios rather than by the patch.
>>>> And this patch will cause some potential problems.
>>> 1) Does the BIOS in question work under Windows?
>> ^^^
>> that should be 'not work'
> For the laptop in bug 9916:
> Windows can work on the BIOS in question. In fact only warning message
> is printed for Linux and it won't break anything. (Maybe the warning
> message also exists on windows. But we can't see them.)
This is generally a stupid idea to enable interrupt before you have handler for it ready,
even if you are able to _survive_ unhandled interrupt.

Your other issue about WAKE GPEs, which could be wrongly enabled, could be solved by
moving WAKE GPE init closer to RUNTIME GPE one:

Regards,
Alex.



diff --git a/drivers/acpi/events/evgpeblk.c b/drivers/acpi/events/evgpeblk.c
index 361ebe6..37c68ae 100644
--- a/drivers/acpi/events/evgpeblk.c
+++ b/drivers/acpi/events/evgpeblk.c
@@ -940,6 +940,27 @@ acpi_ev_create_gpe_block(struct acpi_namespace_node *gpe_device,
 					acpi_ev_save_method_info, gpe_block,
 					NULL);
 
+	/*
+	 * Runtime option: Should wake GPEs be enabled at runtime?  The default
+	 * is no, they should only be enabled just as the machine goes to sleep.
+	 */
+	if (acpi_gbl_leave_wake_gpes_disabled) {
+		/*
+		 * Differentiate runtime vs wake GPEs, via the _PRW control methods.
+		 * Each GPE that has one or more _PRWs that reference it is by
+		 * definition a wake GPE and will not be enabled while the machine
+		 * is running.
+		 */
+		gpe_info.gpe_block = gpe_block;
+		gpe_info.gpe_device = gpe_device;
+
+		status =
+		    acpi_ns_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT,
+					   ACPI_UINT32_MAX, ACPI_NS_WALK_UNLOCK,
+					   acpi_ev_match_prw_and_gpe, &gpe_info,
+					   NULL);
+	}
+
 	/* Return the new block */
 
 	if (return_gpe_block) {
@@ -995,27 +1016,6 @@ acpi_ev_initialize_gpe_block(struct acpi_namespace_node *gpe_device,
 	}
 
 	/*
-	 * Runtime option: Should wake GPEs be enabled at runtime?  The default
-	 * is no, they should only be enabled just as the machine goes to sleep.
-	 */
-	if (acpi_gbl_leave_wake_gpes_disabled) {
-		/*
-		 * Differentiate runtime vs wake GPEs, via the _PRW control methods.
-		 * Each GPE that has one or more _PRWs that reference it is by
-		 * definition a wake GPE and will not be enabled while the machine
-		 * is running.
-		 */
-		gpe_info.gpe_block = gpe_block;
-		gpe_info.gpe_device = gpe_device;
-
-		status =
-		    acpi_ns_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT,
-					   ACPI_UINT32_MAX, ACPI_NS_WALK_UNLOCK,
-					   acpi_ev_match_prw_and_gpe, &gpe_info,
-					   NULL);
-	}
-
-	/*
 	 * Enable all GPEs in this block that have these attributes:
 	 * 1) are "runtime" or "run/wake" GPEs, and
 	 * 2) have a corresponding _Lxx or _Exx method


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

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-29  8:43 ACPI patches for 2.6.26 Len Brown
2008-04-29  8:43 ` [PATCH 001/171] ACPI: crosslink ACPI and "real" device nodes Len Brown
2008-04-29  8:43   ` [PATCH 002/171] ACPI: EC: Restore udelay in poll mode Len Brown
2008-04-29  8:43   ` [PATCH 003/171] ACPI: EC: Add poll timer Len Brown
2008-04-29  8:43   ` [PATCH 004/171] ACPI: EC: Improve debug output Len Brown
2008-04-29  8:43   ` [PATCH 005/171] ACPI: EC: Replace broken controller workarounds with poll mode Len Brown
2008-04-29  8:43   ` [PATCH 006/171] ACPI: EC: Switch off GPE mode during suspend/resume Len Brown
2008-04-29  8:43   ` [PATCH 007/171] ACPI: EC: Detect irq storm Len Brown
2008-04-29  8:43   ` [PATCH 008/171] ACPI: EC: Use default setup handler Len Brown
2008-04-29  8:44   ` [PATCH 009/171] ACPI: EC: Don't delete boot EC Len Brown
2008-04-29  8:44   ` [PATCH 010/171] ACPI : Disable the device's ability to wake the sleeping system in the boot phase Len Brown
2008-04-29  8:44   ` [PATCH 011/171] #if 0 acpi/bay.c:eject_removable_drive() Len Brown
2008-04-29  8:44   ` [PATCH 012/171] PM: Remove legacy PM Len Brown
2008-04-29  8:44   ` [PATCH 013/171] PM: arch/x86/kernel/apm_32.c: fix build warning Len Brown
2008-04-29  8:44   ` [PATCH 014/171] MIPS Alchemy: Crapectomy after removal of pm_send_all calls Len Brown
2008-04-29  8:44   ` [PATCH 085/171] eeepc-laptop: add base driver Len Brown
2008-04-29  8:44   ` [PATCH 086/171] eeepc-laptop: add backlight Len Brown
2008-04-29  8:44   ` [PATCH 087/171] eeepc-laptop: add hwmon fan control Len Brown
2008-04-29  8:44   ` [PATCH 088/171] eeepc-laptop: MAINTAINERS entry Len Brown
2008-04-29  8:44   ` [PATCH 089/171] ACPI: re-name acpi_pm_ops to acpi_suspend_ops Len Brown
2008-04-29  8:44   ` [PATCH 091/171] ACPI: GPE enabling should happen after EC installation Len Brown
2008-04-30 10:25     ` Zhao Yakui
2008-04-30  6:58       ` Carlos Corbacho
2008-04-30  7:17         ` Carlos Corbacho
2008-04-30 16:43           ` Zhao Yakui
2008-04-30 10:04             ` Alexey Starikovskiy [this message]
2008-05-04 10:28               ` Zhao Yakui
2008-05-04  6:40                 ` Alexey Starikovskiy
2008-05-04 16:22                   ` Zhao Yakui
2008-04-30 14:53         ` Henrique de Moraes Holschuh
2008-04-29  8:44   ` [PATCH 092/171] 2.6.25 regression: powertop says 120K wakeups/sec Len Brown
2008-04-29  8:44   ` [PATCH 093/171] flush kacpi_notify_wq before removing notify handler Len Brown
2008-04-29  8:44   ` [PATCH 094/171] thermal: add the support for building the generic thermal as a module Len Brown
2008-04-29  8:44   ` [PATCH 095/171] thermal: add new get_crit_temp callback Len Brown
2008-04-29  8:44   ` [PATCH 096/171] thermal: add hwmon sysfs I/F Len Brown
2008-04-29  8:44   ` [PATCH 097/171] thermal: update the documentation Len Brown
2008-04-29  8:44   ` [PATCH 098/171] ACPI: elide a non-zero test on a result that is never 0 Len Brown
2008-04-29  8:44   ` [PATCH 099/171] ACPI: update thermal temperature Len Brown
2008-04-29  8:44   ` [PATCH 100/171] thermal: re-name thermal.c to thermal_sys.c Len Brown
2008-04-29  8:44   ` [PATCH 156/171] ACPI: thinkpad-acpi: BIOS backlight mode helper (v2) Len Brown
2008-04-29  8:44   ` [PATCH 157/171] ACPI: thinkpad-acpi: warn once about weird hotkey masks Len Brown
2008-04-29  8:44   ` [PATCH 158/171] ACPI: thinkpad-acpi: enhance box identification output Len Brown
2008-04-29  8:44   ` [PATCH 159/171] ACPI: thinkpad-acpi: rate-limit CMOS/EC unsynced error messages Len Brown
2008-04-29  8:44   ` [PATCH 160/171] ACPI: thinkpad-acpi: fix brightness dimming control bug Len Brown
2008-04-29  8:44   ` [PATCH 161/171] ACPI: thinkpad-acpi: claim tpacpi as an official short handle Len Brown
2008-04-29  8:44   ` [PATCH 162/171] ACPI: thinkpad-acpi: prepare light and LED for sysfs support Len Brown
2008-04-29  8:44   ` [PATCH 163/171] ACPI: thinkpad-acpi: add sysfs led class support for thinklight (v3.1) Len Brown
2008-04-29  8:44   ` [PATCH 164/171] ACPI: thinkpad-acpi: add sysfs led class support to thinkpad leds (v3.1) Len Brown
2008-04-29  8:44   ` [PATCH 165/171] ACPI: thinkpad-acpi: fluff really minor fix Len Brown
2008-04-29  8:44   ` [PATCH 166/171] ACPI: thinkpad-acpi: use a private workqueue Len Brown
2008-04-29  8:44   ` [PATCH 167/171] ACPI: thinkpad-acpi: fix selects in Kconfig Len Brown
2008-04-29  8:44   ` [PATCH 168/171] ACPI: thinkpad-acpi: bump up version to 0.20 Len Brown
2008-04-29  8:44   ` [PATCH 170/171] ACPI: check a return value correctly in acpi_power_get_context() Len Brown
2008-04-29  8:44   ` [PATCH 171/171] thinkpad_acpi: fix possible NULL pointer dereference if kstrdup failed Len Brown

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=4818441D.2010800@suse.de \
    --to=astarikovskiy@suse.de \
    --cc=carlos@strangeworlds.co.uk \
    --cc=len.brown@intel.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=yakui.zhao@intel.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 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.