Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp5016362rwb; Wed, 17 Aug 2022 09:34:26 -0700 (PDT) X-Google-Smtp-Source: AA6agR5EQFGDrvI+rtkyJzflo0xYcE2MtB2h9dq50SXvXNMM7ImN52yQE+0GO/dG+laLx4xLj0sP X-Received: by 2002:a17:907:7292:b0:733:1965:3176 with SMTP id dt18-20020a170907729200b0073319653176mr16717022ejc.318.1660754065787; Wed, 17 Aug 2022 09:34:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660754065; cv=none; d=google.com; s=arc-20160816; b=iUaSb28mOkFmm+d/E3Cpb9qsxC20nEMsaYlMn/Q3H4CyiA/6hoTWXdsCSzmTVLo8oG xfR+Bb+5/fN0vYf9nm+AcS1mUoAQuSWyQLJ2WvqzouvLwTPvVTiJ6Y6g701lhnx2VCb1 KB4a7G5jvqDBtdXfTt1PxPHdy1J7VULz68qajSbV9t6hk96nHWRzDxcDigOFYemRtolm mFeuy/UwU9sPnn/efQz0IphW2R4OHmJV11Oo3tiTIxn8a/1haNPUVaun09Uq5a+kEDzs JtOU0cmQ7NKvsMBsjJdeJW7ZOcBgUN2WPeqCcInCN8FMjS+eTFia0WEA3SLzDPlTcAiI NBDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=InIADnNunBBBwXEvtAcEDsWavEqvDAnGrhtDavXU3NM=; b=rfuoJNTMXN0FUMHWW3veKsVcWgcDIAYOEN5XUVLLunj6sc1qKpQ93bFf/poc3XJVyE wrYEueAxhDDQ+hPM+u1+r/NeUwLGbpmiRLX3UU/y9wWi+z2nxv3zQDIWDa3c/X+01p68 uytBP83Zn33W8+3E97j8z99UznZGgdQxNAbanQ3wIx1VEb20zNMYnNLhSqmuoGbRomdC L908yIg+DXmM7stcpGeneQhgqk6uAAf3U3ZYnH0UkKFBft0lcxBAUIPQLpRLIaGtp0G9 TZrA8i0GcaDhaU07hiolg33nw+w2udqcdubpQeAilZ/YETTJPrOJD3FqicYWB1gXHr9H YBPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JneOmSwu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v25-20020a170906489900b0072b13fa7314si10307250ejq.439.2022.08.17.09.33.59; Wed, 17 Aug 2022 09:34:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JneOmSwu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240942AbiHQQO1 (ORCPT + 99 others); Wed, 17 Aug 2022 12:14:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59006 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240995AbiHQQN4 (ORCPT ); Wed, 17 Aug 2022 12:13:56 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 01F1CA0317; Wed, 17 Aug 2022 09:13:23 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id F116DB81E35; Wed, 17 Aug 2022 16:13:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C8B8AC433D6; Wed, 17 Aug 2022 16:13:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1660752799; bh=kXQNLS4CwMPiKcaeiXiEF6+1NRLEt3k8IA9vim983Jk=; h=From:To:Cc:Subject:Date:From; b=JneOmSwu4MkndSGmEfBm3JLuf37aATz+WYX+zZsypRYYknRqAJ4SwUBJvm8MkDAZt asHwG4f/EkA3SkrE6HqOooxFTzSZ7XBq+76dkp+GdcLGETSAqGRE9F14gk5IjU0qm1 C6MVy5Bw+GIaSlNoEbg+/INn01IpTXb4gWJcTOBweniK6YkExd1EHIAeqPJY3aw7Ju wu38BHQawUkfJbpggxqxYzgMQzmlXQvChYrPyBqQiSGnzEcBrZJk2j6gg1xfeWiz5y xldRSPkjfV16eSB2gWrLQqi+fHxVkPRv0Q6BH1yU3tdtPsugFqR3/BZuos3bK9I+2J nHlJ4M7fGLOhA== From: guoren@kernel.org To: xianting.tian@linux.alibaba.com, palmer@dabbelt.com, heiko@sntech.de, guoren@kernel.org, conor.dooley@microchip.com Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, liaochang1@huawei.com, mick@ics.forth.gr, jszhang@kernel.org, Guo Ren Subject: [PATCH V2 0/2] riscv: kexec: Fixup crash_save percpu and machine_kexec_mask_interrupts Date: Wed, 17 Aug 2022 12:12:56 -0400 Message-Id: <20220817161258.748836-1-guoren@kernel.org> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Guo Ren Current riscv kexec can't crash_save percpu states and disable interrupts properly. The patch series fix them, make kexec work correct. Changes in v2: - Add Fixes tags - Remove extern from bool smp_crash_stop_failed(void) v1: https://lore.kernel.org/linux-riscv/20220816012701.561435-1-guoren@kernel.org/ Guo Ren (2): riscv: kexec: Disable all interrupts in kexec crash path riscv: kexec: Fixup crash_smp_send_stop with percpu crash_save_cpu arch/riscv/include/asm/smp.h | 6 +++ arch/riscv/kernel/machine_kexec.c | 44 +++++++++++---- arch/riscv/kernel/smp.c | 89 ++++++++++++++++++++++++++++++- 3 files changed, 126 insertions(+), 13 deletions(-) -- 2.36.1