From patchwork Sat Feb 4 17:22:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 52794 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1439118wrn; Sat, 4 Feb 2023 09:24:34 -0800 (PST) X-Google-Smtp-Source: AK7set89pTe+StcWOlr+/gF9nAd+PGEMnScQzybGbRtDeOUjiPPQhLKxQ1O+mTJC5mDWHsXjKyn2 X-Received: by 2002:a17:90b:4a90:b0:230:8afb:7a55 with SMTP id lp16-20020a17090b4a9000b002308afb7a55mr3258030pjb.0.1675531474423; Sat, 04 Feb 2023 09:24:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675531474; cv=none; d=google.com; s=arc-20160816; b=DRz68nYHjzaozVDJV32tF2oKKAH6+tumJjE8H8dU2OAlFErdJI3ZRFfkuVbIcgwQRJ 7zT+buGe+TU3Cf8GJzFeSZA57o8BzT4wNmCOTmLT7ga3DrvWBcCg+UHEN+vZHI5IceZy 4j+BezOa7xRylj+kjNu5277v5m5oLxKJrDfFJ12QvuVEvzsCDFZD242/yiS0PZCi4Y7M /Bi2sn/uOG0Mxf02eVeMrn/yM1MitXVVnKW/RtCqFp1/K0HXqpNC+FwK/8yYXR1EQS0Y peOVitGOc5iRj54B0fUQdZV0z8qPTYmMwvV3tPyJyrW9mdjId0YxAW3x0LlEMyOlnf8Y jgWQ== 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=8OAKmxWIEzbaWOmDMgmo8UdlEP+FyQwFTksNrLzmP30=; b=H27rhzV+KJT3JljP2pD6Y14IsemtXeGLDAx55TwtGsYrxs8WLj9qcGXmFIfWV1JPNF YkivR2d0CJyh1HoDU5PhDffT9iBvkkgSbf5jyCZfxoU3KDgbAc5kaT2aun58bdefLWZW 056drZkY6M+M9FAwVHVMR5knUWCwM1qzc9flhWK9DLOaXAJ6XlqUIAANVKXdpO0rel5o 4U1RUkVmtTt+JEI28Mi9irD3+TeSi/T7xoDNnW8NXWEQQBgWk/0XXtBdXpmYn1dnHjwu s45oJscNFegqQCVL+Q/UXHbckAoCUDpP0Tlqm7AJ+QKYHe9KZfiodSpryShViXkINnFl JEGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=d2l1OHMR; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ms19-20020a17090b235300b00217d892ab40si11724586pjb.29.2023.02.04.09.24.22; Sat, 04 Feb 2023 09:24:34 -0800 (PST) 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=@infradead.org header.s=bombadil.20210309 header.b=d2l1OHMR; 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 S232699AbjBDRWL (ORCPT + 99 others); Sat, 4 Feb 2023 12:22:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59078 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229877AbjBDRWJ (ORCPT ); Sat, 4 Feb 2023 12:22:09 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B88732DE7D for ; Sat, 4 Feb 2023 09:22:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:In-Reply-To:References; bh=8OAKmxWIEzbaWOmDMgmo8UdlEP+FyQwFTksNrLzmP30=; b=d2l1OHMR3M4pCRMdi/vvI2Gstn yjCGH+H5nrhmlUMM5c2mw5g1pk+vhIhM8GXEIQ+A6BTwWjmHMCqeUYii87rnz7KKPTkT1DUiVBzBE bn46r8bmml+5bgK865xdihdfEaDElGiANbAam2VC76DXSbIfv1+ZpIFac6bsnDRUrDB6QZMXbok1F rdZaM1yRMGz7/Ehc4MPsuOZOOE+MGk0EI8YP5GYNYKUbE8FoWjlm/t+2pem1Rkw6/EwfeGPnSPiMw zmoPwW5KYw8EP8ysLNdWDAmfIFsfPl+7TRv5MBp9bwXqIowTnBiejB4G+EkMCGzOHMIJutAdyci1K kPxQHKyw==; Received: from [2601:1c2:d00:6a60::9526] (helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1pOMEp-005RDq-OO; Sat, 04 Feb 2023 17:22:07 +0000 From: Randy Dunlap To: linux-kernel@vger.kernel.org Cc: Randy Dunlap , Sourabh Jain , Michael Ellerman , linuxppc-dev@lists.ozlabs.org Subject: [PATCH] powerpc/kexec_file: fix implicit decl error Date: Sat, 4 Feb 2023 09:22:06 -0800 Message-Id: <20230204172206.7662-1-rdunlap@infradead.org> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756922090864816842?= X-GMAIL-MSGID: =?utf-8?q?1756922090864816842?= kexec (PPC64) code calls memory_hotplug_max(). Add the header declaration for it from . Using does not work since the #include for depends on CONFIG_NUMA=y, which is not set in this kernel config file. Fixes this build error/warning: ../arch/powerpc/kexec/file_load_64.c: In function 'kexec_extra_fdt_size_ppc64': ../arch/powerpc/kexec/file_load_64.c:993:33: error: implicit declaration of function 'memory_hotplug_max' [-Werror=implicit-function-declaration] 993 | usm_entries = ((memory_hotplug_max() / drmem_lmb_size()) + | ^~~~~~~~~~~~~~~~~~ Fixes: fc546faa5595 ("powerpc/kexec_file: Count hot-pluggable memory in FDT estimate") Signed-off-by: Randy Dunlap Cc: Sourabh Jain Cc: Michael Ellerman Cc: linuxppc-dev@lists.ozlabs.org --- arch/powerpc/kexec/file_load_64.c | 1 + 1 file changed, 1 insertion(+) diff -- a/arch/powerpc/kexec/file_load_64.c b/arch/powerpc/kexec/file_load_64.c --- a/arch/powerpc/kexec/file_load_64.c +++ b/arch/powerpc/kexec/file_load_64.c @@ -26,6 +26,7 @@ #include #include #include +#include #include struct umem_info {