msm: hotplug/platsmp: Fix cpu invaldation pointer arithmetic
These functions take two void pointers indicating where to start
and end the invalidation and cache flush. The pointer arithmetic
is considering the pen_release pointer as an int pointer so
adding sizeof(pen_release) is adding 16 bytes to the pointer and
specifying that as the end. This inadvertently invalidates data
next to the pen_release variable which could be bad. Fix the
pointer math to only invalidate or clean the region for the
pen_release variable.
Change-Id: If0cf0e5de7c9f4b8c70662b29957a1f347809124
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
diff --git a/arch/arm/mach-msm/platsmp.c b/arch/arm/mach-msm/platsmp.c
index a11ca95..2749098 100644
--- a/arch/arm/mach-msm/platsmp.c
+++ b/arch/arm/mach-msm/platsmp.c
@@ -205,8 +205,8 @@
if (pen_release == -1)
break;
- dmac_inv_range((void *)&pen_release,
- (void *)(&pen_release+sizeof(pen_release)));
+ dmac_inv_range((char *)&pen_release,
+ (char *)&pen_release + sizeof(pen_release));
udelay(10);
}