@@ -1004,6 +1004,29 @@ static noinline void __init kernel_init_freeable(void)
do_basic_setup();
+ {
+ spinlock_t main_l;
+ int loops;
+
+ spin_lock_init(&main_l);
+
+ for (loops = 0; loops < 10; loops++) {
+ ktime_t start, end;
+ int i;
+
+ local_irq_disable();
+ start = ktime_get();
+ for (i = 0; i <= 100000; i++) {
+ rt_spin_lock(&main_l);
+ rt_spin_unlock(&main_l);
+ }
+ end = ktime_get();
+ local_irq_enable();
+ pr_err("%s(%d) %lld\n", __func__, __LINE__,
+ ktime_to_us(ktime_sub(end, start)));
+ }
+ }
+
/* 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");