Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp31093051rwd; Thu, 6 Jul 2023 15:51:49 -0700 (PDT) X-Google-Smtp-Source: APBJJlGLVg1MNj2zs71Lzd3qcoo88JkJIOSS1trMEDtqBPLd9ZzCwgI41M0e7GpDhqTwg1cZj/dM X-Received: by 2002:a05:6a00:2e9a:b0:674:6dd4:8337 with SMTP id fd26-20020a056a002e9a00b006746dd48337mr3984353pfb.12.1688683909580; Thu, 06 Jul 2023 15:51:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688683909; cv=none; d=google.com; s=arc-20160816; b=wi0kVOrBwfita1wlvOOPe/272+/Ft8ThZ8WSaifCMf7w2JCWdoKflqQARmCT9y6MRa utF5WktPc0mYErFjIl6JT9DBv5jW6zRV6vv9K52bEBUoeLL/G5CLw022SNLzcTVvEMcY Yev3Bv3G3gqQWTwQ1zhvpx9be5SFUFqBkgeca7td3gE9LSL2ePCyBRb8/Fp7ynHLrvid PuKTnLFjdXehAtf3WsLoPSjDp6ysZRE66NYpy+b/TM+B3CaZE7XmS9AYIxLhoiMhcqmQ x8mNvq0aGYapbDUdfNf1QyR2T1zvfiFPL+t7SeIoydHeU6YSXea2KQz064/3pT1AnTlq dLAg== 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:to:from:cc:in-reply-to:subject:date:dkim-signature; bh=x0I9jMQ+vOGGYxfcUxVDPVdkj3AkI/uMxWS/xRQpRdI=; fh=tjQd8dk2MsRYCY1dNEiKssA7zHQKwnr4c8VZ+MTQx6k=; b=LquRUylbuGheiBVeepmrixHG08mbzPrZLN5BBxy/J5CtkTtrSq0T47c/hcmi6XtsxD 9DiGlRDpEe0cxPB/sJ/sebSn/H07O54jaKftdjghKXG/j//eGuYDYfz1rtZ0xBZPfb6k g/+zHfQiGa3d7MlleY37RYBMc1i1x0eyczuvyzXlmPHsqqrmhZhD5HUfKsQ1MK3agDJC DdurmyMWtbUxsqmobxxaVgMKtIAiXnxzvR4/rsl3auQ03OQ6/h6phdOun/Y6khVXbRXn QE05R+QXcKGzXeW2Mum9TbW0OgerzTrbkDkt0Ik+7NegIdjaI4t0Z/reuIyYVd9WKEPY d6zQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dabbelt-com.20221208.gappssmtp.com header.s=20221208 header.b=JNsFpKff; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a8-20020a631a08000000b0055b1a2f6d2bsi2314855pga.76.2023.07.06.15.51.35; Thu, 06 Jul 2023 15:51:49 -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=@dabbelt-com.20221208.gappssmtp.com header.s=20221208 header.b=JNsFpKff; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229552AbjGFWcp (ORCPT + 99 others); Thu, 6 Jul 2023 18:32:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51048 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229879AbjGFWcn (ORCPT ); Thu, 6 Jul 2023 18:32:43 -0400 Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6214F1723 for ; Thu, 6 Jul 2023 15:32:41 -0700 (PDT) Received: by mail-pj1-x1035.google.com with SMTP id 98e67ed59e1d1-2640a8ceefdso918127a91.3 for ; Thu, 06 Jul 2023 15:32:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dabbelt-com.20221208.gappssmtp.com; s=20221208; t=1688682761; x=1691274761; h=content-transfer-encoding:mime-version:message-id:to:from:cc :in-reply-to:subject:date:from:to:cc:subject:date:message-id :reply-to; bh=x0I9jMQ+vOGGYxfcUxVDPVdkj3AkI/uMxWS/xRQpRdI=; b=JNsFpKffPwcMV5c6xXSLYavf5b5+EGJksAxRUQKoNvWLjgtnQc1hNtwYLg6+EX34qZ +vVBTlPPDiVRrcvywH8v7OhdyFYFpiuXYP81AoOqv/Q40DHzh/Ccqmrg7Yc6sEtR2z+M hosh01784Q/g87EjyuLRu+nFDjKBvWWfiE3Z3aV1Pp7c6VD6gcmJ3gJwWPrvPel8XXY1 Mk96wPh70sWOFBN6Eh73gYCVuF/zgktmGmWRCK+TM+s4gsulN1RbLYfNTnGC9WtGzl80 XO9r8KdThZ1ESa6xuR5HIEUZbWlwcfKMobMVNTGH1GmfbSZcY4YSfELIS/B9INadWhi+ HLHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688682761; x=1691274761; h=content-transfer-encoding:mime-version:message-id:to:from:cc :in-reply-to:subject:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=x0I9jMQ+vOGGYxfcUxVDPVdkj3AkI/uMxWS/xRQpRdI=; b=JpaxSqDU5LRHQdUEavqlwQfvh9OAfpPXmDMgfXaZ2LQmNtDSvFRhIEK6rUrvJuqShi SO58RvTGrf+PhjvZLPtIkrTPjaQA+gwePStmCMmtM5pe5+s9DXUk3w9mrRJni5jMjhtm UT9H0tRTvLZAe6Z6G8wJn/TA5bo2PPfLtB0X0+e2dSMIxkZ/LH9WvGdA6P8uHxoaLbDL m7KARvFljkSAYFBhKT7zwJuUzFqEBtG4fs3UB9Le92rKUr4AaX66KhCD+rBhrd6+K/ZQ v8xaMXGreVA6W/01vhwLDUA4S3EOFKeAnv73mPA35vCaaKV4ePt/AjWigeWbE3TX+XDW 9GwA== X-Gm-Message-State: ABy/qLZTWeNv+yET45ajoe6EfkXarJ3eySK6ZE6TVYfthL6JBC1TrJnH hnolwo2OClYQJEoiyVoaemzAuw== X-Received: by 2002:a17:90b:23c7:b0:263:7d57:16e9 with SMTP id md7-20020a17090b23c700b002637d5716e9mr3210557pjb.21.1688682760697; Thu, 06 Jul 2023 15:32:40 -0700 (PDT) Received: from localhost ([50.221.140.188]) by smtp.gmail.com with ESMTPSA id m8-20020a17090a34c800b00263fd82106asm282941pjf.35.2023.07.06.15.32.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jul 2023 15:32:39 -0700 (PDT) Date: Thu, 06 Jul 2023 15:32:39 -0700 (PDT) X-Google-Original-Date: Thu, 06 Jul 2023 15:31:47 PDT (-0700) Subject: Re: [PATCH v5 11/13] riscv/kexec: refactor for kernel/Kconfig.kexec In-Reply-To: <20230706222027.189117-12-eric.devolder@oracle.com> CC: linux@armlinux.org.uk, Catalin Marinas , Will Deacon , chenhuacai@kernel.org, geert@linux-m68k.org, tsbogend@alpha.franken.de, James.Bottomley@HansenPartnership.com, deller@gmx.de, ysato@users.sourceforge.jp, dalias@libc.org, glaubitz@physik.fu-berlin.de, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-ia64@vger.kernel.org, loongarch@lists.linux.dev, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, kernel@xen0n.name, mpe@ellerman.id.au, npiggin@gmail.com, christophe.leroy@csgroup.eu, Paul Walmsley , aou@eecs.berkeley.edu, hca@linux.ibm.com, gor@linux.ibm.com, agordeev@linux.ibm.com, borntraeger@linux.ibm.com, svens@linux.ibm.com, hpa@zytor.com, keescook@chromium.org, paulmck@kernel.org, peterz@infradead.org, frederic@kernel.org, akpm@linux-foundation.org, Ard Biesheuvel , samitolvanen@google.com, juerg.haefliger@canonical.com, Arnd Bergmann , rmk+kernel@armlinux.org.uk, linus.walleij@linaro.org, sebastian.reichel@collabora.com, rppt@kernel.org, kirill.shutemov@linux.intel.com, anshuman.khandual@arm.com, ziy@nvidia.com, masahiroy@kernel.org, ndesaulniers@google.com, mhiramat@kernel.org, ojeda@kernel.org, thunder.leizhen@huawei.com, xin3.li@intel.com, tj@kernel.org, Greg KH , tsi@tuyoix.net, bhe@redhat.com, hbathini@linux.ibm.com, sourabhjain@linux.ibm.com, eric.devolder@oracle.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com From: Palmer Dabbelt To: eric.devolder@oracle.com Message-ID: Mime-Version: 1.0 (MHng) Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 On Thu, 06 Jul 2023 15:20:25 PDT (-0700), eric.devolder@oracle.com wrote: > The kexec and crash kernel options are provided in the common > kernel/Kconfig.kexec. Utilize the common options and provide > the ARCH_SUPPORTS_ and ARCH_SELECTS_ entries to recreate the > equivalent set of KEXEC and CRASH options. > > Signed-off-by: Eric DeVolder > --- > arch/riscv/Kconfig | 44 +++++++++++++------------------------------- > 1 file changed, 13 insertions(+), 31 deletions(-) > > diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig > index b49793cf34eb..8a3af850597a 100644 > --- a/arch/riscv/Kconfig > +++ b/arch/riscv/Kconfig > @@ -647,48 +647,30 @@ config RISCV_BOOT_SPINWAIT > > If unsure what to do here, say N. > > -config KEXEC > - bool "Kexec system call" > - depends on MMU > +config ARCH_SUPPORTS_KEXEC > + def_bool MMU > + > +config ARCH_SELECTS_KEXEC > + def_bool y > + depends on KEXEC > select HOTPLUG_CPU if SMP > - select KEXEC_CORE > - help > - kexec is a system call that implements the ability to shutdown your > - current kernel, and to start another kernel. It is like a reboot > - but it is independent of the system firmware. And like a reboot > - you can start any kernel with it, not just Linux. > > - The name comes from the similarity to the exec system call. > +config ARCH_SUPPORTS_KEXEC_FILE > + def_bool 64BIT && MMU > > -config KEXEC_FILE > - bool "kexec file based systmem call" > - depends on 64BIT && MMU > +config ARCH_SELECTS_KEXEC_FILE > + def_bool y > + depends on KEXEC_FILE > select HAVE_IMA_KEXEC if IMA > - select KEXEC_CORE > select KEXEC_ELF > - help > - This is new version of kexec system call. This system call is > - file based and takes file descriptors as system call argument > - for kernel and initramfs as opposed to list of segments as > - accepted by previous system call. > - > - If you don't know what to do here, say Y. > > config ARCH_HAS_KEXEC_PURGATORY > def_bool KEXEC_FILE > depends on CRYPTO=y > depends on CRYPTO_SHA256=y > > -config CRASH_DUMP > - bool "Build kdump crash kernel" > - help > - Generate crash dump after being started by kexec. This should > - be normally only set in special crash dump kernels which are > - loaded in the main kernel with kexec-tools into a specially > - reserved region and then later executed after a crash by > - kdump/kexec. > - > - For more details see Documentation/admin-guide/kdump/kdump.rst > +config ARCH_SUPPORTS_CRASH_DUMP > + def_bool y > > config COMPAT > bool "Kernel support for 32-bit U-mode" Acked-by: Palmer Dabbelt