Re: [Bug 197863] Thinkpad X240 resume dramatically slower on kernels 4.13+

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wednesday, February 7, 2018 11:44:15 PM CET Rafael J. Wysocki wrote:
> On Mon, Feb 5, 2018 at 6:06 PM, Rafael J. Wysocki
> <rafael.j.wysocki@xxxxxxxxx> wrote:
> > On 2/5/2018 3:14 PM, Bjørn Mork wrote:
> >>
> >> "Rafael J. Wysocki" <rafael.j.wysocki@xxxxxxxxx> writes:
> >>>
> >>> On 2/4/2018 9:28 PM, Bjørn Mork wrote:
> >>>
> >>>> But I do wonder if the attached (completely untested!!) patch makes
> >>>> things any better?
> >>>
> >>> I don't think so, the macro is needed too.
> >>
> >> Doh! Obviously.  Don't know how I managed to miss that.
> >>
> >>> I'll queue up a full revert of 662591461c4b9a1e3b.
> >>
> >> Still with the additional exception for "ec == first_ec"?
> >>
> >
> > No, just a full revert for now.
> 
> That doesn't work, because we made some changes on top of this commit.
> 
> I'll send a patch to try tomorrow.

Below is a patch for the mainline (should be applicable to 4.15.y) to test.
Please let me know if it improves things for you.

The corresponding fix for -stable would still be a full revert of
662591461c4b9a1e3b, but it needs to be fixed in the mainline first.

---
 drivers/acpi/ec.c |    6 ++++++
 1 file changed, 6 insertions(+)

Index: linux-pm/drivers/acpi/ec.c
===================================================================
--- linux-pm.orig/drivers/acpi/ec.c
+++ linux-pm/drivers/acpi/ec.c
@@ -1927,6 +1927,9 @@ static int acpi_ec_suspend_noirq(struct
 	    ec->reference_count >= 1)
 		acpi_set_gpe(NULL, ec->gpe, ACPI_GPE_DISABLE);
 
+	if (acpi_sleep_no_ec_events())
+		acpi_ec_enter_noirq(ec);
+
 	return 0;
 }
 
@@ -1934,6 +1937,9 @@ static int acpi_ec_resume_noirq(struct d
 {
 	struct acpi_ec *ec = acpi_driver_data(to_acpi_device(dev));
 
+	if (acpi_sleep_no_ec_events())
+		acpi_ec_leave_noirq(ec);
+
 	if (ec_no_wakeup && test_bit(EC_FLAGS_STARTED, &ec->flags) &&
 	    ec->reference_count >= 1)
 		acpi_set_gpe(NULL, ec->gpe, ACPI_GPE_ENABLE);

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



[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux