2017-06-07 09:43:40

by Zheng, Lv

[permalink] [raw]
Subject: [RFC PATCH 0/2] ACPI: button: Fix button.lid_init_state=method mode

The following approach fixes button.lid_init_state=method mode for
systemd 233:
https://patchwork.kernel.org/patch/9756457/
https://patchwork.kernel.org/patch/9756467/
But it is not working well with old systemd 229. This solution tries to
make a more comfortable approach for systemd 229.

There are platform variations implementing ACPI lid device in different
way:
1. Some platforms send "open" events to OS and the events arrive before
button driver is resumed;
2. Some platforms send "open" events to OS, but the events arrive after
button driver is resumed, ex., Samsung N210+;
3. Some platforms never send "open" events to OS, but send "open" events to
update the cached _LID return value, and the update events arrive before
button driver is resumed;
4. Some platforms never send "open" events to OS, but send "open" events to
update the cached _LID return value, but the update events arrive after
button driver is resumed, ex., Surface Pro 3;
5. Some platforms never send "open" events, _LID returns value sticks to
"close", ex., Surface Pro 1.

[PATCH 1] tries to fix case 2,4, making them working with any systemd.
[PATCH 2] tries to fix case 5, making it working with systemd 233.
This is also a replacement of the following solution:
https://patchwork.kernel.org/patch/9760867/
It seems adding/removing input node and requesting systemd to
change again is unnecessary for such platforms, so this patch
simply converts "lid_unreliable" into
"button.lid_init_state=ignore".

This material is just sent to demonstrate solutions and issues, the
final solution is not determined yet. So marking them as RFC.

Lv Zheng (2):
ACPI: button: Fix issue that button notify cannot report stateful
SW_LID state
ACPI: button: Add a quirk mode for Surface Pro 1 like laptop

drivers/acpi/button.c | 188 ++++++++++++++++++++++++--------------------------
1 file changed, 89 insertions(+), 99 deletions(-)

--
2.7.4


2017-06-07 09:43:52

by Zheng, Lv

[permalink] [raw]
Subject: [RFC PATCH v5 2/2] ACPI: button: Add a quirk mode for Surface Pro 1 like laptop

Some platforms never send "open" events, _LID returns value sticks to
"close", ex., Surface Pro 1.

Such platforms cannot work well with systemd 229 in
button.lid_init_state=method mode, but button.lid_init_state=open
workaround is available for them to work with systemd 229 and they can work
perfectly with systemd 233 in button.lid_init_state=ignore mode.

This patch introduces a boot parameter to mark such platform lid device as
unreliable to replace old button.lid_init_state=ignore mode. So that users
can use this quirk to make such platforms working with systemd 233. Since
such platform only sends "close", old complicated "open" complement event
mechanism is replaced by a simpler one of always prepending "open" before
any events.

Cc: <[email protected]>
Cc: Benjamin Tissoires <[email protected]>
Cc: Peter Hutterer <[email protected]>
Signed-off-by: Lv Zheng <[email protected]>
---
drivers/acpi/button.c | 164 ++++++++++++++++++++------------------------------
1 file changed, 66 insertions(+), 98 deletions(-)

diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c
index fd8eff6..02b85c1 100644
--- a/drivers/acpi/button.c
+++ b/drivers/acpi/button.c
@@ -56,9 +56,8 @@
#define ACPI_BUTTON_DEVICE_NAME_LID "Lid Switch"
#define ACPI_BUTTON_TYPE_LID 0x05

-#define ACPI_BUTTON_LID_INIT_IGNORE 0x00
+#define ACPI_BUTTON_LID_INIT_METHOD 0x00
#define ACPI_BUTTON_LID_INIT_OPEN 0x01
-#define ACPI_BUTTON_LID_INIT_METHOD 0x02

#define _COMPONENT ACPI_BUTTON_COMPONENT
ACPI_MODULE_NAME("button");
@@ -109,23 +108,20 @@ struct acpi_button {
struct timer_list lid_timer;
char phys[32]; /* for input device */
unsigned long pushed;
- int last_state;
- ktime_t last_time;
bool suspended;
};

+static DEFINE_MUTEX(lid_device_lock);
static BLOCKING_NOTIFIER_HEAD(acpi_lid_notifier);
static struct acpi_device *lid_device;
static u8 lid_init_state = ACPI_BUTTON_LID_INIT_METHOD;

