Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-10-04 Thread Ondrej Zary
On Saturday 01 October 2016 19:49:17 Sinan Kaya wrote:
> On 9/30/2016 5:27 PM, Rafael J. Wysocki wrote:
> >>> >> What's the drawback, if any?
> >> >
> >> > I don't see any drawback to be honest.
> >
> > I'd go for it then, if Bjorn doesn't hate it.
>
> I posted a follow up patch a minute ago.
>
> [PATCH 1/3] Revert "ACPI,PCI,IRQ: reduce static IRQ array size to 16"
> [PATCH 2/3] ACPI, PCI IRQ: add PCI_USING penalty for ISA interrupts
> [PATCH 3/3] Revert "ACPI,PCI,IRQ: remove SCI penalize function"
>
> Can we have some testing coverage? and eventually have tested-by?

Fixes the problem on all 4 machines.
These patches also need to go into 4.7-stable and 4.8-stable.

Tested-by: Ondrej Zary 

-- 
Ondrej Zary


Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-10-04 Thread Ondrej Zary
On Saturday 01 October 2016 19:49:17 Sinan Kaya wrote:
> On 9/30/2016 5:27 PM, Rafael J. Wysocki wrote:
> >>> >> What's the drawback, if any?
> >> >
> >> > I don't see any drawback to be honest.
> >
> > I'd go for it then, if Bjorn doesn't hate it.
>
> I posted a follow up patch a minute ago.
>
> [PATCH 1/3] Revert "ACPI,PCI,IRQ: reduce static IRQ array size to 16"
> [PATCH 2/3] ACPI, PCI IRQ: add PCI_USING penalty for ISA interrupts
> [PATCH 3/3] Revert "ACPI,PCI,IRQ: remove SCI penalize function"
>
> Can we have some testing coverage? and eventually have tested-by?

Fixes the problem on all 4 machines.
These patches also need to go into 4.7-stable and 4.8-stable.

Tested-by: Ondrej Zary 

-- 
Ondrej Zary


Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-10-04 Thread Sinan Kaya
Hi Ondrej,

On 10/3/2016 3:25 AM, Ondrej Zary wrote:
> On Monday 03 October 2016, Sinan Kaya wrote:
>> On 10/2/2016 12:53 PM, Ondrej Zary wrote:
 Can we have some testing coverage? and eventually have tested-by?
>>>
>>> Works on two affected machines. More tests tomorrow.
>>
>> Thanks, appreciate the feedback. Looking forward to hear your other test
>> results.
> 
> The other two affected machines are working too.
> 

Can I have your "tested by" before I repost the new version with updated
commit message?

Sinan

-- 
Sinan Kaya
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm 
Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux 
Foundation Collaborative Project.


Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-10-04 Thread Sinan Kaya
Hi Ondrej,

On 10/3/2016 3:25 AM, Ondrej Zary wrote:
> On Monday 03 October 2016, Sinan Kaya wrote:
>> On 10/2/2016 12:53 PM, Ondrej Zary wrote:
 Can we have some testing coverage? and eventually have tested-by?
>>>
>>> Works on two affected machines. More tests tomorrow.
>>
>> Thanks, appreciate the feedback. Looking forward to hear your other test
>> results.
> 
> The other two affected machines are working too.
> 

Can I have your "tested by" before I repost the new version with updated
commit message?

Sinan

-- 
Sinan Kaya
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm 
Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux 
Foundation Collaborative Project.


Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-10-03 Thread Ondrej Zary
On Monday 03 October 2016, Sinan Kaya wrote:
> On 10/2/2016 12:53 PM, Ondrej Zary wrote:
> >> Can we have some testing coverage? and eventually have tested-by?
> >
> > Works on two affected machines. More tests tomorrow.
>
> Thanks, appreciate the feedback. Looking forward to hear your other test
> results.

The other two affected machines are working too.

-- 
Ondrej Zary
[0.00] Linux version 4.8.0-rc8+ (zary@gsql) (gcc version 4.7.2 (Debian 
4.7.2-5) ) #134 SMP Sun Oct 2 15:13:50 CEST 2016
[0.00] x86/fpu: Legacy x87 FPU detected.
[0.00] x86/fpu: Using 'eager' FPU context switches.
[0.00] e820: BIOS-provided physical RAM map:
[0.00] BIOS-e820: [mem 0x-0x0009fbff] usable
[0.00] BIOS-e820: [mem 0x0009fc00-0x0009] reserved
[0.00] BIOS-e820: [mem 0x000f-0x000f] reserved
[0.00] BIOS-e820: [mem 0x0010-0x077fbfff] usable
[0.00] BIOS-e820: [mem 0x077fc000-0x077fefff] ACPI data
[0.00] BIOS-e820: [mem 0x077ff000-0x077f] ACPI NVS
[0.00] BIOS-e820: [mem 0x-0x] reserved
[0.00] Notice: NX (Execute Disable) protection missing in CPU!
[0.00] SMBIOS 2.3 present.
[0.00] DMI: System Manufacturer System Name/A7VL133, BIOS ASUS 
A7VL133-VM ACPI BIOS Revision 1008 06/10/2002
[0.00] e820: update [mem 0x-0x0fff] usable ==> reserved
[0.00] e820: remove [mem 0x000a-0x000f] usable
[0.00] e820: last_pfn = 0x77fc max_arch_pfn = 0x10
[0.00] MTRR default type: uncachable
[0.00] MTRR fixed ranges enabled:
[0.00]   0-9 write-back
[0.00]   A-A uncachable
[0.00]   B-B write-combining
[0.00]   C-F uncachable
[0.00] MTRR variable ranges enabled:
[0.00]   0 base 0 mask FFC00 write-back
[0.00]   1 base 00400 mask FFE00 write-back
[0.00]   2 base 00600 mask FFF00 write-back
[0.00]   3 base 00700 mask FFF80 write-back
[0.00]   4 base 0F000 mask FF800 write-combining
[0.00]   5 disabled
[0.00]   6 disabled
[0.00]   7 base 0F800 mask FFC00 write-combining
[0.00] x86/PAT: Configuration [0-7]: WB  WC  UC- UC  WB  WC  UC- WT  
[0.00] initial memory mapped: [mem 0x-0x01bf]
[0.00] Base memory trampoline at [c009b000] 9b000 size 16384
[0.00] BRK [0x016b7000, 0x016b7fff] PGTABLE
[0.00] ACPI: Early table checksum verification disabled
[0.00] ACPI: RSDP 0x000F6DA0 14 (v00 ASUS  )
[0.00] ACPI: RSDT 0x077FC000 2C (v01 ASUS   A7VL133  
30303031 MSFT 31313031)
[0.00] ACPI: FACP 0x077FC080 74 (v01 ASUS   A7VL133  
30303031 MSFT 31313031)
[0.00] ACPI: DSDT 0x077FC100 0027F0 (v01 ASUS   A7VL133  
1000 MSFT 010B)
[0.00] ACPI: FACS 0x077FF000 40
[0.00] ACPI: BOOT 0x077FC040 28 (v01 ASUS   A7VL133  
30303031 MSFT 31313031)
[0.00] 0MB HIGHMEM available.
[0.00] 119MB LOWMEM available.
[0.00]   mapped low ram: 0 - 077fc000
[0.00]   low ram: 0 - 077fc000
[0.00] BRK [0x016b8000, 0x016b8fff] PGTABLE
[0.00] Zone ranges:
[0.00]   DMA  [mem 0x1000-0x00ff]
[0.00]   Normal   [mem 0x0100-0x077fbfff]
[0.00]   HighMem  empty
[0.00] Movable zone start for each node
[0.00] Early memory node ranges
[0.00]   node   0: [mem 0x1000-0x0009efff]
[0.00]   node   0: [mem 0x0010-0x077fbfff]
[0.00] Initmem setup node 0 [mem 0x1000-0x077fbfff]
[0.00] On node 0 totalpages: 30618
[0.00] free_area_init_node: node 0, pgdat c15b17a0, node_mem_map 
c770c020
[0.00]   DMA zone: 32 pages used for memmap
[0.00]   DMA zone: 0 pages reserved
[0.00]   DMA zone: 3998 pages, LIFO batch:0
[0.00]   Normal zone: 208 pages used for memmap
[0.00]   Normal zone: 26620 pages, LIFO batch:7
[0.00] Using APIC driver default
[0.00] ACPI: PM-Timer IO Port: 0xe408
[0.00] smpboot: Allowing 1 CPUs, 0 hotplug CPUs
[0.00] Local APIC disabled by BIOS -- you can enable it with "lapic"
[0.00] APIC: disable apic facility
[0.00] APIC: switched to apic NOOP
[0.00] PM: Registered nosave memory: [mem 0x-0x0fff]
[0.00] PM: Registered nosave memory: [mem 0x0009f000-0x0009]
[0.00] PM: Registered nosave memory: [mem 0x000a-0x000e]
[0.00] PM: Registered nosave memory: [mem 0x000f-0x000f]
[0.00] e820: [mem 0x0780-0xfffe] available for PCI devices
[

Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-10-03 Thread Ondrej Zary
On Monday 03 October 2016, Sinan Kaya wrote:
> On 10/2/2016 12:53 PM, Ondrej Zary wrote:
> >> Can we have some testing coverage? and eventually have tested-by?
> >
> > Works on two affected machines. More tests tomorrow.
>
> Thanks, appreciate the feedback. Looking forward to hear your other test
> results.

The other two affected machines are working too.

-- 
Ondrej Zary
[0.00] Linux version 4.8.0-rc8+ (zary@gsql) (gcc version 4.7.2 (Debian 
4.7.2-5) ) #134 SMP Sun Oct 2 15:13:50 CEST 2016
[0.00] x86/fpu: Legacy x87 FPU detected.
[0.00] x86/fpu: Using 'eager' FPU context switches.
[0.00] e820: BIOS-provided physical RAM map:
[0.00] BIOS-e820: [mem 0x-0x0009fbff] usable
[0.00] BIOS-e820: [mem 0x0009fc00-0x0009] reserved
[0.00] BIOS-e820: [mem 0x000f-0x000f] reserved
[0.00] BIOS-e820: [mem 0x0010-0x077fbfff] usable
[0.00] BIOS-e820: [mem 0x077fc000-0x077fefff] ACPI data
[0.00] BIOS-e820: [mem 0x077ff000-0x077f] ACPI NVS
[0.00] BIOS-e820: [mem 0x-0x] reserved
[0.00] Notice: NX (Execute Disable) protection missing in CPU!
[0.00] SMBIOS 2.3 present.
[0.00] DMI: System Manufacturer System Name/A7VL133, BIOS ASUS 
A7VL133-VM ACPI BIOS Revision 1008 06/10/2002
[0.00] e820: update [mem 0x-0x0fff] usable ==> reserved
[0.00] e820: remove [mem 0x000a-0x000f] usable
[0.00] e820: last_pfn = 0x77fc max_arch_pfn = 0x10
[0.00] MTRR default type: uncachable
[0.00] MTRR fixed ranges enabled:
[0.00]   0-9 write-back
[0.00]   A-A uncachable
[0.00]   B-B write-combining
[0.00]   C-F uncachable
[0.00] MTRR variable ranges enabled:
[0.00]   0 base 0 mask FFC00 write-back
[0.00]   1 base 00400 mask FFE00 write-back
[0.00]   2 base 00600 mask FFF00 write-back
[0.00]   3 base 00700 mask FFF80 write-back
[0.00]   4 base 0F000 mask FF800 write-combining
[0.00]   5 disabled
[0.00]   6 disabled
[0.00]   7 base 0F800 mask FFC00 write-combining
[0.00] x86/PAT: Configuration [0-7]: WB  WC  UC- UC  WB  WC  UC- WT  
[0.00] initial memory mapped: [mem 0x-0x01bf]
[0.00] Base memory trampoline at [c009b000] 9b000 size 16384
[0.00] BRK [0x016b7000, 0x016b7fff] PGTABLE
[0.00] ACPI: Early table checksum verification disabled
[0.00] ACPI: RSDP 0x000F6DA0 14 (v00 ASUS  )
[0.00] ACPI: RSDT 0x077FC000 2C (v01 ASUS   A7VL133  
30303031 MSFT 31313031)
[0.00] ACPI: FACP 0x077FC080 74 (v01 ASUS   A7VL133  
30303031 MSFT 31313031)
[0.00] ACPI: DSDT 0x077FC100 0027F0 (v01 ASUS   A7VL133  
1000 MSFT 010B)
[0.00] ACPI: FACS 0x077FF000 40
[0.00] ACPI: BOOT 0x077FC040 28 (v01 ASUS   A7VL133  
30303031 MSFT 31313031)
[0.00] 0MB HIGHMEM available.
[0.00] 119MB LOWMEM available.
[0.00]   mapped low ram: 0 - 077fc000
[0.00]   low ram: 0 - 077fc000
[0.00] BRK [0x016b8000, 0x016b8fff] PGTABLE
[0.00] Zone ranges:
[0.00]   DMA  [mem 0x1000-0x00ff]
[0.00]   Normal   [mem 0x0100-0x077fbfff]
[0.00]   HighMem  empty
[0.00] Movable zone start for each node
[0.00] Early memory node ranges
[0.00]   node   0: [mem 0x1000-0x0009efff]
[0.00]   node   0: [mem 0x0010-0x077fbfff]
[0.00] Initmem setup node 0 [mem 0x1000-0x077fbfff]
[0.00] On node 0 totalpages: 30618
[0.00] free_area_init_node: node 0, pgdat c15b17a0, node_mem_map 
c770c020
[0.00]   DMA zone: 32 pages used for memmap
[0.00]   DMA zone: 0 pages reserved
[0.00]   DMA zone: 3998 pages, LIFO batch:0
[0.00]   Normal zone: 208 pages used for memmap
[0.00]   Normal zone: 26620 pages, LIFO batch:7
[0.00] Using APIC driver default
[0.00] ACPI: PM-Timer IO Port: 0xe408
[0.00] smpboot: Allowing 1 CPUs, 0 hotplug CPUs
[0.00] Local APIC disabled by BIOS -- you can enable it with "lapic"
[0.00] APIC: disable apic facility
[0.00] APIC: switched to apic NOOP
[0.00] PM: Registered nosave memory: [mem 0x-0x0fff]
[0.00] PM: Registered nosave memory: [mem 0x0009f000-0x0009]
[0.00] PM: Registered nosave memory: [mem 0x000a-0x000e]
[0.00] PM: Registered nosave memory: [mem 0x000f-0x000f]
[0.00] e820: [mem 0x0780-0xfffe] available for PCI devices
[

Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-10-02 Thread Sinan Kaya
On 10/2/2016 12:53 PM, Ondrej Zary wrote:
>> Can we have some testing coverage? and eventually have tested-by?
> Works on two affected machines. More tests tomorrow.

Thanks, appreciate the feedback. Looking forward to hear your other test 
results.

-- 
Sinan Kaya
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm 
Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux 
Foundation Collaborative Project.


Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-10-02 Thread Sinan Kaya
On 10/2/2016 12:53 PM, Ondrej Zary wrote:
>> Can we have some testing coverage? and eventually have tested-by?
> Works on two affected machines. More tests tomorrow.

Thanks, appreciate the feedback. Looking forward to hear your other test 
results.

-- 
Sinan Kaya
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm 
Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux 
Foundation Collaborative Project.


Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-10-02 Thread Ondrej Zary
On Saturday 01 October 2016 19:49:17 Sinan Kaya wrote:
> On 9/30/2016 5:27 PM, Rafael J. Wysocki wrote:
> >>> >> What's the drawback, if any?
> >> >
> >> > I don't see any drawback to be honest.
> >
> > I'd go for it then, if Bjorn doesn't hate it.
>
> I posted a follow up patch a minute ago.
>
> [PATCH 1/3] Revert "ACPI,PCI,IRQ: reduce static IRQ array size to 16"
> [PATCH 2/3] ACPI, PCI IRQ: add PCI_USING penalty for ISA interrupts
> [PATCH 3/3] Revert "ACPI,PCI,IRQ: remove SCI penalize function"
>
> Can we have some testing coverage? and eventually have tested-by?

Works on two affected machines. More tests tomorrow.

-- 
Ondrej Zary
[0.00] Linux version 4.8.0-rc8+ (zary@gsql) (gcc version 4.7.2 (Debian 
4.7.2-5) ) #134 SMP Sun Oct 2 15:13:50 CEST 2016
[0.00] x86/fpu: Legacy x87 FPU detected.
[0.00] x86/fpu: Using 'eager' FPU context switches.
[0.00] e820: BIOS-provided physical RAM map:
[0.00] BIOS-e820: [mem 0x-0x0009fbff] usable
[0.00] BIOS-e820: [mem 0x0009fc00-0x0009] reserved
[0.00] BIOS-e820: [mem 0x000f-0x000f] reserved
[0.00] BIOS-e820: [mem 0x0010-0x1fffcfff] usable
[0.00] BIOS-e820: [mem 0x1fffd000-0x1fffefff] ACPI data
[0.00] BIOS-e820: [mem 0x1000-0x1fff] ACPI NVS
[0.00] BIOS-e820: [mem 0x-0x] reserved
[0.00] Notice: NX (Execute Disable) protection missing in CPU!
[0.00] Legacy DMI 2.0 present.
[0.00] DMI: System Manufacturer System Name/P2B, BIOS ASUS P2B ACPI 
BIOS Revision 1014 Beta 00308/01/02
[0.00] e820: update [mem 0x-0x0fff] usable ==> reserved
[0.00] e820: remove [mem 0x000a-0x000f] usable
[0.00] e820: last_pfn = 0x1fffd max_arch_pfn = 0x10
[0.00] MTRR default type: uncachable
[0.00] MTRR fixed ranges enabled:
[0.00]   0-9 write-back
[0.00]   A-A uncachable
[0.00]   B-B write-combining
[0.00]   C-C7FFF write-protect
[0.00]   C8000-F7FFF uncachable
[0.00]   F8000-FCFFF write-protect
[0.00]   FD000-F uncachable
[0.00] MTRR variable ranges enabled:
[0.00]   0 base 0 mask FE000 write-back
[0.00]   1 disabled
[0.00]   2 disabled
[0.00]   3 disabled
[0.00]   4 disabled
[0.00]   5 base 0D800 mask FF800 write-combining
[0.00]   6 disabled
[0.00]   7 disabled
[0.00] x86/PAT: PAT not supported by CPU.
[0.00] x86/PAT: Configuration [0-7]: WB  WT  UC- UC  WB  WT  UC- UC  
[0.00] initial memory mapped: [mem 0x-0x01bf]
[0.00] Base memory trampoline at [c009b000] 9b000 size 16384
[0.00] BRK [0x016b7000, 0x016b7fff] PGTABLE
[0.00] ACPI: Early table checksum verification disabled
[0.00] ACPI: RSDP 0x000F7F90 14 (v00 ASUS  )
[0.00] ACPI: RSDT 0x1FFFD000 2C (v01 ASUS   P2B  
42302E31 MSFT 31313031)
[0.00] ACPI: FACP 0x1FFFD080 74 (v01 ASUS   P2B  
42302E31 MSFT 31313031)
[0.00] ACPI: DSDT 0x1FFFD100 001BA8 (v01 ASUS   P2B  
1000 MSFT 0101)
[0.00] ACPI: FACS 0x1000 40
[0.00] ACPI: BOOT 0x1FFFD040 28 (v01 ASUS   P2B  
42302E31 MSFT 31313031)
[0.00] 0MB HIGHMEM available.
[0.00] 511MB LOWMEM available.
[0.00]   mapped low ram: 0 - 1fffd000
[0.00]   low ram: 0 - 1fffd000
[0.00] BRK [0x016b8000, 0x016b8fff] PGTABLE
[0.00] Zone ranges:
[0.00]   DMA  [mem 0x1000-0x00ff]
[0.00]   Normal   [mem 0x0100-0x1fffcfff]
[0.00]   HighMem  empty
[0.00] Movable zone start for each node
[0.00] Early memory node ranges
[0.00]   node   0: [mem 0x1000-0x0009efff]
[0.00]   node   0: [mem 0x0010-0x1fffcfff]
[0.00] Initmem setup node 0 [mem 0x1000-0x1fffcfff]
[0.00] On node 0 totalpages: 130971
[0.00] free_area_init_node: node 0, pgdat c15b17a0, node_mem_map 
dfbfd020
[0.00]   DMA zone: 32 pages used for memmap
[0.00]   DMA zone: 0 pages reserved
[0.00]   DMA zone: 3998 pages, LIFO batch:0
[0.00]   Normal zone: 992 pages used for memmap
[0.00]   Normal zone: 126973 pages, LIFO batch:31
[0.00] Using APIC driver default
[0.00] ACPI: PM-Timer IO Port: 0xe408
[0.00] smpboot: Allowing 1 CPUs, 0 hotplug CPUs
[0.00] Local APIC disabled by BIOS -- you can enable it with "lapic"
[0.00] APIC: disable apic facility
[0.00] APIC: switched to apic NOOP
[0.00] PM: Registered nosave 

Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-10-02 Thread Ondrej Zary
On Saturday 01 October 2016 19:49:17 Sinan Kaya wrote:
> On 9/30/2016 5:27 PM, Rafael J. Wysocki wrote:
> >>> >> What's the drawback, if any?
> >> >
> >> > I don't see any drawback to be honest.
> >
> > I'd go for it then, if Bjorn doesn't hate it.
>
> I posted a follow up patch a minute ago.
>
> [PATCH 1/3] Revert "ACPI,PCI,IRQ: reduce static IRQ array size to 16"
> [PATCH 2/3] ACPI, PCI IRQ: add PCI_USING penalty for ISA interrupts
> [PATCH 3/3] Revert "ACPI,PCI,IRQ: remove SCI penalize function"
>
> Can we have some testing coverage? and eventually have tested-by?

Works on two affected machines. More tests tomorrow.

-- 
Ondrej Zary
[0.00] Linux version 4.8.0-rc8+ (zary@gsql) (gcc version 4.7.2 (Debian 
4.7.2-5) ) #134 SMP Sun Oct 2 15:13:50 CEST 2016
[0.00] x86/fpu: Legacy x87 FPU detected.
[0.00] x86/fpu: Using 'eager' FPU context switches.
[0.00] e820: BIOS-provided physical RAM map:
[0.00] BIOS-e820: [mem 0x-0x0009fbff] usable
[0.00] BIOS-e820: [mem 0x0009fc00-0x0009] reserved
[0.00] BIOS-e820: [mem 0x000f-0x000f] reserved
[0.00] BIOS-e820: [mem 0x0010-0x1fffcfff] usable
[0.00] BIOS-e820: [mem 0x1fffd000-0x1fffefff] ACPI data
[0.00] BIOS-e820: [mem 0x1000-0x1fff] ACPI NVS
[0.00] BIOS-e820: [mem 0x-0x] reserved
[0.00] Notice: NX (Execute Disable) protection missing in CPU!
[0.00] Legacy DMI 2.0 present.
[0.00] DMI: System Manufacturer System Name/P2B, BIOS ASUS P2B ACPI 
BIOS Revision 1014 Beta 00308/01/02
[0.00] e820: update [mem 0x-0x0fff] usable ==> reserved
[0.00] e820: remove [mem 0x000a-0x000f] usable
[0.00] e820: last_pfn = 0x1fffd max_arch_pfn = 0x10
[0.00] MTRR default type: uncachable
[0.00] MTRR fixed ranges enabled:
[0.00]   0-9 write-back
[0.00]   A-A uncachable
[0.00]   B-B write-combining
[0.00]   C-C7FFF write-protect
[0.00]   C8000-F7FFF uncachable
[0.00]   F8000-FCFFF write-protect
[0.00]   FD000-F uncachable
[0.00] MTRR variable ranges enabled:
[0.00]   0 base 0 mask FE000 write-back
[0.00]   1 disabled
[0.00]   2 disabled
[0.00]   3 disabled
[0.00]   4 disabled
[0.00]   5 base 0D800 mask FF800 write-combining
[0.00]   6 disabled
[0.00]   7 disabled
[0.00] x86/PAT: PAT not supported by CPU.
[0.00] x86/PAT: Configuration [0-7]: WB  WT  UC- UC  WB  WT  UC- UC  
[0.00] initial memory mapped: [mem 0x-0x01bf]
[0.00] Base memory trampoline at [c009b000] 9b000 size 16384
[0.00] BRK [0x016b7000, 0x016b7fff] PGTABLE
[0.00] ACPI: Early table checksum verification disabled
[0.00] ACPI: RSDP 0x000F7F90 14 (v00 ASUS  )
[0.00] ACPI: RSDT 0x1FFFD000 2C (v01 ASUS   P2B  
42302E31 MSFT 31313031)
[0.00] ACPI: FACP 0x1FFFD080 74 (v01 ASUS   P2B  
42302E31 MSFT 31313031)
[0.00] ACPI: DSDT 0x1FFFD100 001BA8 (v01 ASUS   P2B  
1000 MSFT 0101)
[0.00] ACPI: FACS 0x1000 40
[0.00] ACPI: BOOT 0x1FFFD040 28 (v01 ASUS   P2B  
42302E31 MSFT 31313031)
[0.00] 0MB HIGHMEM available.
[0.00] 511MB LOWMEM available.
[0.00]   mapped low ram: 0 - 1fffd000
[0.00]   low ram: 0 - 1fffd000
[0.00] BRK [0x016b8000, 0x016b8fff] PGTABLE
[0.00] Zone ranges:
[0.00]   DMA  [mem 0x1000-0x00ff]
[0.00]   Normal   [mem 0x0100-0x1fffcfff]
[0.00]   HighMem  empty
[0.00] Movable zone start for each node
[0.00] Early memory node ranges
[0.00]   node   0: [mem 0x1000-0x0009efff]
[0.00]   node   0: [mem 0x0010-0x1fffcfff]
[0.00] Initmem setup node 0 [mem 0x1000-0x1fffcfff]
[0.00] On node 0 totalpages: 130971
[0.00] free_area_init_node: node 0, pgdat c15b17a0, node_mem_map 
dfbfd020
[0.00]   DMA zone: 32 pages used for memmap
[0.00]   DMA zone: 0 pages reserved
[0.00]   DMA zone: 3998 pages, LIFO batch:0
[0.00]   Normal zone: 992 pages used for memmap
[0.00]   Normal zone: 126973 pages, LIFO batch:31
[0.00] Using APIC driver default
[0.00] ACPI: PM-Timer IO Port: 0xe408
[0.00] smpboot: Allowing 1 CPUs, 0 hotplug CPUs
[0.00] Local APIC disabled by BIOS -- you can enable it with "lapic"
[0.00] APIC: disable apic facility
[0.00] APIC: switched to apic NOOP
[0.00] PM: Registered nosave 

Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-10-01 Thread Sinan Kaya
On 9/30/2016 5:27 PM, Rafael J. Wysocki wrote:
>>> >> What's the drawback, if any?
>> >
>> > I don't see any drawback to be honest.
> I'd go for it then, if Bjorn doesn't hate it.
> 

I posted a follow up patch a minute ago. 

[PATCH 1/3] Revert "ACPI,PCI,IRQ: reduce static IRQ array size to 16"
[PATCH 2/3] ACPI, PCI IRQ: add PCI_USING penalty for ISA interrupts
[PATCH 3/3] Revert "ACPI,PCI,IRQ: remove SCI penalize function"

Can we have some testing coverage? and eventually have tested-by?

-- 
Sinan Kaya
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm 
Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux 
Foundation Collaborative Project.


Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-10-01 Thread Sinan Kaya
On 9/30/2016 5:27 PM, Rafael J. Wysocki wrote:
>>> >> What's the drawback, if any?
>> >
>> > I don't see any drawback to be honest.
> I'd go for it then, if Bjorn doesn't hate it.
> 

I posted a follow up patch a minute ago. 

[PATCH 1/3] Revert "ACPI,PCI,IRQ: reduce static IRQ array size to 16"
[PATCH 2/3] ACPI, PCI IRQ: add PCI_USING penalty for ISA interrupts
[PATCH 3/3] Revert "ACPI,PCI,IRQ: remove SCI penalize function"

Can we have some testing coverage? and eventually have tested-by?

-- 
Sinan Kaya
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm 
Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux 
Foundation Collaborative Project.


Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-09-30 Thread Sinan Kaya
On 9/30/2016 5:27 PM, Rafael J. Wysocki wrote:
> On Fri, Sep 30, 2016 at 11:14 PM, Sinan Kaya  wrote:
>> On 9/30/2016 5:04 PM, Rafael J. Wysocki wrote:
>
> I hope it makes sense now. I tend to skip details sometimes. Feel free to
> send more questions.
>>> Thanks for the information!
>>>
>>> IIUC, basically, what you are proposing would be to restore the old
>>> penalizing method for IRQs in the 0-255 range and use the new approach
>>> for the rest, right?
>>
>> Correct.
>>
>>>
>>> What's the drawback, if any?
>>
>> I don't see any drawback to be honest.
> 
> I'd go for it then, if Bjorn doesn't hate it.

OK. I'll prep something.
Bjorn?

> 
>> The reason why I got rid of these ISA
>> API functions was to remove some of the x86ism from ACPI code. This was 
>> Bjorn's
>> request to clean it up and we failed in two places so far.
>>
>> 1. acpi_irq_penalty_init
>> 2. acpi_penalize_sci_irq
>>
>> and we ended up reverting both of these changes. The reverts are all because 
>> of the
>> fact that these APIs are called asynchronously without any coordination with 
>> the
>> PCI Link object or the interrupt controller driver about when it is a good 
>> time to be
>> called.
>>
>> During this debug, I learnt that acpi_penalize_isa_irq gets called before 
>> even ACPI
>> gets to initialize and relies on static IRQ array for keeping the penalties.
> 
> So maybe add some comments to that code to explain why things are
> arranged the way they are.  We may need/want to revisit it at one
> point and such comments will be very useful then.

Yeah, I think this code definitely needs some documentation. It ended up being
one of the most fragile places in the kernel. This is my 3rd attempt to 
rearrange
the code.

> 
> Thanks,
> Rafael
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


-- 
Sinan Kaya
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm 
Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux 
Foundation Collaborative Project.


Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-09-30 Thread Sinan Kaya
On 9/30/2016 5:27 PM, Rafael J. Wysocki wrote:
> On Fri, Sep 30, 2016 at 11:14 PM, Sinan Kaya  wrote:
>> On 9/30/2016 5:04 PM, Rafael J. Wysocki wrote:
>
> I hope it makes sense now. I tend to skip details sometimes. Feel free to
> send more questions.
>>> Thanks for the information!
>>>
>>> IIUC, basically, what you are proposing would be to restore the old
>>> penalizing method for IRQs in the 0-255 range and use the new approach
>>> for the rest, right?
>>
>> Correct.
>>
>>>
>>> What's the drawback, if any?
>>
>> I don't see any drawback to be honest.
> 
> I'd go for it then, if Bjorn doesn't hate it.

OK. I'll prep something.
Bjorn?

> 
>> The reason why I got rid of these ISA
>> API functions was to remove some of the x86ism from ACPI code. This was 
>> Bjorn's
>> request to clean it up and we failed in two places so far.
>>
>> 1. acpi_irq_penalty_init
>> 2. acpi_penalize_sci_irq
>>
>> and we ended up reverting both of these changes. The reverts are all because 
>> of the
>> fact that these APIs are called asynchronously without any coordination with 
>> the
>> PCI Link object or the interrupt controller driver about when it is a good 
>> time to be
>> called.
>>
>> During this debug, I learnt that acpi_penalize_isa_irq gets called before 
>> even ACPI
>> gets to initialize and relies on static IRQ array for keeping the penalties.
> 
> So maybe add some comments to that code to explain why things are
> arranged the way they are.  We may need/want to revisit it at one
> point and such comments will be very useful then.

Yeah, I think this code definitely needs some documentation. It ended up being
one of the most fragile places in the kernel. This is my 3rd attempt to 
rearrange
the code.

> 
> Thanks,
> Rafael
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


-- 
Sinan Kaya
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm 
Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux 
Foundation Collaborative Project.


Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-09-30 Thread Rafael J. Wysocki
On Fri, Sep 30, 2016 at 11:14 PM, Sinan Kaya  wrote:
> On 9/30/2016 5:04 PM, Rafael J. Wysocki wrote:
>>> >
>>> > I hope it makes sense now. I tend to skip details sometimes. Feel free to
>>> > send more questions.
>> Thanks for the information!
>>
>> IIUC, basically, what you are proposing would be to restore the old
>> penalizing method for IRQs in the 0-255 range and use the new approach
>> for the rest, right?
>
> Correct.
>
>>
>> What's the drawback, if any?
>
> I don't see any drawback to be honest.

I'd go for it then, if Bjorn doesn't hate it.

> The reason why I got rid of these ISA
> API functions was to remove some of the x86ism from ACPI code. This was 
> Bjorn's
> request to clean it up and we failed in two places so far.
>
> 1. acpi_irq_penalty_init
> 2. acpi_penalize_sci_irq
>
> and we ended up reverting both of these changes. The reverts are all because 
> of the
> fact that these APIs are called asynchronously without any coordination with 
> the
> PCI Link object or the interrupt controller driver about when it is a good 
> time to be
> called.
>
> During this debug, I learnt that acpi_penalize_isa_irq gets called before 
> even ACPI
> gets to initialize and relies on static IRQ array for keeping the penalties.

So maybe add some comments to that code to explain why things are
arranged the way they are.  We may need/want to revisit it at one
point and such comments will be very useful then.

Thanks,
Rafael


Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-09-30 Thread Rafael J. Wysocki
On Fri, Sep 30, 2016 at 11:14 PM, Sinan Kaya  wrote:
> On 9/30/2016 5:04 PM, Rafael J. Wysocki wrote:
>>> >
>>> > I hope it makes sense now. I tend to skip details sometimes. Feel free to
>>> > send more questions.
>> Thanks for the information!
>>
>> IIUC, basically, what you are proposing would be to restore the old
>> penalizing method for IRQs in the 0-255 range and use the new approach
>> for the rest, right?
>
> Correct.
>
>>
>> What's the drawback, if any?
>
> I don't see any drawback to be honest.

I'd go for it then, if Bjorn doesn't hate it.

> The reason why I got rid of these ISA
> API functions was to remove some of the x86ism from ACPI code. This was 
> Bjorn's
> request to clean it up and we failed in two places so far.
>
> 1. acpi_irq_penalty_init
> 2. acpi_penalize_sci_irq
>
> and we ended up reverting both of these changes. The reverts are all because 
> of the
> fact that these APIs are called asynchronously without any coordination with 
> the
> PCI Link object or the interrupt controller driver about when it is a good 
> time to be
> called.
>
> During this debug, I learnt that acpi_penalize_isa_irq gets called before 
> even ACPI
> gets to initialize and relies on static IRQ array for keeping the penalties.

So maybe add some comments to that code to explain why things are
arranged the way they are.  We may need/want to revisit it at one
point and such comments will be very useful then.

Thanks,
Rafael


Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-09-30 Thread Sinan Kaya
On 9/30/2016 5:04 PM, Rafael J. Wysocki wrote:
>> >
>> > I hope it makes sense now. I tend to skip details sometimes. Feel free to
>> > send more questions.
> Thanks for the information!
> 
> IIUC, basically, what you are proposing would be to restore the old
> penalizing method for IRQs in the 0-255 range and use the new approach
> for the rest, right?

Correct. 

> 
> What's the drawback, if any?

I don't see any drawback to be honest. The reason why I got rid of these ISA
API functions was to remove some of the x86ism from ACPI code. This was Bjorn's
request to clean it up and we failed in two places so far. 

1. acpi_irq_penalty_init
2. acpi_penalize_sci_irq

and we ended up reverting both of these changes. The reverts are all because of 
the
fact that these APIs are called asynchronously without any coordination with the
PCI Link object or the interrupt controller driver about when it is a good time 
to be
called.

During this debug, I learnt that acpi_penalize_isa_irq gets called before even 
ACPI
gets to initialize and relies on static IRQ array for keeping the penalties.

> 
> Thanks,
> Rafael
> 


-- 
Sinan Kaya
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm 
Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux 
Foundation Collaborative Project.


Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-09-30 Thread Sinan Kaya
On 9/30/2016 5:04 PM, Rafael J. Wysocki wrote:
>> >
>> > I hope it makes sense now. I tend to skip details sometimes. Feel free to
>> > send more questions.
> Thanks for the information!
> 
> IIUC, basically, what you are proposing would be to restore the old
> penalizing method for IRQs in the 0-255 range and use the new approach
> for the rest, right?

Correct. 

> 
> What's the drawback, if any?

I don't see any drawback to be honest. The reason why I got rid of these ISA
API functions was to remove some of the x86ism from ACPI code. This was Bjorn's
request to clean it up and we failed in two places so far. 

1. acpi_irq_penalty_init
2. acpi_penalize_sci_irq

and we ended up reverting both of these changes. The reverts are all because of 
the
fact that these APIs are called asynchronously without any coordination with the
PCI Link object or the interrupt controller driver about when it is a good time 
to be
called.

During this debug, I learnt that acpi_penalize_isa_irq gets called before even 
ACPI
gets to initialize and relies on static IRQ array for keeping the penalties.

> 
> Thanks,
> Rafael
> 


-- 
Sinan Kaya
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm 
Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux 
Foundation Collaborative Project.


Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-09-30 Thread Rafael J. Wysocki
On Fri, Sep 30, 2016 at 10:24 PM, Sinan Kaya  wrote:
> On 9/30/2016 3:39 PM, Rafael J. Wysocki wrote:
>>> how do we feel about increasing the ISA IRQ range to 256 so that
>>> > we are safe for all SCI interrupts?
>> I'm not sure how this is related to the problem at hand.  Care to elaborate?
>>
>
> Sure, let me explain.
>

[cut]

>
> I hope it makes sense now. I tend to skip details sometimes. Feel free to
> send more questions.

Thanks for the information!

IIUC, basically, what you are proposing would be to restore the old
penalizing method for IRQs in the 0-255 range and use the new approach
for the rest, right?

What's the drawback, if any?

Thanks,
Rafael


Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-09-30 Thread Rafael J. Wysocki
On Fri, Sep 30, 2016 at 10:24 PM, Sinan Kaya  wrote:
> On 9/30/2016 3:39 PM, Rafael J. Wysocki wrote:
>>> how do we feel about increasing the ISA IRQ range to 256 so that
>>> > we are safe for all SCI interrupts?
>> I'm not sure how this is related to the problem at hand.  Care to elaborate?
>>
>
> Sure, let me explain.
>

[cut]

>
> I hope it makes sense now. I tend to skip details sometimes. Feel free to
> send more questions.

Thanks for the information!

IIUC, basically, what you are proposing would be to restore the old
penalizing method for IRQs in the 0-255 range and use the new approach
for the rest, right?

What's the drawback, if any?

Thanks,
Rafael


Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-09-30 Thread Sinan Kaya
On 9/30/2016 3:39 PM, Rafael J. Wysocki wrote:
>> how do we feel about increasing the ISA IRQ range to 256 so that
>> > we are safe for all SCI interrupts?
> I'm not sure how this is related to the problem at hand.  Care to elaborate?
> 

Sure, let me explain. 

The code maintains a static array per IRQ number (acpi_irq_penalty) to assign 
penalties for each IRQ so that during the Link Object allocation, the code 
tries to choose an IRQ with less penalty that has not been used by another 
PCI/IRQ if possible.

In the kernels prior to my change, the type of the SCI
interrupt is given to the ACPI PCI Link driver via this function.

+void acpi_penalize_sci_irq(int irq, int trigger, int polarity)
+{
+   if (irq >= 0 && irq < ARRAY_SIZE(acpi_irq_penalty)) {
+   if (trigger != ACPI_MADT_TRIGGER_LEVEL ||
+   polarity != ACPI_MADT_POLARITY_ACTIVE_LOW)
+   acpi_irq_penalty[irq] += PIRQ_PENALTY_ISA_ALWAYS;
+   else
+   acpi_irq_penalty[irq] += PIRQ_PENALTY_PCI_USING;
+   }
+}

This function says given the trigger and polarity, if it is ACTIVE_LOW and LEVEL
then increment the penalty by PCI_USING. It also does some ACPI parameter 
checking and assigns ISA_ALWAYS if the parameters are not compatible so that
this IRQ is never used for PCI. ISA_AKWAYS is the maximum penalty that can 
be assigned.

> And why exactly was that race condition not present before your changes?
The size of acpi_irq_penalty array used to be 256. This number puts an 
artificial limit on the IRQ numbers that can be assigned to PCI. ACPI spec does
not put any limits on the PCI numbers and extended IRQ resources can be used
for this purpose. 

During my patch, three things happened:
1. acpi_irq_penalty got renamed to acpi_isa_irq_penalty and the array size was 
reduced to 16 from 256.
2. Since we have no idea about the range of PCI interrupts that can be assigned
through ACPI, we tried to refactor the code so that PCI interrupts are 
calculated
by the time API is called by walking the PCI Link list here.

static int acpi_irq_pci_sharing_penalty(int irq)

We don't have to preallocate a fixed size array this way and can support any PCI
numbers that we want.

While refactoring the code, we said we could take the next step and get rid of 
the
acpi_penalize_sci_irq function and calculate the penalty dynamically similar to
acpi_irq_pci_sharing_penalty function. 

The new way to determine if SCI interrupt parameters are compatible is as 
follows:

/*
* Penalize IRQ used by ACPI SCI. If ACPI SCI pin attributes conflict
* with PCI IRQ attributes, mark ACPI SCI as ISA_ALWAYS so it won't be
* use for PCI IRQs.
*/
if (irq == acpi_gbl_FADT.sci_interrupt) {
u32 type = irq_get_trigger_type(irq) & IRQ_TYPE_SENSE_MASK;

if (type != IRQ_TYPE_LEVEL_LOW)
penalty += PIRQ_PENALTY_ISA_ALWAYS;
else
penalty += PIRQ_PENALTY_PCI_USING;
}
  
This relies on irq_get_trigger_type function to return the correct type. 

I now remember that Bjorn indicated the race condition possibility in this 
thread
here.

https://lkml.org/lkml/2016/3/8/640

> > > This looks racy, because we test irq_get_trigger_type() without any
> > > kind of locking, and later acpi_register_gsi() calls
> > > irq_create_fwspec_mapping(), which looks like it sets the new trigger
> > > type.  But I don't know how to fix that.
> > 
> > Right, if that pci link allocation code can be executed concurrent, then you
> > might end up with problem, but isn't that a problem even without
> > irq_get_trigger_type()?

> Yes.  It's not a new problem, I just noticed it since we're thinking
> more about the details of what's happening here.

and this is exactly what we have hit in this thread. The value
irq_get_trigger_type(irq) returns does not match what was given with
acpi_penalize_sci_irq and we end up penalizing the PCI IRQ for no reason.

Since the issue is specific to SCI interrupts and SCI interrupts cannot be 
greater than 256, my proposal is 
1. restore the code for the SCI penalty like in my last email 
2. increase the array size back to 256
3. use the acpi_irq_pci_sharing_penalty only if IRQ number is greater than 256
and we know that IRQ numbers are not bounded and can go all the way up to
65535.

I hope it makes sense now. I tend to skip details sometimes. Feel free to
send more questions.

-- 
Sinan Kaya
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm 
Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux 
Foundation Collaborative Project.


Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-09-30 Thread Sinan Kaya
On 9/30/2016 3:39 PM, Rafael J. Wysocki wrote:
>> how do we feel about increasing the ISA IRQ range to 256 so that
>> > we are safe for all SCI interrupts?
> I'm not sure how this is related to the problem at hand.  Care to elaborate?
> 

Sure, let me explain. 

The code maintains a static array per IRQ number (acpi_irq_penalty) to assign 
penalties for each IRQ so that during the Link Object allocation, the code 
tries to choose an IRQ with less penalty that has not been used by another 
PCI/IRQ if possible.

In the kernels prior to my change, the type of the SCI
interrupt is given to the ACPI PCI Link driver via this function.

+void acpi_penalize_sci_irq(int irq, int trigger, int polarity)
+{
+   if (irq >= 0 && irq < ARRAY_SIZE(acpi_irq_penalty)) {
+   if (trigger != ACPI_MADT_TRIGGER_LEVEL ||
+   polarity != ACPI_MADT_POLARITY_ACTIVE_LOW)
+   acpi_irq_penalty[irq] += PIRQ_PENALTY_ISA_ALWAYS;
+   else
+   acpi_irq_penalty[irq] += PIRQ_PENALTY_PCI_USING;
+   }
+}

This function says given the trigger and polarity, if it is ACTIVE_LOW and LEVEL
then increment the penalty by PCI_USING. It also does some ACPI parameter 
checking and assigns ISA_ALWAYS if the parameters are not compatible so that
this IRQ is never used for PCI. ISA_AKWAYS is the maximum penalty that can 
be assigned.

> And why exactly was that race condition not present before your changes?
The size of acpi_irq_penalty array used to be 256. This number puts an 
artificial limit on the IRQ numbers that can be assigned to PCI. ACPI spec does
not put any limits on the PCI numbers and extended IRQ resources can be used
for this purpose. 

During my patch, three things happened:
1. acpi_irq_penalty got renamed to acpi_isa_irq_penalty and the array size was 
reduced to 16 from 256.
2. Since we have no idea about the range of PCI interrupts that can be assigned
through ACPI, we tried to refactor the code so that PCI interrupts are 
calculated
by the time API is called by walking the PCI Link list here.

static int acpi_irq_pci_sharing_penalty(int irq)

We don't have to preallocate a fixed size array this way and can support any PCI
numbers that we want.

While refactoring the code, we said we could take the next step and get rid of 
the
acpi_penalize_sci_irq function and calculate the penalty dynamically similar to
acpi_irq_pci_sharing_penalty function. 

The new way to determine if SCI interrupt parameters are compatible is as 
follows:

/*
* Penalize IRQ used by ACPI SCI. If ACPI SCI pin attributes conflict
* with PCI IRQ attributes, mark ACPI SCI as ISA_ALWAYS so it won't be
* use for PCI IRQs.
*/
if (irq == acpi_gbl_FADT.sci_interrupt) {
u32 type = irq_get_trigger_type(irq) & IRQ_TYPE_SENSE_MASK;

if (type != IRQ_TYPE_LEVEL_LOW)
penalty += PIRQ_PENALTY_ISA_ALWAYS;
else
penalty += PIRQ_PENALTY_PCI_USING;
}
  
This relies on irq_get_trigger_type function to return the correct type. 

I now remember that Bjorn indicated the race condition possibility in this 
thread
here.

https://lkml.org/lkml/2016/3/8/640

> > > This looks racy, because we test irq_get_trigger_type() without any
> > > kind of locking, and later acpi_register_gsi() calls
> > > irq_create_fwspec_mapping(), which looks like it sets the new trigger
> > > type.  But I don't know how to fix that.
> > 
> > Right, if that pci link allocation code can be executed concurrent, then you
> > might end up with problem, but isn't that a problem even without
> > irq_get_trigger_type()?

> Yes.  It's not a new problem, I just noticed it since we're thinking
> more about the details of what's happening here.

and this is exactly what we have hit in this thread. The value
irq_get_trigger_type(irq) returns does not match what was given with
acpi_penalize_sci_irq and we end up penalizing the PCI IRQ for no reason.

Since the issue is specific to SCI interrupts and SCI interrupts cannot be 
greater than 256, my proposal is 
1. restore the code for the SCI penalty like in my last email 
2. increase the array size back to 256
3. use the acpi_irq_pci_sharing_penalty only if IRQ number is greater than 256
and we know that IRQ numbers are not bounded and can go all the way up to
65535.

I hope it makes sense now. I tend to skip details sometimes. Feel free to
send more questions.

-- 
Sinan Kaya
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm 
Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux 
Foundation Collaborative Project.


Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-09-30 Thread Rafael J. Wysocki
On Fri, Sep 30, 2016 at 9:30 PM, Sinan Kaya  wrote:
> Rafael, Bjorn;
>
> On 9/30/2016 11:56 AM, Ondrej Zary wrote:
 It seems to work, at least on one machine.
>>> >
>>> > Ok, that comfirms my suspicion. We are  having trouble detecting sci
>>> > interrupt  type and we end up penalizing the wrong value.
>>> >
>>> > Can you try your other machines too?
>> Works on the 2nd one too.
>>
>>> > I need to do some research now.
>
> Thanks for the confirmation. I need to gather some opinion from Rafael and 
> Bjorn.
>
> The patch provided only handles SCI in the ISA IRQ range (<16)
>
> I looked at the ACPI spec. SCI interrupt is a two byte field:
>
> "SCI_INT byte 2 offset 46
>
> System vector the SCI interrupt is wired to in 8259 mode. On
> systems that do not contain the 8259, this field contains the
> Global System interrupt number of the SCI interrupt. OSPM is
> required to treat the ACPI SCI interrupt as a sharable, level,
> active low interrupt."
>
> Since we have a race condition between the time the IRQ is registered
> via the ISA API and the time it gets to the interrupt driver
> since irq_get_type function is not matching what SCI API indicated.
>
> how do we feel about increasing the ISA IRQ range to 256 so that
> we are safe for all SCI interrupts?

I'm not sure how this is related to the problem at hand.  Care to elaborate?

And why exactly was that race condition not present before your changes?

Thanks,
Rafael


Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-09-30 Thread Rafael J. Wysocki
On Fri, Sep 30, 2016 at 9:30 PM, Sinan Kaya  wrote:
> Rafael, Bjorn;
>
> On 9/30/2016 11:56 AM, Ondrej Zary wrote:
 It seems to work, at least on one machine.
>>> >
>>> > Ok, that comfirms my suspicion. We are  having trouble detecting sci
>>> > interrupt  type and we end up penalizing the wrong value.
>>> >
>>> > Can you try your other machines too?
>> Works on the 2nd one too.
>>
>>> > I need to do some research now.
>
> Thanks for the confirmation. I need to gather some opinion from Rafael and 
> Bjorn.
>
> The patch provided only handles SCI in the ISA IRQ range (<16)
>
> I looked at the ACPI spec. SCI interrupt is a two byte field:
>
> "SCI_INT byte 2 offset 46
>
> System vector the SCI interrupt is wired to in 8259 mode. On
> systems that do not contain the 8259, this field contains the
> Global System interrupt number of the SCI interrupt. OSPM is
> required to treat the ACPI SCI interrupt as a sharable, level,
> active low interrupt."
>
> Since we have a race condition between the time the IRQ is registered
> via the ISA API and the time it gets to the interrupt driver
> since irq_get_type function is not matching what SCI API indicated.
>
> how do we feel about increasing the ISA IRQ range to 256 so that
> we are safe for all SCI interrupts?

I'm not sure how this is related to the problem at hand.  Care to elaborate?

And why exactly was that race condition not present before your changes?

Thanks,
Rafael


Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-09-30 Thread Sinan Kaya
Rafael, Bjorn;

On 9/30/2016 11:56 AM, Ondrej Zary wrote:
>>> It seems to work, at least on one machine.
>> >
>> > Ok, that comfirms my suspicion. We are  having trouble detecting sci
>> > interrupt  type and we end up penalizing the wrong value.
>> >
>> > Can you try your other machines too?
> Works on the 2nd one too.
> 
>> > I need to do some research now.

Thanks for the confirmation. I need to gather some opinion from Rafael and 
Bjorn.

The patch provided only handles SCI in the ISA IRQ range (<16)

I looked at the ACPI spec. SCI interrupt is a two byte field:

"SCI_INT byte 2 offset 46 

System vector the SCI interrupt is wired to in 8259 mode. On
systems that do not contain the 8259, this field contains the
Global System interrupt number of the SCI interrupt. OSPM is
required to treat the ACPI SCI interrupt as a sharable, level,
active low interrupt."

Since we have a race condition between the time the IRQ is registered
via the ISA API and the time it gets to the interrupt driver
since irq_get_type function is not matching what SCI API indicated.

how do we feel about increasing the ISA IRQ range to 256 so that
we are safe for all SCI interrupts? 

Do you have any other recommendation?

-- 
Sinan Kaya
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm 
Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux 
Foundation Collaborative Project.


Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-09-30 Thread Sinan Kaya
Rafael, Bjorn;

On 9/30/2016 11:56 AM, Ondrej Zary wrote:
>>> It seems to work, at least on one machine.
>> >
>> > Ok, that comfirms my suspicion. We are  having trouble detecting sci
>> > interrupt  type and we end up penalizing the wrong value.
>> >
>> > Can you try your other machines too?
> Works on the 2nd one too.
> 
>> > I need to do some research now.

Thanks for the confirmation. I need to gather some opinion from Rafael and 
Bjorn.

The patch provided only handles SCI in the ISA IRQ range (<16)

I looked at the ACPI spec. SCI interrupt is a two byte field:

"SCI_INT byte 2 offset 46 

System vector the SCI interrupt is wired to in 8259 mode. On
systems that do not contain the 8259, this field contains the
Global System interrupt number of the SCI interrupt. OSPM is
required to treat the ACPI SCI interrupt as a sharable, level,
active low interrupt."

Since we have a race condition between the time the IRQ is registered
via the ISA API and the time it gets to the interrupt driver
since irq_get_type function is not matching what SCI API indicated.

how do we feel about increasing the ISA IRQ range to 256 so that
we are safe for all SCI interrupts? 

Do you have any other recommendation?

-- 
Sinan Kaya
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm 
Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux 
Foundation Collaborative Project.


Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-09-30 Thread Ondrej Zary
On Friday 30 September 2016 15:14:42 ok...@codeaurora.org wrote:
> On 2016-09-30 02:44, Ondrej Zary wrote:
> > On Friday 30 September 2016, Sinan Kaya wrote:
> >> On 9/29/2016 2:00 PM, Ondrej Zary wrote:
> >> >> The previous two patches were in the right direction.
> >> >>
> >> >> > Can we also get the same output from 4.6 kernel with the attached
> >> >> > patch for the same machine you sent these?
> >> >
> >> > Here it is.
> >> >
> >> >> > Something about SCI still doesn't feel right.
> >> >> >
> >> >> > The IRQ assignment fails if the penalty is greater than
> >> >> > PIRQ_PENALTY_ISA_ALWAYS. This will happen if BIOS tells us to use
> >> >> > an IRQ and same IRQ is in use by the SCI.
> >>
> >> Thanks, I reverted penalize_sci function and dropped patch #1. Can you
> >> try
> >> this again?
> >
> > It seems to work, at least on one machine.
>
> Ok, that comfirms my suspicion. We are  having trouble detecting sci
> interrupt  type and we end up penalizing the wrong value.
>
> Can you try your other machines too?

Works on the 2nd one too.

> I need to do some research now.


-- 
Ondrej Zary
[0.00] Linux version 4.8.0-rc8+ (zary@gsql) (gcc version 4.7.2 (Debian 
4.7.2-5) ) #131 SMP Fri Sep 30 17:47:43 CEST 2016
[0.00] x86/fpu: Legacy x87 FPU detected.
[0.00] x86/fpu: Using 'eager' FPU context switches.
[0.00] e820: BIOS-provided physical RAM map:
[0.00] BIOS-e820: [mem 0x-0x0009fbff] usable
[0.00] BIOS-e820: [mem 0x0009fc00-0x0009] reserved
[0.00] BIOS-e820: [mem 0x000f-0x000f] reserved
[0.00] BIOS-e820: [mem 0x0010-0x1ffe] usable
[0.00] BIOS-e820: [mem 0x1fff-0x1fff2fff] ACPI NVS
[0.00] BIOS-e820: [mem 0x1fff3000-0x1fff] ACPI data
[0.00] BIOS-e820: [mem 0x-0x] reserved
[0.00] Notice: NX (Execute Disable) protection missing in CPU!
[0.00] SMBIOS 2.2 present.
[0.00] DMI: VIA Technologies, Inc. VT82C694X/694X, BIOS 6.00 PG 
02/19/2002
[0.00] e820: update [mem 0x-0x0fff] usable ==> reserved
[0.00] e820: remove [mem 0x000a-0x000f] usable
[0.00] e820: last_pfn = 0x1fff0 max_arch_pfn = 0x10
[0.00] MTRR default type: uncachable
[0.00] MTRR fixed ranges enabled:
[0.00]   0-9 write-back
[0.00]   A-A uncachable
[0.00]   B-B write-combining
[0.00]   C-C9FFF write-protect
[0.00]   CA000-E uncachable
[0.00]   F-F7FFF write-through
[0.00]   F8000-F8FFF uncachable
[0.00]   F9000-F write-through
[0.00] MTRR variable ranges enabled:
[0.00]   0 base 0 mask FE000 write-back
[0.00]   1 base 0E000 mask FFC00 write-combining
[0.00]   2 disabled
[0.00]   3 disabled
[0.00]   4 disabled
[0.00]   5 disabled
[0.00]   6 disabled
[0.00]   7 disabled
[0.00] x86/PAT: PAT not supported by CPU.
[0.00] x86/PAT: Configuration [0-7]: WB  WT  UC- UC  WB  WT  UC- UC  
[0.00] initial memory mapped: [mem 0x-0x01bf]
[0.00] Base memory trampoline at [c009b000] 9b000 size 16384
[0.00] BRK [0x016b6000, 0x016b6fff] PGTABLE
[0.00] ACPI: Early table checksum verification disabled
[0.00] ACPI: RSDP 0x000F6C00 14 (v00 VIA694)
[0.00] ACPI: RSDT 0x1FFF3000 28 (v01 VIA694 AWRDACPI 
42302E31 AWRD )
[0.00] ACPI: FACP 0x1FFF3040 74 (v01 VIA694 AWRDACPI 
42302E31 AWRD )
[0.00] ACPI: DSDT 0x1FFF30C0 002587 (v01 VIA694 AWRDACPI 
1000 MSFT 010C)
[0.00] ACPI: FACS 0x1FFF 40
[0.00] 0MB HIGHMEM available.
[0.00] 511MB LOWMEM available.
[0.00]   mapped low ram: 0 - 1fff
[0.00]   low ram: 0 - 1fff
[0.00] BRK [0x016b7000, 0x016b7fff] PGTABLE
[0.00] Zone ranges:
[0.00]   DMA  [mem 0x1000-0x00ff]
[0.00]   Normal   [mem 0x0100-0x1ffe]
[0.00]   HighMem  empty
[0.00] Movable zone start for each node
[0.00] Early memory node ranges
[0.00]   node   0: [mem 0x1000-0x0009efff]
[0.00]   node   0: [mem 0x0010-0x1ffe]
[0.00] Initmem setup node 0 [mem 0x1000-0x1ffe]
[0.00] On node 0 totalpages: 130958
[0.00] free_area_init_node: node 0, pgdat c15b13e0, node_mem_map 
dfbf0020
[0.00]   DMA zone: 32 pages used for memmap
[0.00]   DMA zone: 0 pages reserved
[0.00]   DMA zone: 3998 pages, LIFO batch:0
[0.00]   Normal zone: 992 pages used for memmap
[0.00]   Normal zone: 126960 pages, LIFO 

Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-09-30 Thread Ondrej Zary
On Friday 30 September 2016 15:14:42 ok...@codeaurora.org wrote:
> On 2016-09-30 02:44, Ondrej Zary wrote:
> > On Friday 30 September 2016, Sinan Kaya wrote:
> >> On 9/29/2016 2:00 PM, Ondrej Zary wrote:
> >> >> The previous two patches were in the right direction.
> >> >>
> >> >> > Can we also get the same output from 4.6 kernel with the attached
> >> >> > patch for the same machine you sent these?
> >> >
> >> > Here it is.
> >> >
> >> >> > Something about SCI still doesn't feel right.
> >> >> >
> >> >> > The IRQ assignment fails if the penalty is greater than
> >> >> > PIRQ_PENALTY_ISA_ALWAYS. This will happen if BIOS tells us to use
> >> >> > an IRQ and same IRQ is in use by the SCI.
> >>
> >> Thanks, I reverted penalize_sci function and dropped patch #1. Can you
> >> try
> >> this again?
> >
> > It seems to work, at least on one machine.
>
> Ok, that comfirms my suspicion. We are  having trouble detecting sci
> interrupt  type and we end up penalizing the wrong value.
>
> Can you try your other machines too?

Works on the 2nd one too.

> I need to do some research now.


-- 
Ondrej Zary
[0.00] Linux version 4.8.0-rc8+ (zary@gsql) (gcc version 4.7.2 (Debian 
4.7.2-5) ) #131 SMP Fri Sep 30 17:47:43 CEST 2016
[0.00] x86/fpu: Legacy x87 FPU detected.
[0.00] x86/fpu: Using 'eager' FPU context switches.
[0.00] e820: BIOS-provided physical RAM map:
[0.00] BIOS-e820: [mem 0x-0x0009fbff] usable
[0.00] BIOS-e820: [mem 0x0009fc00-0x0009] reserved
[0.00] BIOS-e820: [mem 0x000f-0x000f] reserved
[0.00] BIOS-e820: [mem 0x0010-0x1ffe] usable
[0.00] BIOS-e820: [mem 0x1fff-0x1fff2fff] ACPI NVS
[0.00] BIOS-e820: [mem 0x1fff3000-0x1fff] ACPI data
[0.00] BIOS-e820: [mem 0x-0x] reserved
[0.00] Notice: NX (Execute Disable) protection missing in CPU!
[0.00] SMBIOS 2.2 present.
[0.00] DMI: VIA Technologies, Inc. VT82C694X/694X, BIOS 6.00 PG 
02/19/2002
[0.00] e820: update [mem 0x-0x0fff] usable ==> reserved
[0.00] e820: remove [mem 0x000a-0x000f] usable
[0.00] e820: last_pfn = 0x1fff0 max_arch_pfn = 0x10
[0.00] MTRR default type: uncachable
[0.00] MTRR fixed ranges enabled:
[0.00]   0-9 write-back
[0.00]   A-A uncachable
[0.00]   B-B write-combining
[0.00]   C-C9FFF write-protect
[0.00]   CA000-E uncachable
[0.00]   F-F7FFF write-through
[0.00]   F8000-F8FFF uncachable
[0.00]   F9000-F write-through
[0.00] MTRR variable ranges enabled:
[0.00]   0 base 0 mask FE000 write-back
[0.00]   1 base 0E000 mask FFC00 write-combining
[0.00]   2 disabled
[0.00]   3 disabled
[0.00]   4 disabled
[0.00]   5 disabled
[0.00]   6 disabled
[0.00]   7 disabled
[0.00] x86/PAT: PAT not supported by CPU.
[0.00] x86/PAT: Configuration [0-7]: WB  WT  UC- UC  WB  WT  UC- UC  
[0.00] initial memory mapped: [mem 0x-0x01bf]
[0.00] Base memory trampoline at [c009b000] 9b000 size 16384
[0.00] BRK [0x016b6000, 0x016b6fff] PGTABLE
[0.00] ACPI: Early table checksum verification disabled
[0.00] ACPI: RSDP 0x000F6C00 14 (v00 VIA694)
[0.00] ACPI: RSDT 0x1FFF3000 28 (v01 VIA694 AWRDACPI 
42302E31 AWRD )
[0.00] ACPI: FACP 0x1FFF3040 74 (v01 VIA694 AWRDACPI 
42302E31 AWRD )
[0.00] ACPI: DSDT 0x1FFF30C0 002587 (v01 VIA694 AWRDACPI 
1000 MSFT 010C)
[0.00] ACPI: FACS 0x1FFF 40
[0.00] 0MB HIGHMEM available.
[0.00] 511MB LOWMEM available.
[0.00]   mapped low ram: 0 - 1fff
[0.00]   low ram: 0 - 1fff
[0.00] BRK [0x016b7000, 0x016b7fff] PGTABLE
[0.00] Zone ranges:
[0.00]   DMA  [mem 0x1000-0x00ff]
[0.00]   Normal   [mem 0x0100-0x1ffe]
[0.00]   HighMem  empty
[0.00] Movable zone start for each node
[0.00] Early memory node ranges
[0.00]   node   0: [mem 0x1000-0x0009efff]
[0.00]   node   0: [mem 0x0010-0x1ffe]
[0.00] Initmem setup node 0 [mem 0x1000-0x1ffe]
[0.00] On node 0 totalpages: 130958
[0.00] free_area_init_node: node 0, pgdat c15b13e0, node_mem_map 
dfbf0020
[0.00]   DMA zone: 32 pages used for memmap
[0.00]   DMA zone: 0 pages reserved
[0.00]   DMA zone: 3998 pages, LIFO batch:0
[0.00]   Normal zone: 992 pages used for memmap
[0.00]   Normal zone: 126960 pages, LIFO 

Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-09-30 Thread okaya

On 2016-09-30 02:44, Ondrej Zary wrote:

On Friday 30 September 2016, Sinan Kaya wrote:

On 9/29/2016 2:00 PM, Ondrej Zary wrote:
>> The previous two patches were in the right direction.
>>
>> > Can we also get the same output from 4.6 kernel with the attached
>> > patch for the same machine you sent these?
>
> Here it is.
>
>> > Something about SCI still doesn't feel right.
>> >
>> > The IRQ assignment fails if the penalty is greater than
>> > PIRQ_PENALTY_ISA_ALWAYS. This will happen if BIOS tells us to use an
>> > IRQ and same IRQ is in use by the SCI.

Thanks, I reverted penalize_sci function and dropped patch #1. Can you 
try

this again?


It seems to work, at least on one machine.


Ok, that comfirms my suspicion. We are  having trouble detecting sci 
interrupt  type and we end up penalizing the wrong value.


Can you try your other machines too?

I need to do some research now.


Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-09-30 Thread okaya

On 2016-09-30 02:44, Ondrej Zary wrote:

On Friday 30 September 2016, Sinan Kaya wrote:

On 9/29/2016 2:00 PM, Ondrej Zary wrote:
>> The previous two patches were in the right direction.
>>
>> > Can we also get the same output from 4.6 kernel with the attached
>> > patch for the same machine you sent these?
>
> Here it is.
>
>> > Something about SCI still doesn't feel right.
>> >
>> > The IRQ assignment fails if the penalty is greater than
>> > PIRQ_PENALTY_ISA_ALWAYS. This will happen if BIOS tells us to use an
>> > IRQ and same IRQ is in use by the SCI.

Thanks, I reverted penalize_sci function and dropped patch #1. Can you 
try

this again?


It seems to work, at least on one machine.


Ok, that comfirms my suspicion. We are  having trouble detecting sci 
interrupt  type and we end up penalizing the wrong value.


Can you try your other machines too?

I need to do some research now.


Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-09-30 Thread Ondrej Zary
On Friday 30 September 2016, Sinan Kaya wrote:
> On 9/29/2016 2:00 PM, Ondrej Zary wrote:
> >> The previous two patches were in the right direction.
> >>
> >> > Can we also get the same output from 4.6 kernel with the attached
> >> > patch for the same machine you sent these?
> >
> > Here it is.
> >
> >> > Something about SCI still doesn't feel right.
> >> >
> >> > The IRQ assignment fails if the penalty is greater than
> >> > PIRQ_PENALTY_ISA_ALWAYS. This will happen if BIOS tells us to use an
> >> > IRQ and same IRQ is in use by the SCI.
>
> Thanks, I reverted penalize_sci function and dropped patch #1. Can you try
> this again?

It seems to work, at least on one machine.

-- 
Ondrej Zary
[0.00] Linux version 4.8.0-rc8+ (zary@gsql) (gcc version 4.7.2 (Debian 
4.7.2-5) ) #130 SMP Fri Sep 30 08:33:00 CEST 2016
[0.00] x86/fpu: Legacy x87 FPU detected.
[0.00] x86/fpu: Using 'eager' FPU context switches.
[0.00] e820: BIOS-provided physical RAM map:
[0.00] BIOS-e820: [mem 0x-0x0009fbff] usable
[0.00] BIOS-e820: [mem 0x0009fc00-0x0009] reserved
[0.00] BIOS-e820: [mem 0x000f-0x000f] reserved
[0.00] BIOS-e820: [mem 0x0010-0x077fbfff] usable
[0.00] BIOS-e820: [mem 0x077fc000-0x077fefff] ACPI data
[0.00] BIOS-e820: [mem 0x077ff000-0x077f] ACPI NVS
[0.00] BIOS-e820: [mem 0x-0x] reserved
[0.00] Notice: NX (Execute Disable) protection missing in CPU!
[0.00] SMBIOS 2.3 present.
[0.00] DMI: System Manufacturer System Name/A7VL133, BIOS ASUS 
A7VL133-VM ACPI BIOS Revision 1008 06/10/2002
[0.00] e820: update [mem 0x-0x0fff] usable ==> reserved
[0.00] e820: remove [mem 0x000a-0x000f] usable
[0.00] e820: last_pfn = 0x77fc max_arch_pfn = 0x10
[0.00] MTRR default type: uncachable
[0.00] MTRR fixed ranges enabled:
[0.00]   0-9 write-back
[0.00]   A-A uncachable
[0.00]   B-B write-combining
[0.00]   C-F uncachable
[0.00] MTRR variable ranges enabled:
[0.00]   0 base 0 mask FFC00 write-back
[0.00]   1 base 00400 mask FFE00 write-back
[0.00]   2 base 00600 mask FFF00 write-back
[0.00]   3 base 00700 mask FFF80 write-back
[0.00]   4 base 0F000 mask FF800 write-combining
[0.00]   5 disabled
[0.00]   6 disabled
[0.00]   7 base 0F800 mask FFC00 write-combining
[0.00] x86/PAT: Configuration [0-7]: WB  WC  UC- UC  WB  WC  UC- WT  
[0.00] initial memory mapped: [mem 0x-0x01bf]
[0.00] Base memory trampoline at [c009b000] 9b000 size 16384
[0.00] BRK [0x016b6000, 0x016b6fff] PGTABLE
[0.00] ACPI: Early table checksum verification disabled
[0.00] ACPI: RSDP 0x000F6DA0 14 (v00 ASUS  )
[0.00] ACPI: RSDT 0x077FC000 2C (v01 ASUS   A7VL133  
30303031 MSFT 31313031)
[0.00] ACPI: FACP 0x077FC080 74 (v01 ASUS   A7VL133  
30303031 MSFT 31313031)
[0.00] ACPI: DSDT 0x077FC100 0027F0 (v01 ASUS   A7VL133  
1000 MSFT 010B)
[0.00] ACPI: FACS 0x077FF000 40
[0.00] ACPI: BOOT 0x077FC040 28 (v01 ASUS   A7VL133  
30303031 MSFT 31313031)
[0.00] 0MB HIGHMEM available.
[0.00] 119MB LOWMEM available.
[0.00]   mapped low ram: 0 - 077fc000
[0.00]   low ram: 0 - 077fc000
[0.00] BRK [0x016b7000, 0x016b7fff] PGTABLE
[0.00] Zone ranges:
[0.00]   DMA  [mem 0x1000-0x00ff]
[0.00]   Normal   [mem 0x0100-0x077fbfff]
[0.00]   HighMem  empty
[0.00] Movable zone start for each node
[0.00] Early memory node ranges
[0.00]   node   0: [mem 0x1000-0x0009efff]
[0.00]   node   0: [mem 0x0010-0x077fbfff]
[0.00] Initmem setup node 0 [mem 0x1000-0x077fbfff]
[0.00] On node 0 totalpages: 30618
[0.00] free_area_init_node: node 0, pgdat c15b13e0, node_mem_map 
c770c020
[0.00]   DMA zone: 32 pages used for memmap
[0.00]   DMA zone: 0 pages reserved
[0.00]   DMA zone: 3998 pages, LIFO batch:0
[0.00]   Normal zone: 208 pages used for memmap
[0.00]   Normal zone: 26620 pages, LIFO batch:7
[0.00] Using APIC driver default
[0.00] ACPI: PM-Timer IO Port: 0xe408
[0.00] smpboot: Allowing 1 CPUs, 0 hotplug CPUs
[0.00] Local APIC disabled by BIOS -- you can enable it with "lapic"
[0.00] APIC: disable apic facility
[0.00] APIC: switched to apic NOOP
[0.00] PM: Registered nosave memory: [mem 

Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-09-30 Thread Ondrej Zary
On Friday 30 September 2016, Sinan Kaya wrote:
> On 9/29/2016 2:00 PM, Ondrej Zary wrote:
> >> The previous two patches were in the right direction.
> >>
> >> > Can we also get the same output from 4.6 kernel with the attached
> >> > patch for the same machine you sent these?
> >
> > Here it is.
> >
> >> > Something about SCI still doesn't feel right.
> >> >
> >> > The IRQ assignment fails if the penalty is greater than
> >> > PIRQ_PENALTY_ISA_ALWAYS. This will happen if BIOS tells us to use an
> >> > IRQ and same IRQ is in use by the SCI.
>
> Thanks, I reverted penalize_sci function and dropped patch #1. Can you try
> this again?

It seems to work, at least on one machine.

-- 
Ondrej Zary
[0.00] Linux version 4.8.0-rc8+ (zary@gsql) (gcc version 4.7.2 (Debian 
4.7.2-5) ) #130 SMP Fri Sep 30 08:33:00 CEST 2016
[0.00] x86/fpu: Legacy x87 FPU detected.
[0.00] x86/fpu: Using 'eager' FPU context switches.
[0.00] e820: BIOS-provided physical RAM map:
[0.00] BIOS-e820: [mem 0x-0x0009fbff] usable
[0.00] BIOS-e820: [mem 0x0009fc00-0x0009] reserved
[0.00] BIOS-e820: [mem 0x000f-0x000f] reserved
[0.00] BIOS-e820: [mem 0x0010-0x077fbfff] usable
[0.00] BIOS-e820: [mem 0x077fc000-0x077fefff] ACPI data
[0.00] BIOS-e820: [mem 0x077ff000-0x077f] ACPI NVS
[0.00] BIOS-e820: [mem 0x-0x] reserved
[0.00] Notice: NX (Execute Disable) protection missing in CPU!
[0.00] SMBIOS 2.3 present.
[0.00] DMI: System Manufacturer System Name/A7VL133, BIOS ASUS 
A7VL133-VM ACPI BIOS Revision 1008 06/10/2002
[0.00] e820: update [mem 0x-0x0fff] usable ==> reserved
[0.00] e820: remove [mem 0x000a-0x000f] usable
[0.00] e820: last_pfn = 0x77fc max_arch_pfn = 0x10
[0.00] MTRR default type: uncachable
[0.00] MTRR fixed ranges enabled:
[0.00]   0-9 write-back
[0.00]   A-A uncachable
[0.00]   B-B write-combining
[0.00]   C-F uncachable
[0.00] MTRR variable ranges enabled:
[0.00]   0 base 0 mask FFC00 write-back
[0.00]   1 base 00400 mask FFE00 write-back
[0.00]   2 base 00600 mask FFF00 write-back
[0.00]   3 base 00700 mask FFF80 write-back
[0.00]   4 base 0F000 mask FF800 write-combining
[0.00]   5 disabled
[0.00]   6 disabled
[0.00]   7 base 0F800 mask FFC00 write-combining
[0.00] x86/PAT: Configuration [0-7]: WB  WC  UC- UC  WB  WC  UC- WT  
[0.00] initial memory mapped: [mem 0x-0x01bf]
[0.00] Base memory trampoline at [c009b000] 9b000 size 16384
[0.00] BRK [0x016b6000, 0x016b6fff] PGTABLE
[0.00] ACPI: Early table checksum verification disabled
[0.00] ACPI: RSDP 0x000F6DA0 14 (v00 ASUS  )
[0.00] ACPI: RSDT 0x077FC000 2C (v01 ASUS   A7VL133  
30303031 MSFT 31313031)
[0.00] ACPI: FACP 0x077FC080 74 (v01 ASUS   A7VL133  
30303031 MSFT 31313031)
[0.00] ACPI: DSDT 0x077FC100 0027F0 (v01 ASUS   A7VL133  
1000 MSFT 010B)
[0.00] ACPI: FACS 0x077FF000 40
[0.00] ACPI: BOOT 0x077FC040 28 (v01 ASUS   A7VL133  
30303031 MSFT 31313031)
[0.00] 0MB HIGHMEM available.
[0.00] 119MB LOWMEM available.
[0.00]   mapped low ram: 0 - 077fc000
[0.00]   low ram: 0 - 077fc000
[0.00] BRK [0x016b7000, 0x016b7fff] PGTABLE
[0.00] Zone ranges:
[0.00]   DMA  [mem 0x1000-0x00ff]
[0.00]   Normal   [mem 0x0100-0x077fbfff]
[0.00]   HighMem  empty
[0.00] Movable zone start for each node
[0.00] Early memory node ranges
[0.00]   node   0: [mem 0x1000-0x0009efff]
[0.00]   node   0: [mem 0x0010-0x077fbfff]
[0.00] Initmem setup node 0 [mem 0x1000-0x077fbfff]
[0.00] On node 0 totalpages: 30618
[0.00] free_area_init_node: node 0, pgdat c15b13e0, node_mem_map 
c770c020
[0.00]   DMA zone: 32 pages used for memmap
[0.00]   DMA zone: 0 pages reserved
[0.00]   DMA zone: 3998 pages, LIFO batch:0
[0.00]   Normal zone: 208 pages used for memmap
[0.00]   Normal zone: 26620 pages, LIFO batch:7
[0.00] Using APIC driver default
[0.00] ACPI: PM-Timer IO Port: 0xe408
[0.00] smpboot: Allowing 1 CPUs, 0 hotplug CPUs
[0.00] Local APIC disabled by BIOS -- you can enable it with "lapic"
[0.00] APIC: disable apic facility
[0.00] APIC: switched to apic NOOP
[0.00] PM: Registered nosave memory: [mem 

Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-09-29 Thread Sinan Kaya
On 9/29/2016 2:00 PM, Ondrej Zary wrote:
>> The previous two patches were in the right direction.
>> >
>> > Can we also get the same output from 4.6 kernel with the attached patch for
>> > the same machine you sent these?
> Here it is.
> 
>> > Something about SCI still doesn't feel right.
>> >
>> > The IRQ assignment fails if the penalty is greater than
>> > PIRQ_PENALTY_ISA_ALWAYS. This will happen if BIOS tells us to use an IRQ
>> > and same IRQ is in use by the SCI.

Thanks, I reverted penalize_sci function and dropped patch #1. Can you try this 
again?


-- 
Sinan Kaya
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm 
Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux 
Foundation Collaborative Project.
>From 7597c656222b27f4cc55c16bab980ed28ef22bbd Mon Sep 17 00:00:00 2001
From: Sinan Kaya 
Date: Thu, 29 Sep 2016 10:25:21 -0400
Subject: [PATCH 1/2] ACPI, PCI IRQ: add PCI_USING penalty for ISA interrupts

The change introduced in commit 103544d86976 ("ACPI,PCI,IRQ: reduce
resource requirements") removed PCI_USING penalty from
acpi_pci_link_allocate function as there is no longer a fixed size penalty
array for both PCI and IRQ interrupts.

We need to add the PCI_USING penalty for ISA interrupts too if the link is
in use and matches our ISA IRQ number.

Signed-off-by: Sinan Kaya 
---
 drivers/acpi/pci_link.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c
index c983bf7..a212709 100644
--- a/drivers/acpi/pci_link.c
+++ b/drivers/acpi/pci_link.c
@@ -619,6 +619,10 @@ static int acpi_pci_link_allocate(struct acpi_pci_link 
*link)
acpi_device_bid(link->device));
return -ENODEV;
} else {
+   if (link->irq.active < ACPI_MAX_ISA_IRQS)
+   acpi_isa_irq_penalty[link->irq.active] +=
+   PIRQ_PENALTY_PCI_USING;
+
printk(KERN_WARNING PREFIX "%s [%s] enabled at IRQ %d\n",
   acpi_device_name(link->device),
   acpi_device_bid(link->device), link->irq.active);
-- 
1.9.1

>From 1835481ebcc5bb649dcc22a2d473fd3b203bf01d Mon Sep 17 00:00:00 2001
From: Sinan Kaya 
Date: Thu, 29 Sep 2016 15:36:15 -0400
Subject: [PATCH 2/2] Revert "ACPI,PCI,IRQ: remove SCI penalize function"

This reverts commit 9e5ed6d1fb87 ("ACPI,PCI,IRQ: remove SCI penalize
function"). SCI penalty API was replaced by the runtime penalty calculation
based on the value of acpi_gbl_FADT.sci_interrupt.

acpi_gbl_FADT.sci_interrupt type does not get updated at the right time
for some platforms and results in incorrect penalty assignment for PCI
IRQs as irq_get_trigger_type returns the wrong type.

Signed-off-by: Sinan Kaya 
---
 arch/x86/kernel/acpi/boot.c |  1 +
 drivers/acpi/pci_link.c | 32 +---
 include/linux/acpi.h|  1 +
 3 files changed, 15 insertions(+), 19 deletions(-)

diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
index 90d84c3..0ffd26e 100644
--- a/arch/x86/kernel/acpi/boot.c
+++ b/arch/x86/kernel/acpi/boot.c
@@ -453,6 +453,7 @@ static void __init acpi_sci_ioapic_setup(u8 bus_irq, u16 
polarity, u16 trigger,
polarity = acpi_sci_flags & ACPI_MADT_POLARITY_MASK;
 
mp_override_legacy_irq(bus_irq, polarity, trigger, gsi);
+   acpi_penalize_sci_irq(bus_irq, trigger, polarity);
 
/*
 * stash over-ride to indicate we've been here
diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c
index a212709..1934e2a 100644
--- a/drivers/acpi/pci_link.c
+++ b/drivers/acpi/pci_link.c
@@ -494,27 +494,10 @@ static int acpi_irq_pci_sharing_penalty(int irq)
 
 static int acpi_irq_get_penalty(int irq)
 {
-   int penalty = 0;
-
-   /*
-   * Penalize IRQ used by ACPI SCI. If ACPI SCI pin attributes conflict
-   * with PCI IRQ attributes, mark ACPI SCI as ISA_ALWAYS so it won't be
-   * use for PCI IRQs.
-   */
-   if (irq == acpi_gbl_FADT.sci_interrupt) {
-   u32 type = irq_get_trigger_type(irq) & IRQ_TYPE_SENSE_MASK;
-
-   if (type != IRQ_TYPE_LEVEL_LOW)
-   penalty += PIRQ_PENALTY_ISA_ALWAYS;
-   else
-   penalty += PIRQ_PENALTY_PCI_USING;
-   }
-
if (irq < ACPI_MAX_ISA_IRQS)
-   return penalty + acpi_isa_irq_penalty[irq];
+   return acpi_isa_irq_penalty[irq];
 
-   penalty += acpi_irq_pci_sharing_penalty(irq);
-   return penalty;
+   return acpi_irq_pci_sharing_penalty(irq);
 }
 
 int __init acpi_irq_penalty_init(void)
@@ -885,6 +868,17 @@ bool acpi_isa_irq_available(int irq)
acpi_irq_get_penalty(irq) < PIRQ_PENALTY_ISA_ALWAYS);
 }
 
+void acpi_penalize_sci_irq(int irq, int trigger, int polarity)
+{
+   if (irq >= 0 && 

Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-09-29 Thread Sinan Kaya
On 9/29/2016 2:00 PM, Ondrej Zary wrote:
>> The previous two patches were in the right direction.
>> >
>> > Can we also get the same output from 4.6 kernel with the attached patch for
>> > the same machine you sent these?
> Here it is.
> 
>> > Something about SCI still doesn't feel right.
>> >
>> > The IRQ assignment fails if the penalty is greater than
>> > PIRQ_PENALTY_ISA_ALWAYS. This will happen if BIOS tells us to use an IRQ
>> > and same IRQ is in use by the SCI.

Thanks, I reverted penalize_sci function and dropped patch #1. Can you try this 
again?


-- 
Sinan Kaya
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm 
Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux 
Foundation Collaborative Project.
>From 7597c656222b27f4cc55c16bab980ed28ef22bbd Mon Sep 17 00:00:00 2001
From: Sinan Kaya 
Date: Thu, 29 Sep 2016 10:25:21 -0400
Subject: [PATCH 1/2] ACPI, PCI IRQ: add PCI_USING penalty for ISA interrupts

The change introduced in commit 103544d86976 ("ACPI,PCI,IRQ: reduce
resource requirements") removed PCI_USING penalty from
acpi_pci_link_allocate function as there is no longer a fixed size penalty
array for both PCI and IRQ interrupts.

We need to add the PCI_USING penalty for ISA interrupts too if the link is
in use and matches our ISA IRQ number.

Signed-off-by: Sinan Kaya 
---
 drivers/acpi/pci_link.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c
index c983bf7..a212709 100644
--- a/drivers/acpi/pci_link.c
+++ b/drivers/acpi/pci_link.c
@@ -619,6 +619,10 @@ static int acpi_pci_link_allocate(struct acpi_pci_link 
*link)
acpi_device_bid(link->device));
return -ENODEV;
} else {
+   if (link->irq.active < ACPI_MAX_ISA_IRQS)
+   acpi_isa_irq_penalty[link->irq.active] +=
+   PIRQ_PENALTY_PCI_USING;
+
printk(KERN_WARNING PREFIX "%s [%s] enabled at IRQ %d\n",
   acpi_device_name(link->device),
   acpi_device_bid(link->device), link->irq.active);
-- 
1.9.1

>From 1835481ebcc5bb649dcc22a2d473fd3b203bf01d Mon Sep 17 00:00:00 2001
From: Sinan Kaya 
Date: Thu, 29 Sep 2016 15:36:15 -0400
Subject: [PATCH 2/2] Revert "ACPI,PCI,IRQ: remove SCI penalize function"

This reverts commit 9e5ed6d1fb87 ("ACPI,PCI,IRQ: remove SCI penalize
function"). SCI penalty API was replaced by the runtime penalty calculation
based on the value of acpi_gbl_FADT.sci_interrupt.

acpi_gbl_FADT.sci_interrupt type does not get updated at the right time
for some platforms and results in incorrect penalty assignment for PCI
IRQs as irq_get_trigger_type returns the wrong type.

Signed-off-by: Sinan Kaya 
---
 arch/x86/kernel/acpi/boot.c |  1 +
 drivers/acpi/pci_link.c | 32 +---
 include/linux/acpi.h|  1 +
 3 files changed, 15 insertions(+), 19 deletions(-)

diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
index 90d84c3..0ffd26e 100644
--- a/arch/x86/kernel/acpi/boot.c
+++ b/arch/x86/kernel/acpi/boot.c
@@ -453,6 +453,7 @@ static void __init acpi_sci_ioapic_setup(u8 bus_irq, u16 
polarity, u16 trigger,
polarity = acpi_sci_flags & ACPI_MADT_POLARITY_MASK;
 
mp_override_legacy_irq(bus_irq, polarity, trigger, gsi);
+   acpi_penalize_sci_irq(bus_irq, trigger, polarity);
 
/*
 * stash over-ride to indicate we've been here
diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c
index a212709..1934e2a 100644
--- a/drivers/acpi/pci_link.c
+++ b/drivers/acpi/pci_link.c
@@ -494,27 +494,10 @@ static int acpi_irq_pci_sharing_penalty(int irq)
 
 static int acpi_irq_get_penalty(int irq)
 {
-   int penalty = 0;
-
-   /*
-   * Penalize IRQ used by ACPI SCI. If ACPI SCI pin attributes conflict
-   * with PCI IRQ attributes, mark ACPI SCI as ISA_ALWAYS so it won't be
-   * use for PCI IRQs.
-   */
-   if (irq == acpi_gbl_FADT.sci_interrupt) {
-   u32 type = irq_get_trigger_type(irq) & IRQ_TYPE_SENSE_MASK;
-
-   if (type != IRQ_TYPE_LEVEL_LOW)
-   penalty += PIRQ_PENALTY_ISA_ALWAYS;
-   else
-   penalty += PIRQ_PENALTY_PCI_USING;
-   }
-
if (irq < ACPI_MAX_ISA_IRQS)
-   return penalty + acpi_isa_irq_penalty[irq];
+   return acpi_isa_irq_penalty[irq];
 
-   penalty += acpi_irq_pci_sharing_penalty(irq);
-   return penalty;
+   return acpi_irq_pci_sharing_penalty(irq);
 }
 
 int __init acpi_irq_penalty_init(void)
@@ -885,6 +868,17 @@ bool acpi_isa_irq_available(int irq)
acpi_irq_get_penalty(irq) < PIRQ_PENALTY_ISA_ALWAYS);
 }
 
+void acpi_penalize_sci_irq(int irq, int trigger, int polarity)
+{
+   if (irq >= 0 && irq < ARRAY_SIZE(acpi_isa_irq_penalty)) {
+   if (trigger != 

Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-09-29 Thread Ondrej Zary
On Thursday 29 September 2016 19:18:43 Sinan Kaya wrote:
> On 9/29/2016 12:48 PM, Ondrej Zary wrote:
> >> Let's see the new set. If this doesn't work, I'll have to provide you
> >> with
> >>
> >> > another patch to get the penalty counts again. The original debug aids
> >> > patch may not apply after these.
> >
> > It boots but the IRQ problem still remains the same. See the attached
> > logs: dmesg-bad.txt: without the irq -> link->irq.active change
> > dmesg-bad2.txt: with the irq -> link->irq.active change
> > dmesg-bad2-debug.txt: as above with modified debug patch
> >
> > @@ -876,8 +893,11 @@ void acpi_penalize_isa_irq(int irq, int active)
> >  {
> > int penalty = active ? PIRQ_PENALTY_ISA_USED :
> > PIRQ_PENALTY_PCI_USING;
> >
> > -   if ((irq >= 0) && (irq < ARRAY_SIZE(acpi_isa_irq_penalty)))
> > +   if ((irq >= 0) && (irq < ARRAY_SIZE(acpi_isa_irq_penalty))) {
> > acpi_isa_irq_penalty[irq] += penalty;
> > +   pr_info("%s:%d acpi_isa_irq_penalty[%d]=0x%x active =
> > %d\n", __func__,
> > +   __LINE__, irq, 
> > acpi_irq_get_penalty(irq), active);
> > +   }
> >  }
>
> The previous two patches were in the right direction.
>
> Can we also get the same output from 4.6 kernel with the attached patch for
> the same machine you sent these?

Here it is.

> Something about SCI still doesn't feel right.
>
> The IRQ assignment fails if the penalty is greater than
> PIRQ_PENALTY_ISA_ALWAYS. This will happen if BIOS tells us to use an IRQ
> and same IRQ is in use by the SCI.

-- 
Ondrej Zary
[0.00] Linux version 4.6.0+ (zary@gsql) (gcc version 4.7.2 (Debian 
4.7.2-5) ) #128 SMP Thu Sep 29 19:56:02 CEST 2016
[0.00] x86/fpu: Legacy x87 FPU detected.
[0.00] x86/fpu: Using 'eager' FPU context switches.
[0.00] e820: BIOS-provided physical RAM map:
[0.00] BIOS-e820: [mem 0x-0x0009fbff] usable
[0.00] BIOS-e820: [mem 0x0009fc00-0x0009] reserved
[0.00] BIOS-e820: [mem 0x000f-0x000f] reserved
[0.00] BIOS-e820: [mem 0x0010-0x1ffe] usable
[0.00] BIOS-e820: [mem 0x1fff-0x1fff2fff] ACPI NVS
[0.00] BIOS-e820: [mem 0x1fff3000-0x1fff] ACPI data
[0.00] BIOS-e820: [mem 0x-0x] reserved
[0.00] Notice: NX (Execute Disable) protection missing in CPU!
[0.00] SMBIOS 2.2 present.
[0.00] DMI: VIA Technologies, Inc. VT82C694X/694X, BIOS 6.00 PG 
02/19/2002
[0.00] e820: update [mem 0x-0x0fff] usable ==> reserved
[0.00] e820: remove [mem 0x000a-0x000f] usable
[0.00] e820: last_pfn = 0x1fff0 max_arch_pfn = 0x10
[0.00] MTRR default type: uncachable
[0.00] MTRR fixed ranges enabled:
[0.00]   0-9 write-back
[0.00]   A-A uncachable
[0.00]   B-B write-combining
[0.00]   C-C9FFF write-protect
[0.00]   CA000-E uncachable
[0.00]   F-F7FFF write-through
[0.00]   F8000-F8FFF uncachable
[0.00]   F9000-F write-through
[0.00] MTRR variable ranges enabled:
[0.00]   0 base 0 mask FE000 write-back
[0.00]   1 base 0E000 mask FFC00 write-combining
[0.00]   2 disabled
[0.00]   3 disabled
[0.00]   4 disabled
[0.00]   5 disabled
[0.00]   6 disabled
[0.00]   7 disabled
[0.00] x86/PAT: PAT not supported by CPU.
[0.00] initial memory mapped: [mem 0x-0x01bf]
[0.00] Base memory trampoline at [c009b000] 9b000 size 16384
[0.00] BRK [0x0169b000, 0x0169bfff] PGTABLE
[0.00] ACPI: Early table checksum verification disabled
[0.00] ACPI: RSDP 0x000F6C00 14 (v00 VIA694)
[0.00] ACPI: RSDT 0x1FFF3000 28 (v01 VIA694 AWRDACPI 
42302E31 AWRD )
[0.00] ACPI: FACP 0x1FFF3040 74 (v01 VIA694 AWRDACPI 
42302E31 AWRD )
[0.00] ACPI: DSDT 0x1FFF30C0 002587 (v01 VIA694 AWRDACPI 
1000 MSFT 010C)
[0.00] ACPI: FACS 0x1FFF 40
[0.00] 0MB HIGHMEM available.
[0.00] 511MB LOWMEM available.
[0.00]   mapped low ram: 0 - 1fff
[0.00]   low ram: 0 - 1fff
[0.00] BRK [0x0169c000, 0x0169cfff] PGTABLE
[0.00] Zone ranges:
[0.00]   DMA  [mem 0x1000-0x00ff]
[0.00]   Normal   [mem 0x0100-0x1ffe]
[0.00]   HighMem  empty
[0.00] Movable zone start for each node
[0.00] Early memory node ranges
[0.00]   node   0: [mem 0x1000-0x0009efff]
[0.00]   node   0: [mem 0x0010-0x1ffe]
[0.00] Initmem setup node 0 [mem 

Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-09-29 Thread Ondrej Zary
On Thursday 29 September 2016 19:18:43 Sinan Kaya wrote:
> On 9/29/2016 12:48 PM, Ondrej Zary wrote:
> >> Let's see the new set. If this doesn't work, I'll have to provide you
> >> with
> >>
> >> > another patch to get the penalty counts again. The original debug aids
> >> > patch may not apply after these.
> >
> > It boots but the IRQ problem still remains the same. See the attached
> > logs: dmesg-bad.txt: without the irq -> link->irq.active change
> > dmesg-bad2.txt: with the irq -> link->irq.active change
> > dmesg-bad2-debug.txt: as above with modified debug patch
> >
> > @@ -876,8 +893,11 @@ void acpi_penalize_isa_irq(int irq, int active)
> >  {
> > int penalty = active ? PIRQ_PENALTY_ISA_USED :
> > PIRQ_PENALTY_PCI_USING;
> >
> > -   if ((irq >= 0) && (irq < ARRAY_SIZE(acpi_isa_irq_penalty)))
> > +   if ((irq >= 0) && (irq < ARRAY_SIZE(acpi_isa_irq_penalty))) {
> > acpi_isa_irq_penalty[irq] += penalty;
> > +   pr_info("%s:%d acpi_isa_irq_penalty[%d]=0x%x active =
> > %d\n", __func__,
> > +   __LINE__, irq, 
> > acpi_irq_get_penalty(irq), active);
> > +   }
> >  }
>
> The previous two patches were in the right direction.
>
> Can we also get the same output from 4.6 kernel with the attached patch for
> the same machine you sent these?

Here it is.

> Something about SCI still doesn't feel right.
>
> The IRQ assignment fails if the penalty is greater than
> PIRQ_PENALTY_ISA_ALWAYS. This will happen if BIOS tells us to use an IRQ
> and same IRQ is in use by the SCI.

-- 
Ondrej Zary
[0.00] Linux version 4.6.0+ (zary@gsql) (gcc version 4.7.2 (Debian 
4.7.2-5) ) #128 SMP Thu Sep 29 19:56:02 CEST 2016
[0.00] x86/fpu: Legacy x87 FPU detected.
[0.00] x86/fpu: Using 'eager' FPU context switches.
[0.00] e820: BIOS-provided physical RAM map:
[0.00] BIOS-e820: [mem 0x-0x0009fbff] usable
[0.00] BIOS-e820: [mem 0x0009fc00-0x0009] reserved
[0.00] BIOS-e820: [mem 0x000f-0x000f] reserved
[0.00] BIOS-e820: [mem 0x0010-0x1ffe] usable
[0.00] BIOS-e820: [mem 0x1fff-0x1fff2fff] ACPI NVS
[0.00] BIOS-e820: [mem 0x1fff3000-0x1fff] ACPI data
[0.00] BIOS-e820: [mem 0x-0x] reserved
[0.00] Notice: NX (Execute Disable) protection missing in CPU!
[0.00] SMBIOS 2.2 present.
[0.00] DMI: VIA Technologies, Inc. VT82C694X/694X, BIOS 6.00 PG 
02/19/2002
[0.00] e820: update [mem 0x-0x0fff] usable ==> reserved
[0.00] e820: remove [mem 0x000a-0x000f] usable
[0.00] e820: last_pfn = 0x1fff0 max_arch_pfn = 0x10
[0.00] MTRR default type: uncachable
[0.00] MTRR fixed ranges enabled:
[0.00]   0-9 write-back
[0.00]   A-A uncachable
[0.00]   B-B write-combining
[0.00]   C-C9FFF write-protect
[0.00]   CA000-E uncachable
[0.00]   F-F7FFF write-through
[0.00]   F8000-F8FFF uncachable
[0.00]   F9000-F write-through
[0.00] MTRR variable ranges enabled:
[0.00]   0 base 0 mask FE000 write-back
[0.00]   1 base 0E000 mask FFC00 write-combining
[0.00]   2 disabled
[0.00]   3 disabled
[0.00]   4 disabled
[0.00]   5 disabled
[0.00]   6 disabled
[0.00]   7 disabled
[0.00] x86/PAT: PAT not supported by CPU.
[0.00] initial memory mapped: [mem 0x-0x01bf]
[0.00] Base memory trampoline at [c009b000] 9b000 size 16384
[0.00] BRK [0x0169b000, 0x0169bfff] PGTABLE
[0.00] ACPI: Early table checksum verification disabled
[0.00] ACPI: RSDP 0x000F6C00 14 (v00 VIA694)
[0.00] ACPI: RSDT 0x1FFF3000 28 (v01 VIA694 AWRDACPI 
42302E31 AWRD )
[0.00] ACPI: FACP 0x1FFF3040 74 (v01 VIA694 AWRDACPI 
42302E31 AWRD )
[0.00] ACPI: DSDT 0x1FFF30C0 002587 (v01 VIA694 AWRDACPI 
1000 MSFT 010C)
[0.00] ACPI: FACS 0x1FFF 40
[0.00] 0MB HIGHMEM available.
[0.00] 511MB LOWMEM available.
[0.00]   mapped low ram: 0 - 1fff
[0.00]   low ram: 0 - 1fff
[0.00] BRK [0x0169c000, 0x0169cfff] PGTABLE
[0.00] Zone ranges:
[0.00]   DMA  [mem 0x1000-0x00ff]
[0.00]   Normal   [mem 0x0100-0x1ffe]
[0.00]   HighMem  empty
[0.00] Movable zone start for each node
[0.00] Early memory node ranges
[0.00]   node   0: [mem 0x1000-0x0009efff]
[0.00]   node   0: [mem 0x0010-0x1ffe]
[0.00] Initmem setup node 0 [mem 

Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-09-29 Thread Sinan Kaya
On 9/29/2016 12:48 PM, Ondrej Zary wrote:
>> Let's see the new set. If this doesn't work, I'll have to provide you with
>> > another patch to get the penalty counts again. The original debug aids
>> > patch may not apply after these.
> It boots but the IRQ problem still remains the same. See the attached logs:
> dmesg-bad.txt: without the irq -> link->irq.active change
> dmesg-bad2.txt: with the irq -> link->irq.active change
> dmesg-bad2-debug.txt: as above with modified debug patch
> 
> @@ -876,8 +893,11 @@ void acpi_penalize_isa_irq(int irq, int active)
>  {
> int penalty = active ? PIRQ_PENALTY_ISA_USED : PIRQ_PENALTY_PCI_USING;
> 
> -   if ((irq >= 0) && (irq < ARRAY_SIZE(acpi_isa_irq_penalty)))
> +   if ((irq >= 0) && (irq < ARRAY_SIZE(acpi_isa_irq_penalty))) {
> acpi_isa_irq_penalty[irq] += penalty;
> +   pr_info("%s:%d acpi_isa_irq_penalty[%d]=0x%x active = %d\n", 
> __func__,
> +   __LINE__, irq,  acpi_irq_get_penalty(irq), 
> active);
> +   }
>  }
> 

The previous two patches were in the right direction.

Can we also get the same output from 4.6 kernel with the attached patch for the
same machine you sent these?

Something about SCI still doesn't feel right.

The IRQ assignment fails if the penalty is greater than PIRQ_PENALTY_ISA_ALWAYS.
This will happen if BIOS tells us to use an IRQ and same IRQ is in use by the 
SCI.


-- 
Sinan Kaya
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm 
Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux 
Foundation Collaborative Project.
>From 609da980e4af9757b33a9d4f0771a08f1a1e17fe Mon Sep 17 00:00:00 2001
From: Sinan Kaya 
Date: Thu, 29 Sep 2016 13:16:49 -0400
Subject: [PATCH] ACPI, PCI, IRQ: debug aids for 4.6

Change-Id: I9c6170034ec30f04372315de3076f610f7e87668
---
 drivers/acpi/pci_link.c | 21 -
 1 file changed, 20 insertions(+), 1 deletion(-)

diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c
index ededa90..0bd51f0 100644
--- a/drivers/acpi/pci_link.c
+++ b/drivers/acpi/pci_link.c
@@ -541,6 +541,10 @@ static int acpi_pci_link_allocate(struct acpi_pci_link 
*link)
else
irq = link->irq.possible[link->irq.possible_count - 1];
 
+   pr_info("irq : %d\n", irq);
+   pr_info("acpi_irq_balance : %d\n", acpi_irq_balance);
+   pr_info("link->irq.active : %d\n", link->irq.active);
+   pr_info("acpi_gbl_FADT.sci_interrupt : %d\n", 
acpi_gbl_FADT.sci_interrupt);
if (acpi_irq_balance || !link->irq.active) {
/*
 * Select the best IRQ.  This is done in reverse to promote
@@ -548,10 +552,21 @@ static int acpi_pci_link_allocate(struct acpi_pci_link 
*link)
 */
for (i = (link->irq.possible_count - 1); i >= 0; i--) {
if (acpi_irq_penalty[irq] >
-   acpi_irq_penalty[link->irq.possible[i]])
+   acpi_irq_penalty[link->irq.possible[i]]) {
+   pr_info("acpi_irq_get_penalty(%d) : 0x%x\n", 
link->irq.possible[i], acpi_irq_penalty[link->irq.possible[i]]);
+   pr_info("acpi_irq_get_penalty(%d) : 0x%x\n", 
irq, acpi_irq_penalty[irq]);
irq = link->irq.possible[i];
+   }
}
}
+   for (i = (link->irq.possible_count - 1); i >= 0; i--) {
+   pr_info("penalty[%d] = 0x%x\n",
+   link->irq.possible[i],
+   acpi_irq_penalty[link->irq.possible[i]]);
+   }
+   pr_info("irq : %d\n", irq);
+   pr_info("acpi_gbl_FADT.sci_interrupt : %d\n", 
acpi_gbl_FADT.sci_interrupt);
+
if (acpi_irq_penalty[irq] >= PIRQ_PENALTY_ISA_ALWAYS) {
printk(KERN_ERR PREFIX "No IRQ available for %s [%s]. "
"Try pci=noacpi or acpi=off\n",
@@ -569,6 +584,7 @@ static int acpi_pci_link_allocate(struct acpi_pci_link 
*link)
return -ENODEV;
} else {
acpi_irq_penalty[link->irq.active] += PIRQ_PENALTY_PCI_USING;
+   pr_info("acpi_irq_get_penalty(%d) : 0x%x\n", link->irq.active, 
acpi_irq_penalty[link->irq.active]);
printk(KERN_WARNING PREFIX "%s [%s] enabled at IRQ %d\n",
   acpi_device_name(link->device),
   acpi_device_bid(link->device), link->irq.active);
@@ -824,6 +840,9 @@ void acpi_penalize_isa_irq(int irq, int active)
acpi_irq_penalty[irq] += PIRQ_PENALTY_ISA_USED;
else
acpi_irq_penalty[irq] += PIRQ_PENALTY_PCI_USING;
+
+   pr_info("%s:%d acpi_isa_irq_penalty[%d]=0x%x active = %d\n", 
__func__,
+   __LINE__, irq,  acpi_irq_penalty[irq], active);
}
 }
 
-- 
1.9.1



Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-09-29 Thread Sinan Kaya
On 9/29/2016 12:48 PM, Ondrej Zary wrote:
>> Let's see the new set. If this doesn't work, I'll have to provide you with
>> > another patch to get the penalty counts again. The original debug aids
>> > patch may not apply after these.
> It boots but the IRQ problem still remains the same. See the attached logs:
> dmesg-bad.txt: without the irq -> link->irq.active change
> dmesg-bad2.txt: with the irq -> link->irq.active change
> dmesg-bad2-debug.txt: as above with modified debug patch
> 
> @@ -876,8 +893,11 @@ void acpi_penalize_isa_irq(int irq, int active)
>  {
> int penalty = active ? PIRQ_PENALTY_ISA_USED : PIRQ_PENALTY_PCI_USING;
> 
> -   if ((irq >= 0) && (irq < ARRAY_SIZE(acpi_isa_irq_penalty)))
> +   if ((irq >= 0) && (irq < ARRAY_SIZE(acpi_isa_irq_penalty))) {
> acpi_isa_irq_penalty[irq] += penalty;
> +   pr_info("%s:%d acpi_isa_irq_penalty[%d]=0x%x active = %d\n", 
> __func__,
> +   __LINE__, irq,  acpi_irq_get_penalty(irq), 
> active);
> +   }
>  }
> 

The previous two patches were in the right direction.

Can we also get the same output from 4.6 kernel with the attached patch for the
same machine you sent these?

Something about SCI still doesn't feel right.

The IRQ assignment fails if the penalty is greater than PIRQ_PENALTY_ISA_ALWAYS.
This will happen if BIOS tells us to use an IRQ and same IRQ is in use by the 
SCI.


-- 
Sinan Kaya
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm 
Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux 
Foundation Collaborative Project.
>From 609da980e4af9757b33a9d4f0771a08f1a1e17fe Mon Sep 17 00:00:00 2001
From: Sinan Kaya 
Date: Thu, 29 Sep 2016 13:16:49 -0400
Subject: [PATCH] ACPI, PCI, IRQ: debug aids for 4.6

Change-Id: I9c6170034ec30f04372315de3076f610f7e87668
---
 drivers/acpi/pci_link.c | 21 -
 1 file changed, 20 insertions(+), 1 deletion(-)

diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c
index ededa90..0bd51f0 100644
--- a/drivers/acpi/pci_link.c
+++ b/drivers/acpi/pci_link.c
@@ -541,6 +541,10 @@ static int acpi_pci_link_allocate(struct acpi_pci_link 
*link)
else
irq = link->irq.possible[link->irq.possible_count - 1];
 
+   pr_info("irq : %d\n", irq);
+   pr_info("acpi_irq_balance : %d\n", acpi_irq_balance);
+   pr_info("link->irq.active : %d\n", link->irq.active);
+   pr_info("acpi_gbl_FADT.sci_interrupt : %d\n", 
acpi_gbl_FADT.sci_interrupt);
if (acpi_irq_balance || !link->irq.active) {
/*
 * Select the best IRQ.  This is done in reverse to promote
@@ -548,10 +552,21 @@ static int acpi_pci_link_allocate(struct acpi_pci_link 
*link)
 */
for (i = (link->irq.possible_count - 1); i >= 0; i--) {
if (acpi_irq_penalty[irq] >
-   acpi_irq_penalty[link->irq.possible[i]])
+   acpi_irq_penalty[link->irq.possible[i]]) {
+   pr_info("acpi_irq_get_penalty(%d) : 0x%x\n", 
link->irq.possible[i], acpi_irq_penalty[link->irq.possible[i]]);
+   pr_info("acpi_irq_get_penalty(%d) : 0x%x\n", 
irq, acpi_irq_penalty[irq]);
irq = link->irq.possible[i];
+   }
}
}
+   for (i = (link->irq.possible_count - 1); i >= 0; i--) {
+   pr_info("penalty[%d] = 0x%x\n",
+   link->irq.possible[i],
+   acpi_irq_penalty[link->irq.possible[i]]);
+   }
+   pr_info("irq : %d\n", irq);
+   pr_info("acpi_gbl_FADT.sci_interrupt : %d\n", 
acpi_gbl_FADT.sci_interrupt);
+
if (acpi_irq_penalty[irq] >= PIRQ_PENALTY_ISA_ALWAYS) {
printk(KERN_ERR PREFIX "No IRQ available for %s [%s]. "
"Try pci=noacpi or acpi=off\n",
@@ -569,6 +584,7 @@ static int acpi_pci_link_allocate(struct acpi_pci_link 
*link)
return -ENODEV;
} else {
acpi_irq_penalty[link->irq.active] += PIRQ_PENALTY_PCI_USING;
+   pr_info("acpi_irq_get_penalty(%d) : 0x%x\n", link->irq.active, 
acpi_irq_penalty[link->irq.active]);
printk(KERN_WARNING PREFIX "%s [%s] enabled at IRQ %d\n",
   acpi_device_name(link->device),
   acpi_device_bid(link->device), link->irq.active);
@@ -824,6 +840,9 @@ void acpi_penalize_isa_irq(int irq, int active)
acpi_irq_penalty[irq] += PIRQ_PENALTY_ISA_USED;
else
acpi_irq_penalty[irq] += PIRQ_PENALTY_PCI_USING;
+
+   pr_info("%s:%d acpi_isa_irq_penalty[%d]=0x%x active = %d\n", 
__func__,
+   __LINE__, irq,  acpi_irq_penalty[irq], active);
}
 }
 
-- 
1.9.1



Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-09-29 Thread Ondrej Zary
On Thursday 29 September 2016 16:28:23 Sinan Kaya wrote:
> On 9/29/2016 9:49 AM, Ondrej Zary wrote:
> >> Ok, since I have not seen the full boot log I am guessing that isa api
> >>
> >> > gets called before the link objects are initialized.
> >
> > Netconsole did not work (probably because it crashes too early?) and I
> > don't have a null-modem cable.
>
> Probably, this is telling me that using the link list to determine
> penalties for ISA penalties is a bad idea as the ISA API seems to be called
> from arbitrary contexts even before the ACPI Link objects are created.
>
> I was trying to reuse the PCI execution path for ISA interrupts using the
> last two patches. I dropped the first and last two patches and restored the
> penalty PCI penalty assignment for the active interrupt only if the
> interrupt is a ISA interrupt with a new patch.
>
> >> > Can you appply the first three only (0001, 0002 and 0003) to see if it
> >> > makes a difference?
> >
> > It boots with first 3 patches only but the problem remains - see the
> > attached log.
>
> Let's see the new set. If this doesn't work, I'll have to provide you with
> another patch to get the penalty counts again. The original debug aids
> patch may not apply after these.

It boots but the IRQ problem still remains the same. See the attached logs:
dmesg-bad.txt: without the irq -> link->irq.active change
dmesg-bad2.txt: with the irq -> link->irq.active change
dmesg-bad2-debug.txt: as above with modified debug patch

@@ -876,8 +893,11 @@ void acpi_penalize_isa_irq(int irq, int active)
 {
int penalty = active ? PIRQ_PENALTY_ISA_USED : PIRQ_PENALTY_PCI_USING;

-   if ((irq >= 0) && (irq < ARRAY_SIZE(acpi_isa_irq_penalty)))
+   if ((irq >= 0) && (irq < ARRAY_SIZE(acpi_isa_irq_penalty))) {
acpi_isa_irq_penalty[irq] += penalty;
+   pr_info("%s:%d acpi_isa_irq_penalty[%d]=0x%x active = %d\n", 
__func__,
+   __LINE__, irq,  acpi_irq_get_penalty(irq), 
active);
+   }
 }


-- 
Ondrej Zary
[0.00] Linux version 4.8.0-rc8+ (zary@gsql) (gcc version 4.7.2 (Debian 
4.7.2-5) ) #126 SMP Thu Sep 29 18:41:27 CEST 2016
[0.00] x86/fpu: Legacy x87 FPU detected.
[0.00] x86/fpu: Using 'eager' FPU context switches.
[0.00] e820: BIOS-provided physical RAM map:
[0.00] BIOS-e820: [mem 0x-0x0009fbff] usable
[0.00] BIOS-e820: [mem 0x0009fc00-0x0009] reserved
[0.00] BIOS-e820: [mem 0x000f-0x000f] reserved
[0.00] BIOS-e820: [mem 0x0010-0x1ffe] usable
[0.00] BIOS-e820: [mem 0x1fff-0x1fff2fff] ACPI NVS
[0.00] BIOS-e820: [mem 0x1fff3000-0x1fff] ACPI data
[0.00] BIOS-e820: [mem 0x-0x] reserved
[0.00] Notice: NX (Execute Disable) protection missing in CPU!
[0.00] SMBIOS 2.2 present.
[0.00] DMI: VIA Technologies, Inc. VT82C694X/694X, BIOS 6.00 PG 
02/19/2002
[0.00] e820: update [mem 0x-0x0fff] usable ==> reserved
[0.00] e820: remove [mem 0x000a-0x000f] usable
[0.00] e820: last_pfn = 0x1fff0 max_arch_pfn = 0x10
[0.00] MTRR default type: uncachable
[0.00] MTRR fixed ranges enabled:
[0.00]   0-9 write-back
[0.00]   A-A uncachable
[0.00]   B-B write-combining
[0.00]   C-C9FFF write-protect
[0.00]   CA000-E uncachable
[0.00]   F-F7FFF write-through
[0.00]   F8000-F8FFF uncachable
[0.00]   F9000-F write-through
[0.00] MTRR variable ranges enabled:
[0.00]   0 base 0 mask FE000 write-back
[0.00]   1 base 0E000 mask FFC00 write-combining
[0.00]   2 disabled
[0.00]   3 disabled
[0.00]   4 disabled
[0.00]   5 disabled
[0.00]   6 disabled
[0.00]   7 disabled
[0.00] x86/PAT: PAT not supported by CPU.
[0.00] x86/PAT: Configuration [0-7]: WB  WT  UC- UC  WB  WT  UC- UC  
[0.00] initial memory mapped: [mem 0x-0x01bf]
[0.00] Base memory trampoline at [c009b000] 9b000 size 16384
[0.00] BRK [0x016b7000, 0x016b7fff] PGTABLE
[0.00] ACPI: Early table checksum verification disabled
[0.00] ACPI: RSDP 0x000F6C00 14 (v00 VIA694)
[0.00] ACPI: RSDT 0x1FFF3000 28 (v01 VIA694 AWRDACPI 
42302E31 AWRD )
[0.00] ACPI: FACP 0x1FFF3040 74 (v01 VIA694 AWRDACPI 
42302E31 AWRD )
[0.00] ACPI: DSDT 0x1FFF30C0 002587 (v01 VIA694 AWRDACPI 
1000 MSFT 010C)
[0.00] ACPI: FACS 0x1FFF 40
[0.00] 0MB HIGHMEM available.
[0.00] 511MB LOWMEM available.
[0.00]   mapped low ram: 0 - 1fff
[0.00]   low ram: 0 - 1fff
[0.00] 

Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-09-29 Thread Ondrej Zary
On Thursday 29 September 2016 16:28:23 Sinan Kaya wrote:
> On 9/29/2016 9:49 AM, Ondrej Zary wrote:
> >> Ok, since I have not seen the full boot log I am guessing that isa api
> >>
> >> > gets called before the link objects are initialized.
> >
> > Netconsole did not work (probably because it crashes too early?) and I
> > don't have a null-modem cable.
>
> Probably, this is telling me that using the link list to determine
> penalties for ISA penalties is a bad idea as the ISA API seems to be called
> from arbitrary contexts even before the ACPI Link objects are created.
>
> I was trying to reuse the PCI execution path for ISA interrupts using the
> last two patches. I dropped the first and last two patches and restored the
> penalty PCI penalty assignment for the active interrupt only if the
> interrupt is a ISA interrupt with a new patch.
>
> >> > Can you appply the first three only (0001, 0002 and 0003) to see if it
> >> > makes a difference?
> >
> > It boots with first 3 patches only but the problem remains - see the
> > attached log.
>
> Let's see the new set. If this doesn't work, I'll have to provide you with
> another patch to get the penalty counts again. The original debug aids
> patch may not apply after these.

It boots but the IRQ problem still remains the same. See the attached logs:
dmesg-bad.txt: without the irq -> link->irq.active change
dmesg-bad2.txt: with the irq -> link->irq.active change
dmesg-bad2-debug.txt: as above with modified debug patch

@@ -876,8 +893,11 @@ void acpi_penalize_isa_irq(int irq, int active)
 {
int penalty = active ? PIRQ_PENALTY_ISA_USED : PIRQ_PENALTY_PCI_USING;

-   if ((irq >= 0) && (irq < ARRAY_SIZE(acpi_isa_irq_penalty)))
+   if ((irq >= 0) && (irq < ARRAY_SIZE(acpi_isa_irq_penalty))) {
acpi_isa_irq_penalty[irq] += penalty;
+   pr_info("%s:%d acpi_isa_irq_penalty[%d]=0x%x active = %d\n", 
__func__,
+   __LINE__, irq,  acpi_irq_get_penalty(irq), 
active);
+   }
 }


-- 
Ondrej Zary
[0.00] Linux version 4.8.0-rc8+ (zary@gsql) (gcc version 4.7.2 (Debian 
4.7.2-5) ) #126 SMP Thu Sep 29 18:41:27 CEST 2016
[0.00] x86/fpu: Legacy x87 FPU detected.
[0.00] x86/fpu: Using 'eager' FPU context switches.
[0.00] e820: BIOS-provided physical RAM map:
[0.00] BIOS-e820: [mem 0x-0x0009fbff] usable
[0.00] BIOS-e820: [mem 0x0009fc00-0x0009] reserved
[0.00] BIOS-e820: [mem 0x000f-0x000f] reserved
[0.00] BIOS-e820: [mem 0x0010-0x1ffe] usable
[0.00] BIOS-e820: [mem 0x1fff-0x1fff2fff] ACPI NVS
[0.00] BIOS-e820: [mem 0x1fff3000-0x1fff] ACPI data
[0.00] BIOS-e820: [mem 0x-0x] reserved
[0.00] Notice: NX (Execute Disable) protection missing in CPU!
[0.00] SMBIOS 2.2 present.
[0.00] DMI: VIA Technologies, Inc. VT82C694X/694X, BIOS 6.00 PG 
02/19/2002
[0.00] e820: update [mem 0x-0x0fff] usable ==> reserved
[0.00] e820: remove [mem 0x000a-0x000f] usable
[0.00] e820: last_pfn = 0x1fff0 max_arch_pfn = 0x10
[0.00] MTRR default type: uncachable
[0.00] MTRR fixed ranges enabled:
[0.00]   0-9 write-back
[0.00]   A-A uncachable
[0.00]   B-B write-combining
[0.00]   C-C9FFF write-protect
[0.00]   CA000-E uncachable
[0.00]   F-F7FFF write-through
[0.00]   F8000-F8FFF uncachable
[0.00]   F9000-F write-through
[0.00] MTRR variable ranges enabled:
[0.00]   0 base 0 mask FE000 write-back
[0.00]   1 base 0E000 mask FFC00 write-combining
[0.00]   2 disabled
[0.00]   3 disabled
[0.00]   4 disabled
[0.00]   5 disabled
[0.00]   6 disabled
[0.00]   7 disabled
[0.00] x86/PAT: PAT not supported by CPU.
[0.00] x86/PAT: Configuration [0-7]: WB  WT  UC- UC  WB  WT  UC- UC  
[0.00] initial memory mapped: [mem 0x-0x01bf]
[0.00] Base memory trampoline at [c009b000] 9b000 size 16384
[0.00] BRK [0x016b7000, 0x016b7fff] PGTABLE
[0.00] ACPI: Early table checksum verification disabled
[0.00] ACPI: RSDP 0x000F6C00 14 (v00 VIA694)
[0.00] ACPI: RSDT 0x1FFF3000 28 (v01 VIA694 AWRDACPI 
42302E31 AWRD )
[0.00] ACPI: FACP 0x1FFF3040 74 (v01 VIA694 AWRDACPI 
42302E31 AWRD )
[0.00] ACPI: DSDT 0x1FFF30C0 002587 (v01 VIA694 AWRDACPI 
1000 MSFT 010C)
[0.00] ACPI: FACS 0x1FFF 40
[0.00] 0MB HIGHMEM available.
[0.00] 511MB LOWMEM available.
[0.00]   mapped low ram: 0 - 1fff
[0.00]   low ram: 0 - 1fff
[0.00] 

Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-09-29 Thread Sinan Kaya
On 9/29/2016 10:28 AM, Sinan Kaya wrote:
> + if (irq < ACPI_MAX_ISA_IRQS)

BTW, can you change this line to

if (link->irq.active < ACPI_MAX_ISA_IRQS)

after applying.

> + acpi_isa_irq_penalty[link->irq.active] +=
> + PIRQ_PENALTY_PCI_USING;

-- 
Sinan Kaya
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm 
Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux 
Foundation Collaborative Project.


Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-09-29 Thread Sinan Kaya
On 9/29/2016 10:28 AM, Sinan Kaya wrote:
> + if (irq < ACPI_MAX_ISA_IRQS)

BTW, can you change this line to

if (link->irq.active < ACPI_MAX_ISA_IRQS)

after applying.

> + acpi_isa_irq_penalty[link->irq.active] +=
> + PIRQ_PENALTY_PCI_USING;

-- 
Sinan Kaya
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm 
Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux 
Foundation Collaborative Project.


Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-09-29 Thread Sinan Kaya
On 9/29/2016 10:18 AM, Wim Osterholt wrote:
> On Wed, Sep 28, 2016 at 07:38:41PM -0400, Sinan Kaya wrote:
>>
>> Can you try these patches on your machines please?
> 
> I applied the included patches on vanilla 4.8-rc8 and my machine booted
> fine. (I saw a remark about SCSI interrupts, but I have no SCSI.)
> 
> Regards, Wim.
> 

Thanks Wim. The issue seems to be platform specific. I guess we should fix 
Ondrej's issue first before increasing our test coverage. Apologies for
calling for test this early. I really hoped that the last patch would
solve Ondrej's issue.

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


-- 
Sinan Kaya
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm 
Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux 
Foundation Collaborative Project.


Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-09-29 Thread Sinan Kaya
On 9/29/2016 10:18 AM, Wim Osterholt wrote:
> On Wed, Sep 28, 2016 at 07:38:41PM -0400, Sinan Kaya wrote:
>>
>> Can you try these patches on your machines please?
> 
> I applied the included patches on vanilla 4.8-rc8 and my machine booted
> fine. (I saw a remark about SCSI interrupts, but I have no SCSI.)
> 
> Regards, Wim.
> 

Thanks Wim. The issue seems to be platform specific. I guess we should fix 
Ondrej's issue first before increasing our test coverage. Apologies for
calling for test this early. I really hoped that the last patch would
solve Ondrej's issue.

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


-- 
Sinan Kaya
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm 
Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux 
Foundation Collaborative Project.


Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-09-29 Thread Sinan Kaya
On 9/29/2016 9:49 AM, Ondrej Zary wrote:
>> Ok, since I have not seen the full boot log I am guessing that isa api
>> > gets called before the link objects are initialized.
> Netconsole did not work (probably because it crashes too early?) and I don't 
> have a null-modem cable.
> 

Probably, this is telling me that using the link list to determine penalties for
ISA penalties is a bad idea as the ISA API seems to be called from arbitrary
contexts even before the ACPI Link objects are created. 

I was trying to reuse the PCI execution path for ISA interrupts using the last
two patches. I dropped the first and last two patches and restored the penalty 
PCI
penalty assignment for the active interrupt only if the interrupt is a ISA 
interrupt
with a new patch.

>> > Can you appply the first three only (0001, 0002 and 0003) to see if it
>> > makes a difference?
> It boots with first 3 patches only but the problem remains - see the attached 
> log.

Let's see the new set. If this doesn't work, I'll have to provide you with 
another
patch to get the penalty counts again. The original debug aids patch may not 
apply
after these.




-- 
Sinan Kaya
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm 
Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux 
Foundation Collaborative Project.
>From 82278a843e968ed98f18cd7a3cca515aabe2ab3a Mon Sep 17 00:00:00 2001
From: Sinan Kaya 
Date: Wed, 28 Sep 2016 19:08:34 -0400
Subject: [PATCH 1/2] ACPI, PCI, IRQ: remove double penalty calculation

acpi_irq_get_penalty returns the penalty for both PCI and ISA penalties.
Now that we don't have any storage place for PCI IRQs, we run into some
math problem such as follows:

The original code was as simple as this:
acpi_isa_irq_penalty += penalty

In order to hide PCI IRQ calculation difference vs. ISA IRQ difference, we
created the acpi_irq_get_penalty function and replaced the above statement
as

acpi_isa_irq_penalty = acpi_irq_get_penalty() + penalty

This is what acpi_irq_get_penalty returns.

acpi_irq_get_penalty()= acpi_isa_irq_penalty + SCI penalty

When you call acpi_penalize_isa_irq twice, you end up with:

acpi_isa_irq_penalty = 2 * SCI penalty + acpi_isa_irq_penalty

Fixing this by directly modifying acpi_isa_irq_penalty for the new penalty
added.

Signed-off-by: Sinan Kaya 
---
 drivers/acpi/pci_link.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c
index c983bf7..59326ac 100644
--- a/drivers/acpi/pci_link.c
+++ b/drivers/acpi/pci_link.c
@@ -870,9 +870,10 @@ static int __init acpi_irq_penalty_update(char *str, int 
used)
  */
 void acpi_penalize_isa_irq(int irq, int active)
 {
+   int penalty = active ? PIRQ_PENALTY_ISA_USED : PIRQ_PENALTY_PCI_USING;
+
if ((irq >= 0) && (irq < ARRAY_SIZE(acpi_isa_irq_penalty)))
-   acpi_isa_irq_penalty[irq] = acpi_irq_get_penalty(irq) +
- (active ? PIRQ_PENALTY_ISA_USED : PIRQ_PENALTY_PCI_USING);
+   acpi_isa_irq_penalty[irq] += penalty;
 }
 
 bool acpi_isa_irq_available(int irq)
-- 
1.9.1

>From 163255c91635d5e85dc71724b86def80ff433b88 Mon Sep 17 00:00:00 2001
From: Sinan Kaya 
Date: Thu, 29 Sep 2016 10:25:21 -0400
Subject: [PATCH 2/2] ACPI, PCI IRQ: add PCI_USING penalty for ISA interrupts

The change introduced in commit 103544d86976 ("ACPI,PCI,IRQ: reduce
resource requirements") removed PCI_USING penalty from
acpi_pci_link_allocate function as there is no longer a fixed size penalty
array for both PCI and IRQ interrupts.

We need to add the PCI_USING penalty for ISA interrupts too if the link is
in use and matches our ISA IRQ number.

Signed-off-by: Sinan Kaya 
---
 drivers/acpi/pci_link.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c
index 59326ac..47407cb 100644
--- a/drivers/acpi/pci_link.c
+++ b/drivers/acpi/pci_link.c
@@ -619,6 +619,10 @@ static int acpi_pci_link_allocate(struct acpi_pci_link 
*link)
acpi_device_bid(link->device));
return -ENODEV;
} else {
+   if (irq < ACPI_MAX_ISA_IRQS)
+   acpi_isa_irq_penalty[link->irq.active] +=
+   PIRQ_PENALTY_PCI_USING;
+
printk(KERN_WARNING PREFIX "%s [%s] enabled at IRQ %d\n",
   acpi_device_name(link->device),
   acpi_device_bid(link->device), link->irq.active);
-- 
1.9.1



Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-09-29 Thread Sinan Kaya
On 9/29/2016 9:49 AM, Ondrej Zary wrote:
>> Ok, since I have not seen the full boot log I am guessing that isa api
>> > gets called before the link objects are initialized.
> Netconsole did not work (probably because it crashes too early?) and I don't 
> have a null-modem cable.
> 

Probably, this is telling me that using the link list to determine penalties for
ISA penalties is a bad idea as the ISA API seems to be called from arbitrary
contexts even before the ACPI Link objects are created. 

I was trying to reuse the PCI execution path for ISA interrupts using the last
two patches. I dropped the first and last two patches and restored the penalty 
PCI
penalty assignment for the active interrupt only if the interrupt is a ISA 
interrupt
with a new patch.

>> > Can you appply the first three only (0001, 0002 and 0003) to see if it
>> > makes a difference?
> It boots with first 3 patches only but the problem remains - see the attached 
> log.

Let's see the new set. If this doesn't work, I'll have to provide you with 
another
patch to get the penalty counts again. The original debug aids patch may not 
apply
after these.




-- 
Sinan Kaya
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm 
Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux 
Foundation Collaborative Project.
>From 82278a843e968ed98f18cd7a3cca515aabe2ab3a Mon Sep 17 00:00:00 2001
From: Sinan Kaya 
Date: Wed, 28 Sep 2016 19:08:34 -0400
Subject: [PATCH 1/2] ACPI, PCI, IRQ: remove double penalty calculation

acpi_irq_get_penalty returns the penalty for both PCI and ISA penalties.
Now that we don't have any storage place for PCI IRQs, we run into some
math problem such as follows:

The original code was as simple as this:
acpi_isa_irq_penalty += penalty

In order to hide PCI IRQ calculation difference vs. ISA IRQ difference, we
created the acpi_irq_get_penalty function and replaced the above statement
as

acpi_isa_irq_penalty = acpi_irq_get_penalty() + penalty

This is what acpi_irq_get_penalty returns.

acpi_irq_get_penalty()= acpi_isa_irq_penalty + SCI penalty

When you call acpi_penalize_isa_irq twice, you end up with:

acpi_isa_irq_penalty = 2 * SCI penalty + acpi_isa_irq_penalty

Fixing this by directly modifying acpi_isa_irq_penalty for the new penalty
added.

Signed-off-by: Sinan Kaya 
---
 drivers/acpi/pci_link.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c
index c983bf7..59326ac 100644
--- a/drivers/acpi/pci_link.c
+++ b/drivers/acpi/pci_link.c
@@ -870,9 +870,10 @@ static int __init acpi_irq_penalty_update(char *str, int 
used)
  */
 void acpi_penalize_isa_irq(int irq, int active)
 {
+   int penalty = active ? PIRQ_PENALTY_ISA_USED : PIRQ_PENALTY_PCI_USING;
+
if ((irq >= 0) && (irq < ARRAY_SIZE(acpi_isa_irq_penalty)))
-   acpi_isa_irq_penalty[irq] = acpi_irq_get_penalty(irq) +
- (active ? PIRQ_PENALTY_ISA_USED : PIRQ_PENALTY_PCI_USING);
+   acpi_isa_irq_penalty[irq] += penalty;
 }
 
 bool acpi_isa_irq_available(int irq)
-- 
1.9.1

>From 163255c91635d5e85dc71724b86def80ff433b88 Mon Sep 17 00:00:00 2001
From: Sinan Kaya 
Date: Thu, 29 Sep 2016 10:25:21 -0400
Subject: [PATCH 2/2] ACPI, PCI IRQ: add PCI_USING penalty for ISA interrupts

The change introduced in commit 103544d86976 ("ACPI,PCI,IRQ: reduce
resource requirements") removed PCI_USING penalty from
acpi_pci_link_allocate function as there is no longer a fixed size penalty
array for both PCI and IRQ interrupts.

We need to add the PCI_USING penalty for ISA interrupts too if the link is
in use and matches our ISA IRQ number.

Signed-off-by: Sinan Kaya 
---
 drivers/acpi/pci_link.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c
index 59326ac..47407cb 100644
--- a/drivers/acpi/pci_link.c
+++ b/drivers/acpi/pci_link.c
@@ -619,6 +619,10 @@ static int acpi_pci_link_allocate(struct acpi_pci_link 
*link)
acpi_device_bid(link->device));
return -ENODEV;
} else {
+   if (irq < ACPI_MAX_ISA_IRQS)
+   acpi_isa_irq_penalty[link->irq.active] +=
+   PIRQ_PENALTY_PCI_USING;
+
printk(KERN_WARNING PREFIX "%s [%s] enabled at IRQ %d\n",
   acpi_device_name(link->device),
   acpi_device_bid(link->device), link->irq.active);
-- 
1.9.1



Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-09-29 Thread Wim Osterholt
On Wed, Sep 28, 2016 at 07:38:41PM -0400, Sinan Kaya wrote:
> 
> Can you try these patches on your machines please?

I applied the included patches on vanilla 4.8-rc8 and my machine booted
fine. (I saw a remark about SCSI interrupts, but I have no SCSI.)

Regards, Wim.




Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-09-29 Thread Wim Osterholt
On Wed, Sep 28, 2016 at 07:38:41PM -0400, Sinan Kaya wrote:
> 
> Can you try these patches on your machines please?

I applied the included patches on vanilla 4.8-rc8 and my machine booted
fine. (I saw a remark about SCSI interrupts, but I have no SCSI.)

Regards, Wim.




Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-09-29 Thread Ondrej Zary
On Thursday 29 September 2016, ok...@codeaurora.org wrote:
> On 2016-09-29 05:10, Ondrej Zary wrote:
> > On Thursday 29 September 2016, Sinan Kaya wrote:
> >> On 9/28/2016 3:23 PM, Ondrej Zary wrote:
> >> > On Wednesday 28 September 2016 20:22:40 Sinan Kaya wrote:
> >> >> On 9/28/2016 1:02 PM, Ondrej Zary wrote:
> >>  Thanks, It sounds like you have more than one machine with similar
> >> 
> >> > problems. Can you collect the log from the other machines with
> >> > 4.8-rc8?
> >> >
> >> > and also a boot log with 4.6 kernel where things are working?
> >> >>>
> >> >>> The attached logs are from another machine:
> >> >>>
> >> >>> dmesg-bad-debug.txt: 4.8-rc8 with your debug patch - bad
> >> >>>
> >> >>> dmesg-reverted.txt: 4.8-rc8 with patches (as per Rafael's
> >> >>> suggestion) reverted - good
> >> >>>
> >> >>> dmesg-3.6.txt: 4.6 (Debian kernel) - good
> >> >>
> >> >> I think I see a race condition for the SCI interrupt. I need another
> >> >> dump from 4.8-rc8 with the attached patch to confirm. Let's remove
> >> >> the previous one and apply this one.
> >> >
> >> > dmesg-reverted.txt: 4.8-rc8 w/patches reverted (good)
> >> > $ head /proc/interrupts
> >> >CPU0
> >> >   0:   8531XT-PIC  timer
> >> >   1:  9XT-PIC  i8042
> >> >   2:  0XT-PIC  cascade
> >> >   8:  1XT-PIC  rtc0
> >> >  11:713XT-PIC  acpi, uhci_hcd:usb1, uhci_hcd:usb2, nvkm,
> >> > eth0 12:161XT-PIC  i8042
> >> >  14:   4042XT-PIC  pata_via
> >> >  15:  0XT-PIC  pata_via
> >> > NMI:  0   Non-maskable interrupts
> >> >
> >> > dmesg-bad-debug.txt: 4.8-rc8 (bad)
> >> > $ head /proc/interrupts
> >> >CPU0
> >> >   0:   8027XT-PIC  timer
> >> >   1:286XT-PIC  i8042
> >> >   2:  0XT-PIC  cascade
> >> >   8:  1XT-PIC  rtc0
> >> >  10:  0XT-PIC  uhci_hcd:usb1, uhci_hcd:usb2
> >> >  11:  0XT-PIC  acpi, nvkm, eth0
> >> >  12:161XT-PIC  i8042
> >> >  14:   4069XT-PIC  pata_via
> >> >  15:  0XT-PIC  pata_via
> >> >
> >> > (I'm moving between different machines through the day - these logs
> >> > are from different machine than the last ones).
> >>
> >> Can you try these patches on your machines please?
> >
> > It doesn't even boot :(
>
> Ok, since I have not seen the full boot log I am guessing that isa api
> gets called before the link objects are initialized.

Netconsole did not work (probably because it crashes too early?) and I don't 
have a null-modem cable.

> Can you appply the first three only (0001, 0002 and 0003) to see if it
> makes a difference?

It boots with first 3 patches only but the problem remains - see the attached 
log.

-- 
Ondrej Zary
[0.00] Linux version 4.8.0-rc8+ (zary@gsql) (gcc version 4.7.2 (Debian 
4.7.2-5) ) #122 SMP Thu Sep 29 15:42:41 CEST 2016
[0.00] x86/fpu: Legacy x87 FPU detected.
[0.00] x86/fpu: Using 'eager' FPU context switches.
[0.00] e820: BIOS-provided physical RAM map:
[0.00] BIOS-e820: [mem 0x-0x0009fbff] usable
[0.00] BIOS-e820: [mem 0x0009fc00-0x0009] reserved
[0.00] BIOS-e820: [mem 0x000f-0x000f] reserved
[0.00] BIOS-e820: [mem 0x0010-0x077fbfff] usable
[0.00] BIOS-e820: [mem 0x077fc000-0x077fefff] ACPI data
[0.00] BIOS-e820: [mem 0x077ff000-0x077f] ACPI NVS
[0.00] BIOS-e820: [mem 0x-0x] reserved
[0.00] Notice: NX (Execute Disable) protection missing in CPU!
[0.00] SMBIOS 2.3 present.
[0.00] DMI: System Manufacturer System Name/A7VL133, BIOS ASUS 
A7VL133-VM ACPI BIOS Revision 1008 06/10/2002
[0.00] e820: update [mem 0x-0x0fff] usable ==> reserved
[0.00] e820: remove [mem 0x000a-0x000f] usable
[0.00] e820: last_pfn = 0x77fc max_arch_pfn = 0x10
[0.00] MTRR default type: uncachable
[0.00] MTRR fixed ranges enabled:
[0.00]   0-9 write-back
[0.00]   A-A uncachable
[0.00]   B-B write-combining
[0.00]   C-F uncachable
[0.00] MTRR variable ranges enabled:
[0.00]   0 base 0 mask FFC00 write-back
[0.00]   1 base 00400 mask FFE00 write-back
[0.00]   2 base 00600 mask FFF00 write-back
[0.00]   3 base 00700 mask FFF80 write-back
[0.00]   4 base 0F000 mask FF800 write-combining
[0.00]   5 disabled
[0.00]   6 disabled
[0.00]   7 base 0F800 mask FFC00 write-combining
[0.00] x86/PAT: Configuration [0-7]: WB  WC  UC- UC  WB  WC  UC- WT  
[0.00] initial memory mapped: [mem 0x-0x01bf]
[0.00] Base memory trampoline at [c009b000] 9b000 size 

Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-09-29 Thread Ondrej Zary
On Thursday 29 September 2016, ok...@codeaurora.org wrote:
> On 2016-09-29 05:10, Ondrej Zary wrote:
> > On Thursday 29 September 2016, Sinan Kaya wrote:
> >> On 9/28/2016 3:23 PM, Ondrej Zary wrote:
> >> > On Wednesday 28 September 2016 20:22:40 Sinan Kaya wrote:
> >> >> On 9/28/2016 1:02 PM, Ondrej Zary wrote:
> >>  Thanks, It sounds like you have more than one machine with similar
> >> 
> >> > problems. Can you collect the log from the other machines with
> >> > 4.8-rc8?
> >> >
> >> > and also a boot log with 4.6 kernel where things are working?
> >> >>>
> >> >>> The attached logs are from another machine:
> >> >>>
> >> >>> dmesg-bad-debug.txt: 4.8-rc8 with your debug patch - bad
> >> >>>
> >> >>> dmesg-reverted.txt: 4.8-rc8 with patches (as per Rafael's
> >> >>> suggestion) reverted - good
> >> >>>
> >> >>> dmesg-3.6.txt: 4.6 (Debian kernel) - good
> >> >>
> >> >> I think I see a race condition for the SCI interrupt. I need another
> >> >> dump from 4.8-rc8 with the attached patch to confirm. Let's remove
> >> >> the previous one and apply this one.
> >> >
> >> > dmesg-reverted.txt: 4.8-rc8 w/patches reverted (good)
> >> > $ head /proc/interrupts
> >> >CPU0
> >> >   0:   8531XT-PIC  timer
> >> >   1:  9XT-PIC  i8042
> >> >   2:  0XT-PIC  cascade
> >> >   8:  1XT-PIC  rtc0
> >> >  11:713XT-PIC  acpi, uhci_hcd:usb1, uhci_hcd:usb2, nvkm,
> >> > eth0 12:161XT-PIC  i8042
> >> >  14:   4042XT-PIC  pata_via
> >> >  15:  0XT-PIC  pata_via
> >> > NMI:  0   Non-maskable interrupts
> >> >
> >> > dmesg-bad-debug.txt: 4.8-rc8 (bad)
> >> > $ head /proc/interrupts
> >> >CPU0
> >> >   0:   8027XT-PIC  timer
> >> >   1:286XT-PIC  i8042
> >> >   2:  0XT-PIC  cascade
> >> >   8:  1XT-PIC  rtc0
> >> >  10:  0XT-PIC  uhci_hcd:usb1, uhci_hcd:usb2
> >> >  11:  0XT-PIC  acpi, nvkm, eth0
> >> >  12:161XT-PIC  i8042
> >> >  14:   4069XT-PIC  pata_via
> >> >  15:  0XT-PIC  pata_via
> >> >
> >> > (I'm moving between different machines through the day - these logs
> >> > are from different machine than the last ones).
> >>
> >> Can you try these patches on your machines please?
> >
> > It doesn't even boot :(
>
> Ok, since I have not seen the full boot log I am guessing that isa api
> gets called before the link objects are initialized.

Netconsole did not work (probably because it crashes too early?) and I don't 
have a null-modem cable.

> Can you appply the first three only (0001, 0002 and 0003) to see if it
> makes a difference?

It boots with first 3 patches only but the problem remains - see the attached 
log.

-- 
Ondrej Zary
[0.00] Linux version 4.8.0-rc8+ (zary@gsql) (gcc version 4.7.2 (Debian 
4.7.2-5) ) #122 SMP Thu Sep 29 15:42:41 CEST 2016
[0.00] x86/fpu: Legacy x87 FPU detected.
[0.00] x86/fpu: Using 'eager' FPU context switches.
[0.00] e820: BIOS-provided physical RAM map:
[0.00] BIOS-e820: [mem 0x-0x0009fbff] usable
[0.00] BIOS-e820: [mem 0x0009fc00-0x0009] reserved
[0.00] BIOS-e820: [mem 0x000f-0x000f] reserved
[0.00] BIOS-e820: [mem 0x0010-0x077fbfff] usable
[0.00] BIOS-e820: [mem 0x077fc000-0x077fefff] ACPI data
[0.00] BIOS-e820: [mem 0x077ff000-0x077f] ACPI NVS
[0.00] BIOS-e820: [mem 0x-0x] reserved
[0.00] Notice: NX (Execute Disable) protection missing in CPU!
[0.00] SMBIOS 2.3 present.
[0.00] DMI: System Manufacturer System Name/A7VL133, BIOS ASUS 
A7VL133-VM ACPI BIOS Revision 1008 06/10/2002
[0.00] e820: update [mem 0x-0x0fff] usable ==> reserved
[0.00] e820: remove [mem 0x000a-0x000f] usable
[0.00] e820: last_pfn = 0x77fc max_arch_pfn = 0x10
[0.00] MTRR default type: uncachable
[0.00] MTRR fixed ranges enabled:
[0.00]   0-9 write-back
[0.00]   A-A uncachable
[0.00]   B-B write-combining
[0.00]   C-F uncachable
[0.00] MTRR variable ranges enabled:
[0.00]   0 base 0 mask FFC00 write-back
[0.00]   1 base 00400 mask FFE00 write-back
[0.00]   2 base 00600 mask FFF00 write-back
[0.00]   3 base 00700 mask FFF80 write-back
[0.00]   4 base 0F000 mask FF800 write-combining
[0.00]   5 disabled
[0.00]   6 disabled
[0.00]   7 base 0F800 mask FFC00 write-combining
[0.00] x86/PAT: Configuration [0-7]: WB  WC  UC- UC  WB  WC  UC- WT  
[0.00] initial memory mapped: [mem 0x-0x01bf]
[0.00] Base memory trampoline at [c009b000] 9b000 size 

Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-09-29 Thread okaya

On 2016-09-29 05:10, Ondrej Zary wrote:

On Thursday 29 September 2016, Sinan Kaya wrote:

On 9/28/2016 3:23 PM, Ondrej Zary wrote:
> On Wednesday 28 September 2016 20:22:40 Sinan Kaya wrote:
>> On 9/28/2016 1:02 PM, Ondrej Zary wrote:
 Thanks, It sounds like you have more than one machine with similar

> problems. Can you collect the log from the other machines with
> 4.8-rc8?
>
> and also a boot log with 4.6 kernel where things are working?
>>>
>>> The attached logs are from another machine:
>>>
>>> dmesg-bad-debug.txt: 4.8-rc8 with your debug patch - bad
>>>
>>> dmesg-reverted.txt: 4.8-rc8 with patches (as per Rafael's suggestion)
>>> reverted - good
>>>
>>> dmesg-3.6.txt: 4.6 (Debian kernel) - good
>>
>> I think I see a race condition for the SCI interrupt. I need another
>> dump from 4.8-rc8 with the attached patch to confirm. Let's remove the
>> previous one and apply this one.
>
> dmesg-reverted.txt: 4.8-rc8 w/patches reverted (good)
> $ head /proc/interrupts
>CPU0
>   0:   8531XT-PIC  timer
>   1:  9XT-PIC  i8042
>   2:  0XT-PIC  cascade
>   8:  1XT-PIC  rtc0
>  11:713XT-PIC  acpi, uhci_hcd:usb1, uhci_hcd:usb2, nvkm, eth0
>  12:161XT-PIC  i8042
>  14:   4042XT-PIC  pata_via
>  15:  0XT-PIC  pata_via
> NMI:  0   Non-maskable interrupts
>
> dmesg-bad-debug.txt: 4.8-rc8 (bad)
> $ head /proc/interrupts
>CPU0
>   0:   8027XT-PIC  timer
>   1:286XT-PIC  i8042
>   2:  0XT-PIC  cascade
>   8:  1XT-PIC  rtc0
>  10:  0XT-PIC  uhci_hcd:usb1, uhci_hcd:usb2
>  11:  0XT-PIC  acpi, nvkm, eth0
>  12:161XT-PIC  i8042
>  14:   4069XT-PIC  pata_via
>  15:  0XT-PIC  pata_via
>
> (I'm moving between different machines through the day - these logs are
> from different machine than the last ones).

Can you try these patches on your machines please?


It doesn't even boot :(


Ok, since I have not seen the full boot log I am guessing that isa api 
gets called before the link objects are initialized.



Can you appply the first three only (0001, 0002 and 0003) to see if it 
makes a difference?




ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or 
acpi=off

BUG: unable to handle kernel paging request at e3382f64
IP: [] acpi_irq_get_penalty+0x69/0xa5
*pde = 
Oops:  [#1] SMP
Modules linked in:
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.8.0-rc8+ #114
Hardware name: System Manufacturer System Name/A7VL133, BIOS ASUS
A7VL133-VM ACPI BIOS Revision 1008 06/10/2002
task: c7094000 task.stack: c7098000
EIP: 0060:[] EFLAGS: 00210202 CPU:  0
EIP is at acpi_irq_get_penalty+0x69/0xa5
...
Call Trace:
acpi_isa_irq_available
acpi_pci_irq_enable
pcibios_enable_device
do_pci_enable_device
quirk_usb_early_handoff
pci_get_subsys
pci_fixup_device
pci_apply_final_quirks
pci_proc_init
do_one_initcall
parse_args
kernel_init_freeable
kernel_init_freeable
ret_from_kernel_thread
rest_init


Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-09-29 Thread okaya

On 2016-09-29 05:10, Ondrej Zary wrote:

On Thursday 29 September 2016, Sinan Kaya wrote:

On 9/28/2016 3:23 PM, Ondrej Zary wrote:
> On Wednesday 28 September 2016 20:22:40 Sinan Kaya wrote:
>> On 9/28/2016 1:02 PM, Ondrej Zary wrote:
 Thanks, It sounds like you have more than one machine with similar

> problems. Can you collect the log from the other machines with
> 4.8-rc8?
>
> and also a boot log with 4.6 kernel where things are working?
>>>
>>> The attached logs are from another machine:
>>>
>>> dmesg-bad-debug.txt: 4.8-rc8 with your debug patch - bad
>>>
>>> dmesg-reverted.txt: 4.8-rc8 with patches (as per Rafael's suggestion)
>>> reverted - good
>>>
>>> dmesg-3.6.txt: 4.6 (Debian kernel) - good
>>
>> I think I see a race condition for the SCI interrupt. I need another
>> dump from 4.8-rc8 with the attached patch to confirm. Let's remove the
>> previous one and apply this one.
>
> dmesg-reverted.txt: 4.8-rc8 w/patches reverted (good)
> $ head /proc/interrupts
>CPU0
>   0:   8531XT-PIC  timer
>   1:  9XT-PIC  i8042
>   2:  0XT-PIC  cascade
>   8:  1XT-PIC  rtc0
>  11:713XT-PIC  acpi, uhci_hcd:usb1, uhci_hcd:usb2, nvkm, eth0
>  12:161XT-PIC  i8042
>  14:   4042XT-PIC  pata_via
>  15:  0XT-PIC  pata_via
> NMI:  0   Non-maskable interrupts
>
> dmesg-bad-debug.txt: 4.8-rc8 (bad)
> $ head /proc/interrupts
>CPU0
>   0:   8027XT-PIC  timer
>   1:286XT-PIC  i8042
>   2:  0XT-PIC  cascade
>   8:  1XT-PIC  rtc0
>  10:  0XT-PIC  uhci_hcd:usb1, uhci_hcd:usb2
>  11:  0XT-PIC  acpi, nvkm, eth0
>  12:161XT-PIC  i8042
>  14:   4069XT-PIC  pata_via
>  15:  0XT-PIC  pata_via
>
> (I'm moving between different machines through the day - these logs are
> from different machine than the last ones).

Can you try these patches on your machines please?


It doesn't even boot :(


Ok, since I have not seen the full boot log I am guessing that isa api 
gets called before the link objects are initialized.



Can you appply the first three only (0001, 0002 and 0003) to see if it 
makes a difference?




ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or 
acpi=off

BUG: unable to handle kernel paging request at e3382f64
IP: [] acpi_irq_get_penalty+0x69/0xa5
*pde = 
Oops:  [#1] SMP
Modules linked in:
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.8.0-rc8+ #114
Hardware name: System Manufacturer System Name/A7VL133, BIOS ASUS
A7VL133-VM ACPI BIOS Revision 1008 06/10/2002
task: c7094000 task.stack: c7098000
EIP: 0060:[] EFLAGS: 00210202 CPU:  0
EIP is at acpi_irq_get_penalty+0x69/0xa5
...
Call Trace:
acpi_isa_irq_available
acpi_pci_irq_enable
pcibios_enable_device
do_pci_enable_device
quirk_usb_early_handoff
pci_get_subsys
pci_fixup_device
pci_apply_final_quirks
pci_proc_init
do_one_initcall
parse_args
kernel_init_freeable
kernel_init_freeable
ret_from_kernel_thread
rest_init


Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-09-29 Thread Ondrej Zary
On Thursday 29 September 2016, Sinan Kaya wrote:
> On 9/28/2016 3:23 PM, Ondrej Zary wrote:
> > On Wednesday 28 September 2016 20:22:40 Sinan Kaya wrote:
> >> On 9/28/2016 1:02 PM, Ondrej Zary wrote:
>  Thanks, It sounds like you have more than one machine with similar
> 
> > problems. Can you collect the log from the other machines with
> > 4.8-rc8?
> >
> > and also a boot log with 4.6 kernel where things are working?
> >>>
> >>> The attached logs are from another machine:
> >>>
> >>> dmesg-bad-debug.txt: 4.8-rc8 with your debug patch - bad
> >>>
> >>> dmesg-reverted.txt: 4.8-rc8 with patches (as per Rafael's suggestion)
> >>> reverted - good
> >>>
> >>> dmesg-3.6.txt: 4.6 (Debian kernel) - good
> >>
> >> I think I see a race condition for the SCI interrupt. I need another
> >> dump from 4.8-rc8 with the attached patch to confirm. Let's remove the
> >> previous one and apply this one.
> >
> > dmesg-reverted.txt: 4.8-rc8 w/patches reverted (good)
> > $ head /proc/interrupts
> >CPU0
> >   0:   8531XT-PIC  timer
> >   1:  9XT-PIC  i8042
> >   2:  0XT-PIC  cascade
> >   8:  1XT-PIC  rtc0
> >  11:713XT-PIC  acpi, uhci_hcd:usb1, uhci_hcd:usb2, nvkm, eth0
> >  12:161XT-PIC  i8042
> >  14:   4042XT-PIC  pata_via
> >  15:  0XT-PIC  pata_via
> > NMI:  0   Non-maskable interrupts
> >
> > dmesg-bad-debug.txt: 4.8-rc8 (bad)
> > $ head /proc/interrupts
> >CPU0
> >   0:   8027XT-PIC  timer
> >   1:286XT-PIC  i8042
> >   2:  0XT-PIC  cascade
> >   8:  1XT-PIC  rtc0
> >  10:  0XT-PIC  uhci_hcd:usb1, uhci_hcd:usb2
> >  11:  0XT-PIC  acpi, nvkm, eth0
> >  12:161XT-PIC  i8042
> >  14:   4069XT-PIC  pata_via
> >  15:  0XT-PIC  pata_via
> >
> > (I'm moving between different machines through the day - these logs are
> > from different machine than the last ones).
>
> Can you try these patches on your machines please?

It doesn't even boot :(

ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off
BUG: unable to handle kernel paging request at e3382f64
IP: [] acpi_irq_get_penalty+0x69/0xa5
*pde = 
Oops:  [#1] SMP
Modules linked in: 
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.8.0-rc8+ #114
Hardware name: System Manufacturer System Name/A7VL133, BIOS ASUS A7VL133-VM 
ACPI BIOS Revision 1008 06/10/2002
task: c7094000 task.stack: c7098000
EIP: 0060:[] EFLAGS: 00210202 CPU:  0
EIP is at acpi_irq_get_penalty+0x69/0xa5
...
Call Trace:
acpi_isa_irq_available
acpi_pci_irq_enable
pcibios_enable_device
do_pci_enable_device
quirk_usb_early_handoff
pci_get_subsys
pci_fixup_device
pci_apply_final_quirks
pci_proc_init
do_one_initcall
parse_args
kernel_init_freeable
kernel_init_freeable
ret_from_kernel_thread
rest_init

-- 
Ondrej Zary


Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-09-29 Thread Ondrej Zary
On Thursday 29 September 2016, Sinan Kaya wrote:
> On 9/28/2016 3:23 PM, Ondrej Zary wrote:
> > On Wednesday 28 September 2016 20:22:40 Sinan Kaya wrote:
> >> On 9/28/2016 1:02 PM, Ondrej Zary wrote:
>  Thanks, It sounds like you have more than one machine with similar
> 
> > problems. Can you collect the log from the other machines with
> > 4.8-rc8?
> >
> > and also a boot log with 4.6 kernel where things are working?
> >>>
> >>> The attached logs are from another machine:
> >>>
> >>> dmesg-bad-debug.txt: 4.8-rc8 with your debug patch - bad
> >>>
> >>> dmesg-reverted.txt: 4.8-rc8 with patches (as per Rafael's suggestion)
> >>> reverted - good
> >>>
> >>> dmesg-3.6.txt: 4.6 (Debian kernel) - good
> >>
> >> I think I see a race condition for the SCI interrupt. I need another
> >> dump from 4.8-rc8 with the attached patch to confirm. Let's remove the
> >> previous one and apply this one.
> >
> > dmesg-reverted.txt: 4.8-rc8 w/patches reverted (good)
> > $ head /proc/interrupts
> >CPU0
> >   0:   8531XT-PIC  timer
> >   1:  9XT-PIC  i8042
> >   2:  0XT-PIC  cascade
> >   8:  1XT-PIC  rtc0
> >  11:713XT-PIC  acpi, uhci_hcd:usb1, uhci_hcd:usb2, nvkm, eth0
> >  12:161XT-PIC  i8042
> >  14:   4042XT-PIC  pata_via
> >  15:  0XT-PIC  pata_via
> > NMI:  0   Non-maskable interrupts
> >
> > dmesg-bad-debug.txt: 4.8-rc8 (bad)
> > $ head /proc/interrupts
> >CPU0
> >   0:   8027XT-PIC  timer
> >   1:286XT-PIC  i8042
> >   2:  0XT-PIC  cascade
> >   8:  1XT-PIC  rtc0
> >  10:  0XT-PIC  uhci_hcd:usb1, uhci_hcd:usb2
> >  11:  0XT-PIC  acpi, nvkm, eth0
> >  12:161XT-PIC  i8042
> >  14:   4069XT-PIC  pata_via
> >  15:  0XT-PIC  pata_via
> >
> > (I'm moving between different machines through the day - these logs are
> > from different machine than the last ones).
>
> Can you try these patches on your machines please?

It doesn't even boot :(

ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off
BUG: unable to handle kernel paging request at e3382f64
IP: [] acpi_irq_get_penalty+0x69/0xa5
*pde = 
Oops:  [#1] SMP
Modules linked in: 
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.8.0-rc8+ #114
Hardware name: System Manufacturer System Name/A7VL133, BIOS ASUS A7VL133-VM 
ACPI BIOS Revision 1008 06/10/2002
task: c7094000 task.stack: c7098000
EIP: 0060:[] EFLAGS: 00210202 CPU:  0
EIP is at acpi_irq_get_penalty+0x69/0xa5
...
Call Trace:
acpi_isa_irq_available
acpi_pci_irq_enable
pcibios_enable_device
do_pci_enable_device
quirk_usb_early_handoff
pci_get_subsys
pci_fixup_device
pci_apply_final_quirks
pci_proc_init
do_one_initcall
parse_args
kernel_init_freeable
kernel_init_freeable
ret_from_kernel_thread
rest_init

-- 
Ondrej Zary


Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-09-28 Thread Sinan Kaya
On 9/28/2016 3:23 PM, Ondrej Zary wrote:
> On Wednesday 28 September 2016 20:22:40 Sinan Kaya wrote:
>> On 9/28/2016 1:02 PM, Ondrej Zary wrote:
 Thanks, It sounds like you have more than one machine with similar

> problems. Can you collect the log from the other machines with
> 4.8-rc8?
>
> and also a boot log with 4.6 kernel where things are working?
>>>
>>> The attached logs are from another machine:
>>>
>>> dmesg-bad-debug.txt: 4.8-rc8 with your debug patch - bad
>>>
>>> dmesg-reverted.txt: 4.8-rc8 with patches (as per Rafael's suggestion)
>>> reverted - good
>>>
>>> dmesg-3.6.txt: 4.6 (Debian kernel) - good
>>
>> I think I see a race condition for the SCI interrupt. I need another dump
>> from 4.8-rc8 with the attached patch to confirm. Let's remove the previous
>> one and apply this one.
> 
> dmesg-reverted.txt: 4.8-rc8 w/patches reverted (good)
> $ head /proc/interrupts
>CPU0
>   0:   8531XT-PIC  timer
>   1:  9XT-PIC  i8042
>   2:  0XT-PIC  cascade
>   8:  1XT-PIC  rtc0
>  11:713XT-PIC  acpi, uhci_hcd:usb1, uhci_hcd:usb2, nvkm, eth0
>  12:161XT-PIC  i8042
>  14:   4042XT-PIC  pata_via
>  15:  0XT-PIC  pata_via
> NMI:  0   Non-maskable interrupts
> 
> dmesg-bad-debug.txt: 4.8-rc8 (bad)
> $ head /proc/interrupts
>CPU0
>   0:   8027XT-PIC  timer
>   1:286XT-PIC  i8042
>   2:  0XT-PIC  cascade
>   8:  1XT-PIC  rtc0
>  10:  0XT-PIC  uhci_hcd:usb1, uhci_hcd:usb2
>  11:  0XT-PIC  acpi, nvkm, eth0
>  12:161XT-PIC  i8042
>  14:   4069XT-PIC  pata_via
>  15:  0XT-PIC  pata_via
> 
> (I'm moving between different machines through the day - these logs are from 
> different machine than the last ones).
> 

Can you try these patches on your machines please?


-- 
Sinan Kaya
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm 
Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux 
Foundation Collaborative Project.
>From fe125e9ed5226a8976f5510c5a0d34280d693952 Mon Sep 17 00:00:00 2001
From: Sinan Kaya 
Date: Wed, 28 Sep 2016 19:08:34 -0400
Subject: [PATCH 2/4] ACPI, PCI, IRQ: remove double penalty calculation

acpi_irq_get_penalty returns the penalty for both PCI and ISA penalties.
Now that we don't have any storage place for PCI IRQs, we run into some
math problem such as follows:

The original code was as simple as this:
acpi_isa_irq_penalty += penalty

In order to hide PCI IRQ calculation difference vs. ISA IRQ difference, we
created the acpi_irq_get_penalty function and replaced the above statement
as

acpi_isa_irq_penalty = acpi_irq_get_penalty() + penalty

This is what acpi_irq_get_penalty returns.

acpi_irq_get_penalty()= acpi_isa_irq_penalty + SCI penalty

When you call acpi_penalize_isa_irq twice, you end up with:

acpi_isa_irq_penalty = 2 * SCI penalty + acpi_isa_irq_penalty

Fixing this by directly modifying acpi_isa_irq_penalty for the new penalty
added.

Signed-off-by: Sinan Kaya 
---
 drivers/acpi/pci_link.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c
index 1edda48..df58153 100644
--- a/drivers/acpi/pci_link.c
+++ b/drivers/acpi/pci_link.c
@@ -871,9 +871,10 @@ static int __init acpi_irq_penalty_update(char *str, int 
used)
  */
 void acpi_penalize_isa_irq(int irq, int active)
 {
+   int penalty = active ? PIRQ_PENALTY_ISA_USED : PIRQ_PENALTY_PCI_USING;
+
if ((irq >= 0) && (irq < ARRAY_SIZE(acpi_isa_irq_penalty)))
-   acpi_isa_irq_penalty[irq] = acpi_irq_get_penalty(irq) +
- (active ? PIRQ_PENALTY_ISA_USED : PIRQ_PENALTY_PCI_USING);
+   acpi_isa_irq_penalty[irq] += penalty;
 }
 
 bool acpi_isa_irq_available(int irq)
-- 
1.9.1

>From 0a75506dc5d7aeba0a7ca8cd3fdcfaca55bbaf18 Mon Sep 17 00:00:00 2001
From: Sinan Kaya 
Date: Wed, 28 Sep 2016 18:56:48 -0400
Subject: [PATCH 3/4] ACPI,PCI,IRQ: add PCI possible only for PCI interrupts

acpi_irq_penalty_init is pre-calculating PCI_POSSIBLE penalty for
ISA interrupts at power up. Remove this from PCI dynamic penalty
path.

Signed-off-by: Sinan Kaya 
---
 drivers/acpi/pci_link.c | 16 +---
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c
index df58153..a7068a4 100644
--- a/drivers/acpi/pci_link.c
+++ b/drivers/acpi/pci_link.c
@@ -481,13 +481,15 @@ static int acpi_irq_pci_sharing_penalty(int irq)
(link->irq.initialized == 1))
penalty += PIRQ_PENALTY_PCI_USING;
 
-   /*
-* penalize the IRQs PCI might use, but not as severely.
-*/
-   for (i = 0; i < link->irq.possible_count; i++)

Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-09-28 Thread Sinan Kaya
On 9/28/2016 3:23 PM, Ondrej Zary wrote:
> On Wednesday 28 September 2016 20:22:40 Sinan Kaya wrote:
>> On 9/28/2016 1:02 PM, Ondrej Zary wrote:
 Thanks, It sounds like you have more than one machine with similar

> problems. Can you collect the log from the other machines with
> 4.8-rc8?
>
> and also a boot log with 4.6 kernel where things are working?
>>>
>>> The attached logs are from another machine:
>>>
>>> dmesg-bad-debug.txt: 4.8-rc8 with your debug patch - bad
>>>
>>> dmesg-reverted.txt: 4.8-rc8 with patches (as per Rafael's suggestion)
>>> reverted - good
>>>
>>> dmesg-3.6.txt: 4.6 (Debian kernel) - good
>>
>> I think I see a race condition for the SCI interrupt. I need another dump
>> from 4.8-rc8 with the attached patch to confirm. Let's remove the previous
>> one and apply this one.
> 
> dmesg-reverted.txt: 4.8-rc8 w/patches reverted (good)
> $ head /proc/interrupts
>CPU0
>   0:   8531XT-PIC  timer
>   1:  9XT-PIC  i8042
>   2:  0XT-PIC  cascade
>   8:  1XT-PIC  rtc0
>  11:713XT-PIC  acpi, uhci_hcd:usb1, uhci_hcd:usb2, nvkm, eth0
>  12:161XT-PIC  i8042
>  14:   4042XT-PIC  pata_via
>  15:  0XT-PIC  pata_via
> NMI:  0   Non-maskable interrupts
> 
> dmesg-bad-debug.txt: 4.8-rc8 (bad)
> $ head /proc/interrupts
>CPU0
>   0:   8027XT-PIC  timer
>   1:286XT-PIC  i8042
>   2:  0XT-PIC  cascade
>   8:  1XT-PIC  rtc0
>  10:  0XT-PIC  uhci_hcd:usb1, uhci_hcd:usb2
>  11:  0XT-PIC  acpi, nvkm, eth0
>  12:161XT-PIC  i8042
>  14:   4069XT-PIC  pata_via
>  15:  0XT-PIC  pata_via
> 
> (I'm moving between different machines through the day - these logs are from 
> different machine than the last ones).
> 

Can you try these patches on your machines please?


-- 
Sinan Kaya
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm 
Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux 
Foundation Collaborative Project.
>From fe125e9ed5226a8976f5510c5a0d34280d693952 Mon Sep 17 00:00:00 2001
From: Sinan Kaya 
Date: Wed, 28 Sep 2016 19:08:34 -0400
Subject: [PATCH 2/4] ACPI, PCI, IRQ: remove double penalty calculation

acpi_irq_get_penalty returns the penalty for both PCI and ISA penalties.
Now that we don't have any storage place for PCI IRQs, we run into some
math problem such as follows:

The original code was as simple as this:
acpi_isa_irq_penalty += penalty

In order to hide PCI IRQ calculation difference vs. ISA IRQ difference, we
created the acpi_irq_get_penalty function and replaced the above statement
as

acpi_isa_irq_penalty = acpi_irq_get_penalty() + penalty

This is what acpi_irq_get_penalty returns.

acpi_irq_get_penalty()= acpi_isa_irq_penalty + SCI penalty

When you call acpi_penalize_isa_irq twice, you end up with:

acpi_isa_irq_penalty = 2 * SCI penalty + acpi_isa_irq_penalty

Fixing this by directly modifying acpi_isa_irq_penalty for the new penalty
added.

Signed-off-by: Sinan Kaya 
---
 drivers/acpi/pci_link.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c
index 1edda48..df58153 100644
--- a/drivers/acpi/pci_link.c
+++ b/drivers/acpi/pci_link.c
@@ -871,9 +871,10 @@ static int __init acpi_irq_penalty_update(char *str, int 
used)
  */
 void acpi_penalize_isa_irq(int irq, int active)
 {
+   int penalty = active ? PIRQ_PENALTY_ISA_USED : PIRQ_PENALTY_PCI_USING;
+
if ((irq >= 0) && (irq < ARRAY_SIZE(acpi_isa_irq_penalty)))
-   acpi_isa_irq_penalty[irq] = acpi_irq_get_penalty(irq) +
- (active ? PIRQ_PENALTY_ISA_USED : PIRQ_PENALTY_PCI_USING);
+   acpi_isa_irq_penalty[irq] += penalty;
 }
 
 bool acpi_isa_irq_available(int irq)
-- 
1.9.1

>From 0a75506dc5d7aeba0a7ca8cd3fdcfaca55bbaf18 Mon Sep 17 00:00:00 2001
From: Sinan Kaya 
Date: Wed, 28 Sep 2016 18:56:48 -0400
Subject: [PATCH 3/4] ACPI,PCI,IRQ: add PCI possible only for PCI interrupts

acpi_irq_penalty_init is pre-calculating PCI_POSSIBLE penalty for
ISA interrupts at power up. Remove this from PCI dynamic penalty
path.

Signed-off-by: Sinan Kaya 
---
 drivers/acpi/pci_link.c | 16 +---
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c
index df58153..a7068a4 100644
--- a/drivers/acpi/pci_link.c
+++ b/drivers/acpi/pci_link.c
@@ -481,13 +481,15 @@ static int acpi_irq_pci_sharing_penalty(int irq)
(link->irq.initialized == 1))
penalty += PIRQ_PENALTY_PCI_USING;
 
-   /*
-* penalize the IRQs PCI might use, but not as severely.
-*/
-   for (i = 0; i < link->irq.possible_count; i++)
-   if (link->irq.possible[i] == irq)
- 

Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-09-28 Thread Ondrej Zary
On Wednesday 28 September 2016 20:22:40 Sinan Kaya wrote:
> On 9/28/2016 1:02 PM, Ondrej Zary wrote:
> >> Thanks, It sounds like you have more than one machine with similar
> >>
> >> > problems. Can you collect the log from the other machines with
> >> > 4.8-rc8?
> >> >
> >> > and also a boot log with 4.6 kernel where things are working?
> >
> > The attached logs are from another machine:
> >
> > dmesg-bad-debug.txt: 4.8-rc8 with your debug patch - bad
> >
> > dmesg-reverted.txt: 4.8-rc8 with patches (as per Rafael's suggestion)
> > reverted - good
> >
> > dmesg-3.6.txt: 4.6 (Debian kernel) - good
>
> I think I see a race condition for the SCI interrupt. I need another dump
> from 4.8-rc8 with the attached patch to confirm. Let's remove the previous
> one and apply this one.

dmesg-reverted.txt: 4.8-rc8 w/patches reverted (good)
$ head /proc/interrupts
   CPU0
  0:   8531XT-PIC  timer
  1:  9XT-PIC  i8042
  2:  0XT-PIC  cascade
  8:  1XT-PIC  rtc0
 11:713XT-PIC  acpi, uhci_hcd:usb1, uhci_hcd:usb2, nvkm, eth0
 12:161XT-PIC  i8042
 14:   4042XT-PIC  pata_via
 15:  0XT-PIC  pata_via
NMI:  0   Non-maskable interrupts

dmesg-bad-debug.txt: 4.8-rc8 (bad)
$ head /proc/interrupts
   CPU0
  0:   8027XT-PIC  timer
  1:286XT-PIC  i8042
  2:  0XT-PIC  cascade
  8:  1XT-PIC  rtc0
 10:  0XT-PIC  uhci_hcd:usb1, uhci_hcd:usb2
 11:  0XT-PIC  acpi, nvkm, eth0
 12:161XT-PIC  i8042
 14:   4069XT-PIC  pata_via
 15:  0XT-PIC  pata_via

(I'm moving between different machines through the day - these logs are from 
different machine than the last ones).

-- 
Ondrej Zary
[0.00] Linux version 4.8.0-rc8+ (zary@gsql) (gcc version 4.7.2 (Debian 
4.7.2-5) ) #112 SMP Wed Sep 28 21:09:56 CEST 2016
[0.00] x86/fpu: Legacy x87 FPU detected.
[0.00] x86/fpu: Using 'eager' FPU context switches.
[0.00] e820: BIOS-provided physical RAM map:
[0.00] BIOS-e820: [mem 0x-0x0009fbff] usable
[0.00] BIOS-e820: [mem 0x0009fc00-0x0009] reserved
[0.00] BIOS-e820: [mem 0x000f-0x000f] reserved
[0.00] BIOS-e820: [mem 0x0010-0x1ffe] usable
[0.00] BIOS-e820: [mem 0x1fff-0x1fff2fff] ACPI NVS
[0.00] BIOS-e820: [mem 0x1fff3000-0x1fff] ACPI data
[0.00] BIOS-e820: [mem 0x-0x] reserved
[0.00] Notice: NX (Execute Disable) protection missing in CPU!
[0.00] SMBIOS 2.2 present.
[0.00] DMI: VIA Technologies, Inc. VT82C694X/694X, BIOS 6.00 PG 
02/19/2002
[0.00] e820: update [mem 0x-0x0fff] usable ==> reserved
[0.00] e820: remove [mem 0x000a-0x000f] usable
[0.00] e820: last_pfn = 0x1fff0 max_arch_pfn = 0x10
[0.00] MTRR default type: uncachable
[0.00] MTRR fixed ranges enabled:
[0.00]   0-9 write-back
[0.00]   A-A uncachable
[0.00]   B-B write-combining
[0.00]   C-C9FFF write-protect
[0.00]   CA000-E uncachable
[0.00]   F-F7FFF write-through
[0.00]   F8000-F8FFF uncachable
[0.00]   F9000-F write-through
[0.00] MTRR variable ranges enabled:
[0.00]   0 base 0 mask FE000 write-back
[0.00]   1 base 0E000 mask FFC00 write-combining
[0.00]   2 disabled
[0.00]   3 disabled
[0.00]   4 disabled
[0.00]   5 disabled
[0.00]   6 disabled
[0.00]   7 disabled
[0.00] x86/PAT: PAT not supported by CPU.
[0.00] x86/PAT: Configuration [0-7]: WB  WT  UC- UC  WB  WT  UC- UC  
[0.00] initial memory mapped: [mem 0x-0x01bf]
[0.00] Base memory trampoline at [c009b000] 9b000 size 16384
[0.00] BRK [0x016b7000, 0x016b7fff] PGTABLE
[0.00] ACPI: Early table checksum verification disabled
[0.00] ACPI: RSDP 0x000F6C00 14 (v00 VIA694)
[0.00] ACPI: RSDT 0x1FFF3000 28 (v01 VIA694 AWRDACPI 
42302E31 AWRD )
[0.00] ACPI: FACP 0x1FFF3040 74 (v01 VIA694 AWRDACPI 
42302E31 AWRD )
[0.00] ACPI: DSDT 0x1FFF30C0 002587 (v01 VIA694 AWRDACPI 
1000 MSFT 010C)
[0.00] ACPI: FACS 0x1FFF 40
[0.00] 0MB HIGHMEM available.
[0.00] 511MB LOWMEM available.
[0.00]   mapped low ram: 0 - 1fff
[0.00]   low ram: 0 - 1fff
[0.00] BRK [0x016b8000, 0x016b8fff] PGTABLE
[0.00] Zone ranges:
[0.00]   DMA  [mem 0x1000-0x00ff]
[0.00]   Normal   [mem 0x0100-0x1ffe]
[0.00]   HighMem  empty
[0.00] 

Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-09-28 Thread Ondrej Zary
On Wednesday 28 September 2016 20:22:40 Sinan Kaya wrote:
> On 9/28/2016 1:02 PM, Ondrej Zary wrote:
> >> Thanks, It sounds like you have more than one machine with similar
> >>
> >> > problems. Can you collect the log from the other machines with
> >> > 4.8-rc8?
> >> >
> >> > and also a boot log with 4.6 kernel where things are working?
> >
> > The attached logs are from another machine:
> >
> > dmesg-bad-debug.txt: 4.8-rc8 with your debug patch - bad
> >
> > dmesg-reverted.txt: 4.8-rc8 with patches (as per Rafael's suggestion)
> > reverted - good
> >
> > dmesg-3.6.txt: 4.6 (Debian kernel) - good
>
> I think I see a race condition for the SCI interrupt. I need another dump
> from 4.8-rc8 with the attached patch to confirm. Let's remove the previous
> one and apply this one.

dmesg-reverted.txt: 4.8-rc8 w/patches reverted (good)
$ head /proc/interrupts
   CPU0
  0:   8531XT-PIC  timer
  1:  9XT-PIC  i8042
  2:  0XT-PIC  cascade
  8:  1XT-PIC  rtc0
 11:713XT-PIC  acpi, uhci_hcd:usb1, uhci_hcd:usb2, nvkm, eth0
 12:161XT-PIC  i8042
 14:   4042XT-PIC  pata_via
 15:  0XT-PIC  pata_via
NMI:  0   Non-maskable interrupts

dmesg-bad-debug.txt: 4.8-rc8 (bad)
$ head /proc/interrupts
   CPU0
  0:   8027XT-PIC  timer
  1:286XT-PIC  i8042
  2:  0XT-PIC  cascade
  8:  1XT-PIC  rtc0
 10:  0XT-PIC  uhci_hcd:usb1, uhci_hcd:usb2
 11:  0XT-PIC  acpi, nvkm, eth0
 12:161XT-PIC  i8042
 14:   4069XT-PIC  pata_via
 15:  0XT-PIC  pata_via

(I'm moving between different machines through the day - these logs are from 
different machine than the last ones).

-- 
Ondrej Zary
[0.00] Linux version 4.8.0-rc8+ (zary@gsql) (gcc version 4.7.2 (Debian 
4.7.2-5) ) #112 SMP Wed Sep 28 21:09:56 CEST 2016
[0.00] x86/fpu: Legacy x87 FPU detected.
[0.00] x86/fpu: Using 'eager' FPU context switches.
[0.00] e820: BIOS-provided physical RAM map:
[0.00] BIOS-e820: [mem 0x-0x0009fbff] usable
[0.00] BIOS-e820: [mem 0x0009fc00-0x0009] reserved
[0.00] BIOS-e820: [mem 0x000f-0x000f] reserved
[0.00] BIOS-e820: [mem 0x0010-0x1ffe] usable
[0.00] BIOS-e820: [mem 0x1fff-0x1fff2fff] ACPI NVS
[0.00] BIOS-e820: [mem 0x1fff3000-0x1fff] ACPI data
[0.00] BIOS-e820: [mem 0x-0x] reserved
[0.00] Notice: NX (Execute Disable) protection missing in CPU!
[0.00] SMBIOS 2.2 present.
[0.00] DMI: VIA Technologies, Inc. VT82C694X/694X, BIOS 6.00 PG 
02/19/2002
[0.00] e820: update [mem 0x-0x0fff] usable ==> reserved
[0.00] e820: remove [mem 0x000a-0x000f] usable
[0.00] e820: last_pfn = 0x1fff0 max_arch_pfn = 0x10
[0.00] MTRR default type: uncachable
[0.00] MTRR fixed ranges enabled:
[0.00]   0-9 write-back
[0.00]   A-A uncachable
[0.00]   B-B write-combining
[0.00]   C-C9FFF write-protect
[0.00]   CA000-E uncachable
[0.00]   F-F7FFF write-through
[0.00]   F8000-F8FFF uncachable
[0.00]   F9000-F write-through
[0.00] MTRR variable ranges enabled:
[0.00]   0 base 0 mask FE000 write-back
[0.00]   1 base 0E000 mask FFC00 write-combining
[0.00]   2 disabled
[0.00]   3 disabled
[0.00]   4 disabled
[0.00]   5 disabled
[0.00]   6 disabled
[0.00]   7 disabled
[0.00] x86/PAT: PAT not supported by CPU.
[0.00] x86/PAT: Configuration [0-7]: WB  WT  UC- UC  WB  WT  UC- UC  
[0.00] initial memory mapped: [mem 0x-0x01bf]
[0.00] Base memory trampoline at [c009b000] 9b000 size 16384
[0.00] BRK [0x016b7000, 0x016b7fff] PGTABLE
[0.00] ACPI: Early table checksum verification disabled
[0.00] ACPI: RSDP 0x000F6C00 14 (v00 VIA694)
[0.00] ACPI: RSDT 0x1FFF3000 28 (v01 VIA694 AWRDACPI 
42302E31 AWRD )
[0.00] ACPI: FACP 0x1FFF3040 74 (v01 VIA694 AWRDACPI 
42302E31 AWRD )
[0.00] ACPI: DSDT 0x1FFF30C0 002587 (v01 VIA694 AWRDACPI 
1000 MSFT 010C)
[0.00] ACPI: FACS 0x1FFF 40
[0.00] 0MB HIGHMEM available.
[0.00] 511MB LOWMEM available.
[0.00]   mapped low ram: 0 - 1fff
[0.00]   low ram: 0 - 1fff
[0.00] BRK [0x016b8000, 0x016b8fff] PGTABLE
[0.00] Zone ranges:
[0.00]   DMA  [mem 0x1000-0x00ff]
[0.00]   Normal   [mem 0x0100-0x1ffe]
[0.00]   HighMem  empty
[0.00] 

Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-09-28 Thread Sinan Kaya
On 9/28/2016 1:02 PM, Ondrej Zary wrote:
>> Thanks, It sounds like you have more than one machine with similar
>> > problems. Can you collect the log from the other machines with 4.8-rc8?
>> >
>> > and also a boot log with 4.6 kernel where things are working?
> The attached logs are from another machine:
> 
> dmesg-bad-debug.txt: 4.8-rc8 with your debug patch - bad
> 
> dmesg-reverted.txt: 4.8-rc8 with patches (as per Rafael's suggestion) 
> reverted - good
> 
> dmesg-3.6.txt: 4.6 (Debian kernel) - good

I think I see a race condition for the SCI interrupt. I need another dump from
4.8-rc8 with the attached patch to confirm. Let's remove the previous one and
apply this one.



-- 
Sinan Kaya
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm 
Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux 
Foundation Collaborative Project.
>From 3545aba9f138bd233264c151d8c32cd417bfb09f Mon Sep 17 00:00:00 2001
From: Sinan Kaya 
Date: Tue, 27 Sep 2016 18:35:15 -0400
Subject: [PATCH] acpi: pci_link: debug aids v2

Change-Id: I6c459cb5888d95f5f1ef7c0e2f138fb9c65f40e5
---
 drivers/acpi/pci_link.c | 24 ++--
 1 file changed, 22 insertions(+), 2 deletions(-)

diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c
index c983bf7..92a6506 100644
--- a/drivers/acpi/pci_link.c
+++ b/drivers/acpi/pci_link.c
@@ -508,6 +508,8 @@ static int acpi_irq_get_penalty(int irq)
penalty += PIRQ_PENALTY_ISA_ALWAYS;
else
penalty += PIRQ_PENALTY_PCI_USING;
+
+   pr_info("%s:%d adding SCI penalty: 0x%x \n", __func__, 
__LINE__, penalty);
}
 
if (irq < ACPI_MAX_ISA_IRQS)
@@ -592,6 +594,10 @@ static int acpi_pci_link_allocate(struct acpi_pci_link 
*link)
else
irq = link->irq.possible[link->irq.possible_count - 1];
 
+   pr_info("irq : %d\n", irq);
+   pr_info("acpi_irq_balance : %d\n", acpi_irq_balance);
+   pr_info("link->irq.active : %d\n", link->irq.active);
+   pr_info("acpi_gbl_FADT.sci_interrupt : %d\n", 
acpi_gbl_FADT.sci_interrupt);
if (acpi_irq_balance || !link->irq.active) {
/*
 * Select the best IRQ.  This is done in reverse to promote
@@ -599,11 +605,22 @@ static int acpi_pci_link_allocate(struct acpi_pci_link 
*link)
 */
for (i = (link->irq.possible_count - 1); i >= 0; i--) {
if (acpi_irq_get_penalty(irq) >
-   acpi_irq_get_penalty(link->irq.possible[i]))
+   acpi_irq_get_penalty(link->irq.possible[i])) {
+   pr_info("acpi_irq_get_penalty(%d) : 0x%x\n", 
link->irq.possible[i], acpi_irq_get_penalty(link->irq.possible[i]));
+   pr_info("acpi_irq_get_penalty(%d) : 0x%x\n", 
irq, acpi_irq_get_penalty(irq));
irq = link->irq.possible[i];
+   }
}
}
if (acpi_irq_get_penalty(irq) >= PIRQ_PENALTY_ISA_ALWAYS) {
+   for (i = (link->irq.possible_count - 1); i >= 0; i--) {
+   pr_info("penalty[%d] = 0x%x\n",
+   link->irq.possible[i],
+   acpi_irq_get_penalty(link->irq.possible[i]));
+   }
+   pr_info("irq : %d\n", irq);
+   pr_info("acpi_gbl_FADT.sci_interrupt : %d\n", 
acpi_gbl_FADT.sci_interrupt);
+
printk(KERN_ERR PREFIX "No IRQ available for %s [%s]. "
"Try pci=noacpi or acpi=off\n",
acpi_device_name(link->device),
@@ -870,9 +887,12 @@ static int __init acpi_irq_penalty_update(char *str, int 
used)
  */
 void acpi_penalize_isa_irq(int irq, int active)
 {
-   if ((irq >= 0) && (irq < ARRAY_SIZE(acpi_isa_irq_penalty)))
+   if ((irq >= 0) && (irq < ARRAY_SIZE(acpi_isa_irq_penalty))) {
acpi_isa_irq_penalty[irq] = acpi_irq_get_penalty(irq) +
  (active ? PIRQ_PENALTY_ISA_USED : PIRQ_PENALTY_PCI_USING);
+   pr_info("%s:%d acpi_isa_irq_penalty[%d]=0x%x active = %d\n", 
__func__,
+   __LINE__, irq,  acpi_irq_get_penalty(irq), 
active);
+   }
 }
 
 bool acpi_isa_irq_available(int irq)
-- 
1.9.1



Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-09-28 Thread Sinan Kaya
On 9/28/2016 1:02 PM, Ondrej Zary wrote:
>> Thanks, It sounds like you have more than one machine with similar
>> > problems. Can you collect the log from the other machines with 4.8-rc8?
>> >
>> > and also a boot log with 4.6 kernel where things are working?
> The attached logs are from another machine:
> 
> dmesg-bad-debug.txt: 4.8-rc8 with your debug patch - bad
> 
> dmesg-reverted.txt: 4.8-rc8 with patches (as per Rafael's suggestion) 
> reverted - good
> 
> dmesg-3.6.txt: 4.6 (Debian kernel) - good

I think I see a race condition for the SCI interrupt. I need another dump from
4.8-rc8 with the attached patch to confirm. Let's remove the previous one and
apply this one.



-- 
Sinan Kaya
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm 
Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux 
Foundation Collaborative Project.
>From 3545aba9f138bd233264c151d8c32cd417bfb09f Mon Sep 17 00:00:00 2001
From: Sinan Kaya 
Date: Tue, 27 Sep 2016 18:35:15 -0400
Subject: [PATCH] acpi: pci_link: debug aids v2

Change-Id: I6c459cb5888d95f5f1ef7c0e2f138fb9c65f40e5
---
 drivers/acpi/pci_link.c | 24 ++--
 1 file changed, 22 insertions(+), 2 deletions(-)

diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c
index c983bf7..92a6506 100644
--- a/drivers/acpi/pci_link.c
+++ b/drivers/acpi/pci_link.c
@@ -508,6 +508,8 @@ static int acpi_irq_get_penalty(int irq)
penalty += PIRQ_PENALTY_ISA_ALWAYS;
else
penalty += PIRQ_PENALTY_PCI_USING;
+
+   pr_info("%s:%d adding SCI penalty: 0x%x \n", __func__, 
__LINE__, penalty);
}
 
if (irq < ACPI_MAX_ISA_IRQS)
@@ -592,6 +594,10 @@ static int acpi_pci_link_allocate(struct acpi_pci_link 
*link)
else
irq = link->irq.possible[link->irq.possible_count - 1];
 
+   pr_info("irq : %d\n", irq);
+   pr_info("acpi_irq_balance : %d\n", acpi_irq_balance);
+   pr_info("link->irq.active : %d\n", link->irq.active);
+   pr_info("acpi_gbl_FADT.sci_interrupt : %d\n", 
acpi_gbl_FADT.sci_interrupt);
if (acpi_irq_balance || !link->irq.active) {
/*
 * Select the best IRQ.  This is done in reverse to promote
@@ -599,11 +605,22 @@ static int acpi_pci_link_allocate(struct acpi_pci_link 
*link)
 */
for (i = (link->irq.possible_count - 1); i >= 0; i--) {
if (acpi_irq_get_penalty(irq) >
-   acpi_irq_get_penalty(link->irq.possible[i]))
+   acpi_irq_get_penalty(link->irq.possible[i])) {
+   pr_info("acpi_irq_get_penalty(%d) : 0x%x\n", 
link->irq.possible[i], acpi_irq_get_penalty(link->irq.possible[i]));
+   pr_info("acpi_irq_get_penalty(%d) : 0x%x\n", 
irq, acpi_irq_get_penalty(irq));
irq = link->irq.possible[i];
+   }
}
}
if (acpi_irq_get_penalty(irq) >= PIRQ_PENALTY_ISA_ALWAYS) {
+   for (i = (link->irq.possible_count - 1); i >= 0; i--) {
+   pr_info("penalty[%d] = 0x%x\n",
+   link->irq.possible[i],
+   acpi_irq_get_penalty(link->irq.possible[i]));
+   }
+   pr_info("irq : %d\n", irq);
+   pr_info("acpi_gbl_FADT.sci_interrupt : %d\n", 
acpi_gbl_FADT.sci_interrupt);
+
printk(KERN_ERR PREFIX "No IRQ available for %s [%s]. "
"Try pci=noacpi or acpi=off\n",
acpi_device_name(link->device),
@@ -870,9 +887,12 @@ static int __init acpi_irq_penalty_update(char *str, int 
used)
  */
 void acpi_penalize_isa_irq(int irq, int active)
 {
-   if ((irq >= 0) && (irq < ARRAY_SIZE(acpi_isa_irq_penalty)))
+   if ((irq >= 0) && (irq < ARRAY_SIZE(acpi_isa_irq_penalty))) {
acpi_isa_irq_penalty[irq] = acpi_irq_get_penalty(irq) +
  (active ? PIRQ_PENALTY_ISA_USED : PIRQ_PENALTY_PCI_USING);
+   pr_info("%s:%d acpi_isa_irq_penalty[%d]=0x%x active = %d\n", 
__func__,
+   __LINE__, irq,  acpi_irq_get_penalty(irq), 
active);
+   }
 }
 
 bool acpi_isa_irq_available(int irq)
-- 
1.9.1



Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-09-28 Thread Ondrej Zary
On Wednesday 28 September 2016 16:11:39 Sinan Kaya wrote:
> On 9/28/2016 4:32 AM, Ondrej Zary wrote:
> >>> OK
> >>>
> >>> > > Sinan, can you help, please?
> >> >
> >> > Sure, let's see what's going on. I was writing an email.
> >> >
> >> > Can we apply this and collect the kernel log? It also helps to see the
> >> > kernel log from a working combination.
> >
> > This is from yet another machine with the same problem:
>
> Thanks, It sounds like you have more than one machine with similar
> problems. Can you collect the log from the other machines with 4.8-rc8?
>
> and also a boot log with 4.6 kernel where things are working?

The attached logs are from another machine:

dmesg-bad-debug.txt: 4.8-rc8 with your debug patch - bad

dmesg-reverted.txt: 4.8-rc8 with patches (as per Rafael's suggestion) 
reverted - good

dmesg-3.6.txt: 4.6 (Debian kernel) - good


-- 
Ondrej Zary
[0.00] Linux version 4.8.0-rc8+ (zary@gsql) (gcc version 4.7.2 (Debian 
4.7.2-5) ) #110 SMP Wed Sep 28 18:39:32 CEST 2016
[0.00] x86/fpu: Legacy x87 FPU detected.
[0.00] x86/fpu: Using 'eager' FPU context switches.
[0.00] e820: BIOS-provided physical RAM map:
[0.00] BIOS-e820: [mem 0x-0x0009fbff] usable
[0.00] BIOS-e820: [mem 0x0009fc00-0x0009] reserved
[0.00] BIOS-e820: [mem 0x000f-0x000f] reserved
[0.00] BIOS-e820: [mem 0x0010-0x1fffcfff] usable
[0.00] BIOS-e820: [mem 0x1fffd000-0x1fffefff] ACPI data
[0.00] BIOS-e820: [mem 0x1000-0x1fff] ACPI NVS
[0.00] BIOS-e820: [mem 0x-0x] reserved
[0.00] Notice: NX (Execute Disable) protection missing in CPU!
[0.00] Legacy DMI 2.0 present.
[0.00] DMI: System Manufacturer System Name/P2B, BIOS ASUS P2B ACPI 
BIOS Revision 1014 Beta 00308/01/02
[0.00] e820: update [mem 0x-0x0fff] usable ==> reserved
[0.00] e820: remove [mem 0x000a-0x000f] usable
[0.00] e820: last_pfn = 0x1fffd max_arch_pfn = 0x10
[0.00] MTRR default type: uncachable
[0.00] MTRR fixed ranges enabled:
[0.00]   0-9 write-back
[0.00]   A-A uncachable
[0.00]   B-B write-combining
[0.00]   C-C7FFF write-protect
[0.00]   C8000-F7FFF uncachable
[0.00]   F8000-FCFFF write-protect
[0.00]   FD000-F uncachable
[0.00] MTRR variable ranges enabled:
[0.00]   0 base 0 mask FE000 write-back
[0.00]   1 disabled
[0.00]   2 disabled
[0.00]   3 disabled
[0.00]   4 disabled
[0.00]   5 base 0D800 mask FF800 write-combining
[0.00]   6 disabled
[0.00]   7 disabled
[0.00] x86/PAT: PAT not supported by CPU.
[0.00] x86/PAT: Configuration [0-7]: WB  WT  UC- UC  WB  WT  UC- UC  
[0.00] initial memory mapped: [mem 0x-0x01bf]
[0.00] Base memory trampoline at [c009b000] 9b000 size 16384
[0.00] BRK [0x016b7000, 0x016b7fff] PGTABLE
[0.00] ACPI: Early table checksum verification disabled
[0.00] ACPI: RSDP 0x000F7F90 14 (v00 ASUS  )
[0.00] ACPI: RSDT 0x1FFFD000 2C (v01 ASUS   P2B  
42302E31 MSFT 31313031)
[0.00] ACPI: FACP 0x1FFFD080 74 (v01 ASUS   P2B  
42302E31 MSFT 31313031)
[0.00] ACPI: DSDT 0x1FFFD100 001BA8 (v01 ASUS   P2B  
1000 MSFT 0101)
[0.00] ACPI: FACS 0x1000 40
[0.00] ACPI: BOOT 0x1FFFD040 28 (v01 ASUS   P2B  
42302E31 MSFT 31313031)
[0.00] 0MB HIGHMEM available.
[0.00] 511MB LOWMEM available.
[0.00]   mapped low ram: 0 - 1fffd000
[0.00]   low ram: 0 - 1fffd000
[0.00] BRK [0x016b8000, 0x016b8fff] PGTABLE
[0.00] Zone ranges:
[0.00]   DMA  [mem 0x1000-0x00ff]
[0.00]   Normal   [mem 0x0100-0x1fffcfff]
[0.00]   HighMem  empty
[0.00] Movable zone start for each node
[0.00] Early memory node ranges
[0.00]   node   0: [mem 0x1000-0x0009efff]
[0.00]   node   0: [mem 0x0010-0x1fffcfff]
[0.00] Initmem setup node 0 [mem 0x1000-0x1fffcfff]
[0.00] On node 0 totalpages: 130971
[0.00] free_area_init_node: node 0, pgdat c15b1840, node_mem_map 
dfbfd020
[0.00]   DMA zone: 32 pages used for memmap
[0.00]   DMA zone: 0 pages reserved
[0.00]   DMA zone: 3998 pages, LIFO batch:0
[0.00]   Normal zone: 992 pages used for memmap
[0.00]   Normal zone: 126973 pages, LIFO batch:31
[0.00] Using APIC driver default
[0.00] ACPI: PM-Timer IO Port: 0xe408
[0.00] 

Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-09-28 Thread Ondrej Zary
On Wednesday 28 September 2016 16:11:39 Sinan Kaya wrote:
> On 9/28/2016 4:32 AM, Ondrej Zary wrote:
> >>> OK
> >>>
> >>> > > Sinan, can you help, please?
> >> >
> >> > Sure, let's see what's going on. I was writing an email.
> >> >
> >> > Can we apply this and collect the kernel log? It also helps to see the
> >> > kernel log from a working combination.
> >
> > This is from yet another machine with the same problem:
>
> Thanks, It sounds like you have more than one machine with similar
> problems. Can you collect the log from the other machines with 4.8-rc8?
>
> and also a boot log with 4.6 kernel where things are working?

The attached logs are from another machine:

dmesg-bad-debug.txt: 4.8-rc8 with your debug patch - bad

dmesg-reverted.txt: 4.8-rc8 with patches (as per Rafael's suggestion) 
reverted - good

dmesg-3.6.txt: 4.6 (Debian kernel) - good


-- 
Ondrej Zary
[0.00] Linux version 4.8.0-rc8+ (zary@gsql) (gcc version 4.7.2 (Debian 
4.7.2-5) ) #110 SMP Wed Sep 28 18:39:32 CEST 2016
[0.00] x86/fpu: Legacy x87 FPU detected.
[0.00] x86/fpu: Using 'eager' FPU context switches.
[0.00] e820: BIOS-provided physical RAM map:
[0.00] BIOS-e820: [mem 0x-0x0009fbff] usable
[0.00] BIOS-e820: [mem 0x0009fc00-0x0009] reserved
[0.00] BIOS-e820: [mem 0x000f-0x000f] reserved
[0.00] BIOS-e820: [mem 0x0010-0x1fffcfff] usable
[0.00] BIOS-e820: [mem 0x1fffd000-0x1fffefff] ACPI data
[0.00] BIOS-e820: [mem 0x1000-0x1fff] ACPI NVS
[0.00] BIOS-e820: [mem 0x-0x] reserved
[0.00] Notice: NX (Execute Disable) protection missing in CPU!
[0.00] Legacy DMI 2.0 present.
[0.00] DMI: System Manufacturer System Name/P2B, BIOS ASUS P2B ACPI 
BIOS Revision 1014 Beta 00308/01/02
[0.00] e820: update [mem 0x-0x0fff] usable ==> reserved
[0.00] e820: remove [mem 0x000a-0x000f] usable
[0.00] e820: last_pfn = 0x1fffd max_arch_pfn = 0x10
[0.00] MTRR default type: uncachable
[0.00] MTRR fixed ranges enabled:
[0.00]   0-9 write-back
[0.00]   A-A uncachable
[0.00]   B-B write-combining
[0.00]   C-C7FFF write-protect
[0.00]   C8000-F7FFF uncachable
[0.00]   F8000-FCFFF write-protect
[0.00]   FD000-F uncachable
[0.00] MTRR variable ranges enabled:
[0.00]   0 base 0 mask FE000 write-back
[0.00]   1 disabled
[0.00]   2 disabled
[0.00]   3 disabled
[0.00]   4 disabled
[0.00]   5 base 0D800 mask FF800 write-combining
[0.00]   6 disabled
[0.00]   7 disabled
[0.00] x86/PAT: PAT not supported by CPU.
[0.00] x86/PAT: Configuration [0-7]: WB  WT  UC- UC  WB  WT  UC- UC  
[0.00] initial memory mapped: [mem 0x-0x01bf]
[0.00] Base memory trampoline at [c009b000] 9b000 size 16384
[0.00] BRK [0x016b7000, 0x016b7fff] PGTABLE
[0.00] ACPI: Early table checksum verification disabled
[0.00] ACPI: RSDP 0x000F7F90 14 (v00 ASUS  )
[0.00] ACPI: RSDT 0x1FFFD000 2C (v01 ASUS   P2B  
42302E31 MSFT 31313031)
[0.00] ACPI: FACP 0x1FFFD080 74 (v01 ASUS   P2B  
42302E31 MSFT 31313031)
[0.00] ACPI: DSDT 0x1FFFD100 001BA8 (v01 ASUS   P2B  
1000 MSFT 0101)
[0.00] ACPI: FACS 0x1000 40
[0.00] ACPI: BOOT 0x1FFFD040 28 (v01 ASUS   P2B  
42302E31 MSFT 31313031)
[0.00] 0MB HIGHMEM available.
[0.00] 511MB LOWMEM available.
[0.00]   mapped low ram: 0 - 1fffd000
[0.00]   low ram: 0 - 1fffd000
[0.00] BRK [0x016b8000, 0x016b8fff] PGTABLE
[0.00] Zone ranges:
[0.00]   DMA  [mem 0x1000-0x00ff]
[0.00]   Normal   [mem 0x0100-0x1fffcfff]
[0.00]   HighMem  empty
[0.00] Movable zone start for each node
[0.00] Early memory node ranges
[0.00]   node   0: [mem 0x1000-0x0009efff]
[0.00]   node   0: [mem 0x0010-0x1fffcfff]
[0.00] Initmem setup node 0 [mem 0x1000-0x1fffcfff]
[0.00] On node 0 totalpages: 130971
[0.00] free_area_init_node: node 0, pgdat c15b1840, node_mem_map 
dfbfd020
[0.00]   DMA zone: 32 pages used for memmap
[0.00]   DMA zone: 0 pages reserved
[0.00]   DMA zone: 3998 pages, LIFO batch:0
[0.00]   Normal zone: 992 pages used for memmap
[0.00]   Normal zone: 126973 pages, LIFO batch:31
[0.00] Using APIC driver default
[0.00] ACPI: PM-Timer IO Port: 0xe408
[0.00] 

Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-09-28 Thread Sinan Kaya
On 9/28/2016 4:32 AM, Ondrej Zary wrote:
>>> OK
>>> > >
>>> > > Sinan, can you help, please?
>> >
>> > Sure, let's see what's going on. I was writing an email.
>> >
>> > Can we apply this and collect the kernel log? It also helps to see the
>> > kernel log from a working combination.
> This is from yet another machine with the same problem:

Thanks, It sounds like you have more than one machine with similar problems.
Can you collect the log from the other machines with 4.8-rc8? 

and also a boot log with 4.6 kernel where things are working?

-- 
Sinan Kaya
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm 
Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux 
Foundation Collaborative Project.


Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-09-28 Thread Sinan Kaya
On 9/28/2016 4:32 AM, Ondrej Zary wrote:
>>> OK
>>> > >
>>> > > Sinan, can you help, please?
>> >
>> > Sure, let's see what's going on. I was writing an email.
>> >
>> > Can we apply this and collect the kernel log? It also helps to see the
>> > kernel log from a working combination.
> This is from yet another machine with the same problem:

Thanks, It sounds like you have more than one machine with similar problems.
Can you collect the log from the other machines with 4.8-rc8? 

and also a boot log with 4.6 kernel where things are working?

-- 
Sinan Kaya
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm 
Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux 
Foundation Collaborative Project.


Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-09-28 Thread Ondrej Zary
On Wednesday 28 September 2016, Sinan Kaya wrote:
> On 9/27/2016 6:58 PM, Rafael J. Wysocki wrote:
> >> :04 04 9bf16c388d23bb66e087809f069eafed18e46a8c
> >> : bcac95fb33ee834aec7d23eab9eb0dc5e330c68c M  drivers
> >
> > OK
> >
> > Sinan, can you help, please?
>
> Sure, let's see what's going on. I was writing an email.
>
> Can we apply this and collect the kernel log? It also helps to see the
> kernel log from a working combination.

This is from yet another machine with the same problem:

[0.00] Linux version 4.8.0-rc8+ (zary@gsql) (gcc version 4.7.2 (Debian 
4.7.2-5) ) #100 SMP Wed Sep 28 10:19:26 CEST 2016
[0.00] x86/fpu: Legacy x87 FPU detected.
[0.00] x86/fpu: Using 'eager' FPU context switches.
[0.00] e820: BIOS-provided physical RAM map:
[0.00] BIOS-e820: [mem 0x-0x0009fbff] usable
[0.00] BIOS-e820: [mem 0x0009fc00-0x0009] reserved
[0.00] BIOS-e820: [mem 0x000f-0x000f] reserved
[0.00] BIOS-e820: [mem 0x0010-0x06ffbfff] usable
[0.00] BIOS-e820: [mem 0x06ffc000-0x06ffefff] ACPI data
[0.00] BIOS-e820: [mem 0x06fff000-0x06ff] ACPI NVS
[0.00] BIOS-e820: [mem 0x-0x] reserved
[0.00] Notice: NX (Execute Disable) protection missing in CPU!
[0.00] SMBIOS 2.3 present.
[0.00] DMI: System Manufacturer System Name/A7VL133, BIOS ASUS 
A7VL133-VM ACPI BIOS Revision 1008 06/10/2002
[0.00] e820: update [mem 0x-0x0fff] usable ==> reserved
[0.00] e820: remove [mem 0x000a-0x000f] usable
[0.00] e820: last_pfn = 0x6ffc max_arch_pfn = 0x10
[0.00] MTRR default type: uncachable
[0.00] MTRR fixed ranges enabled:
[0.00]   0-9 write-back
[0.00]   A-F uncachable
[0.00] MTRR variable ranges enabled:
[0.00]   0 base 0 mask FFC00 write-back
[0.00]   1 base 00400 mask FFE00 write-back
[0.00]   2 base 00600 mask FFF00 write-back
[0.00]   3 disabled
[0.00]   4 disabled
[0.00]   5 disabled
[0.00]   6 disabled
[0.00]   7 base 0F800 mask FFC00 write-combining
[0.00] x86/PAT: Configuration [0-7]: WB  WC  UC- UC  WB  WC  UC- WT  
[0.00] initial memory mapped: [mem 0x-0x01bf]
[0.00] Base memory trampoline at [c009b000] 9b000 size 16384
[0.00] BRK [0x016b7000, 0x016b7fff] PGTABLE
[0.00] ACPI: Early table checksum verification disabled
[0.00] ACPI: RSDP 0x000F6DA0 14 (v00 ASUS  )
[0.00] ACPI: RSDT 0x06FFC000 2C (v01 ASUS   A7VL133  
30303031 MSFT 31313031)
[0.00] ACPI: FACP 0x06FFC080 74 (v01 ASUS   A7VL133  
30303031 MSFT 31313031)
[0.00] ACPI: DSDT 0x06FFC100 0027F0 (v01 ASUS   A7VL133  
1000 MSFT 010B)
[0.00] ACPI: FACS 0x06FFF000 40
[0.00] ACPI: BOOT 0x06FFC040 28 (v01 ASUS   A7VL133  
30303031 MSFT 31313031)
[0.00] 0MB HIGHMEM available.
[0.00] 111MB LOWMEM available.
[0.00]   mapped low ram: 0 - 06ffc000
[0.00]   low ram: 0 - 06ffc000
[0.00] BRK [0x016b8000, 0x016b8fff] PGTABLE
[0.00] Zone ranges:
[0.00]   DMA  [mem 0x1000-0x00ff]
[0.00]   Normal   [mem 0x0100-0x06ffbfff]
[0.00]   HighMem  empty
[0.00] Movable zone start for each node
[0.00] Early memory node ranges
[0.00]   node   0: [mem 0x1000-0x0009efff]
[0.00]   node   0: [mem 0x0010-0x06ffbfff]
[0.00] Initmem setup node 0 [mem 0x1000-0x06ffbfff]
[0.00] On node 0 totalpages: 28570
[0.00] free_area_init_node: node 0, pgdat c15b1840, node_mem_map 
c6f1c020
[0.00]   DMA zone: 32 pages used for memmap
[0.00]   DMA zone: 0 pages reserved
[0.00]   DMA zone: 3998 pages, LIFO batch:0
[0.00]   Normal zone: 192 pages used for memmap
[0.00]   Normal zone: 24572 pages, LIFO batch:3
[0.00] Using APIC driver default
[0.00] ACPI: PM-Timer IO Port: 0xe408
[0.00] smpboot: Allowing 1 CPUs, 0 hotplug CPUs
[0.00] Local APIC disabled by BIOS -- you can enable it with "lapic"
[0.00] APIC: disable apic facility
[0.00] APIC: switched to apic NOOP
[0.00] PM: Registered nosave memory: [mem 0x-0x0fff]
[0.00] PM: Registered nosave memory: [mem 0x0009f000-0x0009]
[0.00] PM: Registered nosave memory: [mem 0x000a-0x000e]
[0.00] PM: Registered nosave memory: [mem 0x000f-0x000f]
[0.00] e820: [mem 0x0700-0xfffe] available for PCI devices
[0.00] clocksource: 

Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-09-28 Thread Ondrej Zary
On Wednesday 28 September 2016, Sinan Kaya wrote:
> On 9/27/2016 6:58 PM, Rafael J. Wysocki wrote:
> >> :04 04 9bf16c388d23bb66e087809f069eafed18e46a8c
> >> : bcac95fb33ee834aec7d23eab9eb0dc5e330c68c M  drivers
> >
> > OK
> >
> > Sinan, can you help, please?
>
> Sure, let's see what's going on. I was writing an email.
>
> Can we apply this and collect the kernel log? It also helps to see the
> kernel log from a working combination.

This is from yet another machine with the same problem:

[0.00] Linux version 4.8.0-rc8+ (zary@gsql) (gcc version 4.7.2 (Debian 
4.7.2-5) ) #100 SMP Wed Sep 28 10:19:26 CEST 2016
[0.00] x86/fpu: Legacy x87 FPU detected.
[0.00] x86/fpu: Using 'eager' FPU context switches.
[0.00] e820: BIOS-provided physical RAM map:
[0.00] BIOS-e820: [mem 0x-0x0009fbff] usable
[0.00] BIOS-e820: [mem 0x0009fc00-0x0009] reserved
[0.00] BIOS-e820: [mem 0x000f-0x000f] reserved
[0.00] BIOS-e820: [mem 0x0010-0x06ffbfff] usable
[0.00] BIOS-e820: [mem 0x06ffc000-0x06ffefff] ACPI data
[0.00] BIOS-e820: [mem 0x06fff000-0x06ff] ACPI NVS
[0.00] BIOS-e820: [mem 0x-0x] reserved
[0.00] Notice: NX (Execute Disable) protection missing in CPU!
[0.00] SMBIOS 2.3 present.
[0.00] DMI: System Manufacturer System Name/A7VL133, BIOS ASUS 
A7VL133-VM ACPI BIOS Revision 1008 06/10/2002
[0.00] e820: update [mem 0x-0x0fff] usable ==> reserved
[0.00] e820: remove [mem 0x000a-0x000f] usable
[0.00] e820: last_pfn = 0x6ffc max_arch_pfn = 0x10
[0.00] MTRR default type: uncachable
[0.00] MTRR fixed ranges enabled:
[0.00]   0-9 write-back
[0.00]   A-F uncachable
[0.00] MTRR variable ranges enabled:
[0.00]   0 base 0 mask FFC00 write-back
[0.00]   1 base 00400 mask FFE00 write-back
[0.00]   2 base 00600 mask FFF00 write-back
[0.00]   3 disabled
[0.00]   4 disabled
[0.00]   5 disabled
[0.00]   6 disabled
[0.00]   7 base 0F800 mask FFC00 write-combining
[0.00] x86/PAT: Configuration [0-7]: WB  WC  UC- UC  WB  WC  UC- WT  
[0.00] initial memory mapped: [mem 0x-0x01bf]
[0.00] Base memory trampoline at [c009b000] 9b000 size 16384
[0.00] BRK [0x016b7000, 0x016b7fff] PGTABLE
[0.00] ACPI: Early table checksum verification disabled
[0.00] ACPI: RSDP 0x000F6DA0 14 (v00 ASUS  )
[0.00] ACPI: RSDT 0x06FFC000 2C (v01 ASUS   A7VL133  
30303031 MSFT 31313031)
[0.00] ACPI: FACP 0x06FFC080 74 (v01 ASUS   A7VL133  
30303031 MSFT 31313031)
[0.00] ACPI: DSDT 0x06FFC100 0027F0 (v01 ASUS   A7VL133  
1000 MSFT 010B)
[0.00] ACPI: FACS 0x06FFF000 40
[0.00] ACPI: BOOT 0x06FFC040 28 (v01 ASUS   A7VL133  
30303031 MSFT 31313031)
[0.00] 0MB HIGHMEM available.
[0.00] 111MB LOWMEM available.
[0.00]   mapped low ram: 0 - 06ffc000
[0.00]   low ram: 0 - 06ffc000
[0.00] BRK [0x016b8000, 0x016b8fff] PGTABLE
[0.00] Zone ranges:
[0.00]   DMA  [mem 0x1000-0x00ff]
[0.00]   Normal   [mem 0x0100-0x06ffbfff]
[0.00]   HighMem  empty
[0.00] Movable zone start for each node
[0.00] Early memory node ranges
[0.00]   node   0: [mem 0x1000-0x0009efff]
[0.00]   node   0: [mem 0x0010-0x06ffbfff]
[0.00] Initmem setup node 0 [mem 0x1000-0x06ffbfff]
[0.00] On node 0 totalpages: 28570
[0.00] free_area_init_node: node 0, pgdat c15b1840, node_mem_map 
c6f1c020
[0.00]   DMA zone: 32 pages used for memmap
[0.00]   DMA zone: 0 pages reserved
[0.00]   DMA zone: 3998 pages, LIFO batch:0
[0.00]   Normal zone: 192 pages used for memmap
[0.00]   Normal zone: 24572 pages, LIFO batch:3
[0.00] Using APIC driver default
[0.00] ACPI: PM-Timer IO Port: 0xe408
[0.00] smpboot: Allowing 1 CPUs, 0 hotplug CPUs
[0.00] Local APIC disabled by BIOS -- you can enable it with "lapic"
[0.00] APIC: disable apic facility
[0.00] APIC: switched to apic NOOP
[0.00] PM: Registered nosave memory: [mem 0x-0x0fff]
[0.00] PM: Registered nosave memory: [mem 0x0009f000-0x0009]
[0.00] PM: Registered nosave memory: [mem 0x000a-0x000e]
[0.00] PM: Registered nosave memory: [mem 0x000f-0x000f]
[0.00] e820: [mem 0x0700-0xfffe] available for PCI devices
[0.00] clocksource: 

Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-09-27 Thread Sinan Kaya
On 9/27/2016 6:58 PM, Rafael J. Wysocki wrote:
>> :04 04 9bf16c388d23bb66e087809f069eafed18e46a8c 
>> bcac95fb33ee834aec7d23eab9eb0dc5e330c68c M  drivers
> OK
> 
> Sinan, can you help, please?
> 
> 

Sure, let's see what's going on. I was writing an email. 

Can we apply this and collect the kernel log? It also helps to see the kernel 
log from a working
combination.

-- 
Sinan Kaya
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm 
Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux 
Foundation Collaborative Project.
From 9181f4b9ab405bc6c9412133aefef7676899733c Mon Sep 17 00:00:00 2001
From: Sinan Kaya 
Date: Tue, 27 Sep 2016 18:35:15 -0400
Subject: [PATCH] acpi: pci_link: debug aids

Change-Id: I6c459cb5888d95f5f1ef7c0e2f138fb9c65f40e5
---
 drivers/acpi/pci_link.c | 13 -
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c
index c983bf7..44937f93 100644
--- a/drivers/acpi/pci_link.c
+++ b/drivers/acpi/pci_link.c
@@ -508,6 +508,8 @@ static int acpi_irq_get_penalty(int irq)
penalty += PIRQ_PENALTY_ISA_ALWAYS;
else
penalty += PIRQ_PENALTY_PCI_USING;
+
+   pr_info("%s:%d adding SCI penalty: %d\n", __func__, __LINE__, 
penalty);
}
 
if (irq < ACPI_MAX_ISA_IRQS)
@@ -604,6 +606,12 @@ static int acpi_pci_link_allocate(struct acpi_pci_link 
*link)
}
}
if (acpi_irq_get_penalty(irq) >= PIRQ_PENALTY_ISA_ALWAYS) {
+   for (i = (link->irq.possible_count - 1); i >= 0; i--) {
+   pr_info("penalty[%d] = 0x%x\n",
+   link->irq.possible[i],
+   acpi_irq_get_penalty(link->irq.possible[i]));
+   }
+
printk(KERN_ERR PREFIX "No IRQ available for %s [%s]. "
"Try pci=noacpi or acpi=off\n",
acpi_device_name(link->device),
@@ -870,9 +878,12 @@ static int __init acpi_irq_penalty_update(char *str, int 
used)
  */
 void acpi_penalize_isa_irq(int irq, int active)
 {
-   if ((irq >= 0) && (irq < ARRAY_SIZE(acpi_isa_irq_penalty)))
+   if ((irq >= 0) && (irq < ARRAY_SIZE(acpi_isa_irq_penalty))) {
acpi_isa_irq_penalty[irq] = acpi_irq_get_penalty(irq) +
  (active ? PIRQ_PENALTY_ISA_USED : PIRQ_PENALTY_PCI_USING);
+   pr_info("%s:%d acpi_isa_irq_penalty[%d]=0x%x active = %d\n", 
__func__,
+   __LINE__, irq,  acpi_irq_get_penalty(irq), 
active);
+   }
 }
 
 bool acpi_isa_irq_available(int irq)
-- 
1.9.1



Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-09-27 Thread Sinan Kaya
On 9/27/2016 6:58 PM, Rafael J. Wysocki wrote:
>> :04 04 9bf16c388d23bb66e087809f069eafed18e46a8c 
>> bcac95fb33ee834aec7d23eab9eb0dc5e330c68c M  drivers
> OK
> 
> Sinan, can you help, please?
> 
> 

Sure, let's see what's going on. I was writing an email. 

Can we apply this and collect the kernel log? It also helps to see the kernel 
log from a working
combination.

-- 
Sinan Kaya
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm 
Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux 
Foundation Collaborative Project.
From 9181f4b9ab405bc6c9412133aefef7676899733c Mon Sep 17 00:00:00 2001
From: Sinan Kaya 
Date: Tue, 27 Sep 2016 18:35:15 -0400
Subject: [PATCH] acpi: pci_link: debug aids

Change-Id: I6c459cb5888d95f5f1ef7c0e2f138fb9c65f40e5
---
 drivers/acpi/pci_link.c | 13 -
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c
index c983bf7..44937f93 100644
--- a/drivers/acpi/pci_link.c
+++ b/drivers/acpi/pci_link.c
@@ -508,6 +508,8 @@ static int acpi_irq_get_penalty(int irq)
penalty += PIRQ_PENALTY_ISA_ALWAYS;
else
penalty += PIRQ_PENALTY_PCI_USING;
+
+   pr_info("%s:%d adding SCI penalty: %d\n", __func__, __LINE__, 
penalty);
}
 
if (irq < ACPI_MAX_ISA_IRQS)
@@ -604,6 +606,12 @@ static int acpi_pci_link_allocate(struct acpi_pci_link 
*link)
}
}
if (acpi_irq_get_penalty(irq) >= PIRQ_PENALTY_ISA_ALWAYS) {
+   for (i = (link->irq.possible_count - 1); i >= 0; i--) {
+   pr_info("penalty[%d] = 0x%x\n",
+   link->irq.possible[i],
+   acpi_irq_get_penalty(link->irq.possible[i]));
+   }
+
printk(KERN_ERR PREFIX "No IRQ available for %s [%s]. "
"Try pci=noacpi or acpi=off\n",
acpi_device_name(link->device),
@@ -870,9 +878,12 @@ static int __init acpi_irq_penalty_update(char *str, int 
used)
  */
 void acpi_penalize_isa_irq(int irq, int active)
 {
-   if ((irq >= 0) && (irq < ARRAY_SIZE(acpi_isa_irq_penalty)))
+   if ((irq >= 0) && (irq < ARRAY_SIZE(acpi_isa_irq_penalty))) {
acpi_isa_irq_penalty[irq] = acpi_irq_get_penalty(irq) +
  (active ? PIRQ_PENALTY_ISA_USED : PIRQ_PENALTY_PCI_USING);
+   pr_info("%s:%d acpi_isa_irq_penalty[%d]=0x%x active = %d\n", 
__func__,
+   __LINE__, irq,  acpi_irq_get_penalty(irq), 
active);
+   }
 }
 
 bool acpi_isa_irq_available(int irq)
-- 
1.9.1



Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-09-27 Thread Rafael J. Wysocki
On Wednesday, September 28, 2016 12:23:31 AM Ondrej Zary wrote:
> On Tuesday 27 September 2016 23:32:26 Rafael J. Wysocki wrote:
> > On Tuesday, September 27, 2016 11:02:22 PM Ondrej Zary wrote:
> > > On Monday 26 September 2016 14:23:01 Rafael J. Wysocki wrote:
> > > > On Sunday, September 25, 2016 03:12:05 PM Ondrej Zary wrote:
> > > > > Hello,
> > > > > I've upgraded kernel (Debian Squeeze - backports) from 4.6
> > > > > (4.6.4-1~bpo8+1) to 4.7 (4.7.2-1~bpo8+1) and IRQs stopped working
> > > > > with error messages like this:
> > > > >
> > > > > ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi
> > > > > or acpi=off
> > > > >
> > > > > The same thing appeared on two different machines. Is it a
> > > > > known/fixed bug?
> > > >
> > > > Well, maybe.
> > > >
> > > > Can you try 4.8-rc8, please?
> > >
> > > Just tested 4.8-rc8 on another (3rd) machine with the same problem. The
> > > bug is still present in 4.8-rc8.
> >
> > The problem wasn't known then.
> >
> > > All machines are Pentium 3 PCI/ISA systems.
> >
> > This probably is related to the way the ISA IRQs are handled.
> >
> > Here's a list of commits to revert, in this order:
> >
> > f7eca374f000 ACPI,PCI,IRQ: separate ISA penalty calculation
> > 487cf917ed0d Revert "ACPI, PCI, IRQ: remove redundant code in
> > acpi_irq_penalty_init()" 4a6e68bf96c1 ACPI,PCI,IRQ: factor in PCI possible
> > 54794580f594 ACPI,PCI,IRQ: correct operator precedence
> > 9e5ed6d1fb87 ACPI,PCI,IRQ: remove SCI penalize function
> > 1fcb6a813c4f ACPI,PCI,IRQ: remove redundant code in acpi_irq_penalty_init()
> > 5c5087a55390 ACPI,PCI,IRQ: reduce static IRQ array size to 16
> > 103544d86976 ACPI,PCI,IRQ: reduce resource requirements
> >
> > Please try to revert the first 5 first and see if that helps.
> 
> Bisected it to this:
> 
> 103544d86976338057d6a91f721b49d3acc7df7f is the first bad commit
> commit 103544d86976338057d6a91f721b49d3acc7df7f
> Author: Sinan Kaya 
> Date:   Sun Apr 17 13:36:53 2016 -0400
> 
> ACPI,PCI,IRQ: reduce resource requirements
> 
> Code has been redesigned to calculate penalty requirements on the fly. 
> This
> significantly simplifies the implementation and removes some of the init
> calls from x86 architecture.
> 
> Signed-off-by: Sinan Kaya 
> Acked-by: Bjorn Helgaas 
> Signed-off-by: Rafael J. Wysocki 
> 
> :04 04 9bf16c388d23bb66e087809f069eafed18e46a8c 
> bcac95fb33ee834aec7d23eab9eb0dc5e330c68c M  drivers

OK

Sinan, can you help, please?


> > > [0.00] Linux version 4.8.0-rc8+ (zary@gsql) (gcc version 4.7.2
> > > (Debian 4.7.2-5) ) #84 SMP Tue Sep 27 22:37:05 CEST 2016 [0.00]
> > > x86/fpu: Legacy x87 FPU detected.
> > > [0.00] x86/fpu: Using 'eager' FPU context switches.
> > > [0.00] e820: BIOS-provided physical RAM map:
> > > [0.00] BIOS-e820: [mem 0x-0x0009fbff]
> > > usable [0.00] BIOS-e820: [mem
> > > 0x0009fc00-0x0009] reserved [0.00] BIOS-e820:
> > > [mem 0x000f-0x000f] reserved [0.00]
> > > BIOS-e820: [mem 0x0010-0x1ffe] usable [   
> > > 0.00] BIOS-e820: [mem 0x1fff-0x1fff2fff] ACPI NVS
> > > [0.00] BIOS-e820: [mem 0x1fff3000-0x1fff]
> > > ACPI data [0.00] BIOS-e820: [mem
> > > 0x-0x] reserved [0.00] Notice: NX
> > > (Execute Disable) protection missing in CPU! [0.00] SMBIOS 2.2
> > > present.
> > > [0.00] DMI: VIA Technologies, Inc. VT82C694X/694X, BIOS 6.00 PG
> > > 02/19/2002 [0.00] e820: update [mem 0x-0x0fff] usable
> > > ==> reserved [0.00] e820: remove [mem 0x000a-0x000f]
> > > usable
> > > [0.00] e820: last_pfn = 0x1fff0 max_arch_pfn = 0x10
> > > [0.00] MTRR default type: uncachable
> > > [0.00] MTRR fixed ranges enabled:
> > > [0.00]   0-9 write-back
> > > [0.00]   A-A uncachable
> > > [0.00]   B-B write-combining
> > > [0.00]   C-C9FFF write-protect
> > > [0.00]   CA000-E uncachable
> > > [0.00]   F-F7FFF write-through
> > > [0.00]   F8000-F8FFF uncachable
> > > [0.00]   F9000-F write-through
> > > [0.00] MTRR variable ranges enabled:
> > > [0.00]   0 base 0 mask FE000 write-back
> > > [0.00]   1 base 0E000 mask FFC00 write-combining
> > > [0.00]   2 disabled
> > > [0.00]   3 disabled
> > > [0.00]   4 disabled
> > > [0.00]   5 disabled
> > > [0.00]   6 disabled
> > > [0.00]   7 disabled
> > > [0.00] x86/PAT: PAT not supported by CPU.
> > > [0.00] x86/PAT: Configuration [0-7]: WB  WT  UC- UC  WB  WT  UC-
> > > UC [0.00] initial 

Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-09-27 Thread Rafael J. Wysocki
On Wednesday, September 28, 2016 12:23:31 AM Ondrej Zary wrote:
> On Tuesday 27 September 2016 23:32:26 Rafael J. Wysocki wrote:
> > On Tuesday, September 27, 2016 11:02:22 PM Ondrej Zary wrote:
> > > On Monday 26 September 2016 14:23:01 Rafael J. Wysocki wrote:
> > > > On Sunday, September 25, 2016 03:12:05 PM Ondrej Zary wrote:
> > > > > Hello,
> > > > > I've upgraded kernel (Debian Squeeze - backports) from 4.6
> > > > > (4.6.4-1~bpo8+1) to 4.7 (4.7.2-1~bpo8+1) and IRQs stopped working
> > > > > with error messages like this:
> > > > >
> > > > > ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi
> > > > > or acpi=off
> > > > >
> > > > > The same thing appeared on two different machines. Is it a
> > > > > known/fixed bug?
> > > >
> > > > Well, maybe.
> > > >
> > > > Can you try 4.8-rc8, please?
> > >
> > > Just tested 4.8-rc8 on another (3rd) machine with the same problem. The
> > > bug is still present in 4.8-rc8.
> >
> > The problem wasn't known then.
> >
> > > All machines are Pentium 3 PCI/ISA systems.
> >
> > This probably is related to the way the ISA IRQs are handled.
> >
> > Here's a list of commits to revert, in this order:
> >
> > f7eca374f000 ACPI,PCI,IRQ: separate ISA penalty calculation
> > 487cf917ed0d Revert "ACPI, PCI, IRQ: remove redundant code in
> > acpi_irq_penalty_init()" 4a6e68bf96c1 ACPI,PCI,IRQ: factor in PCI possible
> > 54794580f594 ACPI,PCI,IRQ: correct operator precedence
> > 9e5ed6d1fb87 ACPI,PCI,IRQ: remove SCI penalize function
> > 1fcb6a813c4f ACPI,PCI,IRQ: remove redundant code in acpi_irq_penalty_init()
> > 5c5087a55390 ACPI,PCI,IRQ: reduce static IRQ array size to 16
> > 103544d86976 ACPI,PCI,IRQ: reduce resource requirements
> >
> > Please try to revert the first 5 first and see if that helps.
> 
> Bisected it to this:
> 
> 103544d86976338057d6a91f721b49d3acc7df7f is the first bad commit
> commit 103544d86976338057d6a91f721b49d3acc7df7f
> Author: Sinan Kaya 
> Date:   Sun Apr 17 13:36:53 2016 -0400
> 
> ACPI,PCI,IRQ: reduce resource requirements
> 
> Code has been redesigned to calculate penalty requirements on the fly. 
> This
> significantly simplifies the implementation and removes some of the init
> calls from x86 architecture.
> 
> Signed-off-by: Sinan Kaya 
> Acked-by: Bjorn Helgaas 
> Signed-off-by: Rafael J. Wysocki 
> 
> :04 04 9bf16c388d23bb66e087809f069eafed18e46a8c 
> bcac95fb33ee834aec7d23eab9eb0dc5e330c68c M  drivers

OK

Sinan, can you help, please?


> > > [0.00] Linux version 4.8.0-rc8+ (zary@gsql) (gcc version 4.7.2
> > > (Debian 4.7.2-5) ) #84 SMP Tue Sep 27 22:37:05 CEST 2016 [0.00]
> > > x86/fpu: Legacy x87 FPU detected.
> > > [0.00] x86/fpu: Using 'eager' FPU context switches.
> > > [0.00] e820: BIOS-provided physical RAM map:
> > > [0.00] BIOS-e820: [mem 0x-0x0009fbff]
> > > usable [0.00] BIOS-e820: [mem
> > > 0x0009fc00-0x0009] reserved [0.00] BIOS-e820:
> > > [mem 0x000f-0x000f] reserved [0.00]
> > > BIOS-e820: [mem 0x0010-0x1ffe] usable [   
> > > 0.00] BIOS-e820: [mem 0x1fff-0x1fff2fff] ACPI NVS
> > > [0.00] BIOS-e820: [mem 0x1fff3000-0x1fff]
> > > ACPI data [0.00] BIOS-e820: [mem
> > > 0x-0x] reserved [0.00] Notice: NX
> > > (Execute Disable) protection missing in CPU! [0.00] SMBIOS 2.2
> > > present.
> > > [0.00] DMI: VIA Technologies, Inc. VT82C694X/694X, BIOS 6.00 PG
> > > 02/19/2002 [0.00] e820: update [mem 0x-0x0fff] usable
> > > ==> reserved [0.00] e820: remove [mem 0x000a-0x000f]
> > > usable
> > > [0.00] e820: last_pfn = 0x1fff0 max_arch_pfn = 0x10
> > > [0.00] MTRR default type: uncachable
> > > [0.00] MTRR fixed ranges enabled:
> > > [0.00]   0-9 write-back
> > > [0.00]   A-A uncachable
> > > [0.00]   B-B write-combining
> > > [0.00]   C-C9FFF write-protect
> > > [0.00]   CA000-E uncachable
> > > [0.00]   F-F7FFF write-through
> > > [0.00]   F8000-F8FFF uncachable
> > > [0.00]   F9000-F write-through
> > > [0.00] MTRR variable ranges enabled:
> > > [0.00]   0 base 0 mask FE000 write-back
> > > [0.00]   1 base 0E000 mask FFC00 write-combining
> > > [0.00]   2 disabled
> > > [0.00]   3 disabled
> > > [0.00]   4 disabled
> > > [0.00]   5 disabled
> > > [0.00]   6 disabled
> > > [0.00]   7 disabled
> > > [0.00] x86/PAT: PAT not supported by CPU.
> > > [0.00] x86/PAT: Configuration [0-7]: WB  WT  UC- UC  WB  WT  UC-
> > > UC [0.00] initial memory mapped: [mem 0x-0x01bf] [   
> > > 0.00] Base memory trampoline at 

Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-09-27 Thread Ondrej Zary
On Tuesday 27 September 2016 23:32:26 Rafael J. Wysocki wrote:
> On Tuesday, September 27, 2016 11:02:22 PM Ondrej Zary wrote:
> > On Monday 26 September 2016 14:23:01 Rafael J. Wysocki wrote:
> > > On Sunday, September 25, 2016 03:12:05 PM Ondrej Zary wrote:
> > > > Hello,
> > > > I've upgraded kernel (Debian Squeeze - backports) from 4.6
> > > > (4.6.4-1~bpo8+1) to 4.7 (4.7.2-1~bpo8+1) and IRQs stopped working
> > > > with error messages like this:
> > > >
> > > > ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi
> > > > or acpi=off
> > > >
> > > > The same thing appeared on two different machines. Is it a
> > > > known/fixed bug?
> > >
> > > Well, maybe.
> > >
> > > Can you try 4.8-rc8, please?
> >
> > Just tested 4.8-rc8 on another (3rd) machine with the same problem. The
> > bug is still present in 4.8-rc8.
>
> The problem wasn't known then.
>
> > All machines are Pentium 3 PCI/ISA systems.
>
> This probably is related to the way the ISA IRQs are handled.
>
> Here's a list of commits to revert, in this order:
>
> f7eca374f000 ACPI,PCI,IRQ: separate ISA penalty calculation
> 487cf917ed0d Revert "ACPI, PCI, IRQ: remove redundant code in
> acpi_irq_penalty_init()" 4a6e68bf96c1 ACPI,PCI,IRQ: factor in PCI possible
> 54794580f594 ACPI,PCI,IRQ: correct operator precedence
> 9e5ed6d1fb87 ACPI,PCI,IRQ: remove SCI penalize function
> 1fcb6a813c4f ACPI,PCI,IRQ: remove redundant code in acpi_irq_penalty_init()
> 5c5087a55390 ACPI,PCI,IRQ: reduce static IRQ array size to 16
> 103544d86976 ACPI,PCI,IRQ: reduce resource requirements
>
> Please try to revert the first 5 first and see if that helps.

Bisected it to this:

103544d86976338057d6a91f721b49d3acc7df7f is the first bad commit
commit 103544d86976338057d6a91f721b49d3acc7df7f
Author: Sinan Kaya 
Date:   Sun Apr 17 13:36:53 2016 -0400

ACPI,PCI,IRQ: reduce resource requirements

Code has been redesigned to calculate penalty requirements on the fly. This
significantly simplifies the implementation and removes some of the init
calls from x86 architecture.

Signed-off-by: Sinan Kaya 
Acked-by: Bjorn Helgaas 
Signed-off-by: Rafael J. Wysocki 

:04 04 9bf16c388d23bb66e087809f069eafed18e46a8c 
bcac95fb33ee834aec7d23eab9eb0dc5e330c68c M  drivers




> > [0.00] Linux version 4.8.0-rc8+ (zary@gsql) (gcc version 4.7.2
> > (Debian 4.7.2-5) ) #84 SMP Tue Sep 27 22:37:05 CEST 2016 [0.00]
> > x86/fpu: Legacy x87 FPU detected.
> > [0.00] x86/fpu: Using 'eager' FPU context switches.
> > [0.00] e820: BIOS-provided physical RAM map:
> > [0.00] BIOS-e820: [mem 0x-0x0009fbff]
> > usable [0.00] BIOS-e820: [mem
> > 0x0009fc00-0x0009] reserved [0.00] BIOS-e820:
> > [mem 0x000f-0x000f] reserved [0.00]
> > BIOS-e820: [mem 0x0010-0x1ffe] usable [   
> > 0.00] BIOS-e820: [mem 0x1fff-0x1fff2fff] ACPI NVS
> > [0.00] BIOS-e820: [mem 0x1fff3000-0x1fff]
> > ACPI data [0.00] BIOS-e820: [mem
> > 0x-0x] reserved [0.00] Notice: NX
> > (Execute Disable) protection missing in CPU! [0.00] SMBIOS 2.2
> > present.
> > [0.00] DMI: VIA Technologies, Inc. VT82C694X/694X, BIOS 6.00 PG
> > 02/19/2002 [0.00] e820: update [mem 0x-0x0fff] usable
> > ==> reserved [0.00] e820: remove [mem 0x000a-0x000f]
> > usable
> > [0.00] e820: last_pfn = 0x1fff0 max_arch_pfn = 0x10
> > [0.00] MTRR default type: uncachable
> > [0.00] MTRR fixed ranges enabled:
> > [0.00]   0-9 write-back
> > [0.00]   A-A uncachable
> > [0.00]   B-B write-combining
> > [0.00]   C-C9FFF write-protect
> > [0.00]   CA000-E uncachable
> > [0.00]   F-F7FFF write-through
> > [0.00]   F8000-F8FFF uncachable
> > [0.00]   F9000-F write-through
> > [0.00] MTRR variable ranges enabled:
> > [0.00]   0 base 0 mask FE000 write-back
> > [0.00]   1 base 0E000 mask FFC00 write-combining
> > [0.00]   2 disabled
> > [0.00]   3 disabled
> > [0.00]   4 disabled
> > [0.00]   5 disabled
> > [0.00]   6 disabled
> > [0.00]   7 disabled
> > [0.00] x86/PAT: PAT not supported by CPU.
> > [0.00] x86/PAT: Configuration [0-7]: WB  WT  UC- UC  WB  WT  UC-
> > UC [0.00] initial memory mapped: [mem 0x-0x01bf] [   
> > 0.00] Base memory trampoline at [c009b000] 9b000 size 16384 [   
> > 0.00] BRK [0x016b1000, 0x016b1fff] PGTABLE
> > [0.00] ACPI: Early table checksum verification disabled
> > [0.00] ACPI: RSDP 0x000F6C00 14 (v00 

Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-09-27 Thread Ondrej Zary
On Tuesday 27 September 2016 23:32:26 Rafael J. Wysocki wrote:
> On Tuesday, September 27, 2016 11:02:22 PM Ondrej Zary wrote:
> > On Monday 26 September 2016 14:23:01 Rafael J. Wysocki wrote:
> > > On Sunday, September 25, 2016 03:12:05 PM Ondrej Zary wrote:
> > > > Hello,
> > > > I've upgraded kernel (Debian Squeeze - backports) from 4.6
> > > > (4.6.4-1~bpo8+1) to 4.7 (4.7.2-1~bpo8+1) and IRQs stopped working
> > > > with error messages like this:
> > > >
> > > > ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi
> > > > or acpi=off
> > > >
> > > > The same thing appeared on two different machines. Is it a
> > > > known/fixed bug?
> > >
> > > Well, maybe.
> > >
> > > Can you try 4.8-rc8, please?
> >
> > Just tested 4.8-rc8 on another (3rd) machine with the same problem. The
> > bug is still present in 4.8-rc8.
>
> The problem wasn't known then.
>
> > All machines are Pentium 3 PCI/ISA systems.
>
> This probably is related to the way the ISA IRQs are handled.
>
> Here's a list of commits to revert, in this order:
>
> f7eca374f000 ACPI,PCI,IRQ: separate ISA penalty calculation
> 487cf917ed0d Revert "ACPI, PCI, IRQ: remove redundant code in
> acpi_irq_penalty_init()" 4a6e68bf96c1 ACPI,PCI,IRQ: factor in PCI possible
> 54794580f594 ACPI,PCI,IRQ: correct operator precedence
> 9e5ed6d1fb87 ACPI,PCI,IRQ: remove SCI penalize function
> 1fcb6a813c4f ACPI,PCI,IRQ: remove redundant code in acpi_irq_penalty_init()
> 5c5087a55390 ACPI,PCI,IRQ: reduce static IRQ array size to 16
> 103544d86976 ACPI,PCI,IRQ: reduce resource requirements
>
> Please try to revert the first 5 first and see if that helps.

Bisected it to this:

103544d86976338057d6a91f721b49d3acc7df7f is the first bad commit
commit 103544d86976338057d6a91f721b49d3acc7df7f
Author: Sinan Kaya 
Date:   Sun Apr 17 13:36:53 2016 -0400

ACPI,PCI,IRQ: reduce resource requirements

Code has been redesigned to calculate penalty requirements on the fly. This
significantly simplifies the implementation and removes some of the init
calls from x86 architecture.

Signed-off-by: Sinan Kaya 
Acked-by: Bjorn Helgaas 
Signed-off-by: Rafael J. Wysocki 

:04 04 9bf16c388d23bb66e087809f069eafed18e46a8c 
bcac95fb33ee834aec7d23eab9eb0dc5e330c68c M  drivers




> > [0.00] Linux version 4.8.0-rc8+ (zary@gsql) (gcc version 4.7.2
> > (Debian 4.7.2-5) ) #84 SMP Tue Sep 27 22:37:05 CEST 2016 [0.00]
> > x86/fpu: Legacy x87 FPU detected.
> > [0.00] x86/fpu: Using 'eager' FPU context switches.
> > [0.00] e820: BIOS-provided physical RAM map:
> > [0.00] BIOS-e820: [mem 0x-0x0009fbff]
> > usable [0.00] BIOS-e820: [mem
> > 0x0009fc00-0x0009] reserved [0.00] BIOS-e820:
> > [mem 0x000f-0x000f] reserved [0.00]
> > BIOS-e820: [mem 0x0010-0x1ffe] usable [   
> > 0.00] BIOS-e820: [mem 0x1fff-0x1fff2fff] ACPI NVS
> > [0.00] BIOS-e820: [mem 0x1fff3000-0x1fff]
> > ACPI data [0.00] BIOS-e820: [mem
> > 0x-0x] reserved [0.00] Notice: NX
> > (Execute Disable) protection missing in CPU! [0.00] SMBIOS 2.2
> > present.
> > [0.00] DMI: VIA Technologies, Inc. VT82C694X/694X, BIOS 6.00 PG
> > 02/19/2002 [0.00] e820: update [mem 0x-0x0fff] usable
> > ==> reserved [0.00] e820: remove [mem 0x000a-0x000f]
> > usable
> > [0.00] e820: last_pfn = 0x1fff0 max_arch_pfn = 0x10
> > [0.00] MTRR default type: uncachable
> > [0.00] MTRR fixed ranges enabled:
> > [0.00]   0-9 write-back
> > [0.00]   A-A uncachable
> > [0.00]   B-B write-combining
> > [0.00]   C-C9FFF write-protect
> > [0.00]   CA000-E uncachable
> > [0.00]   F-F7FFF write-through
> > [0.00]   F8000-F8FFF uncachable
> > [0.00]   F9000-F write-through
> > [0.00] MTRR variable ranges enabled:
> > [0.00]   0 base 0 mask FE000 write-back
> > [0.00]   1 base 0E000 mask FFC00 write-combining
> > [0.00]   2 disabled
> > [0.00]   3 disabled
> > [0.00]   4 disabled
> > [0.00]   5 disabled
> > [0.00]   6 disabled
> > [0.00]   7 disabled
> > [0.00] x86/PAT: PAT not supported by CPU.
> > [0.00] x86/PAT: Configuration [0-7]: WB  WT  UC- UC  WB  WT  UC-
> > UC [0.00] initial memory mapped: [mem 0x-0x01bf] [   
> > 0.00] Base memory trampoline at [c009b000] 9b000 size 16384 [   
> > 0.00] BRK [0x016b1000, 0x016b1fff] PGTABLE
> > [0.00] ACPI: Early table checksum verification disabled
> > [0.00] ACPI: RSDP 0x000F6C00 14 (v00 VIA694)
> > [0.00] ACPI: RSDT 0x1FFF3000 28 (v01 VIA694 AWRDACPI
> > 42302E31 

Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-09-27 Thread Rafael J. Wysocki
On Tuesday, September 27, 2016 11:02:22 PM Ondrej Zary wrote:
> On Monday 26 September 2016 14:23:01 Rafael J. Wysocki wrote:
> > On Sunday, September 25, 2016 03:12:05 PM Ondrej Zary wrote:
> > > Hello,
> > > I've upgraded kernel (Debian Squeeze - backports) from 4.6
> > > (4.6.4-1~bpo8+1) to 4.7 (4.7.2-1~bpo8+1) and IRQs stopped working with
> > > error messages like this:
> > >
> > > ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or
> > > acpi=off
> > >
> > > The same thing appeared on two different machines. Is it a known/fixed
> > > bug?
> >
> > Well, maybe.
> >
> > Can you try 4.8-rc8, please?
> 
> Just tested 4.8-rc8 on another (3rd) machine with the same problem. The bug
> is still present in 4.8-rc8.

The problem wasn't known then.

> All machines are Pentium 3 PCI/ISA systems.

This probably is related to the way the ISA IRQs are handled.

Here's a list of commits to revert, in this order:

f7eca374f000 ACPI,PCI,IRQ: separate ISA penalty calculation
487cf917ed0d Revert "ACPI, PCI, IRQ: remove redundant code in 
acpi_irq_penalty_init()"
4a6e68bf96c1 ACPI,PCI,IRQ: factor in PCI possible
54794580f594 ACPI,PCI,IRQ: correct operator precedence
9e5ed6d1fb87 ACPI,PCI,IRQ: remove SCI penalize function
1fcb6a813c4f ACPI,PCI,IRQ: remove redundant code in acpi_irq_penalty_init()
5c5087a55390 ACPI,PCI,IRQ: reduce static IRQ array size to 16
103544d86976 ACPI,PCI,IRQ: reduce resource requirements

Please try to revert the first 5 first and see if that helps.

> [0.00] Linux version 4.8.0-rc8+ (zary@gsql) (gcc version 4.7.2 
> (Debian 4.7.2-5) ) #84 SMP Tue Sep 27 22:37:05 CEST 2016
> [0.00] x86/fpu: Legacy x87 FPU detected.
> [0.00] x86/fpu: Using 'eager' FPU context switches.
> [0.00] e820: BIOS-provided physical RAM map:
> [0.00] BIOS-e820: [mem 0x-0x0009fbff] usable
> [0.00] BIOS-e820: [mem 0x0009fc00-0x0009] reserved
> [0.00] BIOS-e820: [mem 0x000f-0x000f] reserved
> [0.00] BIOS-e820: [mem 0x0010-0x1ffe] usable
> [0.00] BIOS-e820: [mem 0x1fff-0x1fff2fff] ACPI NVS
> [0.00] BIOS-e820: [mem 0x1fff3000-0x1fff] ACPI 
> data
> [0.00] BIOS-e820: [mem 0x-0x] reserved
> [0.00] Notice: NX (Execute Disable) protection missing in CPU!
> [0.00] SMBIOS 2.2 present.
> [0.00] DMI: VIA Technologies, Inc. VT82C694X/694X, BIOS 6.00 PG 
> 02/19/2002
> [0.00] e820: update [mem 0x-0x0fff] usable ==> reserved
> [0.00] e820: remove [mem 0x000a-0x000f] usable
> [0.00] e820: last_pfn = 0x1fff0 max_arch_pfn = 0x10
> [0.00] MTRR default type: uncachable
> [0.00] MTRR fixed ranges enabled:
> [0.00]   0-9 write-back
> [0.00]   A-A uncachable
> [0.00]   B-B write-combining
> [0.00]   C-C9FFF write-protect
> [0.00]   CA000-E uncachable
> [0.00]   F-F7FFF write-through
> [0.00]   F8000-F8FFF uncachable
> [0.00]   F9000-F write-through
> [0.00] MTRR variable ranges enabled:
> [0.00]   0 base 0 mask FE000 write-back
> [0.00]   1 base 0E000 mask FFC00 write-combining
> [0.00]   2 disabled
> [0.00]   3 disabled
> [0.00]   4 disabled
> [0.00]   5 disabled
> [0.00]   6 disabled
> [0.00]   7 disabled
> [0.00] x86/PAT: PAT not supported by CPU.
> [0.00] x86/PAT: Configuration [0-7]: WB  WT  UC- UC  WB  WT  UC- UC  
> [0.00] initial memory mapped: [mem 0x-0x01bf]
> [0.00] Base memory trampoline at [c009b000] 9b000 size 16384
> [0.00] BRK [0x016b1000, 0x016b1fff] PGTABLE
> [0.00] ACPI: Early table checksum verification disabled
> [0.00] ACPI: RSDP 0x000F6C00 14 (v00 VIA694)
> [0.00] ACPI: RSDT 0x1FFF3000 28 (v01 VIA694 AWRDACPI 
> 42302E31 AWRD )
> [0.00] ACPI: FACP 0x1FFF3040 74 (v01 VIA694 AWRDACPI 
> 42302E31 AWRD )
> [0.00] ACPI: DSDT 0x1FFF30C0 002587 (v01 VIA694 AWRDACPI 
> 1000 MSFT 010C)
> [0.00] ACPI: FACS 0x1FFF 40
> [0.00] 0MB HIGHMEM available.
> [0.00] 511MB LOWMEM available.
> [0.00]   mapped low ram: 0 - 1fff
> [0.00]   low ram: 0 - 1fff
> [0.00] BRK [0x016b2000, 0x016b2fff] PGTABLE
> [0.00] Zone ranges:
> [0.00]   DMA  [mem 0x1000-0x00ff]
> [0.00]   Normal   [mem 0x0100-0x1ffe]
> [0.00]   HighMem  empty
> [0.00] Movable zone start for each node
> [0.00] Early memory node ranges
> [0.00]   node   0: [mem 0x1000-0x0009efff]
> [

Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-09-27 Thread Rafael J. Wysocki
On Tuesday, September 27, 2016 11:02:22 PM Ondrej Zary wrote:
> On Monday 26 September 2016 14:23:01 Rafael J. Wysocki wrote:
> > On Sunday, September 25, 2016 03:12:05 PM Ondrej Zary wrote:
> > > Hello,
> > > I've upgraded kernel (Debian Squeeze - backports) from 4.6
> > > (4.6.4-1~bpo8+1) to 4.7 (4.7.2-1~bpo8+1) and IRQs stopped working with
> > > error messages like this:
> > >
> > > ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or
> > > acpi=off
> > >
> > > The same thing appeared on two different machines. Is it a known/fixed
> > > bug?
> >
> > Well, maybe.
> >
> > Can you try 4.8-rc8, please?
> 
> Just tested 4.8-rc8 on another (3rd) machine with the same problem. The bug
> is still present in 4.8-rc8.

The problem wasn't known then.

> All machines are Pentium 3 PCI/ISA systems.

This probably is related to the way the ISA IRQs are handled.

Here's a list of commits to revert, in this order:

f7eca374f000 ACPI,PCI,IRQ: separate ISA penalty calculation
487cf917ed0d Revert "ACPI, PCI, IRQ: remove redundant code in 
acpi_irq_penalty_init()"
4a6e68bf96c1 ACPI,PCI,IRQ: factor in PCI possible
54794580f594 ACPI,PCI,IRQ: correct operator precedence
9e5ed6d1fb87 ACPI,PCI,IRQ: remove SCI penalize function
1fcb6a813c4f ACPI,PCI,IRQ: remove redundant code in acpi_irq_penalty_init()
5c5087a55390 ACPI,PCI,IRQ: reduce static IRQ array size to 16
103544d86976 ACPI,PCI,IRQ: reduce resource requirements

Please try to revert the first 5 first and see if that helps.

> [0.00] Linux version 4.8.0-rc8+ (zary@gsql) (gcc version 4.7.2 
> (Debian 4.7.2-5) ) #84 SMP Tue Sep 27 22:37:05 CEST 2016
> [0.00] x86/fpu: Legacy x87 FPU detected.
> [0.00] x86/fpu: Using 'eager' FPU context switches.
> [0.00] e820: BIOS-provided physical RAM map:
> [0.00] BIOS-e820: [mem 0x-0x0009fbff] usable
> [0.00] BIOS-e820: [mem 0x0009fc00-0x0009] reserved
> [0.00] BIOS-e820: [mem 0x000f-0x000f] reserved
> [0.00] BIOS-e820: [mem 0x0010-0x1ffe] usable
> [0.00] BIOS-e820: [mem 0x1fff-0x1fff2fff] ACPI NVS
> [0.00] BIOS-e820: [mem 0x1fff3000-0x1fff] ACPI 
> data
> [0.00] BIOS-e820: [mem 0x-0x] reserved
> [0.00] Notice: NX (Execute Disable) protection missing in CPU!
> [0.00] SMBIOS 2.2 present.
> [0.00] DMI: VIA Technologies, Inc. VT82C694X/694X, BIOS 6.00 PG 
> 02/19/2002
> [0.00] e820: update [mem 0x-0x0fff] usable ==> reserved
> [0.00] e820: remove [mem 0x000a-0x000f] usable
> [0.00] e820: last_pfn = 0x1fff0 max_arch_pfn = 0x10
> [0.00] MTRR default type: uncachable
> [0.00] MTRR fixed ranges enabled:
> [0.00]   0-9 write-back
> [0.00]   A-A uncachable
> [0.00]   B-B write-combining
> [0.00]   C-C9FFF write-protect
> [0.00]   CA000-E uncachable
> [0.00]   F-F7FFF write-through
> [0.00]   F8000-F8FFF uncachable
> [0.00]   F9000-F write-through
> [0.00] MTRR variable ranges enabled:
> [0.00]   0 base 0 mask FE000 write-back
> [0.00]   1 base 0E000 mask FFC00 write-combining
> [0.00]   2 disabled
> [0.00]   3 disabled
> [0.00]   4 disabled
> [0.00]   5 disabled
> [0.00]   6 disabled
> [0.00]   7 disabled
> [0.00] x86/PAT: PAT not supported by CPU.
> [0.00] x86/PAT: Configuration [0-7]: WB  WT  UC- UC  WB  WT  UC- UC  
> [0.00] initial memory mapped: [mem 0x-0x01bf]
> [0.00] Base memory trampoline at [c009b000] 9b000 size 16384
> [0.00] BRK [0x016b1000, 0x016b1fff] PGTABLE
> [0.00] ACPI: Early table checksum verification disabled
> [0.00] ACPI: RSDP 0x000F6C00 14 (v00 VIA694)
> [0.00] ACPI: RSDT 0x1FFF3000 28 (v01 VIA694 AWRDACPI 
> 42302E31 AWRD )
> [0.00] ACPI: FACP 0x1FFF3040 74 (v01 VIA694 AWRDACPI 
> 42302E31 AWRD )
> [0.00] ACPI: DSDT 0x1FFF30C0 002587 (v01 VIA694 AWRDACPI 
> 1000 MSFT 010C)
> [0.00] ACPI: FACS 0x1FFF 40
> [0.00] 0MB HIGHMEM available.
> [0.00] 511MB LOWMEM available.
> [0.00]   mapped low ram: 0 - 1fff
> [0.00]   low ram: 0 - 1fff
> [0.00] BRK [0x016b2000, 0x016b2fff] PGTABLE
> [0.00] Zone ranges:
> [0.00]   DMA  [mem 0x1000-0x00ff]
> [0.00]   Normal   [mem 0x0100-0x1ffe]
> [0.00]   HighMem  empty
> [0.00] Movable zone start for each node
> [0.00] Early memory node ranges
> [0.00]   node   0: [mem 0x1000-0x0009efff]
> [

Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-09-27 Thread Ondrej Zary
On Monday 26 September 2016 14:23:01 Rafael J. Wysocki wrote:
> On Sunday, September 25, 2016 03:12:05 PM Ondrej Zary wrote:
> > Hello,
> > I've upgraded kernel (Debian Squeeze - backports) from 4.6
> > (4.6.4-1~bpo8+1) to 4.7 (4.7.2-1~bpo8+1) and IRQs stopped working with
> > error messages like this:
> >
> > ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or
> > acpi=off
> >
> > The same thing appeared on two different machines. Is it a known/fixed
> > bug?
>
> Well, maybe.
>
> Can you try 4.8-rc8, please?

Just tested 4.8-rc8 on another (3rd) machine with the same problem. The bug
is still present in 4.8-rc8.
All machines are Pentium 3 PCI/ISA systems.


[0.00] Linux version 4.8.0-rc8+ (zary@gsql) (gcc version 4.7.2 (Debian 
4.7.2-5) ) #84 SMP Tue Sep 27 22:37:05 CEST 2016
[0.00] x86/fpu: Legacy x87 FPU detected.
[0.00] x86/fpu: Using 'eager' FPU context switches.
[0.00] e820: BIOS-provided physical RAM map:
[0.00] BIOS-e820: [mem 0x-0x0009fbff] usable
[0.00] BIOS-e820: [mem 0x0009fc00-0x0009] reserved
[0.00] BIOS-e820: [mem 0x000f-0x000f] reserved
[0.00] BIOS-e820: [mem 0x0010-0x1ffe] usable
[0.00] BIOS-e820: [mem 0x1fff-0x1fff2fff] ACPI NVS
[0.00] BIOS-e820: [mem 0x1fff3000-0x1fff] ACPI data
[0.00] BIOS-e820: [mem 0x-0x] reserved
[0.00] Notice: NX (Execute Disable) protection missing in CPU!
[0.00] SMBIOS 2.2 present.
[0.00] DMI: VIA Technologies, Inc. VT82C694X/694X, BIOS 6.00 PG 
02/19/2002
[0.00] e820: update [mem 0x-0x0fff] usable ==> reserved
[0.00] e820: remove [mem 0x000a-0x000f] usable
[0.00] e820: last_pfn = 0x1fff0 max_arch_pfn = 0x10
[0.00] MTRR default type: uncachable
[0.00] MTRR fixed ranges enabled:
[0.00]   0-9 write-back
[0.00]   A-A uncachable
[0.00]   B-B write-combining
[0.00]   C-C9FFF write-protect
[0.00]   CA000-E uncachable
[0.00]   F-F7FFF write-through
[0.00]   F8000-F8FFF uncachable
[0.00]   F9000-F write-through
[0.00] MTRR variable ranges enabled:
[0.00]   0 base 0 mask FE000 write-back
[0.00]   1 base 0E000 mask FFC00 write-combining
[0.00]   2 disabled
[0.00]   3 disabled
[0.00]   4 disabled
[0.00]   5 disabled
[0.00]   6 disabled
[0.00]   7 disabled
[0.00] x86/PAT: PAT not supported by CPU.
[0.00] x86/PAT: Configuration [0-7]: WB  WT  UC- UC  WB  WT  UC- UC  
[0.00] initial memory mapped: [mem 0x-0x01bf]
[0.00] Base memory trampoline at [c009b000] 9b000 size 16384
[0.00] BRK [0x016b1000, 0x016b1fff] PGTABLE
[0.00] ACPI: Early table checksum verification disabled
[0.00] ACPI: RSDP 0x000F6C00 14 (v00 VIA694)
[0.00] ACPI: RSDT 0x1FFF3000 28 (v01 VIA694 AWRDACPI 
42302E31 AWRD )
[0.00] ACPI: FACP 0x1FFF3040 74 (v01 VIA694 AWRDACPI 
42302E31 AWRD )
[0.00] ACPI: DSDT 0x1FFF30C0 002587 (v01 VIA694 AWRDACPI 
1000 MSFT 010C)
[0.00] ACPI: FACS 0x1FFF 40
[0.00] 0MB HIGHMEM available.
[0.00] 511MB LOWMEM available.
[0.00]   mapped low ram: 0 - 1fff
[0.00]   low ram: 0 - 1fff
[0.00] BRK [0x016b2000, 0x016b2fff] PGTABLE
[0.00] Zone ranges:
[0.00]   DMA  [mem 0x1000-0x00ff]
[0.00]   Normal   [mem 0x0100-0x1ffe]
[0.00]   HighMem  empty
[0.00] Movable zone start for each node
[0.00] Early memory node ranges
[0.00]   node   0: [mem 0x1000-0x0009efff]
[0.00]   node   0: [mem 0x0010-0x1ffe]
[0.00] Initmem setup node 0 [mem 0x1000-0x1ffe]
[0.00] On node 0 totalpages: 130958
[0.00] free_area_init_node: node 0, pgdat c15ad140, node_mem_map 
dfbf0020
[0.00]   DMA zone: 32 pages used for memmap
[0.00]   DMA zone: 0 pages reserved
[0.00]   DMA zone: 3998 pages, LIFO batch:0
[0.00]   Normal zone: 992 pages used for memmap
[0.00]   Normal zone: 126960 pages, LIFO batch:31
[0.00] Using APIC driver default
[0.00] ACPI: PM-Timer IO Port: 0x4008
[0.00] smpboot: Allowing 1 CPUs, 0 hotplug CPUs
[0.00] Local APIC disabled by BIOS -- you can enable it with "lapic"
[0.00] APIC: disable apic facility
[0.00] APIC: switched to apic NOOP
[0.00] PM: Registered nosave memory: [mem 0x-0x0fff]
[0.00] PM: Registered nosave 

Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-09-27 Thread Ondrej Zary
On Monday 26 September 2016 14:23:01 Rafael J. Wysocki wrote:
> On Sunday, September 25, 2016 03:12:05 PM Ondrej Zary wrote:
> > Hello,
> > I've upgraded kernel (Debian Squeeze - backports) from 4.6
> > (4.6.4-1~bpo8+1) to 4.7 (4.7.2-1~bpo8+1) and IRQs stopped working with
> > error messages like this:
> >
> > ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or
> > acpi=off
> >
> > The same thing appeared on two different machines. Is it a known/fixed
> > bug?
>
> Well, maybe.
>
> Can you try 4.8-rc8, please?

Just tested 4.8-rc8 on another (3rd) machine with the same problem. The bug
is still present in 4.8-rc8.
All machines are Pentium 3 PCI/ISA systems.


[0.00] Linux version 4.8.0-rc8+ (zary@gsql) (gcc version 4.7.2 (Debian 
4.7.2-5) ) #84 SMP Tue Sep 27 22:37:05 CEST 2016
[0.00] x86/fpu: Legacy x87 FPU detected.
[0.00] x86/fpu: Using 'eager' FPU context switches.
[0.00] e820: BIOS-provided physical RAM map:
[0.00] BIOS-e820: [mem 0x-0x0009fbff] usable
[0.00] BIOS-e820: [mem 0x0009fc00-0x0009] reserved
[0.00] BIOS-e820: [mem 0x000f-0x000f] reserved
[0.00] BIOS-e820: [mem 0x0010-0x1ffe] usable
[0.00] BIOS-e820: [mem 0x1fff-0x1fff2fff] ACPI NVS
[0.00] BIOS-e820: [mem 0x1fff3000-0x1fff] ACPI data
[0.00] BIOS-e820: [mem 0x-0x] reserved
[0.00] Notice: NX (Execute Disable) protection missing in CPU!
[0.00] SMBIOS 2.2 present.
[0.00] DMI: VIA Technologies, Inc. VT82C694X/694X, BIOS 6.00 PG 
02/19/2002
[0.00] e820: update [mem 0x-0x0fff] usable ==> reserved
[0.00] e820: remove [mem 0x000a-0x000f] usable
[0.00] e820: last_pfn = 0x1fff0 max_arch_pfn = 0x10
[0.00] MTRR default type: uncachable
[0.00] MTRR fixed ranges enabled:
[0.00]   0-9 write-back
[0.00]   A-A uncachable
[0.00]   B-B write-combining
[0.00]   C-C9FFF write-protect
[0.00]   CA000-E uncachable
[0.00]   F-F7FFF write-through
[0.00]   F8000-F8FFF uncachable
[0.00]   F9000-F write-through
[0.00] MTRR variable ranges enabled:
[0.00]   0 base 0 mask FE000 write-back
[0.00]   1 base 0E000 mask FFC00 write-combining
[0.00]   2 disabled
[0.00]   3 disabled
[0.00]   4 disabled
[0.00]   5 disabled
[0.00]   6 disabled
[0.00]   7 disabled
[0.00] x86/PAT: PAT not supported by CPU.
[0.00] x86/PAT: Configuration [0-7]: WB  WT  UC- UC  WB  WT  UC- UC  
[0.00] initial memory mapped: [mem 0x-0x01bf]
[0.00] Base memory trampoline at [c009b000] 9b000 size 16384
[0.00] BRK [0x016b1000, 0x016b1fff] PGTABLE
[0.00] ACPI: Early table checksum verification disabled
[0.00] ACPI: RSDP 0x000F6C00 14 (v00 VIA694)
[0.00] ACPI: RSDT 0x1FFF3000 28 (v01 VIA694 AWRDACPI 
42302E31 AWRD )
[0.00] ACPI: FACP 0x1FFF3040 74 (v01 VIA694 AWRDACPI 
42302E31 AWRD )
[0.00] ACPI: DSDT 0x1FFF30C0 002587 (v01 VIA694 AWRDACPI 
1000 MSFT 010C)
[0.00] ACPI: FACS 0x1FFF 40
[0.00] 0MB HIGHMEM available.
[0.00] 511MB LOWMEM available.
[0.00]   mapped low ram: 0 - 1fff
[0.00]   low ram: 0 - 1fff
[0.00] BRK [0x016b2000, 0x016b2fff] PGTABLE
[0.00] Zone ranges:
[0.00]   DMA  [mem 0x1000-0x00ff]
[0.00]   Normal   [mem 0x0100-0x1ffe]
[0.00]   HighMem  empty
[0.00] Movable zone start for each node
[0.00] Early memory node ranges
[0.00]   node   0: [mem 0x1000-0x0009efff]
[0.00]   node   0: [mem 0x0010-0x1ffe]
[0.00] Initmem setup node 0 [mem 0x1000-0x1ffe]
[0.00] On node 0 totalpages: 130958
[0.00] free_area_init_node: node 0, pgdat c15ad140, node_mem_map 
dfbf0020
[0.00]   DMA zone: 32 pages used for memmap
[0.00]   DMA zone: 0 pages reserved
[0.00]   DMA zone: 3998 pages, LIFO batch:0
[0.00]   Normal zone: 992 pages used for memmap
[0.00]   Normal zone: 126960 pages, LIFO batch:31
[0.00] Using APIC driver default
[0.00] ACPI: PM-Timer IO Port: 0x4008
[0.00] smpboot: Allowing 1 CPUs, 0 hotplug CPUs
[0.00] Local APIC disabled by BIOS -- you can enable it with "lapic"
[0.00] APIC: disable apic facility
[0.00] APIC: switched to apic NOOP
[0.00] PM: Registered nosave memory: [mem 0x-0x0fff]
[0.00] PM: Registered nosave 

Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-09-26 Thread Rafael J. Wysocki
On Sunday, September 25, 2016 03:12:05 PM Ondrej Zary wrote:
> Hello,
> I've upgraded kernel (Debian Squeeze - backports) from 4.6 (4.6.4-1~bpo8+1)
> to 4.7 (4.7.2-1~bpo8+1) and IRQs stopped working with error messages like 
> this:
> 
> ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or 
> acpi=off
> 
> The same thing appeared on two different machines. Is it a known/fixed bug?

Well, maybe.

Can you try 4.8-rc8, please?

Thanks,
Rafael



Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-09-26 Thread Rafael J. Wysocki
On Sunday, September 25, 2016 03:12:05 PM Ondrej Zary wrote:
> Hello,
> I've upgraded kernel (Debian Squeeze - backports) from 4.6 (4.6.4-1~bpo8+1)
> to 4.7 (4.7.2-1~bpo8+1) and IRQs stopped working with error messages like 
> this:
> 
> ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or 
> acpi=off
> 
> The same thing appeared on two different machines. Is it a known/fixed bug?

Well, maybe.

Can you try 4.8-rc8, please?

Thanks,
Rafael



4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-09-25 Thread Ondrej Zary
Hello,
I've upgraded kernel (Debian Squeeze - backports) from 4.6 (4.6.4-1~bpo8+1)
to 4.7 (4.7.2-1~bpo8+1) and IRQs stopped working with error messages like this:

ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

The same thing appeared on two different machines. Is it a known/fixed bug?

-- 
Ondrej Zary


4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

2016-09-25 Thread Ondrej Zary
Hello,
I've upgraded kernel (Debian Squeeze - backports) from 4.6 (4.6.4-1~bpo8+1)
to 4.7 (4.7.2-1~bpo8+1) and IRQs stopped working with error messages like this:

ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

The same thing appeared on two different machines. Is it a known/fixed bug?

-- 
Ondrej Zary