@@ -1001,6 +1001,21 @@ static int __ref kernel_init(void *unused)
"See Linux Documentation/admin-guide/init.rst for guidance.");
}
+static void delay_thingy_func(struct work_struct *x)
+{
+ preempt_disable();
+ local_bh_disable();
+ pr_err("one %s\n", current->comm);
+ raise_softirq(TASKLET_SOFTIRQ);
+ pr_err("two %s\n", current->comm);
+ local_bh_enable();
+ pr_err("three %s\n", current->comm);
+ preempt_enable();
+ pr_err("four %s\n", current->comm);
+}
+
+static DECLARE_DELAYED_WORK(delay_thingy, delay_thingy_func);
+
static noinline void __init kernel_init_freeable(void)
{
/*
@@ -1038,6 +1053,7 @@ static noinline void __init kernel_init_freeable(void)
do_basic_setup();
+ schedule_delayed_work(&delay_thingy, HZ * 5);
/* Open the /dev/console on the rootfs, this should never fail */
if (sys_open((const char __user *) "/dev/console", O_RDWR, 0) < 0)
pr_err("Warning: unable to open an initial console.\n");
@@ -500,6 +500,7 @@ static __latent_entropy void tasklet_action(struct softirq_action *a)
{
struct tasklet_struct *list;
+ pr_err("%s() %s\n", __func__, current->comm);
local_irq_disable();
list = __this_cpu_read(tasklet_vec.head);
__this_cpu_write(tasklet_vec.head, NULL);