-static unsigned long lid_report_interval __read_mostly = 500;
-module_param(lid_report_interval, ulong, 0644);
-MODULE_PARM_DESC(lid_report_interval, "Interval (ms) between lid key events");
-
static unsigned long lid_update_interval __read_mostly = 10 * MSEC_PER_SEC;
module_param(lid_update_interval, ulong, 0644);
MODULE_PARM_DESC(lid_update_interval, "Interval (ms) between lid state updates");

+static bool lid_unreliable __read_mostly = false;
+
/* --------------------------------------------------------------------------
FS Interface (/proc)
-------------------------------------------------------------------------- */
@@ -149,79 +145,12 @@ static int acpi_lid_notify_state(struct acpi_device *device, int state)
{
struct acpi_button *button = acpi_driver_data(device);
int ret;
- ktime_t next_report;
- bool do_update;
-
- /*
- * In lid_init_state=ignore mode, if user opens/closes lid
- * frequently with "open" missing, and "last_time" is also updated
- * frequently, "close" cannot be delivered to the userspace.
- * So "last_time" is only updated after a timeout or an actual
- * switch.
- */
- if (lid_init_state != ACPI_BUTTON_LID_INIT_IGNORE ||
- button->last_state != !!state)
- do_update = true;
- else
- do_update = false;
-
- next_report = ktime_add(button->last_time,
- ms_to_ktime(lid_report_interval));
- if (button->last_state == !!state &&
- ktime_after(ktime_get(), next_report)) {
- /* Complain the buggy firmware */
- pr_warn_once("The lid device is not compliant to SW_LID.\n");

- /*
- * Send the unreliable complement switch event:
- *
- * On most platforms, the lid device is reliable. However
- * there are exceptions:
- * 1. Platforms returning initial lid state as "close" by
- * default after booting/resuming:
- * https://bugzilla.kernel.org/show_bug.cgi?id=89211
- * https://bugzilla.kernel.org/show_bug.cgi?id=106151
- * 2. Platforms never reporting "open" events:
- * https://bugzilla.kernel.org/show_bug.cgi?id=106941
- * On these buggy platforms, the usage model of the ACPI
- * lid device actually is:
- * 1. The initial returning value of _LID may not be
- * reliable.
- * 2. The open event may not be reliable.
- * 3. The close event is reliable.
- *
- * But SW_LID is typed as input switch event, the input
- * layer checks if the event is redundant. Hence if the
- * state is not switched, the userspace cannot see this
- * platform triggered reliable event. By inserting a
- * complement switch event, it then is guaranteed that the
- * platform triggered reliable one can always be seen by
- * the userspace.
- */
- if (lid_init_state == ACPI_BUTTON_LID_INIT_IGNORE) {
- do_update = true;
- /*
- * Do generate complement switch event for "close"
- * as "close" is reliable and wrong "open" won't
- * trigger unexpected behaviors.
- * Do not generate complement switch event for
- * "open" as "open" is not reliable and wrong
- * "close" will trigger unexpected behaviors.
- */
- if (!state) {
- input_report_switch(button->input,
- SW_LID, state);
- input_sync(button->input);
- }
- }
- }
- /* Send the platform triggered reliable event */
- if (do_update) {
- input_report_switch(button->input, SW_LID, !state);
- input_sync(button->input);
- button->last_state = !!state;
- button->last_time = ktime_get();
- }
+ if (lid_unreliable)
+ input_report_switch(button->input, SW_LID, 0);
+
+ input_report_switch(button->input, SW_LID, !state);
+ input_sync(button->input);

if (state)
pm_wakeup_event(&device->dev, 0);
@@ -382,22 +311,25 @@ static void acpi_lid_tick(struct acpi_device *device)
{
struct acpi_button *button = acpi_driver_data(device);

- mod_timer(&button->lid_timer,
- jiffies + msecs_to_jiffies(lid_update_interval));
+ if (!lid_unreliable)
+ mod_timer(&button->lid_timer,
+ jiffies + msecs_to_jiffies(lid_update_interval));
}

static void acpi_lid_timeout(ulong arg)
{
struct acpi_device *device = (struct acpi_device *)arg;

- switch (lid_init_state) {
- case ACPI_BUTTON_LID_INIT_OPEN:
- (void)acpi_lid_notify_state(device, 1);
- break;
- case ACPI_BUTTON_LID_INIT_METHOD:
- acpi_lid_update_state(device);
- acpi_lid_tick(device);
- break;
+ if (!lid_unreliable) {
+ switch (lid_init_state) {
+ case ACPI_BUTTON_LID_INIT_OPEN:
+ (void)acpi_lid_notify_state(device, 1);
+ break;
+ case ACPI_BUTTON_LID_INIT_METHOD:
+ acpi_lid_update_state(device);
+ acpi_lid_tick(device);
+ break;
+ }
}
}

@@ -506,8 +438,6 @@ static int acpi_button_add(struct acpi_device *device)
strcpy(name, ACPI_BUTTON_DEVICE_NAME_LID);
sprintf(class, "%s/%s",
ACPI_BUTTON_CLASS, ACPI_BUTTON_SUBCLASS_LID);
- button->last_state = !!acpi_lid_evaluate_state(device);
- button->last_time = ktime_get();
setup_timer(&button->lid_timer,
acpi_lid_timeout, (ulong)device);
} else {
@@ -551,7 +481,10 @@ static int acpi_button_add(struct acpi_device *device)
* This assumes there's only one lid device, or if there are
* more we only care about the last one...
*/
+ mutex_lock(&lid_device_lock);
+ get_device(&device->dev);
lid_device = device;
+ mutex_unlock(&lid_device_lock);
}

printk(KERN_INFO PREFIX "%s [%s]\n", name, acpi_device_bid(device));
@@ -570,8 +503,15 @@ static int acpi_button_remove(struct acpi_device *device)
{
struct acpi_button *button = acpi_driver_data(device);

- if (button->type == ACPI_BUTTON_TYPE_LID)
+ if (button->type == ACPI_BUTTON_TYPE_LID) {
del_timer(&button->lid_timer);
+ mutex_lock(&lid_device_lock);
+ if (device == lid_device) {
+ put_device(&device->dev);
+ lid_device = NULL;
+ }
+ mutex_unlock(&lid_device_lock);
+ }
acpi_button_remove_fs(device);
input_unregister_device(button->input);
kfree(button);
@@ -588,9 +528,6 @@ static int param_set_lid_init_state(const char *val, struct kernel_param *kp)
} else if (!strncmp(val, "method", sizeof("method") - 1)) {
lid_init_state = ACPI_BUTTON_LID_INIT_METHOD;
pr_info("Notify initial lid state with _LID return value\n");
- } else if (!strncmp(val, "ignore", sizeof("ignore") - 1)) {
- lid_init_state = ACPI_BUTTON_LID_INIT_IGNORE;
- pr_info("Do not notify initial lid state\n");
} else
result = -EINVAL;
return result;
@@ -603,17 +540,48 @@ static int param_get_lid_init_state(char *buffer, struct kernel_param *kp)
return sprintf(buffer, "open");
case ACPI_BUTTON_LID_INIT_METHOD:
return sprintf(buffer, "method");
- case ACPI_BUTTON_LID_INIT_IGNORE:
- return sprintf(buffer, "ignore");
default:
return sprintf(buffer, "invalid");
}
return 0;
}

