Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp819229imm; Wed, 17 Oct 2018 08:47:53 -0700 (PDT) X-Google-Smtp-Source: ACcGV61fQrG5pIUtp4tWKgupIJiv7v8w2YM0ShSl6Oo9YakSSLGVPEzbfSCj4dpFYkdybmLvcRsE X-Received: by 2002:a63:d00b:: with SMTP id z11-v6mr25314256pgf.317.1539791273719; Wed, 17 Oct 2018 08:47:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539791273; cv=none; d=google.com; s=arc-20160816; b=ayRyS8UAnuU7JV5k0qRIOUSOF+iKKfR+wYMZqUahAOV2tKmTQZmCwIjLKJ7F7KnK1a nidDqWW1cM6n2bGWCFJ2Lvkdcv6ccbtzRtx6s5Rqk/YBAQ6OusrTkorOLxioOQKF3A/u KPTnd8aQLwXYR26FfTWCtVFxO1aCAd9A8Fkyq2pYul5Gz5pMV6MKpM25ogjDbqrrAI8G UY/fnpQ6QpEKhYIcS/bhq36yvzknyTPxT6Oip5/rNlBfVoCuCEkgtsT4JofEims6UptB 9SdZVNA4+RcKvgEuKxqc6M2SBmnJ6EclckM7Reihc5AOsJENSd0O8iYSe96x9no1uSI5 2LPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=PbjCxbmSa3ybDatEzCyRbifNXOZuCL6No/RZA0ROCoo=; b=GgMud5GH2dnWHoASlMx1/ovvy6Y3hu3tNH0BG5nx5WYbQ0wqase8h1PCzvDGzzSasA rRLqvvg+PyI7U2PILgzmJI/nexTlKljUvAkkLUHCVhpU8MVnLKR3VjYIqCLRZKPHgdAA 0Qa5L9JiRqDy4yZMxVZ5eu6F3gsa2XKI3wK2V4q+1T+eYZoBNfpJdkuhrWu44NAXXWYw n4Zyu1sSNt39wp73XMl0/+fm0xkAixcgq68yXzrUZzUdBPNf+K4oB2Xa3qOaCFBtMgwG EmbYiq0WthC7Okj3lJetCkSV6yKgpjackqLiovIJAvhmnuRr1rIo7j/gfHwKHK+pWqZC Q1mw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k6-v6si17543196pls.174.2018.10.17.08.47.37; Wed, 17 Oct 2018 08:47:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727474AbeJQXnb (ORCPT + 99 others); Wed, 17 Oct 2018 19:43:31 -0400 Received: from mail-qk1-f196.google.com ([209.85.222.196]:39137 "EHLO mail-qk1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727271AbeJQXna (ORCPT ); Wed, 17 Oct 2018 19:43:30 -0400 Received: by mail-qk1-f196.google.com with SMTP id q5-v6so16770419qki.6; Wed, 17 Oct 2018 08:47:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=PbjCxbmSa3ybDatEzCyRbifNXOZuCL6No/RZA0ROCoo=; b=WOq63fnMeQlCI3xaCMq+6WYK5xYStRnaUlLbqNIKZ53Cv+bUTSU7SqH3X7t4ubfXGd +baD0kVCFIranZbddGG/M2il2s3Du8IVa8LAJLhhStypSSP7pqzyYZOZjn3WjOPkiC95 l5svK5s8oLwTV4IyDEeqVGBeE3WAAWxAa862PzwE0vNpNj5dPvqTJI8hj18+dtxgvGXh FWBcmYVzBDyXBwpXVlHPiE+vtTanLISgkkgpdRus7xpSchBxuSre9w+9Hco9Zm1PQirh NJLcps7IwA9EXtb3kDxR2dwhTFFBDEqB+KQoXifoD4AQhZ4U5aKUk+SQtJF/YknI/LPP oRvg== X-Gm-Message-State: ABuFfohWybXDlPV5y6dA+XNH+Lp9FSnFxuaukbF3OpFag2gYWCIZ3Iaz wj8VeOwnlhpfEehZX8coLjm26LHOJuAept2VIQQ= X-Received: by 2002:a37:2b66:: with SMTP id r99-v6mr2955403qkh.343.1539791232565; Wed, 17 Oct 2018 08:47:12 -0700 (PDT) MIME-Version: 1.0 References: <1963c845cf9b7aa31547cdfe1f82b1add1ad2504.1539655732.git.ren_guo@c-sky.com> In-Reply-To: <1963c845cf9b7aa31547cdfe1f82b1add1ad2504.1539655732.git.ren_guo@c-sky.com> From: Arnd Bergmann Date: Wed, 17 Oct 2018 17:46:56 +0200 Message-ID: Subject: Re: [PATCH V9 15/21] csky: Debug and Ptrace GDB To: Guo Ren 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 Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.