#include <linux/cdev.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
+#include <linux/sched.h>
MODULE_LICENSE("GPL");
static ssize_t hello_read(struct file *fp, char __user *buf, size_t sz,
loff_t *pos)
{
- int i = 1 << 28;
- spin_lock(&hello_lock);
+ int i = 1 << 20;
while (i--)
- cpu_relax();
- spin_unlock(&hello_lock);
+ udelay(10);
return 0;
}