All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/8] PCI run-time PM support (rev. 4)
@ 2010-02-17 22:35 Rafael J. Wysocki
  2010-02-17 22:36 ` [PATCH 1/8] PCI PM: Add function for checking PME status of devices Rafael J. Wysocki
                   ` (14 more replies)
  0 siblings, 15 replies; 48+ messages in thread
From: Rafael J. Wysocki @ 2010-02-17 22:35 UTC (permalink / raw)
  To: Jesse Barnes, Moore, Robert, Len Brown
  Cc: ACPI Devel Maling List, pm list, Linux PCI, Shaohua Li,
	Bjorn Helgaas, Oliver Neukum, Matthew Garrett, LKML, Gary Hade

Hi,

The following (updated) series of patches provides basic run-time power
management support for PCI devices through ACPI and/or the native PCIe
PME.

Patches [1/8] and [3/8] are unchanged, the other patches have been modified to
address the reviewers' comments and/or to fix reported bugs.

[1/8] - Add function for checking PME status of devices

[2/8][Updated] - PCIe PME root port service driver

[3/8] - "Don't use MSIs for PME signaling" switch for PCIe
 
[4/8][New] - ACPI GPE refcounting, based on 3 patches from Matthew Garrett
 
[5/8][Updated] - ACPI, add fields for handling run-wake devices

[6/8][New] - ACPI, make it possible to use more than 1 notify handler per node

[7/8][Updated] - PCI / ACPI platform support for run-time power management

[8/8] - Runtime PM callbacks for the PCI bus type

Bob, Len, patches [4/8] and [6/8] are vitally important for this feature, but
they cannot be merged without your approval.  Please let me know if you have
any objections to these patches.

Thanks,
Rafael

^ permalink raw reply	[flat|nested] 48+ messages in thread
* Re: [PATCH 4/8] ACPI: Use GPE reference counting to support shared GPEs
@ 2010-02-19 21:23 Moore, Robert
  2010-02-19 23:14 ` Rafael J. Wysocki
                   ` (2 more replies)
  0 siblings, 3 replies; 48+ messages in thread
From: Moore, Robert @ 2010-02-19 21:23 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: Matthew Garrett, linux-acpi, Lin, Ming M, Brown, Len


Here's some comments and questions on the GPE changes in ACPICA.
Overall, looks good.
Bob



Acpi_set_gpe - looks ok

Acpi_enable_gpe

+	if (type & ACPI_GPE_TYPE_RUNTIME) {
+		if (++gpe_event_info->runtime_count == 1)
+			status = acpi_ev_enable_gpe(gpe_event_info, TRUE);
 
+		if (ACPI_FAILURE(status))
+			gpe_event_info->runtime_count--;
+	}

I would think the status check should be grouped like this:

+	if (type & ACPI_GPE_TYPE_RUNTIME) {
+		if (++gpe_event_info->runtime_count == 1) {
+			status = acpi_ev_enable_gpe(gpe_event_info, TRUE);
 
+		      if (ACPI_FAILURE(status))
+			      gpe_event_info->runtime_count--;
+           }
+	}


Acpi_disable_gpe

+			acpi_ev_disable_gpe(gpe_event_info);

There is a status returned by this function, should get it.

Should do a switch(type) and handle the bad type case.


+++ linux-2.6/drivers/acpi/ec.c
+		acpi_set_gpe(NULL, ec->gpe, ACPI_GPE_DISABLE);
+		acpi_set_gpe(NULL, ec->gpe, ACPI_GPE_ENABLE);

Think you should have some comments here as to why exactly the code is
Forcing a H/W disable/enable (in all places these functions are used)


acpi_ev_update_gpe_enable_masks.

My understanding is that this function changes to update the masks based upon the reference counters, instead of an input parameter.



acpi_ev_enable_gpe:

1) I think we may not need the "write_to_hardware" parameter anymore. The calls to ev_enable_gpe that use FALSE for this parameter look like they could be simply replaced with a call to acpi_ev_update_gpe_enable_masks.

2) The GPE is only enabled if the runtime_count is non-zero. Would there ever be a situation where we might want to enable a GPE when the runtime_count is zero?


acpi_ev_disable_gpe: OK, just removing the obsolete flags


acpi_ev_save_method_info:

Default is still "runtime" gpe, unless _PRW is found later and then ACPI_GPE_CAN_WAKE is set, correct?


acpi_ev_initialize_gpe_block:

Probably should still get the status from WalkNamespace and emit an ACPI_ERROR if this fails, since this would probably be a serious error if we could not get the _PRW methods.


