Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S938945AbcJaQ0s (ORCPT ); Mon, 31 Oct 2016 12:26:48 -0400 Received: from quartz.orcorp.ca ([184.70.90.242]:48561 "EHLO quartz.orcorp.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1762227AbcJaQ0o (ORCPT ); Mon, 31 Oct 2016 12:26:44 -0400 Date: Mon, 31 Oct 2016 10:26:31 -0600 From: Jason Gunthorpe To: Russell King - ARM Linux Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] [ARM] Fix stack alignment when processing backtraces Message-ID: <20161031162631.GB28817@obsidianresearch.com> References: <20161018170510.GA12248@obsidianresearch.com> <20161031085126.GT1041@n2100.armlinux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161031085126.GT1041@n2100.armlinux.org.uk> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 773 Lines: 23 On Mon, Oct 31, 2016 at 08:51:26AM +0000, Russell King - ARM Linux wrote: > > -.Ldumpstm: stmfd sp!, {instr, reg, stack, r7, lr} > > + /* Must maintain 8 byte stack alignment */ > > +.Ldumpstm: stmfd sp!, {r3, instr, reg, stack, r7, lr} > > mov stack, r0 > > mov instr, r1 > > mov reg, #10 > > @@ -140,7 +141,7 @@ ENDPROC(c_backtrace) > > teq r7, #0 > > adrne r0, .Lcr > > blne printk > > - ldmfd sp!, {instr, reg, stack, r7, pc} > > + ldmfd sp!, {r3, instr, reg, stack, r7, pc} > > I'd prefer r8 to get used rather than r3, as it makes it look like > r3 is somehow required to be preserved when that's not the case. > Makes the code slightly more difficult to understand. Sure, I will change that and send it to your tracker. Thanks, Jason