From mboxrd@z Thu Jan 1 00:00:00 1970 From: Guo Ren Subject: Re: [PATCH V9 15/21] csky: Debug and Ptrace GDB Date: Thu, 18 Oct 2018 11:17:33 +0800 Message-ID: <20181018031733.GB15088@guoren-Inspiron-7460> References: <1963c845cf9b7aa31547cdfe1f82b1add1ad2504.1539655732.git.ren_guo@c-sky.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: Arnd Bergmann Cc: Andrew Morton , Daniel Lezcano , David Miller , gregkh , Christoph Hellwig , Marc Zyngier , Mark Rutland , Peter Zijlstra , Rob Herring , Thomas Gleixner , Linux Kernel Mailing List , linux-arch , DTML , Rob Herring , c-sky_gcc_upstream@c-sky.com List-Id: devicetree@vger.kernel.org On Wed, Oct 17, 2018 at 05:46:56PM +0200, Arnd Bergmann wrote: > On Tue, Oct 16, 2018 at 5:06 AM Guo Ren wrote: > > > > This patch adds arch ptrace implementation, stack dump and bug.h. > > > > Signed-off-by: Guo Ren > > Cc: Arnd Bergmann > > Reviewed-by: Arnd Bergmann > > > diff --git a/arch/csky/include/asm/bug.h b/arch/csky/include/asm/bug.h > > new file mode 100644 > > index 0000000..bd7b323 > > --- /dev/null > > +++ b/arch/csky/include/asm/bug.h > > @@ -0,0 +1,26 @@ > > +/* SPDX-License-Identifier: GPL-2.0 */ > > +// Copyright (C) 2018 Hangzhou C-SKY Microsystems co.,ltd. > > + > > +#ifndef __ASM_CSKY_BUG_H > > +#define __ASM_CSKY_BUG_H > > + > > +#include > > +#include > > +#include > > + > > +#define BUG() \ > > +do { \ > > + asm volatile ("bkpt\n"); \ > > + unreachable(); \ > > +} while (0) > > Since you have a breakpoint instruction, a nice addition might > be to use that for implementing WARN_ON as well, whenever you > get around to doing that. It's certainly not required for the initial > merge. Thx for remind and I'll improve it next. Best Regards Guo Ren