From: Takashi Iwai <tiwai@suse.de>
Subject: dell-laptop: Fixate rfkill work on CPU#0
Patch-mainline: Never, only for SLE12-SP2/openSUSE-42.2
References: bsc#1004052

The dell-laptop driver executes the rfkill switch command via dcdbas,
and it seems leading to the stall of workqueue as reported in
bsc#1005042.  The reason is that dcdbas has some weird code to run
exclusively on CPU#0, and this blocks the workqueue operations.

The problem seems to have been fixed already in upstream by rewriting
dcdbas code with a new API, but we can't use it for 4.4.x.
So, as a workaround, here we fix the caller side to run on CPU#0
beforehand.

Signed-off-by: Takashi Iwai <tiwai@suse.de>

---
 drivers/platform/x86/dell-laptop.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/platform/x86/dell-laptop.c
+++ b/drivers/platform/x86/dell-laptop.c
@@ -807,7 +807,7 @@ static bool dell_laptop_i8042_filter(uns
 	} else if (unlikely(extended)) {
 		switch (data) {
 		case 0x8:
-			schedule_delayed_work(&dell_rfkill_work,
+			schedule_delayed_work_on(0, &dell_rfkill_work,
 					      round_jiffies_relative(HZ / 4));
 			break;
 		}
@@ -823,7 +823,7 @@ static int (*dell_rbtn_notifier_unregist
 static int dell_laptop_rbtn_notifier_call(struct notifier_block *nb,
 					  unsigned long action, void *data)
 {
-	schedule_delayed_work(&dell_rfkill_work, 0);
+	schedule_delayed_work_on(0, &dell_rfkill_work, 0);
 	return NOTIFY_OK;
 }
 
