Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp5492559img; Wed, 27 Mar 2019 09:27:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqzvlNhqrT5YYnGEyBuucYpS34Z/NCQ4pz5S4N6/lOlpJylECwRVN+anQqdE/aihQEBh/yzn X-Received: by 2002:a63:3fc3:: with SMTP id m186mr2976721pga.151.1553704050890; Wed, 27 Mar 2019 09:27:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553704050; cv=none; d=google.com; s=arc-20160816; b=PqoL6L93t/Zyv26sGZ9dRnsh/HEcnvl1eEOI91NOB82Sc3Lu9WrBcq7NYdxMqMMU02 wtaLoAoa2TP2ozDR1d3mlWEExRzME8rr11IxD0UQwnZfZkZ7JrSXssHjwWW4RpkisLUk lDLiGcv+WAJlC9b6hUquIh34vlVoupGMR3bauOynAWvoFWHMgxMgkArDsCcIBGIQW6h6 YsHWMbg2W5fASW1UTi9q9DXOAOJ7OSPbuBpD1rnePCu86rqnj6i1tvmXSZcZ3ICpVIZ/ YVXYcfNaVnyI9vCBd+VWC083EZuhMSpqNWfpeBXHhRMWgA9HThQwbh/ws0ZiXNlL0CdD pkUQ== 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:dkim-signature; bh=bpwWCz5S/eK94PUEocrnBlFeInwqE4hvKSz6SqcHPTU=; b=L/MWdDCcHSjvTL/7lsXU+gfstMF9Y4dYONl4fvX7j7SdI1fivmrEX5NdjXlSjdsF9j gcusf41UcTefTrS65fIilLu40V+miOPYutFCN1Wbac156G4A2eiKYOMm7bQrrQmsufZY js/mtVTD/pozQNNPmDiWLfFYqT/EXHRYWIzZpJg2pLoiSI12evNGY+w4mLKR1cV6pC3t ljbJao7vQEogVtzjnS3qVNXJz593uIpeSKeo0NIixLD7U3V/TX+e9m9S12oqZ1a6UEXm 3ghza4ReZxBFuR52edkOFJTLgsv9QQ40GemBeLbN5dcFtGD6ELw1SQLyNmB/+XobIAWf 7YoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=jPVIDhFf; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p10si18911883pgl.186.2019.03.27.09.27.14; Wed, 27 Mar 2019 09:27:30 -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; dkim=pass header.i=@chromium.org header.s=google header.b=jPVIDhFf; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727574AbfC0QZV (ORCPT + 99 others); Wed, 27 Mar 2019 12:25:21 -0400 Received: from mail-vs1-f68.google.com ([209.85.217.68]:46273 "EHLO mail-vs1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726803AbfC0QZU (ORCPT ); Wed, 27 Mar 2019 12:25:20 -0400 Received: by mail-vs1-f68.google.com with SMTP id w26so9224370vsk.13 for ; Wed, 27 Mar 2019 09:25:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=bpwWCz5S/eK94PUEocrnBlFeInwqE4hvKSz6SqcHPTU=; b=jPVIDhFfP2g6/5fmXwhEwnSwot4rKvqCaI7dbjWFTe7jbIQqNNj5nrPv+HU65dqRi1 nn//Su5xweQCbmWsFuroQZfZQ/R+tl2F9DT/yiEf+kOx5x1DErgY8HPltR0p33jOUert rimjjVQmY6brzxOcVq3wXjTT7PMDlesEpHl8k= 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=bpwWCz5S/eK94PUEocrnBlFeInwqE4hvKSz6SqcHPTU=; b=N7Xdm+N/M6GKZxmdkUttpl8+QH99BtCQGpcDoiC3QPXGVQI7vJUXyyIrgNQZ5PbBsb x8TWuh/EYpYSo9bybnoPGALxuipp2yTMbrpsjKRloNMkYQbJ+6VNSJHGpeaG/EQd6b14 ad6XUUwxQd+OI9mzTYpZNNQNbQVp6dmK2OHH2bzQrh0QQiy80idK0O5VR08UVof4qxMe 0NOhjKDGSYzoYvro65QOW7Xl4ZhyDV2o5TAOyO1yyLmpFo9vRcYe3B+3EBgi/ZULaBkT KbmDdVq649/3fu3SXcLD8ZFYQV8tB8UOrSfEUSkVj7jD/RFx7rPJEOhgZqiiFJ85kslN jQaA== X-Gm-Message-State: APjAAAX+rCt2H2MP840V9Mt3pJUeu1qDsNgp90VBWED5KMchH8Kk1iry who1NoFHAFRF8jrpBUNmcnGJWYZ5Oig= X-Received: by 2002:a67:1c82:: with SMTP id c124mr23776137vsc.229.1553703919209; Wed, 27 Mar 2019 09:25:19 -0700 (PDT) Received: from mail-vs1-f46.google.com (mail-vs1-f46.google.com. [209.85.217.46]) by smtp.gmail.com with ESMTPSA id 190sm17366020vsz.0.2019.03.27.09.25.18 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 27 Mar 2019 09:25:18 -0700 (PDT) Received: by mail-vs1-f46.google.com with SMTP id f15so10278062vsk.9 for ; Wed, 27 Mar 2019 09:25:18 -0700 (PDT) X-Received: by 2002:a67:c812:: with SMTP id u18mr5947372vsk.87.1553703917672; Wed, 27 Mar 2019 09:25:17 -0700 (PDT) MIME-Version: 1.0 References: <20190327150551.12851-1-qiaochong@loongson.cn> In-Reply-To: <20190327150551.12851-1-qiaochong@loongson.cn> From: Doug Anderson Date: Wed, 27 Mar 2019 09:25:06 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] MIPS: KGDB: fix kgdb support for SMP platforms. To: qiaochong Cc: Ralf Baechle , Paul Burton , James Hogan , Daniel Thompson , Will Deacon , Christophe Leroy , linux-mips@vger.kernel.org, LKML 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 Hi, On Wed, Mar 27, 2019 at 8:06 AM qiaochong wrote: > > 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 Note that you might want to adjust your git settings. Usually in the kernel they require that a Signed-off-by have your real name, not just your username. You probably need to spin your patch to fix this. You should make sure that the authorship of the patch also has your real name. > --- > arch/mips/kernel/kgdb.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/arch/mips/kernel/kgdb.c b/arch/mips/kernel/kgdb.c > index 6e574c02e4c3b..ea781b29f7f17 100644 > --- a/arch/mips/kernel/kgdb.c > +++ b/arch/mips/kernel/kgdb.c > @@ -33,6 +33,7 @@ > #include > #include > #include > +#include > > static struct hard_trap_info { > unsigned char tt; /* Trap type code for MIPS R3xxx and R4xxx */ > @@ -214,7 +215,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); > } As per my reply on V1, feel free to add: Reviewed-by: Douglas Anderson