+static int param_set_lid_unreliable(const char *val, struct kernel_param *kp)
+{
+ int result = 0;
+ struct device *dev;
+ struct acpi_device *device;
+ struct acpi_button *button;
+
+ result = param_set_bool(val, kp);
+ if (result)
+ return result;
+
+ mutex_lock(&lid_device_lock);
+ if (lid_device) {
+ dev = get_device(&lid_device->dev);
+ mutex_unlock(&lid_device_lock);
+ device = to_acpi_device(dev);
+ button = acpi_driver_data(device);
+ if (lid_unreliable)
+ del_timer(&button->lid_timer);
+ else
+ acpi_lid_tick(device);
+ put_device(&device->dev);
+ mutex_lock(&lid_device_lock);
+ }
+ mutex_unlock(&lid_device_lock);
+ return result;
+}
+
module_param_call(lid_init_state,
param_set_lid_init_state, param_get_lid_init_state,
NULL, 0644);
MODULE_PARM_DESC(lid_init_state, "Behavior for reporting LID initial state");

+module_param_call(lid_unreliable,
+ param_set_lid_unreliable, param_get_bool,
+ &lid_unreliable, 0644);
+MODULE_PARM_DESC(lid_unreliable, "Mark lid device as unreliable");
+
module_acpi_driver(acpi_button_driver);
--
2.7.4

