Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp326282img; Thu, 28 Mar 2019 00:07:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqx4HIclXDmNPS3KDOumcStQT4OWIv7ziidaYSEU3v+aiv/KzNpvkIBp0uG4LFnGAvU7i9v2 X-Received: by 2002:aa7:8ac8:: with SMTP id b8mr38392704pfd.87.1553756859155; Thu, 28 Mar 2019 00:07:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553756859; cv=none; d=google.com; s=arc-20160816; b=vXy+rO4t7dXemZzu1pG8b/UapV0W6HQSfhDhE+T6YvG6R5DGtWm4KxSdAN6rc46lpG W2xkVm+Z3OzxXzpoYvQVr2W1yJkQEgg7MNTma5oMC+AJIXdYX6WOccEoo6ur4KPuHQ5f iZ6LrFqGtYvJLh7JJVqdWubQ9PawgXX1uQ4txcF2UazbcWjPWwjO74xGri0ALjPCd9gD L641iX20vA6CpJW2bIe/RDf6SFUc09q07pwyqyW14S1AhypfVaRKSpi5chlNCDZZ2aSy zriYW6pwi8WetTDHhY7ZNq8TMA27AKlC/WEwBzgu9JI3iDbGJYi551RaET98kABJkxPs gTvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=T22U+apjEJp8KKN8ohy9LC/OplKJEtOVR/cRDLcUg9Y=; b=UJSFfSeONuSCxDU8+j3ww1+s3H+KHGLCoVabclMXW6xXFCv66e91+Z6QmCsU72RzZf 9AF0BTlnc6zNjosZV9AdvHNwSObeHKbaRqEjMc6Ks9KlgUKfxj9OEYFV3GsFxkv7wrPi vKw8eOrhn9H6EeG2ArXsxZEFTCy6ZohkgyCQToYGMC5SOrT0CYizM4yhbc6I35hbrkVB uhK2W+hrctc4HSn2QSVBKnHSi2a2l92z/pXhaNfaPsMsG/XC+zegjTi9XOprJr+4vuxT JA5GJtEiDq5FnzqfxhEto7bH9Yf26EseiiQ7Z4Zr9Ebr2IOxFmWBVnC4ZRqjc5QJ1KUL jXBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oAavkeGX; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 9si21933701plc.121.2019.03.28.00.07.23; Thu, 28 Mar 2019 00:07:39 -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=@linaro.org header.s=google header.b=oAavkeGX; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726140AbfC1HGf (ORCPT + 99 others); Thu, 28 Mar 2019 03:06:35 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:37058 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725846AbfC1HGf (ORCPT ); Thu, 28 Mar 2019 03:06:35 -0400 Received: by mail-wr1-f65.google.com with SMTP id w10so21427925wrm.4 for ; Thu, 28 Mar 2019 00:06:34 -0700 (PDT) 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=T22U+apjEJp8KKN8ohy9LC/OplKJEtOVR/cRDLcUg9Y=; b=oAavkeGXVQAcI0nq1Z6LUurNIAN/67TwbDieDah+uE/ms7uYJxlgnRoKS7Orf03RbC P62Qf0EoaZAqWMvrMEVAsCZb4JXpTZ6VZaVZjIN9/ebacuVQXVI41b4GfdhUWlkxKcRp Z8KRD76oXAo7ivMoS9g7SgR0Q5ccr5jqF6Aqe0ImWx3o9ZKGpLAHADbbzmPAdKD0+PDj byssobBBGfcZyluyKskCUc4kXVDVSj+bA46XQzmaAGj23mPKiBWzjkjO7aX0hLopo1zM rV1Gbxkcfh9mb/053fXlm4R8mV8FgBzhBSSfpFA7p8K9dTC+nV9GP7s/8G8Unrq9s9cW imkA== 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=T22U+apjEJp8KKN8ohy9LC/OplKJEtOVR/cRDLcUg9Y=; b=RaIFarnkPOym4Nz7s9Q7Dnegdk0zJtYJptgAy3jEIQQ4SpKzgkF+C4M8B6z5Z10zoA pAB00v+uKXRcsO+IC6Mz7biIBaYeGnbdnEz0IUn4spgtN6VeOX1uiDsJtzn6kVuvuKVl OL7hGop/zh4xr1pkKs7vf5myGRetqu4R7rxYMD7XxVHN6vER67YNQgjC+TBpWy6XAMcF rVIPJxFDs+UA+vWuuwfz/TamRbRhX7ybvuNBOn4ukQLtVEyJPMPYpwGcmhFIefTHnXjQ FB80adDKCigcHyRlpUmlbdKFndlCNcn51M+UbjuFMQg2Jv8U1Sk7/azMOltouD8gUN5l YnGg== X-Gm-Message-State: APjAAAWu23EIesSHg7oG2w5TfM2ST0iRiJ1un9B6Z7T61x1eOpH7S+F8 PZ0xuoGmNmfkuLRts5T97Uj/iQ== X-Received: by 2002:adf:ebc8:: with SMTP id v8mr25905058wrn.172.1553756793843; Thu, 28 Mar 2019 00:06:33 -0700 (PDT) Received: from holly.lan ([185.201.60.219]) by smtp.gmail.com with ESMTPSA id c20sm31217097wre.28.2019.03.28.00.06.32 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 28 Mar 2019 00:06:33 -0700 (PDT) Date: Thu, 28 Mar 2019 07:06:29 +0000 From: Daniel Thompson To: Chong Qiao Cc: Ralf Baechle , Paul Burton , James Hogan , Douglas Anderson , Will Deacon , Christophe Leroy , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] MIPS: KGDB: fix kgdb support for SMP platforms. Message-ID: <20190328070629.uw4ybmecz47h7uje@holly.lan> References: <20190327230801.3650-1-qiaochong@loongson.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190327230801.3650-1-qiaochong@loongson.cn> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 28, 2019 at 07:08:01AM +0800, Chong Qiao 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: Chong Qiao Acked-by: Daniel Thompson > --- > 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); > } > -- > 2.17.0 > >