* Patch "ACPI / LPSS: Only call pwm_add_table() for the first PWM controller" has been added to the 4.12-stable tree
@ 2017-08-07 20:31 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-08-07 20:31 UTC (permalink / raw)
To: hdegoede, andriy.shevchenko, gregkh, rafael.j.wysocki
Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
ACPI / LPSS: Only call pwm_add_table() for the first PWM controller
to the 4.12-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
acpi-lpss-only-call-pwm_add_table-for-the-first-pwm-controller.patch
and it can be found in the queue-4.12 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From dd242a080d178c36442a0bb28b6acf6f126d0569 Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede@redhat.com>
Date: Thu, 6 Jul 2017 18:49:27 +0200
Subject: ACPI / LPSS: Only call pwm_add_table() for the first PWM controller
From: Hans de Goede <hdegoede@redhat.com>
commit dd242a080d178c36442a0bb28b6acf6f126d0569 upstream.
At least on the UP board SBC both PWMs are enabled leading to us
trying to add the same pwm_lookup twice, which leads to the following:
[ 0.902224] list_add double add: new=ffffffffb8efd400,
prev=ffffffffb8efd400, next=ffffffffb8eeede0.
[ 0.912466] ------------[ cut here ]------------
[ 0.917624] kernel BUG at lib/list_debug.c:31!
[ 0.922588] invalid opcode: 0000 [#1] SMP
...
[ 1.027450] Call Trace:
[ 1.030185] pwm_add_table+0x4c/0x90
[ 1.034181] bsw_pwm_setup+0x1a/0x20
[ 1.038175] acpi_lpss_create_device+0xfe/0x420
...
This commit fixes this by only calling pwm_add_table() for the first
PWM controller (which is the one used for the backlight).
Link: https://bugzilla.redhat.com/show_bug.cgi?id=1458599
Fixes: bf7696a12071 (acpi: lpss: call pwm_add_table() for BSW...)
Fixes: 04434ab5120a (ACPI / LPSS: Call pwm_add_table() for Bay Trail...)
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/acpi/acpi_lpss.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
--- a/drivers/acpi/acpi_lpss.c
+++ b/drivers/acpi/acpi_lpss.c
@@ -85,6 +85,7 @@ static const struct lpss_device_desc lps
};
struct lpss_private_data {
+ struct acpi_device *adev;
void __iomem *mmio_base;
resource_size_t mmio_size;
unsigned int fixed_clk_rate;
@@ -155,6 +156,12 @@ static struct pwm_lookup byt_pwm_lookup[
static void byt_pwm_setup(struct lpss_private_data *pdata)
{
+ struct acpi_device *adev = pdata->adev;
+
+ /* Only call pwm_add_table for the first PWM controller */
+ if (!adev->pnp.unique_id || strcmp(adev->pnp.unique_id, "1"))
+ return;
+
if (!acpi_dev_present("INT33FD", NULL, -1))
pwm_add_table(byt_pwm_lookup, ARRAY_SIZE(byt_pwm_lookup));
}
@@ -180,6 +187,12 @@ static struct pwm_lookup bsw_pwm_lookup[
static void bsw_pwm_setup(struct lpss_private_data *pdata)
{
+ struct acpi_device *adev = pdata->adev;
+
+ /* Only call pwm_add_table for the first PWM controller */
+ if (!adev->pnp.unique_id || strcmp(adev->pnp.unique_id, "1"))
+ return;
+
pwm_add_table(bsw_pwm_lookup, ARRAY_SIZE(bsw_pwm_lookup));
}
@@ -456,6 +469,7 @@ static int acpi_lpss_create_device(struc
goto err_out;
}
+ pdata->adev = adev;
pdata->dev_desc = dev_desc;
if (dev_desc->setup)
Patches currently in stable-queue which might be from hdegoede@redhat.com are
queue-4.12/acpi-lpss-only-call-pwm_add_table-for-the-first-pwm-controller.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-08-07 20:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-07 20:31 Patch "ACPI / LPSS: Only call pwm_add_table() for the first PWM controller" has been added to the 4.12-stable tree gregkh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).