acpi_ev_initialize_gpe_block:

I wonder if we still need Boolean acpi_gbl_leave_wake_gpes_disabled.

Why remove call to acpi_hw_enable_runtime_gpe_block? It is much more efficient to do entire registers at once instead of repeatedly calling ev_enable_gpe.



+++ linux-2.6/include/acpi/actypes.h

#define ACPI_GPE_TYPE_WAKE_RUN          (u8) 0x06
 #define ACPI_GPE_TYPE_WAKE              (u8) 0x02
 #define ACPI_GPE_TYPE_RUNTIME           (u8) 0x04	/* Default */

These are obsolete and can be removed, yes?



^ permalink raw reply	[flat|nested] 48+ messages in thread

end of thread, other threads:[~2010-02-25 19:55 UTC | newest]

Thread overview: 48+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-17 22:35 [PATCH 0/8] PCI run-time PM support (rev. 4) Rafael J. Wysocki
2010-02-17 22:36 ` [PATCH 1/8] PCI PM: Add function for checking PME status of devices Rafael J. Wysocki
2010-02-23  0:21   ` Jesse Barnes
2010-02-23  0:21   ` Jesse Barnes
2010-02-23 19:56     ` Rafael J. Wysocki
2010-02-23 19:56     ` Rafael J. Wysocki
2010-02-17 22:36 ` Rafael J. Wysocki
2010-02-17 22:39 ` [PATCH 2/8] PCI PM: PCIe PME root port service driver (rev. 5) Rafael J. Wysocki
2010-02-17 22:39   ` Rafael J. Wysocki
2010-02-18  4:08   ` Kenji Kaneshige
2010-02-18  4:08   ` Kenji Kaneshige
2010-02-18 19:57     ` Rafael J. Wysocki
2010-02-18 19:57     ` Rafael J. Wysocki
2010-02-19  2:07       ` Kenji Kaneshige
2010-02-19  2:07       ` Kenji Kaneshige
2010-02-17 22:40 ` [PATCH 3/8] PCI PM: Make it possible to force using INTx for PCIe PME signaling Rafael J. Wysocki
2010-02-17 22:40 ` Rafael J. Wysocki
2010-02-17 22:41 ` [PATCH 4/8] ACPI: Use GPE reference counting to support shared GPEs Rafael J. Wysocki
2010-02-18  7:05   ` Jin Dongming
2010-02-18 20:01     ` Rafael J. Wysocki
2010-02-18 20:01     ` Rafael J. Wysocki
2010-02-19  7:24       ` Jin Dongming
2010-02-19 21:08         ` Rafael J. Wysocki
2010-02-19 21:08         ` Rafael J. Wysocki
2010-02-19  7:24       ` Jin Dongming
2010-02-18  7:05   ` Jin Dongming
2010-02-17 22:41 ` Rafael J. Wysocki
2010-02-17 22:41 ` [PATCH 5/8] ACPI / PM: Add more run-time wake-up fields (rev. 2) Rafael J. Wysocki
2010-02-17 22:41 ` Rafael J. Wysocki
2010-02-17 22:42 ` [PATCH 6/8] ACPI / ACPICA: Multiple system notify handlers per device Rafael J. Wysocki
2010-02-17 22:42 ` Rafael J. Wysocki
2010-02-17 22:44 ` [PATCH 7/8] PCI / ACPI / PM: Platform support for PCI PME wake-up (rev. 9) Rafael J. Wysocki
2010-02-17 22:44 ` Rafael J. Wysocki
2010-02-17 22:44 ` [PATCH 8/8] PCI PM: Run-time callbacks for PCI bus type (rev. 2) Rafael J. Wysocki
2010-02-17 22:44 ` Rafael J. Wysocki
2010-02-19 21:23 [PATCH 4/8] ACPI: Use GPE reference counting to support shared GPEs Moore, Robert
2010-02-19 23:14 ` Rafael J. Wysocki
2010-02-24 22:05   ` Moore, Robert
2010-02-25 15:14   ` Alexey Starikovskiy
2010-02-25 19:56     ` Rafael J. Wysocki
2010-02-19 23:18 ` Rafael J. Wysocki
2010-02-19 23:18 ` Rafael J. Wysocki
2010-02-23  0:26   ` Jesse Barnes
2010-02-23 23:52     ` Rafael J. Wysocki
2010-02-23 23:52     ` Rafael J. Wysocki
2010-02-24 22:26       ` Jesse Barnes
2010-02-24 22:26       ` Jesse Barnes
2010-02-23  0:26   ` Jesse Barnes

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.