Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp11143441imu; Thu, 6 Dec 2018 12:16:27 -0800 (PST) X-Google-Smtp-Source: AFSGD/WVQpQYYObUYWDvspRXLXmgOnsACpX8BQ55pAa/PrQXbIcVpPsUkJx4wdrz4/gT7QrEKgeB X-Received: by 2002:a63:c503:: with SMTP id f3mr24584369pgd.431.1544127387459; Thu, 06 Dec 2018 12:16:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544127387; cv=none; d=google.com; s=arc-20160816; b=C7tigjeC0H8k6BeLmuHGgAmYvPJT6wleLGdKNSuSXApNNcwOQ+KyiNZyS/XQcvDZs7 shq3jxFzxIhHwrwyY4kAyKEFGqufey1xUMwtbWmMF8osgqbro/zxrKectF/qsYiBLIWw BsArPx1zxNEkxs3Ls/4zqiWfgwImUiKWpP2Vm//gzUwulzKjixcKUmuGpRcNkjpzyxrq 2T4KREWZyRisRUdA/o+bx3z8/v840ZvyBS+lueB/qk0dpEOGTPim6U4A6zICoum1oyt+ 6qWQMw9s25oqPdEx9bQSmN4dZKLh4RFh8phPYxITFXMNasv+p5QjtY0H3sVIU3bEeVDw b6Xg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=IVNFeS7jw2JVKWnHPS3atIHGHHo2w3F8gejntyH1bg4=; b=fa2IU7P0e6Am0QqAv68m3ogyya5jHM0AIa/hzkpktW21N/1EJAMtH3+nea/5n4cWX2 zX+GVHjHvT9vXJFVFi3+uZclizeRABhVsXtyQl7y2+GoZf4P3qwBfwikQlmsqAX01dI6 qvbJFk1oDKFOoXJOk+L4YlaGA9/kjF3yatlSY1gPeKuzpsyNQG09TJHc5zlpxBRtkq3J jx68xYM4tkxNkVkuBcb2MC1gu8OPPxTgCBD1DCKbtuhANzS1T7smI3jxCj3tdBpjuDcD i66k3IKxJABFSE6JTKSctZliG94ITajRT+XARRZd6aBwK+1L+VQPc7n3cOp/3d7KsrQK 7jsw== 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 u4si971221pls.34.2018.12.06.12.16.12; Thu, 06 Dec 2018 12:16:27 -0800 (PST) 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 S1726013AbeLFUOM (ORCPT + 99 others); Thu, 6 Dec 2018 15:14:12 -0500 Received: from pegase1.c-s.fr ([93.17.236.30]:23795 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725927AbeLFUOM (ORCPT ); Thu, 6 Dec 2018 15:14:12 -0500 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 439myn3XkTz9tyh6; Thu, 6 Dec 2018 21:14:09 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id ihVLVx7cdeCk; Thu, 6 Dec 2018 21:14:09 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 439myn28CBz9tyh5; Thu, 6 Dec 2018 21:14:09 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 5BFF68B89D; Thu, 6 Dec 2018 21:14:09 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id qQSpKWnuL71A; Thu, 6 Dec 2018 21:14:09 +0100 (CET) Received: from [192.168.232.3] (unknown [192.168.232.3]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 7622D8B88E; Thu, 6 Dec 2018 21:14:05 +0100 (CET) Subject: Re: [PATCH 1/2] mips/kgdb: prepare arch_kgdb_ops for constness To: Daniel Thompson Cc: Vineet Gupta , Russell King , Catalin Marinas , Will Deacon , Yoshinori Sato , Richard Kuo , Michal Simek , Ralf Baechle , Paul Burton , James Hogan , Ley Foon Tan , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Rich Felker , "David S. Miller" , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, Jason Wessel , Douglas Anderson , Randy Dunlap , "Gustavo A. R. Silva" , linux-snps-arc@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, uclinux-h8-devel@lists.sourceforge.jp, linux-hexagon@vger.kernel.org, linux-mips@vger.kernel.org, nios2-dev@lists.rocketboards.org, linuxppc-dev@lists.ozlabs.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, kgdb-bugreport@lists.sourceforge.net References: <75bbcdd1e9277d66ebb06e349dda304bd01ce761.1543957194.git.christophe.leroy@c-s.fr> <20181206140902.ea6jlwqrbcwyxp5r@holly.lan> From: Christophe LEROY Message-ID: <77351ea7-e153-d293-1016-2dd45cf96fee@c-s.fr> Date: Thu, 6 Dec 2018 21:14:04 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.3.2 MIME-Version: 1.0 In-Reply-To: <20181206140902.ea6jlwqrbcwyxp5r@holly.lan> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: fr Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 06/12/2018 à 15:09, Daniel Thompson a écrit : > On Wed, Dec 05, 2018 at 04:41:09AM +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 >> Signed-off-by: Christophe Leroy > > From my side this is > Acked-by: Daniel Thompson > > Since this is a dependency for the next patch I'd be happy to take via > my tree... but would need an ack from the MIPS guys to do that. Got an ack from MIPS: Acked-by: Paul Burton Included in commit text v2 Christophe > > > Daniel. > >> --- >> 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 >>