Received: by 2002:a05:7412:ba23:b0:fa:4c10:6cad with SMTP id jp35csp1051703rdb; Fri, 19 Jan 2024 06:55:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IEaSa26t3IUyBaylYj1lcaN+BQaM9WRwMvMYQLVIGYzJiTwXW6Hks8RkFE6DByMoSEDfJgT X-Received: by 2002:a17:906:af11:b0:a2d:60c5:f18f with SMTP id lx17-20020a170906af1100b00a2d60c5f18fmr1443915ejb.149.1705676120503; Fri, 19 Jan 2024 06:55:20 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705676120; cv=pass; d=google.com; s=arc-20160816; b=GwAlr9TeF7jqHSGHWs0geDPAL9N9tPPaR7ndz+Xm1T0XIgDpgjDH/JKFJNv1/pZoke YAs7cMoHnXgdq5RRwJSgAjiGphxXwUCIkSDksVKv5qlqZeFpLzkdi6eANsyVoJ0ELm3s 04i/4wdC+3rB7fz6nwbZ8nloXHLEcEWJ0t7dVeBp3vxjIqfsdk2hN4MJVQT/JV6WEfCN Rkz3iG1fkseZI+dusv5ijhYqOhaUXQOC9qrqNwCeTGCW1RxBo/OSVIQ+rivH9ViOaHc7 f5KIQ3j6J2cg0MEpcJahtBTL1Bla/+ew4NXDDmDWCRUHEmvYKHLjvOzqGAMQAo5VzHRK oRsA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=dlnghyw81CpGwF6moUBtvugzcbNEO3VWIFUoR7h2Ajk=; fh=zRw2lYWZmEZ+xk8Dyhrd0rqHIpogjnUXaVblO2ikfrI=; b=CS+ZTmwpoFS9j+qEkm3RQjxTPEa91N2ws6rs1LKoOh72Of9T72a3sZ3C7Vdu0kY8tG ICNw2Ab5omyzQwyHg2/9bXSsfhJ6L051WJz5Ht8ACrkeEtWN4iNOb9+4XJlpYjGSnw7w UoiXw502g1VzYj7jf4jwZqf/OAdGH6pshFaQpk7dSoQFpBV6JHGucccjl039c81ZQ0yr jb1KlCFcP7TTtC3IdFwHbnxk4Rg19MSDOLtP0kRGQ6G3Ifs0lPGvIGmCptw8CEjQsGAs WVT/J0Yb16prYunu8wVFTi8QeFYPP+NJ36A6ikjyvv9GtUWukhwYOtzKd7FcpodoIpSH Ku8Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Cso3wUX2; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-31284-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-31284-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id k15-20020a17090666cf00b00a2a2ad86b09si7845201ejp.157.2024.01.19.06.55.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jan 2024 06:55:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-31284-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Cso3wUX2; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-31284-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-31284-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 4468F1F212B0 for ; Fri, 19 Jan 2024 14:55:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9A0D154BE1; Fri, 19 Jan 2024 14:54:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Cso3wUX2" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8230C53E3F for ; Fri, 19 Jan 2024 14:53:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705676040; cv=none; b=H2kJH5Ot3kQfQS8h/yMCFCwsCTvwSJRanuLGkx9Rdgl3BCF17Q7Z9rxxu+V3mPwFVZNUogrNLfYxtMbqKvscZFqO9czf+1bJpwkyzxVgAeTpHfXeoLK09NbGZ2nK6w0zuUalPLPeJ7JtHIDzLiwMtKWHp3Vz0ZY6+lfjBlSAcEo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705676040; c=relaxed/simple; bh=rpUH0q7+qhjgM4ADyrT0mqsrvcjN/GEMuVc7I8p0QC0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-type; b=K4SxkCZy8zWbDhcRjBZbNThjphRV3r6NocEXOkgM1IIAQzeEf5fIeAcXlXGatc/E3Vj8KZVL1u0Sm5j3A+fW9RqhTZcXj397+DTgx1WeFyb5e5TmjyiAVlqVZCqPrvCKNnG9RojBV+ck3JbS+94E8Vo53a7go+wjR17gpAPnODM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=Cso3wUX2; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1705676038; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dlnghyw81CpGwF6moUBtvugzcbNEO3VWIFUoR7h2Ajk=; b=Cso3wUX2rHwbv0hNS33zwhuIwy/kDrWE8WQ0a2Ycc7+LGRo2KtF704cSiDCGjlAKg+0hVA vOEGgWX3ARg6e2v/eBkA9H+EtEArYu66EHc7JL4k3BFLBRzIspb3Ce8rFAZJ02VumOLiWA EErHZDezTYoMogVyaDNISk9y4N/mRIs= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-586-pami_hTRMLW5sk65b-Os0Q-1; Fri, 19 Jan 2024 09:53:55 -0500 X-MC-Unique: pami_hTRMLW5sk65b-Os0Q-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B550480007C; Fri, 19 Jan 2024 14:53:54 +0000 (UTC) Received: from MiWiFi-R3L-srv.redhat.com (unknown [10.72.116.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 674B951D5; Fri, 19 Jan 2024 14:53:47 +0000 (UTC) From: Baoquan He To: linux-kernel@vger.kernel.org Cc: kexec@lists.infradead.org, x86@kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, linux-mips@vger.kernel.org, linux-riscv@lists.infradead.org, loongarch@lists.linux.dev, akpm@linux-foundation.org, ebiederm@xmission.com, hbathini@linux.ibm.com, piliu@redhat.com, viro@zeniv.linux.org.uk, Baoquan He Subject: [PATCH v2 08/14] ppc, crash: enforce KEXEC and KEXEC_FILE to select CRASH_DUMP Date: Fri, 19 Jan 2024 22:52:35 +0800 Message-ID: <20240119145241.769622-9-bhe@redhat.com> In-Reply-To: <20240119145241.769622-1-bhe@redhat.com> References: <20240119145241.769622-1-bhe@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-type: text/plain Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.5 In PowerPC, the crash dumping and kexec reboot share code in arch_kexec_locate_mem_hole(), in which struct crash_mem is used. Here enfoce enforce KEXEC and KEXEC_FILE to select CRASH_DUMP for now. Signed-off-by: Baoquan He --- arch/powerpc/Kconfig | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 1cdb8fdd3735..fc3cd7f4bb73 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -608,6 +608,10 @@ config PPC64_SUPPORTS_MEMORY_FAILURE config ARCH_SUPPORTS_KEXEC def_bool PPC_BOOK3S || PPC_E500 || (44x && !SMP) +config ARCH_SELECTS_KEXEC + def_bool y + select CRASH_DUMP + config ARCH_SUPPORTS_KEXEC_FILE def_bool PPC64 @@ -618,6 +622,7 @@ config ARCH_SELECTS_KEXEC_FILE def_bool y depends on KEXEC_FILE select KEXEC_ELF + select CRASH_DUMP select HAVE_IMA_KEXEC if IMA config PPC64_BIG_ENDIAN_ELF_ABI_V2 -- 2.41.0