[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CAKohpo=6RGy1vVZ58N6yH-sfUFPs3afZLj88MtuarYCFJ=Y0PQ@mail.gmail.com>
Date: Mon, 7 Apr 2014 17:28:46 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Lists linaro-kernel <linaro-kernel@...ts.linaro.org>,
Frédéric Weisbecker <fweisbec@...il.com>,
Linaro Networking <linaro-networking@...aro.org>
Subject: [Query] tick-oneshot: Why do we need to disable interrupts for
reading tick_cpu_device.mode
Hi Thomas,
I found this piece of code in tick-oneshot.c:
+int tick_oneshot_mode_active(void)
+{
+ unsigned long flags;
+ int ret;
+
+ local_irq_save(flags);
+ ret = __get_cpu_var(tick_cpu_device).mode == TICKDEV_MODE_ONESHOT;
+ local_irq_restore(flags);
+
+ return ret;
+}
Why do we need local_irq_save/restore() here for just reading value
of this variable? Can these be dropped? If yes, I would do that as
part of my cleanup series around tick stuff.
--
viresh
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists