msm_shared: Align and round up the scm cmd memory to CACHE_LINE boundary.

CRs-Fixed: 428568

Change-Id: Ic2e5d4c1b3dfda67a8a83c8ac99966328ed5f296
diff --git a/platform/msm_shared/scm.c b/platform/msm_shared/scm.c
index c1682a6..00b48b0 100644
--- a/platform/msm_shared/scm.c
+++ b/platform/msm_shared/scm.c
@@ -1,17 +1,17 @@
-/* Copyright (c) 2011-2012, Code Aurora Forum. All rights reserved.
-
+/* Copyright (c) 2011-2012, The Linux Foundation. All rights reserved.
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
  * met:
- *   * Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *   * Redistributions in binary form must reproduce the above
- *     copyright notice, this list of conditions and the following
- *     disclaimer in the documentation and/or other materials provided
- *     with the distribution.
- *   * Neither the name of Code Aurora Forum, Inc. nor the names of its
- *     contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
+ *     * Redistributions of source code must retain the above copyright
+ *       notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ *       copyright notice, this list of conditions and the following
+ *       disclaimer in the documentation and/or other materials provided
+ *       with the distribution.
+ *     * Neither the name of The Linux Foundation nor the names of its
+ *       contributors may be used to endorse or promote products derived
+ *       from this software without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
@@ -57,7 +57,7 @@
 	size_t len = sizeof(*cmd) + sizeof(struct scm_response) + cmd_size +
 	    resp_size;
 
-	cmd = malloc(len);
+	cmd = memalign(CACHE_LINE, ROUNDUP(len, CACHE_LINE));
 	if (cmd) {
 		cmd->len = len;
 		cmd->buf_offset = offsetof(struct scm_command, buf);