Here we are trying to reduce power usage through the
use of macros cpu_relaxed_read_short and cpu_relaxed_read.
Bug
1440421
Change-Id: I114d122cf58b1cf7b93b4b5f5d712360a2f1e096
Signed-off-by: Sumit Singh <sumsingh@nvidia.com>
Reviewed-on: http://git-master/r/425947
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Sri Krishna Chowdary <schowdary@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alexander Van Brunt <avanbrunt@nvidia.com>
* Generic helpers for smp ipi calls
*
* (C) Jens Axboe <jens.axboe@oracle.com> 2008
+ * Copyright (c) 2014, NVIDIA CORPORATION. All rights reserved.
*/
#include <linux/rcupdate.h>
#include <linux/rculist.h>
#include <linux/gfp.h>
#include <linux/smp.h>
#include <linux/cpu.h>
+#include <asm/relaxed.h>
#include "smpboot.h"
*/
static void csd_lock_wait(struct call_single_data *csd)
{
- while (csd->flags & CSD_FLAG_LOCK)
- cpu_relax();
+ while (cpu_relaxed_read_short(&csd->flags) & CSD_FLAG_LOCK)
+ cpu_read_relax();
}
static void csd_lock(struct call_single_data *csd)