diff mbox

kernel-4.7 bug in Intel sound and/or ACPI

Message ID f85fb7c7-53aa-3a1e-0635-bb245d08e804@codeaurora.org (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Sinan Kaya June 24, 2016, 6:09 a.m. UTC
On 6/23/2016 7:25 PM, Wim Osterholt wrote:
> On Thu, Jun 23, 2016 at 11:45:47AM -0400, Sinan Kaya wrote:
>>>
>>> Sure, let me get a patch for you.
>>
>> Here it is
> 
> http://webserver.djo.tudelft.nl/dmesg460+printpatch2
> 

Thanks, this was very helpful. I was able to fix the problem by using
the values in your log.

Can you give it a try?


> 
>> I am trying to find a system with similar characteristics for debug
> 
> All from the same laptop, Dell Inspiron 4100.
> The same problem arises at a Dell Inspiron 510m.
> I've not seen it on a workstation Dell XW4300.
> 
> 
> 
> Groeten, Wim.
> 
> 
> ----- wim@djo.tudelft.nl -----
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

Comments

wim June 25, 2016, 1:39 a.m. UTC | #1
On Fri, Jun 24, 2016 at 02:09:15AM -0400, Sinan Kaya wrote:
> 
> Can you give it a try?

Whell, I tried to no avail.

Wether it is on 4.6 or 4.7, with or without your previous patch,
I keep getting rejected hunks.
For example, here the line to be deleted is nowhere to be found:

> diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c
> index 714ba4d..c2f22c9 100644
> --- a/drivers/acpi/pci_link.c
> +++ b/drivers/acpi/pci_link.c
> @@ -497,7 +497,7 @@ static int acpi_irq_get_penalty(int irq)
>  	int penalty = 0;
>  
>  	if (irq < ACPI_MAX_ISA_IRQS)
> -		penalty += acpi_isa_irq_penalty[irq];
> +		return acpi_isa_irq_penalty[irq];
>  
>  	/*
>  	* Penalize IRQ used by ACPI SCI. If ACPI SCI pin attributes conflict


Regards, Wim.


----- wim@djo.tudelft.nl -----

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Sinan Kaya June 25, 2016, 8:51 a.m. UTC | #2
On 2016-06-24 21:39, Wim Osterholt wrote:
> On Fri, Jun 24, 2016 at 02:09:15AM -0400, Sinan Kaya wrote:
>> 
>> Can you give it a try?
> 
> Whell, I tried to no avail.
> 
> Wether it is on 4.6 or 4.7, with or without your previous patch,
> I keep getting rejected hunks.
> For example, here the line to be deleted is nowhere to be found:
> 
>> diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c
>> index 714ba4d..c2f22c9 100644
>> --- a/drivers/acpi/pci_link.c
>> +++ b/drivers/acpi/pci_link.c
>> @@ -497,7 +497,7 @@ static int acpi_irq_get_penalty(int irq)
>>  	int penalty = 0;
>> 
>>  	if (irq < ACPI_MAX_ISA_IRQS)
>> -		penalty += acpi_isa_irq_penalty[irq];
>> +		return acpi_isa_irq_penalty[irq];
>> 
>>  	/*
>>  	* Penalize IRQ used by ACPI SCI. If ACPI SCI pin attributes conflict
> 
> 
> Regards, Wim.
> 
> 
> ----- wim@djo.tudelft.nl -----

Please apply the patches on top of clean 4.7-rc4 tree and apply them in 
order with

git am 0001...
git am 0002...
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
wim June 27, 2016, 6:27 a.m. UTC | #3
On Sat, Jun 25, 2016 at 04:51:03AM -0400, okaya@codeaurora.org wrote:
> On 2016-06-24 21:39, Wim Osterholt wrote:
> 
> Please apply the patches on top of clean 4.7-rc4 tree and apply them in 
> order with
> 
> git am 0001...
> git am 0002...

It doesn't work that way.
Beginners problems with git.
Tried all kinds of things, including a new git clone to no avail.
Took a long time to discover that in the above example these were the names
of the 'attachments'.
It didn't work. Error 'could not find out the kind of patch' or some such.
Took much longer to find out that in that mail and in the saved attachments
there were lines beginning with '>From' that were the culprit.

Still not found out how to make patch work without errors.
Anyway, by doing it with more manual intervention om a stock kernel-4.7-rc4
on my (very slow) Inspiron 4100 it seems to work like before. Hooray.
However, an earlier try on my Inspiron 510m did not work.
I'll do a clean retry later today, just to make sure.

regards, Wim.


----- wim@djo.tudelft.nl -----

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Sinan Kaya June 27, 2016, 8:22 a.m. UTC | #4
On 2016-06-27 02:27, Wim Osterholt wrote:
> On Sat, Jun 25, 2016 at 04:51:03AM -0400, okaya@codeaurora.org wrote:
>> On 2016-06-24 21:39, Wim Osterholt wrote:
>> 
>> Please apply the patches on top of clean 4.7-rc4 tree and apply them 
>> in
>> order with
>> 
>> git am 0001...
>> git am 0002...
> 
> It doesn't work that way.
> Beginners problems with git.
> Tried all kinds of things, including a new git clone to no avail.
> Took a long time to discover that in the above example these were the 
> names
> of the 'attachments'.
> It didn't work. Error 'could not find out the kind of patch' or some 
> such.
> Took much longer to find out that in that mail and in the saved 
> attachments
> there were lines beginning with '>From' that were the culprit.
> 
> Still not found out how to make patch work without errors.
> Anyway, by doing it with more manual intervention om a stock 
> kernel-4.7-rc4
> on my (very slow) Inspiron 4100 it seems to work like before. Hooray.
> However, an earlier try on my Inspiron 510m did not work.
> I'll do a clean retry later today, just to make sure.


Ok, let me know. I can post a clean patch series. I was trying to get 
you something to test before posting the official version.

> 
> regards, Wim.
> 
> 
> ----- wim@djo.tudelft.nl -----
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
wim June 27, 2016, 1:04 p.m. UTC | #5
On Mon, Jun 27, 2016 at 04:22:18AM -0400, okaya@codeaurora.org wrote:
> > However, an earlier try on my Inspiron 510m did not work.
> > I'll do a clean retry later today, just to make sure.
> 
> 
> Ok, let me know. I can post a clean patch series. I was trying to get 
> you something to test before posting the official version.

The 510m just finished compiling and now it works fine too.
Thanks.



Regards, Wim.


----- wim@djo.tudelft.nl -----

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Sinan Kaya June 27, 2016, 9:05 p.m. UTC | #6
On 2016-06-27 16:04, Wim Osterholt wrote:
> On Mon, Jun 27, 2016 at 04:22:18AM -0400, okaya@codeaurora.org wrote:
>> > However, an earlier try on my Inspiron 510m did not work.
>> > I'll do a clean retry later today, just to make sure.
>> 
>> 
>> Ok, let me know. I can post a clean patch series. I was trying to get
>> you something to test before posting the official version.
> 
> The 510m just finished compiling and now it works fine too.
> Thanks.
> 

Nice, I will post the official version and let you know.

> 
> 
> Regards, Wim.
> 
> 
> ----- wim@djo.tudelft.nl -----
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Sinan Kaya June 29, 2016, 8:34 a.m. UTC | #7
On 6/27/2016 5:05 PM, okaya@codeaurora.org wrote:
> On 2016-06-27 16:04, Wim Osterholt wrote:
>> On Mon, Jun 27, 2016 at 04:22:18AM -0400, okaya@codeaurora.org wrote:
>>> > However, an earlier try on my Inspiron 510m did not work.
>>> > I'll do a clean retry later today, just to make sure.
>>>
>>>
>>> Ok, let me know. I can post a clean patch series. I was trying to get
>>> you something to test before posting the official version.
>>
>> The 510m just finished compiling and now it works fine too.
>> Thanks.
>>
> 
> Nice, I will post the official version and let you know.
> 

I posted this [PATCH V2 0/4] ACPI,PCI,IRQ: correct ISA penalty calculation

Can you test this and give me a tested-by?

Alex,
If you could also review this, it would be great.

Sinan

>>
>>
>> Regards, Wim.
>>
>>
>> ----- wim@djo.tudelft.nl -----
>>
>> -- 
>> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> -- 
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
wim June 30, 2016, 2:30 a.m. UTC | #8
On Wed, Jun 29, 2016 at 04:34:14AM -0400, Sinan Kaya wrote:
> > 
> 
> I posted this [PATCH V2 0/4] ACPI,PCI,IRQ: correct ISA penalty calculation
> 
> Can you test this and give me a tested-by?


Kernel-4.7-rc5 plus this patch works like a charm on my Inspiron 4100.
Dmesg output is quite similar to the one from kernel-4.6 .

Tested-by: Wim Osterholt. <wim@djo.tudelft.nl>



--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Sinan Kaya June 30, 2016, 9:43 a.m. UTC | #9
On 2016-06-30 05:30, Wim Osterholt wrote:
> On Wed, Jun 29, 2016 at 04:34:14AM -0400, Sinan Kaya wrote:
>> >
>> 
>> I posted this [PATCH V2 0/4] ACPI,PCI,IRQ: correct ISA penalty 
>> calculation
>> 
>> Can you test this and give me a tested-by?
> 
> 
> Kernel-4.7-rc5 plus this patch works like a charm on my Inspiron 4100.
> Dmesg output is quite similar to the one from kernel-4.6 .
> 
> Tested-by: Wim Osterholt. <wim@djo.tudelft.nl>
> 

Thank you.


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

Patch

diff --git a/arch/x86/pci/acpi.c b/arch/x86/pci/acpi.c
index b2a4e2a..3cd6983 100644
--- a/arch/x86/pci/acpi.c
+++ b/arch/x86/pci/acpi.c
@@ -396,6 +396,7 @@  int __init pci_acpi_init(void)
 		return -ENODEV;
 
 	printk(KERN_INFO "PCI: Using ACPI for IRQ routing\n");
+	acpi_irq_penalty_init();
 	pcibios_enable_irq = acpi_pci_irq_enable;
 	pcibios_disable_irq = acpi_pci_irq_disable;
 	x86_init.pci.init_irq = x86_init_noop;
diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c
index f2b69e3..714ba4d 100644
--- a/drivers/acpi/pci_link.c
+++ b/drivers/acpi/pci_link.c
@@ -517,6 +517,42 @@  static int acpi_irq_get_penalty(int irq)
 	return penalty;
 }
 
+int __init acpi_irq_penalty_init(void)
+{
+	struct acpi_pci_link *link;
+	int i;
+
+	/*
+	 * Update penalties to facilitate IRQ balancing.
+	 */
+	list_for_each_entry(link, &acpi_link_list, list) {
+
+		/*
+		 * reflect the possible and active irqs in the penalty table --
+		 * useful for breaking ties.
+		 */
+		if (link->irq.possible_count) {
+			int penalty =
+			    PIRQ_PENALTY_PCI_POSSIBLE /
+			    link->irq.possible_count;
+
+			for (i = 0; i < link->irq.possible_count; i++) {
+				if (link->irq.possible[i] < ACPI_MAX_ISA_IRQS)
+					acpi_isa_irq_penalty[link->irq.
+							 possible[i]] +=
+					    penalty;
+			}
+
+		} else if (link->irq.active &&
+				(link->irq.active < ACPI_MAX_ISA_IRQS)) {
+			acpi_isa_irq_penalty[link->irq.active] +=
+			    PIRQ_PENALTY_PCI_POSSIBLE;
+		}
+	}
+
+	return 0;
+}
+
 static int acpi_irq_balance = -1;	/* 0: static, 1: balance */
 
 static int acpi_pci_link_allocate(struct acpi_pci_link *link)
diff --git a/include/acpi/acpi_drivers.h b/include/acpi/acpi_drivers.h
index 797ae2e..29c6912 100644
--- a/include/acpi/acpi_drivers.h
+++ b/include/acpi/acpi_drivers.h
@@ -78,6 +78,7 @@ 
 
 /* ACPI PCI Interrupt Link (pci_link.c) */
 
+int acpi_irq_penalty_init(void);
 int acpi_pci_link_allocate_irq(acpi_handle handle, int index, int *triggering,
 			       int *polarity, char **name);
 int acpi_pci_link_free_irq(acpi_handle handle);