From patchwork Wed Mar 27 13:17:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: qiaochong X-Patchwork-Id: 10873485 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9F18A1708 for ; Wed, 27 Mar 2019 13:23:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8A0A228657 for ; Wed, 27 Mar 2019 13:23:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7CB7B28BB9; Wed, 27 Mar 2019 13:23:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B2A9928657 for ; Wed, 27 Mar 2019 13:23:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728656AbfC0NXi (ORCPT ); Wed, 27 Mar 2019 09:23:38 -0400 Received: from mail.loongson.cn ([114.242.206.163]:43668 "EHLO mail.loongson.cn" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726319AbfC0NXi (ORCPT ); Wed, 27 Mar 2019 09:23:38 -0400 X-Greylist: delayed 331 seconds by postgrey-1.27 at vger.kernel.org; Wed, 27 Mar 2019 09:23:28 EDT Received: from localhost.localdomain (unknown [10.50.122.29]) by mail (Coremail) with SMTP id QMiowPDxv7_Yd5tcKiK0AA--.15128S2; Wed, 27 Mar 2019 21:17:20 +0800 (CST) From: qiaochong To: Ralf Baechle , Paul Burton , James Hogan , Daniel Thompson , Douglas Anderson , Will Deacon , Christophe Leroy Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, QiaoChong Subject: [PATCH] MIPS: KGDB: fix kgdb support for SMP platforms. Date: Wed, 27 Mar 2019 21:17:11 +0800 Message-Id: <20190327131711.7484-1-qiaochong@loongson.cn> X-Mailer: git-send-email 2.17.0 X-CM-TRANSID: QMiowPDxv7_Yd5tcKiK0AA--.15128S2 X-Coremail-Antispam: 1UD129KBjvdXoW7GF4rXF1UZrWrXFW7tw15CFg_yoW3uFcEkr yI93WkCr4rAwnI9F1UWrWrCF1ay390gFykursFkFWSy34Yyr15Xay8ta4Durn3JrsYvw4f u3s8WrZ8AwnFyjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUb-AFF20E14v26r4j6ryUM7CY07I20VC2zVCF04k26cxKx2IYs7xG 6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48ve4kI8w A2z4x0Y4vE2Ix0cI8IcVAFwI0_Jr0_JF4l84ACjcxK6xIIjxv20xvEc7CjxVAFwI0_Gr0_ Cr1l84ACjcxK6I8E87Iv67AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVCY1x0267AKxVWxJr 0_GcWle2I262IYc4CY6c8Ij28IcVAaY2xG8wAqx4xG64xvF2IEw4CE5I8CrVC2j2WlYx0E 2Ix0cI8IcVAFwI0_JrI_JrylYx0Ex4A2jsIE14v26r1j6r4UMcvjeVCFs4IE7xkEbVWUJV W8JwACjcxG0xvY0x0EwIxGrwACjcxG0xvY0x0EwIxGrVCF72vEw4AK0wACjI8F5VA0II8E 6IAqYI8I648v4I1lFIxGxcIEc7CjxVA2Y2ka0xkIwI1l42xK82IYc2Ij64vIr41l4I8I3I 0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s026x8GjcxK67AKxVWU GVWUWwC2zVAF1VAY17CE14v26r1q6r43MIIYrxkI7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI 0_Jr0_JF4lIxAIcVC0I7IYx2IY6xkF7I0E14v26r1j6r4UMIIF0xvE42xK8VAvwI8IcIk0 rVWrZr1j6s0DMIIF0xvEx4A2jsIE14v26r1j6r4UMIIF0xvEx4A2jsIEc7CjxVAFwI0_Gr 0_Gr1UYxBIdaVFxhVjvjDU0xZFpf9x0JUBCJQUUUUU= X-CM-SenderInfo: 5tld0upkrqwqxorr0wxvrqhubq/ Sender: linux-mips-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP KGDB_call_nmi_hook is called by other cpu through smp call. MIPS smp call is processed in ipi irq handler and regs is saved in handle_int. So kgdb_call_nmi_hook get regs by get_irq_regs and regs will be passed to kgdb_cpu_enter. Signed-off-by: qiaochong Reviewed-by: Douglas Anderson --- arch/mips/kernel/kgdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/mips/kernel/kgdb.c b/arch/mips/kernel/kgdb.c index 6e574c02e4c3b..6c438a0fd2075 100644 --- a/arch/mips/kernel/kgdb.c +++ b/arch/mips/kernel/kgdb.c @@ -214,7 +214,7 @@ void kgdb_call_nmi_hook(void *ignored) old_fs = get_fs(); set_fs(KERNEL_DS); - kgdb_nmicallback(raw_smp_processor_id(), NULL); + kgdb_nmicallback(raw_smp_processor_id(), get_irq_regs()); set_fs(old_fs); }