From patchwork Fri Jan 19 14:52:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baoquan He X-Patchwork-Id: 189588 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2bc4:b0:101:a8e8:374 with SMTP id hx4csp1059751dyb; Fri, 19 Jan 2024 06:55:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IHfqSmueuifSu11xdXsHjvLbhVrt4qaC5JQxMYG20/dhuLvzTYLQTqqIEyV76TAsLKZTD8L X-Received: by 2002:a81:5483:0:b0:5ff:6514:d0d0 with SMTP id i125-20020a815483000000b005ff6514d0d0mr2363991ywb.102.1705676155576; Fri, 19 Jan 2024 06:55:55 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705676155; cv=pass; d=google.com; s=arc-20160816; b=TeyCSkVCOA1G79be7T/j2xAAO3hSS/6q8b1MnDFhgg0Bg2UU2G/SSyR+IYjRLaTNeh wDo60nY5sOJtRvSOewg62lES+J1IJnT8l4XaVLkDZLrCDyuivW/OUYPCbjkM+0TiTeaw 7admOSRQnTjS3bJcBbpZzIi2WTjLhTLLQHVIbzgcDLC7nCXwUhCTcIqKxcvTSvoQTALc /Qmwf227AmLDV2Y7XJpfvJYQz6Sg5EJBJMnj4hJfaRsPy5UocleRAoiWl9T1d9pcUoQ7 IiL3kEx5Ze5dxS/sesP2RCIeTt5hUNow6kQEH+tidnC3q/e+A0lk1VPklegNO/cGmwuG Eb/w== 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-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-31284-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id w13-20020a05622a190d00b00429be6b6a64si16911432qtc.580.2024.01.19.06.55.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jan 2024 06:55:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-31284-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; 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-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-31284-ouuuleilei=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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 143211C213D9 for ; Fri, 19 Jan 2024 14:55:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 713F055C39; Fri, 19 Jan 2024 14:54:03 +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 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.5 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788531080633253175 X-GMAIL-MSGID: 1788531080633253175 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