From nobody Tue Apr 30 03:23:41 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1625148633; cv=none; d=zohomail.com; s=zohoarc; b=PTEVpkeBJDTyMiM7SavOOiVShjqGvhVHTiBK347ghCSgS0yCEEH/Rcev4ck1sXu+M8IHMVPpZh+HXASu8gwMnKh2IFMTeAx+2hzEtcPR1+g1JdAwBfWIKZT6vmruthnkMnVbdcXbG0QZvrXVHlUgvkVopa3SFhpL2OFhockBBjQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1625148633; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=/rN7USN33c5cgvbgV9KYmxz6ZGk04LCwqfojQWG15Js=; b=Qt31J74sw4pMZiuJjzzIAMSE7C8fLAcHcjNtaK0btgMZ596hLCAJoN0Wl+LKW9GB7w1XMD5Jnos4mUVx3GX1Gxdq+6h4VUhReyN2K9WOY46cCO50yXdgqVduN8eVEprkFM42fk+yV2ajuvj24KWhGKo+iNtUK4HLYGvT5zPbIU0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1625148633973759.9722741835294; Thu, 1 Jul 2021 07:10:33 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.148703.274807 (Exim 4.92) (envelope-from ) id 1lyxOY-0005MA-PT; Thu, 01 Jul 2021 14:10:22 +0000 Received: by outflank-mailman (output) from mailman id 148703.274807; Thu, 01 Jul 2021 14:10:22 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lyxOY-0005Lz-KM; Thu, 01 Jul 2021 14:10:22 +0000 Received: by outflank-mailman (input) for mailman id 148703; Thu, 01 Jul 2021 14:10:21 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lyxOX-0005KT-06 for xen-devel@lists.xenproject.org; Thu, 01 Jul 2021 14:10:21 +0000 Received: from esa5.hc3370-68.iphmx.com (unknown [216.71.155.168]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id f6d7bec2-fc7c-4841-b48a-662147126978; Thu, 01 Jul 2021 14:10:20 +0000 (UTC) X-Outflank-Mailman: Message body and most headers restored to incoming version 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" X-Inumbo-ID: f6d7bec2-fc7c-4841-b48a-662147126978 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1625148620; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=M6ZtiyzeBF8+xl4b4ReAdiPAiV8nv9ZrRcrwPVwToLw=; b=djwyYSDoGnR6L0cB6cL3Ot8ERH+w5cv68Z4FwVCd36NJVLcFClINhzuj zw6WaNMO9NO0nzDNbPLpTlthkz1ta+Fy6uAAX9IXK/2PZT6Saf67I0jeA /BOKHCb2EN1m+fehpijz0S9wCzU9J7AGB4mfS+kjedfnmxEcggBICTner Q=; Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: JX4PJpMfXqJB1Jhc9vF/KyT0TFFbWgzenewcihWWkjultgZsxthgoZfN8cTFCjsO6R1XQjOUNI YqP1GKUk8RP6E8GblNXfOkRA0t1D8Qdyuu5BnyqdGQP+1wNcu8dN3PnDHQfNESfq/JMyBSswqB qATb211dJjZxLrrxHwX4kr/u9OclwZPqzLTjpedJSmsAjtFyycNPsSF4CgXNupgYFKaUOOf6ts xRZIWI0yfrkFsxbo9jZRibB7KrQ4mMbTh9UiOzbf9OkVD9CWYVkyTPajS7w1bPzGUJ1m12YX8G BMQ= X-SBRS: 5.1 X-MesageID: 47093296 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:Txlc0KOGQSvGR8BcTvmjsMiBIKoaSvp037Eqv3oedfUzSL3/qy nOpoVi6faaslYssR0b9exofZPwJE80lqQFhrX5X43SPzUO0VHAROoJgLcKgQeQfxEWntQtrJ uIGJIeNDSfNzdHZL7BkWuFL+o= X-IronPort-AV: E=Sophos;i="5.83,314,1616472000"; d="scan'208";a="47093296" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Ian Jackson" , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu Subject: [XEN PATCH v6 01/31] build: fix %.s: %.S rule Date: Thu, 1 Jul 2021 15:09:41 +0100 Message-ID: <20210701141011.785641-2-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210701141011.785641-1-anthony.perard@citrix.com> References: <20210701141011.785641-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) Content-Type: text/plain; charset="utf-8" Fixes: e321576f4047 ("xen/build: start using if_changed") Signed-off-by: Anthony PERARD Reviewed-by: Jan Beulich --- Notes: v6: - new patch xen/Rules.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/Rules.mk b/xen/Rules.mk index ceb3d204b84f..d65d6a48993b 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -227,8 +227,8 @@ cmd_cpp_i_c =3D $(CPP) $(filter-out -Wa$(comma)%,$(c_fl= ags)) -MQ $@ -o $@ $< quiet_cmd_cc_s_c =3D CC $@ cmd_cc_s_c =3D $(CC) $(filter-out -Wa$(comma)%,$(c_flags)) -S $< -o $@ =20 -quiet_cmd_s_S =3D CPP $@ -cmd_s_S =3D $(CPP) $(filter-out -Wa$(comma)%,$(a_flags)) -MQ $@ -o $@ $< +quiet_cmd_cpp_s_S =3D CPP $@ +cmd_cpp_s_S =3D $(CPP) $(filter-out -Wa$(comma)%,$(a_flags)) -MQ $@ -o $@ = $< =20 %.i: %.c FORCE $(call if_changed,cpp_i_c) --=20 Anthony PERARD From nobody Tue Apr 30 03:23:41 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1625148641; cv=none; d=zohomail.com; s=zohoarc; b=MTaup7BTDQwnN4WdIbrCFnycUAvTB6btWvGrhO1ZImbuYgqgDrUHO44TmLSvS31Cet7ZSqtM3SIjGvFhIpwAsQlPp9rB2mQrqn+TMX7qCOVeSylCK7kHLUykp2B3w/ede6Uib+f9Rtu99C+LIs8sObk66fJkcGEocSWyEkh/SUg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1625148641; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=mM0UxFWSP9nF1l7EFtEltL6n0lWKTRjKGy93VVS37o4=; b=aUacfiQbxGCjnrUZUwlfkpbQ85Qf2b8FLYKTEkfaQHXOhD3/SyTjGw3xgGM60xqhJKBZHtZ6Z8IIhTyZHq+I7VXfgB5o2IoIwXqPWCWSGocYKI0RJj4d/VIde7dnKlPZFvjr+YFdaH44rCC1FLEBsS40yi2gbkwtE3ZtgAoINUE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 16251486408911.7490608971291977; Thu, 1 Jul 2021 07:10:40 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.148705.274818 (Exim 4.92) (envelope-from ) id 1lyxOe-0005gD-1Q; Thu, 01 Jul 2021 14:10:28 +0000 Received: by outflank-mailman (output) from mailman id 148705.274818; Thu, 01 Jul 2021 14:10:28 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lyxOd-0005g4-T0; Thu, 01 Jul 2021 14:10:27 +0000 Received: by outflank-mailman (input) for mailman id 148705; Thu, 01 Jul 2021 14:10:27 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lyxOd-0005F9-Ie for xen-devel@lists.xenproject.org; Thu, 01 Jul 2021 14:10:27 +0000 Received: from esa2.hc3370-68.iphmx.com (unknown [216.71.145.153]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 115b20d1-da76-11eb-8327-12813bfff9fa; Thu, 01 Jul 2021 14:10:21 +0000 (UTC) X-Outflank-Mailman: Message body and most headers restored to incoming version 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" X-Inumbo-ID: 115b20d1-da76-11eb-8327-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1625148621; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=8wF1OZRVMN+i4dPl8jzrjodmwU9+O8uvhRvJWa7YhLU=; b=Gz3SFPxQKsGE1TkVWplAILoectsooQsY0ULsu7CldwrHwWfZW8V8qwQi c7PNBI5LYPj4YyWObbQ53qgXqG70Bn9ZIcH+6TcHfaMVroBSDz7gNlRHx VApIUhdwcmks6RoAt7I0Bar0J0pblA0EP6cYaI7Mu6LJfFQSYOPLtbe4u A=; Authentication-Results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: GfoBV98qFKEsx0+8+X25twMo7xYrQOCMiSGiXjJZB00zgSiOH6Lux/lC1O6UFX7cFaijWpt7+Y 6YGank19UXg9Vy2SnUXE/ovuzUQzsCjw+Tp7a+CG+0IPS3imfW82NlbM0UNPi1PZaLzbtq6cL1 XIn4nznTdeF4Urw+kOU4ii9xCz8WKrP9ajKMKRcj5wIDAx4Cv66KR/r6S4zVwIxIQ3zkxgrAtV /+vhiM9a03xW0Sggftt9t1CqRmL2S65JsVekG59dibwnpuVw1Jq3ke7lyH+tt1agKyfLzHYrKp y8k= X-SBRS: 5.1 X-MesageID: 47376076 X-Ironport-Server: esa2.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:hmFiDqAkgXNXX0vlHemq55DYdb4zR+YMi2TC1yhKJiC9Ffbo8P xG/c5rrCMc5wxxZJhNo7290ey7MBHhHP1OkO0s1NWZPDUO0VHAROoJ0WKh+UyEJ8SXzJ866U 4KScZD4bPLYWSS9fyKgzWFLw== X-IronPort-AV: E=Sophos;i="5.83,314,1616472000"; d="scan'208";a="47376076" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Ian Jackson" , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Tim Deegan Subject: [XEN PATCH v6 02/31] build: introduce cpp_flags macro Date: Thu, 1 Jul 2021 15:09:42 +0100 Message-ID: <20210701141011.785641-3-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210701141011.785641-1-anthony.perard@citrix.com> References: <20210701141011.785641-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Anthony PERARD --- Notes: v6: - switch to a macro as suggested which allows to be used with both a_flags and c_flags =20 v5: - new patch xen/Rules.mk | 7 +++++-- xen/arch/x86/mm/Makefile | 2 +- xen/arch/x86/mm/hap/Makefile | 2 +- xen/arch/x86/mm/shadow/Makefile | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/xen/Rules.mk b/xen/Rules.mk index d65d6a48993b..f778058f80a6 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -133,6 +133,9 @@ endif # Always build obj-bin files as binary even if they come from C source.=20 $(obj-bin-y): XEN_CFLAGS :=3D $(filter-out -flto,$(XEN_CFLAGS)) =20 +# To be use with $(a_flags) or $(c_flags) to produce CPP flags +cpp_flags =3D $(filter-out -Wa$(comma)%,$(1)) + # Calculation of flags, first the generic flags, then the arch specific fl= ags, # and last the flags modified for a target or a directory. =20 @@ -222,13 +225,13 @@ $(filter %.init.o,$(obj-y) $(obj-bin-y) $(extra-y)): = %.init.o: %.o FORCE $(call if_changed,obj_init_o) =20 quiet_cmd_cpp_i_c =3D CPP $@ -cmd_cpp_i_c =3D $(CPP) $(filter-out -Wa$(comma)%,$(c_flags)) -MQ $@ -o $@ = $< +cmd_cpp_i_c =3D $(CPP) $(call cpp_flags,$(c_flags)) -MQ $@ -o $@ $< =20 quiet_cmd_cc_s_c =3D CC $@ cmd_cc_s_c =3D $(CC) $(filter-out -Wa$(comma)%,$(c_flags)) -S $< -o $@ =20 quiet_cmd_cpp_s_S =3D CPP $@ -cmd_cpp_s_S =3D $(CPP) $(filter-out -Wa$(comma)%,$(a_flags)) -MQ $@ -o $@ = $< +cmd_cpp_s_S =3D $(CPP) $(call cpp_flags,$(a_flags)) -MQ $@ -o $@ $< =20 %.i: %.c FORCE $(call if_changed,cpp_i_c) diff --git a/xen/arch/x86/mm/Makefile b/xen/arch/x86/mm/Makefile index b31041644fe8..2818c066f76a 100644 --- a/xen/arch/x86/mm/Makefile +++ b/xen/arch/x86/mm/Makefile @@ -15,7 +15,7 @@ guest_walk_%.o: guest_walk.c Makefile $(CC) $(c_flags) -DGUEST_PAGING_LEVELS=3D$* -c $< -o $@ =20 guest_walk_%.i: guest_walk.c Makefile - $(CPP) $(filter-out -Wa$(comma)%,$(c_flags)) -DGUEST_PAGING_LEVELS=3D$* -= c $< -o $@ + $(CPP) $(call cpp_flags,$(c_flags)) -DGUEST_PAGING_LEVELS=3D$* -c $< -o $@ =20 guest_walk_%.s: guest_walk.c Makefile $(CC) $(filter-out -Wa$(comma)%,$(c_flags)) -DGUEST_PAGING_LEVELS=3D$* -S= $< -o $@ diff --git a/xen/arch/x86/mm/hap/Makefile b/xen/arch/x86/mm/hap/Makefile index 22e7ad54bd33..c6d296b51720 100644 --- a/xen/arch/x86/mm/hap/Makefile +++ b/xen/arch/x86/mm/hap/Makefile @@ -9,7 +9,7 @@ guest_walk_%level.o: guest_walk.c Makefile $(CC) $(c_flags) -DGUEST_PAGING_LEVELS=3D$* -c $< -o $@ =20 guest_walk_%level.i: guest_walk.c Makefile - $(CPP) $(filter-out -Wa$(comma)%,$(c_flags)) -DGUEST_PAGING_LEVELS=3D$* -= c $< -o $@ + $(CPP) $(call cpp_flags,$(c_flags)) -DGUEST_PAGING_LEVELS=3D$* -c $< -o $@ =20 guest_walk_%level.s: guest_walk.c Makefile $(CC) $(filter-out -Wa$(comma)%,$(c_flags)) -DGUEST_PAGING_LEVELS=3D$* -S= $< -o $@ diff --git a/xen/arch/x86/mm/shadow/Makefile b/xen/arch/x86/mm/shadow/Makef= ile index 770213fe9d84..fd64b4dda925 100644 --- a/xen/arch/x86/mm/shadow/Makefile +++ b/xen/arch/x86/mm/shadow/Makefile @@ -10,7 +10,7 @@ guest_%.o: multi.c Makefile $(CC) $(c_flags) -DGUEST_PAGING_LEVELS=3D$* -c $< -o $@ =20 guest_%.i: multi.c Makefile - $(CPP) $(filter-out -Wa$(comma)%,$(c_flags)) -DGUEST_PAGING_LEVELS=3D$* -= c $< -o $@ + $(CPP) $(call cpp_flags,$(c_flags)) -DGUEST_PAGING_LEVELS=3D$* -c $< -o $@ =20 guest_%.s: multi.c Makefile $(CC) $(filter-out -Wa$(comma)%,$(c_flags)) -DGUEST_PAGING_LEVELS=3D$* -S= $< -o $@ --=20 Anthony PERARD From nobody Tue Apr 30 03:23:41 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1625148645; cv=none; d=zohomail.com; s=zohoarc; b=T2dOnlJU23N42hLhM8Kh1vb3qD7E9hNu44jQ0euAobbCXFNM4qTn41lbQYLF7RsvnUdH+sqkpPme3pCOgBqTzqQLGKkGi+E9Dc9NFqmqccsA6wF3KBPwkc4zqe9VOb12qXLfzSbs0Jk70aNygn4c6xSkXCysmoGtewAbHPEFmYE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1625148645; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=jjfMZLc2+75KCTEi0CzdrW/szcj6akyH5Ydbdjka80g=; b=c+513NdKE1lab3x1/HYGxkgGESECSpgzdcaZ50AaY4mJXe/o5FbleEGK9PtZt+5ooIpjvR6chAMA46fPTvFVFUDob/98Jf4RAlYQMhEUYEyVS0aREVh+iuHXp92gsMpbOnV6/zLxQqAW6VLwzU2BNJs6bEtjZob21PgKIVn6tn0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1625148645540779.1414779669813; Thu, 1 Jul 2021 07:10:45 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.148708.274851 (Exim 4.92) (envelope-from ) id 1lyxOk-0006ct-3t; Thu, 01 Jul 2021 14:10:34 +0000 Received: by outflank-mailman (output) from mailman id 148708.274851; Thu, 01 Jul 2021 14:10:34 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lyxOj-0006bk-Ud; Thu, 01 Jul 2021 14:10:33 +0000 Received: by outflank-mailman (input) for mailman id 148708; Thu, 01 Jul 2021 14:10:32 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lyxOi-0005F9-Iq for xen-devel@lists.xenproject.org; Thu, 01 Jul 2021 14:10:32 +0000 Received: from esa2.hc3370-68.iphmx.com (unknown [216.71.145.153]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 1306551c-da76-11eb-8327-12813bfff9fa; Thu, 01 Jul 2021 14:10:22 +0000 (UTC) X-Outflank-Mailman: Message body and most headers restored to incoming version 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" X-Inumbo-ID: 1306551c-da76-11eb-8327-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1625148622; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Pns9739RItoS5khKorq30ivslZu4OAvxwnMWwlNaAu0=; b=VRv/d+8Ab4l2j1QVYGgQcCxHaz8rTmAQeQrfE1oKYLgn5HNXE9mUXUjA rJp0lfZIAbEsB2ytZirznyASonnzg279ZlBq26kmCurs935yfhuJGmj1S GYNr2Mrhbnh5kpeKXW7Vc37rpRD5gmklejF83uIMOqVKEbuyZKmwBKd5K E=; Authentication-Results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: 3rn9hvSyOIjLz1zTcJ0VvqoZ9PirUNBSml1KaMuBm1To5iUDM40jDpjk2yN3b96kmcikzwI4RA Xr1IRL8o9y59sV6bV14kzfBa3mxb3sEvKoOi2sZf63yle3ertoEX4j9QzuRASTeqgJ0Y/UzwCC xPGrTOKhsPmvaF5ZJwAZAnQ5KEPJW3WgLNMQyQQtTn+dnbaShaVYZ+mIlpBlIpWZP6A5uC1BKp YA/AnW17sGoh9nKyvdO5EBUdS37Og6FCULGh/TCTw1GGna1+ymE6WAN54Ez9rGPxPWHlut3gNS fv4= X-SBRS: 5.1 X-MesageID: 47376079 X-Ironport-Server: esa2.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:FEn/IagvOulIic/Rfb6eLCv9enBQXuIji2hC6mlwRA09TySZ// rBoB19726TtN9xYgBZpTnuAsm9qB/nmaKdpLNhWItKPzOW31dATrsSjrcKqgeIc0aVm9K1l5 0QF5SWYOeAdGSS5vya3ODXKbkdKaG8gcKVuds= X-IronPort-AV: E=Sophos;i="5.83,314,1616472000"; d="scan'208";a="47376079" From: Anthony PERARD To: CC: Anthony PERARD , Jan Beulich , Andrew Cooper , George Dunlap , Ian Jackson , Julien Grall , Stefano Stabellini , Wei Liu Subject: [XEN PATCH v6 03/31] build: use if_changed on built_in.o Date: Thu, 1 Jul 2021 15:09:43 +0100 Message-ID: <20210701141011.785641-4-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210701141011.785641-1-anthony.perard@citrix.com> References: <20210701141011.785641-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) Content-Type: text/plain; charset="utf-8" In the case where $(obj-y) is empty, we also replace $(c_flags) by $(XEN_CFLAGS) to avoid generating an .%.d dependency file. This avoid make trying to include %.h file in the ld command if $(obj-y) isn't empty anymore on a second run. Signed-off-by: Anthony PERARD Acked-by: Jan Beulich --- Notes: v6: - use $(if $(strip $(obj-y)),ld_builtin,cc_builtin) as suggested - rebased =20 v4: - Have cmd_ld_builtin depends on CONFIG_LTO, which simplify built_in.o rule. xen/Rules.mk | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/xen/Rules.mk b/xen/Rules.mk index f778058f80a6..6a0cdfde2eed 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -147,17 +147,22 @@ include $(BASEDIR)/arch/$(TARGET_ARCH)/Rules.mk c_flags +=3D $(CFLAGS-y) a_flags +=3D $(CFLAGS-y) $(AFLAGS-y) =20 -built_in.o: $(obj-y) $(if $(strip $(lib-y)),lib.a) $(extra-y) -ifeq ($(strip $(obj-y)),) - $(CC) $(c_flags) -c -x c /dev/null -o $@ -else +quiet_cmd_cc_builtin =3D LD $@ +cmd_cc_builtin =3D \ + $(CC) $(XEN_CFLAGS) -c -x c /dev/null -o $@ + +quiet_cmd_ld_builtin =3D LD $@ ifeq ($(CONFIG_LTO),y) - $(LD_LTO) -r -o $@ $(filter $(obj-y),$^) +cmd_ld_builtin =3D \ + $(LD_LTO) -r -o $@ $(filter $(obj-y),$(real-prereqs)) else - $(LD) $(XEN_LDFLAGS) -r -o $@ $(filter $(obj-y),$^) -endif +cmd_ld_builtin =3D \ + $(LD) $(XEN_LDFLAGS) -r -o $@ $(filter $(obj-y),$(real-prereqs)) endif =20 +built_in.o: $(obj-y) $(if $(strip $(lib-y)),lib.a) $(extra-y) FORCE + $(call if_changed,$(if $(strip $(obj-y)),ld_builtin,cc_builtin)) + lib.a: $(lib-y) FORCE $(call if_changed,ar) =20 --=20 Anthony PERARD From nobody Tue Apr 30 03:23:41 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1625148656; cv=none; d=zohomail.com; s=zohoarc; b=Q9u9gWm4htkOKCjqbsjQ4ACOBV+4u7K9OcINdyk9MzAuRjiJw9+yYW7QXiKOBQEWcDHOEFNeQSAXyWN9WC9Xbz78KmZAo7INUlZ/MMDbJaf6ogydc3V+koJYCeS3BN1ti4+cR8PtXntXfd9aEeL8OtKlnGf6ob5ckZlPiIVcmgs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1625148656; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=lUq33ycl+GBPGj7CmldyjD5O0Owjbhms06pHAX/V5sw=; b=HgQ0tJAo3YQYOylpiKiQU4trtq1MLaScf+xVSJHwlm7qBvrwnJE6IklcegF2bUYEXW+j7JeV/zwcohdyY4jSW2XebnxZS0XDBdX7DpU/LGAhOzlhxwmW7weqR2Db4tB6lUY8ZUkOe8sEgLQItQm1N5Whpp6hWHVRv+V86byCPwk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1625148656545588.3985543344717; Thu, 1 Jul 2021 07:10:56 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.148712.274884 (Exim 4.92) (envelope-from ) id 1lyxOt-0007wz-JN; Thu, 01 Jul 2021 14:10:43 +0000 Received: by outflank-mailman (output) from mailman id 148712.274884; Thu, 01 Jul 2021 14:10:43 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lyxOt-0007wh-Ea; Thu, 01 Jul 2021 14:10:43 +0000 Received: by outflank-mailman (input) for mailman id 148712; Thu, 01 Jul 2021 14:10:42 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lyxOs-0005F9-JC for xen-devel@lists.xenproject.org; Thu, 01 Jul 2021 14:10:42 +0000 Received: from esa3.hc3370-68.iphmx.com (unknown [216.71.145.155]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 1306551d-da76-11eb-8327-12813bfff9fa; Thu, 01 Jul 2021 14:10:23 +0000 (UTC) X-Outflank-Mailman: Message body and most headers restored to incoming version 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" X-Inumbo-ID: 1306551d-da76-11eb-8327-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1625148623; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=W3w4kLLs4D474Vdd8fHK3XAA2OqyxxyERzR7s4cMOP0=; b=aeHrKohN/N6ShuMLamw3YwrNUV+XmzYHaPzfkdTwszQe4z+SVD0Ebspl hCZkKgq6ERoqlvnAdCERLPjbcTe5QVy4W7OsDNL/EJafRcRXpKqf2URTi xJ+22QUI53O40dm+qu7ZglvRXTwVGFSd2NxYBNfLiU+ghYqWh7+AW5Fzp I=; Authentication-Results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: GJ4PkxF6CblU0SjvcOwQOGT/BmredQqQ0MdquCllOKVewtxBRYzL6QA28aZcNVrL+XEhv6o3ml XdeCsmaWHLpttZeaEIuUaE0YO+gADtL1B/TT93ZIh2UUJErWB08+WCmKpMba7IqB8OvzGtMuCV eE/88p2AKPyUGSPfYlMeyMYlMOqZ+fOG2n9FWHh8vL2W+ps8SAod92gG6fCwot0niJnFFkOW12 83oaxkGGLABKF2auaGR9f5ziN7N+wW2Rf9OROX4sU8lFjs4D5PttLTay6aUhh6gyQpvI4lXfjH maQ= X-SBRS: 5.1 X-MesageID: 47384355 X-Ironport-Server: esa3.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:Ms3X/qNZ9Q7d5sBcTsejsMiBIKoaSvp037Eqv3ofdfUzSL3+qy nOpoVj6faaslcssR0b9OxofZPwI080lqQFhbX5X43DYOCOggLBR+tfBMnZsljd8kXFh4hgPM xbHZSWZuedMbEDt7eY3DWF X-IronPort-AV: E=Sophos;i="5.83,314,1616472000"; d="scan'208";a="47384355" From: Anthony PERARD To: CC: Anthony PERARD , Jan Beulich , Andrew Cooper , George Dunlap , Ian Jackson , Julien Grall , Stefano Stabellini , Wei Liu Subject: [XEN PATCH v6 04/31] build: use if_changed_rules with %.o:%.c targets Date: Thu, 1 Jul 2021 15:09:44 +0100 Message-ID: <20210701141011.785641-5-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210701141011.785641-1-anthony.perard@citrix.com> References: <20210701141011.785641-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) Content-Type: text/plain; charset="utf-8" Use $(dot-target) to have the target name prefix with a dot. Now, when the CC command has run, it is recorded in .*.cmd file, then if_changed_rules will compare it on subsequent runs. Signed-off-by: Anthony PERARD Reviewed-by: Jan Beulich --- xen/Rules.mk | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/xen/Rules.mk b/xen/Rules.mk index 6a0cdfde2eed..4adc90eec80d 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -192,19 +192,27 @@ FORCE: =20 SRCPATH :=3D $(patsubst $(BASEDIR)/%,%,$(CURDIR)) =20 -%.o: %.c Makefile +quiet_cmd_cc_o_c =3D CC $@ ifeq ($(CONFIG_ENFORCE_UNIQUE_SYMBOLS),y) - $(CC) $(c_flags) -c $< -o $(@D)/.$(@F).tmp -MQ $@ -ifeq ($(CONFIG_CC_IS_CLANG),y) - $(OBJCOPY) --redefine-sym $<=3D$(SRCPATH)/$< $(@D)/.$(@F).tmp $@ -else - $(OBJCOPY) --redefine-sym $( (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1625148659627443.6239129505882; Thu, 1 Jul 2021 07:10:59 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.148714.274895 (Exim 4.92) (envelope-from ) id 1lyxOz-0000I6-1K; Thu, 01 Jul 2021 14:10:49 +0000 Received: by outflank-mailman (output) from mailman id 148714.274895; Thu, 01 Jul 2021 14:10:48 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lyxOy-0000HI-Rn; Thu, 01 Jul 2021 14:10:48 +0000 Received: by outflank-mailman (input) for mailman id 148714; Thu, 01 Jul 2021 14:10:47 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lyxOx-0005F9-JU for xen-devel@lists.xenproject.org; Thu, 01 Jul 2021 14:10:47 +0000 Received: from esa1.hc3370-68.iphmx.com (unknown [216.71.145.142]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 13833227-da76-11eb-8327-12813bfff9fa; Thu, 01 Jul 2021 14:10:25 +0000 (UTC) X-Outflank-Mailman: Message body and most headers restored to incoming version 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" X-Inumbo-ID: 13833227-da76-11eb-8327-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1625148624; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=uuyAZES2mXpdo7RpfZEYfJQS/0KceaGe4Dk4hEnlg9Y=; b=OorIn9AQhSLuRrI7wKdJAjWWVd2dGx264u+hA7yjIbS8MgJL89TB9SW8 vDjmdvlFK2LMcB4rRHns/WgBNJtjNobiUN8r1Akta/SI/9oRADIL6NhGJ MG+GArcMDN3GjYVAJDcGWweOYTkBiz9ByKfIyz56CMp1dPxAdA6YFKVB3 Q=; Authentication-Results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: UlKbJEVjkqdCitesAqRIdhA8VQWWfhTd7M/0fsiuU0CO2T4g9F0Ctuf7n35sXw7vU/LXF4tKlM B0Ue5Zn3H4PMY98To+f9RmB369r56t7ttJBaYJwh20kxxE51o6BO6jNHd/RG/9czYtKYEjskkq mwLIaNv/SKjHgzFywA4Xmjkg9/UH35ps0I08xVhxpcTlRFnWdtqF0OfD5X73p+ChcH676VTUcP xdinlcsmcByDfuTKArF5Ju2WzVt474neclk7Wedw1gPAWNIomnOOwErYPFr93UJE+LOqT51n+P wVs= X-SBRS: 5.1 X-MesageID: 47755333 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:+QPBhaMw/wec98BcTjujsMiBIKoaSvp037BK7S1MoNJuEvBw9v re+MjzsCWftN9/Yh4dcLy7VpVoIkmskKKdg7NhXotKNTOO0AeVxelZhrcKqAeQeREWmNQ96U 9hGZIOdeEZDzJB/LrHCN/TKade/DGFmprY+9s31x1WPGZXgzkL1XYDNu6ceHcGIjVuNN4CO7 e3wNFInDakcWR/VLXAOpFUN9Kz3uEijfjdEGY7OyI= X-IronPort-AV: E=Sophos;i="5.83,314,1616472000"; d="scan'208";a="47755333" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Ian Jackson" , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu , Volodymyr Babchuk , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Subject: [XEN PATCH v6 05/31] build: factorise generation of the linker scripts Date: Thu, 1 Jul 2021 15:09:45 +0100 Message-ID: <20210701141011.785641-6-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210701141011.785641-1-anthony.perard@citrix.com> References: <20210701141011.785641-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) Content-Type: text/plain; charset="utf-8" In Arm and X86 makefile, generating the linker script is the same, so we can simply have both call the same macro. We need to add *.lds files into extra-y so that Rules.mk can find the .*.cmd dependency file and load it. Change made to the command line: - Use cpp_flags macro which simply filter -Wa,% options from $(a_flags). - Added -D__LINKER__ even it is only used by Arm's lds. Signed-off-by: Anthony PERARD Reviewed-by: Jan Beulich --- Notes: v6: - CPP already used instead of CC -E - -Ui386 already removed - cpp_flags is now a macro - rebased =20 v5: - rename cc_lds_S to cpp_lds_S as the binary runned is now CPP - Use new cpp_flags instead of the open-coded filter of a_flags. =20 v4: - fix rebuild by adding FORCE as dependency - Use $(CPP) - remove -Ui386 - avoid using "define" for cmd_cc_lds_S, as adding '; \' on each line is still mandatory for if_changed (or cmd) macro to work. xen/Rules.mk | 4 ++++ xen/arch/arm/Makefile | 6 ++++-- xen/arch/x86/Makefile | 6 ++++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/xen/Rules.mk b/xen/Rules.mk index 4adc90eec80d..f05b2d3f0399 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -255,6 +255,10 @@ cmd_cpp_s_S =3D $(CPP) $(call cpp_flags,$(a_flags)) -M= Q $@ -o $@ $< %.s: %.S FORCE $(call if_changed,cpp_s_S) =20 +# Linker scripts, .lds.S -> .lds +quiet_cmd_cpp_lds_S =3D LDS $@ +cmd_cpp_lds_S =3D $(CPP) -P $(call cpp_flags,$(a_flags)) -D__LINKER__ -MQ = $@ -o $@ $< + # Add intermediate targets: # When building objects with specific suffix patterns, add intermediate # targets that the final targets are derived from. diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile index 3d3b97b5b440..0edd9dee6f49 100644 --- a/xen/arch/arm/Makefile +++ b/xen/arch/arm/Makefile @@ -66,6 +66,8 @@ obj-y +=3D vpsci.o obj-y +=3D vuart.o extra-y +=3D $(TARGET_SUBARCH)/head.o =20 +extra-y +=3D xen.lds + #obj-bin-y +=3D ....o =20 ifneq ($(CONFIG_DTB_FILE),"") @@ -133,8 +135,8 @@ $(TARGET)-syms: prelink.o xen.lds .PHONY: include include: =20 -xen.lds: xen.lds.S - $(CPP) -P $(a_flags) -D__LINKER__ -MQ $@ -o $@ $< +xen.lds: xen.lds.S FORCE + $(call if_changed,cpp_lds_S) =20 dtb.o: $(patsubst "%",%,$(CONFIG_DTB_FILE)) =20 diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile index 2ec883456e48..08a4ec1944d3 100644 --- a/xen/arch/x86/Makefile +++ b/xen/arch/x86/Makefile @@ -79,6 +79,7 @@ obj-y +=3D sysctl.o endif =20 extra-y +=3D asm-macros.i +extra-y +=3D xen.lds =20 ifneq ($(CONFIG_HVM),y) x86_emulate.o: CFLAGS-y +=3D -Wno-unused-label @@ -240,6 +241,7 @@ endif note_file_option ?=3D $(note_file) =20 ifeq ($(XEN_BUILD_PE),y) +extra-y +=3D efi.lds $(TARGET).efi: prelink.o $(note_file) efi.lds efi/relocs-dummy.o efi/mkrel= oc ifeq ($(CONFIG_DEBUG_INFO),y) $(if $(filter --strip-debug,$(EFI_LDFLAGS)),echo,:) "Will strip debug inf= o from $(@F)" @@ -292,8 +294,8 @@ $(BASEDIR)/include/asm-x86/asm-macros.h: asm-macros.i M= akefile $(call move-if-changed,$@.new,$@) =20 efi.lds: AFLAGS-y +=3D -DEFI -xen.lds efi.lds: xen.lds.S - $(CPP) -P $(filter-out -Wa$(comma)%,$(a_flags)) -MQ $@ -o $@ $< +xen.lds efi.lds: xen.lds.S FORCE + $(call if_changed,cpp_lds_S) =20 boot/mkelf32: boot/mkelf32.c $(HOSTCC) $(HOSTCFLAGS) -o $@ $< --=20 Anthony PERARD From nobody Tue Apr 30 03:23:41 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1625148647; cv=none; d=zohomail.com; s=zohoarc; b=Fp4ZFxmNzM1TottknUi5XaWluYylDL4qKJijXVXpv8/5rYgzlCPwB8BIwEUB4+kUwQSqwaNPby8Tf0Ez9OhzXvMMllyXYtyzsyL6OJFyHTQrLIYMBM/3mBcB0Sil3ieQ0jk4tULj6rB2LXnijialOeTTKautvREY7kVI2c4It6w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1625148647; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=GGWPSXRtztjwlrCzXMjtmWCVZ/gOon908pn5Co0Vr80=; b=Vc0aIysK5csAndtH7K00ga9u0EapjvmolB9BF6VFkfBibrbpKIZHYHriCKPpOt6OYPn6XoGZwT+IuRMAgyc9F25suyn1VY0z2YPsBMkrEW/01KhIY66eV+i8i/rVGkdymDdSZ7ma+e5u5ALU1R19Po3OFv9Wru0YSudsvFaIj5Y= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 162514864721229.22763300702104; Thu, 1 Jul 2021 07:10:47 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.148706.274829 (Exim 4.92) (envelope-from ) id 1lyxOg-0005yi-90; Thu, 01 Jul 2021 14:10:30 +0000 Received: by outflank-mailman (output) from mailman id 148706.274829; Thu, 01 Jul 2021 14:10:30 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lyxOg-0005yZ-5H; Thu, 01 Jul 2021 14:10:30 +0000 Received: by outflank-mailman (input) for mailman id 148706; Thu, 01 Jul 2021 14:10:28 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lyxOe-0005tj-Qs for xen-devel@lists.xenproject.org; Thu, 01 Jul 2021 14:10:28 +0000 Received: from esa4.hc3370-68.iphmx.com (unknown [216.71.155.144]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 4f84f67f-f63d-4cae-b70a-ea7d3a3e3488; Thu, 01 Jul 2021 14:10:27 +0000 (UTC) X-Outflank-Mailman: Message body and most headers restored to incoming version 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" X-Inumbo-ID: 4f84f67f-f63d-4cae-b70a-ea7d3a3e3488 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1625148627; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=p6A2leGuQ6JJnCHw9Z1yFaAvywh0FWS/+VLlHmt9w9U=; b=iZiJaWtS487i5ED1ZAtL/56t2zzQWIuZy1hlrXx6D2BibDt74kJajkrw vBJvOUuYDCh6CEbsAM8FC+kgoxMGAVkzhM+2XPH9FoRHRZXJm8NUQt2PS U5BlxW+HiaYzhPYRAlrXcbTOtyyGpyDNJP3O+mZ/z7G9BZAUjbEbfjUkq s=; Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: lpM6xOx65WR1xO9xPvAF4rH8L42azngx5PsW6pYxbGjjFYhFCC57hXKs7GPPlu4WVaDss+yIfs dZOSG6QaRCMZYkADD6HlldN3PzKiMAYzStupabtHI/mHcA1q1GlyAxtH8wGSFltma4xqLDN11p gDYd9ysXahhsx+DRr5tKSGulFaDV3fgyaOd3iMZR1BNo3qF8Gf3fTkGP6OOieOFJPznu4Oeh4x gFD2NAiiIL/tNb2y+M9OjKfRT1z30/ZCXFJl3x4w6xeoqXff3LmadGAgcmxWBZG4/MI+QVRE3V OJo= X-SBRS: 5.1 X-MesageID: 49007452 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:1jaZlq2nFwHYrwlAs77h1gqjBGEkLtp133Aq2lEZdPWaSL36qy nIpoVh6fYuskdoZJhEo7u90ca7MBThHPJOjrX5eI3OYOCEghrQEGgB1/qG/9SIIUSXygce78 tdmodFebnN5DNB4/oSjjPZLz6oq+PszEgn7d2uskuEkWlRGttdxjY8KAqWC3d7QxQuP/sE/O P23Lsgm9PZQwV0UviG X-IronPort-AV: E=Sophos;i="5.83,314,1616472000"; d="scan'208";a="49007452" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Ian Jackson" , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Tim Deegan Subject: [XEN PATCH v6 06/31] x86/mm: avoid building multiple .o from a single .c file Date: Thu, 1 Jul 2021 15:09:46 +0100 Message-ID: <20210701141011.785641-7-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210701141011.785641-1-anthony.perard@citrix.com> References: <20210701141011.785641-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) Content-Type: text/plain; charset="utf-8" This replace the use of a single .c file use for multiple .o file by creating multiple .c file including the first one. There's quite a few issues with trying to build more than one object file from a single source file: there's is a duplication of the make rules to generate those targets; there is an additional ".file" symbol added in order to differentiate between the object files; and the tools/symbols have an heuristic to try to pick up the right ".file". This patch adds new .c source file which avoid the need to add a second ".file" symbol and thus avoid the need to deal with those issues. Also remove __OBJECT_FILE__ from $(CC) command line as it isn't used anywhere anymore. And remove the macro "build-intermediate" since the generic rules for single targets can be used. Signed-off-by: Anthony PERARD Reviewed-by: Jan Beulich --- Notes: v6: - new patch to replace both from v5: xen,symbols: rework file symbols selection build: use if_changed to build mm/*/guest_%.o =20 The changes in the patch for symbols.c was too complicated to explain, and I probably didn't realize one important fact about the tool: it deal with all *.o been concatenated to each other, without a way to figure out which symbol belong to which original file, and certainly no way to figure out if there's more than one ".file" symbol to choose from beside some fragile heuristic. xen/Makefile | 11 ----------- xen/Rules.mk | 2 +- xen/arch/x86/mm/Makefile | 9 --------- xen/arch/x86/mm/guest_walk.c | 3 --- xen/arch/x86/mm/guest_walk_2.c | 2 ++ xen/arch/x86/mm/guest_walk_3.c | 2 ++ xen/arch/x86/mm/guest_walk_4.c | 2 ++ xen/arch/x86/mm/hap/Makefile | 9 --------- xen/arch/x86/mm/hap/guest_walk.c | 3 --- xen/arch/x86/mm/hap/guest_walk_2level.c | 2 ++ xen/arch/x86/mm/hap/guest_walk_3level.c | 2 ++ xen/arch/x86/mm/hap/guest_walk_4level.c | 2 ++ xen/arch/x86/mm/shadow/Makefile | 9 --------- xen/arch/x86/mm/shadow/guest_2.c | 2 ++ xen/arch/x86/mm/shadow/guest_3.c | 2 ++ xen/arch/x86/mm/shadow/guest_4.c | 2 ++ xen/arch/x86/mm/shadow/multi.c | 3 --- xen/tools/symbols.c | 18 ++---------------- 18 files changed, 21 insertions(+), 64 deletions(-) create mode 100644 xen/arch/x86/mm/guest_walk_2.c create mode 100644 xen/arch/x86/mm/guest_walk_3.c create mode 100644 xen/arch/x86/mm/guest_walk_4.c create mode 100644 xen/arch/x86/mm/hap/guest_walk_2level.c create mode 100644 xen/arch/x86/mm/hap/guest_walk_3level.c create mode 100644 xen/arch/x86/mm/hap/guest_walk_4level.c create mode 100644 xen/arch/x86/mm/shadow/guest_2.c create mode 100644 xen/arch/x86/mm/shadow/guest_3.c create mode 100644 xen/arch/x86/mm/shadow/guest_4.c diff --git a/xen/Makefile b/xen/Makefile index 89879fad4cb2..360b4a1d1867 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -476,17 +476,6 @@ _MAP: %/: FORCE $(MAKE) -f $(BASEDIR)/Rules.mk -C $* built_in.o built_in_bin.o =20 -build-intermediate =3D $(eval $(call build-intermediate-closure,$(1))) -define build-intermediate-closure -$(1): FORCE - $(MAKE) -f $(BASEDIR)/Rules.mk -C $$(@D) $$(@F) -endef - -$(foreach base,arch/x86/mm/guest_walk_% \ - arch/x86/mm/hap/guest_walk_%level \ - arch/x86/mm/shadow/guest_%, \ - $(foreach ext,o i s,$(call build-intermediate,$(base).$(ext)))) - .PHONY: cloc cloc: $(eval tmpfile :=3D $(shell mktemp)) diff --git a/xen/Rules.mk b/xen/Rules.mk index f05b2d3f0399..ede408efc515 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -139,7 +139,7 @@ cpp_flags =3D $(filter-out -Wa$(comma)%,$(1)) # Calculation of flags, first the generic flags, then the arch specific fl= ags, # and last the flags modified for a target or a directory. =20 -c_flags =3D -MMD -MP -MF $(@D)/.$(@F).d $(XEN_CFLAGS) '-D__OBJECT_FILE__= =3D"$@"' +c_flags =3D -MMD -MP -MF $(@D)/.$(@F).d $(XEN_CFLAGS) a_flags =3D -MMD -MP -MF $(@D)/.$(@F).d $(XEN_AFLAGS) =20 include $(BASEDIR)/arch/$(TARGET_ARCH)/Rules.mk diff --git a/xen/arch/x86/mm/Makefile b/xen/arch/x86/mm/Makefile index 2818c066f76a..6b7882d992bb 100644 --- a/xen/arch/x86/mm/Makefile +++ b/xen/arch/x86/mm/Makefile @@ -10,12 +10,3 @@ obj-$(CONFIG_MEM_SHARING) +=3D mem_sharing.o obj-y +=3D p2m.o obj-$(CONFIG_HVM) +=3D p2m-ept.o p2m-pod.o p2m-pt.o obj-y +=3D paging.o - -guest_walk_%.o: guest_walk.c Makefile - $(CC) $(c_flags) -DGUEST_PAGING_LEVELS=3D$* -c $< -o $@ - -guest_walk_%.i: guest_walk.c Makefile - $(CPP) $(call cpp_flags,$(c_flags)) -DGUEST_PAGING_LEVELS=3D$* -c $< -o $@ - -guest_walk_%.s: guest_walk.c Makefile - $(CC) $(filter-out -Wa$(comma)%,$(c_flags)) -DGUEST_PAGING_LEVELS=3D$* -S= $< -o $@ diff --git a/xen/arch/x86/mm/guest_walk.c b/xen/arch/x86/mm/guest_walk.c index 30d83cf1e0e6..b9f607272c39 100644 --- a/xen/arch/x86/mm/guest_walk.c +++ b/xen/arch/x86/mm/guest_walk.c @@ -21,9 +21,6 @@ * along with this program; If not, see . */ =20 -/* Allow uniquely identifying static symbols in the 3 generated objects. */ -asm(".file \"" __OBJECT_FILE__ "\""); - #include #include #include diff --git a/xen/arch/x86/mm/guest_walk_2.c b/xen/arch/x86/mm/guest_walk_2.c new file mode 100644 index 000000000000..defcd59bc260 --- /dev/null +++ b/xen/arch/x86/mm/guest_walk_2.c @@ -0,0 +1,2 @@ +#define GUEST_PAGING_LEVELS 2 +#include "guest_walk.c" diff --git a/xen/arch/x86/mm/guest_walk_3.c b/xen/arch/x86/mm/guest_walk_3.c new file mode 100644 index 000000000000..1c9eca37741e --- /dev/null +++ b/xen/arch/x86/mm/guest_walk_3.c @@ -0,0 +1,2 @@ +#define GUEST_PAGING_LEVELS 3 +#include "guest_walk.c" diff --git a/xen/arch/x86/mm/guest_walk_4.c b/xen/arch/x86/mm/guest_walk_4.c new file mode 100644 index 000000000000..aa3900338a2d --- /dev/null +++ b/xen/arch/x86/mm/guest_walk_4.c @@ -0,0 +1,2 @@ +#define GUEST_PAGING_LEVELS 4 +#include "guest_walk.c" diff --git a/xen/arch/x86/mm/hap/Makefile b/xen/arch/x86/mm/hap/Makefile index c6d296b51720..32aef9b4ba26 100644 --- a/xen/arch/x86/mm/hap/Makefile +++ b/xen/arch/x86/mm/hap/Makefile @@ -4,12 +4,3 @@ obj-y +=3D guest_walk_3level.o obj-y +=3D guest_walk_4level.o obj-y +=3D nested_hap.o obj-y +=3D nested_ept.o - -guest_walk_%level.o: guest_walk.c Makefile - $(CC) $(c_flags) -DGUEST_PAGING_LEVELS=3D$* -c $< -o $@ - -guest_walk_%level.i: guest_walk.c Makefile - $(CPP) $(call cpp_flags,$(c_flags)) -DGUEST_PAGING_LEVELS=3D$* -c $< -o $@ - -guest_walk_%level.s: guest_walk.c Makefile - $(CC) $(filter-out -Wa$(comma)%,$(c_flags)) -DGUEST_PAGING_LEVELS=3D$* -S= $< -o $@ diff --git a/xen/arch/x86/mm/hap/guest_walk.c b/xen/arch/x86/mm/hap/guest_w= alk.c index f59ebc84a290..832a8058471e 100644 --- a/xen/arch/x86/mm/hap/guest_walk.c +++ b/xen/arch/x86/mm/hap/guest_walk.c @@ -18,9 +18,6 @@ * this program; If not, see . */ =20 -/* Allow uniquely identifying static symbols in the 3 generated objects. */ -asm(".file \"" __OBJECT_FILE__ "\""); - #include #include #include diff --git a/xen/arch/x86/mm/hap/guest_walk_2level.c b/xen/arch/x86/mm/hap/= guest_walk_2level.c new file mode 100644 index 000000000000..defcd59bc260 --- /dev/null +++ b/xen/arch/x86/mm/hap/guest_walk_2level.c @@ -0,0 +1,2 @@ +#define GUEST_PAGING_LEVELS 2 +#include "guest_walk.c" diff --git a/xen/arch/x86/mm/hap/guest_walk_3level.c b/xen/arch/x86/mm/hap/= guest_walk_3level.c new file mode 100644 index 000000000000..1c9eca37741e --- /dev/null +++ b/xen/arch/x86/mm/hap/guest_walk_3level.c @@ -0,0 +1,2 @@ +#define GUEST_PAGING_LEVELS 3 +#include "guest_walk.c" diff --git a/xen/arch/x86/mm/hap/guest_walk_4level.c b/xen/arch/x86/mm/hap/= guest_walk_4level.c new file mode 100644 index 000000000000..aa3900338a2d --- /dev/null +++ b/xen/arch/x86/mm/hap/guest_walk_4level.c @@ -0,0 +1,2 @@ +#define GUEST_PAGING_LEVELS 4 +#include "guest_walk.c" diff --git a/xen/arch/x86/mm/shadow/Makefile b/xen/arch/x86/mm/shadow/Makef= ile index fd64b4dda925..b4a1620b6920 100644 --- a/xen/arch/x86/mm/shadow/Makefile +++ b/xen/arch/x86/mm/shadow/Makefile @@ -5,12 +5,3 @@ obj-$(CONFIG_PV) +=3D pv.o guest_4.o else obj-y +=3D none.o endif - -guest_%.o: multi.c Makefile - $(CC) $(c_flags) -DGUEST_PAGING_LEVELS=3D$* -c $< -o $@ - -guest_%.i: multi.c Makefile - $(CPP) $(call cpp_flags,$(c_flags)) -DGUEST_PAGING_LEVELS=3D$* -c $< -o $@ - -guest_%.s: multi.c Makefile - $(CC) $(filter-out -Wa$(comma)%,$(c_flags)) -DGUEST_PAGING_LEVELS=3D$* -S= $< -o $@ diff --git a/xen/arch/x86/mm/shadow/guest_2.c b/xen/arch/x86/mm/shadow/gues= t_2.c new file mode 100644 index 000000000000..288b229982b0 --- /dev/null +++ b/xen/arch/x86/mm/shadow/guest_2.c @@ -0,0 +1,2 @@ +#define GUEST_PAGING_LEVELS 2 +#include "multi.c" diff --git a/xen/arch/x86/mm/shadow/guest_3.c b/xen/arch/x86/mm/shadow/gues= t_3.c new file mode 100644 index 000000000000..04e17b0b8adc --- /dev/null +++ b/xen/arch/x86/mm/shadow/guest_3.c @@ -0,0 +1,2 @@ +#define GUEST_PAGING_LEVELS 3 +#include "multi.c" diff --git a/xen/arch/x86/mm/shadow/guest_4.c b/xen/arch/x86/mm/shadow/gues= t_4.c new file mode 100644 index 000000000000..c0c5d3cb11ad --- /dev/null +++ b/xen/arch/x86/mm/shadow/guest_4.c @@ -0,0 +1,2 @@ +#define GUEST_PAGING_LEVELS 4 +#include "multi.c" diff --git a/xen/arch/x86/mm/shadow/multi.c b/xen/arch/x86/mm/shadow/multi.c index 8bb028c2e2fa..7207fcf9e75f 100644 --- a/xen/arch/x86/mm/shadow/multi.c +++ b/xen/arch/x86/mm/shadow/multi.c @@ -20,9 +20,6 @@ * along with this program; If not, see . */ =20 -/* Allow uniquely identifying static symbols in the 3 generated objects. */ -asm(".file \"" __OBJECT_FILE__ "\""); - #include #include #include diff --git a/xen/tools/symbols.c b/xen/tools/symbols.c index 0b124526165d..710e9785d348 100644 --- a/xen/tools/symbols.c +++ b/xen/tools/symbols.c @@ -84,7 +84,6 @@ static int read_symbol(FILE *in, struct sym_entry *s) { char str[500], type[20] =3D ""; char *sym, stype; - static enum { symbol, single_source, multi_source } last; static char *filename; int rc =3D -1; =20 @@ -118,24 +117,11 @@ static int read_symbol(FILE *in, struct sym_entry *s) */ input_format =3D=3D fmt_sysv && !*type && stype =3D=3D '?' && sym && sym[1] && strchr("cSsoh", sym[1]) && !sym[2])) { - /* - * gas prior to binutils commit fbdf9406b0 (expected to appear - * in 2.27) outputs symbol table entries resulting from .file - * in reverse order. If we get two consecutive file symbols, - * prefer the first one if that names an object file or has a - * directory component (to cover multiply compiled files). - */ - bool multi =3D strchr(str, '/') || (sym && sym[1] =3D=3D 'o'); - - if (multi || last !=3D multi_source) { - free(filename); - filename =3D *str ? strdup(str) : NULL; - } - last =3D multi ? multi_source : single_source; + free(filename); + filename =3D *str ? strdup(str) : NULL; goto skip_tail; } =20 - last =3D symbol; rc =3D -1; =20 sym =3D str; --=20 Anthony PERARD From nobody Tue Apr 30 03:23:41 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1625148649; cv=none; d=zohomail.com; s=zohoarc; b=mEA6Cb36O3mbr2MoqWjJtmSdu2pjEHA8otIXDvPPDTbI8RKfhtAcqiGoa2mGfui10614CULcKnq5PEcmfyr/NKSu6nXMpg/UOwcf4zsY4lDv8ev+MtB0eQkARVECLiG4eSb2GYOjhySx9yXxTWo42j9rGSOHnvlkitB9g7efaEY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1625148649; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=hxHvnuMBN6MIEDXGmPkpvlst7cM+ACJ31FplNE7W0+Q=; b=j8upvDVhVAcdgZyBTzWt1Mhr8jkrZggLqY9pkM8TRhTco0NJj8bQGtRa4Ct7nwsNBsQPJM+PRkil1fF/1SbuvkTBhuM1gqg7fTd4hbum0QTxBVlDxqoE/Jg5MdPmuOa5oLDBtk6SNy3tSuD6mYqGC6ZKcTZQx4EDxf1C4v9Kf2Y= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1625148649127546.3626283701568; Thu, 1 Jul 2021 07:10:49 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.148707.274840 (Exim 4.92) (envelope-from ) id 1lyxOi-0006Kh-Ns; Thu, 01 Jul 2021 14:10:32 +0000 Received: by outflank-mailman (output) from mailman id 148707.274840; Thu, 01 Jul 2021 14:10:32 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lyxOi-0006KQ-K6; Thu, 01 Jul 2021 14:10:32 +0000 Received: by outflank-mailman (input) for mailman id 148707; Thu, 01 Jul 2021 14:10:31 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lyxOg-0005tj-Vv for xen-devel@lists.xenproject.org; Thu, 01 Jul 2021 14:10:31 +0000 Received: from esa5.hc3370-68.iphmx.com (unknown [216.71.155.168]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 55f3a9fb-720c-452f-92ed-fae6b830b800; Thu, 01 Jul 2021 14:10:28 +0000 (UTC) X-Outflank-Mailman: Message body and most headers restored to incoming version 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" X-Inumbo-ID: 55f3a9fb-720c-452f-92ed-fae6b830b800 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1625148628; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=WNQw53D2CBl7IfW7DXoevzSfofTFknY56S4ZzC5yIeA=; b=I088QyBYbmJgARWg3Rl1kWwYGKh6OVysOFfctpmQYsAubBdFIKYgeTnm ZlQdcg2xM0y3FfYb4JNNyqZN5ibFk1BE7nn9S7xc6uV+sROVx3m/pZbiE +SBh5maz81JC7ojjj7EyO7Pl02efi6Of4zPCe12jcxA2Y9W1SyEO2aAWn A=; Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: R+4i4GvhQ/bsJUtm/f25GRNBFTY3QnEzZIDpOXXFfnM5XPyNmcnKTNMALl1I858HTbrVLZVixL FgY6jes9ShraMHqbhQlMzSz8xTfRFUc9jB7H1cETWgAamV0+K9rrCleR8qbkJ0a0BRdAQ9eYaP nUvRrZOqNNPCZlfHQPUvTRpOcY27WfA4TJ5l//hJnCFFvDQvJ2gox59VU6cgAH4FAwStzGRh0f IvuCpRqKjohQzU3SLVpZMJktlV2zWnSMmKVSs5/fCBnhAyBheMMWULR8HDZNLd5afZ0WMwzF3W Izk= X-SBRS: 5.1 X-MesageID: 47093323 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:fExu1qhU81WMd6RejdhUkxV2BnBQXuIji2hC6mlwRA09TySZ// rBoB19726TtN9xYgBZpTnuAsm9qB/nmaKdpLNhWItKPzOW31dATrsSjrcKqgeIc0aVm9K1l5 0QF5SWYOeAdGSS5vya3ODXKbkdKaG8gcKVuds= X-IronPort-AV: E=Sophos;i="5.83,314,1616472000"; d="scan'208";a="47093323" From: Anthony PERARD To: CC: Anthony PERARD , Jan Beulich , Andrew Cooper , George Dunlap , Ian Jackson , Julien Grall , Stefano Stabellini , Wei Liu Subject: [XEN PATCH v6 07/31] build,include: rework compat-build-source.py Date: Thu, 1 Jul 2021 15:09:47 +0100 Message-ID: <20210701141011.785641-8-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210701141011.785641-1-anthony.perard@citrix.com> References: <20210701141011.785641-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) Content-Type: text/plain; charset="utf-8" Improvement are: - give the path to xlat.lst as argument - include `grep -v` in compat-build-source.py script, we don't need to write this in several scripted language. Also remove dependency on Makefile as the file generation doesn't depend on it anymore. No changes in final compat/%.h headers. Signed-off-by: Anthony PERARD Acked-by: Jan Beulich --- Notes: v6: - remove dependency on Makefile as it's not needed anymore =20 v5: - removed "have 'xlat.lst' path as a variable" from the patch. =20 v4: - new patch xen/include/Makefile | 5 ++--- xen/tools/compat-build-source.py | 8 +++++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/xen/include/Makefile b/xen/include/Makefile index c8ca97eed0fc..be3b81485bdc 100644 --- a/xen/include/Makefile +++ b/xen/include/Makefile @@ -59,10 +59,9 @@ compat/%.h: compat/%.i Makefile $(BASEDIR)/tools/compat-= build-header.py compat/%.i: compat/%.c Makefile $(CPP) $(filter-out -Wa$(comma)% -include %/include/xen/config.h,$(XEN_CF= LAGS)) $(cppflags-y) -o $@ $< =20 -compat/%.c: public/%.h xlat.lst Makefile $(BASEDIR)/tools/compat-build-sou= rce.py +compat/%.c: public/%.h xlat.lst $(BASEDIR)/tools/compat-build-source.py mkdir -p $(@D) - grep -v 'DEFINE_XEN_GUEST_HANDLE(long)' $< | \ - $(PYTHON) $(BASEDIR)/tools/compat-build-source.py >$@.new + $(PYTHON) $(BASEDIR)/tools/compat-build-source.py xlat.lst <$< >$@.new mv -f $@.new $@ =20 compat/.xlat/%.h: compat/%.h compat/.xlat/%.lst $(BASEDIR)/tools/get-field= s.sh Makefile diff --git a/xen/tools/compat-build-source.py b/xen/tools/compat-build-sour= ce.py index 2bcaf27d05a3..274d6917ab7f 100755 --- a/xen/tools/compat-build-source.py +++ b/xen/tools/compat-build-source.py @@ -13,7 +13,11 @@ pats =3D [ [ r"XEN_GUEST_HANDLE", r"COMPAT_HANDLE" ], ]; =20 -xlatf =3D open('xlat.lst', 'r') +try: + xlatf =3D open(sys.argv[1], 'r') +except IndexError: + print('missing path to xlat.lst argument') + sys.exit(1) for line in xlatf.readlines(): match =3D re.subn(r"^\s*\?\s+(\w*)\s.*", r"\1", line.rstrip()) if match[1]: @@ -25,6 +29,8 @@ for pat in pats: pat[0] =3D re.compile(pat[0]) =20 for line in sys.stdin.readlines(): + if 'DEFINE_XEN_GUEST_HANDLE(long)' in line: + continue for pat in pats: line =3D re.sub(pat[0], pat[1], line) print(line.rstrip()) --=20 Anthony PERARD From nobody Tue Apr 30 03:23:41 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1625148651; cv=none; d=zohomail.com; s=zohoarc; b=YxSV0kUuFv5T0YrGuXIG4ZD1ueCVQ9pyhyK1NCNIav7AGR/8jQ/NzIDrd5b0oF25CheAPanTk5eekRcho6eIZL/cjStKf39mHUOcOfk210P9ogowMvB3b3wbh8K8lhq4J8VWFTtDPPf0oxgrjeADXhBsj/lKxLfi4y51+euYYTU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1625148651; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Bu4innSOU6Fe9dD+PI5ytmDg6IdNJY4AlEe04s7xTNY=; b=M62Q6LpDs1vZH9bFMA+ymmIAzlOqLkhaG4R7CLCjy0zs9Bi0TALtGPb2mKoKH29oPUmJihKzXDynls+dnP6EtQy/nryUyGIhplrK9XCFK0vUGeOY66a3cnECXefGGSTbCsLhhUBXPlWr2bm/oa9j5YMNzWhRguLFU/BWlDyIBvw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1625148651885243.8864107573463; Thu, 1 Jul 2021 07:10:51 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.148709.274862 (Exim 4.92) (envelope-from ) id 1lyxOn-00073f-Fi; Thu, 01 Jul 2021 14:10:37 +0000 Received: by outflank-mailman (output) from mailman id 148709.274862; Thu, 01 Jul 2021 14:10:37 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lyxOn-00072Q-BJ; Thu, 01 Jul 2021 14:10:37 +0000 Received: by outflank-mailman (input) for mailman id 148709; Thu, 01 Jul 2021 14:10:36 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lyxOl-0005tj-Vm for xen-devel@lists.xenproject.org; Thu, 01 Jul 2021 14:10:36 +0000 Received: from esa6.hc3370-68.iphmx.com (unknown [216.71.155.175]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 09ef554a-cc6f-4393-bec9-018267e96a0b; Thu, 01 Jul 2021 14:10:30 +0000 (UTC) X-Outflank-Mailman: Message body and most headers restored to incoming version 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" X-Inumbo-ID: 09ef554a-cc6f-4393-bec9-018267e96a0b DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1625148630; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=P2E0W/gctKSv9qL8/o+vMgXc//AFHVWuP07uAhIiJh4=; b=h5xlRTJERNCZIb4MfXn0paw4thhIvhuz4PWdYI5X/5WeGLwmd0TTHhcj TLco105FdRIfN/THbmt5aCfmuEYBZijGMYw24xYgDsxx7iqSvdrH3t0Z8 SliOPRpgmjl99il0uI1biOQyIm5D0wrpcr0+wlp9tjl74Y4LgZ0iXbhDG c=; Authentication-Results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: grgSpt4fWT8iOSPspjf8uGICLMQU/Xg+FsFXwSYR71Q1UMQ4NXITI5Ow9zIJmjSDTLUBsLj4jg aJ6z9LmtP+5zzltsferH1oYFnsZq0MwBaMpxYjdmGoShRUxE0zMoVmlsXVzpACaIuNzfcgg7H+ +p0Wd02cOtVzWOGVP+sEpW4lBhuJFxX/VBWwwibFp89aAg5m0EoNZYpAe8oRpObtzuJEKkZp3h 1EGdSuFWbRjkiQVVccDCelGLnUvEJ0hHq/Nx6lc0sKJim81fqlIIb6feaEZv7dS3K2IPpbcQQZ JDw= X-SBRS: 5.1 X-MesageID: 47446790 X-Ironport-Server: esa6.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:2+1tPq6o+GDVMMmE2APXwM7XdLJyesId70hD6qhwISY7TiX+rb HIoB17726MtN9/YhAdcLy7VZVoBEmsl6KdgrNhWYtKPjOHhILAFugLhuHfKn/bakjDH4ZmpM FdmsNFZuEYY2IXsS+D2njaL+od X-IronPort-AV: E=Sophos;i="5.83,314,1616472000"; d="scan'208";a="47446790" From: Anthony PERARD To: CC: Anthony PERARD , Wei Liu , "Andrew Cooper" , George Dunlap , Ian Jackson , Jan Beulich , "Julien Grall" , Stefano Stabellini Subject: [XEN PATCH v6 08/31] build,include: rework compat-build-header.py Date: Thu, 1 Jul 2021 15:09:48 +0100 Message-ID: <20210701141011.785641-9-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210701141011.785641-1-anthony.perard@citrix.com> References: <20210701141011.785641-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) Content-Type: text/plain; charset="utf-8" Replace a mix of shell script and python script by all python script. Also remove dependency on Makefile as the file generation doesn't depend on it anymore. No change to the final generated headers. Signed-off-by: Anthony PERARD Acked-by: Wei Liu --- Notes: v6: - removed handling of $(prefix-y) and $(suffix-y), they've been removed. - remove dependency on Makefile as it's not needed anymore - rebased =20 v5: - Removed -P from CPP when generating compat/%.i -> keep removing linemarkers and keep de-duplicating empty lines. So that all the blank line that currently exist in the generated headers stays in place. =20 v4: - new patch xen/include/Makefile | 11 ++------ xen/tools/compat-build-header.py | 44 ++++++++++++++++++++++++++++++-- 2 files changed, 44 insertions(+), 11 deletions(-) diff --git a/xen/include/Makefile b/xen/include/Makefile index be3b81485bdc..9feb57545ef1 100644 --- a/xen/include/Makefile +++ b/xen/include/Makefile @@ -45,15 +45,8 @@ public-$(CONFIG_ARM) :=3D $(wildcard public/arch-arm/*.h= public/arch-arm/*/*.h) .PHONY: all all: $(headers-y) =20 -compat/%.h: compat/%.i Makefile $(BASEDIR)/tools/compat-build-header.py - set -e; id=3D_$$(echo $@ | tr '[:lower:]-/.' '[:upper:]___'); \ - echo "#ifndef $$id" >$@.new; \ - echo "#define $$id" >>$@.new; \ - echo "#include " >>$@.new; \ - $(if $(filter-out compat/arch-%.h,$@),echo "#include <$(patsubst compat/%= ,public/%,$@)>" >>$@.new;) \ - grep -v '^# [0-9]' $< | \ - $(PYTHON) $(BASEDIR)/tools/compat-build-header.py | uniq >>$@.new; \ - echo "#endif /* $$id */" >>$@.new +compat/%.h: compat/%.i $(BASEDIR)/tools/compat-build-header.py + $(PYTHON) $(BASEDIR)/tools/compat-build-header.py <$< $@ >>$@.new; \ mv -f $@.new $@ =20 compat/%.i: compat/%.c Makefile diff --git a/xen/tools/compat-build-header.py b/xen/tools/compat-build-head= er.py index 065d3b1b6ee8..5f5474fba051 100755 --- a/xen/tools/compat-build-header.py +++ b/xen/tools/compat-build-header.py @@ -2,6 +2,12 @@ =20 import re,sys =20 +try: + maketrans =3D str.maketrans +except AttributeError: + # For python2 + from string import maketrans + pats =3D [ [ r"__InClUdE__(.*)", r"#include\1" ], [ r"__IfDeF__ (XEN_HAVE.*)", r"#ifdef \1" ], @@ -23,7 +29,41 @@ pats =3D [ [ r"(^|[^\w])long([^\w]|$$)", r"\1int\2" ] ]; =20 +output_filename =3D sys.argv[1] + +# tr '[:lower:]-/.' '[:upper:]___' +header_id =3D '_' + \ + output_filename.upper().translate(maketrans('-/.','___')) + +header =3D """#ifndef {0} +#define {0} +#include """.format(header_id) + +print(header) + +if not re.match("compat/arch-.*.h$", output_filename): + x =3D output_filename.replace("compat/","public/") + print('#include <%s>' % x) + +last_line_empty =3D False for line in sys.stdin.readlines(): + line =3D line.rstrip() + + # Remove linemarkers generated by the preprocessor. + if re.match(r"^# \d", line): + continue + + # De-duplicate empty lines. + if len(line) =3D=3D 0: + if not last_line_empty: + print(line) + last_line_empty =3D True + continue + else: + last_line_empty =3D False + for pat in pats: - line =3D re.subn(pat[0], pat[1], line)[0] - print(line.rstrip()) + line =3D re.sub(pat[0], pat[1], line) + print(line) + +print("#endif /* %s */" % header_id) --=20 Anthony PERARD From nobody Tue Apr 30 03:23:41 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1625148668; cv=none; d=zohomail.com; s=zohoarc; b=kIxBleyn/QJweXVBoQJs+ONZymK995W/XVTcvuWflc84hvIBZn3QRc1YeMekQ3EiZ24YDYMZ5rvIvdn5fHU5N4nPiKWTqkhoy2vLac/7tJIijH+t0x4eYj7L7B9ig1f12Y7csSLdGr61eyK625MBB5WBh7oQWs/p3GDPubVuzNM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1625148668; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=YzcWhTqxgMQCNow4GXcrL0m8L8J/NhLkgtrNzou1NEA=; b=ecds+zapuxhPIa467eKPlLQF0JD+iXbacvEmCBTJp6kaik2mVhtH/IN6z4YaL7AtkQObSqox5Gw2zZSkKK5abzrQn35FVcKPiO1WLPEUGckLMzEAaeYxHebqOg8JIHZGd7fPijUglx9x2ab9Fyl1VyjKg+BD+3ToaAu8PQHBVFk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 162514866809595.66691200030255; Thu, 1 Jul 2021 07:11:08 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.148716.274916 (Exim 4.92) (envelope-from ) id 1lyxP3-0001A3-R1; Thu, 01 Jul 2021 14:10:53 +0000 Received: by outflank-mailman (output) from mailman id 148716.274916; Thu, 01 Jul 2021 14:10:53 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lyxP3-000183-Kq; Thu, 01 Jul 2021 14:10:53 +0000 Received: by outflank-mailman (input) for mailman id 148716; Thu, 01 Jul 2021 14:10:52 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lyxP2-0005F9-Jg for xen-devel@lists.xenproject.org; Thu, 01 Jul 2021 14:10:52 +0000 Received: from esa1.hc3370-68.iphmx.com (unknown [216.71.145.142]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 184bf81a-da76-11eb-8327-12813bfff9fa; Thu, 01 Jul 2021 14:10:32 +0000 (UTC) X-Outflank-Mailman: Message body and most headers restored to incoming version 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" X-Inumbo-ID: 184bf81a-da76-11eb-8327-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1625148632; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=2WFDUvnAZmIMKGyUlu8KLXOxi1z1do7+jNPMy5fEh9Q=; b=HHS8m3PJMqEfShbC3br1fxuy3izyozdQk/J38+Hy6N3sd1/jHIfwoVMc yfr9Ow9m8VeSAU/yiBGlp3ZOY0tdQopWz78F/9LNmr28WI0xkz6JQk4ib AY+SS/AZJAdT90Rpr10Kh0s0Cc2S6UMTSbO41g1UXfl+HaJ9Zs53TzLD5 Y=; Authentication-Results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: Dls+lF5hiBXijky5vM+9nnAjrwEmsB23wra86iApibKZRVfZotBLVIGeJJHEQCC3VHZNUfkrja fSc+3ONCMCyMlkuaqQIuOVu5QsGl1xefaLtUoQAt0Wxg/dj88YZl0Ca8yAbAN+8jBVaClGtoth p0R3omGJRkxD+4qRurT1zmOcBkhfuNaAPi4ITsStNBMAo2T3VX6aHp+QRPZLWTec4Sz0GwBrW9 WSi50YZ5JYuJsOmL4sfCCXgdIYT6lM9l282r2voKg4fBp63/bCFWPsWHTojhS7nZuMv1mJNdq+ Wxs= X-SBRS: 5.1 X-MesageID: 47755348 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:U8zI+6N+cOO1kcBcT1H155DYdb4zR+YMi2TDiHoddfUFSKalfp 6V98jzjSWE8wr4WBkb6LO90dq7MAnhHP9OkMQs1NKZMDUO11HYS72KgbGC/9SkIVyHygc/79 YtT0EdMqyXMbESt6+Tj2eF+pQbsaC6GcuT9IXjJgJWPGVXgtZbnmJE42igcnFedU1jP94UBZ Cc7s1Iq36LYnIMdPm2AXEDQqzqu8DLvIiOW29JOzcXrC21yR+44r/zFBaVmj0EVSlU/Lsk+W /Z1yTk+6SYte2hwBO07R6T030Woqqg9jJwPr3PtiEnEESotu9uXvUkZ1S2hkF3nAho0idsrD CDmWZnAy050QKtQoj8m2qQ5+Cn6kdg15aq8y7mvVLz5cP+Xz40EMxHmMZQdQbY8VMpuJVm3L tMxH/xjesfMfrsplWL2zHzbWAdqqN0mwtRrccDy3hEFYcOYr5YqoISuEtTDZcbBSr/rIQqCv NnAs3Q7OtfNQryVQGTgkB/hNi3GngjFBaPRUYP/sSTzjhNhXh8i08V3tYWkHsM/I80D5NE++ PHOKJ1k6wmdL5fUUu8PpZ0fSKTMB2GffvhChPjHb3XLtBzB5uWke+H3Fwc3pDYRHUn9upNpK j8 X-IronPort-AV: E=Sophos;i="5.83,314,1616472000"; d="scan'208";a="47755348" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Ian Jackson" , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu Subject: [XEN PATCH v6 09/31] build: clean "lib.a" Date: Thu, 1 Jul 2021 15:09:49 +0100 Message-ID: <20210701141011.785641-10-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210701141011.785641-1-anthony.perard@citrix.com> References: <20210701141011.785641-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Anthony PERARD Acked-by: Jan Beulich --- xen/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/Makefile b/xen/Makefile index 360b4a1d1867..e4deceab2c9a 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -343,7 +343,7 @@ _clean: delete-unfresh-files $(MAKE) $(clean) test $(MAKE) -f $(BASEDIR)/tools/kconfig/Makefile.kconfig ARCH=3D$(ARCH) SRCAR= CH=3D$(SRCARCH) clean find . \( -name "*.o" -o -name ".*.d" -o -name ".*.d2" \ - -o -name "*.gcno" -o -name ".*.cmd" \) -exec rm -f {} \; + -o -name "*.gcno" -o -name ".*.cmd" -o -name "lib.a" \) -exec rm -f {} \; rm -f include/asm $(TARGET) $(TARGET).gz $(TARGET).efi $(TARGET).efi.map = $(TARGET)-syms $(TARGET)-syms.map *~ core rm -f asm-offsets.s include/asm-*/asm-offsets.h rm -f .banner --=20 Anthony PERARD From nobody Tue Apr 30 03:23:41 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1625148670; cv=none; d=zohomail.com; s=zohoarc; b=d63FBk62hl10oLLq0tXBxHqCIJd2qyD/O4td6xYMArxbiNuOQQRbUuFSuMj8Yx5QPORxFg8uE0D1TV0gRjEF9Jk1wKSJCL0Lj7Q7VzADDSGPxnDQTniw7uOEjg0duyEPfuHtx808EDyEFPX2ni+RfKXS38bKoUHiIOMkZFcBs0g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1625148670; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=TfghfO5m3zYfLmDsP7bFqkFaiErGVKDUz+6VHTFLJHI=; b=CdEIasDESUIa168Tal40RyJ4p/Oy7054LBNMJdzBktdIfvs+r6DFwY3ZuDXewxI0MvmZN0kBxBAkdJOxv0100HCMCOXUR0J3BEAkujkdiQks+X19VbAwwtwkOASJtuQ8ky5OZVqT2P64uNskO5erGXr1VLnY+cau/qdd+Cvi3z4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1625148670514982.8998136693873; Thu, 1 Jul 2021 07:11:10 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.148718.274928 (Exim 4.92) (envelope-from ) id 1lyxP9-0001xe-CI; Thu, 01 Jul 2021 14:10:59 +0000 Received: by outflank-mailman (output) from mailman id 148718.274928; Thu, 01 Jul 2021 14:10:59 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lyxP9-0001xE-7k; Thu, 01 Jul 2021 14:10:59 +0000 Received: by outflank-mailman (input) for mailman id 148718; Thu, 01 Jul 2021 14:10:57 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lyxP7-0005F9-Jw for xen-devel@lists.xenproject.org; Thu, 01 Jul 2021 14:10:57 +0000 Received: from esa3.hc3370-68.iphmx.com (unknown [216.71.145.155]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 1916428c-da76-11eb-8327-12813bfff9fa; Thu, 01 Jul 2021 14:10:33 +0000 (UTC) X-Outflank-Mailman: Message body and most headers restored to incoming version 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" X-Inumbo-ID: 1916428c-da76-11eb-8327-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1625148633; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=+mNOgsYjrFmWoNxBPJggXZS7DoTw6+WYH4Z2rQexo4M=; b=BvH0y00sbPb2wB7+eBju3BUjPhtXsz16o6bbZ1Crzt+2rd4ya9512AiR rAkvqhCK3T0A/hNYo2N0rUwhAWVSQ4kSxi6wXg0wftkN61YYQ6cmPxgCn DTIHjbIAsmdpPK3XoyUZ8N1CT2OG6+rCjDQ6nmYYvr5zMxK0s9EGJIhsx 8=; Authentication-Results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: r1gCmWINHhjbKSKErWNZwtKtXPUGKanRJOUw7HRnVp3h3EFpmQgP8qOxcR/IRhXRfYbYBcJbM7 sqsfpJRbq1Yer9qI3BSlMVATSaXhUbEj+4o63sdDuME7897nsFrWG4Y6wPVVtfGtS1WlcqBMRR wjVhMVZHjYW3SDXlm23C/zm9ryuW17cgmLnas8MyxF0xF1L8DkvoHFZ97Q92cM6FurGnPiBsum rpgKHuonpnXKhUB38Gy2NyrGh05JcVY+cgyZwcN7obuVT1nw4vxNnliaeTolltbMlUsriwMRou J5w= X-SBRS: 5.1 X-MesageID: 47384384 X-Ironport-Server: esa3.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:pqbNFK2Fb+IAVhT9QkyFfwqjBLQkLtp133Aq2lEZdPRUGvb2qy nIpoV96faUskdpZJhOo7G90cW7LE80sKQFg7X5Xo3SODUO2lHJEGgK1+KLqFfd8m/Fh4tgPM 9bAs5D4bbLY2SS4/yX3ODBKadC/OW6 X-IronPort-AV: E=Sophos;i="5.83,314,1616472000"; d="scan'208";a="47384384" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Ian Jackson" , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu Subject: [XEN PATCH v6 10/31] build: use $(kconfig) shortcut in clean rule Date: Thu, 1 Jul 2021 15:09:50 +0100 Message-ID: <20210701141011.785641-11-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210701141011.785641-1-anthony.perard@citrix.com> References: <20210701141011.785641-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Anthony PERARD Acked-by: Jan Beulich --- xen/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/Makefile b/xen/Makefile index e4deceab2c9a..dae0247067ff 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -341,7 +341,7 @@ _clean: delete-unfresh-files $(MAKE) $(clean) arch/riscv $(MAKE) $(clean) arch/x86 $(MAKE) $(clean) test - $(MAKE) -f $(BASEDIR)/tools/kconfig/Makefile.kconfig ARCH=3D$(ARCH) SRCAR= CH=3D$(SRCARCH) clean + $(MAKE) $(kconfig) clean find . \( -name "*.o" -o -name ".*.d" -o -name ".*.d2" \ -o -name "*.gcno" -o -name ".*.cmd" -o -name "lib.a" \) -exec rm -f {} \; rm -f include/asm $(TARGET) $(TARGET).gz $(TARGET).efi $(TARGET).efi.map = $(TARGET)-syms $(TARGET)-syms.map *~ core --=20 Anthony PERARD From nobody Tue Apr 30 03:23:41 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1625148677; cv=none; d=zohomail.com; s=zohoarc; b=l3ZUGjYIYBVuj1fnOy42s/DVkkKpo/Axv/mKpqqWcaD02ztiaxW5g9zhaWKubkcqZWzTmhukyaQptoXpTYS6+L0o4CE3/VnZHqam65+MjmZssRFA5DS1lv6mLBqHfKX67ci9kZpcLHeb9UFthW8BA5p6TlSjJ3KnyE/kzCXzvQs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1625148677; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=0TfhRnXqBIFegvogZFusevQUt+9f5kSO8KXZs5AreRw=; b=it0D9zFaB2lGjf/k/bZ14KijSntVCmEbATqeATB/E+omTQ6V1Z2TEpC5Q6s/qlXTrb0skLw0ei6s40gnq0rv4q2q2DD8EaUSiUUpoJZJy8ZeYS0zc9zbHpt7hVt6FX7O00NWN+Gte6taqy+HYxk0po7qMpUKj2IYfpwo7fS9NC8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1625148676998878.0565703122049; Thu, 1 Jul 2021 07:11:16 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.148720.274950 (Exim 4.92) (envelope-from ) id 1lyxPE-0002x2-44; Thu, 01 Jul 2021 14:11:04 +0000 Received: by outflank-mailman (output) from mailman id 148720.274950; Thu, 01 Jul 2021 14:11:04 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lyxPD-0002wk-Vq; Thu, 01 Jul 2021 14:11:03 +0000 Received: by outflank-mailman (input) for mailman id 148720; Thu, 01 Jul 2021 14:11:02 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lyxPC-0005F9-K1 for xen-devel@lists.xenproject.org; Thu, 01 Jul 2021 14:11:02 +0000 Received: from esa2.hc3370-68.iphmx.com (unknown [216.71.145.153]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 1a1c1c88-da76-11eb-8328-12813bfff9fa; Thu, 01 Jul 2021 14:10:35 +0000 (UTC) X-Outflank-Mailman: Message body and most headers restored to incoming version 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" X-Inumbo-ID: 1a1c1c88-da76-11eb-8328-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1625148635; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=YsKdP5YvQwz72PyZst34Fs58LUxCUW3nm9UPTFm+erc=; b=Q29apw6ypftOH/490vEziVLWVjfQGeauMxZ4Tiydmp6pRzvvAa0Bjtcs ica8vX0JMeGcvEDf1uoUZFYq1DhlgnObzoC+pivXhmxmVEyA617PGZUcR 8apwQ3ippUKZdHew5PH4JzfjKQ/qzybivUxH2hBrMj36aPQI2YJ25Omhc 8=; Authentication-Results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: Gl7gpFD2pCJm/M7MRaZCSy0jIjUuheQt71gIpKzZRJmorny4R1wgXdIXEWx2kMSa9kQ0I+OU9G NQzZK/HFxxwJXY6u9HXFz2LCU4pyaCe6qhszmQW+uYfpIywGumUK/u5/xhhm8FIpqA2oAZ6nL4 1jwQaOfeYXlEqqJrawW9TZI6LGRJ5Y/FXqD3F6oQYBgh5lf4LEw118uw5/1b/uEN7rLbRZRCjM HxyNweZqtU3IAURTb1tAaEBFSwWE7aD0+m/av9OPsp8qk8OeIiBAmVkw9FC4JeldeCnhz4Z/rb u6E= X-SBRS: 5.1 X-MesageID: 47376107 X-Ironport-Server: esa2.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:Vun1V6ljqiwuiZcxmBJSZYTwKj/pDfIm3DAbv31ZSRFFG/Fw9/ re/8jztCWE7Ar5N0tMpTntAsW9qBDnlaKdg7N+AV7KZmCP01dAR7sC0WKN+VLd84CUzIRgPS AKSdkaNDUlZmIK7/rH3A== X-IronPort-AV: E=Sophos;i="5.83,314,1616472000"; d="scan'208";a="47376107" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Ian Jackson" , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu Subject: [XEN PATCH v6 11/31] build: fix clean targets when subdir-y is used Date: Thu, 1 Jul 2021 15:09:51 +0100 Message-ID: <20210701141011.785641-12-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210701141011.785641-1-anthony.perard@citrix.com> References: <20210701141011.785641-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) Content-Type: text/plain; charset="utf-8" The make variable $(subdir-y) isn't used yet but will be in a following patch. Anything in $(subdir-y) doesn't to have a '/' as suffix as we already now it's a directory. Rework the rules so that it doesn't matter whether there is a '/' or not. It also mimic more closely to the way Linux's Kbuild descend in subdirectories. FORCE phony target isn't needed anymore running clean, so it can be removed. Signed-off-by: Anthony PERARD Reviewed-by: Jan Beulich --- xen/scripts/Makefile.clean | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/xen/scripts/Makefile.clean b/xen/scripts/Makefile.clean index 53379e6102cc..027c200c0efc 100644 --- a/xen/scripts/Makefile.clean +++ b/xen/scripts/Makefile.clean @@ -12,19 +12,18 @@ include Makefile # Figure out what we need to clean from the various variables # =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D subdir-all :=3D $(subdir-y) $(subdir-n) $(subdir-) \ - $(filter %/, $(obj-y) $(obj-n) $(obj-)) + $(patsubst %/,%, $(filter %/, $(obj-y) $(obj-n) $(obj-))) =20 DEPS_RM =3D $(DEPS) $(DEPS_INCLUDE) .PHONY: clean -clean:: $(addprefix _clean_, $(subdir-all)) +clean:: $(subdir-all) rm -f *.o .*.o.tmp *~ core $(DEPS_RM) =20 # Descending # ------------------------------------------------------------------------= --- =20 -_clean_%/: FORCE - $(MAKE) $(clean) $* +PHONY +=3D $(subdir-all) +$(subdir-all): + $(MAKE) $(clean) $@ =20 -# Force execution of pattern rules (for which PHONY cannot be directly use= d). -.PHONY: FORCE -FORCE: +.PHONY: $(PHONY) --=20 Anthony PERARD From nobody Tue Apr 30 03:23:41 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1625148708; cv=none; d=zohomail.com; s=zohoarc; b=h3bwiQAy1i4Tnet4+SyZUahp6oCRHDvts5J/YGx+ggMs6a42F3cpc9SzflUHxNPt4Q2+xNzKoqlv0fG7ncOgeCE6przEkb19wR2QiOQH9IQKj/bBMlTopBI9NP5i9pdwl9RwlCbB9vEsvRru72D0VXFuxbY5fqpr2EVilBTZ/ZY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1625148708; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=3C2XGJpKdL7eEM5pz5kBplF6YUrWs+vHiSSR7PomSE0=; b=jotGL5fae11mVS6YWVUMi67EcwTEqyyOidqsT5IERkxpBhAJ9h1AD0Z7gX/i7QvhDRMjRLBwLsNZmO2DAGpfQvYm5W73m+3W5tyB1l/iKlpzJxygEDjjBt9TiLBAS55TXCJaG9qTTwJ/FCNC4tNF8Iw85LnnhA4lRs1s6kfd4bQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1625148708406158.36479026114364; Thu, 1 Jul 2021 07:11:48 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.148725.274983 (Exim 4.92) (envelope-from ) id 1lyxPl-0005wC-BE; Thu, 01 Jul 2021 14:11:37 +0000 Received: by outflank-mailman (output) from mailman id 148725.274983; Thu, 01 Jul 2021 14:11:37 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lyxPl-0005vu-7S; Thu, 01 Jul 2021 14:11:37 +0000 Received: by outflank-mailman (input) for mailman id 148725; Thu, 01 Jul 2021 14:11:35 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lyxPH-0005F9-KI for xen-devel@lists.xenproject.org; Thu, 01 Jul 2021 14:11:07 +0000 Received: from esa3.hc3370-68.iphmx.com (unknown [216.71.145.155]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 1af898a2-da76-11eb-8328-12813bfff9fa; Thu, 01 Jul 2021 14:10:36 +0000 (UTC) X-Outflank-Mailman: Message body and most headers restored to incoming version 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" X-Inumbo-ID: 1af898a2-da76-11eb-8328-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1625148635; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=aeF7Kv7O4DhLszrRehfv9wqocK16xFjPyQnD/pOHJvE=; b=WL8qr6MQA+x8RdrBCE95NyrnzLnsiXABHSyLSZcVkr4ZyQVlbnW00MBj mr8GZpa4Y5hEhb3sckHQLmeChjfBdimVPZlqukINYTrlizr+HilQ3uvvH uckt1fprX5Mw8n2Wf9RMOIWBIudUQtCYf3DRyc/535Z+dPo6sKGW8OaEB I=; Authentication-Results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: T+nZT/JsDbYrezwdPi3ALHuuwvixwOuxi/FNoer4yP4Pnaf60DhTs+1eP/80q+GMRH94ovSYSd c53NoQcvvGgP1cYWY7Gk9ZYtghKWbTT0Bz/w2BTBZHJHTssm5raqpAOmmFSjrZvDgECmdiD7q4 CeooBiqXRxbHMni5y2ATcAQCcsvGo+dVnaEvhSuh4dzFHwZXD4zFQl2xJpnJsOWGNWCYUoOPDy C7UnsoBV5aomfgtaq9lkm53rQOnE7xwIHj4MnXGbKuVuiQq3D3NdY1toOIVbLqAox7BIYXlbWN QKw= X-SBRS: 5.1 X-MesageID: 47384392 X-Ironport-Server: esa3.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:GxVxraBj3K7mmOjlHemq55DYdb4zR+YMi2TC1yhKJiC9Ffbo8P xG/c5rrCMc5wxxZJhNo7290ey7MBHhHP1OkO0s1NWZPDUO0VHAROoJ0WKh+UyEJ8SXzJ866U 4KScZD4bPLYWSS9fyKgzWFLw== X-IronPort-AV: E=Sophos;i="5.83,314,1616472000"; d="scan'208";a="47384392" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Ian Jackson" , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu Subject: [XEN PATCH v6 12/31] build: use subdir-y in test/Makefile Date: Thu, 1 Jul 2021 15:09:52 +0100 Message-ID: <20210701141011.785641-13-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210701141011.785641-1-anthony.perard@citrix.com> References: <20210701141011.785641-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) Content-Type: text/plain; charset="utf-8" This allows Makefile.clean to recurse into livepatch without help. Signed-off-by: Anthony PERARD --- xen/test/Makefile | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/xen/test/Makefile b/xen/test/Makefile index aaa499664396..41e4d7bdb78b 100644 --- a/xen/test/Makefile +++ b/xen/test/Makefile @@ -4,15 +4,10 @@ tests all: build =20 ifneq ($(XEN_TARGET_ARCH),x86_32) # Xen 32-bit x86 hypervisor no longer supported, so has no test livepatches -SUBDIRS +=3D livepatch +subdir-y +=3D livepatch endif =20 install build subtree-force-update uninstall: %: - set -e; for s in $(SUBDIRS); do \ + set -e; for s in $(subdir-y); do \ $(MAKE) -f $(BASEDIR)/Rules.mk -C $$s $*; \ done - -clean:: - set -e; for s in $(SUBDIRS); do \ - $(MAKE) -f $(BASEDIR)/Rules.mk -C $$s $@; \ - done --=20 Anthony PERARD From nobody Tue Apr 30 03:23:41 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1625148666; cv=none; d=zohomail.com; s=zohoarc; b=gwvDHjbmkO8zvYoMwfP5E5LPOochuIXzvasDlpIYZZ5gdjQq0DhOpvC0J7B9S0/ZX+v4g6cBEmkxja6/d2veQq8lo7grpl/j0jrKoKsF4mmxndWlNKdz1AbdmkpCJOL0yQYiEkRAWhDSOwuINE5b5a+BKrSC/uvARmbx72rwxMM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1625148666; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=+wUzXpT3wD9OjJ7IAw2zQijd2nM9X5E2jDSO6AS0mk0=; b=jhuGMyy+YI6pipvFAvOib57N3VBmgaC4FhZSPJ8m0xc2SVygFSxvBKfJaoG3w0ZCH6i5TDVjcvHFnjNEYFRgVAMN0FKsalqUkhzE8emxVAusNhQYG7EXsCA7j3Zwt3/SudcmZV9l3qBXMM8LFfKJ73rr95E0k9hggX2fDDF0gPg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1625148666005628.9544715568036; Thu, 1 Jul 2021 07:11:06 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.148715.274906 (Exim 4.92) (envelope-from ) id 1lyxP2-0000mx-Dy; Thu, 01 Jul 2021 14:10:52 +0000 Received: by outflank-mailman (output) from mailman id 148715.274906; Thu, 01 Jul 2021 14:10:52 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lyxP2-0000lI-8H; Thu, 01 Jul 2021 14:10:52 +0000 Received: by outflank-mailman (input) for mailman id 148715; Thu, 01 Jul 2021 14:10:51 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lyxP1-0005tj-0R for xen-devel@lists.xenproject.org; Thu, 01 Jul 2021 14:10:51 +0000 Received: from esa4.hc3370-68.iphmx.com (unknown [216.71.155.144]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 9750316e-8fc7-49fa-b4c6-65a7a8682684; Thu, 01 Jul 2021 14:10:38 +0000 (UTC) X-Outflank-Mailman: Message body and most headers restored to incoming version 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" X-Inumbo-ID: 9750316e-8fc7-49fa-b4c6-65a7a8682684 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1625148637; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=y8SWyJ3p44fQ34F09ahZsCZGxd9yD3VsNGECNl35lHA=; b=BTkP9KZIzGwZ7ZB+cXXI9i1FEA1V0tKRob8pKou46ZcfUpIDC6d4nTL6 ODnG2sGoqvrkwkB4NeS6oVgvJwM6fPCLPYSxFKmc2soMQfep794qGABEG 0JCey909r8rjdmUe4zq3P0rqEqaaPa7TR0ehnc05LL8082A/HItU/bOf5 c=; Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: WhFgH9js5xlwKlXGtlC/Joz2aE4ybEandDbTUzHIuxQO6BOpDJqr3Dn/Eirb1DIDOWqRv9Eefh 0wH0QuXKhojgvB/yfeaNs0r61VHO24F68ufD9SDGF8ffW+xWBvp0Q5tVnHTOd4N6/1wNjQLEAx aI1BVhHu1lQPbW3POgx8ENbE8TqlmLBlGORSiqRv5yzOCYjWQfFkHDXCA/2bEyPvvNfkpzWHAR sVOTYK9kkBQrPMBQmf0in8M7rahj/jAp79FuNDbtxhtHPokOTN0Xj2J6r0AKj/RLyiAwyeZWIf eew= X-SBRS: 5.1 X-MesageID: 49007486 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:+M8RiK27SzyZ8UGeKRg56wqjBLQkLtp133Aq2lEZdPRUGvb2qy nIpoV96faUskdpZJhOo7G90cW7LE80sKQFg7X5Xo3SODUO2lHJEGgK1+KLqFfd8m/Fh4tgPM 9bAs5D4bbLY2SS4/yX3ODBKadC/OW6 X-IronPort-AV: E=Sophos;i="5.83,314,1616472000"; d="scan'208";a="49007486" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Ian Jackson" , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu Subject: [XEN PATCH v6 13/31] build,tools: have default rules depends on symbols Date: Thu, 1 Jul 2021 15:09:53 +0100 Message-ID: <20210701141011.785641-14-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210701141011.785641-1-anthony.perard@citrix.com> References: <20210701141011.785641-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) Content-Type: text/plain; charset="utf-8" No need to call $(MAKE) again. Signed-off-by: Anthony PERARD Acked-by: Jan Beulich --- xen/tools/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/xen/tools/Makefile b/xen/tools/Makefile index e940939d61f4..4e42163f981c 100644 --- a/xen/tools/Makefile +++ b/xen/tools/Makefile @@ -2,8 +2,7 @@ include $(XEN_ROOT)/Config.mk =20 .PHONY: default -default: - $(MAKE) symbols +default: symbols =20 .PHONY: clean clean: --=20 Anthony PERARD From nobody Tue Apr 30 03:23:41 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1625148672; cv=none; d=zohomail.com; s=zohoarc; b=kgwyPydN3Z6XfmDA1PogSbq4xycp/I5mWGiKOOgRHKWxyxsoFvScV8PI3dABzF/87s9Z0OmoZ/h5RDjB109/cmGAQ4hKxS0WPW093/tw2Ek/hVww2XiqmbL0F6dfZYM64d7p1sGw53ZDeFukuZlxJjONqPtkEvcmfAsWXzC+ALY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1625148672; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=ixBHTXI55a6ZLxn4/hINdtwUiA0zerKFWjaRtxWxf9I=; b=KzIFgJB1oeJWSjXdl5x7XnJrTMmXqLn2xmYuLoCqUzywNgVkpHSedXUj7BT7HizutEReTD1wg+0uUJYnhx0lYwyLtdg8DspAU4VhTIutFijJu5eDabPQAlei/PSOgwXQUtWZFsmOJ19ZrFarpPTff89UDmolfbvWikLuEQihBYc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1625148672642797.0150551803576; Thu, 1 Jul 2021 07:11:12 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.148719.274939 (Exim 4.92) (envelope-from ) id 1lyxPB-0002OX-Pc; Thu, 01 Jul 2021 14:11:01 +0000 Received: by outflank-mailman (output) from mailman id 148719.274939; Thu, 01 Jul 2021 14:11:01 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lyxPB-0002O2-Jm; Thu, 01 Jul 2021 14:11:01 +0000 Received: by outflank-mailman (input) for mailman id 148719; Thu, 01 Jul 2021 14:11:01 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lyxPB-0005tj-1K for xen-devel@lists.xenproject.org; Thu, 01 Jul 2021 14:11:01 +0000 Received: from esa4.hc3370-68.iphmx.com (unknown [216.71.155.144]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id dc51d3e3-e9ff-4cf0-8250-e11fa1c9f0c9; Thu, 01 Jul 2021 14:10:38 +0000 (UTC) X-Outflank-Mailman: Message body and most headers restored to incoming version 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" X-Inumbo-ID: dc51d3e3-e9ff-4cf0-8250-e11fa1c9f0c9 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1625148638; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=uLKI3ja1OUbts2SnkXQR8tTgRcFYuztp8ELRrsey8HY=; b=GzMrmv93g75dGvqNHP/ElWe5XWY5IsPA/7go3q8fnKFgzZZaRgbp5Cg2 wIGhO229pBS4nowzeIHkpnnrH1vSpQHK1HnTdu2FFtp27EvL+E0kIjZ4p yFzc92awQV9mjR16peojouoWcKDDWA8653djOcor0Y3qbR+dijDuabRsT s=; Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: wIO4LSAo1RB0HaT/akOTS3NCz9fKPQLBQUbVveOV7ZDsxOUA6h6frkF1StbkTbFdNID1zjly80 pWCRm8a8pjU4Nrv+jvHD8wTjx+0gqGylMuUCK4JnKgI1f/Yy/YR3KbTu+0E2P3D7o0Xu8TZQ2i C/TDLPzF1zcft4irDJL81YbVQwxjfyVLArodacQF7kUFEh2JlwmD1h32z61mi43PctvgQdaTBQ quhDcHx9v0aM1oQBZC/dAgjzkegd/OZtGjZsb6QUI4l2AD3BCeqk/wCCQ5TFvywtHae1rrkabJ ncQ= X-SBRS: 5.1 X-MesageID: 49007487 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:kwHH2qx3bz8ADejhFK2EKrPwFL1zdoMgy1knxilNoRw8SKKlfq eV7ZImPH7P+U4ssR4b+exoVJPtfZqYz+8R3WBzB8bEYOCFghrKEGgK1+KLqFeMJ8S9zJ846U 4JSdkGNDSaNzlHZKjBjzVQa+xQouW6zA== X-IronPort-AV: E=Sophos;i="5.83,314,1616472000"; d="scan'208";a="49007487" From: Anthony PERARD To: CC: Anthony PERARD , Stefano Stabellini , Julien Grall , Volodymyr Babchuk Subject: [XEN PATCH v6 14/31] build,arm: move LDFLAGS change to arch.mk Date: Thu, 1 Jul 2021 15:09:54 +0100 Message-ID: <20210701141011.785641-15-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210701141011.785641-1-anthony.perard@citrix.com> References: <20210701141011.785641-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Anthony PERARD --- xen/arch/arm/Makefile | 8 -------- xen/arch/arm/arch.mk | 8 ++++++++ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile index 0edd9dee6f49..3d0af8ebc93c 100644 --- a/xen/arch/arm/Makefile +++ b/xen/arch/arm/Makefile @@ -104,14 +104,6 @@ prelink.o: $(ALL_OBJS) $(ALL_LIBS) FORCE $(call if_changed,ld) endif =20 -ifeq ($(CONFIG_ARM64_ERRATUM_843419),y) - ifeq ($(call ld-option, --fix-cortex-a53-843419),n) - $(warning ld does not support --fix-cortex-a53-843419; xen may be = susceptible to erratum) - else - XEN_LDFLAGS +=3D --fix-cortex-a53-843419 - endif -endif - targets +=3D prelink.o =20 $(TARGET)-syms: prelink.o xen.lds diff --git a/xen/arch/arm/arch.mk b/xen/arch/arm/arch.mk index 11caec86ba14..6a2982059486 100644 --- a/xen/arch/arm/arch.mk +++ b/xen/arch/arm/arch.mk @@ -17,3 +17,11 @@ $(call cc-option-add,CFLAGS-$(CONFIG_ARM_64),CC,-mno-out= line-atomics) ifneq ($(filter command line environment,$(origin CONFIG_EARLY_PRINTK)),) $(error You must use 'make menuconfig' to enable/disable early printk = now) endif + +ifeq ($(CONFIG_ARM64_ERRATUM_843419),y) + ifeq ($(call ld-option, --fix-cortex-a53-843419),n) + $(warning ld does not support --fix-cortex-a53-843419; xen may be = susceptible to erratum) + else + LDFLAGS +=3D --fix-cortex-a53-843419 + endif +endif --=20 Anthony PERARD From nobody Tue Apr 30 03:23:41 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1625148683; cv=none; d=zohomail.com; s=zohoarc; b=Zuv+0iGuKK0wdh3xZrZ6gsyhcD7IBjfK6DeLj5ljJS7qgiTnqYHlSkcgWsEdr8yKiYqvrzMXF/am95LZcT2czhFfA6iqQiOIwjNJfxERJzAgyEJrvnAYM46MuXR8mQkrR2hB1AXSVRwUbYeUyJ/FYwMr6iuazTpYVD8rftiE3dc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1625148683; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Mxk2eYKVxlE1az/k0XuMTQ0Hc7nqOlnE2mlh4A+NO8s=; b=dqMakEigfN4ODz2ZAGumycvKYn+vKcRhwRXPcW18r+lx/AuFqs5mtBTa6yZ5FHewHR4h0I4w8fwSQ9xfYgUNm4UXZz1QvdrPPYEurx59nJf25O2gzCmetE3zHTOVWSaXNsT0/2zBf1blPjpwYRDhT44/K67b4UkJaU2FhyH6ukI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1625148683070241.1273839130696; Thu, 1 Jul 2021 07:11:23 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.148722.274961 (Exim 4.92) (envelope-from ) id 1lyxPM-00040O-Lz; Thu, 01 Jul 2021 14:11:12 +0000 Received: by outflank-mailman (output) from mailman id 148722.274961; Thu, 01 Jul 2021 14:11:12 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lyxPM-000406-Hy; Thu, 01 Jul 2021 14:11:12 +0000 Received: by outflank-mailman (input) for mailman id 148722; Thu, 01 Jul 2021 14:11:11 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lyxPL-0005tj-1D for xen-devel@lists.xenproject.org; Thu, 01 Jul 2021 14:11:11 +0000 Received: from esa5.hc3370-68.iphmx.com (unknown [216.71.155.168]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id c3ababa9-cdb4-485b-a491-5eb323d0578c; Thu, 01 Jul 2021 14:10:40 +0000 (UTC) X-Outflank-Mailman: Message body and most headers restored to incoming version 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" X-Inumbo-ID: c3ababa9-cdb4-485b-a491-5eb323d0578c DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1625148640; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=mqaWfEcjARBVnWLFkl8yloMkvtnZhEKKi1UvpQrE8eE=; b=V/QnKzyBSD7idx/X9I+01F7g53WK5ZZqgkGaBOJkxYze6WhJztK+wVT8 4OAfgRSIt1NgODyl3oS435XuEeY/bSC5FyfE0rd9ORpAUPlvzpHO1UkG4 FymPQRCVQKJXVLRl3kOTppKQxtmDLC3eXVTAECcYgiC1WANA9TA1TK87T M=; Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: QB1JIgJBju7vB+HZgMiwhjOl7rzVaEimuCoCTSoV99oRVVvqXoPWgfEZzlAV0yt9Z/h6VjZ+Xi Kg+yqw86il+GmltT/+2CWPXZsFpY+GYXHVxVuSNVDplj1hCAQYJ/iC4+bvuP8OAhXhCxH1rKGS t6RM0ZoMFNGYdkxwRKHOEw6pTfxcDzVVNJ2ZRFEjm553cpvVqYRvv7MIAm4O8PJW8K967KPYzv D/h/2BlvgGKhRlcNSpw5+d6pM6nqRmrlt+XI4mCRY2Y+SQRTveRw41dd+BlOLBGoaTVWRI7KNj atU= X-SBRS: 5.1 X-MesageID: 47093349 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:GlAQNKqRnYb+k9v+WBdo34saV5oTeYIsimQD101hICG8cqSj+f xG+85rsyMc6QxhIE3I9urhBEDtex/hHNtOkOws1NSZLW7bUQmTXeJfBOLZqlWKcUDDH6xmpM NdmsBFeaTN5DNB7PoSjjPWLz9Z+qjkzJyV X-IronPort-AV: E=Sophos;i="5.83,314,1616472000"; d="scan'208";a="47093349" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Ian Jackson" , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu Subject: [XEN PATCH v6 15/31] build: move make option changes check earlier Date: Thu, 1 Jul 2021 15:09:55 +0100 Message-ID: <20210701141011.785641-16-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210701141011.785641-1-anthony.perard@citrix.com> References: <20210701141011.785641-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) Content-Type: text/plain; charset="utf-8" And thus avoiding checking for those variable over and over again. Signed-off-by: Anthony PERARD Acked-by: Jan Beulich --- xen/Makefile | 22 ++++++++++++++++++++++ xen/Rules.mk | 22 ---------------------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/xen/Makefile b/xen/Makefile index dae0247067ff..06d7bfab3e2c 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -56,6 +56,28 @@ include scripts/Kbuild.include ifneq ($(root-make-done),y) # section to run before calling Rules.mk, but only once. =20 +ifneq ($(origin crash_debug),undefined) +$(error "You must use 'make menuconfig' to enable/disable crash_debug now.= ") +endif +ifeq ($(origin debug),command line) +$(warning "You must use 'make menuconfig' to enable/disable debug now.") +endif +ifneq ($(origin frame_pointer),undefined) +$(error "You must use 'make menuconfig' to enable/disable frame_pointer no= w.") +endif +ifneq ($(origin kexec),undefined) +$(error "You must use 'make menuconfig' to enable/disable kexec now.") +endif +ifneq ($(origin lock_profile),undefined) +$(error "You must use 'make menuconfig' to enable/disable lock_profile now= .") +endif +ifneq ($(origin perfc),undefined) +$(error "You must use 'make menuconfig' to enable/disable perfc now.") +endif +ifneq ($(origin verbose),undefined) +$(error "You must use 'make menuconfig' to enable/disable verbose now.") +endif + # Beautify output # ------------------------------------------------------------------------= --- # diff --git a/xen/Rules.mk b/xen/Rules.mk index ede408efc515..894f2b83a04e 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -9,28 +9,6 @@ include $(XEN_ROOT)/Config.mk include $(BASEDIR)/scripts/Kbuild.include =20 =20 -ifneq ($(origin crash_debug),undefined) -$(error "You must use 'make menuconfig' to enable/disable crash_debug now.= ") -endif -ifeq ($(origin debug),command line) -$(warning "You must use 'make menuconfig' to enable/disable debug now.") -endif -ifneq ($(origin frame_pointer),undefined) -$(error "You must use 'make menuconfig' to enable/disable frame_pointer no= w.") -endif -ifneq ($(origin kexec),undefined) -$(error "You must use 'make menuconfig' to enable/disable kexec now.") -endif -ifneq ($(origin lock_profile),undefined) -$(error "You must use 'make menuconfig' to enable/disable lock_profile now= .") -endif -ifneq ($(origin perfc),undefined) -$(error "You must use 'make menuconfig' to enable/disable perfc now.") -endif -ifneq ($(origin verbose),undefined) -$(error "You must use 'make menuconfig' to enable/disable verbose now.") -endif - TARGET :=3D $(BASEDIR)/xen =20 # Note that link order matters! --=20 Anthony PERARD From nobody Tue Apr 30 03:23:41 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1625148708; cv=none; d=zohomail.com; s=zohoarc; b=hHepS3e1MM/gtdOCv75fCvT2Wh7NJi4S+Mvv5TgsYbN85Bi0e/U0q+hdn1dlnxaIELmDc6R+hYoCUWoRfGZ400mJmCVYUkCzUCi2/cqhyJOhlu4e+PlEc2MVBmYOmRaefB75wr4AFRy4o4HOGKmhFwFQLaUOrhUOo0eNQYKWsJA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1625148708; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=+OW9VZ6pX0Ynrm2kV706VKXurgQ2SkndC4ANU+Zr5J0=; b=RdgKwofRPTBAbmtl5xHbZn1K7BbUXTuN9VaJ11+vl9IMDZ2/EXuM5qUKlolIDb+wvAiUrrh8+TRMaqhDKipraS0iq0QBXdlYKIcYRhgHIIijF2UqbY1vq9FV4QMfvjekc8L9y+n+vCFLT2+An+zF76D9UUd819imRnpX5ZYLkkM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1625148708199247.42334349617408; Thu, 1 Jul 2021 07:11:48 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.148723.274972 (Exim 4.92) (envelope-from ) id 1lyxPj-0005br-1X; Thu, 01 Jul 2021 14:11:35 +0000 Received: by outflank-mailman (output) from mailman id 148723.274972; Thu, 01 Jul 2021 14:11:35 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lyxPi-0005bc-UR; Thu, 01 Jul 2021 14:11:34 +0000 Received: by outflank-mailman (input) for mailman id 148723; Thu, 01 Jul 2021 14:11:34 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lyxPQ-0005tj-1B for xen-devel@lists.xenproject.org; Thu, 01 Jul 2021 14:11:16 +0000 Received: from esa5.hc3370-68.iphmx.com (unknown [216.71.155.168]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id b66e1eab-b8ae-48a5-a179-fd2a76fe5be5; Thu, 01 Jul 2021 14:10:42 +0000 (UTC) X-Outflank-Mailman: Message body and most headers restored to incoming version 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" X-Inumbo-ID: b66e1eab-b8ae-48a5-a179-fd2a76fe5be5 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1625148642; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=fDJGU3FkNLcK/b6b+O2MvcAjqOVoHCERsz8l937Wo3Y=; b=RITo4k8GBDsKxs9WtVh7mdRGibRgzUglQn76NioOkl2tPHswO3a4xB67 pxnkSkcAdU/F4LNBFunTSUti8i4P+ookTmXoNIC1O14BhzR54znyrO3bp aMQXTSG1P9nAEcN9wGouZB60jpyjX+BNequ+nQsIFs28xy3R+bMcRL319 o=; Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: ME0FSXPCr5qneEQ3bqxXA1FhkzMSN+hx4FUkzBNSr/GN+K+AAw0cdUFgmbQSgJbvKeUq1CR7Hk XP6/NlvO0uNNo4KjAZW8lfl8mU9oEXU+ZW2Om8tmobiLYCtgnAQhrC2BQ0HRnGRqJFK08kQaZ0 4illMf3xHfttdTutn/1CgxAw+GUOBvW6EQtVl+EGQSzFZqnEKwF999DP72dm+Hne07AG3uvdF4 76A4We69tsBzDNNoujunXbhWQ3yQyDAt2ZXicuUhZ6MlhZtp1LsbNUne6OJ5CoAjg0XCIgCAHZ 8c8= X-SBRS: 5.1 X-MesageID: 47093352 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:dtpGEa9pNNDiOdvCFWBuk+DgI+orL9Y04lQ7vn2YSXRuHPBw8P re+sjztCWE8Ar5N0tBpTntAsW9qDbnhPtICOoqTNCftWvdyQiVxehZhOOIqVDd8m/Fh4pgPM 9bAtFD4bbLbGSS4/yU3ODBKadD/OW6 X-IronPort-AV: E=Sophos;i="5.83,314,1616472000"; d="scan'208";a="47093352" From: Anthony PERARD To: CC: Anthony PERARD , Stefano Stabellini , Julien Grall , Volodymyr Babchuk Subject: [XEN PATCH v6 16/31] build: avoid building arm/arm/*/head.o twice Date: Thu, 1 Jul 2021 15:09:56 +0100 Message-ID: <20210701141011.785641-17-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210701141011.785641-1-anthony.perard@citrix.com> References: <20210701141011.785641-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) Content-Type: text/plain; charset="utf-8" head.o is been built twice, once because it is in $(ALL_OBJS) and a second time because it is in $(extra-y) and thus it is rebuilt when building "arch/arm/built_in.o". Fix this by adding a dependency of "head.o" on the directory "arch/arm/". Also, we should avoid building object that are in subdirectories, so move the declaration in there. This doesn't change anything as "arch/arm/built_in.o" depends on "arch/arm/$subarch/built_in.o" which depends on $(extra-y), so we still need to depend on "arch/arm/built_in.o". Signed-off-by: Anthony PERARD --- xen/arch/arm/Makefile | 7 ++++++- xen/arch/arm/arm32/Makefile | 1 + xen/arch/arm/arm64/Makefile | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile index 3d0af8ebc93c..cc90d9796e6e 100644 --- a/xen/arch/arm/Makefile +++ b/xen/arch/arm/Makefile @@ -64,7 +64,6 @@ obj-$(CONFIG_SBSA_VUART_CONSOLE) +=3D vpl011.o obj-y +=3D vsmc.o obj-y +=3D vpsci.o obj-y +=3D vuart.o -extra-y +=3D $(TARGET_SUBARCH)/head.o =20 extra-y +=3D xen.lds =20 @@ -76,6 +75,12 @@ endif =20 ALL_OBJS :=3D $(TARGET_SUBARCH)/head.o $(ALL_OBJS) =20 +# head.o is built by descending into the sub-directory, depends on the par= t of +# $(ALL_OBJS) that will eventually recurse into $(TARGET_SUBARCH)/ and bui= ld +# head.o +$(TARGET_SUBARCH)/head.o: $(BASEDIR)/arch/arm/built_in.o +$(TARGET_SUBARCH)/head.o: ; + ifdef CONFIG_LIVEPATCH all_symbols =3D --all-symbols ifdef CONFIG_FAST_SYMBOL_LOOKUP diff --git a/xen/arch/arm/arm32/Makefile b/xen/arch/arm/arm32/Makefile index 96105d238307..3040eabce3ad 100644 --- a/xen/arch/arm/arm32/Makefile +++ b/xen/arch/arm/arm32/Makefile @@ -11,3 +11,4 @@ obj-y +=3D smpboot.o obj-y +=3D traps.o obj-y +=3D vfp.o =20 +extra-y +=3D head.o diff --git a/xen/arch/arm/arm64/Makefile b/xen/arch/arm/arm64/Makefile index 40642ff57494..0bb284dedab2 100644 --- a/xen/arch/arm/arm64/Makefile +++ b/xen/arch/arm/arm64/Makefile @@ -13,3 +13,5 @@ obj-y +=3D smpboot.o obj-y +=3D traps.o obj-y +=3D vfp.o obj-y +=3D vsysreg.o + +extra-y +=3D head.o --=20 Anthony PERARD From nobody Tue Apr 30 03:23:41 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1625148709; cv=none; d=zohomail.com; s=zohoarc; b=e0PA1X0vdhYEB5M6ofBVegRLnLytV+0mZiouBVNcEx8fpPfDuXOmWUHeVO0kHT4JhufGNmTR+r5W+2hf/2OcIHr51OetlkeN5qsQbErr4B7iLQSR4BxM0L3Hv1uLuXkSoE76tkBOB8v5AlujXphtCiCPuwoZlG5azJSrRWbUwgs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1625148709; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=5cO/mbEa533STY/b435SKVThy0uPAcBUxWFPPQbUSvU=; b=KnazdyQPfqddAofz6KFeD3DEoKe9epGwRCzAOhKVgJq/KSudQdEOQ2csBLK4HMdjr2wWBcuDyJeY+ioFJbBSaI5txNYMse97OaTSqd00nXG911Rfi8+b0BcDdkGeDnkszdmRfJKeAfV91pU0k/V8ghHOee7cBbsZuObIA1txZwc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1625148709740745.3051122779532; Thu, 1 Jul 2021 07:11:49 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.148728.274994 (Exim 4.92) (envelope-from ) id 1lyxPm-00063p-5y; Thu, 01 Jul 2021 14:11:38 +0000 Received: by outflank-mailman (output) from mailman id 148728.274994; Thu, 01 Jul 2021 14:11:38 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lyxPl-00061q-So; Thu, 01 Jul 2021 14:11:37 +0000 Received: by outflank-mailman (input) for mailman id 148728; Thu, 01 Jul 2021 14:11:36 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lyxPa-0005tj-1k for xen-devel@lists.xenproject.org; Thu, 01 Jul 2021 14:11:26 +0000 Received: from esa1.hc3370-68.iphmx.com (unknown [216.71.145.142]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id f25f2d19-cf1c-4c7d-836e-4235e74b1443; Thu, 01 Jul 2021 14:10:44 +0000 (UTC) X-Outflank-Mailman: Message body and most headers restored to incoming version 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" X-Inumbo-ID: f25f2d19-cf1c-4c7d-836e-4235e74b1443 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1625148644; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=PhrWzllsmLHVtsvEGcbavRIVcyx12iALMT+0SLc+Lhs=; b=QDp7U/jDvk/GYunNHwWNG1Jbmm5eBEkeRjBJx55HcvbRjAJQSHtIBnxA maVvccfueKvfOpapATahyjuSl8Ww9O0K5eM/fBK6aoL1Pn+wObPRooyZe 7TB/O3mNFSuKl/kcFOEtDIhfNn8VvPQXRtSeY488R4Ja+jPIwSyisb4lG 4=; Authentication-Results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: EXPDeoC24V8gZrB7FKnrI6Hlp/UMZnCQskM3aLrQz5qmeKZoJKWdRMQtbs+qoED/o4hvORc5Zo 1fggobvKcCsk61ozDgD2rc9452v19ekrMDIi988o8VhT6f3a9Sze0DCYqk3BdlK9NjCxECes1Y QsqKjq3yHLFPKBKpETAj+5pu9onZx0h24DDHEbN6vGnIl3BL5e2JUz1URQya6xXaFxUNCxKPR3 WOQCrWldnhbyhv2uvezBX4cfqK/aC++ah8qPIDjBmkcOk4MaH/0EA/xONuiv1FYtjvLqKF1xlv zyg= X-SBRS: 5.1 X-MesageID: 47755362 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:kw4536p8biEpunqYJdebNQgaV5r5eYIsimQD101hICG9E/b4qy nAppwmPHPP4wr5eUtQ+uxoW5PvfZq/z/JICOAqVItKOjONhILBFvAG0WKI+VLd8kPFm9K1rp 0BT0C1YOeAaWSTTq7BkW6F+6xL+qj/zEjy792ut0uECWpRGtxdB8IQMHf8LqWzLDM2fqbQ0/ Knl7B6T87JQwV0UviG X-IronPort-AV: E=Sophos;i="5.83,314,1616472000"; d="scan'208";a="47755362" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Ian Jackson" , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu , Daniel De Graaf , "Daniel P. Smith" Subject: [XEN PATCH v6 17/31] build: convert binfile use to if_changed Date: Thu, 1 Jul 2021 15:09:57 +0100 Message-ID: <20210701141011.785641-18-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210701141011.785641-1-anthony.perard@citrix.com> References: <20210701141011.785641-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) Content-Type: text/plain; charset="utf-8" This will allow to detect command line changes and allow to regenerate the file in that case. Signed-off-by: Anthony PERARD --- xen/common/Makefile | 8 ++++++-- xen/xsm/flask/Makefile | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/xen/common/Makefile b/xen/common/Makefile index 54de70d42278..93df3178b71f 100644 --- a/xen/common/Makefile +++ b/xen/common/Makefile @@ -80,8 +80,12 @@ config.gz: $(CONF_FILE) =20 config_data.o: config.gz =20 -config_data.S: $(BASEDIR)/tools/binfile - $(SHELL) $(BASEDIR)/tools/binfile $@ config.gz xen_config_data +quiet_cmd_binfile =3D BINFILE $@ +cmd_binfile =3D $(SHELL) $< $@ config.gz xen_config_data + +config_data.S: $(BASEDIR)/tools/binfile FORCE + $(call if_changed,binfile) +targets +=3D config_data.S =20 clean:: rm -f config_data.S config.gz 2>/dev/null diff --git a/xen/xsm/flask/Makefile b/xen/xsm/flask/Makefile index 637159ad8276..0ad15cb16606 100644 --- a/xen/xsm/flask/Makefile +++ b/xen/xsm/flask/Makefile @@ -35,8 +35,12 @@ $(subst include/,%/,$(AV_H_FILES)): $(AV_H_DEPEND) $(mka= ccess) FORCE obj-bin-$(CONFIG_XSM_FLASK_POLICY) +=3D flask-policy.o flask-policy.o: policy.bin =20 -flask-policy.S: $(BASEDIR)/tools/binfile - $(SHELL) $(BASEDIR)/tools/binfile -i $@ policy.bin xsm_flask_init_policy +quiet_cmd_binfile =3D BINFILE $@ +cmd_binfile =3D $(SHELL) $< -i $@ policy.bin xsm_flask_init_policy + +flask-policy.S: $(BASEDIR)/tools/binfile FORCE + $(call if_changed,binfile) +targets +=3D flask-policy.S =20 FLASK_BUILD_DIR :=3D $(CURDIR) POLICY_SRC :=3D $(FLASK_BUILD_DIR)/xenpolicy-$(XEN_FULLVERSION) --=20 Anthony PERARD From nobody Tue Apr 30 03:23:41 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1625149331; cv=none; d=zohomail.com; s=zohoarc; b=D3snWUTVz0O7c67P4uxMZVnJrvL9V5zeZn08Ozhlmb22l/6Q528tFw6ZfJLYZQqxC1ufSClIW4RneLc3hKdeXGNwhXTrLQTGcJfrcymwDiZHKF5tw9v9c90uscYdpPjxx3ZOR8Y1vVpVIhbyStyy6351vk/DhPuPdz3cRXIamoU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1625149331; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=iW4jmj3tbuMno/hAcnFZqDWF5SBWl2aMBJ5KI4gIGTU=; b=n1D2IN4yhbBn7mxVlzJbq1CRwgIw9IXS5nhSX/U78lLCBgQLzq6ROuemcHllujRxqTginMVdi+ba+j3gn0Glylew0pXbDTTL8OnLQvv/m+U1TRbokg2PsnpXk5+0v+1szmue0Way4207ubwymI9nMotmzyyO6plMTio3irNp7Z0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1625149331078965.8819963026672; Thu, 1 Jul 2021 07:22:11 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.148800.275125 (Exim 4.92) (envelope-from ) id 1lyxZf-0004c3-GI; Thu, 01 Jul 2021 14:21:51 +0000 Received: by outflank-mailman (output) from mailman id 148800.275125; Thu, 01 Jul 2021 14:21:51 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lyxZf-0004aL-4a; Thu, 01 Jul 2021 14:21:51 +0000 Received: by outflank-mailman (input) for mailman id 148800; Thu, 01 Jul 2021 14:21:49 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lyxQ9-0005tj-2T for xen-devel@lists.xenproject.org; Thu, 01 Jul 2021 14:12:01 +0000 Received: from esa6.hc3370-68.iphmx.com (unknown [216.71.155.175]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 14314842-9033-4700-8274-ee518aa90883; Thu, 01 Jul 2021 14:10:50 +0000 (UTC) X-Outflank-Mailman: Message body and most headers restored to incoming version 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" X-Inumbo-ID: 14314842-9033-4700-8274-ee518aa90883 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1625148650; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=wMjlawSRiHWoCe7r05Ixqb8i36LDLWl65IFqglV03NE=; b=do6jNoofOfnXTttEgepaHSGq5kt9anqnWGtjZzxTgkM1ZO2Ww799UQZS U2Jskkcj+nlx6MV6ZDNCC922rAWy78EW4af/Q/BntHTLpNTz4/2nnteGx bwYqmek8Sl4c/REyHmRYheBpy4WxRGE7BqFTHgJPmBZ/pabi4ropw4JZ7 w=; Authentication-Results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: KgwEwwFdSBHbhudaD0OB5De4OnkPFINgasweJBn6pR6QQ/NUuqOlmp6gehc6fy/LN+yub+3WJp XzCi6DTGhEu2+nsdMT897ZyEx0H4InQTwmoIdV1NSD+tkJuJukgjQAiDSUh6yJ5FJnlNrK6CGE +4XHn1lDokFsEGeECg0IcP3OgBEJzWfrILQYCdTmveOxs51UaT4L+4XEyqfohwOw//jC/U2Y/o MhY+W9uwbqDrplUwc2mHnf3OOczOxMwr2FrI80eYKHZhZOCI56swkvU7KcnBHSyTGtwvDSlDQu sfY= X-SBRS: 5.1 X-MesageID: 47446833 X-Ironport-Server: esa6.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:8nisKqj4p6cD5EExsIYXmfKnd3BQXgkji2hC6mlwRA09TyVXrb HMoB19726OtN/LYgBZpTnkAsK9qBznhPlICOUqUotKGTOKhILKFvAa0WKB+UyEJ8SWzIc06U 4jScRD4fLLfDxHZK3BjjVQfexB/DEPm5rDuQ9Rp00dMD2Dt8lbnn1EIzfeMEF7XTNLAodRLv uhDrMtnUvHRZ1uVLXYOkU4 X-IronPort-AV: E=Sophos;i="5.83,314,1616472000"; d="scan'208";a="47446833" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Ian Jackson" , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu , Tamas K Lengyel , Alexandru Isaila , Petre Pircalabu , Volodymyr Babchuk , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , "Konrad Rzeszutek Wilk" , Ross Lagerwall , Paul Durrant , Jun Nakajima , "Kevin Tian" , Lukasz Hawrylko , Bob Eshleman , Alistair Francis , Connor Davis Subject: [XEN PATCH v6 18/31] xen: move include/asm-* to include/arch-*/asm Date: Thu, 1 Jul 2021 15:09:58 +0100 Message-ID: <20210701141011.785641-19-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210701141011.785641-1-anthony.perard@citrix.com> References: <20210701141011.785641-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) This avoid the need to create the symbolic link "include/asm". Signed-off-by: Anthony PERARD Acked-by: Paul Durrant --- Other possible locations that I could think of: include/arch/*/asm arch/*/include/asm --- .gitignore | 5 ++- MAINTAINERS | 36 +++++++++---------- tools/include/Makefile | 2 +- tools/misc/xen-access.c | 4 +-- tools/tests/vhpet/Makefile | 2 +- xen/Makefile | 13 ++++--- xen/arch/arm/README.LinuxPrimitives | 10 +++--- xen/arch/arm/arch.mk | 1 + xen/arch/arm/arm32/head.S | 2 +- xen/arch/arm/arm64/head.S | 2 +- xen/arch/arm/smpboot.c | 2 +- xen/arch/arm/vpsci.c | 2 +- xen/arch/x86/Makefile | 6 ++-- xen/arch/x86/arch.mk | 5 +-- xen/common/efi/runtime.c | 14 ++++---- xen/common/page_alloc.c | 2 +- xen/include/{asm-arm =3D> arch-arm/asm}/acpi.h | 0 .../{asm-arm =3D> arch-arm/asm}/alternative.h | 0 .../{asm-arm =3D> arch-arm/asm}/altp2m.h | 0 .../{asm-arm =3D> arch-arm/asm}/arm32/atomic.h | 0 .../{asm-arm =3D> arch-arm/asm}/arm32/bitops.h | 0 .../{asm-arm =3D> arch-arm/asm}/arm32/bug.h | 0 .../{asm-arm =3D> arch-arm/asm}/arm32/cmpxchg.h | 0 .../asm}/arm32/flushtlb.h | 0 .../{asm-arm =3D> arch-arm/asm}/arm32/insn.h | 0 .../{asm-arm =3D> arch-arm/asm}/arm32/io.h | 0 .../{asm-arm =3D> arch-arm/asm}/arm32/macros.h | 0 .../{asm-arm =3D> arch-arm/asm}/arm32/mm.h | 0 .../{asm-arm =3D> arch-arm/asm}/arm32/page.h | 0 .../asm}/arm32/processor.h | 0 .../{asm-arm =3D> arch-arm/asm}/arm32/sysregs.h | 0 .../{asm-arm =3D> arch-arm/asm}/arm32/system.h | 0 .../{asm-arm =3D> arch-arm/asm}/arm32/traps.h | 0 .../{asm-arm =3D> arch-arm/asm}/arm32/vfp.h | 0 .../{asm-arm =3D> arch-arm/asm}/arm64/atomic.h | 0 .../{asm-arm =3D> arch-arm/asm}/arm64/bitops.h | 0 .../{asm-arm =3D> arch-arm/asm}/arm64/brk.h | 0 .../{asm-arm =3D> arch-arm/asm}/arm64/bug.h | 0 .../{asm-arm =3D> arch-arm/asm}/arm64/cmpxchg.h | 0 .../{asm-arm =3D> arch-arm/asm}/arm64/efibind.h | 0 .../asm}/arm64/flushtlb.h | 0 .../{asm-arm =3D> arch-arm/asm}/arm64/hsr.h | 0 .../{asm-arm =3D> arch-arm/asm}/arm64/insn.h | 0 .../{asm-arm =3D> arch-arm/asm}/arm64/io.h | 0 .../{asm-arm =3D> arch-arm/asm}/arm64/macros.h | 0 .../{asm-arm =3D> arch-arm/asm}/arm64/mm.h | 0 .../{asm-arm =3D> arch-arm/asm}/arm64/page.h | 0 .../asm}/arm64/processor.h | 0 .../{asm-arm =3D> arch-arm/asm}/arm64/sysregs.h | 0 .../{asm-arm =3D> arch-arm/asm}/arm64/system.h | 0 .../{asm-arm =3D> arch-arm/asm}/arm64/traps.h | 0 .../{asm-arm =3D> arch-arm/asm}/arm64/vfp.h | 0 .../{asm-arm =3D> arch-arm/asm}/asm_defns.h | 0 .../{asm-arm =3D> arch-arm/asm}/atomic.h | 0 .../{asm-arm =3D> arch-arm/asm}/bitops.h | 0 xen/include/{asm-arm =3D> arch-arm/asm}/bug.h | 0 .../{asm-arm =3D> arch-arm/asm}/byteorder.h | 0 xen/include/{asm-arm =3D> arch-arm/asm}/cache.h | 0 .../{asm-arm =3D> arch-arm/asm}/cadence-uart.h | 0 .../{asm-arm =3D> arch-arm/asm}/config.h | 0 .../{asm-arm =3D> arch-arm/asm}/cpregs.h | 0 .../{asm-arm =3D> arch-arm/asm}/cpuerrata.h | 0 .../{asm-arm =3D> arch-arm/asm}/cpufeature.h | 0 .../{asm-arm =3D> arch-arm/asm}/current.h | 0 .../{asm-arm =3D> arch-arm/asm}/debugger.h | 0 xen/include/{asm-arm =3D> arch-arm/asm}/delay.h | 0 xen/include/{asm-arm =3D> arch-arm/asm}/desc.h | 0 .../{asm-arm =3D> arch-arm/asm}/device.h | 0 xen/include/{asm-arm =3D> arch-arm/asm}/div64.h | 0 .../{asm-arm =3D> arch-arm/asm}/domain.h | 0 .../{asm-arm =3D> arch-arm/asm}/domain_build.h | 0 .../{asm-arm =3D> arch-arm/asm}/early_printk.h | 0 .../{asm-arm =3D> arch-arm/asm}/efibind.h | 0 xen/include/{asm-arm =3D> arch-arm/asm}/elf.h | 0 xen/include/{asm-arm =3D> arch-arm/asm}/event.h | 0 .../asm}/exynos4210-uart.h | 0 .../{asm-arm =3D> arch-arm/asm}/flushtlb.h | 0 xen/include/{asm-arm =3D> arch-arm/asm}/gic.h | 0 .../{asm-arm =3D> arch-arm/asm}/gic_v3_defs.h | 0 .../{asm-arm =3D> arch-arm/asm}/gic_v3_its.h | 0 .../{asm-arm =3D> arch-arm/asm}/grant_table.h | 0 .../{asm-arm =3D> arch-arm/asm}/guest_access.h | 0 .../{asm-arm =3D> arch-arm/asm}/guest_atomics.h | 0 .../{asm-arm =3D> arch-arm/asm}/guest_walk.h | 0 .../{asm-arm =3D> arch-arm/asm}/hardirq.h | 0 xen/include/{asm-arm =3D> arch-arm/asm}/hsr.h | 0 .../{asm-arm =3D> arch-arm/asm}/hypercall.h | 0 xen/include/{asm-arm =3D> arch-arm/asm}/init.h | 0 xen/include/{asm-arm =3D> arch-arm/asm}/insn.h | 0 xen/include/{asm-arm =3D> arch-arm/asm}/io.h | 0 xen/include/{asm-arm =3D> arch-arm/asm}/iocap.h | 0 xen/include/{asm-arm =3D> arch-arm/asm}/iommu.h | 0 .../{asm-arm =3D> arch-arm/asm}/iommu_fwspec.h | 0 xen/include/{asm-arm =3D> arch-arm/asm}/ioreq.h | 0 xen/include/{asm-arm =3D> arch-arm/asm}/irq.h | 0 .../{asm-arm =3D> arch-arm/asm}/kernel.h | 0 .../{asm-arm =3D> arch-arm/asm}/livepatch.h | 0 xen/include/{asm-arm =3D> arch-arm/asm}/lpae.h | 0 .../{asm-arm =3D> arch-arm/asm}/macros.h | 0 .../{asm-arm =3D> arch-arm/asm}/mem_access.h | 0 xen/include/{asm-arm =3D> arch-arm/asm}/mm.h | 0 xen/include/{asm-arm =3D> arch-arm/asm}/mmio.h | 0 .../{asm-arm =3D> arch-arm/asm}/monitor.h | 0 .../{asm-arm =3D> arch-arm/asm}/new_vgic.h | 0 .../{asm-arm =3D> arch-arm/asm}/nospec.h | 0 xen/include/{asm-arm =3D> arch-arm/asm}/numa.h | 0 xen/include/{asm-arm =3D> arch-arm/asm}/p2m.h | 0 .../{asm-arm =3D> arch-arm/asm}/page-bits.h | 0 xen/include/{asm-arm =3D> arch-arm/asm}/page.h | 0 .../{asm-arm =3D> arch-arm/asm}/paging.h | 0 xen/include/{asm-arm =3D> arch-arm/asm}/pci.h | 0 .../{asm-arm =3D> arch-arm/asm}/percpu.h | 0 xen/include/{asm-arm =3D> arch-arm/asm}/perfc.h | 0 .../{asm-arm =3D> arch-arm/asm}/perfc_defn.h | 0 .../{asm-arm =3D> arch-arm/asm}/pl011-uart.h | 0 .../{asm-arm =3D> arch-arm/asm}/platform.h | 0 .../asm}/platforms/exynos5.h | 0 .../asm}/platforms/midway.h | 0 .../asm}/platforms/omap5.h | 0 .../asm}/platforms/vexpress.h | 0 .../asm}/platforms/xilinx-zynqmp-eemi.h | 0 .../{asm-arm =3D> arch-arm/asm}/processor.h | 0 .../{asm-arm =3D> arch-arm/asm}/procinfo.h | 0 xen/include/{asm-arm =3D> arch-arm/asm}/psci.h | 0 .../{asm-arm =3D> arch-arm/asm}/random.h | 0 xen/include/{asm-arm =3D> arch-arm/asm}/regs.h | 0 .../{asm-arm =3D> arch-arm/asm}/scif-uart.h | 0 xen/include/{asm-arm =3D> arch-arm/asm}/setup.h | 0 .../{asm-arm =3D> arch-arm/asm}/short-desc.h | 0 xen/include/{asm-arm =3D> arch-arm/asm}/smccc.h | 0 xen/include/{asm-arm =3D> arch-arm/asm}/smp.h | 0 .../{asm-arm =3D> arch-arm/asm}/softirq.h | 0 .../{asm-arm =3D> arch-arm/asm}/spinlock.h | 0 .../{asm-arm =3D> arch-arm/asm}/string.h | 0 .../{asm-arm =3D> arch-arm/asm}/sysregs.h | 0 .../{asm-arm =3D> arch-arm/asm}/system.h | 0 .../{asm-arm =3D> arch-arm/asm}/tee/optee_msg.h | 0 .../asm}/tee/optee_rpc_cmd.h | 0 .../{asm-arm =3D> arch-arm/asm}/tee/optee_smc.h | 0 .../{asm-arm =3D> arch-arm/asm}/tee/tee.h | 0 xen/include/{asm-arm =3D> arch-arm/asm}/time.h | 0 xen/include/{asm-arm =3D> arch-arm/asm}/trace.h | 0 xen/include/{asm-arm =3D> arch-arm/asm}/traps.h | 0 xen/include/{asm-arm =3D> arch-arm/asm}/types.h | 0 xen/include/{asm-arm =3D> arch-arm/asm}/vfp.h | 0 .../{asm-arm =3D> arch-arm/asm}/vgic-emul.h | 0 xen/include/{asm-arm =3D> arch-arm/asm}/vgic.h | 0 .../{asm-arm =3D> arch-arm/asm}/vm_event.h | 0 .../{asm-arm =3D> arch-arm/asm}/vpl011.h | 0 xen/include/{asm-arm =3D> arch-arm/asm}/vpsci.h | 0 xen/include/{asm-arm =3D> arch-arm/asm}/vreg.h | 0 .../{asm-arm =3D> arch-arm/asm}/vtimer.h | 0 .../{asm-arm =3D> arch-arm/asm}/xenoprof.h | 0 .../{asm-riscv =3D> arch-riscv/asm}/config.h | 0 xen/include/{asm-x86 =3D> arch-x86/asm}/acpi.h | 0 .../asm}/alternative-asm.h | 0 .../{asm-x86 =3D> arch-x86/asm}/alternative.h | 0 .../{asm-x86 =3D> arch-x86/asm}/altp2m.h | 0 xen/include/{asm-x86 =3D> arch-x86/asm}/amd.h | 0 xen/include/{asm-x86 =3D> arch-x86/asm}/apic.h | 0 .../{asm-x86 =3D> arch-x86/asm}/apicdef.h | 0 .../{asm-x86 =3D> arch-x86/asm}/asm-defns.h | 0 .../{asm-x86 =3D> arch-x86/asm}/asm_defns.h | 0 .../{asm-x86 =3D> arch-x86/asm}/atomic.h | 0 .../{asm-x86 =3D> arch-x86/asm}/bitops.h | 0 xen/include/{asm-x86 =3D> arch-x86/asm}/bug.h | 0 .../{asm-x86 =3D> arch-x86/asm}/byteorder.h | 0 .../{asm-x86 =3D> arch-x86/asm}/bzimage.h | 0 xen/include/{asm-x86 =3D> arch-x86/asm}/cache.h | 0 .../{asm-x86 =3D> arch-x86/asm}/compat.h | 0 .../{asm-x86 =3D> arch-x86/asm}/config.h | 0 .../{asm-x86 =3D> arch-x86/asm}/cpufeature.h | 0 .../{asm-x86 =3D> arch-x86/asm}/cpufeatures.h | 0 .../{asm-x86 =3D> arch-x86/asm}/cpufeatureset.h | 0 xen/include/{asm-x86 =3D> arch-x86/asm}/cpuid.h | 0 .../{asm-x86 =3D> arch-x86/asm}/cpuidle.h | 0 .../{asm-x86 =3D> arch-x86/asm}/current.h | 2 +- .../{asm-x86 =3D> arch-x86/asm}/debugger.h | 0 .../{asm-x86 =3D> arch-x86/asm}/debugreg.h | 0 xen/include/{asm-x86 =3D> arch-x86/asm}/delay.h | 0 xen/include/{asm-x86 =3D> arch-x86/asm}/desc.h | 0 .../{asm-x86 =3D> arch-x86/asm}/device.h | 0 xen/include/{asm-x86 =3D> arch-x86/asm}/div64.h | 0 .../{asm-x86 =3D> arch-x86/asm}/dom0_build.h | 0 .../{asm-x86 =3D> arch-x86/asm}/domain.h | 2 +- xen/include/{asm-x86 =3D> arch-x86/asm}/e820.h | 0 xen/include/{asm-x86 =3D> arch-x86/asm}/edd.h | 0 .../{asm-x86 =3D> arch-x86/asm}/efibind.h | 0 xen/include/{asm-x86 =3D> arch-x86/asm}/elf.h | 0 xen/include/{asm-x86 =3D> arch-x86/asm}/event.h | 0 .../{asm-x86 =3D> arch-x86/asm}/fixmap.h | 0 .../{asm-x86 =3D> arch-x86/asm}/flushtlb.h | 0 .../{asm-x86 =3D> arch-x86/asm}/genapic.h | 0 .../{asm-x86 =3D> arch-x86/asm}/grant_table.h | 0 xen/include/{asm-x86 =3D> arch-x86/asm}/guest.h | 0 .../asm}/guest/hyperv-hcall.h | 0 .../asm}/guest/hyperv-tlfs.h | 0 .../{asm-x86 =3D> arch-x86/asm}/guest/hyperv.h | 0 .../asm}/guest/hypervisor.h | 0 .../asm}/guest/pvh-boot.h | 0 .../asm}/guest/xen-hcall.h | 0 .../{asm-x86 =3D> arch-x86/asm}/guest/xen.h | 0 .../{asm-x86 =3D> arch-x86/asm}/guest_access.h | 0 .../{asm-x86 =3D> arch-x86/asm}/guest_atomics.h | 0 .../{asm-x86 =3D> arch-x86/asm}/guest_pt.h | 0 xen/include/{asm-x86 =3D> arch-x86/asm}/hap.h | 0 .../{asm-x86 =3D> arch-x86/asm}/hardirq.h | 0 xen/include/{asm-x86 =3D> arch-x86/asm}/hpet.h | 0 .../{asm-x86 =3D> arch-x86/asm}/hvm/asid.h | 0 .../{asm-x86 =3D> arch-x86/asm}/hvm/cacheattr.h | 0 .../{asm-x86 =3D> arch-x86/asm}/hvm/domain.h | 0 .../{asm-x86 =3D> arch-x86/asm}/hvm/emulate.h | 0 .../asm}/hvm/grant_table.h | 0 .../asm}/hvm/guest_access.h | 0 .../{asm-x86 =3D> arch-x86/asm}/hvm/hvm.h | 0 .../{asm-x86 =3D> arch-x86/asm}/hvm/io.h | 0 .../{asm-x86 =3D> arch-x86/asm}/hvm/ioreq.h | 0 .../{asm-x86 =3D> arch-x86/asm}/hvm/irq.h | 0 .../{asm-x86 =3D> arch-x86/asm}/hvm/monitor.h | 0 .../{asm-x86 =3D> arch-x86/asm}/hvm/nestedhvm.h | 0 .../{asm-x86 =3D> arch-x86/asm}/hvm/save.h | 0 .../{asm-x86 =3D> arch-x86/asm}/hvm/support.h | 0 .../{asm-x86 =3D> arch-x86/asm}/hvm/svm/asid.h | 0 .../asm}/hvm/svm/emulate.h | 0 .../{asm-x86 =3D> arch-x86/asm}/hvm/svm/intr.h | 0 .../asm}/hvm/svm/nestedsvm.h | 0 .../{asm-x86 =3D> arch-x86/asm}/hvm/svm/svm.h | 0 .../asm}/hvm/svm/svmdebug.h | 0 .../{asm-x86 =3D> arch-x86/asm}/hvm/svm/vmcb.h | 0 .../{asm-x86 =3D> arch-x86/asm}/hvm/trace.h | 0 .../{asm-x86 =3D> arch-x86/asm}/hvm/vcpu.h | 0 .../{asm-x86 =3D> arch-x86/asm}/hvm/vioapic.h | 0 .../{asm-x86 =3D> arch-x86/asm}/hvm/viridian.h | 0 .../{asm-x86 =3D> arch-x86/asm}/hvm/vlapic.h | 0 .../{asm-x86 =3D> arch-x86/asm}/hvm/vm_event.h | 0 .../{asm-x86 =3D> arch-x86/asm}/hvm/vmx/vmcs.h | 0 .../{asm-x86 =3D> arch-x86/asm}/hvm/vmx/vmx.h | 0 .../{asm-x86 =3D> arch-x86/asm}/hvm/vmx/vvmx.h | 0 .../{asm-x86 =3D> arch-x86/asm}/hvm/vpic.h | 0 .../{asm-x86 =3D> arch-x86/asm}/hvm/vpt.h | 0 .../{asm-x86 =3D> arch-x86/asm}/hypercall.h | 0 xen/include/{asm-x86 =3D> arch-x86/asm}/i387.h | 0 xen/include/{asm-x86 =3D> arch-x86/asm}/init.h | 0 .../{asm-x86 =3D> arch-x86/asm}/invpcid.h | 0 xen/include/{asm-x86 =3D> arch-x86/asm}/io.h | 0 .../{asm-x86 =3D> arch-x86/asm}/io_apic.h | 0 xen/include/{asm-x86 =3D> arch-x86/asm}/iocap.h | 0 xen/include/{asm-x86 =3D> arch-x86/asm}/iommu.h | 0 xen/include/{asm-x86 =3D> arch-x86/asm}/ioreq.h | 0 xen/include/{asm-x86 =3D> arch-x86/asm}/irq.h | 0 xen/include/{asm-x86 =3D> arch-x86/asm}/ldt.h | 0 .../{asm-x86 =3D> arch-x86/asm}/livepatch.h | 0 .../asm}/mach-default/bios_ebda.h | 0 .../asm}/mach-default/io_ports.h | 0 .../asm}/mach-default/irq_vectors.h | 0 .../asm}/mach-default/mach_mpparse.h | 0 .../asm}/mach-default/mach_mpspec.h | 0 .../asm}/mach-generic/mach_apic.h | 0 .../asm}/mach-generic/mach_mpparse.h | 0 .../{asm-x86 =3D> arch-x86/asm}/machine_kexec.h | 0 .../{asm-x86 =3D> arch-x86/asm}/mc146818rtc.h | 0 xen/include/{asm-x86 =3D> arch-x86/asm}/mce.h | 0 .../{asm-x86 =3D> arch-x86/asm}/mem_access.h | 0 .../{asm-x86 =3D> arch-x86/asm}/mem_paging.h | 0 .../{asm-x86 =3D> arch-x86/asm}/mem_sharing.h | 0 .../{asm-x86 =3D> arch-x86/asm}/microcode.h | 0 xen/include/{asm-x86 =3D> arch-x86/asm}/mm.h | 0 .../{asm-x86 =3D> arch-x86/asm}/monitor.h | 0 .../{asm-x86 =3D> arch-x86/asm}/mpspec.h | 0 .../{asm-x86 =3D> arch-x86/asm}/mpspec_def.h | 0 xen/include/{asm-x86 =3D> arch-x86/asm}/msi.h | 0 .../{asm-x86 =3D> arch-x86/asm}/msr-index.h | 0 xen/include/{asm-x86 =3D> arch-x86/asm}/msr.h | 0 xen/include/{asm-x86 =3D> arch-x86/asm}/mtrr.h | 0 .../{asm-x86 =3D> arch-x86/asm}/multicall.h | 0 xen/include/{asm-x86 =3D> arch-x86/asm}/mwait.h | 0 xen/include/{asm-x86 =3D> arch-x86/asm}/nmi.h | 0 xen/include/{asm-x86 =3D> arch-x86/asm}/nops.h | 0 .../{asm-x86 =3D> arch-x86/asm}/nospec.h | 0 xen/include/{asm-x86 =3D> arch-x86/asm}/numa.h | 0 xen/include/{asm-x86 =3D> arch-x86/asm}/p2m.h | 0 .../{asm-x86 =3D> arch-x86/asm}/page-bits.h | 0 xen/include/{asm-x86 =3D> arch-x86/asm}/page.h | 0 .../{asm-x86 =3D> arch-x86/asm}/paging.h | 0 xen/include/{asm-x86 =3D> arch-x86/asm}/pci.h | 0 .../{asm-x86 =3D> arch-x86/asm}/percpu.h | 0 xen/include/{asm-x86 =3D> arch-x86/asm}/perfc.h | 0 .../{asm-x86 =3D> arch-x86/asm}/perfc_defn.h | 0 .../{asm-x86 =3D> arch-x86/asm}/processor.h | 0 xen/include/{asm-x86 =3D> arch-x86/asm}/psr.h | 0 .../{asm-x86 =3D> arch-x86/asm}/pv/domain.h | 0 .../asm}/pv/grant_table.h | 0 xen/include/{asm-x86 =3D> arch-x86/asm}/pv/mm.h | 0 .../{asm-x86 =3D> arch-x86/asm}/pv/shim.h | 0 .../{asm-x86 =3D> arch-x86/asm}/pv/traps.h | 0 .../{asm-x86 =3D> arch-x86/asm}/random.h | 0 xen/include/{asm-x86 =3D> arch-x86/asm}/regs.h | 0 xen/include/{asm-x86 =3D> arch-x86/asm}/setup.h | 0 .../{asm-x86 =3D> arch-x86/asm}/shadow.h | 0 .../{asm-x86 =3D> arch-x86/asm}/shared.h | 0 xen/include/{asm-x86 =3D> arch-x86/asm}/smp.h | 0 .../{asm-x86 =3D> arch-x86/asm}/softirq.h | 0 .../{asm-x86 =3D> arch-x86/asm}/spec_ctrl.h | 0 .../{asm-x86 =3D> arch-x86/asm}/spec_ctrl_asm.h | 0 .../{asm-x86 =3D> arch-x86/asm}/spinlock.h | 0 .../{asm-x86 =3D> arch-x86/asm}/string.h | 0 .../{asm-x86 =3D> arch-x86/asm}/system.h | 0 xen/include/{asm-x86 =3D> arch-x86/asm}/tboot.h | 0 xen/include/{asm-x86 =3D> arch-x86/asm}/time.h | 0 xen/include/{asm-x86 =3D> arch-x86/asm}/trace.h | 0 xen/include/{asm-x86 =3D> arch-x86/asm}/traps.h | 0 xen/include/{asm-x86 =3D> arch-x86/asm}/types.h | 0 .../{asm-x86 =3D> arch-x86/asm}/uaccess.h | 0 .../{asm-x86 =3D> arch-x86/asm}/unaligned.h | 0 .../{asm-x86 =3D> arch-x86/asm}/vm_event.h | 0 xen/include/{asm-x86 =3D> arch-x86/asm}/vpmu.h | 0 .../{asm-x86 =3D> arch-x86/asm}/x86-defns.h | 0 .../{asm-x86 =3D> arch-x86/asm}/x86-vendors.h | 0 .../asm}/x86_64/efibind.h | 0 .../{asm-x86 =3D> arch-x86/asm}/x86_64/elf.h | 0 .../{asm-x86 =3D> arch-x86/asm}/x86_64/page.h | 0 .../{asm-x86 =3D> arch-x86/asm}/x86_64/regs.h | 0 .../{asm-x86 =3D> arch-x86/asm}/x86_64/system.h | 0 .../asm}/x86_64/uaccess.h | 0 .../{asm-x86 =3D> arch-x86/asm}/x86_emulate.h | 0 .../{asm-x86 =3D> arch-x86/asm}/xenoprof.h | 0 .../{asm-x86 =3D> arch-x86/asm}/xstate.h | 0 xen/include/xen/acpi.h | 4 +-- xen/include/xen/bitmap.h | 2 +- 329 files changed, 59 insertions(+), 59 deletions(-) rename xen/include/{asm-arm =3D> arch-arm/asm}/acpi.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/alternative.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/altp2m.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/arm32/atomic.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/arm32/bitops.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/arm32/bug.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/arm32/cmpxchg.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/arm32/flushtlb.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/arm32/insn.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/arm32/io.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/arm32/macros.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/arm32/mm.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/arm32/page.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/arm32/processor.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/arm32/sysregs.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/arm32/system.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/arm32/traps.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/arm32/vfp.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/arm64/atomic.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/arm64/bitops.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/arm64/brk.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/arm64/bug.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/arm64/cmpxchg.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/arm64/efibind.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/arm64/flushtlb.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/arm64/hsr.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/arm64/insn.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/arm64/io.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/arm64/macros.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/arm64/mm.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/arm64/page.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/arm64/processor.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/arm64/sysregs.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/arm64/system.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/arm64/traps.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/arm64/vfp.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/asm_defns.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/atomic.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/bitops.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/bug.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/byteorder.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/cache.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/cadence-uart.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/config.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/cpregs.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/cpuerrata.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/cpufeature.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/current.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/debugger.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/delay.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/desc.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/device.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/div64.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/domain.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/domain_build.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/early_printk.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/efibind.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/elf.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/event.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/exynos4210-uart.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/flushtlb.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/gic.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/gic_v3_defs.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/gic_v3_its.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/grant_table.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/guest_access.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/guest_atomics.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/guest_walk.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/hardirq.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/hsr.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/hypercall.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/init.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/insn.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/io.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/iocap.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/iommu.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/iommu_fwspec.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/ioreq.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/irq.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/kernel.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/livepatch.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/lpae.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/macros.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/mem_access.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/mm.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/mmio.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/monitor.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/new_vgic.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/nospec.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/numa.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/p2m.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/page-bits.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/page.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/paging.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/pci.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/percpu.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/perfc.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/perfc_defn.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/pl011-uart.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/platform.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/platforms/exynos5.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/platforms/midway.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/platforms/omap5.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/platforms/vexpress.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/platforms/xilinx-zynqmp-eem= i.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/processor.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/procinfo.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/psci.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/random.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/regs.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/scif-uart.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/setup.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/short-desc.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/smccc.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/smp.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/softirq.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/spinlock.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/string.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/sysregs.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/system.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/tee/optee_msg.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/tee/optee_rpc_cmd.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/tee/optee_smc.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/tee/tee.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/time.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/trace.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/traps.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/types.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/vfp.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/vgic-emul.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/vgic.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/vm_event.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/vpl011.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/vpsci.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/vreg.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/vtimer.h (100%) rename xen/include/{asm-arm =3D> arch-arm/asm}/xenoprof.h (100%) rename xen/include/{asm-riscv =3D> arch-riscv/asm}/config.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/acpi.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/alternative-asm.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/alternative.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/altp2m.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/amd.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/apic.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/apicdef.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/asm-defns.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/asm_defns.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/atomic.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/bitops.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/bug.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/byteorder.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/bzimage.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/cache.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/compat.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/config.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/cpufeature.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/cpufeatures.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/cpufeatureset.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/cpuid.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/cpuidle.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/current.h (99%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/debugger.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/debugreg.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/delay.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/desc.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/device.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/div64.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/dom0_build.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/domain.h (99%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/e820.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/edd.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/efibind.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/elf.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/event.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/fixmap.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/flushtlb.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/genapic.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/grant_table.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/guest.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/guest/hyperv-hcall.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/guest/hyperv-tlfs.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/guest/hyperv.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/guest/hypervisor.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/guest/pvh-boot.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/guest/xen-hcall.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/guest/xen.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/guest_access.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/guest_atomics.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/guest_pt.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/hap.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/hardirq.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/hpet.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/hvm/asid.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/hvm/cacheattr.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/hvm/domain.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/hvm/emulate.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/hvm/grant_table.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/hvm/guest_access.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/hvm/hvm.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/hvm/io.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/hvm/ioreq.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/hvm/irq.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/hvm/monitor.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/hvm/nestedhvm.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/hvm/save.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/hvm/support.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/hvm/svm/asid.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/hvm/svm/emulate.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/hvm/svm/intr.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/hvm/svm/nestedsvm.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/hvm/svm/svm.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/hvm/svm/svmdebug.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/hvm/svm/vmcb.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/hvm/trace.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/hvm/vcpu.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/hvm/vioapic.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/hvm/viridian.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/hvm/vlapic.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/hvm/vm_event.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/hvm/vmx/vmcs.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/hvm/vmx/vmx.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/hvm/vmx/vvmx.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/hvm/vpic.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/hvm/vpt.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/hypercall.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/i387.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/init.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/invpcid.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/io.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/io_apic.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/iocap.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/iommu.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/ioreq.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/irq.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/ldt.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/livepatch.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/mach-default/bios_ebda.h (1= 00%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/mach-default/io_ports.h (10= 0%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/mach-default/irq_vectors.h = (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/mach-default/mach_mpparse.h= (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/mach-default/mach_mpspec.h = (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/mach-generic/mach_apic.h (1= 00%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/mach-generic/mach_mpparse.h= (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/machine_kexec.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/mc146818rtc.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/mce.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/mem_access.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/mem_paging.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/mem_sharing.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/microcode.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/mm.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/monitor.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/mpspec.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/mpspec_def.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/msi.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/msr-index.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/msr.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/mtrr.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/multicall.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/mwait.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/nmi.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/nops.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/nospec.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/numa.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/p2m.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/page-bits.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/page.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/paging.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/pci.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/percpu.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/perfc.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/perfc_defn.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/processor.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/psr.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/pv/domain.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/pv/grant_table.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/pv/mm.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/pv/shim.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/pv/traps.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/random.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/regs.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/setup.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/shadow.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/shared.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/smp.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/softirq.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/spec_ctrl.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/spec_ctrl_asm.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/spinlock.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/string.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/system.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/tboot.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/time.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/trace.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/traps.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/types.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/uaccess.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/unaligned.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/vm_event.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/vpmu.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/x86-defns.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/x86-vendors.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/x86_64/efibind.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/x86_64/elf.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/x86_64/page.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/x86_64/regs.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/x86_64/system.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/x86_64/uaccess.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/x86_emulate.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/xenoprof.h (100%) rename xen/include/{asm-x86 =3D> arch-x86/asm}/xstate.h (100%) diff --git a/.gitignore b/.gitignore index 38a085e398e3..91ae22ae9216 100644 --- a/.gitignore +++ b/.gitignore @@ -328,9 +328,8 @@ xen/asm-offsets.s xen/common/config_data.S xen/common/config.gz xen/include/headers*.chk -xen/include/asm -xen/include/asm-*/asm-offsets.h -xen/include/asm-x86/asm-macros.h +xen/include/arch-*/asm/asm-offsets.h +xen/include/arch-x86/asm/asm-macros.h xen/include/compat/* xen/include/config/ xen/include/generated/ diff --git a/MAINTAINERS b/MAINTAINERS index 8a52a03969fe..03a5553116a8 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -245,7 +245,7 @@ F: xen/drivers/char/omap-uart.c F: xen/drivers/char/pl011.c F: xen/drivers/char/scif-uart.c F: xen/drivers/passthrough/arm/ -F: xen/include/asm-arm/ +F: xen/include/arch-arm/ F: xen/include/public/arch-arm/ F: xen/include/public/arch-arm.h =20 @@ -293,8 +293,8 @@ S: Supported F: xen/arch/x86/efi/ F: xen/common/efi/ F: xen/include/efi/ -F: xen/include/asm-x86/efi*.h -F: xen/include/asm-x86/x86_*/efi*.h +F: xen/include/arch-x86/asm/efi*.h +F: xen/include/arch-x86/asm/x86_*/efi*.h =20 GDBSX DEBUGGER M: Elena Ufimtseva @@ -321,7 +321,7 @@ INTEL(R) TRUSTED EXECUTION TECHNOLOGY (TXT) R: Lukasz Hawrylko S: Odd Fixes F: xen/arch/x86/tboot.c -F: xen/include/asm-x86/tboot.h +F: xen/include/arch-x86/asm/tboot.h =20 INTEL(R) VT FOR DIRECTED I/O (VT-D) M: Kevin Tian @@ -334,7 +334,7 @@ M: Kevin Tian S: Supported F: xen/arch/x86/hvm/vmx/ F: xen/arch/x86/mm/p2m-ept.c -F: xen/include/asm-x86/hvm/vmx/ +F: xen/include/arch-x86/asm/hvm/vmx/ F: xen/arch/x86/cpu/vpmu_intel.c =20 IOMMU VENDOR INDEPENDENT CODE @@ -399,7 +399,7 @@ F: tools/misc/xen-livepatch.c F: xen/arch/*/livepatch* F: xen/arch/*/*/livepatch* F: xen/common/livepatch* -F: xen/include/asm-*/livepatch.h +F: xen/include/arch-*/asm/livepatch.h F: xen/include/xen/livepatch* F: xen/test/livepatch/* =20 @@ -500,7 +500,7 @@ TEE MEDIATORS M: Volodymyr Babchuk S: Supported F: xen/arch/arm/tee/ -F: xen/include/asm-arm/tee +F: xen/include/arch-arm/asm/tee =20 TOOLSTACK M: Ian Jackson @@ -537,8 +537,8 @@ F: xen/common/vm_event.c F: xen/include/*/mem_access.h F: xen/include/*/monitor.h F: xen/include/*/vm_event.h -F: xen/include/asm-x86/hvm/monitor.h -F: xen/include/asm-x86/hvm/vm_event.h +F: xen/include/arch-x86/asm/hvm/monitor.h +F: xen/include/arch-x86/asm/hvm/vm_event.h =20 VPCI M: Roger Pau Monn=C3=A9 @@ -564,7 +564,7 @@ R: Wei Liu S: Supported L: xen-devel@lists.xenproject.org F: xen/arch/x86/ -F: xen/include/asm-x86/ +F: xen/include/arch-x86/ F: xen/include/public/arch-x86/ F: xen/include/xen/lib/x86 F: xen/lib/x86 @@ -584,10 +584,10 @@ F: xen/arch/x86/hvm/emulate.c F: xen/arch/x86/hvm/intercept.c F: xen/arch/x86/hvm/io.c F: xen/arch/x86/hvm/ioreq.c -F: xen/include/asm-x86/hvm/emulate.h -F: xen/include/asm-x86/hvm/io.h -F: xen/include/asm-x86/hvm/ioreq.h -F: xen/include/asm-x86/ioreq.h +F: xen/include/arch-x86/asm/hvm/emulate.h +F: xen/include/arch-x86/asm/hvm/io.h +F: xen/include/arch-x86/asm/hvm/ioreq.h +F: xen/include/arch-x86/asm/ioreq.h =20 X86 MEMORY MANAGEMENT M: Jan Beulich @@ -619,10 +619,10 @@ M: Wei Liu S: Supported F: xen/arch/x86/guest/hyperv/ F: xen/arch/x86/hvm/viridian/ -F: xen/include/asm-x86/guest/hyperv.h -F: xen/include/asm-x86/guest/hyperv-hcall.h -F: xen/include/asm-x86/guest/hyperv-tlfs.h -F: xen/include/asm-x86/hvm/viridian.h +F: xen/include/arch-x86/asm/guest/hyperv.h +F: xen/include/arch-x86/asm/guest/hyperv-hcall.h +F: xen/include/arch-x86/asm/guest/hyperv-tlfs.h +F: xen/include/arch-x86/asm/hvm/viridian.h =20 XENSTORE M: Ian Jackson diff --git a/tools/include/Makefile b/tools/include/Makefile index 42605d46b937..85b105173741 100644 --- a/tools/include/Makefile +++ b/tools/include/Makefile @@ -30,7 +30,7 @@ xen-dir: ln -s $(XEN_ROOT)/xen/include/acpi/platform acpi/ ln -s $(XEN_ROOT)/xen/include/acpi/ac*.h acpi/ ifeq ($(CONFIG_X86),y) - ln -s $(XEN_ROOT)/xen/include/asm-x86 xen/asm + ln -s $(XEN_ROOT)/xen/include/arch-x86/asm xen/asm mkdir -p xen/lib/x86 ln -s $(filter-out %autogen.h,$(wildcard $(XEN_ROOT)/xen/include/xen/lib/= x86/*.h)) xen/lib/x86/ ln -s $(XEN_ROOT)/xen/include/xen/lib/x86/Makefile xen/lib/x86/ diff --git a/tools/misc/xen-access.c b/tools/misc/xen-access.c index 4bbef0bd2e10..d87325800c5b 100644 --- a/tools/misc/xen-access.c +++ b/tools/misc/xen-access.c @@ -56,11 +56,11 @@ #define ERROR(a, b...) fprintf(stderr, a "\n", ## b) #define PERROR(a, b...) fprintf(stderr, a ": %s\n", ## b, strerror(errno)) =20 -/* From xen/include/asm-x86/processor.h */ +/* From xen/include/arch-x86/asm/processor.h */ #define X86_TRAP_DEBUG 1 #define X86_TRAP_INT3 3 =20 -/* From xen/include/asm-x86/x86-defns.h */ +/* From xen/include/arch-x86/asm/x86-defns.h */ #define X86_CR4_PGE 0x00000080 /* enable global pages */ =20 typedef struct vm_event { diff --git a/tools/tests/vhpet/Makefile b/tools/tests/vhpet/Makefile index cb88dd01c5f8..72f08dea22d8 100644 --- a/tools/tests/vhpet/Makefile +++ b/tools/tests/vhpet/Makefile @@ -32,7 +32,7 @@ distclean: clean .PHONY: install install: =20 -hpet.h: $(XEN_ROOT)/xen/include/asm-x86/hpet.h +hpet.h: $(XEN_ROOT)/xen/include/arch-x86/asm/hpet.h cp $< $@ =20 hpet.c: $(XEN_ROOT)/xen/arch/x86/hvm/hpet.c diff --git a/xen/Makefile b/xen/Makefile index 06d7bfab3e2c..7e3e4c42d77b 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -164,7 +164,7 @@ ifeq ($(TARGET_ARCH),x86) t1 =3D $(call as-insn,$(CC),".L0: .L1: .skip (.L1 - .L0)",,-no-integrated-= as) =20 # Check whether clang asm()-s support .include. -t2 =3D $(call as-insn,$(CC) -I$(BASEDIR)/include,".include \"asm-x86/asm-d= efns.h\"",,-no-integrated-as) +t2 =3D $(call as-insn,$(CC) -I$(BASEDIR)/include/arch-x86,".include \"asm/= asm-defns.h\"",,-no-integrated-as) =20 # Check whether clang keeps .macro-s between asm()-s: # https://bugs.llvm.org/show_bug.cgi?id=3D36110 @@ -367,7 +367,7 @@ _clean: delete-unfresh-files find . \( -name "*.o" -o -name ".*.d" -o -name ".*.d2" \ -o -name "*.gcno" -o -name ".*.cmd" -o -name "lib.a" \) -exec rm -f {} \; rm -f include/asm $(TARGET) $(TARGET).gz $(TARGET).efi $(TARGET).efi.map = $(TARGET)-syms $(TARGET)-syms.map *~ core - rm -f asm-offsets.s include/asm-*/asm-offsets.h + rm -f asm-offsets.s include/arch-*/asm/asm-offsets.h rm -f .banner =20 .PHONY: _distclean @@ -381,7 +381,6 @@ $(TARGET).gz: $(TARGET) $(TARGET): delete-unfresh-files $(MAKE) -C tools $(MAKE) -f $(BASEDIR)/Rules.mk include/xen/compile.h - [ -e include/asm ] || ln -sf asm-$(TARGET_ARCH) include/asm [ -e arch/$(TARGET_ARCH)/efi ] && for f in $$(cd common/efi; echo *.[ch])= ; \ do test -r arch/$(TARGET_ARCH)/efi/$$f || \ ln -nsf ../../../common/efi/$$f arch/$(TARGET_ARCH)/efi/; \ @@ -389,7 +388,7 @@ $(TARGET): delete-unfresh-files true $(MAKE) -f $(BASEDIR)/Rules.mk -C include $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) include - $(MAKE) -f $(BASEDIR)/Rules.mk include/asm-$(TARGET_ARCH)/asm-offsets.h + $(MAKE) -f $(BASEDIR)/Rules.mk include/arch-$(TARGET_ARCH)/asm/asm-offset= s.h $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) $@ =20 # drivers/char/console.o contains static banner/compile info. Blow it away. @@ -429,7 +428,7 @@ asm-offsets.s: arch/$(TARGET_ARCH)/$(TARGET_SUBARCH)/as= m-offsets.c $(CC) $(filter-out -Wa$(comma)% -flto,$(c_flags)) -S -g0 -o $@.new -MQ $@= $< $(call move-if-changed,$@.new,$@) =20 -include/asm-$(TARGET_ARCH)/asm-offsets.h: asm-offsets.s +include/arch-$(TARGET_ARCH)/asm/asm-offsets.h: asm-offsets.s @(set -e; \ echo "/*"; \ echo " * DO NOT MODIFY."; \ @@ -447,8 +446,8 @@ include/asm-$(TARGET_ARCH)/asm-offsets.h: asm-offsets.s =20 SUBDIRS =3D xsm arch/$(TARGET_ARCH) common drivers lib test define all_sources - ( find include/asm-$(TARGET_ARCH) -name '*.h' -print; \ - find include -name 'asm-*' -prune -o -name '*.h' -print; \ + ( find include/arch-$(TARGET_ARCH) -name '*.h' -print; \ + find include -name 'arch-*' -prune -o -name '*.h' -print; \ find $(SUBDIRS) -name '*.[chS]' -print ) endef =20 diff --git a/xen/arch/arm/README.LinuxPrimitives b/xen/arch/arm/README.Linu= xPrimitives index 664a9f89ed27..733cc22c2cd5 100644 --- a/xen/arch/arm/README.LinuxPrimitives +++ b/xen/arch/arm/README.LinuxPrimitives @@ -8,19 +8,19 @@ arm64: =20 bitops: last sync @ v3.16-rc6 (last commit: 8715466b6027) =20 -linux/arch/arm64/include/asm/bitops.h xen/include/asm-arm/arm64/bitops.h +linux/arch/arm64/include/asm/bitops.h xen/include/arch-arm/asm/arm64/bit= ops.h =20 --------------------------------------------------------------------- =20 cmpxchg: last sync @ v3.16-rc6 (last commit: e1dfda9ced9b) =20 -linux/arch/arm64/include/asm/cmpxchg.h xen/include/asm-arm/arm64/cmpxchg.h +linux/arch/arm64/include/asm/cmpxchg.h xen/include/arch-arm/asm/arm64/cmp= xchg.h =20 --------------------------------------------------------------------- =20 atomics: last sync @ v3.16-rc6 (last commit: 8715466b6027) =20 -linux/arch/arm64/include/asm/atomic.h xen/include/asm-arm/arm64/atomic.h +linux/arch/arm64/include/asm/atomic.h xen/include/arch-arm/asm/arm64/ato= mic.h =20 The following functions were taken from Linux: atomic_add(), atomic_add_return(), atomic_sub(), atomic_sub_return(), @@ -76,13 +76,13 @@ diff -u ../linux/arch/arm/lib/findbit.S xen/arch/arm/ar= m32/lib/findbit.S =20 cmpxchg: last sync @ v3.16-rc6 (last commit: c32ffce0f66e) =20 -linux/arch/arm/include/asm/cmpxchg.h xen/include/asm-arm/arm32/cmpxchg.h +linux/arch/arm/include/asm/cmpxchg.h xen/include/arch-arm/asm/arm32/cmp= xchg.h =20 --------------------------------------------------------------------- =20 atomics: last sync @ v3.16-rc6 (last commit: 030d0178bdbd) =20 -linux/arch/arm/include/asm/atomic.h xen/include/asm-arm/arm32/atomic.h +linux/arch/arm/include/asm/atomic.h xen/include/arch-arm/asm/arm32/ato= mic.h =20 The following functions were taken from Linux: atomic_add(), atomic_add_return(), atomic_sub(), atomic_sub_return(), diff --git a/xen/arch/arm/arch.mk b/xen/arch/arm/arch.mk index 6a2982059486..f54e602301be 100644 --- a/xen/arch/arm/arch.mk +++ b/xen/arch/arm/arch.mk @@ -2,6 +2,7 @@ # arm-specific definitions =20 CFLAGS +=3D -I$(BASEDIR)/include +CFLAGS +=3D -I$(BASEDIR)/include/arch-$(TARGET_ARCH) =20 $(call cc-options-add,CFLAGS,CC,$(EMBEDDED_EXTRA_CFLAGS)) $(call cc-option-add,CFLAGS,CC,-Wnested-externs) diff --git a/xen/arch/arm/arm32/head.S b/xen/arch/arm/arm32/head.S index 7178865f48c3..5cd4f19aa199 100644 --- a/xen/arch/arm/arm32/head.S +++ b/xen/arch/arm/arm32/head.S @@ -599,7 +599,7 @@ remove_identity_mapping: strd r2, r3, [r0, r1] =20 identity_mapping_removed: - /* See asm-arm/arm32/flushtlb.h for the explanation of the sequenc= e. */ + /* See arch-arm/asm/arm32/flushtlb.h for the explanation of the se= quence. */ dsb nshst mcr CP32(r0, TLBIALLH) dsb nsh diff --git a/xen/arch/arm/arm64/head.S b/xen/arch/arm/arm64/head.S index aa1f88c76498..135fdccabdf0 100644 --- a/xen/arch/arm/arm64/head.S +++ b/xen/arch/arm/arm64/head.S @@ -737,7 +737,7 @@ remove_identity_mapping: str xzr, [x0, x1, lsl #3] =20 identity_mapping_removed: - /* See asm-arm/arm64/flushtlb.h for the explanation of the sequenc= e. */ + /* See arch-arm/asm/arm64/flushtlb.h for the explanation of the se= quence. */ dsb nshst tlbi alle2 dsb nsh diff --git a/xen/arch/arm/smpboot.c b/xen/arch/arm/smpboot.c index a1ee3146efeb..df10c617c8f7 100644 --- a/xen/arch/arm/smpboot.c +++ b/xen/arch/arm/smpboot.c @@ -46,7 +46,7 @@ struct cpuinfo_arm cpu_data[NR_CPUS]; /* CPU logical map: map xen cpuid to an MPIDR */ register_t __cpu_logical_map[NR_CPUS] =3D { [0 ... NR_CPUS-1] =3D MPIDR_IN= VALID }; =20 -/* Fake one node for now. See also include/asm-arm/numa.h */ +/* Fake one node for now. See also include/arch-arm/asm/numa.h */ nodemask_t __read_mostly node_online_map =3D { { [0] =3D 1UL } }; =20 /* Xen stack for bringing up the first CPU. */ diff --git a/xen/arch/arm/vpsci.c b/xen/arch/arm/vpsci.c index c1e250be5967..8b93fd2cd5b7 100644 --- a/xen/arch/arm/vpsci.c +++ b/xen/arch/arm/vpsci.c @@ -278,7 +278,7 @@ bool do_vpsci_0_1_call(struct cpu_user_regs *regs, uint= 32_t fid) bool do_vpsci_0_2_call(struct cpu_user_regs *regs, uint32_t fid) { /* - * /!\ VPSCI_NR_FUNCS (in asm-arm/vpsci.h) should be updated when + * /!\ VPSCI_NR_FUNCS (in arch-arm/asm/vpsci.h) should be updated when * adding/removing a function. SCCC_SMCCC_*_REVISION should be * updated once per release. */ diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile index 08a4ec1944d3..bb446a1b928d 100644 --- a/xen/arch/x86/Makefile +++ b/xen/arch/x86/Makefile @@ -275,11 +275,11 @@ efi/buildid.o efi/relocs-dummy.o: $(BASEDIR)/arch/x86= /efi/built_in.o efi/buildid.o efi/relocs-dummy.o: ; =20 .PHONY: include -include: $(BASEDIR)/include/asm-x86/asm-macros.h +include: $(BASEDIR)/include/arch-x86/asm/asm-macros.h =20 asm-macros.i: CFLAGS-y +=3D -D__ASSEMBLY__ -P =20 -$(BASEDIR)/include/asm-x86/asm-macros.h: asm-macros.i Makefile +$(BASEDIR)/include/arch-x86/asm/asm-macros.h: asm-macros.i Makefile echo '#if 0' >$@.new echo '.if 0' >>$@.new echo '#endif' >>$@.new @@ -306,7 +306,7 @@ efi/mkreloc: efi/mkreloc.c .PHONY: clean clean:: rm -f *.lds *.new boot/*.o boot/*~ boot/core boot/mkelf32 - rm -f asm-macros.i $(BASEDIR)/include/asm-x86/asm-macros.* + rm -f asm-macros.i $(BASEDIR)/include/arch-x86/asm/asm-macros.* rm -f $(BASEDIR)/.xen-syms.[0-9]* boot/.*.d $(BASEDIR)/.xen.elf32 rm -f $(BASEDIR)/.xen.efi.[0-9]* efi/*.efi efi/mkreloc rm -f boot/cmdline.S boot/reloc.S boot/*.lnk boot/*.bin diff --git a/xen/arch/x86/arch.mk b/xen/arch/x86/arch.mk index ce0c1a0e7fb2..9f5fade39e91 100644 --- a/xen/arch/x86/arch.mk +++ b/xen/arch/x86/arch.mk @@ -4,8 +4,9 @@ export XEN_IMG_OFFSET :=3D 0x200000 =20 CFLAGS +=3D -I$(BASEDIR)/include -CFLAGS +=3D -I$(BASEDIR)/include/asm-x86/mach-generic -CFLAGS +=3D -I$(BASEDIR)/include/asm-x86/mach-default +CFLAGS +=3D -I$(BASEDIR)/include/arch-$(TARGET_ARCH) +CFLAGS +=3D -I$(BASEDIR)/include/arch-x86/asm/mach-generic +CFLAGS +=3D -I$(BASEDIR)/include/arch-x86/asm/mach-default CFLAGS +=3D -DXEN_IMG_OFFSET=3D$(XEN_IMG_OFFSET) =20 # Prevent floating-point variables from creeping into Xen. diff --git a/xen/common/efi/runtime.c b/xen/common/efi/runtime.c index 375b94229e13..d54bae560487 100644 --- a/xen/common/efi/runtime.c +++ b/xen/common/efi/runtime.c @@ -12,13 +12,13 @@ struct efi_rs_state { #ifdef CONFIG_X86 /* * The way stacks get set up leads to them always being on an 8-byte - * boundary not evenly divisible by 16 (see asm-x86/current.h). The EFI A= BI, - * just like the CPU one, however requires stacks to be 16-byte aligned - * before every function call. Since the compiler assumes this (unless - * passing it -mpreferred-stack-boundary=3D3), it wouldn't generate code = to - * align the stack to 16 bytes even if putting a 16-byte aligned object - * there. Hence we need to force larger than 16-byte alignment, even if we - * don't strictly need that. + * boundary not evenly divisible by 16 (see arch-x86/asm/current.h). The + * EFI ABI, just like the CPU one, however requires stacks to be 16-byte + * aligned before every function call. Since the compiler assumes this + * (unless passing it -mpreferred-stack-boundary=3D3), it wouldn't genera= te + * code to align the stack to 16 bytes even if putting a 16-byte aligned + * object there. Hence we need to force larger than 16-byte alignment, + * even if we don't strictly need that. */ unsigned long __aligned(32) cr3; #endif diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c index 958ba0cd9256..5cf9b3011cdb 100644 --- a/xen/common/page_alloc.c +++ b/xen/common/page_alloc.c @@ -241,7 +241,7 @@ PAGE_LIST_HEAD(page_broken_list); =20 /* * first_valid_mfn is exported because it is use in ARM specific NUMA - * helpers. See comment in asm-arm/numa.h. + * helpers. See comment in arch-arm/asm/numa.h. */ mfn_t first_valid_mfn =3D INVALID_MFN_INITIALIZER; =20 diff --git a/xen/include/asm-arm/acpi.h b/xen/include/arch-arm/asm/acpi.h similarity index 100% rename from xen/include/asm-arm/acpi.h rename to xen/include/arch-arm/asm/acpi.h diff --git a/xen/include/asm-arm/alternative.h b/xen/include/arch-arm/asm/a= lternative.h similarity index 100% rename from xen/include/asm-arm/alternative.h rename to xen/include/arch-arm/asm/alternative.h diff --git a/xen/include/asm-arm/altp2m.h b/xen/include/arch-arm/asm/altp2m= .h similarity index 100% rename from xen/include/asm-arm/altp2m.h rename to xen/include/arch-arm/asm/altp2m.h diff --git a/xen/include/asm-arm/arm32/atomic.h b/xen/include/arch-arm/asm/= arm32/atomic.h similarity index 100% rename from xen/include/asm-arm/arm32/atomic.h rename to xen/include/arch-arm/asm/arm32/atomic.h diff --git a/xen/include/asm-arm/arm32/bitops.h b/xen/include/arch-arm/asm/= arm32/bitops.h similarity index 100% rename from xen/include/asm-arm/arm32/bitops.h rename to xen/include/arch-arm/asm/arm32/bitops.h diff --git a/xen/include/asm-arm/arm32/bug.h b/xen/include/arch-arm/asm/arm= 32/bug.h similarity index 100% rename from xen/include/asm-arm/arm32/bug.h rename to xen/include/arch-arm/asm/arm32/bug.h diff --git a/xen/include/asm-arm/arm32/cmpxchg.h b/xen/include/arch-arm/asm= /arm32/cmpxchg.h similarity index 100% rename from xen/include/asm-arm/arm32/cmpxchg.h rename to xen/include/arch-arm/asm/arm32/cmpxchg.h diff --git a/xen/include/asm-arm/arm32/flushtlb.h b/xen/include/arch-arm/as= m/arm32/flushtlb.h similarity index 100% rename from xen/include/asm-arm/arm32/flushtlb.h rename to xen/include/arch-arm/asm/arm32/flushtlb.h diff --git a/xen/include/asm-arm/arm32/insn.h b/xen/include/arch-arm/asm/ar= m32/insn.h similarity index 100% rename from xen/include/asm-arm/arm32/insn.h rename to xen/include/arch-arm/asm/arm32/insn.h diff --git a/xen/include/asm-arm/arm32/io.h b/xen/include/arch-arm/asm/arm3= 2/io.h similarity index 100% rename from xen/include/asm-arm/arm32/io.h rename to xen/include/arch-arm/asm/arm32/io.h diff --git a/xen/include/asm-arm/arm32/macros.h b/xen/include/arch-arm/asm/= arm32/macros.h similarity index 100% rename from xen/include/asm-arm/arm32/macros.h rename to xen/include/arch-arm/asm/arm32/macros.h diff --git a/xen/include/asm-arm/arm32/mm.h b/xen/include/arch-arm/asm/arm3= 2/mm.h similarity index 100% rename from xen/include/asm-arm/arm32/mm.h rename to xen/include/arch-arm/asm/arm32/mm.h diff --git a/xen/include/asm-arm/arm32/page.h b/xen/include/arch-arm/asm/ar= m32/page.h similarity index 100% rename from xen/include/asm-arm/arm32/page.h rename to xen/include/arch-arm/asm/arm32/page.h diff --git a/xen/include/asm-arm/arm32/processor.h b/xen/include/arch-arm/a= sm/arm32/processor.h similarity index 100% rename from xen/include/asm-arm/arm32/processor.h rename to xen/include/arch-arm/asm/arm32/processor.h diff --git a/xen/include/asm-arm/arm32/sysregs.h b/xen/include/arch-arm/asm= /arm32/sysregs.h similarity index 100% rename from xen/include/asm-arm/arm32/sysregs.h rename to xen/include/arch-arm/asm/arm32/sysregs.h diff --git a/xen/include/asm-arm/arm32/system.h b/xen/include/arch-arm/asm/= arm32/system.h similarity index 100% rename from xen/include/asm-arm/arm32/system.h rename to xen/include/arch-arm/asm/arm32/system.h diff --git a/xen/include/asm-arm/arm32/traps.h b/xen/include/arch-arm/asm/a= rm32/traps.h similarity index 100% rename from xen/include/asm-arm/arm32/traps.h rename to xen/include/arch-arm/asm/arm32/traps.h diff --git a/xen/include/asm-arm/arm32/vfp.h b/xen/include/arch-arm/asm/arm= 32/vfp.h similarity index 100% rename from xen/include/asm-arm/arm32/vfp.h rename to xen/include/arch-arm/asm/arm32/vfp.h diff --git a/xen/include/asm-arm/arm64/atomic.h b/xen/include/arch-arm/asm/= arm64/atomic.h similarity index 100% rename from xen/include/asm-arm/arm64/atomic.h rename to xen/include/arch-arm/asm/arm64/atomic.h diff --git a/xen/include/asm-arm/arm64/bitops.h b/xen/include/arch-arm/asm/= arm64/bitops.h similarity index 100% rename from xen/include/asm-arm/arm64/bitops.h rename to xen/include/arch-arm/asm/arm64/bitops.h diff --git a/xen/include/asm-arm/arm64/brk.h b/xen/include/arch-arm/asm/arm= 64/brk.h similarity index 100% rename from xen/include/asm-arm/arm64/brk.h rename to xen/include/arch-arm/asm/arm64/brk.h diff --git a/xen/include/asm-arm/arm64/bug.h b/xen/include/arch-arm/asm/arm= 64/bug.h similarity index 100% rename from xen/include/asm-arm/arm64/bug.h rename to xen/include/arch-arm/asm/arm64/bug.h diff --git a/xen/include/asm-arm/arm64/cmpxchg.h b/xen/include/arch-arm/asm= /arm64/cmpxchg.h similarity index 100% rename from xen/include/asm-arm/arm64/cmpxchg.h rename to xen/include/arch-arm/asm/arm64/cmpxchg.h diff --git a/xen/include/asm-arm/arm64/efibind.h b/xen/include/arch-arm/asm= /arm64/efibind.h similarity index 100% rename from xen/include/asm-arm/arm64/efibind.h rename to xen/include/arch-arm/asm/arm64/efibind.h diff --git a/xen/include/asm-arm/arm64/flushtlb.h b/xen/include/arch-arm/as= m/arm64/flushtlb.h similarity index 100% rename from xen/include/asm-arm/arm64/flushtlb.h rename to xen/include/arch-arm/asm/arm64/flushtlb.h diff --git a/xen/include/asm-arm/arm64/hsr.h b/xen/include/arch-arm/asm/arm= 64/hsr.h similarity index 100% rename from xen/include/asm-arm/arm64/hsr.h rename to xen/include/arch-arm/asm/arm64/hsr.h diff --git a/xen/include/asm-arm/arm64/insn.h b/xen/include/arch-arm/asm/ar= m64/insn.h similarity index 100% rename from xen/include/asm-arm/arm64/insn.h rename to xen/include/arch-arm/asm/arm64/insn.h diff --git a/xen/include/asm-arm/arm64/io.h b/xen/include/arch-arm/asm/arm6= 4/io.h similarity index 100% rename from xen/include/asm-arm/arm64/io.h rename to xen/include/arch-arm/asm/arm64/io.h diff --git a/xen/include/asm-arm/arm64/macros.h b/xen/include/arch-arm/asm/= arm64/macros.h similarity index 100% rename from xen/include/asm-arm/arm64/macros.h rename to xen/include/arch-arm/asm/arm64/macros.h diff --git a/xen/include/asm-arm/arm64/mm.h b/xen/include/arch-arm/asm/arm6= 4/mm.h similarity index 100% rename from xen/include/asm-arm/arm64/mm.h rename to xen/include/arch-arm/asm/arm64/mm.h diff --git a/xen/include/asm-arm/arm64/page.h b/xen/include/arch-arm/asm/ar= m64/page.h similarity index 100% rename from xen/include/asm-arm/arm64/page.h rename to xen/include/arch-arm/asm/arm64/page.h diff --git a/xen/include/asm-arm/arm64/processor.h b/xen/include/arch-arm/a= sm/arm64/processor.h similarity index 100% rename from xen/include/asm-arm/arm64/processor.h rename to xen/include/arch-arm/asm/arm64/processor.h diff --git a/xen/include/asm-arm/arm64/sysregs.h b/xen/include/arch-arm/asm= /arm64/sysregs.h similarity index 100% rename from xen/include/asm-arm/arm64/sysregs.h rename to xen/include/arch-arm/asm/arm64/sysregs.h diff --git a/xen/include/asm-arm/arm64/system.h b/xen/include/arch-arm/asm/= arm64/system.h similarity index 100% rename from xen/include/asm-arm/arm64/system.h rename to xen/include/arch-arm/asm/arm64/system.h diff --git a/xen/include/asm-arm/arm64/traps.h b/xen/include/arch-arm/asm/a= rm64/traps.h similarity index 100% rename from xen/include/asm-arm/arm64/traps.h rename to xen/include/arch-arm/asm/arm64/traps.h diff --git a/xen/include/asm-arm/arm64/vfp.h b/xen/include/arch-arm/asm/arm= 64/vfp.h similarity index 100% rename from xen/include/asm-arm/arm64/vfp.h rename to xen/include/arch-arm/asm/arm64/vfp.h diff --git a/xen/include/asm-arm/asm_defns.h b/xen/include/arch-arm/asm/asm= _defns.h similarity index 100% rename from xen/include/asm-arm/asm_defns.h rename to xen/include/arch-arm/asm/asm_defns.h diff --git a/xen/include/asm-arm/atomic.h b/xen/include/arch-arm/asm/atomic= .h similarity index 100% rename from xen/include/asm-arm/atomic.h rename to xen/include/arch-arm/asm/atomic.h diff --git a/xen/include/asm-arm/bitops.h b/xen/include/arch-arm/asm/bitops= .h similarity index 100% rename from xen/include/asm-arm/bitops.h rename to xen/include/arch-arm/asm/bitops.h diff --git a/xen/include/asm-arm/bug.h b/xen/include/arch-arm/asm/bug.h similarity index 100% rename from xen/include/asm-arm/bug.h rename to xen/include/arch-arm/asm/bug.h diff --git a/xen/include/asm-arm/byteorder.h b/xen/include/arch-arm/asm/byt= eorder.h similarity index 100% rename from xen/include/asm-arm/byteorder.h rename to xen/include/arch-arm/asm/byteorder.h diff --git a/xen/include/asm-arm/cache.h b/xen/include/arch-arm/asm/cache.h similarity index 100% rename from xen/include/asm-arm/cache.h rename to xen/include/arch-arm/asm/cache.h diff --git a/xen/include/asm-arm/cadence-uart.h b/xen/include/arch-arm/asm/= cadence-uart.h similarity index 100% rename from xen/include/asm-arm/cadence-uart.h rename to xen/include/arch-arm/asm/cadence-uart.h diff --git a/xen/include/asm-arm/config.h b/xen/include/arch-arm/asm/config= .h similarity index 100% rename from xen/include/asm-arm/config.h rename to xen/include/arch-arm/asm/config.h diff --git a/xen/include/asm-arm/cpregs.h b/xen/include/arch-arm/asm/cpregs= .h similarity index 100% rename from xen/include/asm-arm/cpregs.h rename to xen/include/arch-arm/asm/cpregs.h diff --git a/xen/include/asm-arm/cpuerrata.h b/xen/include/arch-arm/asm/cpu= errata.h similarity index 100% rename from xen/include/asm-arm/cpuerrata.h rename to xen/include/arch-arm/asm/cpuerrata.h diff --git a/xen/include/asm-arm/cpufeature.h b/xen/include/arch-arm/asm/cp= ufeature.h similarity index 100% rename from xen/include/asm-arm/cpufeature.h rename to xen/include/arch-arm/asm/cpufeature.h diff --git a/xen/include/asm-arm/current.h b/xen/include/arch-arm/asm/curre= nt.h similarity index 100% rename from xen/include/asm-arm/current.h rename to xen/include/arch-arm/asm/current.h diff --git a/xen/include/asm-arm/debugger.h b/xen/include/arch-arm/asm/debu= gger.h similarity index 100% rename from xen/include/asm-arm/debugger.h rename to xen/include/arch-arm/asm/debugger.h diff --git a/xen/include/asm-arm/delay.h b/xen/include/arch-arm/asm/delay.h similarity index 100% rename from xen/include/asm-arm/delay.h rename to xen/include/arch-arm/asm/delay.h diff --git a/xen/include/asm-arm/desc.h b/xen/include/arch-arm/asm/desc.h similarity index 100% rename from xen/include/asm-arm/desc.h rename to xen/include/arch-arm/asm/desc.h diff --git a/xen/include/asm-arm/device.h b/xen/include/arch-arm/asm/device= .h similarity index 100% rename from xen/include/asm-arm/device.h rename to xen/include/arch-arm/asm/device.h diff --git a/xen/include/asm-arm/div64.h b/xen/include/arch-arm/asm/div64.h similarity index 100% rename from xen/include/asm-arm/div64.h rename to xen/include/arch-arm/asm/div64.h diff --git a/xen/include/asm-arm/domain.h b/xen/include/arch-arm/asm/domain= .h similarity index 100% rename from xen/include/asm-arm/domain.h rename to xen/include/arch-arm/asm/domain.h diff --git a/xen/include/asm-arm/domain_build.h b/xen/include/arch-arm/asm/= domain_build.h similarity index 100% rename from xen/include/asm-arm/domain_build.h rename to xen/include/arch-arm/asm/domain_build.h diff --git a/xen/include/asm-arm/early_printk.h b/xen/include/arch-arm/asm/= early_printk.h similarity index 100% rename from xen/include/asm-arm/early_printk.h rename to xen/include/arch-arm/asm/early_printk.h diff --git a/xen/include/asm-arm/efibind.h b/xen/include/arch-arm/asm/efibi= nd.h similarity index 100% rename from xen/include/asm-arm/efibind.h rename to xen/include/arch-arm/asm/efibind.h diff --git a/xen/include/asm-arm/elf.h b/xen/include/arch-arm/asm/elf.h similarity index 100% rename from xen/include/asm-arm/elf.h rename to xen/include/arch-arm/asm/elf.h diff --git a/xen/include/asm-arm/event.h b/xen/include/arch-arm/asm/event.h similarity index 100% rename from xen/include/asm-arm/event.h rename to xen/include/arch-arm/asm/event.h diff --git a/xen/include/asm-arm/exynos4210-uart.h b/xen/include/arch-arm/a= sm/exynos4210-uart.h similarity index 100% rename from xen/include/asm-arm/exynos4210-uart.h rename to xen/include/arch-arm/asm/exynos4210-uart.h diff --git a/xen/include/asm-arm/flushtlb.h b/xen/include/arch-arm/asm/flus= htlb.h similarity index 100% rename from xen/include/asm-arm/flushtlb.h rename to xen/include/arch-arm/asm/flushtlb.h diff --git a/xen/include/asm-arm/gic.h b/xen/include/arch-arm/asm/gic.h similarity index 100% rename from xen/include/asm-arm/gic.h rename to xen/include/arch-arm/asm/gic.h diff --git a/xen/include/asm-arm/gic_v3_defs.h b/xen/include/arch-arm/asm/g= ic_v3_defs.h similarity index 100% rename from xen/include/asm-arm/gic_v3_defs.h rename to xen/include/arch-arm/asm/gic_v3_defs.h diff --git a/xen/include/asm-arm/gic_v3_its.h b/xen/include/arch-arm/asm/gi= c_v3_its.h similarity index 100% rename from xen/include/asm-arm/gic_v3_its.h rename to xen/include/arch-arm/asm/gic_v3_its.h diff --git a/xen/include/asm-arm/grant_table.h b/xen/include/arch-arm/asm/g= rant_table.h similarity index 100% rename from xen/include/asm-arm/grant_table.h rename to xen/include/arch-arm/asm/grant_table.h diff --git a/xen/include/asm-arm/guest_access.h b/xen/include/arch-arm/asm/= guest_access.h similarity index 100% rename from xen/include/asm-arm/guest_access.h rename to xen/include/arch-arm/asm/guest_access.h diff --git a/xen/include/asm-arm/guest_atomics.h b/xen/include/arch-arm/asm= /guest_atomics.h similarity index 100% rename from xen/include/asm-arm/guest_atomics.h rename to xen/include/arch-arm/asm/guest_atomics.h diff --git a/xen/include/asm-arm/guest_walk.h b/xen/include/arch-arm/asm/gu= est_walk.h similarity index 100% rename from xen/include/asm-arm/guest_walk.h rename to xen/include/arch-arm/asm/guest_walk.h diff --git a/xen/include/asm-arm/hardirq.h b/xen/include/arch-arm/asm/hardi= rq.h similarity index 100% rename from xen/include/asm-arm/hardirq.h rename to xen/include/arch-arm/asm/hardirq.h diff --git a/xen/include/asm-arm/hsr.h b/xen/include/arch-arm/asm/hsr.h similarity index 100% rename from xen/include/asm-arm/hsr.h rename to xen/include/arch-arm/asm/hsr.h diff --git a/xen/include/asm-arm/hypercall.h b/xen/include/arch-arm/asm/hyp= ercall.h similarity index 100% rename from xen/include/asm-arm/hypercall.h rename to xen/include/arch-arm/asm/hypercall.h diff --git a/xen/include/asm-arm/init.h b/xen/include/arch-arm/asm/init.h similarity index 100% rename from xen/include/asm-arm/init.h rename to xen/include/arch-arm/asm/init.h diff --git a/xen/include/asm-arm/insn.h b/xen/include/arch-arm/asm/insn.h similarity index 100% rename from xen/include/asm-arm/insn.h rename to xen/include/arch-arm/asm/insn.h diff --git a/xen/include/asm-arm/io.h b/xen/include/arch-arm/asm/io.h similarity index 100% rename from xen/include/asm-arm/io.h rename to xen/include/arch-arm/asm/io.h diff --git a/xen/include/asm-arm/iocap.h b/xen/include/arch-arm/asm/iocap.h similarity index 100% rename from xen/include/asm-arm/iocap.h rename to xen/include/arch-arm/asm/iocap.h diff --git a/xen/include/asm-arm/iommu.h b/xen/include/arch-arm/asm/iommu.h similarity index 100% rename from xen/include/asm-arm/iommu.h rename to xen/include/arch-arm/asm/iommu.h diff --git a/xen/include/asm-arm/iommu_fwspec.h b/xen/include/arch-arm/asm/= iommu_fwspec.h similarity index 100% rename from xen/include/asm-arm/iommu_fwspec.h rename to xen/include/arch-arm/asm/iommu_fwspec.h diff --git a/xen/include/asm-arm/ioreq.h b/xen/include/arch-arm/asm/ioreq.h similarity index 100% rename from xen/include/asm-arm/ioreq.h rename to xen/include/arch-arm/asm/ioreq.h diff --git a/xen/include/asm-arm/irq.h b/xen/include/arch-arm/asm/irq.h similarity index 100% rename from xen/include/asm-arm/irq.h rename to xen/include/arch-arm/asm/irq.h diff --git a/xen/include/asm-arm/kernel.h b/xen/include/arch-arm/asm/kernel= .h similarity index 100% rename from xen/include/asm-arm/kernel.h rename to xen/include/arch-arm/asm/kernel.h diff --git a/xen/include/asm-arm/livepatch.h b/xen/include/arch-arm/asm/liv= epatch.h similarity index 100% rename from xen/include/asm-arm/livepatch.h rename to xen/include/arch-arm/asm/livepatch.h diff --git a/xen/include/asm-arm/lpae.h b/xen/include/arch-arm/asm/lpae.h similarity index 100% rename from xen/include/asm-arm/lpae.h rename to xen/include/arch-arm/asm/lpae.h diff --git a/xen/include/asm-arm/macros.h b/xen/include/arch-arm/asm/macros= .h similarity index 100% rename from xen/include/asm-arm/macros.h rename to xen/include/arch-arm/asm/macros.h diff --git a/xen/include/asm-arm/mem_access.h b/xen/include/arch-arm/asm/me= m_access.h similarity index 100% rename from xen/include/asm-arm/mem_access.h rename to xen/include/arch-arm/asm/mem_access.h diff --git a/xen/include/asm-arm/mm.h b/xen/include/arch-arm/asm/mm.h similarity index 100% rename from xen/include/asm-arm/mm.h rename to xen/include/arch-arm/asm/mm.h diff --git a/xen/include/asm-arm/mmio.h b/xen/include/arch-arm/asm/mmio.h similarity index 100% rename from xen/include/asm-arm/mmio.h rename to xen/include/arch-arm/asm/mmio.h diff --git a/xen/include/asm-arm/monitor.h b/xen/include/arch-arm/asm/monit= or.h similarity index 100% rename from xen/include/asm-arm/monitor.h rename to xen/include/arch-arm/asm/monitor.h diff --git a/xen/include/asm-arm/new_vgic.h b/xen/include/arch-arm/asm/new_= vgic.h similarity index 100% rename from xen/include/asm-arm/new_vgic.h rename to xen/include/arch-arm/asm/new_vgic.h diff --git a/xen/include/asm-arm/nospec.h b/xen/include/arch-arm/asm/nospec= .h similarity index 100% rename from xen/include/asm-arm/nospec.h rename to xen/include/arch-arm/asm/nospec.h diff --git a/xen/include/asm-arm/numa.h b/xen/include/arch-arm/asm/numa.h similarity index 100% rename from xen/include/asm-arm/numa.h rename to xen/include/arch-arm/asm/numa.h diff --git a/xen/include/asm-arm/p2m.h b/xen/include/arch-arm/asm/p2m.h similarity index 100% rename from xen/include/asm-arm/p2m.h rename to xen/include/arch-arm/asm/p2m.h diff --git a/xen/include/asm-arm/page-bits.h b/xen/include/arch-arm/asm/pag= e-bits.h similarity index 100% rename from xen/include/asm-arm/page-bits.h rename to xen/include/arch-arm/asm/page-bits.h diff --git a/xen/include/asm-arm/page.h b/xen/include/arch-arm/asm/page.h similarity index 100% rename from xen/include/asm-arm/page.h rename to xen/include/arch-arm/asm/page.h diff --git a/xen/include/asm-arm/paging.h b/xen/include/arch-arm/asm/paging= .h similarity index 100% rename from xen/include/asm-arm/paging.h rename to xen/include/arch-arm/asm/paging.h diff --git a/xen/include/asm-arm/pci.h b/xen/include/arch-arm/asm/pci.h similarity index 100% rename from xen/include/asm-arm/pci.h rename to xen/include/arch-arm/asm/pci.h diff --git a/xen/include/asm-arm/percpu.h b/xen/include/arch-arm/asm/percpu= .h similarity index 100% rename from xen/include/asm-arm/percpu.h rename to xen/include/arch-arm/asm/percpu.h diff --git a/xen/include/asm-arm/perfc.h b/xen/include/arch-arm/asm/perfc.h similarity index 100% rename from xen/include/asm-arm/perfc.h rename to xen/include/arch-arm/asm/perfc.h diff --git a/xen/include/asm-arm/perfc_defn.h b/xen/include/arch-arm/asm/pe= rfc_defn.h similarity index 100% rename from xen/include/asm-arm/perfc_defn.h rename to xen/include/arch-arm/asm/perfc_defn.h diff --git a/xen/include/asm-arm/pl011-uart.h b/xen/include/arch-arm/asm/pl= 011-uart.h similarity index 100% rename from xen/include/asm-arm/pl011-uart.h rename to xen/include/arch-arm/asm/pl011-uart.h diff --git a/xen/include/asm-arm/platform.h b/xen/include/arch-arm/asm/plat= form.h similarity index 100% rename from xen/include/asm-arm/platform.h rename to xen/include/arch-arm/asm/platform.h diff --git a/xen/include/asm-arm/platforms/exynos5.h b/xen/include/arch-arm= /asm/platforms/exynos5.h similarity index 100% rename from xen/include/asm-arm/platforms/exynos5.h rename to xen/include/arch-arm/asm/platforms/exynos5.h diff --git a/xen/include/asm-arm/platforms/midway.h b/xen/include/arch-arm/= asm/platforms/midway.h similarity index 100% rename from xen/include/asm-arm/platforms/midway.h rename to xen/include/arch-arm/asm/platforms/midway.h diff --git a/xen/include/asm-arm/platforms/omap5.h b/xen/include/arch-arm/a= sm/platforms/omap5.h similarity index 100% rename from xen/include/asm-arm/platforms/omap5.h rename to xen/include/arch-arm/asm/platforms/omap5.h diff --git a/xen/include/asm-arm/platforms/vexpress.h b/xen/include/arch-ar= m/asm/platforms/vexpress.h similarity index 100% rename from xen/include/asm-arm/platforms/vexpress.h rename to xen/include/arch-arm/asm/platforms/vexpress.h diff --git a/xen/include/asm-arm/platforms/xilinx-zynqmp-eemi.h b/xen/inclu= de/arch-arm/asm/platforms/xilinx-zynqmp-eemi.h similarity index 100% rename from xen/include/asm-arm/platforms/xilinx-zynqmp-eemi.h rename to xen/include/arch-arm/asm/platforms/xilinx-zynqmp-eemi.h diff --git a/xen/include/asm-arm/processor.h b/xen/include/arch-arm/asm/pro= cessor.h similarity index 100% rename from xen/include/asm-arm/processor.h rename to xen/include/arch-arm/asm/processor.h diff --git a/xen/include/asm-arm/procinfo.h b/xen/include/arch-arm/asm/proc= info.h similarity index 100% rename from xen/include/asm-arm/procinfo.h rename to xen/include/arch-arm/asm/procinfo.h diff --git a/xen/include/asm-arm/psci.h b/xen/include/arch-arm/asm/psci.h similarity index 100% rename from xen/include/asm-arm/psci.h rename to xen/include/arch-arm/asm/psci.h diff --git a/xen/include/asm-arm/random.h b/xen/include/arch-arm/asm/random= .h similarity index 100% rename from xen/include/asm-arm/random.h rename to xen/include/arch-arm/asm/random.h diff --git a/xen/include/asm-arm/regs.h b/xen/include/arch-arm/asm/regs.h similarity index 100% rename from xen/include/asm-arm/regs.h rename to xen/include/arch-arm/asm/regs.h diff --git a/xen/include/asm-arm/scif-uart.h b/xen/include/arch-arm/asm/sci= f-uart.h similarity index 100% rename from xen/include/asm-arm/scif-uart.h rename to xen/include/arch-arm/asm/scif-uart.h diff --git a/xen/include/asm-arm/setup.h b/xen/include/arch-arm/asm/setup.h similarity index 100% rename from xen/include/asm-arm/setup.h rename to xen/include/arch-arm/asm/setup.h diff --git a/xen/include/asm-arm/short-desc.h b/xen/include/arch-arm/asm/sh= ort-desc.h similarity index 100% rename from xen/include/asm-arm/short-desc.h rename to xen/include/arch-arm/asm/short-desc.h diff --git a/xen/include/asm-arm/smccc.h b/xen/include/arch-arm/asm/smccc.h similarity index 100% rename from xen/include/asm-arm/smccc.h rename to xen/include/arch-arm/asm/smccc.h diff --git a/xen/include/asm-arm/smp.h b/xen/include/arch-arm/asm/smp.h similarity index 100% rename from xen/include/asm-arm/smp.h rename to xen/include/arch-arm/asm/smp.h diff --git a/xen/include/asm-arm/softirq.h b/xen/include/arch-arm/asm/softi= rq.h similarity index 100% rename from xen/include/asm-arm/softirq.h rename to xen/include/arch-arm/asm/softirq.h diff --git a/xen/include/asm-arm/spinlock.h b/xen/include/arch-arm/asm/spin= lock.h similarity index 100% rename from xen/include/asm-arm/spinlock.h rename to xen/include/arch-arm/asm/spinlock.h diff --git a/xen/include/asm-arm/string.h b/xen/include/arch-arm/asm/string= .h similarity index 100% rename from xen/include/asm-arm/string.h rename to xen/include/arch-arm/asm/string.h diff --git a/xen/include/asm-arm/sysregs.h b/xen/include/arch-arm/asm/sysre= gs.h similarity index 100% rename from xen/include/asm-arm/sysregs.h rename to xen/include/arch-arm/asm/sysregs.h diff --git a/xen/include/asm-arm/system.h b/xen/include/arch-arm/asm/system= .h similarity index 100% rename from xen/include/asm-arm/system.h rename to xen/include/arch-arm/asm/system.h diff --git a/xen/include/asm-arm/tee/optee_msg.h b/xen/include/arch-arm/asm= /tee/optee_msg.h similarity index 100% rename from xen/include/asm-arm/tee/optee_msg.h rename to xen/include/arch-arm/asm/tee/optee_msg.h diff --git a/xen/include/asm-arm/tee/optee_rpc_cmd.h b/xen/include/arch-arm= /asm/tee/optee_rpc_cmd.h similarity index 100% rename from xen/include/asm-arm/tee/optee_rpc_cmd.h rename to xen/include/arch-arm/asm/tee/optee_rpc_cmd.h diff --git a/xen/include/asm-arm/tee/optee_smc.h b/xen/include/arch-arm/asm= /tee/optee_smc.h similarity index 100% rename from xen/include/asm-arm/tee/optee_smc.h rename to xen/include/arch-arm/asm/tee/optee_smc.h diff --git a/xen/include/asm-arm/tee/tee.h b/xen/include/arch-arm/asm/tee/t= ee.h similarity index 100% rename from xen/include/asm-arm/tee/tee.h rename to xen/include/arch-arm/asm/tee/tee.h diff --git a/xen/include/asm-arm/time.h b/xen/include/arch-arm/asm/time.h similarity index 100% rename from xen/include/asm-arm/time.h rename to xen/include/arch-arm/asm/time.h diff --git a/xen/include/asm-arm/trace.h b/xen/include/arch-arm/asm/trace.h similarity index 100% rename from xen/include/asm-arm/trace.h rename to xen/include/arch-arm/asm/trace.h diff --git a/xen/include/asm-arm/traps.h b/xen/include/arch-arm/asm/traps.h similarity index 100% rename from xen/include/asm-arm/traps.h rename to xen/include/arch-arm/asm/traps.h diff --git a/xen/include/asm-arm/types.h b/xen/include/arch-arm/asm/types.h similarity index 100% rename from xen/include/asm-arm/types.h rename to xen/include/arch-arm/asm/types.h diff --git a/xen/include/asm-arm/vfp.h b/xen/include/arch-arm/asm/vfp.h similarity index 100% rename from xen/include/asm-arm/vfp.h rename to xen/include/arch-arm/asm/vfp.h diff --git a/xen/include/asm-arm/vgic-emul.h b/xen/include/arch-arm/asm/vgi= c-emul.h similarity index 100% rename from xen/include/asm-arm/vgic-emul.h rename to xen/include/arch-arm/asm/vgic-emul.h diff --git a/xen/include/asm-arm/vgic.h b/xen/include/arch-arm/asm/vgic.h similarity index 100% rename from xen/include/asm-arm/vgic.h rename to xen/include/arch-arm/asm/vgic.h diff --git a/xen/include/asm-arm/vm_event.h b/xen/include/arch-arm/asm/vm_e= vent.h similarity index 100% rename from xen/include/asm-arm/vm_event.h rename to xen/include/arch-arm/asm/vm_event.h diff --git a/xen/include/asm-arm/vpl011.h b/xen/include/arch-arm/asm/vpl011= .h similarity index 100% rename from xen/include/asm-arm/vpl011.h rename to xen/include/arch-arm/asm/vpl011.h diff --git a/xen/include/asm-arm/vpsci.h b/xen/include/arch-arm/asm/vpsci.h similarity index 100% rename from xen/include/asm-arm/vpsci.h rename to xen/include/arch-arm/asm/vpsci.h diff --git a/xen/include/asm-arm/vreg.h b/xen/include/arch-arm/asm/vreg.h similarity index 100% rename from xen/include/asm-arm/vreg.h rename to xen/include/arch-arm/asm/vreg.h diff --git a/xen/include/asm-arm/vtimer.h b/xen/include/arch-arm/asm/vtimer= .h similarity index 100% rename from xen/include/asm-arm/vtimer.h rename to xen/include/arch-arm/asm/vtimer.h diff --git a/xen/include/asm-arm/xenoprof.h b/xen/include/arch-arm/asm/xeno= prof.h similarity index 100% rename from xen/include/asm-arm/xenoprof.h rename to xen/include/arch-arm/asm/xenoprof.h diff --git a/xen/include/asm-riscv/config.h b/xen/include/arch-riscv/asm/co= nfig.h similarity index 100% rename from xen/include/asm-riscv/config.h rename to xen/include/arch-riscv/asm/config.h diff --git a/xen/include/asm-x86/acpi.h b/xen/include/arch-x86/asm/acpi.h similarity index 100% rename from xen/include/asm-x86/acpi.h rename to xen/include/arch-x86/asm/acpi.h diff --git a/xen/include/asm-x86/alternative-asm.h b/xen/include/arch-x86/a= sm/alternative-asm.h similarity index 100% rename from xen/include/asm-x86/alternative-asm.h rename to xen/include/arch-x86/asm/alternative-asm.h diff --git a/xen/include/asm-x86/alternative.h b/xen/include/arch-x86/asm/a= lternative.h similarity index 100% rename from xen/include/asm-x86/alternative.h rename to xen/include/arch-x86/asm/alternative.h diff --git a/xen/include/asm-x86/altp2m.h b/xen/include/arch-x86/asm/altp2m= .h similarity index 100% rename from xen/include/asm-x86/altp2m.h rename to xen/include/arch-x86/asm/altp2m.h diff --git a/xen/include/asm-x86/amd.h b/xen/include/arch-x86/asm/amd.h similarity index 100% rename from xen/include/asm-x86/amd.h rename to xen/include/arch-x86/asm/amd.h diff --git a/xen/include/asm-x86/apic.h b/xen/include/arch-x86/asm/apic.h similarity index 100% rename from xen/include/asm-x86/apic.h rename to xen/include/arch-x86/asm/apic.h diff --git a/xen/include/asm-x86/apicdef.h b/xen/include/arch-x86/asm/apicd= ef.h similarity index 100% rename from xen/include/asm-x86/apicdef.h rename to xen/include/arch-x86/asm/apicdef.h diff --git a/xen/include/asm-x86/asm-defns.h b/xen/include/arch-x86/asm/asm= -defns.h similarity index 100% rename from xen/include/asm-x86/asm-defns.h rename to xen/include/arch-x86/asm/asm-defns.h diff --git a/xen/include/asm-x86/asm_defns.h b/xen/include/arch-x86/asm/asm= _defns.h similarity index 100% rename from xen/include/asm-x86/asm_defns.h rename to xen/include/arch-x86/asm/asm_defns.h diff --git a/xen/include/asm-x86/atomic.h b/xen/include/arch-x86/asm/atomic= .h similarity index 100% rename from xen/include/asm-x86/atomic.h rename to xen/include/arch-x86/asm/atomic.h diff --git a/xen/include/asm-x86/bitops.h b/xen/include/arch-x86/asm/bitops= .h similarity index 100% rename from xen/include/asm-x86/bitops.h rename to xen/include/arch-x86/asm/bitops.h diff --git a/xen/include/asm-x86/bug.h b/xen/include/arch-x86/asm/bug.h similarity index 100% rename from xen/include/asm-x86/bug.h rename to xen/include/arch-x86/asm/bug.h diff --git a/xen/include/asm-x86/byteorder.h b/xen/include/arch-x86/asm/byt= eorder.h similarity index 100% rename from xen/include/asm-x86/byteorder.h rename to xen/include/arch-x86/asm/byteorder.h diff --git a/xen/include/asm-x86/bzimage.h b/xen/include/arch-x86/asm/bzima= ge.h similarity index 100% rename from xen/include/asm-x86/bzimage.h rename to xen/include/arch-x86/asm/bzimage.h diff --git a/xen/include/asm-x86/cache.h b/xen/include/arch-x86/asm/cache.h similarity index 100% rename from xen/include/asm-x86/cache.h rename to xen/include/arch-x86/asm/cache.h diff --git a/xen/include/asm-x86/compat.h b/xen/include/arch-x86/asm/compat= .h similarity index 100% rename from xen/include/asm-x86/compat.h rename to xen/include/arch-x86/asm/compat.h diff --git a/xen/include/asm-x86/config.h b/xen/include/arch-x86/asm/config= .h similarity index 100% rename from xen/include/asm-x86/config.h rename to xen/include/arch-x86/asm/config.h diff --git a/xen/include/asm-x86/cpufeature.h b/xen/include/arch-x86/asm/cp= ufeature.h similarity index 100% rename from xen/include/asm-x86/cpufeature.h rename to xen/include/arch-x86/asm/cpufeature.h diff --git a/xen/include/asm-x86/cpufeatures.h b/xen/include/arch-x86/asm/c= pufeatures.h similarity index 100% rename from xen/include/asm-x86/cpufeatures.h rename to xen/include/arch-x86/asm/cpufeatures.h diff --git a/xen/include/asm-x86/cpufeatureset.h b/xen/include/arch-x86/asm= /cpufeatureset.h similarity index 100% rename from xen/include/asm-x86/cpufeatureset.h rename to xen/include/arch-x86/asm/cpufeatureset.h diff --git a/xen/include/asm-x86/cpuid.h b/xen/include/arch-x86/asm/cpuid.h similarity index 100% rename from xen/include/asm-x86/cpuid.h rename to xen/include/arch-x86/asm/cpuid.h diff --git a/xen/include/asm-x86/cpuidle.h b/xen/include/arch-x86/asm/cpuid= le.h similarity index 100% rename from xen/include/asm-x86/cpuidle.h rename to xen/include/arch-x86/asm/cpuidle.h diff --git a/xen/include/asm-x86/current.h b/xen/include/arch-x86/asm/curre= nt.h similarity index 99% rename from xen/include/asm-x86/current.h rename to xen/include/arch-x86/asm/current.h index a74ad4bc4c44..c0f949eb2a19 100644 --- a/xen/include/asm-x86/current.h +++ b/xen/include/arch-x86/asm/current.h @@ -53,7 +53,7 @@ struct cpu_info { unsigned long xen_cr3; unsigned long pv_cr3; =20 - /* See asm-x86/spec_ctrl_asm.h for usage. */ + /* See arch-x86/asm/spec_ctrl_asm.h for usage. */ unsigned int shadow_spec_ctrl; uint8_t xen_spec_ctrl; uint8_t spec_ctrl_flags; diff --git a/xen/include/asm-x86/debugger.h b/xen/include/arch-x86/asm/debu= gger.h similarity index 100% rename from xen/include/asm-x86/debugger.h rename to xen/include/arch-x86/asm/debugger.h diff --git a/xen/include/asm-x86/debugreg.h b/xen/include/arch-x86/asm/debu= greg.h similarity index 100% rename from xen/include/asm-x86/debugreg.h rename to xen/include/arch-x86/asm/debugreg.h diff --git a/xen/include/asm-x86/delay.h b/xen/include/arch-x86/asm/delay.h similarity index 100% rename from xen/include/asm-x86/delay.h rename to xen/include/arch-x86/asm/delay.h diff --git a/xen/include/asm-x86/desc.h b/xen/include/arch-x86/asm/desc.h similarity index 100% rename from xen/include/asm-x86/desc.h rename to xen/include/arch-x86/asm/desc.h diff --git a/xen/include/asm-x86/device.h b/xen/include/arch-x86/asm/device= .h similarity index 100% rename from xen/include/asm-x86/device.h rename to xen/include/arch-x86/asm/device.h diff --git a/xen/include/asm-x86/div64.h b/xen/include/arch-x86/asm/div64.h similarity index 100% rename from xen/include/asm-x86/div64.h rename to xen/include/arch-x86/asm/div64.h diff --git a/xen/include/asm-x86/dom0_build.h b/xen/include/arch-x86/asm/do= m0_build.h similarity index 100% rename from xen/include/asm-x86/dom0_build.h rename to xen/include/arch-x86/asm/dom0_build.h diff --git a/xen/include/asm-x86/domain.h b/xen/include/arch-x86/asm/domain= .h similarity index 99% rename from xen/include/asm-x86/domain.h rename to xen/include/arch-x86/asm/domain.h index 92d54de0b9a1..85ad302c0e92 100644 --- a/xen/include/asm-x86/domain.h +++ b/xen/include/arch-x86/asm/domain.h @@ -384,7 +384,7 @@ struct arch_domain struct PITState vpit; =20 /* TSC management (emulation, pv, scaling, stats) */ - int tsc_mode; /* see include/asm-x86/time.h */ + int tsc_mode; /* see include/arch-x86/asm/time.h */ bool_t vtsc; /* tsc is emulated (may change after migrate)= */ s_time_t vtsc_last; /* previous TSC value (guarantee monotonicity= ) */ uint64_t vtsc_offset; /* adjustment for save/restore/migrate */ diff --git a/xen/include/asm-x86/e820.h b/xen/include/arch-x86/asm/e820.h similarity index 100% rename from xen/include/asm-x86/e820.h rename to xen/include/arch-x86/asm/e820.h diff --git a/xen/include/asm-x86/edd.h b/xen/include/arch-x86/asm/edd.h similarity index 100% rename from xen/include/asm-x86/edd.h rename to xen/include/arch-x86/asm/edd.h diff --git a/xen/include/asm-x86/efibind.h b/xen/include/arch-x86/asm/efibi= nd.h similarity index 100% rename from xen/include/asm-x86/efibind.h rename to xen/include/arch-x86/asm/efibind.h diff --git a/xen/include/asm-x86/elf.h b/xen/include/arch-x86/asm/elf.h similarity index 100% rename from xen/include/asm-x86/elf.h rename to xen/include/arch-x86/asm/elf.h diff --git a/xen/include/asm-x86/event.h b/xen/include/arch-x86/asm/event.h similarity index 100% rename from xen/include/asm-x86/event.h rename to xen/include/arch-x86/asm/event.h diff --git a/xen/include/asm-x86/fixmap.h b/xen/include/arch-x86/asm/fixmap= .h similarity index 100% rename from xen/include/asm-x86/fixmap.h rename to xen/include/arch-x86/asm/fixmap.h diff --git a/xen/include/asm-x86/flushtlb.h b/xen/include/arch-x86/asm/flus= htlb.h similarity index 100% rename from xen/include/asm-x86/flushtlb.h rename to xen/include/arch-x86/asm/flushtlb.h diff --git a/xen/include/asm-x86/genapic.h b/xen/include/arch-x86/asm/genap= ic.h similarity index 100% rename from xen/include/asm-x86/genapic.h rename to xen/include/arch-x86/asm/genapic.h diff --git a/xen/include/asm-x86/grant_table.h b/xen/include/arch-x86/asm/g= rant_table.h similarity index 100% rename from xen/include/asm-x86/grant_table.h rename to xen/include/arch-x86/asm/grant_table.h diff --git a/xen/include/asm-x86/guest.h b/xen/include/arch-x86/asm/guest.h similarity index 100% rename from xen/include/asm-x86/guest.h rename to xen/include/arch-x86/asm/guest.h diff --git a/xen/include/asm-x86/guest/hyperv-hcall.h b/xen/include/arch-x8= 6/asm/guest/hyperv-hcall.h similarity index 100% rename from xen/include/asm-x86/guest/hyperv-hcall.h rename to xen/include/arch-x86/asm/guest/hyperv-hcall.h diff --git a/xen/include/asm-x86/guest/hyperv-tlfs.h b/xen/include/arch-x86= /asm/guest/hyperv-tlfs.h similarity index 100% rename from xen/include/asm-x86/guest/hyperv-tlfs.h rename to xen/include/arch-x86/asm/guest/hyperv-tlfs.h diff --git a/xen/include/asm-x86/guest/hyperv.h b/xen/include/arch-x86/asm/= guest/hyperv.h similarity index 100% rename from xen/include/asm-x86/guest/hyperv.h rename to xen/include/arch-x86/asm/guest/hyperv.h diff --git a/xen/include/asm-x86/guest/hypervisor.h b/xen/include/arch-x86/= asm/guest/hypervisor.h similarity index 100% rename from xen/include/asm-x86/guest/hypervisor.h rename to xen/include/arch-x86/asm/guest/hypervisor.h diff --git a/xen/include/asm-x86/guest/pvh-boot.h b/xen/include/arch-x86/as= m/guest/pvh-boot.h similarity index 100% rename from xen/include/asm-x86/guest/pvh-boot.h rename to xen/include/arch-x86/asm/guest/pvh-boot.h diff --git a/xen/include/asm-x86/guest/xen-hcall.h b/xen/include/arch-x86/a= sm/guest/xen-hcall.h similarity index 100% rename from xen/include/asm-x86/guest/xen-hcall.h rename to xen/include/arch-x86/asm/guest/xen-hcall.h diff --git a/xen/include/asm-x86/guest/xen.h b/xen/include/arch-x86/asm/gue= st/xen.h similarity index 100% rename from xen/include/asm-x86/guest/xen.h rename to xen/include/arch-x86/asm/guest/xen.h diff --git a/xen/include/asm-x86/guest_access.h b/xen/include/arch-x86/asm/= guest_access.h similarity index 100% rename from xen/include/asm-x86/guest_access.h rename to xen/include/arch-x86/asm/guest_access.h diff --git a/xen/include/asm-x86/guest_atomics.h b/xen/include/arch-x86/asm= /guest_atomics.h similarity index 100% rename from xen/include/asm-x86/guest_atomics.h rename to xen/include/arch-x86/asm/guest_atomics.h diff --git a/xen/include/asm-x86/guest_pt.h b/xen/include/arch-x86/asm/gues= t_pt.h similarity index 100% rename from xen/include/asm-x86/guest_pt.h rename to xen/include/arch-x86/asm/guest_pt.h diff --git a/xen/include/asm-x86/hap.h b/xen/include/arch-x86/asm/hap.h similarity index 100% rename from xen/include/asm-x86/hap.h rename to xen/include/arch-x86/asm/hap.h diff --git a/xen/include/asm-x86/hardirq.h b/xen/include/arch-x86/asm/hardi= rq.h similarity index 100% rename from xen/include/asm-x86/hardirq.h rename to xen/include/arch-x86/asm/hardirq.h diff --git a/xen/include/asm-x86/hpet.h b/xen/include/arch-x86/asm/hpet.h similarity index 100% rename from xen/include/asm-x86/hpet.h rename to xen/include/arch-x86/asm/hpet.h diff --git a/xen/include/asm-x86/hvm/asid.h b/xen/include/arch-x86/asm/hvm/= asid.h similarity index 100% rename from xen/include/asm-x86/hvm/asid.h rename to xen/include/arch-x86/asm/hvm/asid.h diff --git a/xen/include/asm-x86/hvm/cacheattr.h b/xen/include/arch-x86/asm= /hvm/cacheattr.h similarity index 100% rename from xen/include/asm-x86/hvm/cacheattr.h rename to xen/include/arch-x86/asm/hvm/cacheattr.h diff --git a/xen/include/asm-x86/hvm/domain.h b/xen/include/arch-x86/asm/hv= m/domain.h similarity index 100% rename from xen/include/asm-x86/hvm/domain.h rename to xen/include/arch-x86/asm/hvm/domain.h diff --git a/xen/include/asm-x86/hvm/emulate.h b/xen/include/arch-x86/asm/h= vm/emulate.h similarity index 100% rename from xen/include/asm-x86/hvm/emulate.h rename to xen/include/arch-x86/asm/hvm/emulate.h diff --git a/xen/include/asm-x86/hvm/grant_table.h b/xen/include/arch-x86/a= sm/hvm/grant_table.h similarity index 100% rename from xen/include/asm-x86/hvm/grant_table.h rename to xen/include/arch-x86/asm/hvm/grant_table.h diff --git a/xen/include/asm-x86/hvm/guest_access.h b/xen/include/arch-x86/= asm/hvm/guest_access.h similarity index 100% rename from xen/include/asm-x86/hvm/guest_access.h rename to xen/include/arch-x86/asm/hvm/guest_access.h diff --git a/xen/include/asm-x86/hvm/hvm.h b/xen/include/arch-x86/asm/hvm/h= vm.h similarity index 100% rename from xen/include/asm-x86/hvm/hvm.h rename to xen/include/arch-x86/asm/hvm/hvm.h diff --git a/xen/include/asm-x86/hvm/io.h b/xen/include/arch-x86/asm/hvm/io= .h similarity index 100% rename from xen/include/asm-x86/hvm/io.h rename to xen/include/arch-x86/asm/hvm/io.h diff --git a/xen/include/asm-x86/hvm/ioreq.h b/xen/include/arch-x86/asm/hvm= /ioreq.h similarity index 100% rename from xen/include/asm-x86/hvm/ioreq.h rename to xen/include/arch-x86/asm/hvm/ioreq.h diff --git a/xen/include/asm-x86/hvm/irq.h b/xen/include/arch-x86/asm/hvm/i= rq.h similarity index 100% rename from xen/include/asm-x86/hvm/irq.h rename to xen/include/arch-x86/asm/hvm/irq.h diff --git a/xen/include/asm-x86/hvm/monitor.h b/xen/include/arch-x86/asm/h= vm/monitor.h similarity index 100% rename from xen/include/asm-x86/hvm/monitor.h rename to xen/include/arch-x86/asm/hvm/monitor.h diff --git a/xen/include/asm-x86/hvm/nestedhvm.h b/xen/include/arch-x86/asm= /hvm/nestedhvm.h similarity index 100% rename from xen/include/asm-x86/hvm/nestedhvm.h rename to xen/include/arch-x86/asm/hvm/nestedhvm.h diff --git a/xen/include/asm-x86/hvm/save.h b/xen/include/arch-x86/asm/hvm/= save.h similarity index 100% rename from xen/include/asm-x86/hvm/save.h rename to xen/include/arch-x86/asm/hvm/save.h diff --git a/xen/include/asm-x86/hvm/support.h b/xen/include/arch-x86/asm/h= vm/support.h similarity index 100% rename from xen/include/asm-x86/hvm/support.h rename to xen/include/arch-x86/asm/hvm/support.h diff --git a/xen/include/asm-x86/hvm/svm/asid.h b/xen/include/arch-x86/asm/= hvm/svm/asid.h similarity index 100% rename from xen/include/asm-x86/hvm/svm/asid.h rename to xen/include/arch-x86/asm/hvm/svm/asid.h diff --git a/xen/include/asm-x86/hvm/svm/emulate.h b/xen/include/arch-x86/a= sm/hvm/svm/emulate.h similarity index 100% rename from xen/include/asm-x86/hvm/svm/emulate.h rename to xen/include/arch-x86/asm/hvm/svm/emulate.h diff --git a/xen/include/asm-x86/hvm/svm/intr.h b/xen/include/arch-x86/asm/= hvm/svm/intr.h similarity index 100% rename from xen/include/asm-x86/hvm/svm/intr.h rename to xen/include/arch-x86/asm/hvm/svm/intr.h diff --git a/xen/include/asm-x86/hvm/svm/nestedsvm.h b/xen/include/arch-x86= /asm/hvm/svm/nestedsvm.h similarity index 100% rename from xen/include/asm-x86/hvm/svm/nestedsvm.h rename to xen/include/arch-x86/asm/hvm/svm/nestedsvm.h diff --git a/xen/include/asm-x86/hvm/svm/svm.h b/xen/include/arch-x86/asm/h= vm/svm/svm.h similarity index 100% rename from xen/include/asm-x86/hvm/svm/svm.h rename to xen/include/arch-x86/asm/hvm/svm/svm.h diff --git a/xen/include/asm-x86/hvm/svm/svmdebug.h b/xen/include/arch-x86/= asm/hvm/svm/svmdebug.h similarity index 100% rename from xen/include/asm-x86/hvm/svm/svmdebug.h rename to xen/include/arch-x86/asm/hvm/svm/svmdebug.h diff --git a/xen/include/asm-x86/hvm/svm/vmcb.h b/xen/include/arch-x86/asm/= hvm/svm/vmcb.h similarity index 100% rename from xen/include/asm-x86/hvm/svm/vmcb.h rename to xen/include/arch-x86/asm/hvm/svm/vmcb.h diff --git a/xen/include/asm-x86/hvm/trace.h b/xen/include/arch-x86/asm/hvm= /trace.h similarity index 100% rename from xen/include/asm-x86/hvm/trace.h rename to xen/include/arch-x86/asm/hvm/trace.h diff --git a/xen/include/asm-x86/hvm/vcpu.h b/xen/include/arch-x86/asm/hvm/= vcpu.h similarity index 100% rename from xen/include/asm-x86/hvm/vcpu.h rename to xen/include/arch-x86/asm/hvm/vcpu.h diff --git a/xen/include/asm-x86/hvm/vioapic.h b/xen/include/arch-x86/asm/h= vm/vioapic.h similarity index 100% rename from xen/include/asm-x86/hvm/vioapic.h rename to xen/include/arch-x86/asm/hvm/vioapic.h diff --git a/xen/include/asm-x86/hvm/viridian.h b/xen/include/arch-x86/asm/= hvm/viridian.h similarity index 100% rename from xen/include/asm-x86/hvm/viridian.h rename to xen/include/arch-x86/asm/hvm/viridian.h diff --git a/xen/include/asm-x86/hvm/vlapic.h b/xen/include/arch-x86/asm/hv= m/vlapic.h similarity index 100% rename from xen/include/asm-x86/hvm/vlapic.h rename to xen/include/arch-x86/asm/hvm/vlapic.h diff --git a/xen/include/asm-x86/hvm/vm_event.h b/xen/include/arch-x86/asm/= hvm/vm_event.h similarity index 100% rename from xen/include/asm-x86/hvm/vm_event.h rename to xen/include/arch-x86/asm/hvm/vm_event.h diff --git a/xen/include/asm-x86/hvm/vmx/vmcs.h b/xen/include/arch-x86/asm/= hvm/vmx/vmcs.h similarity index 100% rename from xen/include/asm-x86/hvm/vmx/vmcs.h rename to xen/include/arch-x86/asm/hvm/vmx/vmcs.h diff --git a/xen/include/asm-x86/hvm/vmx/vmx.h b/xen/include/arch-x86/asm/h= vm/vmx/vmx.h similarity index 100% rename from xen/include/asm-x86/hvm/vmx/vmx.h rename to xen/include/arch-x86/asm/hvm/vmx/vmx.h diff --git a/xen/include/asm-x86/hvm/vmx/vvmx.h b/xen/include/arch-x86/asm/= hvm/vmx/vvmx.h similarity index 100% rename from xen/include/asm-x86/hvm/vmx/vvmx.h rename to xen/include/arch-x86/asm/hvm/vmx/vvmx.h diff --git a/xen/include/asm-x86/hvm/vpic.h b/xen/include/arch-x86/asm/hvm/= vpic.h similarity index 100% rename from xen/include/asm-x86/hvm/vpic.h rename to xen/include/arch-x86/asm/hvm/vpic.h diff --git a/xen/include/asm-x86/hvm/vpt.h b/xen/include/arch-x86/asm/hvm/v= pt.h similarity index 100% rename from xen/include/asm-x86/hvm/vpt.h rename to xen/include/arch-x86/asm/hvm/vpt.h diff --git a/xen/include/asm-x86/hypercall.h b/xen/include/arch-x86/asm/hyp= ercall.h similarity index 100% rename from xen/include/asm-x86/hypercall.h rename to xen/include/arch-x86/asm/hypercall.h diff --git a/xen/include/asm-x86/i387.h b/xen/include/arch-x86/asm/i387.h similarity index 100% rename from xen/include/asm-x86/i387.h rename to xen/include/arch-x86/asm/i387.h diff --git a/xen/include/asm-x86/init.h b/xen/include/arch-x86/asm/init.h similarity index 100% rename from xen/include/asm-x86/init.h rename to xen/include/arch-x86/asm/init.h diff --git a/xen/include/asm-x86/invpcid.h b/xen/include/arch-x86/asm/invpc= id.h similarity index 100% rename from xen/include/asm-x86/invpcid.h rename to xen/include/arch-x86/asm/invpcid.h diff --git a/xen/include/asm-x86/io.h b/xen/include/arch-x86/asm/io.h similarity index 100% rename from xen/include/asm-x86/io.h rename to xen/include/arch-x86/asm/io.h diff --git a/xen/include/asm-x86/io_apic.h b/xen/include/arch-x86/asm/io_ap= ic.h similarity index 100% rename from xen/include/asm-x86/io_apic.h rename to xen/include/arch-x86/asm/io_apic.h diff --git a/xen/include/asm-x86/iocap.h b/xen/include/arch-x86/asm/iocap.h similarity index 100% rename from xen/include/asm-x86/iocap.h rename to xen/include/arch-x86/asm/iocap.h diff --git a/xen/include/asm-x86/iommu.h b/xen/include/arch-x86/asm/iommu.h similarity index 100% rename from xen/include/asm-x86/iommu.h rename to xen/include/arch-x86/asm/iommu.h diff --git a/xen/include/asm-x86/ioreq.h b/xen/include/arch-x86/asm/ioreq.h similarity index 100% rename from xen/include/asm-x86/ioreq.h rename to xen/include/arch-x86/asm/ioreq.h diff --git a/xen/include/asm-x86/irq.h b/xen/include/arch-x86/asm/irq.h similarity index 100% rename from xen/include/asm-x86/irq.h rename to xen/include/arch-x86/asm/irq.h diff --git a/xen/include/asm-x86/ldt.h b/xen/include/arch-x86/asm/ldt.h similarity index 100% rename from xen/include/asm-x86/ldt.h rename to xen/include/arch-x86/asm/ldt.h diff --git a/xen/include/asm-x86/livepatch.h b/xen/include/arch-x86/asm/liv= epatch.h similarity index 100% rename from xen/include/asm-x86/livepatch.h rename to xen/include/arch-x86/asm/livepatch.h diff --git a/xen/include/asm-x86/mach-default/bios_ebda.h b/xen/include/arc= h-x86/asm/mach-default/bios_ebda.h similarity index 100% rename from xen/include/asm-x86/mach-default/bios_ebda.h rename to xen/include/arch-x86/asm/mach-default/bios_ebda.h diff --git a/xen/include/asm-x86/mach-default/io_ports.h b/xen/include/arch= -x86/asm/mach-default/io_ports.h similarity index 100% rename from xen/include/asm-x86/mach-default/io_ports.h rename to xen/include/arch-x86/asm/mach-default/io_ports.h diff --git a/xen/include/asm-x86/mach-default/irq_vectors.h b/xen/include/a= rch-x86/asm/mach-default/irq_vectors.h similarity index 100% rename from xen/include/asm-x86/mach-default/irq_vectors.h rename to xen/include/arch-x86/asm/mach-default/irq_vectors.h diff --git a/xen/include/asm-x86/mach-default/mach_mpparse.h b/xen/include/= arch-x86/asm/mach-default/mach_mpparse.h similarity index 100% rename from xen/include/asm-x86/mach-default/mach_mpparse.h rename to xen/include/arch-x86/asm/mach-default/mach_mpparse.h diff --git a/xen/include/asm-x86/mach-default/mach_mpspec.h b/xen/include/a= rch-x86/asm/mach-default/mach_mpspec.h similarity index 100% rename from xen/include/asm-x86/mach-default/mach_mpspec.h rename to xen/include/arch-x86/asm/mach-default/mach_mpspec.h diff --git a/xen/include/asm-x86/mach-generic/mach_apic.h b/xen/include/arc= h-x86/asm/mach-generic/mach_apic.h similarity index 100% rename from xen/include/asm-x86/mach-generic/mach_apic.h rename to xen/include/arch-x86/asm/mach-generic/mach_apic.h diff --git a/xen/include/asm-x86/mach-generic/mach_mpparse.h b/xen/include/= arch-x86/asm/mach-generic/mach_mpparse.h similarity index 100% rename from xen/include/asm-x86/mach-generic/mach_mpparse.h rename to xen/include/arch-x86/asm/mach-generic/mach_mpparse.h diff --git a/xen/include/asm-x86/machine_kexec.h b/xen/include/arch-x86/asm= /machine_kexec.h similarity index 100% rename from xen/include/asm-x86/machine_kexec.h rename to xen/include/arch-x86/asm/machine_kexec.h diff --git a/xen/include/asm-x86/mc146818rtc.h b/xen/include/arch-x86/asm/m= c146818rtc.h similarity index 100% rename from xen/include/asm-x86/mc146818rtc.h rename to xen/include/arch-x86/asm/mc146818rtc.h diff --git a/xen/include/asm-x86/mce.h b/xen/include/arch-x86/asm/mce.h similarity index 100% rename from xen/include/asm-x86/mce.h rename to xen/include/arch-x86/asm/mce.h diff --git a/xen/include/asm-x86/mem_access.h b/xen/include/arch-x86/asm/me= m_access.h similarity index 100% rename from xen/include/asm-x86/mem_access.h rename to xen/include/arch-x86/asm/mem_access.h diff --git a/xen/include/asm-x86/mem_paging.h b/xen/include/arch-x86/asm/me= m_paging.h similarity index 100% rename from xen/include/asm-x86/mem_paging.h rename to xen/include/arch-x86/asm/mem_paging.h diff --git a/xen/include/asm-x86/mem_sharing.h b/xen/include/arch-x86/asm/m= em_sharing.h similarity index 100% rename from xen/include/asm-x86/mem_sharing.h rename to xen/include/arch-x86/asm/mem_sharing.h diff --git a/xen/include/asm-x86/microcode.h b/xen/include/arch-x86/asm/mic= rocode.h similarity index 100% rename from xen/include/asm-x86/microcode.h rename to xen/include/arch-x86/asm/microcode.h diff --git a/xen/include/asm-x86/mm.h b/xen/include/arch-x86/asm/mm.h similarity index 100% rename from xen/include/asm-x86/mm.h rename to xen/include/arch-x86/asm/mm.h diff --git a/xen/include/asm-x86/monitor.h b/xen/include/arch-x86/asm/monit= or.h similarity index 100% rename from xen/include/asm-x86/monitor.h rename to xen/include/arch-x86/asm/monitor.h diff --git a/xen/include/asm-x86/mpspec.h b/xen/include/arch-x86/asm/mpspec= .h similarity index 100% rename from xen/include/asm-x86/mpspec.h rename to xen/include/arch-x86/asm/mpspec.h diff --git a/xen/include/asm-x86/mpspec_def.h b/xen/include/arch-x86/asm/mp= spec_def.h similarity index 100% rename from xen/include/asm-x86/mpspec_def.h rename to xen/include/arch-x86/asm/mpspec_def.h diff --git a/xen/include/asm-x86/msi.h b/xen/include/arch-x86/asm/msi.h similarity index 100% rename from xen/include/asm-x86/msi.h rename to xen/include/arch-x86/asm/msi.h diff --git a/xen/include/asm-x86/msr-index.h b/xen/include/arch-x86/asm/msr= -index.h similarity index 100% rename from xen/include/asm-x86/msr-index.h rename to xen/include/arch-x86/asm/msr-index.h diff --git a/xen/include/asm-x86/msr.h b/xen/include/arch-x86/asm/msr.h similarity index 100% rename from xen/include/asm-x86/msr.h rename to xen/include/arch-x86/asm/msr.h diff --git a/xen/include/asm-x86/mtrr.h b/xen/include/arch-x86/asm/mtrr.h similarity index 100% rename from xen/include/asm-x86/mtrr.h rename to xen/include/arch-x86/asm/mtrr.h diff --git a/xen/include/asm-x86/multicall.h b/xen/include/arch-x86/asm/mul= ticall.h similarity index 100% rename from xen/include/asm-x86/multicall.h rename to xen/include/arch-x86/asm/multicall.h diff --git a/xen/include/asm-x86/mwait.h b/xen/include/arch-x86/asm/mwait.h similarity index 100% rename from xen/include/asm-x86/mwait.h rename to xen/include/arch-x86/asm/mwait.h diff --git a/xen/include/asm-x86/nmi.h b/xen/include/arch-x86/asm/nmi.h similarity index 100% rename from xen/include/asm-x86/nmi.h rename to xen/include/arch-x86/asm/nmi.h diff --git a/xen/include/asm-x86/nops.h b/xen/include/arch-x86/asm/nops.h similarity index 100% rename from xen/include/asm-x86/nops.h rename to xen/include/arch-x86/asm/nops.h diff --git a/xen/include/asm-x86/nospec.h b/xen/include/arch-x86/asm/nospec= .h similarity index 100% rename from xen/include/asm-x86/nospec.h rename to xen/include/arch-x86/asm/nospec.h diff --git a/xen/include/asm-x86/numa.h b/xen/include/arch-x86/asm/numa.h similarity index 100% rename from xen/include/asm-x86/numa.h rename to xen/include/arch-x86/asm/numa.h diff --git a/xen/include/asm-x86/p2m.h b/xen/include/arch-x86/asm/p2m.h similarity index 100% rename from xen/include/asm-x86/p2m.h rename to xen/include/arch-x86/asm/p2m.h diff --git a/xen/include/asm-x86/page-bits.h b/xen/include/arch-x86/asm/pag= e-bits.h similarity index 100% rename from xen/include/asm-x86/page-bits.h rename to xen/include/arch-x86/asm/page-bits.h diff --git a/xen/include/asm-x86/page.h b/xen/include/arch-x86/asm/page.h similarity index 100% rename from xen/include/asm-x86/page.h rename to xen/include/arch-x86/asm/page.h diff --git a/xen/include/asm-x86/paging.h b/xen/include/arch-x86/asm/paging= .h similarity index 100% rename from xen/include/asm-x86/paging.h rename to xen/include/arch-x86/asm/paging.h diff --git a/xen/include/asm-x86/pci.h b/xen/include/arch-x86/asm/pci.h similarity index 100% rename from xen/include/asm-x86/pci.h rename to xen/include/arch-x86/asm/pci.h diff --git a/xen/include/asm-x86/percpu.h b/xen/include/arch-x86/asm/percpu= .h similarity index 100% rename from xen/include/asm-x86/percpu.h rename to xen/include/arch-x86/asm/percpu.h diff --git a/xen/include/asm-x86/perfc.h b/xen/include/arch-x86/asm/perfc.h similarity index 100% rename from xen/include/asm-x86/perfc.h rename to xen/include/arch-x86/asm/perfc.h diff --git a/xen/include/asm-x86/perfc_defn.h b/xen/include/arch-x86/asm/pe= rfc_defn.h similarity index 100% rename from xen/include/asm-x86/perfc_defn.h rename to xen/include/arch-x86/asm/perfc_defn.h diff --git a/xen/include/asm-x86/processor.h b/xen/include/arch-x86/asm/pro= cessor.h similarity index 100% rename from xen/include/asm-x86/processor.h rename to xen/include/arch-x86/asm/processor.h diff --git a/xen/include/asm-x86/psr.h b/xen/include/arch-x86/asm/psr.h similarity index 100% rename from xen/include/asm-x86/psr.h rename to xen/include/arch-x86/asm/psr.h diff --git a/xen/include/asm-x86/pv/domain.h b/xen/include/arch-x86/asm/pv/= domain.h similarity index 100% rename from xen/include/asm-x86/pv/domain.h rename to xen/include/arch-x86/asm/pv/domain.h diff --git a/xen/include/asm-x86/pv/grant_table.h b/xen/include/arch-x86/as= m/pv/grant_table.h similarity index 100% rename from xen/include/asm-x86/pv/grant_table.h rename to xen/include/arch-x86/asm/pv/grant_table.h diff --git a/xen/include/asm-x86/pv/mm.h b/xen/include/arch-x86/asm/pv/mm.h similarity index 100% rename from xen/include/asm-x86/pv/mm.h rename to xen/include/arch-x86/asm/pv/mm.h diff --git a/xen/include/asm-x86/pv/shim.h b/xen/include/arch-x86/asm/pv/sh= im.h similarity index 100% rename from xen/include/asm-x86/pv/shim.h rename to xen/include/arch-x86/asm/pv/shim.h diff --git a/xen/include/asm-x86/pv/traps.h b/xen/include/arch-x86/asm/pv/t= raps.h similarity index 100% rename from xen/include/asm-x86/pv/traps.h rename to xen/include/arch-x86/asm/pv/traps.h diff --git a/xen/include/asm-x86/random.h b/xen/include/arch-x86/asm/random= .h similarity index 100% rename from xen/include/asm-x86/random.h rename to xen/include/arch-x86/asm/random.h diff --git a/xen/include/asm-x86/regs.h b/xen/include/arch-x86/asm/regs.h similarity index 100% rename from xen/include/asm-x86/regs.h rename to xen/include/arch-x86/asm/regs.h diff --git a/xen/include/asm-x86/setup.h b/xen/include/arch-x86/asm/setup.h similarity index 100% rename from xen/include/asm-x86/setup.h rename to xen/include/arch-x86/asm/setup.h diff --git a/xen/include/asm-x86/shadow.h b/xen/include/arch-x86/asm/shadow= .h similarity index 100% rename from xen/include/asm-x86/shadow.h rename to xen/include/arch-x86/asm/shadow.h diff --git a/xen/include/asm-x86/shared.h b/xen/include/arch-x86/asm/shared= .h similarity index 100% rename from xen/include/asm-x86/shared.h rename to xen/include/arch-x86/asm/shared.h diff --git a/xen/include/asm-x86/smp.h b/xen/include/arch-x86/asm/smp.h similarity index 100% rename from xen/include/asm-x86/smp.h rename to xen/include/arch-x86/asm/smp.h diff --git a/xen/include/asm-x86/softirq.h b/xen/include/arch-x86/asm/softi= rq.h similarity index 100% rename from xen/include/asm-x86/softirq.h rename to xen/include/arch-x86/asm/softirq.h diff --git a/xen/include/asm-x86/spec_ctrl.h b/xen/include/arch-x86/asm/spe= c_ctrl.h similarity index 100% rename from xen/include/asm-x86/spec_ctrl.h rename to xen/include/arch-x86/asm/spec_ctrl.h diff --git a/xen/include/asm-x86/spec_ctrl_asm.h b/xen/include/arch-x86/asm= /spec_ctrl_asm.h similarity index 100% rename from xen/include/asm-x86/spec_ctrl_asm.h rename to xen/include/arch-x86/asm/spec_ctrl_asm.h diff --git a/xen/include/asm-x86/spinlock.h b/xen/include/arch-x86/asm/spin= lock.h similarity index 100% rename from xen/include/asm-x86/spinlock.h rename to xen/include/arch-x86/asm/spinlock.h diff --git a/xen/include/asm-x86/string.h b/xen/include/arch-x86/asm/string= .h similarity index 100% rename from xen/include/asm-x86/string.h rename to xen/include/arch-x86/asm/string.h diff --git a/xen/include/asm-x86/system.h b/xen/include/arch-x86/asm/system= .h similarity index 100% rename from xen/include/asm-x86/system.h rename to xen/include/arch-x86/asm/system.h diff --git a/xen/include/asm-x86/tboot.h b/xen/include/arch-x86/asm/tboot.h similarity index 100% rename from xen/include/asm-x86/tboot.h rename to xen/include/arch-x86/asm/tboot.h diff --git a/xen/include/asm-x86/time.h b/xen/include/arch-x86/asm/time.h similarity index 100% rename from xen/include/asm-x86/time.h rename to xen/include/arch-x86/asm/time.h diff --git a/xen/include/asm-x86/trace.h b/xen/include/arch-x86/asm/trace.h similarity index 100% rename from xen/include/asm-x86/trace.h rename to xen/include/arch-x86/asm/trace.h diff --git a/xen/include/asm-x86/traps.h b/xen/include/arch-x86/asm/traps.h similarity index 100% rename from xen/include/asm-x86/traps.h rename to xen/include/arch-x86/asm/traps.h diff --git a/xen/include/asm-x86/types.h b/xen/include/arch-x86/asm/types.h similarity index 100% rename from xen/include/asm-x86/types.h rename to xen/include/arch-x86/asm/types.h diff --git a/xen/include/asm-x86/uaccess.h b/xen/include/arch-x86/asm/uacce= ss.h similarity index 100% rename from xen/include/asm-x86/uaccess.h rename to xen/include/arch-x86/asm/uaccess.h diff --git a/xen/include/asm-x86/unaligned.h b/xen/include/arch-x86/asm/una= ligned.h similarity index 100% rename from xen/include/asm-x86/unaligned.h rename to xen/include/arch-x86/asm/unaligned.h diff --git a/xen/include/asm-x86/vm_event.h b/xen/include/arch-x86/asm/vm_e= vent.h similarity index 100% rename from xen/include/asm-x86/vm_event.h rename to xen/include/arch-x86/asm/vm_event.h diff --git a/xen/include/asm-x86/vpmu.h b/xen/include/arch-x86/asm/vpmu.h similarity index 100% rename from xen/include/asm-x86/vpmu.h rename to xen/include/arch-x86/asm/vpmu.h diff --git a/xen/include/asm-x86/x86-defns.h b/xen/include/arch-x86/asm/x86= -defns.h similarity index 100% rename from xen/include/asm-x86/x86-defns.h rename to xen/include/arch-x86/asm/x86-defns.h diff --git a/xen/include/asm-x86/x86-vendors.h b/xen/include/arch-x86/asm/x= 86-vendors.h similarity index 100% rename from xen/include/asm-x86/x86-vendors.h rename to xen/include/arch-x86/asm/x86-vendors.h diff --git a/xen/include/asm-x86/x86_64/efibind.h b/xen/include/arch-x86/as= m/x86_64/efibind.h similarity index 100% rename from xen/include/asm-x86/x86_64/efibind.h rename to xen/include/arch-x86/asm/x86_64/efibind.h diff --git a/xen/include/asm-x86/x86_64/elf.h b/xen/include/arch-x86/asm/x8= 6_64/elf.h similarity index 100% rename from xen/include/asm-x86/x86_64/elf.h rename to xen/include/arch-x86/asm/x86_64/elf.h diff --git a/xen/include/asm-x86/x86_64/page.h b/xen/include/arch-x86/asm/x= 86_64/page.h similarity index 100% rename from xen/include/asm-x86/x86_64/page.h rename to xen/include/arch-x86/asm/x86_64/page.h diff --git a/xen/include/asm-x86/x86_64/regs.h b/xen/include/arch-x86/asm/x= 86_64/regs.h similarity index 100% rename from xen/include/asm-x86/x86_64/regs.h rename to xen/include/arch-x86/asm/x86_64/regs.h diff --git a/xen/include/asm-x86/x86_64/system.h b/xen/include/arch-x86/asm= /x86_64/system.h similarity index 100% rename from xen/include/asm-x86/x86_64/system.h rename to xen/include/arch-x86/asm/x86_64/system.h diff --git a/xen/include/asm-x86/x86_64/uaccess.h b/xen/include/arch-x86/as= m/x86_64/uaccess.h similarity index 100% rename from xen/include/asm-x86/x86_64/uaccess.h rename to xen/include/arch-x86/asm/x86_64/uaccess.h diff --git a/xen/include/asm-x86/x86_emulate.h b/xen/include/arch-x86/asm/x= 86_emulate.h similarity index 100% rename from xen/include/asm-x86/x86_emulate.h rename to xen/include/arch-x86/asm/x86_emulate.h diff --git a/xen/include/asm-x86/xenoprof.h b/xen/include/arch-x86/asm/xeno= prof.h similarity index 100% rename from xen/include/asm-x86/xenoprof.h rename to xen/include/arch-x86/asm/xenoprof.h diff --git a/xen/include/asm-x86/xstate.h b/xen/include/arch-x86/asm/xstate= .h similarity index 100% rename from xen/include/asm-x86/xstate.h rename to xen/include/arch-x86/asm/xstate.h diff --git a/xen/include/xen/acpi.h b/xen/include/xen/acpi.h index 088c238a504a..e03ae4e74ee3 100644 --- a/xen/include/xen/acpi.h +++ b/xen/include/xen/acpi.h @@ -40,8 +40,8 @@ #define ACPI_MADT_GET_TRIGGER(inti) ACPI_MADT_GET_(TRIGGER, inti) =20 /* - * Fixmap pages to reserve for ACPI boot-time tables (see asm-x86/fixmap.h= or - * asm-arm/config.h, 64 pages(256KB) is large enough for most cases.) + * Fixmap pages to reserve for ACPI boot-time tables (see arch-x86/asm/fix= map.h + * or arch-arm/asm/config.h, 64 pages(256KB) is large enough for most case= s.) */ #define NUM_FIXMAP_ACPI_PAGES 64 =20 diff --git a/xen/include/xen/bitmap.h b/xen/include/xen/bitmap.h index 634a259645fb..6d69c72c2e03 100644 --- a/xen/include/xen/bitmap.h +++ b/xen/include/xen/bitmap.h @@ -14,7 +14,7 @@ * * Function implementations generic to all architectures are in * lib/bitmap.c. Functions implementations that are architecture - * specific are in various include/asm-/bitops.h headers + * specific are in various include/arch-/asm/bitops.h headers * and other arch/ specific files. * * See lib/bitmap.c for more details. --=20 Anthony PERARD From nobody Tue Apr 30 03:23:41 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1625149331; cv=none; d=zohomail.com; s=zohoarc; b=IWugXsUaGARwbNoVf4XaHrtRtqLEu6d2XGACoDK2E0EXCSSlqn8Mg2FGBCo65wGLNkaraCqLHbUf32Oyx+tYZpaWcshfmWbapAQTOs8Rq0+DXUfqQ/STJZvLqOVMiL5YJydL4YBDYAeq0ZhFXNrBUvzUOrMC9eXqIuuunEZSdww= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1625149331; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=r9JSrz4kuqaL46L4LUhFJVMS9aqIsZfhLl4Tvsz3DqE=; b=nD9LjCylefU513EI3i034gyNKpCVLRbT7wNSnDN3sHxXTJ3hmEY5eCfhWSPSkMOLnEMnyw2jzNGrE8fSClAMFay9jsITW02XhnHwnDiWGz6jxCWPI0vphjdldf/cs11N4zbs2p01wPyRLO2MFkGh8Pg5C37yqPwuY2SOD13PpRE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1625149331830588.7849401363457; Thu, 1 Jul 2021 07:22:11 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.148824.275159 (Exim 4.92) (envelope-from ) id 1lyxZp-0006Gf-3o; Thu, 01 Jul 2021 14:22:01 +0000 Received: by outflank-mailman (output) from mailman id 148824.275159; Thu, 01 Jul 2021 14:22:00 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lyxZo-0006F0-IP; Thu, 01 Jul 2021 14:22:00 +0000 Received: by outflank-mailman (input) for mailman id 148824; Thu, 01 Jul 2021 14:21:58 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lyxR3-0005F9-NI for xen-devel@lists.xenproject.org; Thu, 01 Jul 2021 14:12:57 +0000 Received: from esa1.hc3370-68.iphmx.com (unknown [216.71.145.142]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 3a858c7a-da76-11eb-8328-12813bfff9fa; Thu, 01 Jul 2021 14:11:29 +0000 (UTC) X-Outflank-Mailman: Message body and most headers restored to incoming version 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" X-Inumbo-ID: 3a858c7a-da76-11eb-8328-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1625148689; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=OrEgff/HihyncUiqJLBMZO5p+YLhIkvLwk8ijwp7Og0=; b=IUfo/cC9BJbSiM1KYJctmiuzcp9to3pjLOtjRa4ds9PpHv3vFqDyWefd IjctC1G7l8j6oAmARtzjKsdhKfm1V64W+ZW6SN70bhiZ7ryl6zndGM/If U16WeVEpgDuFxwXZqap56dQIclNMKjCb1W+0HqqBTEKaFuZpyuuV9XP5h 8=; Authentication-Results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: NZ/MaMEfgDUzcZbO6KcGdvFFBkHR6NU6p9DlxJ715VT6RLQFJVjuh+XWDqbgfYwIUafNmoXmMD s5GWIkHuy3tIdJLKyBUd38fMpUhl7cgGEMYmMn1ljii3q4QxU/+6/kllIcIZR9FVnHja/7ft2S XfcCt8A1gjJ8Nr70Y062zL0eqCSZwEGMUzGKj44Pw2bwN9tbGbB6R1QkAwNSNffdD5qSKV8yG1 +TwvxqSndDA8dZvxdN/pxcne3QiUmMutVWbk5vMssasw8CCES/aRV+71vb0L7eGqP7O0AgEOUj ODY= X-SBRS: 5.1 X-MesageID: 47755472 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:CZGT3q1O+8E7RG7SPjPV7gqjBIokLtp133Aq2lEZdPRUGvb3qy nIpoV86faUskdoZJhOo7C90cW7LU80sKQFhLX5Xo3SOzUO2lHYT72KhLGKq1aLdhEWtNQtsZ uIG5IOceEYZmIasS+V2maF+q4bsbu6zJw= X-IronPort-AV: E=Sophos;i="5.83,314,1616472000"; d="scan'208";a="47755472" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Ian Jackson" , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu Subject: [XEN PATCH v6 19/31] build: rework .banner generation Date: Thu, 1 Jul 2021 15:09:59 +0100 Message-ID: <20210701141011.785641-20-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210701141011.785641-1-anthony.perard@citrix.com> References: <20210701141011.785641-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) Content-Type: text/plain; charset="utf-8" Avoid depending on Makefile but still allow to rebuild the banner when $(XEN_FULLVERSION) changes. Also add a dependency on tools/xen.flf, even if not expected to change. Signed-off-by: Anthony PERARD Reviewed-by: Jan Beulich --- xen/Makefile | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/xen/Makefile b/xen/Makefile index 7e3e4c42d77b..267ae77aef7a 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -399,13 +399,19 @@ delete-unfresh-files: rm -f include/xen/compile.h; \ fi =20 -.banner: Makefile - @if which figlet >/dev/null 2>&1 ; then \ - echo " Xen $(XEN_FULLVERSION)" | figlet -f tools/xen.flf > $@.tmp; \ - else \ - echo " Xen $(XEN_FULLVERSION)" > $@.tmp; \ - fi - @mv -f $@.tmp $@ +quiet_cmd_banner =3D BANNER $@ +define cmd_banner + if which figlet >/dev/null 2>&1 ; then \ + echo " Xen $(XEN_FULLVERSION)" | figlet -f $< > $@.tmp; \ + else \ + echo " Xen $(XEN_FULLVERSION)" > $@.tmp; \ + fi; \ + mv -f $@.tmp $@ +endef + +.banner: tools/xen.flf FORCE + $(call if_changed,banner) +targets +=3D .banner =20 # compile.h contains dynamic build info. Rebuilt on every 'make' invocatio= n. include/xen/compile.h: include/xen/compile.h.in .banner --=20 Anthony PERARD From nobody Tue Apr 30 03:23:41 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1625148709; cv=none; d=zohomail.com; s=zohoarc; b=ZXa+OkOlHl03jlw2SCJqM5XdC0tQ/4UIrMN3Gr4SvoUjXRtVzs+lPcR05cY1YkZk0nXdCNPiyETEcbiX82IBWSJrOjgNIVtsR3rPBmfoQtdoVFhtsb6vpAS5OockNB/pW7DPhroajgXCz8D3/RGTQv9reClnn9PbBK0UVwOZoFw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1625148709; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=RejzrUcf+m55Ci1mJ13Fy+ikzSUk/XaQTik5vfQ/vmM=; b=FOJtS2ltldhY9C34hUfqNh5aKsOGtWA5dVfwkftkdLh0aJ+jf90pjNpGe/AZi1/OFJ/Rd5i+yaJsytW+DePIeqS6saw7SfXxWDXO48vmhl+hhofClCEDkh1pvGyt0djiVFxH6sxmfN/ukyZIs1T74/+9UYngDVa4OAFNKFUTWGE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1625148709850133.56463401176325; Thu, 1 Jul 2021 07:11:49 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.148726.274988 (Exim 4.92) (envelope-from ) id 1lyxPl-0005zt-PE; Thu, 01 Jul 2021 14:11:37 +0000 Received: by outflank-mailman (output) from mailman id 148726.274988; Thu, 01 Jul 2021 14:11:37 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lyxPl-0005ye-HZ; Thu, 01 Jul 2021 14:11:37 +0000 Received: by outflank-mailman (input) for mailman id 148726; Thu, 01 Jul 2021 14:11:35 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lyxPb-0005F9-Kl for xen-devel@lists.xenproject.org; Thu, 01 Jul 2021 14:11:27 +0000 Received: from esa1.hc3370-68.iphmx.com (unknown [216.71.145.142]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 24f283d7-da76-11eb-8328-12813bfff9fa; Thu, 01 Jul 2021 14:10:53 +0000 (UTC) X-Outflank-Mailman: Message body and most headers restored to incoming version 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" X-Inumbo-ID: 24f283d7-da76-11eb-8328-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1625148653; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=HKKAaSAElL9br6IexbYT6ScUQSIaudpvDa7uCaCfemU=; b=M4n8wD+ugtQ8U61VBR2T5tZYuntbk2Yggx3x/rh4wKJzmw51/UY3ZMVr DQnag2aARDNisgYDuiXlRqmchYC/qZxCkGLv7xq66MSTbha2vhaAd6Z4o xmRnJMLpbkQt+uC4p44557eWwBEMQfHsX2ttLzm0uJaZ7P+BwVpaxqs3Q U=; Authentication-Results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: c1g5C7KdNCNvpUtARA66zPxQUkkAdOp4jynR3zRqXL/E2Pj/rbHwP7Iv3z2mgxMIr1fd+laPTd sznJd1GPoWlhW+uCcD6lfdVVF2kc70PCQYoUU+loHcP0Sv3QhN/Jq0t1K+E7vH5B/52DqavoRU n0Y6ZCnNj0K14ZxTcoZV/I9IO/wxfWKWP1+XE21ON5BRcpDhSrbF4FmoSa8AJFOqTLpGuZ/xJL KHQPkjPsQshE0VGdyV0vghnTA2mxqEBTxbjRmGpU7AktCT8b+PbJU+oZACjWuZcM07BJXNCohn bRk= X-SBRS: 5.1 X-MesageID: 47755379 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:a8e4m69QadqLNsZAVJZuk+DgI+orL9Y04lQ7vn2YSXRuHPBw8P re+sjztCWE8Ar5N0tBpTntAsW9qDbnhPtICOoqTNCftWvdyQiVxehZhOOIqVDd8m/Fh4pgPM 9bAtFD4bbLbGSS4/yU3ODBKadD/OW6 X-IronPort-AV: E=Sophos;i="5.83,314,1616472000"; d="scan'208";a="47755379" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Ian Jackson" , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu Subject: [XEN PATCH v6 20/31] build: generate "include/xen/compile.h" with filechk Date: Thu, 1 Jul 2021 15:10:00 +0100 Message-ID: <20210701141011.785641-21-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210701141011.785641-1-anthony.perard@citrix.com> References: <20210701141011.785641-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) Content-Type: text/plain; charset="utf-8" This will always try regenerate the content of compile.h, but if it didn't change the file isn't updated. Also, as it's currently the case, the file isn't regenerated during `sudo make install` if it exist and does belong to a different user. Thus, we can remove the target "delete-unfresh-files". Target $(TARGET) still need a phony dependency, so add FORCE. This patch imports the macro 'filechk' from Linux v5.12. Signed-off-by: Anthony PERARD --- xen/Makefile | 51 +++++++++++++++++++------------------- xen/scripts/Kbuild.include | 31 +++++++++++++++++++++++ 2 files changed, 56 insertions(+), 26 deletions(-) diff --git a/xen/Makefile b/xen/Makefile index 267ae77aef7a..4c4990a753df 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -351,7 +351,7 @@ _debug: $(OBJDUMP) -D -S $(TARGET)-syms > $(TARGET).s =20 .PHONY: _clean -_clean: delete-unfresh-files +_clean: $(MAKE) -C tools clean $(MAKE) $(clean) include $(MAKE) $(clean) common @@ -368,7 +368,7 @@ _clean: delete-unfresh-files -o -name "*.gcno" -o -name ".*.cmd" -o -name "lib.a" \) -exec rm -f {} \; rm -f include/asm $(TARGET) $(TARGET).gz $(TARGET).efi $(TARGET).efi.map = $(TARGET)-syms $(TARGET)-syms.map *~ core rm -f asm-offsets.s include/arch-*/asm/asm-offsets.h - rm -f .banner + rm -f .banner include/xen/compile.h =20 .PHONY: _distclean _distclean: clean @@ -378,7 +378,7 @@ $(TARGET).gz: $(TARGET) gzip -n -f -9 < $< > $@.new mv $@.new $@ =20 -$(TARGET): delete-unfresh-files +$(TARGET): FORCE $(MAKE) -C tools $(MAKE) -f $(BASEDIR)/Rules.mk include/xen/compile.h [ -e arch/$(TARGET_ARCH)/efi ] && for f in $$(cd common/efi; echo *.[ch])= ; \ @@ -391,14 +391,6 @@ $(TARGET): delete-unfresh-files $(MAKE) -f $(BASEDIR)/Rules.mk include/arch-$(TARGET_ARCH)/asm/asm-offset= s.h $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) $@ =20 -# drivers/char/console.o contains static banner/compile info. Blow it away. -# Don't refresh these files during e.g., 'sudo make install' -.PHONY: delete-unfresh-files -delete-unfresh-files: - @if [ ! -r include/xen/compile.h -o -O include/xen/compile.h ]; then \ - rm -f include/xen/compile.h; \ - fi - quiet_cmd_banner =3D BANNER $@ define cmd_banner if which figlet >/dev/null 2>&1 ; then \ @@ -413,22 +405,29 @@ endef $(call if_changed,banner) targets +=3D .banner =20 -# compile.h contains dynamic build info. Rebuilt on every 'make' invocatio= n. -include/xen/compile.h: include/xen/compile.h.in .banner - @sed -e 's/@@date@@/$(XEN_BUILD_DATE)/g' \ - -e 's/@@time@@/$(XEN_BUILD_TIME)/g' \ - -e 's/@@whoami@@/$(XEN_WHOAMI)/g' \ - -e 's/@@domain@@/$(XEN_DOMAIN)/g' \ - -e 's/@@hostname@@/$(XEN_BUILD_HOST)/g' \ - -e 's!@@compiler@@!$(shell $(CC) $(CFLAGS) --version 2>&1 | head -1)!= g' \ - -e 's/@@version@@/$(XEN_VERSION)/g' \ - -e 's/@@subversion@@/$(XEN_SUBVERSION)/g' \ - -e 's/@@extraversion@@/$(XEN_EXTRAVERSION)/g' \ - -e 's!@@changeset@@!$(shell tools/scmversion $(XEN_ROOT) || echo "una= vailable")!g' \ - < include/xen/compile.h.in > $@.new +# Don't refresh this files during e.g., 'sudo make install' +define filechk_compile.h + if [ ! -r $@ -o -O $@ ]; then \ + sed -e 's/@@date@@/$(XEN_BUILD_DATE)/g' \ + -e 's/@@time@@/$(XEN_BUILD_TIME)/g' \ + -e 's/@@whoami@@/$(XEN_WHOAMI)/g' \ + -e 's/@@domain@@/$(XEN_DOMAIN)/g' \ + -e 's/@@hostname@@/$(XEN_BUILD_HOST)/g' \ + -e 's!@@compiler@@!$(shell $(CC) $(CFLAGS) --version 2>&1 | head -= 1)!g' \ + -e 's/@@version@@/$(XEN_VERSION)/g' \ + -e 's/@@subversion@@/$(XEN_SUBVERSION)/g' \ + -e 's/@@extraversion@@/$(XEN_EXTRAVERSION)/g' \ + -e 's!@@changeset@@!$(shell tools/scmversion $(XEN_ROOT) || echo "= unavailable")!g' \ + < $<; \ + sed -rf tools/process-banner.sed < .banner; \ + else \ + cat $@; \ + fi +endef + +include/xen/compile.h: include/xen/compile.h.in .banner FORCE @cat .banner - @sed -rf tools/process-banner.sed < .banner >> $@.new - @mv -f $@.new $@ + $(call filechk,compile.h) =20 asm-offsets.s: arch/$(TARGET_ARCH)/$(TARGET_SUBARCH)/asm-offsets.c $(CC) $(filter-out -Wa$(comma)% -flto,$(c_flags)) -S -g0 -o $@.new -MQ $@= $< diff --git a/xen/scripts/Kbuild.include b/xen/scripts/Kbuild.include index 83c7e1457baa..838c9440f35e 100644 --- a/xen/scripts/Kbuild.include +++ b/xen/scripts/Kbuild.include @@ -26,6 +26,37 @@ real-prereqs =3D $(filter-out $(PHONY), $^) # Escape single quote for use in echo statements escsq =3D $(subst $(squote),'\$(squote)',$1) =20 +### +# Easy method for doing a status message + kecho :=3D : + quiet_kecho :=3D echo +silent_kecho :=3D : +kecho :=3D $($(quiet)kecho) + +### +# filechk is used to check if the content of a generated file is updated. +# Sample usage: +# +# filechk_sample =3D echo $(KERNELRELEASE) +# version.h: FORCE +# $(call filechk,sample) +# +# The rule defined shall write to stdout the content of the new file. +# The existing file will be compared with the new one. +# - If no file exist it is created +# - If the content differ the new file is used +# - If they are equal no change, and no timestamp update +define filechk + $(Q)set -e; \ + mkdir -p $(dir $@); \ + trap "rm -f $(dot-target).tmp" EXIT; \ + { $(filechk_$(1)); } > $(dot-target).tmp; \ + if [ ! -r $@ ] || ! cmp -s $@ $(dot-target).tmp; then \ + $(kecho) ' UPD $@'; \ + mv -f $(dot-target).tmp $@; \ + fi +endef + # as-insn: Check whether assembler supports an instruction. # Usage: cflags-y +=3D $(call as-insn,CC FLAGS,"insn",option-yes,option-no) as-insn =3D $(if $(shell echo 'void _(void) { asm volatile ( $(2) ); }' \ --=20 Anthony PERARD From nobody Tue Apr 30 03:23:41 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1625149332; cv=none; d=zohomail.com; s=zohoarc; b=ag9s+5KD2nz3bLO9Yo1y7sfeTqEhTIx9jo3G+qNIogMSU3xRICZqhkSLzsDVBEldG9aPE3M+9d6Qkttx48+RZgQ1vnKsGaCyAwbbc6Y1eWIHUoQ09RRAIXDI+43DXYlyYmCtvNfEoxkep9ryscCDSz4pN/Tt91lOE8STey314to= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1625149332; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Ktp5hDMsyShvIdJgl19y/Z4XBBN6gTo3NS+4kf4+07w=; b=npkoEB6i57Hu49cu3xQMHl+j2LdvDeo9eul8LZ3Dt+9EZKGsQXJYxdpDbjYDYQWnE/37triMjOwh2dPSLg+GSb391CdioCl87rDILrpK8nrUeorBpab2fO0jaX/WHlmu2TbBSYDetDJaCT7Rn2YhKiKCFl1pdBzAle11LXQRN3c= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1625149332079990.133900563844; Thu, 1 Jul 2021 07:22:12 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.148818.275146 (Exim 4.92) (envelope-from ) id 1lyxZl-0005bc-Qk; Thu, 01 Jul 2021 14:21:57 +0000 Received: by outflank-mailman (output) from mailman id 148818.275146; Thu, 01 Jul 2021 14:21:57 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lyxZl-0005at-79; Thu, 01 Jul 2021 14:21:57 +0000 Received: by outflank-mailman (input) for mailman id 148818; Thu, 01 Jul 2021 14:21:56 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lyxQE-0005tj-2W for xen-devel@lists.xenproject.org; Thu, 01 Jul 2021 14:12:06 +0000 Received: from esa3.hc3370-68.iphmx.com (unknown [216.71.145.155]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 3e185f9f-3ef5-4d01-9e93-0151a4543101; Thu, 01 Jul 2021 14:10:54 +0000 (UTC) X-Outflank-Mailman: Message body and most headers restored to incoming version 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" X-Inumbo-ID: 3e185f9f-3ef5-4d01-9e93-0151a4543101 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1625148653; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=eij+P9eDuvxcdz2BMz8URUEWDz4oxMoXS30U0EZ+aiI=; b=PrzDv+PO8Jqkr8w9iAZHblqYaVAR+qK6k+WRdqr7uLSg2MYSgmX1PmJC /sgUYjMEKwCAW4KZvxyGjJZYheyGFSyU4FEP8oh0GwU6iesrw0Uk6mZ/P uLIbyhbbnYfoxofiv/SD9KQ6DI7Geo+jFt9qnj4frOjW9My+WPe2mPKC3 E=; Authentication-Results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: 2hiLc/rv5YZvB7xMScsNK+RP/DATlm5u6nfbHqoWNzyv1NQyIIuaanwfVS39WtqpwOYZNQ8+2a RvpZzFe3OTjhWGav6qmSOnFL8xyZ7ScmeY6WWzMYVpkPhGTdeSLk+gk4lFPYrCRotosrCWGXSe 7pBW1G+btqkPQyeCg1XfZfMWD191C4rG1P4D0YVxNcrCL2AoKP54WH/GW7pXVkBSvJjejxXB0i oHhzFYY7X3ocHEc+VfgeJKzVtNt8vm7Qf24tNrFzZSZ7iOg4WgxbFr5nPykBOgvmf/T2ud2paL IqA= X-SBRS: 5.1 X-MesageID: 47384421 X-Ironport-Server: esa3.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:9LtKtq7leBdzp6fg6APXwDLXdLJyesId70hD6qkQc3FomwKj9/ xG/c5rsSMc7Qx6ZJhOo7+90cW7L080lqQFhLX5X43SPzUO0VHARO1fBOPZqAEIcBeOlNK1u5 0AT0B/YueAcGSTj6zBkXWF+wBL+qj5zEiq792usUuEVWtRGsZdB58SMHfhLqVxLjM2Y6YRJd 6nyedsgSGvQngTZtTTPAh+YwCSz+e77a4PeHQ9dmYa1DU= X-IronPort-AV: E=Sophos;i="5.83,314,1616472000"; d="scan'208";a="47384421" From: Anthony PERARD To: CC: Anthony PERARD , Jan Beulich , Andrew Cooper , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Wei Liu , George Dunlap , Ian Jackson , Julien Grall , Stefano Stabellini Subject: [XEN PATCH v6 21/31] build: set XEN_BUILD_EFI earlier Date: Thu, 1 Jul 2021 15:10:01 +0100 Message-ID: <20210701141011.785641-22-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210701141011.785641-1-anthony.perard@citrix.com> References: <20210701141011.785641-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) Content-Type: text/plain; charset="utf-8" We are going to need the variable XEN_BUILD_EFI earlier. This early check is using "try-run" to allow to have a temporary output file in case it is needed for $(CC) to build the *.c file. The "efi/check.o" file is still needed in "arch/x86/Makefile" so the check is currently duplicated. This patch imports the macro "try-run" from Linux v5.12. Signed-off-by: Anthony PERARD --- xen/arch/x86/Makefile | 2 +- xen/arch/x86/arch.mk | 5 +++++ xen/scripts/Kbuild.include | 17 +++++++++++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile index bb446a1b928d..d3e38e4e9f02 100644 --- a/xen/arch/x86/Makefile +++ b/xen/arch/x86/Makefile @@ -126,7 +126,7 @@ $(TARGET): $(TARGET)-syms $(efi-y) boot/mkelf32 ifneq ($(efi-y),) =20 # Check if the compiler supports the MS ABI. -export XEN_BUILD_EFI :=3D $(shell $(CC) $(XEN_CFLAGS) -c efi/check.c -o ef= i/check.o 2>/dev/null && echo y) +XEN_BUILD_EFI :=3D $(shell $(CC) $(XEN_CFLAGS) -c efi/check.c -o efi/check= .o 2>/dev/null && echo y) CFLAGS-$(XEN_BUILD_EFI) +=3D -DXEN_BUILD_EFI =20 # Check if the linker supports PE. diff --git a/xen/arch/x86/arch.mk b/xen/arch/x86/arch.mk index 9f5fade39e91..5a4a1704636f 100644 --- a/xen/arch/x86/arch.mk +++ b/xen/arch/x86/arch.mk @@ -60,5 +60,10 @@ ifeq ($(CONFIG_UBSAN),y) $(call cc-option-add,CFLAGS_UBSAN,CC,-fno-sanitize=3Dalignment) endif =20 +ifneq ($(CONFIG_PV_SHIM_EXCLUSIVE),y) +# Check if the compiler supports the MS ABI. +export XEN_BUILD_EFI :=3D $(call try-run,$(CC) $(CFLAGS) -c arch/x86/efi/c= heck.c -o "$$TMPO",y) +endif + # Set up the assembler include path properly for older toolchains. CFLAGS +=3D -Wa,-I$(BASEDIR)/include diff --git a/xen/scripts/Kbuild.include b/xen/scripts/Kbuild.include index 838c9440f35e..5fe13a7c5abd 100644 --- a/xen/scripts/Kbuild.include +++ b/xen/scripts/Kbuild.include @@ -57,6 +57,23 @@ define filechk fi endef =20 +# output directory for tests below +TMPOUT =3D .tmp_$$$$ + +# try-run +# Usage: option =3D $(call try-run, $(CC)...-o "$$TMP",option-ok,otherwise) +# Exit code chooses option. "$$TMP" serves as a temporary file and is +# automatically cleaned up. +try-run =3D $(shell set -e; \ + TMP=3D$(TMPOUT)/tmp; \ + TMPO=3D$(TMPOUT)/tmp.o; \ + mkdir -p $(TMPOUT); \ + trap "rm -rf $(TMPOUT)" EXIT; \ + if ($(1)) >/dev/null 2>&1; \ + then echo "$(2)"; \ + else echo "$(3)"; \ + fi) + # as-insn: Check whether assembler supports an instruction. # Usage: cflags-y +=3D $(call as-insn,CC FLAGS,"insn",option-yes,option-no) as-insn =3D $(if $(shell echo 'void _(void) { asm volatile ( $(2) ); }' \ --=20 Anthony PERARD From nobody Tue Apr 30 03:23:41 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1625149317; cv=none; d=zohomail.com; s=zohoarc; b=DKDdNXaoplePLkqAvRIh6CxV+ECvfsc2zteD8+LAkqfppKjk6vFxb2SgAmxaWugCNXj94JnFVbhbxMeJFcpZGzMfqt/8BjUvxbtqaHIDl0Ny6jmaAjE/uc6VvYu2zuz1jmgsg4u/1WePdkEfyf9ID5/8tkJRLNNDdVjJusgm6w8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1625149317; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=2S/Cru9zkv/kgevB7+Dmay6R8+mJyUlBEXU/4wzqtfA=; b=J4KsU2cyio3DOwY4fvMGwUQMXIJkkITn8aWDxbTbtijAo65rVXSs8e6VWWBRNksYJ/4+M8XoWpja7/lSsYkzRKRz1zD/55ddjYuJGCZwZ+0EwZ7OoH1CrmswLl7h61Ly2cHhCazFYZVIJZkXMLrK3V6trdb0xUZ252aGLE6SOXY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1625149317850797.488322417448; Thu, 1 Jul 2021 07:21:57 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.148778.275049 (Exim 4.92) (envelope-from ) id 1lyxZV-00028B-Q2; Thu, 01 Jul 2021 14:21:41 +0000 Received: by outflank-mailman (output) from mailman id 148778.275049; Thu, 01 Jul 2021 14:21:41 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lyxZV-00026g-BJ; Thu, 01 Jul 2021 14:21:41 +0000 Received: by outflank-mailman (input) for mailman id 148778; Thu, 01 Jul 2021 14:21:40 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lyxQT-0005tj-33 for xen-devel@lists.xenproject.org; Thu, 01 Jul 2021 14:12:21 +0000 Received: from esa3.hc3370-68.iphmx.com (unknown [216.71.145.155]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id a4370ab4-7d26-431f-8643-4db42b9cbd9d; Thu, 01 Jul 2021 14:10:59 +0000 (UTC) X-Outflank-Mailman: Message body and most headers restored to incoming version 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" X-Inumbo-ID: a4370ab4-7d26-431f-8643-4db42b9cbd9d DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1625148659; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=FW24mf7gQhBpHHcg9GJm9hyluG+ERn9X5WYN2UmMbPk=; b=cbdYfVzPIy5KNJccFmRaz2ouIUyoBrGCGeHeYbXyzxTttZRmy2wp2iKV I6gRqVwE+5oidon18IaiLTgC5r3QmsI7YS6miijS5RtoDH28XeOujqPFq xM/C3VwEBDTzkpPV74Pt+d3hZYHvFKPeEf3e4CEoFSdtj8rQDVbO/8NwL g=; Authentication-Results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: X0x55L6E6elZNa5DJCSBz8AQs/xTDbH104JZsGk/ivXRryutvpwmKbBMTXXbLDFK4nPOb5IBzZ 0N5u5mvjxwK5S7vfU9LXCRVSlic9OhDTTNnw/iycBej8XIsnoDmq/Ff9iAU6aEOJ55V+0ymsHi TCbaTwrM+aSUTSccuqsEZUvJ1CHW7CvDDyh1RHwTU3KvT1V4SScRuwj87NJu3HuSjBOK3pQrar Z773hjmZAvEW7Q12YELsTT8HyTYIHhhf0A+2/YncVPuxcjkg8aR7xlQXE74+qETDW2FWTC8vEh YmE= X-SBRS: 5.1 X-MesageID: 47384424 X-Ironport-Server: esa3.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:RoSt96FZ/cY7VNDdpLqE0MeALOsnbusQ8zAXP0AYc3Jom6uj5q aTdZUgpGfJYVkqOE3I9ertBEDEewK4yXcX2/h3AV7BZniEhILAFugLhuGO/9SjIVybygc079 YYT0EUMrzN5DZB4voSmDPIceod/A== X-IronPort-AV: E=Sophos;i="5.83,314,1616472000"; d="scan'208";a="47384424" From: Anthony PERARD To: CC: Anthony PERARD , Stefano Stabellini , Julien Grall , Volodymyr Babchuk Subject: [XEN PATCH v6 22/31] build: fix $(TARGET).efi creation in arch/arm Date: Thu, 1 Jul 2021 15:10:02 +0100 Message-ID: <20210701141011.785641-23-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210701141011.785641-1-anthony.perard@citrix.com> References: <20210701141011.785641-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) Content-Type: text/plain; charset="utf-8" There is no need to try to guess a relative path to the "xen.efi" file, we can simply use $@. Also, there's no need to use `notdir`, make already do that work via $(@F). Signed-off-by: Anthony PERARD --- xen/arch/arm/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile index cc90d9796e6e..dc1d09c8b429 100644 --- a/xen/arch/arm/Makefile +++ b/xen/arch/arm/Makefile @@ -93,7 +93,7 @@ endif $(TARGET): $(TARGET)-syms $(OBJCOPY) -O binary -S $< $@ ifeq ($(CONFIG_ARM_64),y) - ln -sf $(notdir $@) ../../$(notdir $@).efi + ln -sf $(@F) $@.efi endif =20 ifeq ($(CONFIG_LTO),y) --=20 Anthony PERARD From nobody Tue Apr 30 03:23:41 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1625149318; cv=none; d=zohomail.com; s=zohoarc; b=FmJ2H5XqL7LgXqh6uGMlL1PlkQz+UQB2AhdfkaPurxtwhN6JJRraA1OZ06Ptf/VGCwkMWlfdGJ5BhetHGGB9MBIcyJNw11xPHRyenLIOVLpPAy3med1L5faqi62JQp6/eO4/HoIrMQ4YB22BP8Bjpoy1XkWLah6iKHGJ3RiKw8g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1625149318; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=+bE1zPdoscJu7X6cwR6GzNdFdWjiUqeXWokzjHd/GeU=; b=DFGmXmllQO0SQzVCba7YdAKAdvxF6Cfz7E72fS/lJI+B9iM/GvknpK+no3HSZ1vsqnVOsbNbacvg/lA1D44enAdz+Bm71DdTIwGnrzjYXgygYLX4e3nIwcwIAr2gkW/s8D0ed884nFM7x/yYS51wtFGbbcfPyNy9DKqdjerH4Cs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1625149318908227.0006081310131; Thu, 1 Jul 2021 07:21:58 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.148792.275101 (Exim 4.92) (envelope-from ) id 1lyxZb-0003gP-CC; Thu, 01 Jul 2021 14:21:47 +0000 Received: by outflank-mailman (output) from mailman id 148792.275101; Thu, 01 Jul 2021 14:21:47 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lyxZb-0003ed-14; Thu, 01 Jul 2021 14:21:47 +0000 Received: by outflank-mailman (input) for mailman id 148792; Thu, 01 Jul 2021 14:21:45 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lyxR8-0005F9-NK for xen-devel@lists.xenproject.org; Thu, 01 Jul 2021 14:13:02 +0000 Received: from esa1.hc3370-68.iphmx.com (unknown [216.71.145.142]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 3b5a5f68-da76-11eb-8329-12813bfff9fa; Thu, 01 Jul 2021 14:11:30 +0000 (UTC) X-Outflank-Mailman: Message body and most headers restored to incoming version 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" X-Inumbo-ID: 3b5a5f68-da76-11eb-8329-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1625148690; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=dwFmFNnNGaBSF9VKRHGAEd86YUDOMJh2c843ZdLeZ+U=; b=UaT1H5wWuAlS8O4fXfRyOffTdO5CO12l8DM3eTC0PdaXiCVqRaylTdNa uRp9Cqq75uKmJsVkczMyS2ZNRI6MlcL8qazTZ/YGq64hDGxVQbAVr9Qjt dLY+e5K9ZAq0+8AJzcxh6X6tA9PkMo8xchxsKddHzMKZ4dNsaR2nmkGoY 8=; Authentication-Results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: j9+odOWZg4WcY/KWgEG94tzUNJeVT2HdKgX+qswkboAx+QonpZd9WL3w2XDUoAzi684TV5EWTb GOREf2oposR+Kt+yYxPmp/+USQMe37X2fPaofRQg72ypwUaIKEcmOl1XGtkfsdf2+37Q/XceCh GquF6WT4xVEVhSC7JWg95l1kleCPLNwV9EFwE4dkWcirzPHucNuUmjjdYqf6hwjoxa2WsQacUW +AszIaVkwXz3HCPSr31vNhycyAEc7xmH6jBIK+ZJVvmoEq0sHCr7cAN+nnGD+wvvzpxA4szQkK jIc= X-SBRS: 5.1 X-MesageID: 47755474 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:/x1tbK+wxuMrCvGmQSZuk+DgI+orL9Y04lQ7vn2YSXRuHPBw8P re+sjztCWE8Ar5N0tBpTntAsW9qDbnhPtICOoqTNCftWvdyQiVxehZhOOIqVDd8m/Fh4pgPM 9bAtFD4bbLbGSS4/yU3ODBKadD/OW6 X-IronPort-AV: E=Sophos;i="5.83,314,1616472000"; d="scan'208";a="47755474" From: Anthony PERARD To: CC: Anthony PERARD , Jan Beulich , Andrew Cooper , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Wei Liu Subject: [XEN PATCH v6 23/31] build: fix arch/x86/node.o rule Date: Thu, 1 Jul 2021 15:10:03 +0100 Message-ID: <20210701141011.785641-24-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210701141011.785641-1-anthony.perard@citrix.com> References: <20210701141011.785641-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) Content-Type: text/plain; charset="utf-8" Avoid different spelling for the location of "xen-syms", and simply use the dependency variable. This avoid the assumption about $(TARGET) value. Signed-off-by: Anthony PERARD Acked-by: Jan Beulich --- xen/arch/x86/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile index d3e38e4e9f02..d84062f48dfa 100644 --- a/xen/arch/x86/Makefile +++ b/xen/arch/x86/Makefile @@ -199,7 +199,7 @@ $(TARGET)-syms: prelink.o xen.lds rm -f $(@D)/.$(@F).[0-9]* $(@D)/..$(@F).[0-9]* =20 note.o: $(TARGET)-syms - $(OBJCOPY) -O binary --only-section=3D.note.gnu.build-id $(BASEDIR)/xen-= syms $@.bin + $(OBJCOPY) -O binary --only-section=3D.note.gnu.build-id $< $@.bin $(OBJCOPY) -I binary -O elf64-x86-64 -B i386:x86-64 \ --rename-section=3D.data=3D.note.gnu.build-id -S $@.bin $@ rm -f $@.bin --=20 Anthony PERARD From nobody Tue Apr 30 03:23:41 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1625149324; cv=none; d=zohomail.com; s=zohoarc; b=iAkSFmY35sxJK8gfT7PR23U4Boq3UtLV2bmUjNpchxmjSxKd4llNX9o2lmhpep2W4sE6/SeTctn+4kCwCgkQKSWq/ED/6Rs54NCp9PMb0inPFK5wV8EJLkPXdVDzdEemuFoLVs0u9ZOOOhcCaXFoee6CRrWwOvQ9r5hB/AdDbVY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1625149324; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=SMVtj8PXRsgBxhZJ0lFGpNLe3TmXrLqE+P/L9VJfy+s=; b=P3c4cson3yf/8M6PVWNfP34BnwCcQ/OOCIeLKmupdpjLM3o/04lANKvwCUlbVWUrVMGIrYtuKIHkDtFd2HYndoB81GCNUTTpRL666hJDBG8pMRg4HJv7msJeFx6PODLBTMdes7dsRfGzvd3ZdwNvegtAGVO9vcvDYbG7OpqOxLw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 162514932401463.48744474278078; Thu, 1 Jul 2021 07:22:04 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.148784.275072 (Exim 4.92) (envelope-from ) id 1lyxZX-0002jG-OV; Thu, 01 Jul 2021 14:21:43 +0000 Received: by outflank-mailman (output) from mailman id 148784.275072; Thu, 01 Jul 2021 14:21:43 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lyxZX-0002gM-8e; Thu, 01 Jul 2021 14:21:43 +0000 Received: by outflank-mailman (input) for mailman id 148784; Thu, 01 Jul 2021 14:21:41 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lyxRD-0005F9-Na for xen-devel@lists.xenproject.org; Thu, 01 Jul 2021 14:13:07 +0000 Received: from esa1.hc3370-68.iphmx.com (unknown [216.71.145.142]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 3b5a5f69-da76-11eb-8329-12813bfff9fa; Thu, 01 Jul 2021 14:11:31 +0000 (UTC) X-Outflank-Mailman: Message body and most headers restored to incoming version 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" X-Inumbo-ID: 3b5a5f69-da76-11eb-8329-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1625148691; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=CtRalG/rFOQIYxbwoHgfh6QYWVwTFjvwiv9qJRymPB4=; b=BvC/kxtgp+ZZGHJ7RQnkw9TtvgRaLMN/k/BTi9tbkOenesMiE6m3bJFj /FvDOtvKznlFuLgy5UfHw85TWleo3JjVkGp76mEnsuES+ytaNRsfcDpWO WpnaEjj6/6oMTwCboedwv4YC3IdnMBeAC2vHuqzm3bLOhCoHK9DqL4Q2c I=; Authentication-Results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: hLraOvlV2hORj0lqUItCLBjZMvgB6Np5KQPQmbLQq7tRXZDkSZqLXMNuP5nJX0jwLPLTi+GI8h 2wc2Rx6pQ3QQKSVTCRtnliw8GKo5seGDbzPoA8KRhfOde0K5cK7GRvOMmVihKoYULs7Tvu5m8y +p66ShJfuBdsQ6kzRQn2bMaIhoNd1yXwEkIVhcPSS0vEt/u7Rhk8tWEuWXbtUp1gQYTNBv4j8G Dqc6PmRbcbpZGEAJ0wPj/4YOScR8+96Q947kR0pTcQr13mJbEUF6HMVVEhgjM4ZP2q9V+anktx ZT8= X-SBRS: 5.1 X-MesageID: 47755476 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:/igxba3JE7yzpCgXmBPKpAqjBIokLtp133Aq2lEZdPRUGvb3qy nIpoV86faUskdoZJhOo7C90cW7LU80sKQFhLX5Xo3SOzUO2lHYT72KhLGKq1aLdhEWtNQtsZ uIG5IOceEYZmIasS+V2maF+q4bsbu6zJw= X-IronPort-AV: E=Sophos;i="5.83,314,1616472000"; d="scan'208";a="47755476" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Ian Jackson" , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu , Volodymyr Babchuk , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Subject: [XEN PATCH v6 24/31] build: set ALL_OBJS to main Makefile; move prelink.o to main Makefile Date: Thu, 1 Jul 2021 15:10:04 +0100 Message-ID: <20210701141011.785641-25-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210701141011.785641-1-anthony.perard@citrix.com> References: <20210701141011.785641-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) Content-Type: text/plain; charset="utf-8" This is to avoid arch/$arch/Makefile having to recurse into parents directories. This avoid duplication of the logic to build prelink.o between arches. In order to do that, we cut the $(TARGET) target in the main Makefile in two, there is a "prepare" phase/target runned before starting to build "prelink.o" which will prepare "include/" among other things, the all the $(ALL_OBJS) will be generated in order to build "prelink.o" and finally $(TARGET) will be generated by calling into "arch/*/" to make $(TARGET). Now we don't need to prefix $(ALL_OBJS) with $(BASEDIR) as it is now only used from the main Makefile. Other changes is using "$<" instead of spelling "prelink.o" in the target "$(TARGET)" in both arch/*/Makefile. Beside "prelink.o" been at a different location, no other functional change intended. Signed-off-by: Anthony PERARD --- xen/Makefile | 41 ++++++++++++++++++++++++++++++++++++++++- xen/Rules.mk | 13 ------------- xen/arch/arm/Makefile | 31 ++++--------------------------- xen/arch/arm/arch.mk | 2 ++ xen/arch/x86/Makefile | 27 +++++---------------------- xen/arch/x86/arch.mk | 2 ++ 6 files changed, 53 insertions(+), 63 deletions(-) diff --git a/xen/Makefile b/xen/Makefile index 4c4990a753df..fd002ecd52d0 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -269,8 +269,21 @@ CFLAGS +=3D -flto LDFLAGS-$(CONFIG_CC_IS_CLANG) +=3D -plugin LLVMgold.so endif =20 +# Note that link order matters! +ALL_OBJS-y :=3D common/built_in.o +ALL_OBJS-y +=3D drivers/built_in.o +ALL_OBJS-y +=3D lib/built_in.o +ALL_OBJS-y +=3D xsm/built_in.o +ALL_OBJS-y +=3D arch/$(TARGET_ARCH)/built_in.o +ALL_OBJS-$(CONFIG_CRYPTO) +=3D crypto/built_in.o + +ALL_LIBS-y :=3D lib/lib.a + include $(BASEDIR)/arch/$(TARGET_ARCH)/arch.mk =20 +export ALL_OBJS :=3D $(ALL_OBJS-y) +export ALL_LIBS :=3D $(ALL_LIBS-y) + # define new variables to avoid the ones defined in Config.mk export XEN_CFLAGS :=3D $(CFLAGS) export XEN_AFLAGS :=3D $(AFLAGS) @@ -378,7 +391,8 @@ $(TARGET).gz: $(TARGET) gzip -n -f -9 < $< > $@.new mv $@.new $@ =20 -$(TARGET): FORCE +PHONY +=3D prepare +prepare: $(MAKE) -C tools $(MAKE) -f $(BASEDIR)/Rules.mk include/xen/compile.h [ -e arch/$(TARGET_ARCH)/efi ] && for f in $$(cd common/efi; echo *.[ch])= ; \ @@ -389,6 +403,31 @@ $(TARGET): FORCE $(MAKE) -f $(BASEDIR)/Rules.mk -C include $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) include $(MAKE) -f $(BASEDIR)/Rules.mk include/arch-$(TARGET_ARCH)/asm/asm-offset= s.h + +$(ALL_OBJS) $(ALL_LIBS): prepare + +# head.o is built by descending into arch/arm/$(TARGET_SUBARCH), depends o= n the +# part of $(ALL_OBJS) that will eventually recurse into $(TARGET_SUBARCH)/= and +# build head.o +arch/arm/$(TARGET_SUBARCH)/head.o: arch/arm/built_in.o +arch/arm/$(TARGET_SUBARCH)/head.o: ; + +ifeq ($(CONFIG_LTO),y) +# Gather all LTO objects together +prelink_lto.o: $(ALL_OBJS) $(ALL_LIBS) + $(LD_LTO) -r -o $@ $(filter-out %.a,$^) --start-group $(filter %.a,$^) --= end-group + +# Link it with all the binary objects +prelink.o: $(patsubst %/built_in.o,%/built_in_bin.o,$(ALL_OBJS)) prelink_l= to.o FORCE + $(call if_changed,ld) +else +prelink.o: $(ALL_OBJS) $(ALL_LIBS) FORCE + $(call if_changed,ld) +endif + +targets +=3D prelink.o + +$(TARGET): prelink.o FORCE $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) $@ =20 quiet_cmd_banner =3D BANNER $@ diff --git a/xen/Rules.mk b/xen/Rules.mk index 894f2b83a04e..530aefa43ad9 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -11,25 +11,12 @@ include $(BASEDIR)/scripts/Kbuild.include =20 TARGET :=3D $(BASEDIR)/xen =20 -# Note that link order matters! -ALL_OBJS-y +=3D $(BASEDIR)/common/built_in.o -ALL_OBJS-y +=3D $(BASEDIR)/drivers/built_in.o -ALL_OBJS-y +=3D $(BASEDIR)/lib/built_in.o -ALL_OBJS-y +=3D $(BASEDIR)/xsm/built_in.o -ALL_OBJS-y +=3D $(BASEDIR)/arch/$(TARGET_ARCH)/built_in.o -ALL_OBJS-$(CONFIG_CRYPTO) +=3D $(BASEDIR)/crypto/built_in.o - -ALL_LIBS-y :=3D $(BASEDIR)/lib/lib.a - # Initialise some variables lib-y :=3D targets :=3D CFLAGS-y :=3D AFLAGS-y :=3D =20 -ALL_OBJS :=3D $(ALL_OBJS-y) -ALL_LIBS :=3D $(ALL_LIBS-y) - SPECIAL_DATA_SECTIONS :=3D rodata $(foreach a,1 2 4 8 16, \ $(foreach w,1 2 4, \ rodata.str$(w).$(a= )) \ diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile index dc1d09c8b429..067c0d9844e4 100644 --- a/xen/arch/arm/Makefile +++ b/xen/arch/arm/Makefile @@ -73,14 +73,6 @@ ifneq ($(CONFIG_DTB_FILE),"") obj-y +=3D dtb.o endif =20 -ALL_OBJS :=3D $(TARGET_SUBARCH)/head.o $(ALL_OBJS) - -# head.o is built by descending into the sub-directory, depends on the par= t of -# $(ALL_OBJS) that will eventually recurse into $(TARGET_SUBARCH)/ and bui= ld -# head.o -$(TARGET_SUBARCH)/head.o: $(BASEDIR)/arch/arm/built_in.o -$(TARGET_SUBARCH)/head.o: ; - ifdef CONFIG_LIVEPATCH all_symbols =3D --all-symbols ifdef CONFIG_FAST_SYMBOL_LOOKUP @@ -96,33 +88,18 @@ ifeq ($(CONFIG_ARM_64),y) ln -sf $(@F) $@.efi endif =20 -ifeq ($(CONFIG_LTO),y) -# Gather all LTO objects together -prelink_lto.o: $(ALL_OBJS) $(ALL_LIBS) - $(LD_LTO) -r -o $@ $(filter-out %.a,$^) --start-group $(filter %.a,$^) --= end-group - -# Link it with all the binary objects -prelink.o: $(patsubst %/built_in.o,%/built_in_bin.o,$(ALL_OBJS)) prelink_l= to.o - $(call if_changed,ld) -else -prelink.o: $(ALL_OBJS) $(ALL_LIBS) FORCE - $(call if_changed,ld) -endif - -targets +=3D prelink.o - -$(TARGET)-syms: prelink.o xen.lds - $(LD) $(XEN_LDFLAGS) -T xen.lds -N prelink.o \ +$(TARGET)-syms: $(BASEDIR)/prelink.o xen.lds + $(LD) $(XEN_LDFLAGS) -T xen.lds -N $< \ $(BASEDIR)/common/symbols-dummy.o -o $(@D)/.$(@F).0 $(NM) -pa --format=3Dsysv $(@D)/.$(@F).0 \ | $(BASEDIR)/tools/symbols $(all_symbols) --sysv --sort >$(@D)/.$(@F).0.S $(MAKE) -f $(BASEDIR)/Rules.mk $(@D)/.$(@F).0.o - $(LD) $(XEN_LDFLAGS) -T xen.lds -N prelink.o \ + $(LD) $(XEN_LDFLAGS) -T xen.lds -N $< \ $(@D)/.$(@F).0.o -o $(@D)/.$(@F).1 $(NM) -pa --format=3Dsysv $(@D)/.$(@F).1 \ | $(BASEDIR)/tools/symbols $(all_symbols) --sysv --sort >$(@D)/.$(@F).1.S $(MAKE) -f $(BASEDIR)/Rules.mk $(@D)/.$(@F).1.o - $(LD) $(XEN_LDFLAGS) -T xen.lds -N prelink.o $(build_id_linker) \ + $(LD) $(XEN_LDFLAGS) -T xen.lds -N $< $(build_id_linker) \ $(@D)/.$(@F).1.o -o $@ $(NM) -pa --format=3Dsysv $(@D)/$(@F) \ | $(BASEDIR)/tools/symbols --all-symbols --xensyms --sysv --sort \ diff --git a/xen/arch/arm/arch.mk b/xen/arch/arm/arch.mk index f54e602301be..8a2b202f698e 100644 --- a/xen/arch/arm/arch.mk +++ b/xen/arch/arm/arch.mk @@ -26,3 +26,5 @@ ifeq ($(CONFIG_ARM64_ERRATUM_843419),y) LDFLAGS +=3D --fix-cortex-a53-843419 endif endif + +ALL_OBJS-y :=3D arch/arm/$(TARGET_SUBARCH)/head.o $(ALL_OBJS-y) diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile index d84062f48dfa..3bd302d28ccf 100644 --- a/xen/arch/x86/Makefile +++ b/xen/arch/x86/Makefile @@ -161,37 +161,20 @@ endif # $(XEN_BUILD_PE) =20 endif # $(efi-y) =20 -ALL_OBJS :=3D $(BASEDIR)/arch/x86/boot/built_in.o $(BASEDIR)/arch/x86/efi/= built_in.o $(ALL_OBJS) - -ifeq ($(CONFIG_LTO),y) -# Gather all LTO objects together -prelink_lto.o: $(ALL_OBJS) $(ALL_LIBS) - $(LD_LTO) -r -o $@ $(filter-out %.a,$^) --start-group $(filter %.a,$^) --= end-group - -# Link it with all the binary objects -prelink.o: $(patsubst %/built_in.o,%/built_in_bin.o,$(ALL_OBJS)) prelink_l= to.o FORCE - $(call if_changed,ld) -else -prelink.o: $(ALL_OBJS) $(ALL_LIBS) FORCE - $(call if_changed,ld) -endif - -targets +=3D prelink.o - -$(TARGET)-syms: prelink.o xen.lds - $(LD) $(XEN_LDFLAGS) -T xen.lds -N prelink.o $(build_id_linker) \ +$(TARGET)-syms: $(BASEDIR)/prelink.o xen.lds + $(LD) $(XEN_LDFLAGS) -T xen.lds -N $< $(build_id_linker) \ $(BASEDIR)/common/symbols-dummy.o -o $(@D)/.$(@F).0 $(NM) -pa --format=3Dsysv $(@D)/.$(@F).0 \ | $(BASEDIR)/tools/symbols $(all_symbols) --sysv --sort \ >$(@D)/.$(@F).0.S $(MAKE) -f $(BASEDIR)/Rules.mk $(@D)/.$(@F).0.o - $(LD) $(XEN_LDFLAGS) -T xen.lds -N prelink.o $(build_id_linker) \ + $(LD) $(XEN_LDFLAGS) -T xen.lds -N $< $(build_id_linker) \ $(@D)/.$(@F).0.o -o $(@D)/.$(@F).1 $(NM) -pa --format=3Dsysv $(@D)/.$(@F).1 \ | $(BASEDIR)/tools/symbols $(all_symbols) --sysv --sort $(syms-warn-dup-= y) \ >$(@D)/.$(@F).1.S $(MAKE) -f $(BASEDIR)/Rules.mk $(@D)/.$(@F).1.o - $(LD) $(XEN_LDFLAGS) -T xen.lds -N prelink.o $(build_id_linker) \ + $(LD) $(XEN_LDFLAGS) -T xen.lds -N $< $(build_id_linker) \ $(@D)/.$(@F).1.o -o $@ $(NM) -pa --format=3Dsysv $(@D)/$(@F) \ | $(BASEDIR)/tools/symbols --all-symbols --xensyms --sysv --sort \ @@ -242,7 +225,7 @@ note_file_option ?=3D $(note_file) =20 ifeq ($(XEN_BUILD_PE),y) extra-y +=3D efi.lds -$(TARGET).efi: prelink.o $(note_file) efi.lds efi/relocs-dummy.o efi/mkrel= oc +$(TARGET).efi: $(BASEDIR)/prelink.o $(note_file) efi.lds efi/relocs-dummy.= o efi/mkreloc ifeq ($(CONFIG_DEBUG_INFO),y) $(if $(filter --strip-debug,$(EFI_LDFLAGS)),echo,:) "Will strip debug inf= o from $(@F)" endif diff --git a/xen/arch/x86/arch.mk b/xen/arch/x86/arch.mk index 5a4a1704636f..c95caa303db8 100644 --- a/xen/arch/x86/arch.mk +++ b/xen/arch/x86/arch.mk @@ -67,3 +67,5 @@ endif =20 # Set up the assembler include path properly for older toolchains. CFLAGS +=3D -Wa,-I$(BASEDIR)/include + +ALL_OBJS-y :=3D arch/x86/boot/built_in.o arch/x86/efi/built_in.o $(ALL_OBJ= S-y) --=20 Anthony PERARD From nobody Tue Apr 30 03:23:41 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1625149319; cv=none; d=zohomail.com; s=zohoarc; b=DKRaw6IMpDZ1jc0fpJVlGw3nINGRBv9a7Dr2W9DuBXWMb/P75GEl/rTX3BPimuf07Jfh+Szp4fCb4Sf5ziYEVzxPFHt+eCexG1Es5rJ0tOzQEZnW6SL6GPjl9TTGOxtgtwseLiYiTS/IvCDQZFtq89hT9bV34SQA+ZN+MKT9Efk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1625149319; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=AYto6Pc40tgj/ON/+leHrtNlvVNc/PYF01E5jwxty2c=; b=KJ3hXaKs9qEmJGA+ZhXteZ+2CEcG5gsKO5ksLQJdgUSjXSlmFu3/kb5zA5c7UqP+HvsFGxNHZjKh7+Jy6PJ2tdd8SJl5uKNzGDhayMfuLAsGbdMv01rEPdBAo5tMmwgDPoQepMe2oDsohBTS7jurle8DjN+j5evL6K5qkaL2JJY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1625149319129968.0764669094033; Thu, 1 Jul 2021 07:21:59 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.148786.275086 (Exim 4.92) (envelope-from ) id 1lyxZZ-00036P-DP; Thu, 01 Jul 2021 14:21:45 +0000 Received: by outflank-mailman (output) from mailman id 148786.275086; Thu, 01 Jul 2021 14:21:45 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lyxZZ-00033E-0w; Thu, 01 Jul 2021 14:21:45 +0000 Received: by outflank-mailman (input) for mailman id 148786; Thu, 01 Jul 2021 14:21:42 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lyxQY-0005tj-3C for xen-devel@lists.xenproject.org; Thu, 01 Jul 2021 14:12:26 +0000 Received: from esa3.hc3370-68.iphmx.com (unknown [216.71.145.155]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 15a5bb7c-acdc-4168-94ea-f77cf4018776; Thu, 01 Jul 2021 14:11:00 +0000 (UTC) X-Outflank-Mailman: Message body and most headers restored to incoming version 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" X-Inumbo-ID: 15a5bb7c-acdc-4168-94ea-f77cf4018776 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1625148660; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=VYtJdbyxr0lMfwQQB1MSi1pDA6ObAawqWdtJQrYS9po=; b=RZ/AqPFO3RtE2bZM2a+6ZjsbgbADUyMHPIDxzmx6D5qKXQhpI1vjhDId RAUPCyKWq8X3Mugkan2g73J+wRj90HQHgOY3K0TP9T0a0EUu84Q3lfx/T GT+3ZCXDbjxdhjWhOe4heqipxkx69anfEIwsBU1CB+01THxdbpZ9JmznZ k=; Authentication-Results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: gCca3NaYK5NXXlP8zzfd2Es4Q6xWeJKic81AuQvAcHairi0uqKEAhynP3h64VNELTzpd3ikKwM vEVBgmeZRmBSvAyOtMBkdqIRtxmfnlfe8ZP0vs+dv+3xKahhvusr5uPnPLxK5aAub7l+1/oDfa BKz61EK8oqKIwfan9lo0UbG9P6X/ZIoT/8Os/0uk5ubJm4MfIUSkj7bEuX5Gusb7hwVKCGIHa3 dTrlNQNp5zX7EXEdjmsk4Vqa3e0kpl+/WKUdJaFqvP2j4Syp3PEJqcmQEvlNOqc/MUrwC+xJxw 2L4= X-SBRS: 5.1 X-MesageID: 47384444 X-Ironport-Server: esa3.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:zoJpmqosS7oNlMtgtLh3LAYaV5rReYIsimQD101hICG9Evb0qy lhppQmPH7P+VIssRQb8+xoV5PufZqxz/BICOoqTNKftWvdyQiVxehZhOOP/9SJIUbDH4VmpM VdmsZFaeEZDTJB/LvHCAvTKadd/DFQmprY+ts3zB1WPH9Xg7kL1XYfNu4CeHcGPzWvA/ACZf yhz/sCnRWMU1INYP+2A3EUNtKz3eEixPrdEGc77wdM0nj3sQ+V X-IronPort-AV: E=Sophos;i="5.83,314,1616472000"; d="scan'208";a="47384444" From: Anthony PERARD To: CC: Anthony PERARD , Jan Beulich , Andrew Cooper , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Wei Liu Subject: [XEN PATCH v6 25/31] build: remove unneeded deps of x86_emulate.o Date: Thu, 1 Jul 2021 15:10:05 +0100 Message-ID: <20210701141011.785641-26-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210701141011.785641-1-anthony.perard@citrix.com> References: <20210701141011.785641-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) Content-Type: text/plain; charset="utf-8" Those two dependencies already exist so make doesn't need to know about them. The dependency will be generated by $(CC). Signed-off-by: Anthony PERARD Reviewed-by: Jan Beulich --- xen/arch/x86/Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile index 3bd302d28ccf..fc719247eac9 100644 --- a/xen/arch/x86/Makefile +++ b/xen/arch/x86/Makefile @@ -84,7 +84,6 @@ extra-y +=3D xen.lds ifneq ($(CONFIG_HVM),y) x86_emulate.o: CFLAGS-y +=3D -Wno-unused-label endif -x86_emulate.o: x86_emulate/x86_emulate.c x86_emulate/x86_emulate.h =20 efi-y :=3D $(shell if [ ! -r $(BASEDIR)/include/xen/compile.h -o \ -O $(BASEDIR)/include/xen/compile.h ]; then \ --=20 Anthony PERARD From nobody Tue Apr 30 03:23:41 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1625149309; cv=none; d=zohomail.com; s=zohoarc; b=Ul5cbR3XDkKjced6T72EFgeQcTemUPON/F18ZJxr0zhOoJjUmRMiHfEslJpa0RDPS7UVGcsbjwT7i25E3JBg0MkJrRXpLaDnHVElNqQq1T9vXaGjDi1PR/FlVOfPIMTq/ACFfUgLAgoAaFK6q8hywc8zcbzt1L6gWr/ZGGraWhA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1625149309; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=suvXpiVHZmbu2xDud3JwdVy4BKtbmQprGyQgoHlN6vo=; b=BQNM2mIrCSjA4pbWEjW/DaD+8Oa6VgSvbexStc7Unxwz77TkA5Gpcs4jNZWfZIfVcSKQV72xvBr/dx+3dZySG4PYcRMAyeGecjqiAN2SZ1kBf/pmpCeeuG1iJw6HJRSYrO6KyFP+EoxtBhomJm8kerIXWQJJW24x6W3nRW86y+c= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1625149309841583.1636366150364; Thu, 1 Jul 2021 07:21:49 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.148759.275027 (Exim 4.92) (envelope-from ) id 1lyxZS-0001hQ-FV; Thu, 01 Jul 2021 14:21:38 +0000 Received: by outflank-mailman (output) from mailman id 148759.275027; Thu, 01 Jul 2021 14:21:38 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lyxZS-0001hE-As; Thu, 01 Jul 2021 14:21:38 +0000 Received: by outflank-mailman (input) for mailman id 148759; Thu, 01 Jul 2021 14:21:36 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lyxRI-0005F9-Nd for xen-devel@lists.xenproject.org; Thu, 01 Jul 2021 14:13:12 +0000 Received: from esa1.hc3370-68.iphmx.com (unknown [216.71.145.142]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 3d926230-da76-11eb-8329-12813bfff9fa; Thu, 01 Jul 2021 14:11:34 +0000 (UTC) X-Outflank-Mailman: Message body and most headers restored to incoming version 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" X-Inumbo-ID: 3d926230-da76-11eb-8329-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1625148693; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=/FUmArmLEUIthNAppG6akBLHO3pJX78uJKbRrb4d2EI=; b=P76S3OAdIgeozLRn43x2LzFcy8Ykwb3pT6tREUw+i1f1TRhCXgKi11FT luKAOnUWzXjeZjs2QbBcF45Gxdk/ZSL7b9+Lfw/E6OkUHp8uObbADquIh jx7vDYEbB09TYP9Uu1IyVSWGRHdnwGDDR44OJm47lkvi2ZQvyxW03rukc o=; Authentication-Results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: D09gFO1M0EXikMGbZhcoxD0O0fKSoGY0TXjcb8GYPlxlc7KacMjEeVYluQbadkrpN2DOgsrbKo kL7I5nHQgmOEPSmDh+o9f87QkmVlDS7u0Q0vLW8ZTpt41vNJI9eMyqhzF5PY63z94yrlb+81/z +WBED6UtQSVx+LZf/CMufdk+sCJSLL6IUdlieCOvKpBKM/UfDhxp8rGaAYCc1ttHDOouiD/33r 6GXm+WARdUc7qI+zzKkwBOiChCl1glM4g44nIXHQ2ppr1+4dASBCq1HcN2Ncz2Bt93f387BIzM 5Oo= X-SBRS: 5.1 X-MesageID: 47755478 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:amjLI675VHwyieoSTwPXwM7XdLJyesId70hD6qhwISY7TiX+rb HIoB17726MtN9/YhAdcLy7VZVoBEmsl6KdgrNhWYtKPjOHhILAFugLhuHfKn/bakjDH4ZmpM FdmsNFZuEYY2IXsS+D2njaL+od X-IronPort-AV: E=Sophos;i="5.83,314,1616472000"; d="scan'208";a="47755478" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Ian Jackson" , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu Subject: [XEN PATCH v6 26/31] build: clean common temporary files from root makefile Date: Thu, 1 Jul 2021 15:10:06 +0100 Message-ID: <20210701141011.785641-27-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210701141011.785641-1-anthony.perard@citrix.com> References: <20210701141011.785641-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Anthony PERARD --- xen/Makefile | 1 + xen/scripts/Makefile.clean | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/xen/Makefile b/xen/Makefile index fd002ecd52d0..6aac68750b4d 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -378,6 +378,7 @@ _clean: $(MAKE) $(clean) test $(MAKE) $(kconfig) clean find . \( -name "*.o" -o -name ".*.d" -o -name ".*.d2" \ + -o -name ".*.o.tmp" -o -name "*~" -o -name "core" \ -o -name "*.gcno" -o -name ".*.cmd" -o -name "lib.a" \) -exec rm -f {} \; rm -f include/asm $(TARGET) $(TARGET).gz $(TARGET).efi $(TARGET).efi.map = $(TARGET)-syms $(TARGET)-syms.map *~ core rm -f asm-offsets.s include/arch-*/asm/asm-offsets.h diff --git a/xen/scripts/Makefile.clean b/xen/scripts/Makefile.clean index 027c200c0efc..b6df9e861e6e 100644 --- a/xen/scripts/Makefile.clean +++ b/xen/scripts/Makefile.clean @@ -14,10 +14,8 @@ include Makefile subdir-all :=3D $(subdir-y) $(subdir-n) $(subdir-) \ $(patsubst %/,%, $(filter %/, $(obj-y) $(obj-n) $(obj-))) =20 -DEPS_RM =3D $(DEPS) $(DEPS_INCLUDE) .PHONY: clean clean:: $(subdir-all) - rm -f *.o .*.o.tmp *~ core $(DEPS_RM) =20 # Descending # ------------------------------------------------------------------------= --- --=20 Anthony PERARD From nobody Tue Apr 30 03:23:41 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1625149329; cv=none; d=zohomail.com; s=zohoarc; b=cvT6Tym+oERP4j0nRrY4TA8MJSwZCBRRynC+znNeZDFo44gJQkcdmzcbm+83bqjlMqxQAClYD/32zdi8r7NGXABfoTrxphkcYuStpWkPcGT4VJpkHv6ghKUPIWxIcPkHt77pSaEFJJeu0HEbDtim/KSoxu/u8WE+FfJMI9RBp2E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1625149329; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=kFhPa1KBDeOt/qfc8JjHSfCxLt1j3t716zhKQsueKjg=; b=Dafusm7bVQkQ11odxgdhCjnJawmGauZbH/KkzSf9G1jng85ohc+CtoAdISuyBd50abLYJqWPqhqVxJB+t+qnaeNzjdM+Mh+oDASqgd9gChR2jsJyUtPezH00T8Am7JPbMkJ7xIPlL3c50JR2h+SOq2NAbxnkv4avs1bT/icrf8E= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 162514932993866.21810739032264; Thu, 1 Jul 2021 07:22:09 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.148811.275137 (Exim 4.92) (envelope-from ) id 1lyxZj-0005IG-RI; Thu, 01 Jul 2021 14:21:55 +0000 Received: by outflank-mailman (output) from mailman id 148811.275137; Thu, 01 Jul 2021 14:21:55 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lyxZj-0005Gh-Dt; Thu, 01 Jul 2021 14:21:55 +0000 Received: by outflank-mailman (input) for mailman id 148811; Thu, 01 Jul 2021 14:21:54 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lyxPv-0005F9-L9 for xen-devel@lists.xenproject.org; Thu, 01 Jul 2021 14:11:47 +0000 Received: from esa4.hc3370-68.iphmx.com (unknown [216.71.155.144]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 2af6936c-da76-11eb-8328-12813bfff9fa; Thu, 01 Jul 2021 14:11:03 +0000 (UTC) X-Outflank-Mailman: Message body and most headers restored to incoming version 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" X-Inumbo-ID: 2af6936c-da76-11eb-8328-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1625148663; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=d78ReIC4dkXR+RmdsCXwSdPyXPKAHSLgx1r8az094Oo=; b=eIxBi1MBjmYipGvvmIhPEBPKrG9UCNUsnwW5XXsZC9PgxcdePe5u9w+n 3x11jLRKnJG5OFZbKfcoHCct53ACGks3fCV35UFd7j5wQWJHcPuVdTvPp HVkFdjJ1t8il1sTlP/H7w6Mhh7wDdwFwt3KV8j2OW02nyxv00lF36OLJK g=; Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: HUVxGlcv97ZQa0q3AG+QVFZyCim0+EctzY0AQqEJU9/a4O2q/VswMmJj2dscPL3gGS5BYDUtXu Ln5LcK0JeLj8SLBWQUwwPZcb+CBR0MgtYDN6Z2eKiGPu3pey4nckyiNJkJgawA9ga4padMIavk MLQeozwN95dAxhRg5I7rV8lpyOE2HMyCqFUVBERAhuVgHVHCUChau1oPTa0m60KwD/pveGDB8u 5nw3wXwQep8VcCvGKUxSGPXDNh4CyEMmxS82mYFkvOVaEVcRxv5+iPxyP+T2lT+PFDjW2aqVKp zdQ= X-SBRS: 5.1 X-MesageID: 49007566 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:qE7bfKiEd9bH3XMDcANDU6kM4HBQXtwji2hC6mlwRA09TySZ// rAoB19726StN9xYgBYpTnuAsi9qB/nmKKdpLNhX4tKPzOW3FdATrsD0WKK+VSJcEfDH6xmpM JdmsBFebvN5DNB4/oSjjPVLz9Z+qjlzJyV X-IronPort-AV: E=Sophos;i="5.83,314,1616472000"; d="scan'208";a="49007566" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Ian Jackson" , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu , Volodymyr Babchuk , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Daniel De Graaf , "Daniel P. Smith" Subject: [XEN PATCH v6 27/31] build: prepare to always invoke $(MAKE) from xen/, use $(obj) Date: Thu, 1 Jul 2021 15:10:07 +0100 Message-ID: <20210701141011.785641-28-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210701141011.785641-1-anthony.perard@citrix.com> References: <20210701141011.785641-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) Content-Type: text/plain; charset="utf-8" In a future patch, when building a subdirectory, we will set "obj=3D$subdir" rather than change directory. Before that, we add "$(obj)" and "$(src)" in as many places as possible where we will need to know which subdirectory is been built. "$(obj)" is for files been generated during the build, and "$(src)" is for files present in the source tree. For now, we set both to "." in Rules.mk and Makefile.clean. A few places don't tolerate the addition of "./", this is because make remove the leading "./" in targets and dependencies in rules, so these will be change later. Signed-off-by: Anthony PERARD --- xen/Rules.mk | 5 ++- xen/arch/arm/Makefile | 14 +++--- xen/arch/x86/Makefile | 60 ++++++++++++------------- xen/arch/x86/boot/Makefile | 14 +++--- xen/arch/x86/efi/Makefile | 6 +-- xen/common/Makefile | 8 ++-- xen/common/libelf/Makefile | 4 +- xen/common/libfdt/Makefile | 6 +-- xen/include/Makefile | 44 +++++++++--------- xen/scripts/Makefile.clean | 5 ++- xen/xsm/flask/Makefile | 34 +++++++------- xen/xsm/flask/policy/mkaccess_vector.sh | 7 ++- 12 files changed, 108 insertions(+), 99 deletions(-) diff --git a/xen/Rules.mk b/xen/Rules.mk index 530aefa43ad9..0f8d90844455 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -3,6 +3,9 @@ # Makefile and are consumed by Rules.mk # =20 +obj :=3D . +src :=3D $(obj) + -include $(BASEDIR)/include/config/auto.conf =20 include $(XEN_ROOT)/Config.mk @@ -23,7 +26,7 @@ SPECIAL_DATA_SECTIONS :=3D rodata $(foreach a,1 2 4 8 16,= \ rodata.cst$(a)) \ $(foreach r,rel rel.ro,data.$(r).local) =20 -include Makefile +include $(src)/Makefile =20 # Linking # ------------------------------------------------------------------------= --- diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile index 067c0d9844e4..9f9c73aa6c5d 100644 --- a/xen/arch/arm/Makefile +++ b/xen/arch/arm/Makefile @@ -88,18 +88,18 @@ ifeq ($(CONFIG_ARM_64),y) ln -sf $(@F) $@.efi endif =20 -$(TARGET)-syms: $(BASEDIR)/prelink.o xen.lds - $(LD) $(XEN_LDFLAGS) -T xen.lds -N $< \ +$(TARGET)-syms: $(BASEDIR)/prelink.o $(obj)/xen.lds + $(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< \ $(BASEDIR)/common/symbols-dummy.o -o $(@D)/.$(@F).0 $(NM) -pa --format=3Dsysv $(@D)/.$(@F).0 \ | $(BASEDIR)/tools/symbols $(all_symbols) --sysv --sort >$(@D)/.$(@F).0.S $(MAKE) -f $(BASEDIR)/Rules.mk $(@D)/.$(@F).0.o - $(LD) $(XEN_LDFLAGS) -T xen.lds -N $< \ + $(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< \ $(@D)/.$(@F).0.o -o $(@D)/.$(@F).1 $(NM) -pa --format=3Dsysv $(@D)/.$(@F).1 \ | $(BASEDIR)/tools/symbols $(all_symbols) --sysv --sort >$(@D)/.$(@F).1.S $(MAKE) -f $(BASEDIR)/Rules.mk $(@D)/.$(@F).1.o - $(LD) $(XEN_LDFLAGS) -T xen.lds -N $< $(build_id_linker) \ + $(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< $(build_id_linker) \ $(@D)/.$(@F).1.o -o $@ $(NM) -pa --format=3Dsysv $(@D)/$(@F) \ | $(BASEDIR)/tools/symbols --all-symbols --xensyms --sysv --sort \ @@ -109,13 +109,13 @@ $(TARGET)-syms: $(BASEDIR)/prelink.o xen.lds .PHONY: include include: =20 -xen.lds: xen.lds.S FORCE +$(obj)/xen.lds: $(src)/xen.lds.S FORCE $(call if_changed,cpp_lds_S) =20 -dtb.o: $(patsubst "%",%,$(CONFIG_DTB_FILE)) +$(obj)/dtb.o: $(patsubst "%",%,$(CONFIG_DTB_FILE)) =20 .PHONY: clean clean:: - rm -f xen.lds + rm -f $(obj)/xen.lds rm -f $(BASEDIR)/.xen-syms.[0-9]* rm -f $(TARGET).efi diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile index fc719247eac9..2cc67d6e0e84 100644 --- a/xen/arch/x86/Makefile +++ b/xen/arch/x86/Makefile @@ -82,7 +82,7 @@ extra-y +=3D asm-macros.i extra-y +=3D xen.lds =20 ifneq ($(CONFIG_HVM),y) -x86_emulate.o: CFLAGS-y +=3D -Wno-unused-label +$(obj)/x86_emulate.o: CFLAGS-y +=3D -Wno-unused-label endif =20 efi-y :=3D $(shell if [ ! -r $(BASEDIR)/include/xen/compile.h -o \ @@ -113,8 +113,8 @@ syms-warn-dup-$(CONFIG_SUPPRESS_DUPLICATE_SYMBOL_WARNIN= GS) :=3D syms-warn-dup-$(CONFIG_ENFORCE_UNIQUE_SYMBOLS) :=3D --error-dup =20 $(TARGET): TMP =3D $(@D)/.$(@F).elf32 -$(TARGET): $(TARGET)-syms $(efi-y) boot/mkelf32 - ./boot/mkelf32 $(notes_phdrs) $(TARGET)-syms $(TMP) $(XEN_IMG_OFFSET) \ +$(TARGET): $(TARGET)-syms $(efi-y) $(obj)/boot/mkelf32 + $(obj)/boot/mkelf32 $(notes_phdrs) $(TARGET)-syms $(TMP) $(XEN_IMG_OFFSET= ) \ `$(NM) $(TARGET)-syms | sed -ne 's/^\([^ ]*\) . __2M_rwdat= a_end$$/0x\1/p'` od -t x4 -N 8192 $(TMP) | grep 1badb002 > /dev/null || \ { echo "No Multiboot1 header found" >&2; false; } @@ -125,29 +125,29 @@ $(TARGET): $(TARGET)-syms $(efi-y) boot/mkelf32 ifneq ($(efi-y),) =20 # Check if the compiler supports the MS ABI. -XEN_BUILD_EFI :=3D $(shell $(CC) $(XEN_CFLAGS) -c efi/check.c -o efi/check= .o 2>/dev/null && echo y) +XEN_BUILD_EFI :=3D $(shell $(CC) $(XEN_CFLAGS) -c $(src)/efi/check.c -o $(= obj)/efi/check.o 2>/dev/null && echo y) CFLAGS-$(XEN_BUILD_EFI) +=3D -DXEN_BUILD_EFI =20 # Check if the linker supports PE. EFI_LDFLAGS =3D $(patsubst -m%,-mi386pep,$(XEN_LDFLAGS)) --subsystem=3D10 -XEN_BUILD_PE :=3D $(if $(XEN_BUILD_EFI),$(call ld-option,$(EFI_LDFLAGS) --= image-base=3D0x100000000 -o efi/check.efi efi/check.o)) +XEN_BUILD_PE :=3D $(if $(XEN_BUILD_EFI),$(call ld-option,$(EFI_LDFLAGS) --= image-base=3D0x100000000 -o $(obj)/efi/check.efi $(obj)/efi/check.o)) # If the above failed, it may be merely because of the linker not dealing = well # with debug info. Try again with stripping it. ifeq ($(CONFIG_DEBUG_INFO)-$(XEN_BUILD_PE),y-n) EFI_LDFLAGS +=3D --strip-debug -XEN_BUILD_PE :=3D $(call ld-option,$(EFI_LDFLAGS) --image-base=3D0x1000000= 00 -o efi/check.efi efi/check.o) +XEN_BUILD_PE :=3D $(call ld-option,$(EFI_LDFLAGS) --image-base=3D0x1000000= 00 -o $(obj)/efi/check.efi $(obj)/efi/check.o) endif =20 ifeq ($(XEN_BUILD_PE),y) =20 # Check if the linker produces fixups in PE by default -nr-fixups :=3D $(shell $(OBJDUMP) -p efi/check.efi | grep '^[[:blank:]]*re= loc[[:blank:]]*[0-9][[:blank:]].*DIR64$$' | wc -l) +nr-fixups :=3D $(shell $(OBJDUMP) -p $(obj)/efi/check.efi | grep '^[[:blan= k:]]*reloc[[:blank:]]*[0-9][[:blank:]].*DIR64$$' | wc -l) ifeq ($(nr-fixups),2) MKRELOC :=3D : relocs-dummy :=3D else -MKRELOC :=3D efi/mkreloc -relocs-dummy :=3D efi/relocs-dummy.o +MKRELOC :=3D $(obj)/efi/mkreloc +relocs-dummy :=3D $(obj)/efi/relocs-dummy.o # If the linker produced fixups but not precisely two of them, we need to # disable it doing so. But if it didn't produce any fixups, it also would= n't # recognize the option. @@ -160,27 +160,27 @@ endif # $(XEN_BUILD_PE) =20 endif # $(efi-y) =20 -$(TARGET)-syms: $(BASEDIR)/prelink.o xen.lds - $(LD) $(XEN_LDFLAGS) -T xen.lds -N $< $(build_id_linker) \ +$(TARGET)-syms: $(BASEDIR)/prelink.o $(obj)/xen.lds + $(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< $(build_id_linker) \ $(BASEDIR)/common/symbols-dummy.o -o $(@D)/.$(@F).0 $(NM) -pa --format=3Dsysv $(@D)/.$(@F).0 \ | $(BASEDIR)/tools/symbols $(all_symbols) --sysv --sort \ >$(@D)/.$(@F).0.S $(MAKE) -f $(BASEDIR)/Rules.mk $(@D)/.$(@F).0.o - $(LD) $(XEN_LDFLAGS) -T xen.lds -N $< $(build_id_linker) \ + $(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< $(build_id_linker) \ $(@D)/.$(@F).0.o -o $(@D)/.$(@F).1 $(NM) -pa --format=3Dsysv $(@D)/.$(@F).1 \ | $(BASEDIR)/tools/symbols $(all_symbols) --sysv --sort $(syms-warn-dup-= y) \ >$(@D)/.$(@F).1.S $(MAKE) -f $(BASEDIR)/Rules.mk $(@D)/.$(@F).1.o - $(LD) $(XEN_LDFLAGS) -T xen.lds -N $< $(build_id_linker) \ + $(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< $(build_id_linker) \ $(@D)/.$(@F).1.o -o $@ $(NM) -pa --format=3Dsysv $(@D)/$(@F) \ | $(BASEDIR)/tools/symbols --all-symbols --xensyms --sysv --sort \ >$(@D)/$(@F).map rm -f $(@D)/.$(@F).[0-9]* $(@D)/..$(@F).[0-9]* =20 -note.o: $(TARGET)-syms +$(obj)/note.o: $(TARGET)-syms $(OBJCOPY) -O binary --only-section=3D.note.gnu.build-id $< $@.bin $(OBJCOPY) -I binary -O elf64-x86-64 -B i386:x86-64 \ --rename-section=3D.data=3D.note.gnu.build-id -S $@.bin $@ @@ -199,23 +199,23 @@ ifdef SOURCE_DATE_EPOCH EFI_LDFLAGS +=3D --no-insert-timestamp endif =20 -$(TARGET).efi: VIRT_BASE =3D 0x$(shell $(NM) efi/relocs-dummy.o | sed -n '= s, A VIRT_START$$,,p') +$(TARGET).efi: VIRT_BASE =3D 0x$(shell $(NM) $(obj)/efi/relocs-dummy.o | s= ed -n 's, A VIRT_START$$,,p') ifeq ($(MKRELOC),:) $(TARGET).efi: ALT_BASE :=3D else -$(TARGET).efi: ALT_BASE =3D 0x$(shell $(NM) efi/relocs-dummy.o | sed -n 's= , A ALT_START$$,,p') +$(TARGET).efi: ALT_BASE =3D 0x$(shell $(NM) $(obj)/efi/relocs-dummy.o | se= d -n 's, A ALT_START$$,,p') endif =20 ifneq ($(build_id_linker),) ifeq ($(call ld-ver-build-id,$(LD) $(filter -m%,$(EFI_LDFLAGS))),y) CFLAGS-y +=3D -DBUILD_ID_EFI EFI_LDFLAGS +=3D $(build_id_linker) -note_file :=3D efi/buildid.o +note_file :=3D $(obj)/efi/buildid.o # NB: this must be the last input in the linker call, because inputs follo= wing # the -b option will all be treated as being in the specified format. note_file_option :=3D -b pe-x86-64 $(note_file) else -note_file :=3D note.o +note_file :=3D $(obj)/note.o endif else note_file :=3D @@ -224,25 +224,25 @@ note_file_option ?=3D $(note_file) =20 ifeq ($(XEN_BUILD_PE),y) extra-y +=3D efi.lds -$(TARGET).efi: $(BASEDIR)/prelink.o $(note_file) efi.lds efi/relocs-dummy.= o efi/mkreloc +$(TARGET).efi: $(BASEDIR)/prelink.o $(note_file) $(obj)/efi.lds $(obj)/efi= /relocs-dummy.o $(obj)/efi/mkreloc ifeq ($(CONFIG_DEBUG_INFO),y) $(if $(filter --strip-debug,$(EFI_LDFLAGS)),echo,:) "Will strip debug inf= o from $(@F)" endif $(foreach base, $(VIRT_BASE) $(ALT_BASE), \ - $(LD) $(call EFI_LDFLAGS,$(base)) -T efi.lds -N $< $(relocs-dum= my) \ + $(LD) $(call EFI_LDFLAGS,$(base)) -T $(obj)/efi.lds -N $< $(rel= ocs-dummy) \ $(BASEDIR)/common/symbols-dummy.o $(note_file_option) -o = $(@D)/.$(@F).$(base).0 &&) : $(MKRELOC) $(foreach base,$(VIRT_BASE) $(ALT_BASE),$(@D)/.$(@F).$(base).0= ) >$(@D)/.$(@F).0r.S $(NM) -pa --format=3Dsysv $(@D)/.$(@F).$(VIRT_BASE).0 \ | $(BASEDIR)/tools/symbols $(all_symbols) --sysv --sort >$(@D)/.$(@F).0s= .S $(MAKE) -f $(BASEDIR)/Rules.mk $(@D)/.$(@F).0r.o $(@D)/.$(@F).0s.o $(foreach base, $(VIRT_BASE) $(ALT_BASE), \ - $(LD) $(call EFI_LDFLAGS,$(base)) -T efi.lds -N $< \ + $(LD) $(call EFI_LDFLAGS,$(base)) -T $(obj)/efi.lds -N $< \ $(@D)/.$(@F).0r.o $(@D)/.$(@F).0s.o $(note_file_option) -= o $(@D)/.$(@F).$(base).1 &&) : $(MKRELOC) $(foreach base,$(VIRT_BASE) $(ALT_BASE),$(@D)/.$(@F).$(base).1= ) >$(@D)/.$(@F).1r.S $(NM) -pa --format=3Dsysv $(@D)/.$(@F).$(VIRT_BASE).1 \ | $(BASEDIR)/tools/symbols $(all_symbols) --sysv --sort >$(@D)/.$(@F).1s= .S $(MAKE) -f $(BASEDIR)/Rules.mk $(@D)/.$(@F).1r.o $(@D)/.$(@F).1s.o - $(LD) $(call EFI_LDFLAGS,$(VIRT_BASE)) -T efi.lds -N $< \ + $(LD) $(call EFI_LDFLAGS,$(VIRT_BASE)) -T $(obj)/efi.lds -N $< \ $(@D)/.$(@F).1r.o $(@D)/.$(@F).1s.o $(note_file_option) -= o $@ $(NM) -pa --format=3Dsysv $(@D)/$(@F) \ | $(BASEDIR)/tools/symbols --all-symbols --xensyms --sysv --sort >$(@D)/= $(@F).map @@ -253,15 +253,15 @@ $(TARGET).efi: FORCE echo '$(if $(filter y,$(XEN_BUILD_EFI)),xen.efi generation,EFI support) d= isabled' endif =20 -efi/buildid.o efi/relocs-dummy.o: $(BASEDIR)/arch/x86/efi/built_in.o -efi/buildid.o efi/relocs-dummy.o: ; +$(obj)/efi/buildid.o $(obj)/efi/relocs-dummy.o: $(BASEDIR)/arch/x86/efi/bu= ilt_in.o +$(obj)/efi/buildid.o $(obj)/efi/relocs-dummy.o: ; =20 .PHONY: include include: $(BASEDIR)/include/arch-x86/asm/asm-macros.h =20 -asm-macros.i: CFLAGS-y +=3D -D__ASSEMBLY__ -P +$(obj)/asm-macros.i: CFLAGS-y +=3D -D__ASSEMBLY__ -P =20 -$(BASEDIR)/include/arch-x86/asm/asm-macros.h: asm-macros.i Makefile +$(BASEDIR)/include/arch-x86/asm/asm-macros.h: $(obj)/asm-macros.i $(src)/M= akefile echo '#if 0' >$@.new echo '.if 0' >>$@.new echo '#endif' >>$@.new @@ -275,14 +275,14 @@ $(BASEDIR)/include/arch-x86/asm/asm-macros.h: asm-mac= ros.i Makefile echo '#endif' >>$@.new $(call move-if-changed,$@.new,$@) =20 -efi.lds: AFLAGS-y +=3D -DEFI -xen.lds efi.lds: xen.lds.S FORCE +$(obj)/efi.lds: AFLAGS-y +=3D -DEFI +$(obj)/xen.lds $(obj)/efi.lds: $(src)/xen.lds.S FORCE $(call if_changed,cpp_lds_S) =20 -boot/mkelf32: boot/mkelf32.c +$(obj)/boot/mkelf32: $(src)/boot/mkelf32.c $(HOSTCC) $(HOSTCFLAGS) -o $@ $< =20 -efi/mkreloc: efi/mkreloc.c +$(obj)/efi/mkreloc: $(src)/efi/mkreloc.c $(HOSTCC) $(HOSTCFLAGS) -g -o $@ $< =20 .PHONY: clean diff --git a/xen/arch/x86/boot/Makefile b/xen/arch/x86/boot/Makefile index 9b31bfcbfb8a..53d357489df2 100644 --- a/xen/arch/x86/boot/Makefile +++ b/xen/arch/x86/boot/Makefile @@ -1,8 +1,8 @@ obj-bin-y +=3D head.o =20 -DEFS_H_DEPS =3D defs.h $(BASEDIR)/include/xen/stdbool.h +DEFS_H_DEPS =3D $(src)/defs.h $(BASEDIR)/include/xen/stdbool.h =20 -CMDLINE_DEPS =3D $(DEFS_H_DEPS) video.h +CMDLINE_DEPS =3D $(DEFS_H_DEPS) $(src)/video.h =20 RELOC_DEPS =3D $(DEFS_H_DEPS) \ $(BASEDIR)/include/generated/autoconf.h \ @@ -11,10 +11,10 @@ RELOC_DEPS =3D $(DEFS_H_DEPS) \ $(BASEDIR)/include/xen/multiboot2.h \ $(BASEDIR)/include/public/arch-x86/hvm/start_info.h =20 -head.o: cmdline.S reloc.S +$(obj)/head.o: $(obj)/cmdline.S $(obj)/reloc.S =20 -cmdline.S: cmdline.c $(CMDLINE_DEPS) - $(MAKE) -f build32.mk $@ CMDLINE_DEPS=3D"$(CMDLINE_DEPS)" +$(obj)/cmdline.S: $(src)/cmdline.c $(CMDLINE_DEPS) + $(MAKE) -f build32.mk -C $(obj) $(@F) CMDLINE_DEPS=3D"$(CMDLINE_DEPS)" =20 -reloc.S: reloc.c $(RELOC_DEPS) - $(MAKE) -f build32.mk $@ RELOC_DEPS=3D"$(RELOC_DEPS)" +$(obj)/reloc.S: $(src)/reloc.c $(RELOC_DEPS) + $(MAKE) -f build32.mk -C $(obj) $(@F) RELOC_DEPS=3D"$(RELOC_DEPS)" diff --git a/xen/arch/x86/efi/Makefile b/xen/arch/x86/efi/Makefile index 87b927ed865b..ac815f02cb5e 100644 --- a/xen/arch/x86/efi/Makefile +++ b/xen/arch/x86/efi/Makefile @@ -3,16 +3,16 @@ CFLAGS-y +=3D -fshort-wchar quiet_cmd_objcopy_o_ihex =3D OBJCOPY $@ cmd_objcopy_o_ihex =3D $(OBJCOPY) -I ihex -O binary $< $@ =20 -%.o: %.ihex FORCE +$(obj)/%.o: $(src)/%.ihex FORCE $(call if_changed,objcopy_o_ihex) =20 -boot.init.o: buildid.o +$(obj)/boot.init.o: $(obj)/buildid.o =20 EFIOBJ-y :=3D boot.init.o pe.init.o ebmalloc.o runtime.o EFIOBJ-$(CONFIG_COMPAT) +=3D compat.o =20 $(call cc-option-add,cflags-stack-boundary,CC,-mpreferred-stack-boundary= =3D4) -$(EFIOBJ-y): CFLAGS-stack-boundary :=3D $(cflags-stack-boundary) +$(addprefix $(obj)/,$(EFIOBJ-y)): CFLAGS-stack-boundary :=3D $(cflags-stac= k-boundary) =20 obj-y :=3D stub.o obj-$(XEN_BUILD_EFI) :=3D $(filter-out %.init.o,$(EFIOBJ-y)) diff --git a/xen/common/Makefile b/xen/common/Makefile index 93df3178b71f..0d5509583427 100644 --- a/xen/common/Makefile +++ b/xen/common/Makefile @@ -75,15 +75,15 @@ obj-$(CONFIG_NEEDS_LIBELF) +=3D libelf/ obj-$(CONFIG_HAS_DEVICE_TREE) +=3D libfdt/ =20 CONF_FILE :=3D $(if $(patsubst /%,,$(KCONFIG_CONFIG)),$(BASEDIR)/)$(KCONFI= G_CONFIG) -config.gz: $(CONF_FILE) +$(obj)/config.gz: $(CONF_FILE) gzip -n -c $< >$@ =20 -config_data.o: config.gz +$(obj)/config_data.o: $(obj)/config.gz =20 quiet_cmd_binfile =3D BINFILE $@ -cmd_binfile =3D $(SHELL) $< $@ config.gz xen_config_data +cmd_binfile =3D $(SHELL) $< $@ $(obj)/config.gz xen_config_data =20 -config_data.S: $(BASEDIR)/tools/binfile FORCE +$(obj)/config_data.S: $(BASEDIR)/tools/binfile FORCE $(call if_changed,binfile) targets +=3D config_data.S =20 diff --git a/xen/common/libelf/Makefile b/xen/common/libelf/Makefile index a92326c982e9..8a4522e4e141 100644 --- a/xen/common/libelf/Makefile +++ b/xen/common/libelf/Makefile @@ -7,10 +7,10 @@ OBJCOPYFLAGS :=3D $(foreach s,$(SECTIONS),--rename-sectio= n .$(s)=3D.init.$(s)) =20 CFLAGS-y +=3D -Wno-pointer-sign =20 -libelf.o: libelf-temp.o FORCE +$(obj)/libelf.o: $(obj)/libelf-temp.o FORCE $(call if_changed,objcopy) =20 -libelf-temp.o: $(libelf-objs) FORCE +$(obj)/libelf-temp.o: $(addprefix $(obj)/,$(libelf-objs)) FORCE $(call if_changed,ld) =20 extra-y +=3D libelf-temp.o $(libelf-objs) diff --git a/xen/common/libfdt/Makefile b/xen/common/libfdt/Makefile index 6bd207cf8ffa..6708af12e583 100644 --- a/xen/common/libfdt/Makefile +++ b/xen/common/libfdt/Makefile @@ -1,4 +1,4 @@ -include Makefile.libfdt +include $(src)/Makefile.libfdt =20 SECTIONS :=3D text data $(SPECIAL_DATA_SECTIONS) OBJCOPYFLAGS :=3D $(foreach s,$(SECTIONS),--rename-section .$(s)=3D.init.$= (s)) @@ -8,10 +8,10 @@ nocov-y +=3D libfdt.o =20 CFLAGS-y +=3D -I$(BASEDIR)/include/xen/libfdt/ =20 -libfdt.o: libfdt-temp.o FORCE +$(obj)/libfdt.o: $(obj)/libfdt-temp.o FORCE $(call if_changed,objcopy) =20 -libfdt-temp.o: $(LIBFDT_OBJS) FORCE +$(obj)/libfdt-temp.o: $(addprefix $(obj)/,$(LIBFDT_OBJS)) FORCE $(call if_changed,ld) =20 extra-y +=3D libfdt-temp.o $(LIBFDT_OBJS) diff --git a/xen/include/Makefile b/xen/include/Makefile index 9feb57545ef1..a969e76ddcad 100644 --- a/xen/include/Makefile +++ b/xen/include/Makefile @@ -39,57 +39,57 @@ cppflags-$(CONFIG_X86) +=3D -m32 =20 endif =20 -public-$(CONFIG_X86) :=3D $(wildcard public/arch-x86/*.h public/arch-x86/*= /*.h) -public-$(CONFIG_ARM) :=3D $(wildcard public/arch-arm/*.h public/arch-arm/*= /*.h) +public-$(CONFIG_X86) :=3D $(wildcard $(src)/public/arch-x86/*.h $(src)/pub= lic/arch-x86/*/*.h) +public-$(CONFIG_ARM) :=3D $(wildcard $(src)/public/arch-arm/*.h $(src)/pub= lic/arch-arm/*/*.h) =20 .PHONY: all -all: $(headers-y) +all: $(addprefix $(obj)/,$(headers-y)) =20 -compat/%.h: compat/%.i $(BASEDIR)/tools/compat-build-header.py - $(PYTHON) $(BASEDIR)/tools/compat-build-header.py <$< $@ >>$@.new; \ +$(obj)/compat/%.h: $(obj)/compat/%.i $(BASEDIR)/tools/compat-build-header.= py + $(PYTHON) $(BASEDIR)/tools/compat-build-header.py <$< $(patsubst $(obj)/%= ,%,$@) >>$@.new; \ mv -f $@.new $@ =20 -compat/%.i: compat/%.c Makefile +$(obj)/compat/%.i: $(obj)/compat/%.c $(src)/Makefile $(CPP) $(filter-out -Wa$(comma)% -include %/include/xen/config.h,$(XEN_CF= LAGS)) $(cppflags-y) -o $@ $< =20 -compat/%.c: public/%.h xlat.lst $(BASEDIR)/tools/compat-build-source.py +$(obj)/compat/%.c: $(src)/public/%.h $(src)/xlat.lst $(BASEDIR)/tools/comp= at-build-source.py mkdir -p $(@D) - $(PYTHON) $(BASEDIR)/tools/compat-build-source.py xlat.lst <$< >$@.new + $(PYTHON) $(BASEDIR)/tools/compat-build-source.py $(src)/xlat.lst <$< >$@= .new mv -f $@.new $@ =20 -compat/.xlat/%.h: compat/%.h compat/.xlat/%.lst $(BASEDIR)/tools/get-field= s.sh Makefile +$(obj)/compat/.xlat/%.h: $(obj)/compat/%.h $(obj)/compat/.xlat/%.lst $(BAS= EDIR)/tools/get-fields.sh $(src)/Makefile export PYTHON=3D$(PYTHON); \ while read what name; do \ $(SHELL) $(BASEDIR)/tools/get-fields.sh "$$what" compat_$$name $< || exi= t $$?; \ done <$(patsubst compat/%,compat/.xlat/%,$(basename $<)).lst >$@.new mv -f $@.new $@ =20 -.PRECIOUS: compat/.xlat/%.lst -compat/.xlat/%.lst: xlat.lst Makefile +.PRECIOUS: $(obj)/compat/.xlat/%.lst +$(obj)/compat/.xlat/%.lst: $(src)/xlat.lst $(src)/Makefile mkdir -p $(@D) grep -v '^[[:blank:]]*#' $< | sed -ne 's,@arch@,$(compat-arch-y),g' -re '= s,[[:blank:]]+$*\.h[[:blank:]]*$$,,p' >$@.new $(call move-if-changed,$@.new,$@) =20 -xlat-y :=3D $(shell sed -ne 's,@arch@,$(compat-arch-y),g' -re 's,^[?!][[:b= lank:]]+[^[:blank:]]+[[:blank:]]+,,p' xlat.lst | uniq) +xlat-y :=3D $(shell sed -ne 's,@arch@,$(compat-arch-y),g' -re 's,^[?!][[:b= lank:]]+[^[:blank:]]+[[:blank:]]+,,p' $(src)/xlat.lst | uniq) xlat-y :=3D $(filter $(patsubst compat/%,%,$(headers-y)),$(xlat-y)) =20 -compat/xlat.h: $(addprefix compat/.xlat/,$(xlat-y)) config/auto.conf Makef= ile +$(obj)/compat/xlat.h: $(addprefix $(obj)/compat/.xlat/,$(xlat-y)) $(obj)/c= onfig/auto.conf $(src)/Makefile cat $(filter %.h,$^) >$@.new mv -f $@.new $@ =20 ifeq ($(XEN_TARGET_ARCH),$(XEN_COMPILE_ARCH)) =20 -all: headers.chk headers99.chk headers++.chk +all: $(obj)/headers.chk $(obj)/headers99.chk $(obj)/headers++.chk =20 -PUBLIC_HEADERS :=3D $(filter-out public/arch-% public/dom0_ops.h, $(wildca= rd public/*.h public/*/*.h) $(public-y)) +PUBLIC_HEADERS :=3D $(filter-out $(src)/public/arch-% $(src)/public/dom0_o= ps.h, $(wildcard $(src)/public/*.h $(src)/public/*/*.h) $(public-y)) =20 -PUBLIC_C99_HEADERS :=3D public/io/9pfs.h public/io/pvcalls.h -PUBLIC_ANSI_HEADERS :=3D $(filter-out public/%ctl.h public/xsm/% public/%h= vm/save.h $(PUBLIC_C99_HEADERS), $(PUBLIC_HEADERS)) +PUBLIC_C99_HEADERS :=3D $(src)/public/io/9pfs.h $(src)/public/io/pvcalls.h +PUBLIC_ANSI_HEADERS :=3D $(filter-out $(src)/public/%ctl.h $(src)/public/x= sm/% $(src)/public/%hvm/save.h $(PUBLIC_C99_HEADERS), $(PUBLIC_HEADERS)) =20 public/io/9pfs.h-prereq :=3D string public/io/pvcalls.h-prereq :=3D string =20 -headers.chk: $(PUBLIC_ANSI_HEADERS) Makefile +$(obj)/headers.chk: $(PUBLIC_ANSI_HEADERS) $(src)/Makefile for i in $(filter %.h,$^); do \ $(CC) -x c -ansi -Wall -Werror -include stdint.h \ -S -o /dev/null $$i || exit 1; \ @@ -97,7 +97,7 @@ headers.chk: $(PUBLIC_ANSI_HEADERS) Makefile done >$@.new mv $@.new $@ =20 -headers99.chk: $(PUBLIC_C99_HEADERS) Makefile +$(obj)/headers99.chk: $(PUBLIC_C99_HEADERS) $(src)/Makefile rm -f $@.new $(foreach i, $(filter %.h,$^), \ echo "#include "\"$(i)\" \ @@ -107,7 +107,7 @@ headers99.chk: $(PUBLIC_C99_HEADERS) Makefile || exit $$?; echo $(i) >> $@.new;) mv $@.new $@ =20 -headers++.chk: $(PUBLIC_HEADERS) Makefile +$(obj)/headers++.chk: $(PUBLIC_HEADERS) $(src)/Makefile rm -f $@.new if ! $(CXX) -v >/dev/null 2>&1; then \ touch $@.new; \ @@ -116,7 +116,7 @@ headers++.chk: $(PUBLIC_HEADERS) Makefile $(foreach i, $(filter %.h,$^), \ echo "#include "\"$(i)\" \ | $(CXX) -x c++ -std=3Dgnu++98 -Wall -Werror -D__XEN_TOOLS__ \ - -include stdint.h -include public/xen.h \ + -include stdint.h -include $(src)/public/xen.h \ $(foreach j, $($(i)-prereq), -include c$(j)) -S -o /dev/null - \ || exit $$?; echo $(i) >> $@.new;) mv $@.new $@ @@ -126,7 +126,7 @@ endif ifeq ($(XEN_TARGET_ARCH),x86_64) .PHONY: lib-x86-all lib-x86-all: - $(MAKE) -C xen/lib/x86 all + $(MAKE) -C $(obj)/xen/lib/x86 all =20 all: lib-x86-all endif diff --git a/xen/scripts/Makefile.clean b/xen/scripts/Makefile.clean index b6df9e861e6e..36b7e7e92f93 100644 --- a/xen/scripts/Makefile.clean +++ b/xen/scripts/Makefile.clean @@ -3,11 +3,14 @@ # Cleaning up # =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 +obj :=3D . +src :=3D $(obj) + clean:: =20 include $(BASEDIR)/scripts/Kbuild.include =20 -include Makefile +include $(src)/Makefile =20 # Figure out what we need to clean from the various variables # =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D diff --git a/xen/xsm/flask/Makefile b/xen/xsm/flask/Makefile index 0ad15cb16606..3ea726d66f8b 100644 --- a/xen/xsm/flask/Makefile +++ b/xen/xsm/flask/Makefile @@ -4,48 +4,48 @@ obj-y +=3D flask_op.o =20 obj-y +=3D ss/ =20 -CFLAGS-y +=3D -I./include +CFLAGS-y +=3D -I$(obj)/include =20 AWK =3D awk =20 -FLASK_H_DEPEND =3D policy/security_classes policy/initial_sids -AV_H_DEPEND =3D policy/access_vectors +FLASK_H_DEPEND :=3D $(addprefix $(src)/policy/,security_classes initial_si= ds) +AV_H_DEPEND =3D $(src)/policy/access_vectors =20 -FLASK_H_FILES =3D include/flask.h include/class_to_string.h include/initia= l_sid_to_string.h -AV_H_FILES =3D include/av_perm_to_string.h include/av_permissions.h -ALL_H_FILES =3D $(FLASK_H_FILES) $(AV_H_FILES) +FLASK_H_FILES :=3D flask.h class_to_string.h initial_sid_to_string.h +AV_H_FILES :=3D av_perm_to_string.h av_permissions.h +ALL_H_FILES :=3D $(addprefix include/,$(FLASK_H_FILES) $(AV_H_FILES)) =20 -$(obj-y) ss/built_in.o: $(ALL_H_FILES) +$(addprefix $(obj)/,$(obj-y)) $(obj)/ss/built_in.o: $(addprefix $(obj)/,$(= ALL_H_FILES)) extra-y +=3D $(ALL_H_FILES) =20 -mkflask :=3D policy/mkflask.sh +mkflask :=3D $(src)/policy/mkflask.sh quiet_cmd_mkflask =3D MKFLASK $@ -cmd_mkflask =3D $(SHELL) $(mkflask) $(AWK) include $(FLASK_H_DEPEND) +cmd_mkflask =3D $(SHELL) $(mkflask) $(AWK) $(obj)/include $(FLASK_H_DEPEND) =20 -$(subst include/,%/,$(FLASK_H_FILES)): $(FLASK_H_DEPEND) $(mkflask) FORCE +$(addprefix $(obj)/%/,$(FLASK_H_FILES)): $(FLASK_H_DEPEND) $(mkflask) FORCE $(call if_changed,mkflask) =20 -mkaccess :=3D policy/mkaccess_vector.sh +mkaccess :=3D $(src)/policy/mkaccess_vector.sh quiet_cmd_mkaccess =3D MKACCESS VECTOR $@ -cmd_mkaccess =3D $(SHELL) $(mkaccess) $(AWK) $(AV_H_DEPEND) +cmd_mkaccess =3D $(SHELL) $(mkaccess) $(AWK) $(obj)/include $(AV_H_DEPEND) =20 -$(subst include/,%/,$(AV_H_FILES)): $(AV_H_DEPEND) $(mkaccess) FORCE +$(addprefix $(obj)/%/,$(AV_H_FILES)): $(AV_H_DEPEND) $(mkaccess) FORCE $(call if_changed,mkaccess) =20 obj-bin-$(CONFIG_XSM_FLASK_POLICY) +=3D flask-policy.o -flask-policy.o: policy.bin +$(obj)/flask-policy.o: $(obj)/policy.bin =20 quiet_cmd_binfile =3D BINFILE $@ -cmd_binfile =3D $(SHELL) $< -i $@ policy.bin xsm_flask_init_policy +cmd_binfile =3D $(SHELL) $< -i $@ $(obj)/policy.bin xsm_flask_init_policy =20 -flask-policy.S: $(BASEDIR)/tools/binfile FORCE +$(obj)/flask-policy.S: $(BASEDIR)/tools/binfile FORCE $(call if_changed,binfile) targets +=3D flask-policy.S =20 FLASK_BUILD_DIR :=3D $(CURDIR) POLICY_SRC :=3D $(FLASK_BUILD_DIR)/xenpolicy-$(XEN_FULLVERSION) =20 -policy.bin: FORCE +$(obj)/policy.bin: FORCE $(MAKE) -f $(XEN_ROOT)/tools/flask/policy/Makefile.common -C $(XEN_ROOT)/= tools/flask/policy FLASK_BUILD_DIR=3D$(FLASK_BUILD_DIR) cmp -s $(POLICY_SRC) $@ || cp $(POLICY_SRC) $@ =20 diff --git a/xen/xsm/flask/policy/mkaccess_vector.sh b/xen/xsm/flask/policy= /mkaccess_vector.sh index 942ede4713f1..ad9772193bff 100755 --- a/xen/xsm/flask/policy/mkaccess_vector.sh +++ b/xen/xsm/flask/policy/mkaccess_vector.sh @@ -8,9 +8,12 @@ set -e awk=3D$1 shift =20 +output_dir=3D$1 +shift + # output files -av_permissions=3D"include/av_permissions.h" -av_perm_to_string=3D"include/av_perm_to_string.h" +av_permissions=3D"$output_dir/av_permissions.h" +av_perm_to_string=3D"$output_dir/av_perm_to_string.h" =20 cat $* | $awk " BEGIN { --=20 Anthony PERARD From nobody Tue Apr 30 03:23:41 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1625149317; cv=none; d=zohomail.com; s=zohoarc; b=KZh9DwnxarrsjiqsbIglsEpusVhdtNuyEhK0TiPi0dcMlribEJXFeI69vCvlgas4EXT4LF/NUTcRzkcHu7poxB4xgx/D7GTyeUrHH0z9Yqoa1sycgovR29jVAXlTdIbHIZOE1sReGdoD+BxJ+/jtaMNn/D+RrpDzzGRo5LkB6Cc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1625149317; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=4QsVSlX8ON6itK1GNwYx0yVVnmKJRkzTMc4g9/2I4l0=; b=fJB9MzybNU3A27ydNE3yMLMeFZWmz0wyeQjJsd8Cc3/Gxh7CkBsr8G4SnlSb+IJTm+XbbF9+FxaMxCtZKflDj7wO4L3S+suKHj40QIfmzEudndUKvfeCYGNzWX9IFD4J4ub3bnS1dHDtR0TiTN9ek7D2XBH1iDxlbryaeuh9H3g= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1625149317346384.8157754900524; Thu, 1 Jul 2021 07:21:57 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.148782.275064 (Exim 4.92) (envelope-from ) id 1lyxZX-0002cM-4A; Thu, 01 Jul 2021 14:21:43 +0000 Received: by outflank-mailman (output) from mailman id 148782.275064; Thu, 01 Jul 2021 14:21:43 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lyxZW-0002aP-Ps; Thu, 01 Jul 2021 14:21:42 +0000 Received: by outflank-mailman (input) for mailman id 148782; Thu, 01 Jul 2021 14:21:40 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lyxQ0-0005F9-LG for xen-devel@lists.xenproject.org; Thu, 01 Jul 2021 14:11:52 +0000 Received: from esa6.hc3370-68.iphmx.com (unknown [216.71.155.175]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 2bdb2267-da76-11eb-8328-12813bfff9fa; Thu, 01 Jul 2021 14:11:04 +0000 (UTC) X-Outflank-Mailman: Message body and most headers restored to incoming version 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" X-Inumbo-ID: 2bdb2267-da76-11eb-8328-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1625148664; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=L4z28cvrDDLSI9snpUNcl7132wPxxWZfLbL6aTtX99c=; b=ifqFwcjzosPIACXs41EiqBd9MOlWyHRkIaX06IdoUEehh31yvKh2+58C wEj+XOtP0JgQ/EH5eNf7yVtVlHLoQ79up2CgVX95lgl7eYSMNm39ojmaM y5OCiPOXmhm0hlsHziT+5x5/Xf3XrgtwRaCkKjfVVefpgYSiAeut8p9aj M=; Authentication-Results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: TtXDA0ONg0zB4imPwD6CLtxyuHHm1I96tSnPRl398FpKbpk7Af2z1y8E2fAHku/RucW6k0kY3P S1rBcaLI/FSNaTMFtuAVQB/EAjHR+qmS1/nA+RJwGPHyYU56m+9Vn7xcbpaUpf2emxv8VRA7Jf tMc4UbIgXOAvigD0AnbxPxP8KDyMAc1IEuq2Yw41MlM1catRC55unN1ikPQXMSlGzB54i1p1a8 rtR/5DL6F9vvHOvTYMG/zBucORtPOF1sMcyyHddy/wdX1QI88ZStPqm1/PJbqVO8DRI+g12lBf A04= X-SBRS: 5.1 X-MesageID: 47446882 X-Ironport-Server: esa6.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:vO3cIKx73XAkVg1w2ma1KrPxu+skLtp133Aq2lEZdPULSKKlfp GV88jziyWZtN9IYgBcpTiBUJPwJE80hqQFnbX5XI3SEDUO11HYVb2KgbGSoAEIXheOjNK1tp 0QPJSWaueAdWSS5PySiGLTfrdB/DDEytHSuQ639QY1cegAUdAF0+4NMHf8LqQAfnggOXNWLu v/2uN34x6bPVgHZMWyAXcIG8LZocfQqZ7gaRkaQzY69Qinl1qTmfDHOind+i1bfyJEwL8k/2 SAuRf+/L+fv/ayzQKZ/3PP7q5RhMDqxrJ4dY2xY4kuW3XRYzSTFcZcso65zXUISSaUmRIXee z30lQd1gJImjTsly+O0F3QMkLboUkTAjfZuCGlaD3Y0JTErL5RMbsbuWsRSGqp12Mw+N57y6 5FxGSfqt5eCg7Bhj3045zSWwhtjVfcmwtorQc/tQ0XbWIlUs4YkWXfxjIgLL4QWCbhrIw3Gu hnC8/RoP5QbFOBdnjc+m1i2salUHg/FgqPBhFqgL3Z7xFG2HRii0cIzs0WmXkNsJo7Vplf/u zBdqBljqtHQMMaZb90QO0BXcy0AGrQRg+kChPZHb0mLtBwB5vpke+D3FwY3pDYRHU49upEpH 2aaiIpiYcbQTOdNfGz X-IronPort-AV: E=Sophos;i="5.83,314,1616472000"; d="scan'208";a="47446882" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Ian Jackson" , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu , Konrad Rzeszutek Wilk , Ross Lagerwall Subject: [XEN PATCH v6 28/31] build: rework test/livepatch/Makefile Date: Thu, 1 Jul 2021 15:10:08 +0100 Message-ID: <20210701141011.785641-29-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210701141011.785641-1-anthony.perard@citrix.com> References: <20210701141011.785641-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) Content-Type: text/plain; charset="utf-8" This rework the livepatch/Makefile to make it less repetitive and make use of the facilities. All the targets to be built are now listed in $(extra-y) which will allow Rules.mk to build them without the need of a local target in a future patch. There are some changes/fixes in this patch: - when "xen-syms" is used for a target, it is added to the dependency list of the target, which allow to rebuild the target when xen-syms changes. But if "xen-syms" is missing, make simply fails. - modinfo.o wasn't removing it's $@.bin file like the other targets, this is now done. - The command to build *.livepatch targets as been fixed to use $(XEN_LDFLAGS) rather than just $(LDFLAGS) which is a fallout from 2740d96efdd3 ("xen/build: have the root Makefile generates the CFLAGS") make will findout the dependencies of the *.livepatch files and thus what to built by "looking" at the objects listed in the *-objs variables. The actual dependencies is generated by the new "multi_depend" macro. "$(targets)" needs to be updated with the objects listed in the different *-objs variables to allow make to load the .*.cmd dependency files. This patch copies the macro "multi_depend" from Linux 5.12. Signed-off-by: Anthony PERARD --- xen/scripts/Kbuild.include | 9 ++ xen/test/livepatch/Makefile | 213 ++++++++++++++---------------------- 2 files changed, 91 insertions(+), 131 deletions(-) diff --git a/xen/scripts/Kbuild.include b/xen/scripts/Kbuild.include index 5fe13a7c5abd..7cb55b181dcb 100644 --- a/xen/scripts/Kbuild.include +++ b/xen/scripts/Kbuild.include @@ -199,3 +199,12 @@ why =3D = \ =20 echo-why =3D $(call escsq, $(strip $(why))) endif + +# Useful for describing the dependency of composite objects +# Usage: +# $(call multi_depend, multi_used_targets, suffix_to_remove, suffix_to_a= dd) +define multi_depend +$(foreach m, $(notdir $1), \ + $(eval $(obj)/$m: \ + $(addprefix $(obj)/, $(foreach s, $3, $($(m:%$(strip $2)=3D%$(s))))))) +endef diff --git a/xen/test/livepatch/Makefile b/xen/test/livepatch/Makefile index 148dddb90473..e59245323e92 100644 --- a/xen/test/livepatch/Makefile +++ b/xen/test/livepatch/Makefile @@ -12,81 +12,29 @@ CODE_ADDR=3D$(shell nm --defined $(1) | grep $(2) | awk= '{print "0x"$$1}') CODE_SZ=3D$(shell nm --defined -S $(1) | grep $(2) | awk '{ print "0x"$$2}= ') =20 .PHONY: default - -LIVEPATCH :=3D xen_hello_world.livepatch -LIVEPATCH_BYE :=3D xen_bye_world.livepatch -LIVEPATCH_REPLACE :=3D xen_replace_world.livepatch -LIVEPATCH_NOP :=3D xen_nop.livepatch -LIVEPATCH_NO_XEN_BUILDID :=3D xen_no_xen_buildid.livepatch -LIVEPATCH_PREPOST_HOOKS :=3D xen_prepost_hooks.livepatch -LIVEPATCH_PREPOST_HOOKS_FAIL :=3D xen_prepost_hooks_fail.livepatch -LIVEPATCH_ACTION_HOOKS :=3D xen_action_hooks.livepatch -LIVEPATCH_ACTION_HOOKS_NOFUNC :=3D xen_action_hooks_nofunc.livepatch -LIVEPATCH_ACTION_HOOKS_MARKER:=3D xen_action_hooks_marker.livepatch -LIVEPATCH_ACTION_HOOKS_NOAPPLY:=3D xen_action_hooks_noapply.livepatch -LIVEPATCH_ACTION_HOOKS_NOREVERT:=3D xen_action_hooks_norevert.livepatch -LIVEPATCH_EXPECTATIONS:=3D xen_expectations.livepatch -LIVEPATCH_EXPECTATIONS_FAIL:=3D xen_expectations_fail.livepatch - -LIVEPATCHES +=3D $(LIVEPATCH) -LIVEPATCHES +=3D $(LIVEPATCH_BYE) -LIVEPATCHES +=3D $(LIVEPATCH_REPLACE) -LIVEPATCHES +=3D $(LIVEPATCH_NOP) -LIVEPATCHES +=3D $(LIVEPATCH_NO_XEN_BUILDID) -LIVEPATCHES +=3D $(LIVEPATCH_PREPOST_HOOKS) -LIVEPATCHES +=3D $(LIVEPATCH_PREPOST_HOOKS_FAIL) -LIVEPATCHES +=3D $(LIVEPATCH_ACTION_HOOKS) -LIVEPATCHES +=3D $(LIVEPATCH_ACTION_HOOKS_NOFUNC) -LIVEPATCHES +=3D $(LIVEPATCH_ACTION_HOOKS_MARKER) -LIVEPATCHES +=3D $(LIVEPATCH_ACTION_HOOKS_NOAPPLY) -LIVEPATCHES +=3D $(LIVEPATCH_ACTION_HOOKS_NOREVERT) -LIVEPATCHES +=3D $(LIVEPATCH_EXPECTATIONS) -LIVEPATCHES +=3D $(LIVEPATCH_EXPECTATIONS_FAIL) - -LIVEPATCH_DEBUG_DIR ?=3D $(DEBUG_DIR)/xen-livepatch - build default: livepatch =20 -install: livepatch - $(INSTALL_DIR) $(DESTDIR)$(LIVEPATCH_DEBUG_DIR) - $(INSTALL_DATA) $(LIVEPATCHES) $(DESTDIR)$(LIVEPATCH_DEBUG_DIR) - -uninstall: - cd $(DESTDIR)$(LIVEPATCH_DEBUG_DIR) && rm -f $(LIVEPATCHES) - -.PHONY: clean -clean:: - rm -f *.o .*.o.d *.livepatch config.h expect_config.h +extra-y +=3D xen_hello_world.livepatch +xen_hello_world-objs :=3D xen_hello_world_func.o xen_hello_world.o note.o = xen_note.o modinfo.o +$(obj)/xen_hello_world.o: $(obj)/config.h =20 # # To compute these values we need the binary files: xen-syms # and xen_hello_world_func.o to be already compiled. # -.PHONY: config.h -config.h: OLD_CODE_SZ=3D$(call CODE_SZ,$(BASEDIR)/xen-syms,xen_extra_versi= on) -config.h: NEW_CODE_SZ=3D$(call CODE_SZ,$<,xen_hello_world) -config.h: MINOR_VERSION_SZ=3D$(call CODE_SZ,$(BASEDIR)/xen-syms,xen_minor_= version) -config.h: MINOR_VERSION_ADDR=3D$(call CODE_ADDR,$(BASEDIR)/xen-syms,xen_mi= nor_version) -config.h: xen_hello_world_func.o +$(obj)/config.h: $(obj)/xen_hello_world_func.o (set -e; \ - echo "#define NEW_CODE_SZ $(NEW_CODE_SZ)"; \ - echo "#define MINOR_VERSION_SZ $(MINOR_VERSION_SZ)"; \ - echo "#define MINOR_VERSION_ADDR $(MINOR_VERSION_ADDR)"; \ - echo "#define OLD_CODE_SZ $(OLD_CODE_SZ)") > $@ + echo "#define NEW_CODE_SZ $(call CODE_SZ,$<,xen_hello_world)"; \ + echo "#define MINOR_VERSION_SZ $(call CODE_SZ,$(BASEDIR)/xen-syms,xen_mi= nor_version)"; \ + echo "#define MINOR_VERSION_ADDR $(call CODE_ADDR,$(BASEDIR)/xen-syms,xe= n_minor_version)"; \ + echo "#define OLD_CODE_SZ $(call CODE_SZ,$(BASEDIR)/xen-syms,xen_extra_v= ersion)") > $@ =20 -xen_hello_world.o: config.h - -.PHONY: $(LIVEPATCH) -$(LIVEPATCH): xen_hello_world_func.o xen_hello_world.o note.o xen_note.o m= odinfo.o - $(LD) $(LDFLAGS) $(build_id_linker) -r -o $(LIVEPATCH) $^ - -.PHONY: modinfo.o -modinfo.o: +$(obj)/modinfo.o: (set -e; \ printf "LIVEPATCH_RULEZ\0") > $@.bin $(OBJCOPY) $(OBJCOPY_MAGIC) \ --rename-section=3D.data=3D.modinfo,alloc,load,readonly,data,contents= -S $@.bin $@ - #rm -f $@.bin + rm -f $@.bin =20 # # This target is only accessible if CONFIG_LIVEPATCH is defined, which @@ -97,9 +45,8 @@ modinfo.o: # not be built (it is for EFI builds), and that we do not have # the note.o.bin to muck with (as it gets deleted) # -.PHONY: note.o -note.o: - $(OBJCOPY) -O binary --only-section=3D.note.gnu.build-id $(BASEDIR)/xen-s= yms $@.bin +$(obj)/note.o: $(BASEDIR)/xen-syms + $(OBJCOPY) -O binary --only-section=3D.note.gnu.build-id $< $@.bin $(OBJCOPY) $(OBJCOPY_MAGIC) \ --rename-section=3D.data=3D.livepatch.depends,alloc,load,readonly,dat= a,contents -S $@.bin $@ rm -f $@.bin @@ -108,9 +55,8 @@ note.o: # Append .livepatch.xen_depends section # with Xen build-id derived from xen-syms. # -.PHONY: xen_note.o -xen_note.o: - $(OBJCOPY) -O binary --only-section=3D.note.gnu.build-id $(BASEDIR)/xen-s= yms $@.bin +$(obj)/xen_note.o: $(BASEDIR)/xen-syms + $(OBJCOPY) -O binary --only-section=3D.note.gnu.build-id $< $@.bin $(OBJCOPY) $(OBJCOPY_MAGIC) \ --rename-section=3D.data=3D.livepatch.xen_depends,alloc,load,readonly= ,data,contents -S $@.bin $@ rm -f $@.bin @@ -119,102 +65,107 @@ xen_note.o: # Extract the build-id of the xen_hello_world.livepatch # (which xen_bye_world will depend on). # -.PHONY: hello_world_note.o -hello_world_note.o: $(LIVEPATCH) - $(OBJCOPY) -O binary --only-section=3D.note.gnu.build-id $(LIVEPATCH) $@.= bin +$(obj)/hello_world_note.o: $(obj)/xen_hello_world.livepatch + $(OBJCOPY) -O binary --only-section=3D.note.gnu.build-id $< $@.bin $(OBJCOPY) $(OBJCOPY_MAGIC) \ --rename-section=3D.data=3D.livepatch.depends,alloc,load,readonly,dat= a,contents -S $@.bin $@ rm -f $@.bin =20 -xen_bye_world.o: config.h =20 -.PHONY: $(LIVEPATCH_BYE) -$(LIVEPATCH_BYE): xen_bye_world_func.o xen_bye_world.o hello_world_note.o = xen_note.o - $(LD) $(LDFLAGS) $(build_id_linker) -r -o $(LIVEPATCH_BYE) $^ +extra-y +=3D xen_bye_world.livepatch +xen_bye_world-objs :=3D xen_bye_world_func.o xen_bye_world.o hello_world_n= ote.o xen_note.o +$(obj)/xen_bye_world.o: $(obj)/config.h =20 -xen_replace_world.o: config.h =20 -.PHONY: $(LIVEPATCH_REPLACE) -$(LIVEPATCH_REPLACE): xen_replace_world_func.o xen_replace_world.o note.o = xen_note.o - $(LD) $(LDFLAGS) $(build_id_linker) -r -o $(LIVEPATCH_REPLACE) $^ +extra-y +=3D xen_replace_world.livepatch +xen_replace_world-objs :=3D xen_replace_world_func.o xen_replace_world.o n= ote.o xen_note.o +$(obj)/xen_replace_world.o: $(obj)/config.h =20 -xen_nop.o: config.h =20 -.PHONY: $(LIVEPATCH_NOP) -$(LIVEPATCH_NOP): xen_nop.o note.o xen_note.o - $(LD) $(LDFLAGS) $(build_id_linker) -r -o $(LIVEPATCH_NOP) $^ +extra-y +=3D xen_nop.livepatch +xen_nop-objs :=3D xen_nop.o note.o xen_note.o +$(obj)/xen_nop.o: $(obj)/config.h =20 # This one always fails upon upload, because it deliberately # does not have a .livepatch.xen_depends (xen_note.o) section. -xen_no_xen_buildid.o: config.h - -.PHONY: $(LIVEPATCH_NO_XEN_BUILDID) -$(LIVEPATCH_NO_XEN_BUILDID): xen_nop.o note.o - $(LD) $(LDFLAGS) $(build_id_linker) -r -o $(LIVEPATCH_NO_XEN_BUILDID) $^ +extra-y +=3D xen_no_xen_buildid.livepatch +xen_no_xen_buildid-objs :=3D xen_nop.o note.o =20 -xen_prepost_hooks.o: config.h +$(obj)/xen_prepost_hooks.o: $(obj)/config.h =20 -.PHONY: $(LIVEPATCH_PREPOST_HOOKS) -$(LIVEPATCH_PREPOST_HOOKS): xen_prepost_hooks.o xen_hello_world_func.o not= e.o xen_note.o - $(LD) $(LDFLAGS) $(build_id_linker) -r -o $(LIVEPATCH_PREPOST_HOOKS) $^ +extra-y +=3D xen_prepost_hooks.livepatch +xen_prepost_hooks-objs :=3D xen_prepost_hooks.o xen_hello_world_func.o not= e.o xen_note.o =20 -xen_prepost_hooks_fail.o: config.h +$(obj)/xen_prepost_hooks_fail.o: $(obj)/config.h =20 -.PHONY: $(LIVEPATCH_PREPOST_HOOKS_FAIL) -$(LIVEPATCH_PREPOST_HOOKS_FAIL): xen_prepost_hooks_fail.o xen_hello_world_= func.o note.o xen_note.o - $(LD) $(LDFLAGS) $(build_id_linker) -r -o $(LIVEPATCH_PREPOST_HOOKS_FAIL)= $^ +extra-y +=3D xen_prepost_hooks_fail.livepatch +xen_prepost_hooks_fail-objs :=3D xen_prepost_hooks_fail.o xen_hello_world_= func.o note.o xen_note.o =20 -xen_action_hooks.o: config.h +$(obj)/xen_action_hooks.o: $(obj)/config.h =20 -.PHONY: $(LIVEPATCH_ACTION_HOOKS) -$(LIVEPATCH_ACTION_HOOKS): xen_action_hooks.o xen_hello_world_func.o note.= o xen_note.o - $(LD) $(LDFLAGS) $(build_id_linker) -r -o $(LIVEPATCH_ACTION_HOOKS) $^ +extra-y +=3D xen_action_hooks.livepatch +xen_action_hooks-objs :=3D xen_action_hooks.o xen_hello_world_func.o note.= o xen_note.o =20 -xen_action_hooks_nofunc.o: config.h +$(obj)/xen_action_hooks_nofunc.o: $(obj)/config.h =20 -.PHONY: $(LIVEPATCH_ACTION_HOOKS_NOFUNC) -$(LIVEPATCH_ACTION_HOOKS_NOFUNC): xen_action_hooks_nofunc.o note.o xen_not= e.o - $(LD) $(LDFLAGS) $(build_id_linker) -r -o $(LIVEPATCH_ACTION_HOOKS_NOFUNC= ) $^ +extra-y +=3D xen_action_hooks_nofunc.livepatch +xen_action_hooks_nofunc-objs :=3D xen_action_hooks_nofunc.o note.o xen_not= e.o =20 -xen_action_hooks_marker.o: config.h +$(obj)/xen_action_hooks_marker.o: $(obj)/config.h =20 -.PHONY: $(LIVEPATCH_ACTION_HOOKS_MARKER) -$(LIVEPATCH_ACTION_HOOKS_MARKER): xen_action_hooks_marker.o xen_hello_worl= d_func.o note.o xen_note.o - $(LD) $(LDFLAGS) $(build_id_linker) -r -o $(LIVEPATCH_ACTION_HOOKS_MARKER= ) $^ +extra-y +=3D xen_action_hooks_marker.livepatch +xen_action_hooks_marker-objs :=3D xen_action_hooks_marker.o xen_hello_worl= d_func.o note.o xen_note.o =20 -xen_action_hooks_noapply.o: config.h +$(obj)/xen_action_hooks_noapply.o: $(obj)/config.h =20 -.PHONY: $(LIVEPATCH_ACTION_HOOKS_NOAPPLY) -$(LIVEPATCH_ACTION_HOOKS_NOAPPLY): xen_action_hooks_marker.o xen_hello_wor= ld_func.o note.o xen_note.o - $(LD) $(LDFLAGS) $(build_id_linker) -r -o $(LIVEPATCH_ACTION_HOOKS_NOAPPL= Y) $^ +extra-y +=3D xen_action_hooks_noapply.livepatch +xen_action_hooks_noapply-objs :=3D xen_action_hooks_marker.o xen_hello_wor= ld_func.o note.o xen_note.o =20 -xen_action_hooks_norevert.o: config.h +$(obj)/xen_action_hooks_norevert.o: $(obj)/config.h =20 -.PHONY: $(LIVEPATCH_ACTION_HOOKS_NOREVERT) -$(LIVEPATCH_ACTION_HOOKS_NOREVERT): xen_action_hooks_marker.o xen_hello_wo= rld_func.o note.o xen_note.o - $(LD) $(LDFLAGS) $(build_id_linker) -r -o $(LIVEPATCH_ACTION_HOOKS_NOREVE= RT) $^ +extra-y +=3D xen_action_hooks_norevert.livepatch +xen_action_hooks_norevert-objs :=3D xen_action_hooks_marker.o xen_hello_wo= rld_func.o note.o xen_note.o =20 EXPECT_BYTES_COUNT :=3D 8 CODE_GET_EXPECT=3D$(shell $(OBJDUMP) -d --insn-width=3D1 $(1) | sed -n -e = '/<'$(2)'>:$$/,/^$$/ p' | tail -n +2 | head -n $(EXPECT_BYTES_COUNT) | awk = '{$$0=3D$$2; printf "%s", substr($$0,length-1)}' | sed 's/.\{2\}/0x&,/g' | = sed 's/^/{/;s/,$$/}/g') -.PHONY: expect_config.h -expect_config.h: EXPECT_BYTES=3D$(call CODE_GET_EXPECT,$(BASEDIR)/xen-syms= ,xen_extra_version) -expect_config.h: +$(obj)/expect_config.h: $(BASEDIR)/xen-syms (set -e; \ - echo "#define EXPECT_BYTES $(EXPECT_BYTES)"; \ + echo "#define EXPECT_BYTES $(call CODE_GET_EXPECT,$<,xen_extra_version)"= ; \ echo "#define EXPECT_BYTES_COUNT $(EXPECT_BYTES_COUNT)") > $@ =20 -xen_expectations.o: expect_config.h +$(obj)/xen_expectations.o: $(obj)/expect_config.h =20 -.PHONY: $(LIVEPATCH_EXPECTATIONS) -$(LIVEPATCH_EXPECTATIONS): xen_expectations.o xen_hello_world_func.o note.= o xen_note.o - $(LD) $(LDFLAGS) $(build_id_linker) -r -o $(LIVEPATCH_EXPECTATIONS) $^ +extra-y +=3D xen_expectations.livepatch +xen_expectations-objs :=3D xen_expectations.o xen_hello_world_func.o note.= o xen_note.o =20 -.PHONY: $(LIVEPATCH_EXPECTATIONS_FAIL) -$(LIVEPATCH_EXPECTATIONS_FAIL): xen_expectations_fail.o xen_hello_world_fu= nc.o note.o xen_note.o - $(LD) $(LDFLAGS) $(build_id_linker) -r -o $(LIVEPATCH_EXPECTATIONS_FAIL) = $^ +extra-y +=3D xen_expectations_fail.livepatch +xen_expectations_fail-objs :=3D xen_expectations_fail.o xen_hello_world_fu= nc.o note.o xen_note.o + + +quiet_cmd_livepatch =3D LD $@ +cmd_livepatch =3D $(LD) $(XEN_LDFLAGS) $(build_id_linker) -r -o $@ $(real-= prereqs) + +$(obj)/%.livepatch: FORCE + $(call if_changed,livepatch) + +$(call multi_depend, $(filter %.livepatch,$(extra-y)), .livepatch, -objs) +targets +=3D $(sort $(foreach m,$(basename $(notdir $(filter %.livepatch,$= (extra-y)))), \ + $($(m)-objs))) + +LIVEPATCHES :=3D $(filter %.livepatch,$(extra-y)) + +LIVEPATCH_DEBUG_DIR ?=3D $(DEBUG_DIR)/xen-livepatch =20 .PHONY: livepatch -livepatch: $(LIVEPATCH) $(LIVEPATCH_BYE) $(LIVEPATCH_REPLACE) $(LIVEPATCH_= NOP) $(LIVEPATCH_NO_XEN_BUILDID) \ - $(LIVEPATCH_PREPOST_HOOKS) $(LIVEPATCH_PREPOST_HOOKS_FAIL) $(LI= VEPATCH_ACTION_HOOKS) \ - $(LIVEPATCH_ACTION_HOOKS_NOFUNC) $(LIVEPATCH_ACTION_HOOKS_MARKE= R) $(LIVEPATCH_ACTION_HOOKS_NOAPPLY) \ - $(LIVEPATCH_ACTION_HOOKS_NOREVERT) $(LIVEPATCH_EXPECTATIONS) $(= LIVEPATCH_EXPECTATIONS_FAIL) +livepatch: $(LIVEPATCHES) + +install: $(addprefix $(obj)/,$(LIVEPATCHES)) + $(INSTALL_DIR) $(DESTDIR)$(LIVEPATCH_DEBUG_DIR) + $(INSTALL_DATA) $(addprefix $(obj)/,$(LIVEPATCHES)) $(DESTDIR)$(LIVEPATCH= _DEBUG_DIR) + +uninstall: + cd $(DESTDIR)$(LIVEPATCH_DEBUG_DIR) && rm -f $(LIVEPATCHES) + +.PHONY: clean +clean:: + rm -f *.o .*.o.d *.livepatch config.h expect_config.h --=20 Anthony PERARD From nobody Tue Apr 30 03:23:41 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1625149318; cv=none; d=zohomail.com; s=zohoarc; b=I57yWafcvjlxVD7TdF386Tl2VICkcas6I57OSDQsTckJpLFRaZ44dgY0SinE1v9nNHRTtbncwdRxNYHBWMSGGRU/XWDaJ+pA6A44FUzUdOm5BDktyNAJccd06RJY5Q/8W2+qAp6xuBFsQfzhT36JcVcKn91GjmEFf/2nu7HdpaY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1625149318; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=LAc/zRNr2xGqUuIHt/DFB+AxMiXP0em4DyHewN4QTZc=; b=UMx5D6hs3C3YF/FrW1uQW4CV1oeGntz59uURWn1crFH5wsw1+ClPvAHHrpDoFDE+I33b3Rm4IJuCojSGDoF4IS4MhHI1RdZkNVMLOq1cHEI1YrN2WbYUL0v0kt4nCRYkR4lDMMiOvWE4O9UI5xSkSnbsoFjKyin8bGYTW5+Z6WA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1625149318313968.9762939869662; Thu, 1 Jul 2021 07:21:58 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.148771.275037 (Exim 4.92) (envelope-from ) id 1lyxZU-0001zi-NN; Thu, 01 Jul 2021 14:21:40 +0000 Received: by outflank-mailman (output) from mailman id 148771.275037; Thu, 01 Jul 2021 14:21:40 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lyxZU-0001zW-Jj; Thu, 01 Jul 2021 14:21:40 +0000 Received: by outflank-mailman (input) for mailman id 148771; Thu, 01 Jul 2021 14:21:38 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lyxQU-0005F9-Lo for xen-devel@lists.xenproject.org; Thu, 01 Jul 2021 14:12:22 +0000 Received: from esa5.hc3370-68.iphmx.com (unknown [216.71.155.168]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 2de16752-da76-11eb-8328-12813bfff9fa; Thu, 01 Jul 2021 14:11:08 +0000 (UTC) X-Outflank-Mailman: Message body and most headers restored to incoming version 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" X-Inumbo-ID: 2de16752-da76-11eb-8328-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1625148668; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=TiF+907ZnxR32g7xJeKX/Svu6O0iCgKs/yul2z4hMQ4=; b=CBuk5V9VccZamEJRTJymR4scMjHj2aHBEGnBFK1CV3SwhGe0CVVlznaM tMnVBtp6UQQsOx+sDgA9tjRz2JlIbGmQPggyF4+gN02Z0gcZ5eaKE2gEH 4bF2bG3KIZ+OLNmOPk+dTNHF61ZToPFEWpRHpcnLhB+vgslUUaAv5Azgv E=; Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: u+Xbk3Z39cB6nUXv0SAaMfHYUNdz/kdlSAuw+iemQtkxF3Ev3vKIJ+Vo9jqvmoOcBa2Oc1nFm3 sT/lZFhcqIxiIorpvbR3mvcEpzOB2seiMC8tD0yCU91aLbxCZGxHWBk1H30yQIpD1V4TgYJBuR NF58oOEGPFNOzEMMezFevA2hGyGi0okItpnwQtabOKIkSkKjomxpXK3BTsz/6jvhyC0HEW3qXK Zo3JAsMo6+8Zeb1nSaICus+kpeVysCAdZ+lvpCEFADZQ4ubiI7OfBl497DXr4EYmwY7uTG30Hm y4I= X-SBRS: 5.1 X-MesageID: 47093433 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:DOVDqq1EypBCfQJyd5Ir0AqjBHYkLtp133Aq2lEZdPU0SKGlfq GV7ZEmPHrP4gr5N0tOpTntAse9qBDnhPxICOsqXYtKNTOO0AeVxelZhrcKqAeQeBEWmNQ96U 9hGZIOcuEZDzJB/LvHCN/TKadd/DGFmprY+ts31x1WPGVXgzkL1XYANu6ceHcGIzVuNN4CO7 e3wNFInDakcWR/VLXBOpFUN9KzweEijfjdEGc7OyI= X-IronPort-AV: E=Sophos;i="5.83,314,1616472000"; d="scan'208";a="47093433" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Ian Jackson" , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu , Volodymyr Babchuk , Bob Eshleman , Alistair Francis , Connor Davis , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Konrad Rzeszutek Wilk , "Ross Lagerwall" , Daniel De Graaf , "Daniel P. Smith" Subject: [XEN PATCH v6 29/31] build: build everything from the root dir, use obj=$subdir Date: Thu, 1 Jul 2021 15:10:09 +0100 Message-ID: <20210701141011.785641-30-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210701141011.785641-1-anthony.perard@citrix.com> References: <20210701141011.785641-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) Content-Type: text/plain; charset="utf-8" A subdirectory is now built by setting "$(obj)" instead of changing directory. "$(obj)" should always be set when using "Rules.mk" and thus a shortcut "$(build)" is introduced and should be used. A new variable "$(need-builtin)" is introduce. It is to be used whenever a "built_in.o" is wanted from a subdirectory. "built_in.o" isn't the main target anymore, and thus only needs to depends on the objects that should be part of "built_in.o". Introduce $(srctree) and $(objtree) to replace $(BASEDIR) in cases a relative path is better. DEPS is updated as the existing macro to deal with it doesn't know about $(obj). There's some changes in "Rules.mk" which in addition to deal with "$(obj)" also make it's looks more like "Makefile.build" from Linux v5.12. test/Makefile doesn't need special handling in order to build everything under test/, Rules.mk will visit test/livepatch via $(subdir-y), thus "tests" "all" and "build" target are removed. "subtree-force-update" target isn't useful so it is removed as well. test/livepatch/Makefile doesn't need default target anymore, Rules.mk will build everything in $(extra-y) and thus all *.livepatch. Signed-off-by: Anthony PERARD Acked-by: Bob Eshleman --- xen/Makefile | 46 ++++++++----- xen/Rules.mk | 131 +++++++++++++++++++++++------------- xen/arch/arm/Makefile | 4 +- xen/arch/arm/arch.mk | 4 +- xen/arch/riscv/arch.mk | 3 +- xen/arch/x86/Makefile | 13 ++-- xen/arch/x86/Rules.mk | 4 +- xen/arch/x86/arch.mk | 10 +-- xen/arch/x86/boot/Makefile | 8 +-- xen/include/Makefile | 6 +- xen/scripts/Kbuild.include | 6 ++ xen/test/Makefile | 7 +- xen/test/livepatch/Makefile | 6 -- xen/xsm/flask/Makefile | 2 +- xen/xsm/flask/ss/Makefile | 2 +- 15 files changed, 151 insertions(+), 101 deletions(-) diff --git a/xen/Makefile b/xen/Makefile index 6aac68750b4d..71f098cd6374 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -20,6 +20,10 @@ export PYTHON ?=3D $(PYTHON_INTERPRETER) export BASEDIR :=3D $(CURDIR) export XEN_ROOT :=3D $(BASEDIR)/.. =20 +srctree :=3D . +objtree :=3D . +export srctree objtree + # Do not use make's built-in rules and variables MAKEFLAGS +=3D -rR =20 @@ -234,7 +238,7 @@ endif CFLAGS +=3D -nostdinc -fno-builtin -fno-common CFLAGS +=3D -Werror -Wredundant-decls -Wno-pointer-arith $(call cc-option-add,CFLAGS,CC,-Wvla) -CFLAGS +=3D -pipe -D__XEN__ -include $(BASEDIR)/include/xen/config.h +CFLAGS +=3D -pipe -D__XEN__ -include $(objtree)/include/xen/config.h CFLAGS-$(CONFIG_DEBUG_INFO) +=3D -g =20 ifneq ($(CONFIG_CC_IS_CLANG),y) @@ -295,7 +299,7 @@ endif # need-config .PHONY: build install uninstall clean distclean MAP build install uninstall debug clean distclean MAP:: ifneq ($(XEN_TARGET_ARCH),x86_32) - $(MAKE) -f Rules.mk _$@ + $(MAKE) $(build)=3D. _$@ else echo "*** Xen x86/32 target no longer supported!" endif @@ -335,10 +339,10 @@ _install: $(TARGET)$(CONFIG_XEN_INSTALL_SUFFIX) =20 .PHONY: tests tests: - $(MAKE) -f $(BASEDIR)/Rules.mk -C test tests + $(MAKE) $(build)=3Dtest .PHONY: install-tests install-tests: - $(MAKE) -f $(BASEDIR)/Rules.mk -C test install + $(MAKE) $(build)=3Dtest install =20 .PHONY: _uninstall _uninstall: D=3D$(DESTDIR) @@ -395,23 +399,26 @@ $(TARGET).gz: $(TARGET) PHONY +=3D prepare prepare: $(MAKE) -C tools - $(MAKE) -f $(BASEDIR)/Rules.mk include/xen/compile.h + $(MAKE) $(build)=3D. include/xen/compile.h [ -e arch/$(TARGET_ARCH)/efi ] && for f in $$(cd common/efi; echo *.[ch])= ; \ do test -r arch/$(TARGET_ARCH)/efi/$$f || \ ln -nsf ../../../common/efi/$$f arch/$(TARGET_ARCH)/efi/; \ done; \ true - $(MAKE) -f $(BASEDIR)/Rules.mk -C include - $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) include - $(MAKE) -f $(BASEDIR)/Rules.mk include/arch-$(TARGET_ARCH)/asm/asm-offset= s.h + $(MAKE) $(build)=3Dinclude all + $(MAKE) $(build)=3Darch/$(TARGET_ARCH) include + $(MAKE) $(build)=3D. include/arch-$(TARGET_ARCH)/asm/asm-offsets.h + +# The actual objects are generated when descending, +# make sure no implicit rule kicks in +$(sort $(ALL_OBJS) $(ALL_LIBS)): descend ; =20 -$(ALL_OBJS) $(ALL_LIBS): prepare +build-dirs :=3D $(patsubst %/built_in.o,%,$(filter %/built_in.o,$(ALL_OBJS= ) $(ALL_LIBS))) =20 -# head.o is built by descending into arch/arm/$(TARGET_SUBARCH), depends o= n the -# part of $(ALL_OBJS) that will eventually recurse into $(TARGET_SUBARCH)/= and -# build head.o -arch/arm/$(TARGET_SUBARCH)/head.o: arch/arm/built_in.o -arch/arm/$(TARGET_SUBARCH)/head.o: ; +PHONY +=3D descend $(build-dirs) +descend: $(build-dirs) +$(build-dirs): prepare + $(MAKE) $(build)=3D$@ need-builtin=3D1 =20 ifeq ($(CONFIG_LTO),y) # Gather all LTO objects together @@ -429,7 +436,7 @@ endif targets +=3D prelink.o =20 $(TARGET): prelink.o FORCE - $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) $@ + $(MAKE) $(build)=3Darch/$(TARGET_ARCH) $@ =20 quiet_cmd_banner =3D BANNER $@ define cmd_banner @@ -533,14 +540,17 @@ cscope: _MAP: $(NM) -n $(TARGET)-syms | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|= \(\.\.ng$$\)\|\(LASH[RL]DI\)' > System.map =20 +# Avoid those single target rules when Makefile is included by Rules.mk +ifndef obj %.o %.i %.s: %.c FORCE - $(MAKE) -f $(BASEDIR)/Rules.mk -C $(*D) $(@F) + $(MAKE) $(build)=3D$(*D) $(*D)/$(@F) =20 %.o %.s: %.S FORCE - $(MAKE) -f $(BASEDIR)/Rules.mk -C $(*D) $(@F) + $(MAKE) $(build)=3D$(*D) $(*D)/$(@F) =20 %/: FORCE - $(MAKE) -f $(BASEDIR)/Rules.mk -C $* built_in.o built_in_bin.o + $(MAKE) $(build)=3D$* need-builtin=3D1 +endif =20 .PHONY: cloc cloc: diff --git a/xen/Rules.mk b/xen/Rules.mk index 0f8d90844455..4b3abf0ea880 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -3,20 +3,27 @@ # Makefile and are consumed by Rules.mk # =20 -obj :=3D . src :=3D $(obj) =20 +PHONY :=3D __build +__build: + -include $(BASEDIR)/include/config/auto.conf =20 include $(XEN_ROOT)/Config.mk include $(BASEDIR)/scripts/Kbuild.include =20 +ifndef obj +$(warning kbuild: Makefile.build is included improperly) +endif =20 -TARGET :=3D $(BASEDIR)/xen +TARGET :=3D xen =20 # Initialise some variables +obj-y :=3D lib-y :=3D targets :=3D +subdir-y :=3D CFLAGS-y :=3D AFLAGS-y :=3D =20 @@ -47,27 +54,52 @@ cmd_ar =3D rm -f $@; $(AR) cr $@ $(real-prereqs) quiet_cmd_objcopy =3D OBJCOPY $@ cmd_objcopy =3D $(OBJCOPY) $(OBJCOPYFLAGS) $< $@ =20 -define gendep - ifneq ($(1),$(subst /,:,$(1))) - DEPS +=3D $(dir $(1)).$(notdir $(1)).d - endif -endef -$(foreach o,$(filter-out %/,$(obj-y) $(obj-bin-y) $(extra-y)),$(eval $(cal= l gendep,$(o)))) +# Figure out what we need to build from the various variables +# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D + +# Libraries are always collected in one lib file. +# Filter out objects already built-in +lib-y :=3D $(filter-out $(obj-y), $(sort $(lib-y))) + +# Subdirectories we need to descend into +subdir-y :=3D $(subdir-y) $(patsubst %/,%,$(filter %/, $(obj-y))) =20 # Handle objects in subdirs -# ------------------------------------------------------------------------= --- -# o if we encounter foo/ in $(obj-y), replace it by foo/built_in.o -# and add the directory to the list of dirs to descend into: $(subdir-y) -subdir-y :=3D $(subdir-y) $(filter %/, $(obj-y)) +# - if we encounter foo/ in $(obj-y), replace it by foo/built_in.o +ifdef need-builtin obj-y :=3D $(patsubst %/, %/built_in.o, $(obj-y)) +else +obj-y :=3D $(filter-out %/, $(obj-y)) +endif =20 -# $(subdir-obj-y) is the list of objects in $(obj-y) which uses dir/ to -# tell kbuild to descend -subdir-obj-y :=3D $(filter %/built_in.o, $(obj-y)) +# Add subdir path =20 -# Libraries are always collected in one lib file. -# Filter out objects already built-in -lib-y :=3D $(filter-out $(obj-y), $(sort $(lib-y))) +extra-y :=3D $(addprefix $(obj)/,$(extra-y)) +targets :=3D $(addprefix $(obj)/,$(targets)) +lib-y :=3D $(addprefix $(obj)/,$(lib-y)) +obj-y :=3D $(addprefix $(obj)/,$(obj-y)) +obj-bin-y :=3D $(addprefix $(obj)/,$(obj-bin-y)) +subdir-y :=3D $(addprefix $(obj)/,$(subdir-y)) + +# subdir-builtin may contain duplications. Use $(sort ...) +subdir-builtin :=3D $(sort $(filter %/built_in.o, $(obj-y))) + +targets-for-builtin :=3D $(extra-y) + +ifneq ($(strip $(lib-y)),) + targets-for-builtin +=3D $(obj)/lib.a +endif + +ifdef need-builtin + targets-for-builtin +=3D $(obj)/built_in.o + ifneq ($(strip $(obj-bin-y)),) + ifeq ($(CONFIG_LTO),y) + targets-for-builtin +=3D $(obj)/built_in_bin.o + endif + endif +endif + +targets +=3D $(targets-for-builtin) =20 $(filter %.init.o,$(obj-y) $(obj-bin-y) $(extra-y)): CFLAGS-y +=3D -DINIT_= SECTIONS_ONLY =20 @@ -119,29 +151,28 @@ quiet_cmd_cc_builtin =3D LD $@ cmd_cc_builtin =3D \ $(CC) $(XEN_CFLAGS) -c -x c /dev/null -o $@ =20 +# To build objects in subdirs, we need to descend into the directories +$(subdir-builtin): $(obj)/%/built_in.o: $(obj)/% ; + quiet_cmd_ld_builtin =3D LD $@ ifeq ($(CONFIG_LTO),y) cmd_ld_builtin =3D \ - $(LD_LTO) -r -o $@ $(filter $(obj-y),$(real-prereqs)) + $(LD_LTO) -r -o $@ $(real-prereqs) else cmd_ld_builtin =3D \ - $(LD) $(XEN_LDFLAGS) -r -o $@ $(filter $(obj-y),$(real-prereqs)) + $(LD) $(XEN_LDFLAGS) -r -o $@ $(real-prereqs) endif =20 -built_in.o: $(obj-y) $(if $(strip $(lib-y)),lib.a) $(extra-y) FORCE +$(obj)/built_in.o: $(obj-y) FORCE $(call if_changed,$(if $(strip $(obj-y)),ld_builtin,cc_builtin)) =20 -lib.a: $(lib-y) FORCE +$(obj)/lib.a: $(lib-y) FORCE $(call if_changed,ar) =20 -targets +=3D built_in.o -ifneq ($(strip $(lib-y)),) -targets +=3D lib.a -endif -targets +=3D $(filter-out $(subdir-obj-y), $(obj-y) $(lib-y)) $(extra-y) -targets +=3D $(MAKECMDGOALS) +targets +=3D $(filter-out $(subdir-builtin), $(obj-y)) +targets +=3D $(lib-y) $(MAKECMDGOALS) =20 -built_in_bin.o: $(obj-bin-y) $(extra-y) +$(obj)/built_in_bin.o: $(obj-bin-y) ifeq ($(strip $(obj-bin-y)),) $(CC) $(a_flags) -c -x assembler /dev/null -o $@ else @@ -152,21 +183,13 @@ endif PHONY +=3D FORCE FORCE: =20 -%/built_in.o %/lib.a: FORCE - $(MAKE) -f $(BASEDIR)/Rules.mk -C $* built_in.o - -%/built_in_bin.o: FORCE - $(MAKE) -f $(BASEDIR)/Rules.mk -C $* built_in_bin.o - -SRCPATH :=3D $(patsubst $(BASEDIR)/%,%,$(CURDIR)) - quiet_cmd_cc_o_c =3D CC $@ ifeq ($(CONFIG_ENFORCE_UNIQUE_SYMBOLS),y) cmd_cc_o_c =3D $(CC) $(c_flags) -c $< -o $(dot-target).tmp -MQ $@ ifeq ($(CONFIG_CC_IS_CLANG),y) - cmd_objcopy_fix_sym =3D $(OBJCOPY) --redefine-sym $<=3D$(SRCPATH)/= $< $(dot-target).tmp $@ + cmd_objcopy_fix_sym =3D $(OBJCOPY) --redefine-sym $( .lds quiet_cmd_cpp_lds_S =3D LDS $@ cmd_cpp_lds_S =3D $(CPP) -P $(call cpp_flags,$(a_flags)) -D__LINKER__ -MQ = $@ -o $@ $< =20 +targets :=3D $(filter-out $(PHONY), $(targets)) + # Add intermediate targets: # When building objects with specific suffix patterns, add intermediate # targets that the final targets are derived from. @@ -236,7 +261,18 @@ intermediate_targets =3D $(foreach sfx, $(2), \ # %.init.o <- %.o targets +=3D $(call intermediate_targets, .init.o, .o) =20 --include $(DEPS_INCLUDE) +# Build +# ------------------------------------------------------------------------= --- + +__build: $(targets-for-builtin) $(subdir-y) + @: + +# Descending +# ------------------------------------------------------------------------= --- + +PHONY +=3D $(subdir-y) +$(subdir-y): + $(Q)$(MAKE) $(build)=3D$@ need-builtin=3D$(if $(filter $@/built_in.o, $(s= ubdir-builtin)),1) =20 # Read all saved command lines and dependencies for the $(targets) we # may be building above, using $(if_changed{,_dep}). As an @@ -247,6 +283,9 @@ existing-targets :=3D $(wildcard $(sort $(targets))) =20 -include $(foreach f,$(existing-targets),$(dir $(f)).$(notdir $(f)).cmd) =20 +DEPS:=3D $(foreach f,$(existing-targets),$(dir $(f)).$(notdir $(f)).d) +-include $(DEPS_INCLUDE) + # Declare the contents of the PHONY variable as phony. We keep that # information in a variable so we can use it in if_changed and friends. .PHONY: $(PHONY) diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile index 9f9c73aa6c5d..a3204d22d17b 100644 --- a/xen/arch/arm/Makefile +++ b/xen/arch/arm/Makefile @@ -93,12 +93,12 @@ $(TARGET)-syms: $(BASEDIR)/prelink.o $(obj)/xen.lds $(BASEDIR)/common/symbols-dummy.o -o $(@D)/.$(@F).0 $(NM) -pa --format=3Dsysv $(@D)/.$(@F).0 \ | $(BASEDIR)/tools/symbols $(all_symbols) --sysv --sort >$(@D)/.$(@F).0.S - $(MAKE) -f $(BASEDIR)/Rules.mk $(@D)/.$(@F).0.o + $(MAKE) $(build)=3D$(@D) $(@D)/.$(@F).0.o $(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< \ $(@D)/.$(@F).0.o -o $(@D)/.$(@F).1 $(NM) -pa --format=3Dsysv $(@D)/.$(@F).1 \ | $(BASEDIR)/tools/symbols $(all_symbols) --sysv --sort >$(@D)/.$(@F).1.S - $(MAKE) -f $(BASEDIR)/Rules.mk $(@D)/.$(@F).1.o + $(MAKE) $(build)=3D$(@D) $(@D)/.$(@F).1.o $(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< $(build_id_linker) \ $(@D)/.$(@F).1.o -o $@ $(NM) -pa --format=3Dsysv $(@D)/$(@F) \ diff --git a/xen/arch/arm/arch.mk b/xen/arch/arm/arch.mk index 8a2b202f698e..0a6ae6c2fe60 100644 --- a/xen/arch/arm/arch.mk +++ b/xen/arch/arm/arch.mk @@ -1,8 +1,8 @@ ######################################## # arm-specific definitions =20 -CFLAGS +=3D -I$(BASEDIR)/include -CFLAGS +=3D -I$(BASEDIR)/include/arch-$(TARGET_ARCH) +CFLAGS +=3D -I$(srctree)/include +CFLAGS +=3D -I$(srctree)/include/arch-$(TARGET_ARCH) =20 $(call cc-options-add,CFLAGS,CC,$(EMBEDDED_EXTRA_CFLAGS)) $(call cc-option-add,CFLAGS,CC,-Wnested-externs) diff --git a/xen/arch/riscv/arch.mk b/xen/arch/riscv/arch.mk index 53dadb897591..8aa2206184fa 100644 --- a/xen/arch/riscv/arch.mk +++ b/xen/arch/riscv/arch.mk @@ -11,4 +11,5 @@ riscv-march-$(CONFIG_RISCV_ISA_C) :=3D $(riscv-marc= h-y)c # -mcmodel=3Dmedlow would force Xen into the lower half. =20 CFLAGS +=3D -march=3D$(riscv-march-y) -mstrict-align -mcmodel=3Dmedany -CFLAGS +=3D -I$(BASEDIR)/include +CFLAGS +=3D -I$(srctree)/include +CFLAGS +=3D -I$(srctree)/include/arch-$(TARGET_ARCH) diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile index 2cc67d6e0e84..c5e87f3db35b 100644 --- a/xen/arch/x86/Makefile +++ b/xen/arch/x86/Makefile @@ -81,6 +81,9 @@ endif extra-y +=3D asm-macros.i extra-y +=3D xen.lds =20 +# Allows usercopy.c to includes itself +$(obj)/usercopy.o: CFLAGS-y +=3D -I. + ifneq ($(CONFIG_HVM),y) $(obj)/x86_emulate.o: CFLAGS-y +=3D -Wno-unused-label endif @@ -166,13 +169,13 @@ $(TARGET)-syms: $(BASEDIR)/prelink.o $(obj)/xen.lds $(NM) -pa --format=3Dsysv $(@D)/.$(@F).0 \ | $(BASEDIR)/tools/symbols $(all_symbols) --sysv --sort \ >$(@D)/.$(@F).0.S - $(MAKE) -f $(BASEDIR)/Rules.mk $(@D)/.$(@F).0.o + $(MAKE) $(build)=3D$(@D) $(@D)/.$(@F).0.o $(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< $(build_id_linker) \ $(@D)/.$(@F).0.o -o $(@D)/.$(@F).1 $(NM) -pa --format=3Dsysv $(@D)/.$(@F).1 \ | $(BASEDIR)/tools/symbols $(all_symbols) --sysv --sort $(syms-warn-dup-= y) \ >$(@D)/.$(@F).1.S - $(MAKE) -f $(BASEDIR)/Rules.mk $(@D)/.$(@F).1.o + $(MAKE) $(build)=3D$(@D) $(@D)/.$(@F).1.o $(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< $(build_id_linker) \ $(@D)/.$(@F).1.o -o $@ $(NM) -pa --format=3Dsysv $(@D)/$(@F) \ @@ -234,14 +237,14 @@ endif $(MKRELOC) $(foreach base,$(VIRT_BASE) $(ALT_BASE),$(@D)/.$(@F).$(base).0= ) >$(@D)/.$(@F).0r.S $(NM) -pa --format=3Dsysv $(@D)/.$(@F).$(VIRT_BASE).0 \ | $(BASEDIR)/tools/symbols $(all_symbols) --sysv --sort >$(@D)/.$(@F).0s= .S - $(MAKE) -f $(BASEDIR)/Rules.mk $(@D)/.$(@F).0r.o $(@D)/.$(@F).0s.o + $(MAKE) $(build)=3D$(@D) .$(@F).0r.o .$(@F).0s.o $(foreach base, $(VIRT_BASE) $(ALT_BASE), \ $(LD) $(call EFI_LDFLAGS,$(base)) -T $(obj)/efi.lds -N $< \ $(@D)/.$(@F).0r.o $(@D)/.$(@F).0s.o $(note_file_option) -= o $(@D)/.$(@F).$(base).1 &&) : $(MKRELOC) $(foreach base,$(VIRT_BASE) $(ALT_BASE),$(@D)/.$(@F).$(base).1= ) >$(@D)/.$(@F).1r.S $(NM) -pa --format=3Dsysv $(@D)/.$(@F).$(VIRT_BASE).1 \ | $(BASEDIR)/tools/symbols $(all_symbols) --sysv --sort >$(@D)/.$(@F).1s= .S - $(MAKE) -f $(BASEDIR)/Rules.mk $(@D)/.$(@F).1r.o $(@D)/.$(@F).1s.o + $(MAKE) $(build)=3D$(@D) .$(@F).1r.o .$(@F).1s.o $(LD) $(call EFI_LDFLAGS,$(VIRT_BASE)) -T $(obj)/efi.lds -N $< \ $(@D)/.$(@F).1r.o $(@D)/.$(@F).1s.o $(note_file_option) -= o $@ $(NM) -pa --format=3Dsysv $(@D)/$(@F) \ @@ -253,7 +256,7 @@ $(TARGET).efi: FORCE echo '$(if $(filter y,$(XEN_BUILD_EFI)),xen.efi generation,EFI support) d= isabled' endif =20 -$(obj)/efi/buildid.o $(obj)/efi/relocs-dummy.o: $(BASEDIR)/arch/x86/efi/bu= ilt_in.o +$(obj)/efi/buildid.o $(obj)/efi/relocs-dummy.o: arch/x86/efi/built_in.o $(obj)/efi/buildid.o $(obj)/efi/relocs-dummy.o: ; =20 .PHONY: include diff --git a/xen/arch/x86/Rules.mk b/xen/arch/x86/Rules.mk index 56fe22c979ea..2d12c2dca208 100644 --- a/xen/arch/x86/Rules.mk +++ b/xen/arch/x86/Rules.mk @@ -2,9 +2,9 @@ # x86-specific definitions =20 ifneq ($(filter -DHAVE_AS_QUOTED_SYM,$(XEN_CFLAGS)),) -object_label_flags =3D '-D__OBJECT_LABEL__=3D$(subst $(BASEDIR)/,,$(CURDIR= ))/$@' +object_label_flags =3D '-D__OBJECT_LABEL__=3D$@' else -object_label_flags =3D '-D__OBJECT_LABEL__=3D$(subst /,$$,$(subst -,_,$(su= bst $(BASEDIR)/,,$(CURDIR))/$@))' +object_label_flags =3D '-D__OBJECT_LABEL__=3D$(subst /,$$,$(subst -,_,$@))' endif c_flags +=3D $(object_label_flags) $(CFLAGS-stack-boundary) a_flags +=3D $(object_label_flags) $(CFLAGS-stack-boundary) diff --git a/xen/arch/x86/arch.mk b/xen/arch/x86/arch.mk index c95caa303db8..3f181f616188 100644 --- a/xen/arch/x86/arch.mk +++ b/xen/arch/x86/arch.mk @@ -3,10 +3,10 @@ =20 export XEN_IMG_OFFSET :=3D 0x200000 =20 -CFLAGS +=3D -I$(BASEDIR)/include -CFLAGS +=3D -I$(BASEDIR)/include/arch-$(TARGET_ARCH) -CFLAGS +=3D -I$(BASEDIR)/include/arch-x86/asm/mach-generic -CFLAGS +=3D -I$(BASEDIR)/include/arch-x86/asm/mach-default +CFLAGS +=3D -I$(srctree)/include +CFLAGS +=3D -I$(srctree)/include/arch-$(TARGET_ARCH) +CFLAGS +=3D -I$(srctree)/include/arch-x86/asm/mach-generic +CFLAGS +=3D -I$(srctree)/include/arch-x86/asm/mach-default CFLAGS +=3D -DXEN_IMG_OFFSET=3D$(XEN_IMG_OFFSET) =20 # Prevent floating-point variables from creeping into Xen. @@ -66,6 +66,6 @@ export XEN_BUILD_EFI :=3D $(call try-run,$(CC) $(CFLAGS) = -c arch/x86/efi/check.c - endif =20 # Set up the assembler include path properly for older toolchains. -CFLAGS +=3D -Wa,-I$(BASEDIR)/include +CFLAGS +=3D -Wa,-I$(srctree)/include =20 ALL_OBJS-y :=3D arch/x86/boot/built_in.o arch/x86/efi/built_in.o $(ALL_OBJ= S-y) diff --git a/xen/arch/x86/boot/Makefile b/xen/arch/x86/boot/Makefile index 53d357489df2..2469ca7c4530 100644 --- a/xen/arch/x86/boot/Makefile +++ b/xen/arch/x86/boot/Makefile @@ -1,8 +1,8 @@ obj-bin-y +=3D head.o =20 -DEFS_H_DEPS =3D $(src)/defs.h $(BASEDIR)/include/xen/stdbool.h +DEFS_H_DEPS =3D $(BASEDIR)/$(src)/defs.h $(BASEDIR)/include/xen/stdbool.h =20 -CMDLINE_DEPS =3D $(DEFS_H_DEPS) $(src)/video.h +CMDLINE_DEPS =3D $(DEFS_H_DEPS) $(BASEDIR)/$(src)/video.h =20 RELOC_DEPS =3D $(DEFS_H_DEPS) \ $(BASEDIR)/include/generated/autoconf.h \ @@ -14,7 +14,7 @@ RELOC_DEPS =3D $(DEFS_H_DEPS) \ $(obj)/head.o: $(obj)/cmdline.S $(obj)/reloc.S =20 $(obj)/cmdline.S: $(src)/cmdline.c $(CMDLINE_DEPS) - $(MAKE) -f build32.mk -C $(obj) $(@F) CMDLINE_DEPS=3D"$(CMDLINE_DEPS)" + $(MAKE) -f $(BASEDIR)/$(src)/build32.mk -C $(obj) $(@F) CMDLINE_DEPS=3D"$= (CMDLINE_DEPS)" =20 $(obj)/reloc.S: $(src)/reloc.c $(RELOC_DEPS) - $(MAKE) -f build32.mk -C $(obj) $(@F) RELOC_DEPS=3D"$(RELOC_DEPS)" + $(MAKE) -f $(BASEDIR)/$(src)/build32.mk -C $(obj) $(@F) RELOC_DEPS=3D"$(R= ELOC_DEPS)" diff --git a/xen/include/Makefile b/xen/include/Makefile index a969e76ddcad..b318bdaab094 100644 --- a/xen/include/Makefile +++ b/xen/include/Makefile @@ -61,7 +61,7 @@ $(obj)/compat/.xlat/%.h: $(obj)/compat/%.h $(obj)/compat/= .xlat/%.lst $(BASEDIR)/ export PYTHON=3D$(PYTHON); \ while read what name; do \ $(SHELL) $(BASEDIR)/tools/get-fields.sh "$$what" compat_$$name $< || exi= t $$?; \ - done <$(patsubst compat/%,compat/.xlat/%,$(basename $<)).lst >$@.new + done <$(patsubst $(obj)/compat/%,$(obj)/compat/.xlat/%,$(basename $<)).ls= t >$@.new mv -f $@.new $@ =20 .PRECIOUS: $(obj)/compat/.xlat/%.lst @@ -86,8 +86,8 @@ PUBLIC_HEADERS :=3D $(filter-out $(src)/public/arch-% $(s= rc)/public/dom0_ops.h, $( PUBLIC_C99_HEADERS :=3D $(src)/public/io/9pfs.h $(src)/public/io/pvcalls.h PUBLIC_ANSI_HEADERS :=3D $(filter-out $(src)/public/%ctl.h $(src)/public/x= sm/% $(src)/public/%hvm/save.h $(PUBLIC_C99_HEADERS), $(PUBLIC_HEADERS)) =20 -public/io/9pfs.h-prereq :=3D string -public/io/pvcalls.h-prereq :=3D string +$(src)/public/io/9pfs.h-prereq :=3D string +$(src)/public/io/pvcalls.h-prereq :=3D string =20 $(obj)/headers.chk: $(PUBLIC_ANSI_HEADERS) $(src)/Makefile for i in $(filter %.h,$^); do \ diff --git a/xen/scripts/Kbuild.include b/xen/scripts/Kbuild.include index 7cb55b181dcb..788929cdca38 100644 --- a/xen/scripts/Kbuild.include +++ b/xen/scripts/Kbuild.include @@ -107,6 +107,12 @@ ld-option =3D $(call success,$(LD) -v $(1)) # Usage: EXTRA_CFLAGS +=3D $(call cc-ifversion, -lt, 0402, -O1) cc-ifversion =3D $(shell [ $(CONFIG_GCC_VERSION)0 $(1) $(2)000 ] && echo $= (3) || echo $(4)) =20 +### +# Shorthand for $(Q)$(MAKE) -f scripts/Makefile.build obj=3D +# Usage: +# $(Q)$(MAKE) $(build)=3Ddir +build :=3D -f $(BASEDIR)/Rules.mk obj + # Shorthand for $(MAKE) clean # Usage: # $(MAKE) $(clean) dir diff --git a/xen/test/Makefile b/xen/test/Makefile index 41e4d7bdb78b..080763c80766 100644 --- a/xen/test/Makefile +++ b/xen/test/Makefile @@ -1,13 +1,10 @@ =20 -tests all: build - - ifneq ($(XEN_TARGET_ARCH),x86_32) # Xen 32-bit x86 hypervisor no longer supported, so has no test livepatches subdir-y +=3D livepatch endif =20 -install build subtree-force-update uninstall: %: +install uninstall: %: set -e; for s in $(subdir-y); do \ - $(MAKE) -f $(BASEDIR)/Rules.mk -C $$s $*; \ + $(MAKE) $(build)=3D$$s $*; \ done diff --git a/xen/test/livepatch/Makefile b/xen/test/livepatch/Makefile index e59245323e92..52ee58a08c5f 100644 --- a/xen/test/livepatch/Makefile +++ b/xen/test/livepatch/Makefile @@ -11,9 +11,6 @@ endif CODE_ADDR=3D$(shell nm --defined $(1) | grep $(2) | awk '{print "0x"$$1}') CODE_SZ=3D$(shell nm --defined -S $(1) | grep $(2) | awk '{ print "0x"$$2}= ') =20 -.PHONY: default -build default: livepatch - extra-y +=3D xen_hello_world.livepatch xen_hello_world-objs :=3D xen_hello_world_func.o xen_hello_world.o note.o = xen_note.o modinfo.o $(obj)/xen_hello_world.o: $(obj)/config.h @@ -156,9 +153,6 @@ LIVEPATCHES :=3D $(filter %.livepatch,$(extra-y)) =20 LIVEPATCH_DEBUG_DIR ?=3D $(DEBUG_DIR)/xen-livepatch =20 -.PHONY: livepatch -livepatch: $(LIVEPATCHES) - install: $(addprefix $(obj)/,$(LIVEPATCHES)) $(INSTALL_DIR) $(DESTDIR)$(LIVEPATCH_DEBUG_DIR) $(INSTALL_DATA) $(addprefix $(obj)/,$(LIVEPATCHES)) $(DESTDIR)$(LIVEPATCH= _DEBUG_DIR) diff --git a/xen/xsm/flask/Makefile b/xen/xsm/flask/Makefile index 3ea726d66f8b..267ca5c47437 100644 --- a/xen/xsm/flask/Makefile +++ b/xen/xsm/flask/Makefile @@ -42,7 +42,7 @@ $(obj)/flask-policy.S: $(BASEDIR)/tools/binfile FORCE $(call if_changed,binfile) targets +=3D flask-policy.S =20 -FLASK_BUILD_DIR :=3D $(CURDIR) +FLASK_BUILD_DIR :=3D $(BASEDIR)/$(obj) POLICY_SRC :=3D $(FLASK_BUILD_DIR)/xenpolicy-$(XEN_FULLVERSION) =20 $(obj)/policy.bin: FORCE diff --git a/xen/xsm/flask/ss/Makefile b/xen/xsm/flask/ss/Makefile index d32b9e07138e..efd21f138df3 100644 --- a/xen/xsm/flask/ss/Makefile +++ b/xen/xsm/flask/ss/Makefile @@ -8,4 +8,4 @@ obj-y +=3D services.o obj-y +=3D conditional.o obj-y +=3D mls.o =20 -CFLAGS-y +=3D -I../include +CFLAGS-y +=3D -Ixsm/flask/include --=20 Anthony PERARD From nobody Tue Apr 30 03:23:41 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1625149316; cv=none; d=zohomail.com; s=zohoarc; b=mYY7G6ik2F1qoSdmNG+heE100TPw/vX7gpXJcZYuFWCvCqK0IsMrVSJW+fNvxpkV3EKdMEYaWBrJzrfSUttgY9MQ+vlzpK+NkQvC/6cICJ7TAosQi7tTYDvogUzGfIt6xwKvcnfSEfgeWLCdqKaAWQ/mMrjqaxbfN3La/OrPlrg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1625149316; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=3hpnDlnZloPTdPWMxCtLEQbl5GzNsNSc5c7pn5Byb7E=; b=ItXr+fdhVaZpSexISOWWAYaTL7eUIasWqZd2abUfiUyc+GOMxjjzs5jT1y+oO9ND9V2iOWTndm9PdQpvcsytfTVzjPJYDU9t99xOe94FAubqOalr7E6ORENK1MbjsbvjrwrSbZrAeKjnkGGE5vNJUAfrMpoJAOTt+zaE/xrx3uw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1625149316336458.07160910828554; Thu, 1 Jul 2021 07:21:56 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.148775.275042 (Exim 4.92) (envelope-from ) id 1lyxZV-00024m-6j; Thu, 01 Jul 2021 14:21:41 +0000 Received: by outflank-mailman (output) from mailman id 148775.275042; Thu, 01 Jul 2021 14:21:41 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lyxZV-00023H-1Y; Thu, 01 Jul 2021 14:21:41 +0000 Received: by outflank-mailman (input) for mailman id 148775; Thu, 01 Jul 2021 14:21:39 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lyxQZ-0005F9-M3 for xen-devel@lists.xenproject.org; Thu, 01 Jul 2021 14:12:27 +0000 Received: from esa5.hc3370-68.iphmx.com (unknown [216.71.155.168]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 309bf640-da76-11eb-8328-12813bfff9fa; Thu, 01 Jul 2021 14:11:12 +0000 (UTC) X-Outflank-Mailman: Message body and most headers restored to incoming version 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" X-Inumbo-ID: 309bf640-da76-11eb-8328-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1625148672; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=APF1/u5jPnrWo/5Fqte+sYKklT316xDw+oribOSGvg8=; b=Ge6JnMP34vCiOXZ5Txyu4meDPNMNAynK3t9TiXzuMm2lShhXr17ahCV0 EvGodJ6a+OOxrvKi7uBl+5WIxADfht6XdlXfZgo1aw71cUnDL5vTHzlfC 9gyQaO3QWP/cu30I9Oxv/6NemNkZoFjZbN853zlsrBeRALg1TbFFQ3Km9 k=; Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: DPse08MoYbUEHN87mCBV8I3seFbD0iRz6VH/LPSxzcuPuQZQjOtYLAmTnXANpYULIIjcgv/Px1 Sp8OkTpY2yODr15n27DBnTkPKjJAuOP/poJnHJYFkXpneEmop0a2vGCerd0fNZxzJ5Bpr0/OAx /bnaBSfuzwAbVrgLqW7FtuEKTszwqufSVO4Oab/tDf/0NSuC5rOa8tT/uHSDaHfSQMsB94SMhP 0YHBhgI51ECOkvrmJsOaDm4UH+uUu2VnVFOUd6nz1UJXNGjNJYdjKSrlVdWOtmVuku3Egi8Fay vd8= X-SBRS: 5.1 X-MesageID: 47093441 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:qrnDPqpWRqPpvhTp/nkAj0waV5rveYIsimQD101hICG9Evb0qy nOpoV/6faQslwssR4b9uxoVJPvfZq+z+8W3WByB9eftWDd0QPFEGgL1+DfKlbbak7DH4BmtJ uJc8JFeafN5VoRt7eG3OFveexQvOVu88qT9JjjJ28Gd3APV0n5hT0JcjpyFCdNNW57LKt8Lr WwzOxdqQGtfHwGB/7LfUXsD4D41rv2fIuNW29+OyIa X-IronPort-AV: E=Sophos;i="5.83,314,1616472000"; d="scan'208";a="47093441" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Ian Jackson" , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Subject: [XEN PATCH v6 30/31] build: introduce if_changed_deps Date: Thu, 1 Jul 2021 15:10:10 +0100 Message-ID: <20210701141011.785641-31-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210701141011.785641-1-anthony.perard@citrix.com> References: <20210701141011.785641-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) Content-Type: text/plain; charset="utf-8" This macro does compare command line like if_changed, but it also rewrite the dependencies generated by $(CC) in order to depend on a CONFIG_* as generated by kconfig instead of depending on autoconf.h. This allow to make a change in kconfig options and only rebuild the object that uses that CONFIG_* option. cmd_and_record isn't needed anymore as it is replace by cmd_and_fixdep. There's only one .*.d dependency file left which is explicitly included as a workound, all the other are been absorb into the .*.cmd dependency files via `fixdep`. So including .*.d can be removed from the makefile. This imports fixdep.c and if_changed_deps macro from Linux v5.12. Signed-off-by: Anthony PERARD --- .gitignore | 1 + xen/Makefile | 16 +- xen/Rules.mk | 17 +- xen/arch/x86/Makefile | 8 +- xen/scripts/Kbuild.include | 17 +- xen/tools/Makefile | 7 +- xen/tools/fixdep.c | 404 +++++++++++++++++++++++++++++++++++++ 7 files changed, 441 insertions(+), 29 deletions(-) create mode 100644 xen/tools/fixdep.c diff --git a/.gitignore b/.gitignore index 91ae22ae9216..1c9c8a47aac6 100644 --- a/.gitignore +++ b/.gitignore @@ -341,6 +341,7 @@ xen/include/xen/lib/x86/cpuid-autogen.h xen/test/livepatch/config.h xen/test/livepatch/expect_config.h xen/test/livepatch/*.livepatch +xen/tools/fixdep xen/tools/kconfig/.tmp_gtkcheck xen/tools/kconfig/.tmp_qtcheck xen/tools/symbols diff --git a/xen/Makefile b/xen/Makefile index 71f098cd6374..d8dedca206a1 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -185,6 +185,13 @@ endif export root-make-done :=3D y endif # root-make-done =20 +# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D +# Rules shared between *config targets and build targets + +PHONY +=3D tools_fixdep +tools_fixdep: + $(MAKE) -C tools fixdep + # Shorthand for kconfig kconfig =3D -f $(BASEDIR)/tools/kconfig/Makefile.kconfig ARCH=3D$(ARCH) SR= CARCH=3D$(SRCARCH) HOSTCC=3D"$(HOSTCC)" HOSTCXX=3D"$(HOSTCXX)" =20 @@ -397,7 +404,7 @@ $(TARGET).gz: $(TARGET) mv $@.new $@ =20 PHONY +=3D prepare -prepare: +prepare: tools_fixdep $(MAKE) -C tools $(MAKE) $(build)=3D. include/xen/compile.h [ -e arch/$(TARGET_ARCH)/efi ] && for f in $$(cd common/efi; echo *.[ch])= ; \ @@ -476,6 +483,7 @@ include/xen/compile.h: include/xen/compile.h.in .banner= FORCE @cat .banner $(call filechk,compile.h) =20 +-include $(wildcard .asm-offsets.s.d) asm-offsets.s: arch/$(TARGET_ARCH)/$(TARGET_SUBARCH)/asm-offsets.c $(CC) $(filter-out -Wa$(comma)% -flto,$(c_flags)) -S -g0 -o $@.new -MQ $@= $< $(call move-if-changed,$@.new,$@) @@ -542,13 +550,13 @@ _MAP: =20 # Avoid those single target rules when Makefile is included by Rules.mk ifndef obj -%.o %.i %.s: %.c FORCE +%.o %.i %.s: %.c tools_fixdep FORCE $(MAKE) $(build)=3D$(*D) $(*D)/$(@F) =20 -%.o %.s: %.S FORCE +%.o %.s: %.S tools_fixdep FORCE $(MAKE) $(build)=3D$(*D) $(*D)/$(@F) =20 -%/: FORCE +%/: tools_fixdep FORCE $(MAKE) $(build)=3D$* need-builtin=3D1 endif =20 diff --git a/xen/Rules.mk b/xen/Rules.mk index 4b3abf0ea880..f2af4a6e0644 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -139,8 +139,8 @@ cpp_flags =3D $(filter-out -Wa$(comma)%,$(1)) # Calculation of flags, first the generic flags, then the arch specific fl= ags, # and last the flags modified for a target or a directory. =20 -c_flags =3D -MMD -MP -MF $(@D)/.$(@F).d $(XEN_CFLAGS) -a_flags =3D -MMD -MP -MF $(@D)/.$(@F).d $(XEN_AFLAGS) +c_flags =3D -MMD -MP -MF $(depfile) $(XEN_CFLAGS) +a_flags =3D -MMD -MP -MF $(depfile) $(XEN_AFLAGS) =20 include $(BASEDIR)/arch/$(TARGET_ARCH)/Rules.mk =20 @@ -197,7 +197,7 @@ else endif =20 define rule_cc_o_c - $(call cmd_and_record,cc_o_c) + $(call cmd_and_fixdep,cc_o_c) $(call cmd,objcopy_fix_sym) endef =20 @@ -208,7 +208,7 @@ quiet_cmd_cc_o_S =3D CC $@ cmd_cc_o_S =3D $(CC) $(a_flags) -c $< -o $@ =20 $(obj)/%.o: $(src)/%.S FORCE - $(call if_changed,cc_o_S) + $(call if_changed_dep,cc_o_S) =20 =20 quiet_cmd_obj_init_o =3D INIT_O $@ @@ -238,13 +238,13 @@ quiet_cmd_cpp_s_S =3D CPP $@ cmd_cpp_s_S =3D $(CPP) $(call cpp_flags,$(a_flags)) -MQ $@ -o $@ $< =20 $(obj)/%.i: $(src)/%.c FORCE - $(call if_changed,cpp_i_c) + $(call if_changed_dep,cpp_i_c) =20 $(obj)/%.s: $(src)/%.c FORCE - $(call if_changed,cc_s_c) + $(call if_changed_dep,cc_s_c) =20 $(obj)/%.s: $(src)/%.S FORCE - $(call if_changed,cpp_s_S) + $(call if_changed_dep,cpp_s_S) =20 # Linker scripts, .lds.S -> .lds quiet_cmd_cpp_lds_S =3D LDS $@ @@ -283,9 +283,6 @@ existing-targets :=3D $(wildcard $(sort $(targets))) =20 -include $(foreach f,$(existing-targets),$(dir $(f)).$(notdir $(f)).cmd) =20 -DEPS:=3D $(foreach f,$(existing-targets),$(dir $(f)).$(notdir $(f)).d) --include $(DEPS_INCLUDE) - # Declare the contents of the PHONY variable as phony. We keep that # information in a variable so we can use it in if_changed and friends. .PHONY: $(PHONY) diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile index c5e87f3db35b..bcb140756b98 100644 --- a/xen/arch/x86/Makefile +++ b/xen/arch/x86/Makefile @@ -280,7 +280,7 @@ $(BASEDIR)/include/arch-x86/asm/asm-macros.h: $(obj)/as= m-macros.i $(src)/Makefil =20 $(obj)/efi.lds: AFLAGS-y +=3D -DEFI $(obj)/xen.lds $(obj)/efi.lds: $(src)/xen.lds.S FORCE - $(call if_changed,cpp_lds_S) + $(call if_changed_dep,cpp_lds_S) =20 $(obj)/boot/mkelf32: $(src)/boot/mkelf32.c $(HOSTCC) $(HOSTCFLAGS) -o $@ $< @@ -296,9 +296,3 @@ clean:: rm -f $(BASEDIR)/.xen.efi.[0-9]* efi/*.efi efi/mkreloc rm -f boot/cmdline.S boot/reloc.S boot/*.lnk boot/*.bin rm -f note.o - -# Suppress loading of DEPS files for internal, temporary target files. Th= is -# then also suppresses re-generation of the respective .*.d2 files. -ifeq ($(filter-out .xen%.o,$(notdir $(MAKECMDGOALS))),) -DEPS_INCLUDE:=3D -endif diff --git a/xen/scripts/Kbuild.include b/xen/scripts/Kbuild.include index 788929cdca38..b56bbc4300f0 100644 --- a/xen/scripts/Kbuild.include +++ b/xen/scripts/Kbuild.include @@ -15,8 +15,7 @@ dot-target =3D $(@D)/.$(@F) =20 ### # dependencies -DEPS =3D .*.d -DEPS_INCLUDE =3D $(addsuffix .d2, $(basename $(wildcard $(DEPS)))) +depfile =3D $(dot-target).d =20 ### # real prerequisites without phony targets @@ -129,6 +128,8 @@ cmd =3D @set -e; $(echo-cmd) $(cmd_$(1)) ### # if_changed - execute command if any prerequisite is newer than # target, or command line has changed +# if_changed_dep - as if_changed, but uses fixdep to reveal dependencies +# including used config symbols # if_changed_rule - as if_changed but execute rule instead =20 ifneq ($(KBUILD_NOCMDDEP),1) @@ -157,15 +158,19 @@ if_changed =3D $(if $(any-prereq)$(cmd-check), = \ $(cmd); = \ printf '%s\n' 'cmd_$@ :=3D $(make-cmd)' > $(dot-target).cmd, @:) =20 +# Execute the command and also postprocess generated .d dependencies file. +if_changed_dep =3D $(if $(any-prereq)$(cmd-check),$(cmd_and_fixdep),@:) + +cmd_and_fixdep =3D = \ + $(cmd); = \ + tools/fixdep $(depfile) $@ '$(make-cmd)' > $(dot-target).cmd; = \ + rm -f $(depfile) + # Usage: $(call if_changed_rule,foo) # Will check if $(cmd_foo) or any of the prerequisites changed, # and if so will execute $(rule_foo). if_changed_rule =3D $(if $(any-prereq)$(cmd-check),$(rule_$(1)),@:) =20 -cmd_and_record =3D = \ - $(cmd); = \ - printf '%s\n' 'cmd_$@ :=3D $(make-cmd)' > $(dot-target).cmd - ### # why - tell why a target got built # enabled by make V=3D2 diff --git a/xen/tools/Makefile b/xen/tools/Makefile index 4e42163f981c..722f3664549d 100644 --- a/xen/tools/Makefile +++ b/xen/tools/Makefile @@ -2,11 +2,14 @@ include $(XEN_ROOT)/Config.mk =20 .PHONY: default -default: symbols +default: symbols fixdep =20 .PHONY: clean clean: - rm -f *.o symbols + rm -f *.o symbols fixdep =20 symbols: symbols.c $(HOSTCC) $(HOSTCFLAGS) -o $@ $< + +fixdep: fixdep.c + $(HOSTCC) $(HOSTCFLAGS) -o $@ $< diff --git a/xen/tools/fixdep.c b/xen/tools/fixdep.c new file mode 100644 index 000000000000..d98540552941 --- /dev/null +++ b/xen/tools/fixdep.c @@ -0,0 +1,404 @@ +/* + * "Optimize" a list of dependencies as spit out by gcc -MD + * for the kernel build + * =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D + * + * Author Kai Germaschewski + * Copyright 2002 by Kai Germaschewski + * + * This software may be used and distributed according to the terms + * of the GNU General Public License, incorporated herein by reference. + * + * + * Introduction: + * + * gcc produces a very nice and correct list of dependencies which + * tells make when to remake a file. + * + * To use this list as-is however has the drawback that virtually + * every file in the kernel includes autoconf.h. + * + * If the user re-runs make *config, autoconf.h will be + * regenerated. make notices that and will rebuild every file which + * includes autoconf.h, i.e. basically all files. This is extremely + * annoying if the user just changed CONFIG_HIS_DRIVER from n to m. + * + * So we play the same trick that "mkdep" played before. We replace + * the dependency on autoconf.h by a dependency on every config + * option which is mentioned in any of the listed prerequisites. + * + * kconfig populates a tree in include/config/ with an empty file + * for each config symbol and when the configuration is updated + * the files representing changed config options are touched + * which then let make pick up the changes and the files that use + * the config symbols are rebuilt. + * + * So if the user changes his CONFIG_HIS_DRIVER option, only the objects + * which depend on "include/config/his/driver.h" will be rebuilt, + * so most likely only his driver ;-) + * + * The idea above dates, by the way, back to Michael E Chastain, AFAIK. + * + * So to get dependencies right, there are two issues: + * o if any of the files the compiler read changed, we need to rebuild + * o if the command line given to the compile the file changed, we + * better rebuild as well. + * + * The former is handled by using the -MD output, the later by saving + * the command line used to compile the old object and comparing it + * to the one we would now use. + * + * Again, also this idea is pretty old and has been discussed on + * kbuild-devel a long time ago. I don't have a sensibly working + * internet connection right now, so I rather don't mention names + * without double checking. + * + * This code here has been based partially based on mkdep.c, which + * says the following about its history: + * + * Copyright abandoned, Michael Chastain, . + * This is a C version of syncdep.pl by Werner Almesberger. + * + * + * It is invoked as + * + * fixdep + * + * and will read the dependency file + * + * The transformed dependency snipped is written to stdout. + * + * It first generates a line + * + * cmd_ =3D + * + * and then basically copies the ..d file to stdout, in the + * process filtering out the dependency on autoconf.h and adding + * dependencies on include/config/my/option.h for every + * CONFIG_MY_OPTION encountered in any of the prerequisites. + * + * We don't even try to really parse the header files, but + * merely grep, i.e. if CONFIG_FOO is mentioned in a comment, it will + * be picked up as well. It's not a problem with respect to + * correctness, since that can only give too many dependencies, thus + * we cannot miss a rebuild. Since people tend to not mention totally + * unrelated CONFIG_ options all over the place, it's not an + * efficiency problem either. + * + * (Note: it'd be easy to port over the complete mkdep state machine, + * but I don't think the added complexity is worth it) + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static void usage(void) +{ + fprintf(stderr, "Usage: fixdep \n"); + exit(1); +} + +/* + * In the intended usage of this program, the stdout is redirected to .*.c= md + * files. The return value of printf() and putchar() must be checked to ca= tch + * any error, e.g. "No space left on device". + */ +static void xprintf(const char *format, ...) +{ + va_list ap; + int ret; + + va_start(ap, format); + ret =3D vprintf(format, ap); + if (ret < 0) { + perror("fixdep"); + exit(1); + } + va_end(ap); +} + +static void xputchar(int c) +{ + int ret; + + ret =3D putchar(c); + if (ret =3D=3D EOF) { + perror("fixdep"); + exit(1); + } +} + +/* + * Print out a dependency path from a symbol name + */ +static void print_dep(const char *m, int slen, const char *dir) +{ + int c, prev_c =3D '/', i; + + xprintf(" $(wildcard %s/", dir); + for (i =3D 0; i < slen; i++) { + c =3D m[i]; + if (c =3D=3D '_') + c =3D '/'; + else + c =3D tolower(c); + if (c !=3D '/' || prev_c !=3D '/') + xputchar(c); + prev_c =3D c; + } + xprintf(".h) \\\n"); +} + +struct item { + struct item *next; + unsigned int len; + unsigned int hash; + char name[]; +}; + +#define HASHSZ 256 +static struct item *hashtab[HASHSZ]; + +static unsigned int strhash(const char *str, unsigned int sz) +{ + /* fnv32 hash */ + unsigned int i, hash =3D 2166136261U; + + for (i =3D 0; i < sz; i++) + hash =3D (hash ^ str[i]) * 0x01000193; + return hash; +} + +/* + * Lookup a value in the configuration string. + */ +static int is_defined_config(const char *name, int len, unsigned int hash) +{ + struct item *aux; + + for (aux =3D hashtab[hash % HASHSZ]; aux; aux =3D aux->next) { + if (aux->hash =3D=3D hash && aux->len =3D=3D len && + memcmp(aux->name, name, len) =3D=3D 0) + return 1; + } + return 0; +} + +/* + * Add a new value to the configuration string. + */ +static void define_config(const char *name, int len, unsigned int hash) +{ + struct item *aux =3D malloc(sizeof(*aux) + len); + + if (!aux) { + perror("fixdep:malloc"); + exit(1); + } + memcpy(aux->name, name, len); + aux->len =3D len; + aux->hash =3D hash; + aux->next =3D hashtab[hash % HASHSZ]; + hashtab[hash % HASHSZ] =3D aux; +} + +/* + * Record the use of a CONFIG_* word. + */ +static void use_config(const char *m, int slen) +{ + unsigned int hash =3D strhash(m, slen); + + if (is_defined_config(m, slen, hash)) + return; + + define_config(m, slen, hash); + print_dep(m, slen, "include/config"); +} + +/* test if s ends in sub */ +static int str_ends_with(const char *s, int slen, const char *sub) +{ + int sublen =3D strlen(sub); + + if (sublen > slen) + return 0; + + return !memcmp(s + slen - sublen, sub, sublen); +} + +static void parse_config_file(const char *p) +{ + const char *q, *r; + const char *start =3D p; + + while ((p =3D strstr(p, "CONFIG_"))) { + if (p > start && (isalnum(p[-1]) || p[-1] =3D=3D '_')) { + p +=3D 7; + continue; + } + p +=3D 7; + q =3D p; + while (isalnum(*q) || *q =3D=3D '_') + q++; + if (str_ends_with(p, q - p, "_MODULE")) + r =3D q - 7; + else + r =3D q; + if (r > p) + use_config(p, r - p); + p =3D q; + } +} + +static void *read_file(const char *filename) +{ + struct stat st; + int fd; + char *buf; + + fd =3D open(filename, O_RDONLY); + if (fd < 0) { + fprintf(stderr, "fixdep: error opening file: "); + perror(filename); + exit(2); + } + if (fstat(fd, &st) < 0) { + fprintf(stderr, "fixdep: error fstat'ing file: "); + perror(filename); + exit(2); + } + buf =3D malloc(st.st_size + 1); + if (!buf) { + perror("fixdep: malloc"); + exit(2); + } + if (read(fd, buf, st.st_size) !=3D st.st_size) { + perror("fixdep: read"); + exit(2); + } + buf[st.st_size] =3D '\0'; + close(fd); + + return buf; +} + +/* Ignore certain dependencies */ +static int is_ignored_file(const char *s, int len) +{ + return str_ends_with(s, len, "include/generated/autoconf.h") || + str_ends_with(s, len, "include/generated/autoksyms.h"); +} + +/* + * Important: The below generated source_foo.o and deps_foo.o variable + * assignments are parsed not only by make, but also by the rather simple + * parser in scripts/mod/sumversion.c. + */ +static void parse_dep_file(char *m, const char *target) +{ + char *p; + int is_last, is_target; + int saw_any_target =3D 0; + int is_first_dep =3D 0; + void *buf; + + while (1) { + /* Skip any "white space" */ + while (*m =3D=3D ' ' || *m =3D=3D '\\' || *m =3D=3D '\n') + m++; + + if (!*m) + break; + + /* Find next "white space" */ + p =3D m; + while (*p && *p !=3D ' ' && *p !=3D '\\' && *p !=3D '\n') + p++; + is_last =3D (*p =3D=3D '\0'); + /* Is the token we found a target name? */ + is_target =3D (*(p-1) =3D=3D ':'); + /* Don't write any target names into the dependency file */ + if (is_target) { + /* The /next/ file is the first dependency */ + is_first_dep =3D 1; + } else if (!is_ignored_file(m, p - m)) { + *p =3D '\0'; + + /* + * Do not list the source file as dependency, so that + * kbuild is not confused if a .c file is rewritten + * into .S or vice versa. Storing it in source_* is + * needed for modpost to compute srcversions. + */ + if (is_first_dep) { + /* + * If processing the concatenation of multiple + * dependency files, only process the first + * target name, which will be the original + * source name, and ignore any other target + * names, which will be intermediate temporary + * files. + */ + if (!saw_any_target) { + saw_any_target =3D 1; + xprintf("source_%s :=3D %s\n\n", + target, m); + xprintf("deps_%s :=3D \\\n", target); + } + is_first_dep =3D 0; + } else { + xprintf(" %s \\\n", m); + } + + buf =3D read_file(m); + parse_config_file(buf); + free(buf); + } + + if (is_last) + break; + + /* + * Start searching for next token immediately after the first + * "whitespace" character that follows this token. + */ + m =3D p + 1; + } + + if (!saw_any_target) { + fprintf(stderr, "fixdep: parse error; no targets found\n"); + exit(1); + } + + xprintf("\n%s: $(deps_%s)\n\n", target, target); + xprintf("$(deps_%s):\n", target); +} + +int main(int argc, char *argv[]) +{ + const char *depfile, *target, *cmdline; + void *buf; + + if (argc !=3D 4) + usage(); + + depfile =3D argv[1]; + target =3D argv[2]; + cmdline =3D argv[3]; + + xprintf("cmd_%s :=3D %s\n\n", target, cmdline); + + buf =3D read_file(depfile); + parse_dep_file(buf, target); + free(buf); + + return 0; +} --=20 Anthony PERARD From nobody Tue Apr 30 03:23:41 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1625149316; cv=none; d=zohomail.com; s=zohoarc; b=PCo76Qj9/t+4OKKQBDS6bbKDCkv7/SnWYpuikFlQfqoLdY+E0ssYHqXrDnFemVKsX+F9pQr1Gzr0aKtwCqytqQU8Xu6mPRCOVwAeX37iJQ9lK76YEf1YmTRaBzIJzPEE6HZ+gO1j5oVEpjW6Y8AP0iT3FSyNucxyug6Akwn5gY4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1625149316; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=ZPT0qzZlQLhm1gSUZz3GUMoB2AvZsJRd4DrP4uX2brU=; b=XoCF0HLwMUooCVzWsa/lWrPC/J/B4E1u0ZYpQ4U1pPBh7+npy8EHINpViLpO170Se2cbIOcLBaYY23vxzx1sD9BLoN1NbFXyhKYujaN90yGGHB7tWawj86Vn5kK80By5zB0E9+g4rAueAwjdLC0hZNUJZ0CdqxCFPY1IowN4pHc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1625149316055222.89169601596325; Thu, 1 Jul 2021 07:21:56 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.148785.275080 (Exim 4.92) (envelope-from ) id 1lyxZY-0002uU-P9; Thu, 01 Jul 2021 14:21:44 +0000 Received: by outflank-mailman (output) from mailman id 148785.275080; Thu, 01 Jul 2021 14:21:44 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lyxZY-0002rG-21; Thu, 01 Jul 2021 14:21:44 +0000 Received: by outflank-mailman (input) for mailman id 148785; Thu, 01 Jul 2021 14:21:41 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lyxRb-0005tj-5G for xen-devel@lists.xenproject.org; Thu, 01 Jul 2021 14:13:31 +0000 Received: from esa2.hc3370-68.iphmx.com (unknown [216.71.145.153]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 5d4dca46-106a-46ea-9165-196c4265a912; Thu, 01 Jul 2021 14:11:54 +0000 (UTC) X-Outflank-Mailman: Message body and most headers restored to incoming version 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" X-Inumbo-ID: 5d4dca46-106a-46ea-9165-196c4265a912 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1625148714; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=6rzhumebECyq+XiEsQEAKIp6M61wPTFJkWWEM129pgo=; b=AFGokSHhDEgAP8thXEvGJHRfizIv4LXicz2NLK2MyX95HscgnWKvB1d+ 8xjc4XMjk/c4a+yDhQdaLANMCR8dgs4lQvsVo1ROk+FxV45EtfNyPR7WO 8jwJdsChaSv9HAH0A2vDe7MHgqfr5Q0C1xbskLI/ldec7eN6lUROWSYjI c=; Authentication-Results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: beZsAYtNPf2SM4Ps0NfM6EpbWKc4iQA7fVx7nNYGwHqBAdQC659W00WQSrlxFzDDBJoY9XD9Ro M8ZCP8a3zIeKsPnDGdPX3Wp6aTYC1+DqClpsg0mJdvUIbi/SfZcPcOIeg+UmpyBKKQY0VNK/NL +iHo3AVMih1F+amcAVNC5ChIVGBYZYZ6fbD7z/2BI3r5s+fSore5mYyyCAm0Sn4jTD/g7C3inT fwZBjnKWlAhcdbp3hs+1h/8JNcAlkbnY6VooLi9CQ31CwnY61U9FppeH1BH/4p+4q96ZAB7Fxc mMQ= X-SBRS: 5.1 X-MesageID: 47376243 X-Ironport-Server: esa2.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:dtuHaKFnMr5sYYKKpLqE0MeALOsnbusQ8zAXP0AYc3Jom6uj5q aTdZUgpGfJYVkqOE3I9ertBEDEewK4yXcX2/h3AV7BZniEhILAFugLhuGO/9SjIVybygc079 YYT0EUMrzN5DZB4voSmDPIceod/A== X-IronPort-AV: E=Sophos;i="5.83,314,1616472000"; d="scan'208";a="47376243" From: Anthony PERARD To: CC: Anthony PERARD , Bob Eshleman , Alistair Francis , Connor Davis Subject: [XEN PATCH v6 31/31] build,riscv: tell the build system about riscv64/head.S Date: Thu, 1 Jul 2021 15:10:11 +0100 Message-ID: <20210701141011.785641-32-anthony.perard@citrix.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210701141011.785641-1-anthony.perard@citrix.com> References: <20210701141011.785641-1-anthony.perard@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) Content-Type: text/plain; charset="utf-8" This allows to `make arch/riscv/riscv64/head.o`. Example of rune on a fresh copy of the repository: make XEN_TARGET_ARCH=3Driscv64 CROSS_COMPILE=3Driscv64-linux-gnu- KBUIL= D_DEFCONFIG=3Dtiny64_defconfig arch/riscv/riscv64/head.o Signed-off-by: Anthony PERARD Acked-by: Bob Eshleman Acked-by: Connor Davis Reviewed-by: Alistair Francis --- xen/arch/riscv/riscv64/Makefile | 1 + 1 file changed, 1 insertion(+) create mode 100644 xen/arch/riscv/riscv64/Makefile diff --git a/xen/arch/riscv/riscv64/Makefile b/xen/arch/riscv/riscv64/Makef= ile new file mode 100644 index 000000000000..15a4a65f6615 --- /dev/null +++ b/xen/arch/riscv/riscv64/Makefile @@ -0,0 +1 @@ +extra-y +=3D head.o --=20 Anthony PERARD