Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-15 Thread Thomas Gleixner
On Thu, 14 Dec 2017, Linus Torvalds wrote: > On Thu, Dec 14, 2017 at 2:36 PM, Thomas Gleixner wrote: > > > > But, because the silly firmware comes out of suspend with all PIC lines > > unmasked for whatever reason, the PIC can observe that IRQ being raised and > > the CPU not

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-15 Thread Thomas Gleixner
On Thu, 14 Dec 2017, Linus Torvalds wrote: > On Thu, Dec 14, 2017 at 2:36 PM, Thomas Gleixner wrote: > > > > But, because the silly firmware comes out of suspend with all PIC lines > > unmasked for whatever reason, the PIC can observe that IRQ being raised and > > the CPU not handling it. So

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-14 Thread Rafael J. Wysocki
On Thu, Dec 14, 2017 at 11:36 PM, Thomas Gleixner wrote: > On Thu, 14 Dec 2017, Linus Torvalds wrote: >> On Thu, Dec 14, 2017 at 3:54 AM, Thomas Gleixner wrote: >> I just wanted to pipe up about that "irq7", because judging from your >> email it seems like

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-14 Thread Rafael J. Wysocki
On Thu, Dec 14, 2017 at 11:36 PM, Thomas Gleixner wrote: > On Thu, 14 Dec 2017, Linus Torvalds wrote: >> On Thu, Dec 14, 2017 at 3:54 AM, Thomas Gleixner wrote: >> I just wanted to pipe up about that "irq7", because judging from your >> email it seems like you think it's a real irq: >> >> >

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-14 Thread Linus Torvalds
On Thu, Dec 14, 2017 at 2:36 PM, Thomas Gleixner wrote: > > But, because the silly firmware comes out of suspend with all PIC lines > unmasked for whatever reason, the PIC can observe that IRQ being raised and > the CPU not handling it. So yes, I forgot about 7 being magic,

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-14 Thread Linus Torvalds
On Thu, Dec 14, 2017 at 2:36 PM, Thomas Gleixner wrote: > > But, because the silly firmware comes out of suspend with all PIC lines > unmasked for whatever reason, the PIC can observe that IRQ being raised and > the CPU not handling it. So yes, I forgot about 7 being magic, but I still > think

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-14 Thread Thomas Gleixner
On Thu, 14 Dec 2017, Linus Torvalds wrote: > On Thu, Dec 14, 2017 at 3:54 AM, Thomas Gleixner wrote: > I just wanted to pipe up about that "irq7", because judging from your > email it seems like you think it's a real irq: > > >Now there is a race > > whether the

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-14 Thread Thomas Gleixner
On Thu, 14 Dec 2017, Linus Torvalds wrote: > On Thu, Dec 14, 2017 at 3:54 AM, Thomas Gleixner wrote: > I just wanted to pipe up about that "irq7", because judging from your > email it seems like you think it's a real irq: > > >Now there is a race > > whether the kernel resume path

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-14 Thread Linus Torvalds
On Thu, Dec 14, 2017 at 3:54 AM, Thomas Gleixner wrote: > > So the old scheme silently consumed the spurious vector. I added debug code > to that effect to 4.14 and on that machine IRQ7 is triggered at the same > point post resume and the core code drops it silently because

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-14 Thread Linus Torvalds
On Thu, Dec 14, 2017 at 3:54 AM, Thomas Gleixner wrote: > > So the old scheme silently consumed the spurious vector. I added debug code > to that effect to 4.14 and on that machine IRQ7 is triggered at the same > point post resume and the core code drops it silently because the interrupt > is

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-14 Thread Maarten Lankhorst
Op 14-12-17 om 16:54 schreef Rafael J. Wysocki: > On Thursday, December 14, 2017 4:52:22 PM CET Thomas Gleixner wrote: >> On Thu, 14 Dec 2017, Rafael J. Wysocki wrote: >>> The problem here is that pci_pm_thaw_noirq() calls pci_restore_state() which >>> in fact requires the device to be in D0, so

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-14 Thread Maarten Lankhorst
Op 14-12-17 om 16:54 schreef Rafael J. Wysocki: > On Thursday, December 14, 2017 4:52:22 PM CET Thomas Gleixner wrote: >> On Thu, 14 Dec 2017, Rafael J. Wysocki wrote: >>> The problem here is that pci_pm_thaw_noirq() calls pci_restore_state() which >>> in fact requires the device to be in D0, so

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-14 Thread Rafael J. Wysocki
On Thursday, December 14, 2017 4:52:22 PM CET Thomas Gleixner wrote: > On Thu, 14 Dec 2017, Rafael J. Wysocki wrote: > > The problem here is that pci_pm_thaw_noirq() calls pci_restore_state() which > > in fact requires the device to be in D0, so the caller should put it into > > D0 instead of

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-14 Thread Rafael J. Wysocki
On Thursday, December 14, 2017 4:52:22 PM CET Thomas Gleixner wrote: > On Thu, 14 Dec 2017, Rafael J. Wysocki wrote: > > The problem here is that pci_pm_thaw_noirq() calls pci_restore_state() which > > in fact requires the device to be in D0, so the caller should put it into > > D0 instead of

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-14 Thread Thomas Gleixner
On Thu, 14 Dec 2017, Rafael J. Wysocki wrote: > The problem here is that pci_pm_thaw_noirq() calls pci_restore_state() which > in fact requires the device to be in D0, so the caller should put it into > D0 instead of trying to "update" its power state. > > [Note that the PCI layer doesn't put

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-14 Thread Thomas Gleixner
On Thu, 14 Dec 2017, Rafael J. Wysocki wrote: > The problem here is that pci_pm_thaw_noirq() calls pci_restore_state() which > in fact requires the device to be in D0, so the caller should put it into > D0 instead of trying to "update" its power state. > > [Note that the PCI layer doesn't put

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-14 Thread Rafael J. Wysocki
On Thursday, December 14, 2017 1:30:37 PM CET Thomas Gleixner wrote: > On Thu, 14 Dec 2017, Rafael J. Wysocki wrote: > > On Thursday, December 14, 2017 12:54:05 PM CET Thomas Gleixner wrote: > > > Now the graphics issue is a different story. That only happens on > > > hibernation after doing the

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-14 Thread Rafael J. Wysocki
On Thursday, December 14, 2017 1:30:37 PM CET Thomas Gleixner wrote: > On Thu, 14 Dec 2017, Rafael J. Wysocki wrote: > > On Thursday, December 14, 2017 12:54:05 PM CET Thomas Gleixner wrote: > > > Now the graphics issue is a different story. That only happens on > > > hibernation after doing the

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-14 Thread Thomas Gleixner
On Thu, 14 Dec 2017, Thomas Gleixner wrote: > Now, what's different vs. 4.14: > > The 4.14 code accidentaly had the irq descriptor for this vector still > populated in the old CPU due to the convoluted way the vector allocation > worked. I have still to investigate if one of those cases is

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-14 Thread Thomas Gleixner
On Thu, 14 Dec 2017, Thomas Gleixner wrote: > Now, what's different vs. 4.14: > > The 4.14 code accidentaly had the irq descriptor for this vector still > populated in the old CPU due to the convoluted way the vector allocation > worked. I have still to investigate if one of those cases is

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-14 Thread Thomas Gleixner
On Thu, 14 Dec 2017, Rafael J. Wysocki wrote: > On Thursday, December 14, 2017 12:54:05 PM CET Thomas Gleixner wrote: > > Now the graphics issue is a different story. That only happens on > > hibernation after doing the snapshot. There all non boot cpus are onlined > > again and after that the

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-14 Thread Thomas Gleixner
On Thu, 14 Dec 2017, Rafael J. Wysocki wrote: > On Thursday, December 14, 2017 12:54:05 PM CET Thomas Gleixner wrote: > > Now the graphics issue is a different story. That only happens on > > hibernation after doing the snapshot. There all non boot cpus are onlined > > again and after that the

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-14 Thread Rafael J. Wysocki
On Thursday, December 14, 2017 12:54:05 PM CET Thomas Gleixner wrote: > On Wed, 13 Dec 2017, Thomas Gleixner wrote: > > On Wed, 13 Dec 2017, Thomas Gleixner wrote: > > > On Wed, 13 Dec 2017, Thomas Gleixner wrote: > > > > On Wed, 13 Dec 2017, Linus Torvalds wrote: > > > > > > > > > On Wed, Dec

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-14 Thread Rafael J. Wysocki
On Thursday, December 14, 2017 12:54:05 PM CET Thomas Gleixner wrote: > On Wed, 13 Dec 2017, Thomas Gleixner wrote: > > On Wed, 13 Dec 2017, Thomas Gleixner wrote: > > > On Wed, 13 Dec 2017, Thomas Gleixner wrote: > > > > On Wed, 13 Dec 2017, Linus Torvalds wrote: > > > > > > > > > On Wed, Dec

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-14 Thread Thomas Gleixner
On Wed, 13 Dec 2017, Thomas Gleixner wrote: > On Wed, 13 Dec 2017, Thomas Gleixner wrote: > > On Wed, 13 Dec 2017, Thomas Gleixner wrote: > > > On Wed, 13 Dec 2017, Linus Torvalds wrote: > > > > > > > On Wed, Dec 13, 2017 at 8:41 AM, Thomas Gleixner > > > > wrote: > > > > >

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-14 Thread Thomas Gleixner
On Wed, 13 Dec 2017, Thomas Gleixner wrote: > On Wed, 13 Dec 2017, Thomas Gleixner wrote: > > On Wed, 13 Dec 2017, Thomas Gleixner wrote: > > > On Wed, 13 Dec 2017, Linus Torvalds wrote: > > > > > > > On Wed, Dec 13, 2017 at 8:41 AM, Thomas Gleixner > > > > wrote: > > > > > > > > > >

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-13 Thread Rafael J. Wysocki
On Wed, Dec 13, 2017 at 11:39 PM, Rafael J. Wysocki wrote: > On Wednesday, December 13, 2017 7:19:17 PM CET Thomas Gleixner wrote: >> On Wed, 13 Dec 2017, Linus Torvalds wrote: >> >> > On Wed, Dec 13, 2017 at 8:41 AM, Thomas Gleixner >> > wrote: >> > > >>

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-13 Thread Rafael J. Wysocki
On Wed, Dec 13, 2017 at 11:39 PM, Rafael J. Wysocki wrote: > On Wednesday, December 13, 2017 7:19:17 PM CET Thomas Gleixner wrote: >> On Wed, 13 Dec 2017, Linus Torvalds wrote: >> >> > On Wed, Dec 13, 2017 at 8:41 AM, Thomas Gleixner >> > wrote: >> > > >> > > Definitely. That was fragile

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-13 Thread Rafael J. Wysocki
On Wednesday, December 13, 2017 10:06:40 PM CET Thomas Gleixner wrote: > On Wed, 13 Dec 2017, Thomas Gleixner wrote: > > On Wed, 13 Dec 2017, Thomas Gleixner wrote: > > > On Wed, 13 Dec 2017, Linus Torvalds wrote: > > > > > > > On Wed, Dec 13, 2017 at 8:41 AM, Thomas Gleixner

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-13 Thread Rafael J. Wysocki
On Wednesday, December 13, 2017 10:06:40 PM CET Thomas Gleixner wrote: > On Wed, 13 Dec 2017, Thomas Gleixner wrote: > > On Wed, 13 Dec 2017, Thomas Gleixner wrote: > > > On Wed, 13 Dec 2017, Linus Torvalds wrote: > > > > > > > On Wed, Dec 13, 2017 at 8:41 AM, Thomas Gleixner > > > > wrote: > >

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-13 Thread Rafael J. Wysocki
On Wednesday, December 13, 2017 7:19:17 PM CET Thomas Gleixner wrote: > On Wed, 13 Dec 2017, Linus Torvalds wrote: > > > On Wed, Dec 13, 2017 at 8:41 AM, Thomas Gleixner wrote: > > > > > > Definitely. That was fragile forever but puzzles me is that I can't figure > > > out

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-13 Thread Rafael J. Wysocki
On Wednesday, December 13, 2017 7:19:17 PM CET Thomas Gleixner wrote: > On Wed, 13 Dec 2017, Linus Torvalds wrote: > > > On Wed, Dec 13, 2017 at 8:41 AM, Thomas Gleixner wrote: > > > > > > Definitely. That was fragile forever but puzzles me is that I can't figure > > > out what now causes that

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-13 Thread Thomas Gleixner
On Wed, 13 Dec 2017, Thomas Gleixner wrote: > On Wed, 13 Dec 2017, Thomas Gleixner wrote: > > On Wed, 13 Dec 2017, Linus Torvalds wrote: > > > > > On Wed, Dec 13, 2017 at 8:41 AM, Thomas Gleixner > > > wrote: > > > > > > > > Definitely. That was fragile forever but puzzles

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-13 Thread Thomas Gleixner
On Wed, 13 Dec 2017, Thomas Gleixner wrote: > On Wed, 13 Dec 2017, Thomas Gleixner wrote: > > On Wed, 13 Dec 2017, Linus Torvalds wrote: > > > > > On Wed, Dec 13, 2017 at 8:41 AM, Thomas Gleixner > > > wrote: > > > > > > > > Definitely. That was fragile forever but puzzles me is that I can't >

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-13 Thread Thomas Gleixner
On Wed, 13 Dec 2017, Thomas Gleixner wrote: > On Wed, 13 Dec 2017, Linus Torvalds wrote: > > > On Wed, Dec 13, 2017 at 8:41 AM, Thomas Gleixner wrote: > > > > > > Definitely. That was fragile forever but puzzles me is that I can't figure > > > out what now causes that

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-13 Thread Thomas Gleixner
On Wed, 13 Dec 2017, Thomas Gleixner wrote: > On Wed, 13 Dec 2017, Linus Torvalds wrote: > > > On Wed, Dec 13, 2017 at 8:41 AM, Thomas Gleixner wrote: > > > > > > Definitely. That was fragile forever but puzzles me is that I can't figure > > > out what now causes that spurious interrupt to

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-13 Thread Andy Lutomirski
On Wed, Dec 13, 2017 at 3:16 AM, Jarkko Nikula wrote: > On 12/13/2017 12:10 AM, Andy Lutomirski wrote: >> >> On Tue, Dec 12, 2017 at 10:36 AM, Linus Torvalds >> wrote: >>> >>> On Tue, Dec 12, 2017 at 10:05 AM, Andy Lutomirski

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-13 Thread Andy Lutomirski
On Wed, Dec 13, 2017 at 3:16 AM, Jarkko Nikula wrote: > On 12/13/2017 12:10 AM, Andy Lutomirski wrote: >> >> On Tue, Dec 12, 2017 at 10:36 AM, Linus Torvalds >> wrote: >>> >>> On Tue, Dec 12, 2017 at 10:05 AM, Andy Lutomirski >>> wrote: >> >> Like this? >> >> >>

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-13 Thread Thomas Gleixner
On Wed, 13 Dec 2017, Linus Torvalds wrote: > On Wed, Dec 13, 2017 at 8:41 AM, Thomas Gleixner wrote: > > > > Definitely. That was fragile forever but puzzles me is that I can't figure > > out what now causes that spurious interrupt to surface out of the blue. > > Perhaps

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-13 Thread Thomas Gleixner
On Wed, 13 Dec 2017, Linus Torvalds wrote: > On Wed, Dec 13, 2017 at 8:41 AM, Thomas Gleixner wrote: > > > > Definitely. That was fragile forever but puzzles me is that I can't figure > > out what now causes that spurious interrupt to surface out of the blue. > > Perhaps just timing? That's

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-13 Thread Linus Torvalds
On Wed, Dec 13, 2017 at 8:41 AM, Thomas Gleixner wrote: > > Definitely. That was fragile forever but puzzles me is that I can't figure > out what now causes that spurious interrupt to surface out of the blue. Perhaps just timing? How hard would it be to change the ordering

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-13 Thread Linus Torvalds
On Wed, Dec 13, 2017 at 8:41 AM, Thomas Gleixner wrote: > > Definitely. That was fragile forever but puzzles me is that I can't figure > out what now causes that spurious interrupt to surface out of the blue. Perhaps just timing? How hard would it be to change the ordering to just redirect irqs

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-13 Thread Thomas Gleixner
On Wed, 13 Dec 2017, Bjorn Helgaas wrote: > [+cc linux-pci, linux-pm] > > On Wed, Dec 13, 2017 at 04:57:56PM +0100, Thomas Gleixner wrote: > > So I was finally able to figure out what the hell is going on: > > > > Suspend: > > > > - The device suspend code puts the graphics card into a power >

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-13 Thread Thomas Gleixner
On Wed, 13 Dec 2017, Bjorn Helgaas wrote: > [+cc linux-pci, linux-pm] > > On Wed, Dec 13, 2017 at 04:57:56PM +0100, Thomas Gleixner wrote: > > So I was finally able to figure out what the hell is going on: > > > > Suspend: > > > > - The device suspend code puts the graphics card into a power >

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-13 Thread Bjorn Helgaas
[+cc linux-pci, linux-pm] On Wed, Dec 13, 2017 at 04:57:56PM +0100, Thomas Gleixner wrote: > So I was finally able to figure out what the hell is going on: > > Suspend: > > - The device suspend code puts the graphics card into a power >state != PCI_D0. > > - Offline non boot CPUs > > -

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-13 Thread Bjorn Helgaas
[+cc linux-pci, linux-pm] On Wed, Dec 13, 2017 at 04:57:56PM +0100, Thomas Gleixner wrote: > So I was finally able to figure out what the hell is going on: > > Suspend: > > - The device suspend code puts the graphics card into a power >state != PCI_D0. > > - Offline non boot CPUs > > -

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-13 Thread Thomas Gleixner
So I was finally able to figure out what the hell is going on: Suspend: - The device suspend code puts the graphics card into a power state != PCI_D0. - Offline non boot CPUs - Break interrupt affinity. Allocate new vector on CPU 0, compose and write MSI message which ends up in:

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-13 Thread Thomas Gleixner
So I was finally able to figure out what the hell is going on: Suspend: - The device suspend code puts the graphics card into a power state != PCI_D0. - Offline non boot CPUs - Break interrupt affinity. Allocate new vector on CPU 0, compose and write MSI message which ends up in:

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-13 Thread Ingo Molnar
* Jarkko Nikula wrote: > On 12/13/2017 12:10 AM, Andy Lutomirski wrote: > > On Tue, Dec 12, 2017 at 10:36 AM, Linus Torvalds > > wrote: > > > On Tue, Dec 12, 2017 at 10:05 AM, Andy Lutomirski wrote: > > Like this?

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-13 Thread Ingo Molnar
* Jarkko Nikula wrote: > On 12/13/2017 12:10 AM, Andy Lutomirski wrote: > > On Tue, Dec 12, 2017 at 10:36 AM, Linus Torvalds > > wrote: > > > On Tue, Dec 12, 2017 at 10:05 AM, Andy Lutomirski wrote: > > Like this? > > > >

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-13 Thread Jarkko Nikula
On 12/13/2017 12:10 AM, Andy Lutomirski wrote: On Tue, Dec 12, 2017 at 10:36 AM, Linus Torvalds wrote: On Tue, Dec 12, 2017 at 10:05 AM, Andy Lutomirski wrote: Like this?

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-13 Thread Jarkko Nikula
On 12/13/2017 12:10 AM, Andy Lutomirski wrote: On Tue, Dec 12, 2017 at 10:36 AM, Linus Torvalds wrote: On Tue, Dec 12, 2017 at 10:05 AM, Andy Lutomirski wrote: Like this?

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-12 Thread Andy Lutomirski
On Tue, Dec 12, 2017 at 2:33 PM, Linus Torvalds wrote: > On Tue, Dec 12, 2017 at 2:10 PM, Andy Lutomirski wrote: >> >> (That link might not work for a little bit. I'm not sure what's up.) > > I think your link is just bogus. > > >

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-12 Thread Andy Lutomirski
On Tue, Dec 12, 2017 at 2:33 PM, Linus Torvalds wrote: > On Tue, Dec 12, 2017 at 2:10 PM, Andy Lutomirski wrote: >> >> (That link might not work for a little bit. I'm not sure what's up.) > > I think your link is just bogus. > > >

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-12 Thread Linus Torvalds
On Tue, Dec 12, 2017 at 2:10 PM, Andy Lutomirski wrote: > > (That link might not work for a little bit. I'm not sure what's up.) I think your link is just bogus. https://git.kernel.org/pub/scm/linux/kernel/git/luto/linux.git/commit/?h=x86/fixes works. Anyway, the code

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-12 Thread Linus Torvalds
On Tue, Dec 12, 2017 at 2:10 PM, Andy Lutomirski wrote: > > (That link might not work for a little bit. I'm not sure what's up.) I think your link is just bogus. https://git.kernel.org/pub/scm/linux/kernel/git/luto/linux.git/commit/?h=x86/fixes works. Anyway, the code looks much better to

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-12 Thread Andy Lutomirski
On Tue, Dec 12, 2017 at 10:36 AM, Linus Torvalds wrote: > On Tue, Dec 12, 2017 at 10:05 AM, Andy Lutomirski wrote: >>> >>> - do NOT use "load_gs_index()", which does that swapgs dance (twice!) >>> and plays with interrupt state. Just load the

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-12 Thread Andy Lutomirski
On Tue, Dec 12, 2017 at 10:36 AM, Linus Torvalds wrote: > On Tue, Dec 12, 2017 at 10:05 AM, Andy Lutomirski wrote: >>> >>> - do NOT use "load_gs_index()", which does that swapgs dance (twice!) >>> and plays with interrupt state. Just load the segment register, and >>> then do the wrmsrl() of the

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-12 Thread Linus Torvalds
On Tue, Dec 12, 2017 at 10:05 AM, Andy Lutomirski wrote: >> >> - do NOT use "load_gs_index()", which does that swapgs dance (twice!) >> and plays with interrupt state. Just load the segment register, and >> then do the wrmsrl() of the {FS,GS,KERNEL_GS}_BASE values. There is no >>

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-12 Thread Linus Torvalds
On Tue, Dec 12, 2017 at 10:05 AM, Andy Lutomirski wrote: >> >> - do NOT use "load_gs_index()", which does that swapgs dance (twice!) >> and plays with interrupt state. Just load the segment register, and >> then do the wrmsrl() of the {FS,GS,KERNEL_GS}_BASE values. There is no >> need for the

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-12 Thread Andy Lutomirski
On Tue, Dec 12, 2017 at 9:27 AM, Linus Torvalds wrote: > On Sun, Dec 10, 2017 at 1:28 PM, Linus Torvalds > wrote: >> >> That said, this *all* smells wrong. Why is there a special >> fix_processor_context() function at all with

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-12 Thread Andy Lutomirski
On Tue, Dec 12, 2017 at 9:27 AM, Linus Torvalds wrote: > On Sun, Dec 10, 2017 at 1:28 PM, Linus Torvalds > wrote: >> >> That said, this *all* smells wrong. Why is there a special >> fix_processor_context() function at all with different 32-bit and >> 64-bit behavior? This code is all written to

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-12 Thread Linus Torvalds
On Sun, Dec 10, 2017 at 1:28 PM, Linus Torvalds wrote: > > That said, this *all* smells wrong. Why is there a special > fix_processor_context() function at all with different 32-bit and > 64-bit behavior? This code is all written to be maximally confusing. Hmm.

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-12 Thread Linus Torvalds
On Sun, Dec 10, 2017 at 1:28 PM, Linus Torvalds wrote: > > That said, this *all* smells wrong. Why is there a special > fix_processor_context() function at all with different 32-bit and > 64-bit behavior? This code is all written to be maximally confusing. Hmm. Looking a bit more at this, I

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-12 Thread Pavel Machek
Hi! > > > ...should take 10 seconds or so. > > I'm told 0day does *some* suspend/resume testing, but I think it's > > pretty limited, partly because the kinds of machines it primarily > > works on don't really support suspend/resume at all. > > currently, we're running suspend test on 1 platform

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-12 Thread Pavel Machek
Hi! > > > ...should take 10 seconds or so. > > I'm told 0day does *some* suspend/resume testing, but I think it's > > pretty limited, partly because the kinds of machines it primarily > > works on don't really support suspend/resume at all. > > currently, we're running suspend test on 1 platform

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-11 Thread Andy Lutomirski
On Mon, Dec 11, 2017 at 6:09 AM, Zhang Rui wrote: > On Sun, 2017-12-10 at 12:30 -0800, Linus Torvalds wrote: >> On Sun, Dec 10, 2017 at 10:56 AM, Pavel Machek wrote: >> > >> > >> > Confirmed, revert fixes it. You see how it moves >> > fix_processor_context >> >

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-11 Thread Andy Lutomirski
On Mon, Dec 11, 2017 at 6:09 AM, Zhang Rui wrote: > On Sun, 2017-12-10 at 12:30 -0800, Linus Torvalds wrote: >> On Sun, Dec 10, 2017 at 10:56 AM, Pavel Machek wrote: >> > >> > >> > Confirmed, revert fixes it. You see how it moves >> > fix_processor_context >> > around #ifdef CONFIG_X86_32 block?

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-11 Thread Zhang Rui
On Sun, 2017-12-10 at 12:30 -0800, Linus Torvalds wrote: > On Sun, Dec 10, 2017 at 10:56 AM, Pavel Machek wrote: > > > > > > Confirmed, revert fixes it. You see how it moves > > fix_processor_context > > around #ifdef CONFIG_X86_32 block? And how people forget 32-bit > > machines

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-11 Thread Zhang Rui
On Sun, 2017-12-10 at 12:30 -0800, Linus Torvalds wrote: > On Sun, Dec 10, 2017 at 10:56 AM, Pavel Machek wrote: > > > > > > Confirmed, revert fixes it. You see how it moves > > fix_processor_context > > around #ifdef CONFIG_X86_32 block? And how people forget 32-bit > > machines exist? Aha. >

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-10 Thread Pavel Machek
On Sun 2017-12-10 13:28:50, Linus Torvalds wrote: > On Sun, Dec 10, 2017 at 12:43 PM, Pavel Machek wrote: > > > > For the record... this should fix it. Tested on x60. More tests pending. > > This can't be right. > > At the very least, now the comment is wrong. And the comment does

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-10 Thread Pavel Machek
On Sun 2017-12-10 13:28:50, Linus Torvalds wrote: > On Sun, Dec 10, 2017 at 12:43 PM, Pavel Machek wrote: > > > > For the record... this should fix it. Tested on x60. More tests pending. > > This can't be right. > > At the very least, now the comment is wrong. And the comment does seem >

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-10 Thread Linus Torvalds
On Sun, Dec 10, 2017 at 12:43 PM, Pavel Machek wrote: > > For the record... this should fix it. Tested on x60. More tests pending. This can't be right. At the very least, now the comment is wrong. And the comment does seem relevant for 32-bit too: > -

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-10 Thread Linus Torvalds
On Sun, Dec 10, 2017 at 12:43 PM, Pavel Machek wrote: > > For the record... this should fix it. Tested on x60. More tests pending. This can't be right. At the very least, now the comment is wrong. And the comment does seem relevant for 32-bit too: > - fix_processor_context(); > - >

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-10 Thread Pavel Machek
On Sun 2017-12-10 12:30:52, Linus Torvalds wrote: > On Sun, Dec 10, 2017 at 10:56 AM, Pavel Machek wrote: > > > > Confirmed, revert fixes it. You see how it moves fix_processor_context > > around #ifdef CONFIG_X86_32 block? And how people forget 32-bit > > machines exist? Aha. > >

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-10 Thread Pavel Machek
On Sun 2017-12-10 12:30:52, Linus Torvalds wrote: > On Sun, Dec 10, 2017 at 10:56 AM, Pavel Machek wrote: > > > > Confirmed, revert fixes it. You see how it moves fix_processor_context > > around #ifdef CONFIG_X86_32 block? And how people forget 32-bit > > machines exist? Aha. > > Yeah, people

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-10 Thread Linus Torvalds
On Sun, Dec 10, 2017 at 10:56 AM, Pavel Machek wrote: > > Confirmed, revert fixes it. You see how it moves fix_processor_context > around #ifdef CONFIG_X86_32 block? And how people forget 32-bit > machines exist? Aha. Yeah, people do. Andy? > Which brings me to .. various people

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-10 Thread Linus Torvalds
On Sun, Dec 10, 2017 at 10:56 AM, Pavel Machek wrote: > > Confirmed, revert fixes it. You see how it moves fix_processor_context > around #ifdef CONFIG_X86_32 block? And how people forget 32-bit > machines exist? Aha. Yeah, people do. Andy? > Which brings me to .. various people do automated

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-10 Thread Michal Hocko
On Thu 07-12-17 08:55:08, Michal Hocko wrote: > On Wed 06-12-17 13:14:52, Michal Hocko wrote: > > On Mon 04-12-17 14:36:20, Linus Torvalds wrote: > > > On Mon, Dec 4, 2017 at 2:25 PM, Rafael J. Wysocki > > > wrote: > > > > > > > > So far, resume from suspend-to-RAM (ACPI S3)

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-10 Thread Michal Hocko
On Thu 07-12-17 08:55:08, Michal Hocko wrote: > On Wed 06-12-17 13:14:52, Michal Hocko wrote: > > On Mon 04-12-17 14:36:20, Linus Torvalds wrote: > > > On Mon, Dec 4, 2017 at 2:25 PM, Rafael J. Wysocki > > > wrote: > > > > > > > > So far, resume from suspend-to-RAM (ACPI S3) is broken on all of

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-10 Thread Pavel Machek
On Sun 2017-12-10 08:37:56, Linus Torvalds wrote: > On Sun, Dec 10, 2017 at 8:23 AM, Pavel Machek wrote: > > > > Can you do something about html emails? Quoting them doesn't work too well. > > Yeah, and they don't show up onlkml either because of rules. I try to > avoid them, but

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-10 Thread Pavel Machek
On Sun 2017-12-10 08:37:56, Linus Torvalds wrote: > On Sun, Dec 10, 2017 at 8:23 AM, Pavel Machek wrote: > > > > Can you do something about html emails? Quoting them doesn't work too well. > > Yeah, and they don't show up onlkml either because of rules. I try to > avoid them, but have been more

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-10 Thread Linus Torvalds
On Sun, Dec 10, 2017 at 8:23 AM, Pavel Machek wrote: > > Can you do something about html emails? Quoting them doesn't work too well. Yeah, and they don't show up onlkml either because of rules. I try to avoid them, but have been more on mobile for various reasons lately than usual.

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-10 Thread Linus Torvalds
On Sun, Dec 10, 2017 at 8:23 AM, Pavel Machek wrote: > > Can you do something about html emails? Quoting them doesn't work too well. Yeah, and they don't show up onlkml either because of rules. I try to avoid them, but have been more on mobile for various reasons lately than usual. That should

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-10 Thread Pavel Machek
On Sat 2017-12-09 14:47:41, Linus Torvalds wrote: > On Dec 9, 2017 14:01, "Pavel Machek" wrote: > > > Strange. I was at 4.15-rc1, and suspend worked there (thinkpad x60, > 32-bit). It was broken in -next. I updated to current mainline ( > 4ded3bec65a07343258ed8fd9d46483f032d866f )

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-10 Thread Pavel Machek
On Sat 2017-12-09 14:47:41, Linus Torvalds wrote: > On Dec 9, 2017 14:01, "Pavel Machek" wrote: > > > Strange. I was at 4.15-rc1, and suspend worked there (thinkpad x60, > 32-bit). It was broken in -next. I updated to current mainline ( > 4ded3bec65a07343258ed8fd9d46483f032d866f ) and suspend

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-09 Thread Pavel Machek
Hi! On Sat 2017-12-09 10:55:14, Linus Torvalds wrote: > On Dec 9, 2017 02:33, "Pavel Machek" wrote: > > > I believe I have the issue here, too (-next on thinkpad x60). Which > > patch is expected to fix it? Let me try recent -next... > > > It should be fixed in mainline. I don't

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-09 Thread Pavel Machek
Hi! On Sat 2017-12-09 10:55:14, Linus Torvalds wrote: > On Dec 9, 2017 02:33, "Pavel Machek" wrote: > > > I believe I have the issue here, too (-next on thinkpad x60). Which > > patch is expected to fix it? Let me try recent -next... > > > It should be fixed in mainline. I don't know if next

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-09 Thread Pavel Machek
On Sat 2017-12-09 11:33:25, Pavel Machek wrote: > On Tue 2017-12-05 01:25:55, Rafael J. Wysocki wrote: > > On Monday, December 4, 2017 11:41:06 PM CET Rafael J. Wysocki wrote: > > > On Monday, December 4, 2017 11:38:54 PM CET Thomas Gleixner wrote: > > > > On Mon, 4 Dec 2017, Linus Torvalds wrote:

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-09 Thread Pavel Machek
On Sat 2017-12-09 11:33:25, Pavel Machek wrote: > On Tue 2017-12-05 01:25:55, Rafael J. Wysocki wrote: > > On Monday, December 4, 2017 11:41:06 PM CET Rafael J. Wysocki wrote: > > > On Monday, December 4, 2017 11:38:54 PM CET Thomas Gleixner wrote: > > > > On Mon, 4 Dec 2017, Linus Torvalds wrote:

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-09 Thread Pavel Machek
On Tue 2017-12-05 01:25:55, Rafael J. Wysocki wrote: > On Monday, December 4, 2017 11:41:06 PM CET Rafael J. Wysocki wrote: > > On Monday, December 4, 2017 11:38:54 PM CET Thomas Gleixner wrote: > > > On Mon, 4 Dec 2017, Linus Torvalds wrote: > > > > > > > On Mon, Dec 4, 2017 at 2:25 PM, Rafael

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-09 Thread Pavel Machek
On Tue 2017-12-05 01:25:55, Rafael J. Wysocki wrote: > On Monday, December 4, 2017 11:41:06 PM CET Rafael J. Wysocki wrote: > > On Monday, December 4, 2017 11:38:54 PM CET Thomas Gleixner wrote: > > > On Mon, 4 Dec 2017, Linus Torvalds wrote: > > > > > > > On Mon, Dec 4, 2017 at 2:25 PM, Rafael

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-08 Thread Thomas Gleixner
On Thu, 7 Dec 2017, Maarten Lankhorst wrote: > Op 06-12-17 om 15:15 schreef Thomas Gleixner: > > On Wed, 6 Dec 2017, Maarten Lankhorst wrote: > >> Op 06-12-17 om 13:46 schreef Thomas Gleixner: > >>> On Wed, 6 Dec 2017, Maarten Lankhorst wrote: > Op 06-12-17 om 13:15 schreef Michal Hocko: >

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-08 Thread Thomas Gleixner
On Thu, 7 Dec 2017, Maarten Lankhorst wrote: > Op 06-12-17 om 15:15 schreef Thomas Gleixner: > > On Wed, 6 Dec 2017, Maarten Lankhorst wrote: > >> Op 06-12-17 om 13:46 schreef Thomas Gleixner: > >>> On Wed, 6 Dec 2017, Maarten Lankhorst wrote: > Op 06-12-17 om 13:15 schreef Michal Hocko: >

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-07 Thread Maarten Lankhorst
Op 06-12-17 om 15:15 schreef Thomas Gleixner: > On Wed, 6 Dec 2017, Maarten Lankhorst wrote: >> Op 06-12-17 om 13:46 schreef Thomas Gleixner: >>> On Wed, 6 Dec 2017, Maarten Lankhorst wrote: Op 06-12-17 om 13:15 schreef Michal Hocko: > "No irq handler" part looks a bit scary (maybe

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-07 Thread Maarten Lankhorst
Op 06-12-17 om 15:15 schreef Thomas Gleixner: > On Wed, 6 Dec 2017, Maarten Lankhorst wrote: >> Op 06-12-17 om 13:46 schreef Thomas Gleixner: >>> On Wed, 6 Dec 2017, Maarten Lankhorst wrote: Op 06-12-17 om 13:15 schreef Michal Hocko: > "No irq handler" part looks a bit scary (maybe

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-06 Thread Michal Hocko
On Wed 06-12-17 13:14:52, Michal Hocko wrote: > On Mon 04-12-17 14:36:20, Linus Torvalds wrote: > > On Mon, Dec 4, 2017 at 2:25 PM, Rafael J. Wysocki > > wrote: > > > > > > So far, resume from suspend-to-RAM (ACPI S3) is broken on all of the > > > systems I have tested, so it

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-06 Thread Michal Hocko
On Wed 06-12-17 13:14:52, Michal Hocko wrote: > On Mon 04-12-17 14:36:20, Linus Torvalds wrote: > > On Mon, Dec 4, 2017 at 2:25 PM, Rafael J. Wysocki > > wrote: > > > > > > So far, resume from suspend-to-RAM (ACPI S3) is broken on all of the > > > systems I have tested, so it is probably safe to

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-06 Thread Thomas Gleixner
On Wed, 6 Dec 2017, Maarten Lankhorst wrote: > Op 06-12-17 om 13:46 schreef Thomas Gleixner: > > On Wed, 6 Dec 2017, Maarten Lankhorst wrote: > >> Op 06-12-17 om 13:15 schreef Michal Hocko: > >>> "No irq handler" part looks a bit scary (maybe related to lost affinity > >>> messages?) but the

Re: Linux 4.15-rc2: Regression in resume from ACPI S3

2017-12-06 Thread Thomas Gleixner
On Wed, 6 Dec 2017, Maarten Lankhorst wrote: > Op 06-12-17 om 13:46 schreef Thomas Gleixner: > > On Wed, 6 Dec 2017, Maarten Lankhorst wrote: > >> Op 06-12-17 om 13:15 schreef Michal Hocko: > >>> "No irq handler" part looks a bit scary (maybe related to lost affinity > >>> messages?) but the

  1   2   >