2017-06-07 09:44:06

by Zheng, Lv

[permalink] [raw]
Subject: [RFC PATCH v5 1/2] ACPI: button: Fix issue that button notify cannot report stateful SW_LID state

There are platform variations implementing ACPI lid device in different
ways:
1. Some platforms send "open" events to OS and the events arrive before
button driver is resumed;
2. Some platforms send "open" events to OS, but the events arrive after
button driver is resumed, ex., Samsung N210+;
3. Some platforms never send "open" events to OS, but send "open" events to
update the cached _LID return value, and the update events arrive before
button driver is resumed;
4. Some platforms never send "open" events to OS, but send "open" events to
update the cached _LID return value, but the update events arrive after
button driver is resumed, ex., Surface Pro 3;
5. Some platforms never send "open" events, _LID returns value sticks to
"close", ex., Surface Pro 1.
Currently, only case 1,3 works fine with systemd 229.

Case 2,4 can be treated as an order issue. This patch first fixes this
issue by defer sending initial lid state 10 seconds later after resume,
which ensures acpi_ec_resume() is always invoked before
acpi_button_resume().

However we can see different problems due to systemd bugs:
systemd won't suspend right after seeing "close" event, it has a timeout,
within the timeout, user may opens lid again. But even lid
firmware/driver properly deliver this "open" to user space, when the
timeout tickes, systemd still suspends the platform.
Then user has to close/open again to wake the system up. Noticing that
the first close event will remain in firmware, after resume, user space
can still see a "close" followed by "open", and nothing can stop systemd
from suspending again.
This problem can only be fixed by continously updating lid state. Thus
this patch doesn't kill the timer after seeing the BIOS notification, but
continously sending _LID return value to the input layer for
button.lid_init_state=method mode.

The users can configure update interval via button.lid_update_interval.

Cc: <[email protected]>
Cc: Benjamin Tissoires <[email protected]>
Cc: Peter Hutterer <[email protected]>
Signed-off-by: Lv Zheng <[email protected]>
---
drivers/acpi/button.c | 36 +++++++++++++++++++++++++++++-------
1 file changed, 29 insertions(+), 7 deletions(-)

diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c
index e19f530..fd8eff6 100644
--- a/drivers/acpi/button.c
+++ b/drivers/acpi/button.c
@@ -28,6 +28,7 @@
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
#include <linux/input.h>
+#include <linux/timer.h>
#include <linux/slab.h>
#include <linux/acpi.h>
#include <acpi/button.h>
@@ -79,6 +80,7 @@ MODULE_DEVICE_TABLE(acpi, button_device_ids);
static int acpi_button_add(struct acpi_device *device);
static int acpi_button_remove(struct acpi_device *device);
static void acpi_button_notify(struct acpi_device *device, u32 event);
+static void acpi_lid_timeout(ulong arg);

#ifdef CONFIG_PM_SLEEP
static int acpi_button_suspend(struct device *dev);
@@ -104,6 +106,7 @@ static struct acpi_driver acpi_button_driver = {
struct acpi_button {
unsigned int type;
struct input_dev *input;
+ struct timer_list lid_timer;
char phys[32]; /* for input device */
unsigned long pushed;
int last_state;
@@ -119,6 +122,10 @@ static unsigned long lid_report_interval __read_mostly = 500;
module_param(lid_report_interval, ulong, 0644);
MODULE_PARM_DESC(lid_report_interval, "Interval (ms) between lid key events");

+static unsigned long lid_update_interval __read_mostly = 10 * MSEC_PER_SEC;
+module_param(lid_update_interval, ulong, 0644);
+MODULE_PARM_DESC(lid_update_interval, "Interval (ms) between lid state updates");
+
/* --------------------------------------------------------------------------
FS Interface (/proc)
-------------------------------------------------------------------------- */
@@ -371,17 +378,25 @@ static int acpi_lid_update_state(struct acpi_device *device)
return acpi_lid_notify_state(device, state);
}

-static void acpi_lid_initialize_state(struct acpi_device *device)
+static void acpi_lid_tick(struct acpi_device *device)
+{
+ struct acpi_button *button = acpi_driver_data(device);
+
+ mod_timer(&button->lid_timer,
+ jiffies + msecs_to_jiffies(lid_update_interval));
+}
+
+static void acpi_lid_timeout(ulong arg)
{
+ struct acpi_device *device = (struct acpi_device *)arg;
+
switch (lid_init_state) {
case ACPI_BUTTON_LID_INIT_OPEN:
(void)acpi_lid_notify_state(device, 1);
break;
case ACPI_BUTTON_LID_INIT_METHOD:
- (void)acpi_lid_update_state(device);
- break;
- case ACPI_BUTTON_LID_INIT_IGNORE:
- default:
+ acpi_lid_update_state(device);
+ acpi_lid_tick(device);
break;
}
}
@@ -432,6 +447,8 @@ static int acpi_button_suspend(struct device *dev)
struct acpi_device *device = to_acpi_device(dev);
struct acpi_button *button = acpi_driver_data(device);

+ if (button->type == ACPI_BUTTON_TYPE_LID)
+ del_timer(&button->lid_timer);
button->suspended = true;
return 0;
}
@@ -443,7 +460,7 @@ static int acpi_button_resume(struct device *dev)

