From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Gary Hade <garyhade@us.ibm.com>
Cc: linux-pm@lists.linux-foundation.org,
Linux PCI <linux-pci@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
Jesse Barnes <jbarnes@virtuousgeek.org>,
"Moore, Robert" <robert.moore@intel.com>,
Matthew Garrett <mjg@redhat.com>,
Bjorn Helgaas <bjorn.helgaas@hp.com>
Subject: Re: [PATCH 8/9] PCI / ACPI / PM: Platform support for PCI PME wake-up (rev. 7)
Date: Thu, 11 Feb 2010 14:27:17 +0100 [thread overview]
Message-ID: <201002111427.17275.rjw@sisk.pl> (raw)
In-Reply-To: <20100211020706.GA28372@us.ibm.com>
On Thursday 11 February 2010, Gary Hade wrote:
> On Thu, Feb 11, 2010 at 01:56:54AM +0100, Rafael J. Wysocki wrote:
> > On Thursday 11 February 2010, Rafael J. Wysocki wrote:
> > > On Thursday 11 February 2010, Gary Hade wrote:
> > > > On Wed, Feb 10, 2010 at 11:58:00PM +0100, Rafael J. Wysocki wrote:
> > > > > On Wednesday 10 February 2010, Gary Hade wrote:
> > > ...
> > > > > > Yes, 6/9 also appeared to be the most likely suspect to me and
> > > > > > I was already doing what you asked except in the opposite order.
> > > > > > With 1/9 through 6/9 both the hot-add and hot-remove issues still
> > > > > > reproduced. After removing 6/9 both issues disappeared.
> > > > >
> > > > > Thanks for verifying, I've already started to look for bugs in it.
> > > >
> > > > Thanks!
> > > >
> > > > >
> > > > > What's your kernel command line, BTW?
> > > >
> > > > root=/dev/disk/by-id/scsi-35000c5000036ffcb-part7 ip=9.47.66.9:9.47.67.50:9.47.66.1:255.255.254.0 resume=/dev/disk/by-id/scsi-35000c50000370247-part3 crashkernel=256M-:128M console=tty0 console=ttyS0,115200 pci=use_crs pci=norom
> > >
> > > Thanks. We found a bug in the patch, but it would require you to use a
> > > specific command line switch to trigger, which you don't use.
> > >
> > > I'll let you know if I have anything to test.
> >
> > OK, please try the patch below on top of [1-6/9].
>
> Sorry, it didn't help. The hot-add and hot-remove behaviors
> still look the same.
Thanks for testing.
Well, this time I found another real bug, which is that we should add
gpe_block->block_base_number to the GPE index within the block in order to
compute the GPE number. If there are GPE devices other than the FADT ones in
your system, that may explain the symptoms.
Please try the patch below (on top of [1-6/9]). In case it doesn't help, please
look for "Failed to ebable GPE" messages in dmesg and let me know if there are
any.
Rafael
---
drivers/acpi/acpica/evgpeblk.c | 36 ++++++++++++++++++++++--------------
1 file changed, 22 insertions(+), 14 deletions(-)
Index: linux-2.6/drivers/acpi/acpica/evgpeblk.c
===================================================================
--- linux-2.6.orig/drivers/acpi/acpica/evgpeblk.c
+++ linux-2.6/drivers/acpi/acpica/evgpeblk.c
@@ -258,7 +258,6 @@ acpi_ev_save_method_info(acpi_handle obj
u32 gpe_number;
char name[ACPI_NAME_SIZE + 1];
u8 type;
- acpi_status status;
ACPI_FUNCTION_TRACE(ev_save_method_info);
@@ -338,7 +337,7 @@ acpi_ev_save_method_info(acpi_handle obj
ACPI_DEBUG_PRINT((ACPI_DB_LOAD,
"Registered GPE method %s as GPE number 0x%.2X\n",
name, gpe_number));
- return_ACPI_STATUS(status);
+ return_ACPI_STATUS(AE_OK);
}
/*******************************************************************************
@@ -1005,6 +1004,9 @@ acpi_ev_initialize_gpe_block(struct acpi
ACPI_UINT32_MAX, ACPI_NS_WALK_UNLOCK,
acpi_ev_match_prw_and_gpe, NULL,
&gpe_info, NULL);
+ if (ACPI_FAILURE(status))
+ ACPI_ERROR((AE_INFO,
+ "Detection of wake GPEs failed\n"));
}
/*
@@ -1014,30 +1016,36 @@ acpi_ev_initialize_gpe_block(struct acpi
*/
wake_gpe_count = 0;
gpe_enabled_count = 0;
+ if (gpe_device == acpi_gbl_fadt_gpe_device)
+ gpe_device = NULL;
for (i = 0; i < gpe_block->register_count; i++) {
for (j = 0; j < 8; j++) {
- int gpe_number = i * ACPI_GPE_REGISTER_WIDTH + j;
+ acpi_size gpe_index;
+ int gpe_number;
/* Get the info block for this particular GPE */
- gpe_event_info = &gpe_block->event_info[(acpi_size)
- gpe_number];
+ gpe_index = (acpi_size)i * ACPI_GPE_REGISTER_WIDTH + j;
+ gpe_event_info = &gpe_block->event_info[gpe_index];
if (gpe_event_info->flags & ACPI_GPE_CAN_WAKE) {
wake_gpe_count++;
- continue;
+ if (acpi_gbl_leave_wake_gpes_disabled)
+ continue;
}
- if (gpe_event_info->flags & ACPI_GPE_DISPATCH_METHOD) {
+ if (!(gpe_event_info->flags & ACPI_GPE_DISPATCH_METHOD))
+ continue;
+
+ gpe_number = gpe_index + gpe_block->block_base_number;
+ status = acpi_ref_runtime_gpe(gpe_device, gpe_number);
+ if (ACPI_FAILURE(status))
+ ACPI_ERROR((AE_INFO,
+ "Failed to enable GPE %02X\n",
+ gpe_number));
+ else
gpe_enabled_count++;
- if (gpe_device == acpi_gbl_fadt_gpe_device)
- status = acpi_ref_runtime_gpe(NULL,
- gpe_number);
- else
- status = acpi_ref_runtime_gpe(gpe_device,
- gpe_number);
- }
}
}
next prev parent reply other threads:[~2010-02-11 13:26 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-10 13:31 [PATCH 0/9] PCI run-time PM support (rev. 3) Rafael J. Wysocki
2010-01-10 13:35 ` [PATCH 1/9] PCI PM: Add function for checking PME status of devices Rafael J. Wysocki
2010-01-15 17:55 ` Jesse Barnes
2010-01-10 13:36 ` [PATCH 2/9] PCI PM: PCIe PME root port service driver (rev. 5) Rafael J. Wysocki
2010-01-10 13:37 ` [PATCH 3/9] PCI PM: Make it possible to force using INTx for PCIe PME signaling Rafael J. Wysocki
2010-01-10 13:38 ` [PATCH 4/9] ACPI: Add infrastructure for refcounting GPE consumers Rafael J. Wysocki
2010-01-10 13:39 ` [PATCH 5/9] ACPI: Add support for new refcounted GPE API to drivers Rafael J. Wysocki
2010-01-10 13:40 ` [PATCH 6/9] ACPI: Remove old GPE API and transition code entirely to new one Rafael J. Wysocki
2010-01-10 13:48 ` [PATCH 7/9] ACPI / PM: Add more run-time wake-up fields (rev. 2) Rafael J. Wysocki
2010-01-10 14:01 ` [PATCH 8/9] PCI / ACPI / PM: Platform support for PCI PME wake-up (rev. 7) Rafael J. Wysocki
2010-02-05 23:57 ` Bjorn Helgaas
2010-02-06 0:20 ` Rafael J. Wysocki
2010-02-06 20:11 ` Rafael J. Wysocki
2010-02-08 17:53 ` Gary Hade
2010-02-08 19:17 ` Rafael J. Wysocki
2010-02-08 21:12 ` Gary Hade
2010-02-08 21:30 ` [linux-pm] " Rafael J. Wysocki
2010-02-08 23:37 ` Gary Hade
2010-02-09 0:53 ` Gary Hade
2010-02-09 12:48 ` Rafael J. Wysocki
2010-02-09 13:34 ` Rafael J. Wysocki
2010-02-09 16:41 ` Gary Hade
2010-02-09 17:35 ` Gary Hade
2010-02-09 20:19 ` Rafael J. Wysocki
2010-02-09 20:58 ` Gary Hade
2010-02-09 23:31 ` Gary Hade
2010-02-10 1:07 ` Rafael J. Wysocki
2010-02-10 1:12 ` Rafael J. Wysocki
2010-02-10 17:48 ` Gary Hade
2010-02-10 18:00 ` Rafael J. Wysocki
2010-02-10 20:38 ` Gary Hade
2010-02-10 21:42 ` Rafael J. Wysocki
2010-02-10 22:13 ` Gary Hade
2010-02-10 22:58 ` Rafael J. Wysocki
2010-02-10 23:04 ` Gary Hade
2010-02-10 23:25 ` Rafael J. Wysocki
2010-02-11 0:56 ` Rafael J. Wysocki
2010-02-11 2:07 ` Gary Hade
2010-02-11 13:27 ` Rafael J. Wysocki [this message]
2010-02-11 18:29 ` Gary Hade
2010-02-11 18:33 ` Bjorn Helgaas
2010-02-11 20:32 ` Rafael J. Wysocki
2010-02-11 20:40 ` Rafael J. Wysocki
2010-02-11 21:56 ` Gary Hade
2010-02-11 22:21 ` Rafael J. Wysocki
2010-02-12 1:55 ` Gary Hade
2010-02-12 11:19 ` Rafael J. Wysocki
2010-02-13 0:20 ` Rafael J. Wysocki
2010-02-13 1:27 ` Gary Hade
2010-02-14 13:51 ` Rafael J. Wysocki
2010-02-15 19:22 ` Gary Hade
2010-02-15 21:42 ` Rafael J. Wysocki
2010-01-10 14:02 ` [PATCH 9/9] PCI PM: Run-time callbacks for PCI bus type (rev. 2) Rafael J. Wysocki
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=201002111427.17275.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=bjorn.helgaas@hp.com \
--cc=garyhade@us.ibm.com \
--cc=jbarnes@virtuousgeek.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=mjg@redhat.com \
--cc=robert.moore@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 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®