From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,URIBL_BLOCKED,USER_AGENT_NEOMUTT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DF999C43387 for ; Wed, 19 Dec 2018 17:02:52 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2E0B1214C6 for ; Wed, 19 Dec 2018 17:02:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=linaro.org header.i=@linaro.org header.b="TdUJ7NxQ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2E0B1214C6 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 43Kh62200pzDqN1 for ; Thu, 20 Dec 2018 04:02:50 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="TdUJ7NxQ"; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=linaro.org (client-ip=2a00:1450:4864:20::343; helo=mail-wm1-x343.google.com; envelope-from=daniel.thompson@linaro.org; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="TdUJ7NxQ"; dkim-atps=neutral Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 43Kgzm4hhdzDqs8 for ; Thu, 20 Dec 2018 03:57:24 +1100 (AEDT) Received: by mail-wm1-x343.google.com with SMTP id m1so6787436wml.2 for ; Wed, 19 Dec 2018 08:57:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=y+bPgt6SnPDP0a4iYjPYGvwAQx/u+oM+zOzt+Sj62ZI=; b=TdUJ7NxQU18/CR8M37OgvTsSJnNBt8JiTVfWx+XFGuv2kFDhUzRIOLKtLp4+yD6Xwc 2oydFOVxuY8MA1x43P7gMgXV6dwt/SxlX1uV1mzJkUoeplJFbAFqywD2cAOKH88ZjAho 1vQW45WF0HsRCqVNO1Pc7MeteQj97v+P4f78I= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=y+bPgt6SnPDP0a4iYjPYGvwAQx/u+oM+zOzt+Sj62ZI=; b=btEX7GdD7qdMF6OnZOcer8Lw3tEW6F6rl1K9CziMDTSVOfnMgDaBBtnceA1TgWgc6O mwgZrOK6PmRbPJBWRWWnFqM9UOhp1XKr1SKwIUkjDswCif/AQLYiILvK6bzDKDKHDUez jSIV3yjLh2b20J+HB0irIY1gCc+SM2maJDGRfQQFcBptVq+8YommRfJOFFxrdQeOkvW0 A7sOp+TeLmQYFfmmJrX43xzB4XKbHY4Hbw6xasvCoTjD4Y0uw5436vhqSum2Wsgzok8U Lrjhoc914ChywN+kxcBVkT4Qht3HB4gxlRlODuL7mTwW+NfaUNMm+FDooJGf3Ong29gG edgQ== X-Gm-Message-State: AA+aEWbtIFMx1qwme8oZjj1+hVc7LdjMVknFBlVnHw1z/3tMJebF///i coQO36kLNkjCCJUnhaUTxJbCAw== X-Google-Smtp-Source: AFSGD/Weig2beB3bbklgteert1ntuMy9qPH6WUTndGEM3nzDLBKHSvnwFBVV8vJQtAjgE/o+rTWxSQ== X-Received: by 2002:a1c:8089:: with SMTP id b131mr8035753wmd.141.1545238641603; Wed, 19 Dec 2018 08:57:21 -0800 (PST) Received: from holly.lan (cpc141214-aztw34-2-0-cust773.18-1.cable.virginm.net. [86.9.19.6]) by smtp.gmail.com with ESMTPSA id a17sm6236218wrs.58.2018.12.19.08.57.19 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 19 Dec 2018 08:57:20 -0800 (PST) Date: Wed, 19 Dec 2018 16:57:18 +0000 From: Daniel Thompson To: Christophe Leroy Subject: Re: [PATCH v2 1/2] mips/kgdb: prepare arch_kgdb_ops for constness Message-ID: <20181219165718.tf5ly7yg5es7bvum@holly.lan> References: <030d63848e4b0ef4d76ca24597ab8302a393d692.1544083483.git.christophe.leroy@c-s.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <030d63848e4b0ef4d76ca24597ab8302a393d692.1544083483.git.christophe.leroy@c-s.fr> User-Agent: NeoMutt/20180716 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rich Felker , "Gustavo A. R. Silva" , Will Deacon , linux-kernel@vger.kernel.org, Paul Mackerras , sparclinux@vger.kernel.org, linux-hexagon@vger.kernel.org, Yoshinori Sato , linux-sh@vger.kernel.org, x86@kernel.org, Russell King , Ingo Molnar , Catalin Marinas , James Hogan , linux-snps-arc@lists.infradead.org, uclinux-h8-devel@lists.sourceforge.jp, linux-mips@vger.kernel.org, Borislav Petkov , nios2-dev@lists.rocketboards.org, Thomas Gleixner , linux-arm-kernel@lists.infradead.org, Michal Simek , Vineet Gupta , Randy Dunlap , Douglas Anderson , Ralf Baechle , Richard Kuo , Paul Burton , Jason Wessel , kgdb-bugreport@lists.sourceforge.net, Ley Foon Tan , linuxppc-dev@lists.ozlabs.org, "David S. Miller" Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Thu, Dec 06, 2018 at 08:07:38PM +0000, Christophe Leroy wrote: > MIPS is the only architecture modifying arch_kgdb_ops during init. > This patch makes the init static, so that it can be changed to > const in following patch, as recommended by checkpatch.pl > > Suggested-by: Paul Burton > Acked-by: Daniel Thompson > Acked-by: Paul Burton > Signed-off-by: Christophe Leroy Applied! Thanks. > - > --- > v2: Added acks from Daniel and Paul. > > arch/mips/kernel/kgdb.c | 16 +++++++--------- > 1 file changed, 7 insertions(+), 9 deletions(-) > > diff --git a/arch/mips/kernel/kgdb.c b/arch/mips/kernel/kgdb.c > index eb6c0d582626..31eff1bec577 100644 > --- a/arch/mips/kernel/kgdb.c > +++ b/arch/mips/kernel/kgdb.c > @@ -394,18 +394,16 @@ int kgdb_arch_handle_exception(int vector, int signo, int err_code, > return -1; > } > > -struct kgdb_arch arch_kgdb_ops; > +struct kgdb_arch arch_kgdb_ops = { > +#ifdef CONFIG_CPU_BIG_ENDIAN > + .gdb_bpt_instr = { spec_op << 2, 0x00, 0x00, break_op }, > +#else > + .gdb_bpt_instr = { break_op, 0x00, 0x00, spec_op << 2 }, > +#endif > +}; > > int kgdb_arch_init(void) > { > - union mips_instruction insn = { > - .r_format = { > - .opcode = spec_op, > - .func = break_op, > - } > - }; > - memcpy(arch_kgdb_ops.gdb_bpt_instr, insn.byte, BREAK_INSTR_SIZE); > - > register_die_notifier(&kgdb_notifier); > > return 0; > -- > 2.13.3 >