button->suspended = false;
if (button->type == ACPI_BUTTON_TYPE_LID)
- acpi_lid_initialize_state(device);
+ acpi_lid_tick(device);
return 0;
}
#endif
@@ -467,6 +484,7 @@ static int acpi_button_add(struct acpi_device *device)
error = -ENOMEM;
goto err_free_button;
}
+ init_timer(&button->lid_timer);

name = acpi_device_name(device);
class = acpi_device_class(device);
@@ -490,6 +508,8 @@ static int acpi_button_add(struct acpi_device *device)
ACPI_BUTTON_CLASS, ACPI_BUTTON_SUBCLASS_LID);
button->last_state = !!acpi_lid_evaluate_state(device);
button->last_time = ktime_get();
+ setup_timer(&button->lid_timer,
+ acpi_lid_timeout, (ulong)device);
} else {
printk(KERN_ERR PREFIX "Unsupported hid [%s]\n", hid);
error = -ENODEV;
@@ -526,7 +546,7 @@ static int acpi_button_add(struct acpi_device *device)
if (error)
goto err_remove_fs;
if (button->type == ACPI_BUTTON_TYPE_LID) {
- acpi_lid_initialize_state(device);
+ acpi_lid_tick(device);
/*
* This assumes there's only one lid device, or if there are
* more we only care about the last one...
@@ -550,6 +570,8 @@ static int acpi_button_remove(struct acpi_device *device)
{
struct acpi_button *button = acpi_driver_data(device);

+ if (button->type == ACPI_BUTTON_TYPE_LID)
+ del_timer(&button->lid_timer);
acpi_button_remove_fs(device);
input_unregister_device(button->input);
kfree(button);
--
2.7.4

2017-06-13 06:17:22

by kernel test robot

[permalink] [raw]
Subject: [lkp-robot] [ACPI] 4d0c35c1af: BUG:scheduling_while_atomic


FYI, we noticed the following commit:

commit: 4d0c35c1af080033a9c2b0ac5734ca78f9bc3c63 ("ACPI: button: Fix issue that button notify cannot report stateful SW_LID state")
url: https://github.com/0day-ci/linux/commits/Lv-Zheng/ACPI-button-Fix-button-lid_init_state-method-mode/20170608-210525


in testcase: netperf
with following parameters:

ip: ipv4
runtime: 300s
nr_threads: 200%
cluster: cs-localhost
test: TCP_CRR
cpufreq_governor: performance

test-description: Netperf is a benchmark that can be use to measure various aspect of networking performance.
test-url: http://www.netperf.org/netperf/


on test machine: 4 threads Intel(R) Core(TM) i5-3317U CPU @ 1.70GHz with 4G memory

caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace):


+---------------------------------------------------------------------------+----------+------------+
| | v4.9-rc8 | 4d0c35c1af |
+---------------------------------------------------------------------------+----------+------------+
| boot_successes | 1249 | 2 |
| boot_failures | 100 | 10 |
| BUG:sleeping_function_called_from_invalid_context_at_kernel/irq/manage.c | 17 | |
| calltrace:SyS_write | 8 | |
| calltrace:init_netconsole | 9 | |
| calltrace:SyS_finit_module | 40 | 1 |
| WARNING:at_drivers/gpu/drm/i915/intel_display.c:#intel_modeset_init[i915] | 20 | 1 |
| calltrace:i915_init | 20 | 1 |
| drm:intel_set_cpu_fifo_underrun_reporting[i915]] | 1 | |
| drm:intel_cpu_fifo_underrun_irq_handler[i915]] | 1 | |
| drm:intel_set_pch_fifo_underrun_reporting[i915]] | 1 | |
| drm:intel_pch_fifo_underrun_irq_handler[i915]] | 1 | |
| WARNING:at_fs/sysfs/dir.c:#sysfs_warn_dup | 11 | |
| calltrace:parport_pc_init | 11 | |
| WARNING:at_lib/kobject.c:#kobject_add_internal | 11 | |
| invoked_oom-killer:gfp_mask=0x | 27 | 2 |
| Mem-Info | 27 | 2 |
| Kernel_panic-not_syncing:Out_of_memory_and_no_killable_processes | 27 | 2 |
| BUG:kernel_hang_in_test_stage | 11 | |
| WARNING:at_net/mac80211/driver-ops.h:#ieee80211_set_default_key[mac80211] | 7 | |
| calltrace:SyS_sendmsg | 7 | |
| WARNING:at_net/mac80211/driver-ops.h:#ieee80211_key_replace[mac80211] | 7 | |
| BUG:kernel_hang_in_boot_stage | 2 | |
| BUG:kernel_in_stage | 11 | |
| BUG:scheduling_while_atomic | 0 | 8 |
| WARNING:at_kernel/time/timer.c:#call_timer_fn | 0 | 8 |
| BUG:sleeping_function_called_from_invalid_context_at_mm/slab.h | 0 | 8 |
| calltrace:intel_lid_notify | 0 | 8 |
| calltrace:SyS_sendto | 0 | 8 |
| calltrace:SyS_connect | 0 | 8 |
| calltrace:SyS_read | 0 | 4 |
| calltrace:smpboot_thread_fn | 0 | 8 |
| calltrace:SyS_recvfrom | 0 | 7 |
| calltrace:SyS_accept | 0 | 5 |
| BUG:unable_to_handle_kernel | 0 | 6 |
| Oops:#[##] | 0 | 6 |
| Kernel_panic-not_syncing:Fatal_exception_in_interrupt | 0 | 6 |
| calltrace:SyS_socket | 0 | 3 |
| WARNING:at_net/sched/sch_generic.c:#dev_watchdog | 0 | 1 |
| BUG:soft_lockup-CPU##stuck_for#s | 0 | 2 |
| Kernel_panic-not_syncing:softlockup:hung_tasks | 0 | 2 |
| WARNING:at_arch/x86/kernel/smp.c:#native_smp_send_reschedule | 0 | 1 |
| INFO:rcu_sched_detected_stalls_on_CPUs/tasks | 0 | 1 |
| RIP:smp_call_function_many | 0 | 1 |
| calltrace:SyS_seccomp | 0 | 1 |
| calltrace:SyS_nanosleep | 0 | 1 |
| calltrace:SyS_bind | 0 | 1 |
+---------------------------------------------------------------------------+----------+------------+



[ 16.440882] BUG: scheduling while atomic: swapper/2/0/0x00000102
[ 16.441400] Modules linked in:
[ 16.441750] CPU: 2 PID: 0 Comm: swapper/2 Not tainted 4.9.0-rc8-00001-g4d0c35c #1
[ 16.442346] Hardware name: LENOVO IdeaPad U410 /Lenovo , BIOS 65CN15WW 06/05/2012
[ 16.443007] ffff880112a837b0 ffffffff81477139 0000000000000000 ffff880112a993c0
[ 16.443830] ffff880112a837c0 ffffffff810a7d04 ffff880112a83818 ffffffff81962ed4
[ 16.444651] 0000000000000422 0000000000000008 ffff880112a993c0 ffff880112a837f8
[ 16.445473] Call Trace:
[ 16.446670] <IRQ>
[ 16.446857] [<ffffffff81477139>] dump_stack+0x63/0x8a
[ 16.447329] [<ffffffff810a7d04>] __schedule_bug+0x54/0x70
[ 16.447766] [<ffffffff81962ed4>] __schedule+0x554/0x6f0
[ 16.448191] [<ffffffff819630ad>] schedule+0x3d/0x90
[ 16.448594] [<ffffffff819666f6>] schedule_timeout+0x1d6/0x3f0
[ 16.449052] [<ffffffff810f0340>] ? del_timer_sync+0x50/0x50
[ 16.449501] [<ffffffff810c634f>] ? prepare_to_wait_event+0x7f/0x100
[ 16.449989] [<ffffffff81506972>] ec_guard+0x173/0x1b1
[ 16.450405] [<ffffffff810c63d0>] ? prepare_to_wait_event+0x100/0x100
[ 16.450897] [<ffffffff81507956>] acpi_ec_transaction+0x13f/0x2f2
[ 16.451369] [<ffffffff81507b56>] acpi_ec_read+0x4d/0x59
[ 16.451794] [<ffffffff81507cb9>] acpi_ec_space_handler+0xce/0x183
[ 16.452271] [<ffffffff814fdb35>] ? acpi_os_signal_semaphore+0x74/0x84
[ 16.452771] [<ffffffff81542030>] ? acpi_ut_release_mutex+0x11c/0x127
[ 16.453264] [<ffffffff8151b2b3>] acpi_ev_address_space_dispatch+0x2ce/0x33a
[ 16.453792] [<ffffffff81507beb>] ? ec_transaction+0x4f/0x4f
[ 16.454239] [<ffffffff81522ef6>] acpi_ex_access_region+0x414/0x4ca
[ 16.454719] [<ffffffff810a81da>] ? __might_sleep+0x4a/0x80
[ 16.455159] [<ffffffff81523386>] acpi_ex_field_datum_io+0x178/0x3fa
[ 16.455647] [<ffffffff8152392c>] acpi_ex_extract_from_field+0x151/0x2bb
[ 16.456157] [<ffffffff81522592>] acpi_ex_read_data_from_field+0x380/0x3d0
[ 16.456676] [<ffffffff815279f2>] acpi_ex_resolve_node_to_value+0x326/0x443
[ 16.457202] [<ffffffff81527e83>] acpi_ex_resolve_to_value+0x374/0x40e
[ 16.457700] [<ffffffff81515151>] acpi_ds_evaluate_name_path+0xa3/0x143
[ 16.458204] [<ffffffff815157c0>] acpi_ds_exec_end_op+0xd1/0x6c6
[ 16.458670] [<ffffffff815365c5>] acpi_ps_parse_loop+0x7d7/0x873
[ 16.459137] [<ffffffff8153f1f3>] ? acpi_ut_trace+0x26/0x66
[ 16.459579] [<ffffffff8153786c>] acpi_ps_parse_aml+0x1ac/0x4a1
[ 16.460041] [<ffffffff81538526>] acpi_ps_execute_method+0x1f4/0x2b6
[ 16.460529] [<ffffffff8152f567>] acpi_ns_evaluate+0x2ee/0x435
[ 16.460985] [<ffffffff81534209>] acpi_evaluate_object+0x178/0x38e
[ 16.461463] [<ffffffff814fe210>] acpi_evaluate_integer+0x44/0xca
[ 16.461934] [<ffffffff810aba12>] ? check_preempt_curr+0x52/0x90
[ 16.462403] [<ffffffff8154533d>] ? acpi_button_notify+0x133/0x133
[ 16.462880] [<ffffffff81544b04>] acpi_lid_evaluate_state+0x1c/0x33
[ 16.463401] [<ffffffff815451f9>] acpi_lid_update_state+0x16/0x27
[ 16.463875] [<ffffffff8154535d>] acpi_lid_timeout+0x20/0x37
[ 16.464320] [<ffffffff810f0385>] call_timer_fn+0x35/0x130
[ 16.464756] [<ffffffff810f0962>] run_timer_softirq+0x222/0x4e0
[ 16.465218] [<ffffffff810f8c01>] ? ktime_get+0x41/0xb0
[ 16.465640] [<ffffffff81053256>] ? lapic_next_deadline+0x26/0x30
[ 16.466112] [<ffffffff8196af74>] __do_softirq+0x104/0x2ab
[ 16.466550] [<ffffffff810869c1>] irq_exit+0xf1/0x100
[ 16.466959] [<ffffffff8196ad72>] smp_apic_timer_interrupt+0x42/0x50
[ 16.467446] [<ffffffff81969f2c>] apic_timer_interrupt+0x8c/0xa0
[ 16.467908] <EOI>
[ 16.468089] [<ffffffff817d3b12>] ? cpuidle_enter_state+0x122/0x2e0
[ 16.468669] [<ffffffff817d3d07>] cpuidle_enter+0x17/0x20
[ 16.469099] [<ffffffff810c6983>] call_cpuidle+0x23/0x40
[ 16.469525] [<ffffffff810c6bb4>] cpu_startup_entry+0x114/0x200
[ 16.469988] [<ffffffff81051d57>] start_secondary+0x107/0x130
[ 16.470515] ACPI : button: The lid device is not compliant to SW_LID.
[ 16.471013] ------------[ cut here ]------------
[ 16.471397] WARNING: CPU: 2 PID: 0 at kernel/time/timer.c:1315 call_timer_fn+0x128/0x130
[ 16.472117] timer: acpi_lid_timeout+0x0/0x37 preempt leak: 00000101 -> 00000000
[ 16.472699] Modules linked in:
[ 16.473046] CPU: 2 PID: 0 Comm: swapper/2 Tainted: G W 4.9.0-rc8-00001-g4d0c35c #1
[ 16.473713] Hardware name: LENOVO IdeaPad U410 /Lenovo , BIOS 65CN15WW 06/05/2012
[ 16.474368] ffff880112a83de8 ffffffff81477139 ffff880112a83e38 0000000000000000
[ 16.475191] ffff880112a83e28 ffffffff810803db 0000052300000246 0000000000000001
[ 16.476013] ffff8800b4f0b190 0000000000000101 ffffffff8154533d ffff88010d4e5800
[ 16.476835] Call Trace:
[ 16.477082] <IRQ>
[ 16.477262] [<ffffffff81477139>] dump_stack+0x63/0x8a
[ 16.477734] [<ffffffff810803db>] __warn+0xcb/0xf0
[ 16.478128] [<ffffffff8154533d>] ? acpi_button_notify+0x133/0x133
[ 16.478603] [<ffffffff8108044f>] warn_slowpath_fmt+0x4f/0x60
[ 16.479054] [<ffffffff81544a59>] ? acpi_lid_tick+0x2f/0x32
[ 16.479494] [<ffffffff8154533d>] ? acpi_button_notify+0x133/0x133
[ 16.479970] [<ffffffff810f0478>] call_timer_fn+0x128/0x130
[ 16.480410] [<ffffffff810f0962>] run_timer_softirq+0x222/0x4e0
[ 16.480871] [<ffffffff810f8c01>] ? ktime_get+0x41/0xb0
[ 16.481290] [<ffffffff81053256>] ? lapic_next_deadline+0x26/0x30
[ 16.481763] [<ffffffff8196af74>] __do_softirq+0x104/0x2ab
[ 16.482199] [<ffffffff810869c1>] irq_exit+0xf1/0x100
[ 16.482607] [<ffffffff8196ad72>] smp_apic_timer_interrupt+0x42/0x50
[ 16.483093] [<ffffffff81969f2c>] apic_timer_interrupt+0x8c/0xa0
[ 16.483555] <EOI>
[ 16.483734] [<ffffffff817d3b12>] ? cpuidle_enter_state+0x122/0x2e0
[ 16.484313] [<ffffffff817d3d07>] cpuidle_enter+0x17/0x20
[ 16.484745] [<ffffffff810c6983>] call_cpuidle+0x23/0x40
[ 16.485169] [<ffffffff810c6bb4>] cpu_startup_entry+0x114/0x200
[ 16.485630] [<ffffffff81051d57>] start_secondary+0x107/0x130
[ 16.486081] ---[ end trace 1414925b5a440cdd ]---


To reproduce:

git clone https://github.com/01org/lkp-tests.git
cd lkp-tests
bin/lkp install job.yaml # job file is attached in this email
bin/lkp run job.yaml



Thanks,
Xiaolong


Attachments:
(No filename) (12.03 kB)
config-4.9.0-rc8-00001-g4d0c35c (150.54 kB)
job-script (7.00 kB)
dmesg.xz (42.96 kB)
netperf (4.09 kB)
job.yaml (4.54 kB)
reproduce (685.00 B)
Download all attachments