From patchwork Fri Jan 15 19:29:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 12023927 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AA447C433E0 for ; Fri, 15 Jan 2021 19:30:17 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5352323A9C for ; Fri, 15 Jan 2021 19:30:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5352323A9C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=xen.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.68577.122745 (Exim 4.92) (envelope-from ) id 1l0UnO-0004lg-0C; Fri, 15 Jan 2021 19:30:06 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 68577.122745; Fri, 15 Jan 2021 19:30:05 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1l0UnN-0004lA-SZ; Fri, 15 Jan 2021 19:30:05 +0000 Received: by outflank-mailman (input) for mailman id 68577; Fri, 15 Jan 2021 19:30:05 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1l0UnM-0004cK-Tw for xen-devel@lists.xenproject.org; Fri, 15 Jan 2021 19:30:05 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1l0UnM-0002re-Dz; Fri, 15 Jan 2021 19:30:04 +0000 Received: from 54-240-197-235.amazon.com ([54.240.197.235] helo=ufe34d9ed68d054.ant.amazon.com) by xenbits.xenproject.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l0UnM-0007hU-1b; Fri, 15 Jan 2021 19:30:04 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Content-Transfer-Encoding:Content-Type:MIME-Version: Message-Id:Date:Subject:Cc:To:From; bh=iIEwED8NVg3+0QRXW1D5BpGCsMVZAFmTGQJ6WbMy8W8=; b=5sqojSb7VK/XPlgZAmUih0v5yU +J5P2JzyBIy8JDG/vetGptU1+pKeW1Sg14/NhUoVgZH3sWkF9D9IqyR8siOGn58uZi2a7MiU0YFF5 spBj9PpjUkjqGI1NkLakzr5ufTbxTgp6wtQ7R+/c7nrWMGOj80Zh6yoESWW8K1rUD6Ns=; From: Julien Grall To: xen-devel@lists.xenproject.org Cc: andrew.cooper3@citrix.com, Julien Grall , Konrad Rzeszutek Wilk , Ross Lagerwall , Stefano Stabellini , Julien Grall , Volodymyr Babchuk Subject: [PATCH] xen/arm: livepatch: Include xen/mm.h rather than asm/mm.h Date: Fri, 15 Jan 2021 19:29:47 +0000 Message-Id: <20210115192947.6499-1-julien@xen.org> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 From: Julien Grall Livepatch fails to build on Arm after commit ced9795c6cb4 "mm: split out mfn_t / gfn_t / pfn_t definitions and helpers": In file included from livepatch.c:13:0: /oss/xen/xen/include/asm/mm.h:32:28: error: field ‘list’ has incomplete type struct page_list_entry list; ^~~~ /oss/xen/xen/include/asm/mm.h:53:43: error: ‘MAX_ORDER’ undeclared here (not in a function); did you mean ‘PFN_ORDER’? unsigned long first_dirty:MAX_ORDER + 1; ^~~~~~~~~ PFN_ORDER /oss/xen/xen/include/asm/mm.h:53:31: error: bit-field ‘first_dirty’ width not an integer constant unsigned long first_dirty:MAX_ORDER + 1; ^~~~~~~~~~~ This is happening because asm/mm.h is included directly by livepatch.c. Yet it depends on xen/mm.h to be included first so MAX_ORDER is defined. Resolve the build failure by including xen/mm.h rather than asm/mm.h. Fixes: ced9795c6cb4 ("mm: split out mfn_t / gfn_t / pfn_t definitions and helpers") Signed-off-by: Julien Grall Reviewed-by: Konrad Rzeszutek Wilk Acked-by: Stefano Stabellini --- xen/arch/arm/livepatch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/arm/livepatch.c b/xen/arch/arm/livepatch.c index 915e9d926a11..75e8adcfd6a1 100644 --- a/xen/arch/arm/livepatch.c +++ b/xen/arch/arm/livepatch.c @@ -6,11 +6,11 @@ #include #include #include +#include #include #include #include -#include /* Override macros from asm/page.h to make them work with mfn_t */ #undef virt_to_mfn