diff mbox

ARM: at91: pm: at91_pm_suspend_in_sram() must be 8-byte aligned

Message ID 1444991945-7946-1-git-send-email-alexandre.belloni@free-electrons.com (mailing list archive)
State New, archived
Headers show

Commit Message

Alexandre Belloni Oct. 16, 2015, 10:39 a.m. UTC
From: Patrick Doyle <pdoyle@irobot.com>

fncpy() requires that the source and the destination are both 8-byte
aligned.

Signed-off-by: Patrick Doyle <pdoyle@irobot.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
 arch/arm/mach-at91/pm_suspend.S | 2 ++
 1 file changed, 2 insertions(+)

Comments

Sylvain Rochet Oct. 16, 2015, 11:22 a.m. UTC | #1
Hi,

On Fri, Oct 16, 2015 at 12:39:05PM +0200, Alexandre Belloni wrote:
> From: Patrick Doyle <pdoyle@irobot.com>
> 
> fncpy() requires that the source and the destination are both 8-byte
> aligned.
> 
> Signed-off-by: Patrick Doyle <pdoyle@irobot.com>
> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>

Additional tags:

Fixes: d94e688cae56 ("ARM: at91/pm: move the copying the sram function to the sram initialization phase")
Cc: <stable@vger.kernel.org> # 4.1+

Sylvain
Nicolas Ferre Oct. 16, 2015, 11:31 a.m. UTC | #2
Le 16/10/2015 13:22, Sylvain Rochet a écrit :
> Hi,
> 
> On Fri, Oct 16, 2015 at 12:39:05PM +0200, Alexandre Belloni wrote:
>> From: Patrick Doyle <pdoyle@irobot.com>
>>
>> fncpy() requires that the source and the destination are both 8-byte
>> aligned.
>>
>> Signed-off-by: Patrick Doyle <pdoyle@irobot.com>
>> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
> 
> Additional tags:
> 
> Fixes: d94e688cae56 ("ARM: at91/pm: move the copying the sram function to the sram initialization phase")
> Cc: <stable@vger.kernel.org> # 4.1+

Absolutely: thanks Sylvain.

Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>

Thank you to Patrick for having found this issue.

Best regards,
diff mbox

Patch

diff --git a/arch/arm/mach-at91/pm_suspend.S b/arch/arm/mach-at91/pm_suspend.S
index 0d95f488b47a..a25defda3d22 100644
--- a/arch/arm/mach-at91/pm_suspend.S
+++ b/arch/arm/mach-at91/pm_suspend.S
@@ -80,6 +80,8 @@  tmp2	.req	r5
  *	@r2: base address of second SDRAM Controller or 0 if not present
  *	@r3: pm information
  */
+/* at91_pm_suspend_in_sram must be 8-byte aligned per the requirements of fncpy() */
+	.align 3
 ENTRY(at91_pm_suspend_in_sram)
 	/* Save registers on stack */
 	stmfd	sp!, {r4 - r12, lr}