From patchwork Thu Jul 1 14:09:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12354141 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4F834C11F64 for ; Thu, 1 Jul 2021 14:10:29 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0CA6E613FB for ; Thu, 1 Jul 2021 14:10:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0CA6E613FB Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=citrix.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.148703.274807 (Exim 4.92) (envelope-from ) id 1lyxOY-0005MA-PT; Thu, 01 Jul 2021 14:10:22 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version 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-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 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 = $(CPP) $(filter-out -Wa$(comma)%,$(c_flags)) -MQ $@ -o $@ $< quiet_cmd_cc_s_c = CC $@ cmd_cc_s_c = $(CC) $(filter-out -Wa$(comma)%,$(c_flags)) -S $< -o $@ -quiet_cmd_s_S = CPP $@ -cmd_s_S = $(CPP) $(filter-out -Wa$(comma)%,$(a_flags)) -MQ $@ -o $@ $< +quiet_cmd_cpp_s_S = CPP $@ +cmd_cpp_s_S = $(CPP) $(filter-out -Wa$(comma)%,$(a_flags)) -MQ $@ -o $@ $< %.i: %.c FORCE $(call if_changed,cpp_i_c) From patchwork Thu Jul 1 14:09:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12354143 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 851C3C11F64 for ; Thu, 1 Jul 2021 14:10:33 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4C82261400 for ; Thu, 1 Jul 2021 14:10:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4C82261400 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=citrix.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.148705.274818 (Exim 4.92) (envelope-from ) id 1lyxOe-0005gD-1Q; Thu, 01 Jul 2021 14:10:28 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version 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-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_Pau_Monn=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 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 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. $(obj-bin-y): XEN_CFLAGS := $(filter-out -flto,$(XEN_CFLAGS)) +# To be use with $(a_flags) or $(c_flags) to produce CPP flags +cpp_flags = $(filter-out -Wa$(comma)%,$(1)) + # Calculation of flags, first the generic flags, then the arch specific flags, # and last the flags modified for a target or a directory. @@ -222,13 +225,13 @@ $(filter %.init.o,$(obj-y) $(obj-bin-y) $(extra-y)): %.init.o: %.o FORCE $(call if_changed,obj_init_o) quiet_cmd_cpp_i_c = CPP $@ -cmd_cpp_i_c = $(CPP) $(filter-out -Wa$(comma)%,$(c_flags)) -MQ $@ -o $@ $< +cmd_cpp_i_c = $(CPP) $(call cpp_flags,$(c_flags)) -MQ $@ -o $@ $< quiet_cmd_cc_s_c = CC $@ cmd_cc_s_c = $(CC) $(filter-out -Wa$(comma)%,$(c_flags)) -S $< -o $@ quiet_cmd_cpp_s_S = CPP $@ -cmd_cpp_s_S = $(CPP) $(filter-out -Wa$(comma)%,$(a_flags)) -MQ $@ -o $@ $< +cmd_cpp_s_S = $(CPP) $(call cpp_flags,$(a_flags)) -MQ $@ -o $@ $< %.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=$* -c $< -o $@ guest_walk_%.i: guest_walk.c Makefile - $(CPP) $(filter-out -Wa$(comma)%,$(c_flags)) -DGUEST_PAGING_LEVELS=$* -c $< -o $@ + $(CPP) $(call cpp_flags,$(c_flags)) -DGUEST_PAGING_LEVELS=$* -c $< -o $@ guest_walk_%.s: guest_walk.c Makefile $(CC) $(filter-out -Wa$(comma)%,$(c_flags)) -DGUEST_PAGING_LEVELS=$* -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=$* -c $< -o $@ guest_walk_%level.i: guest_walk.c Makefile - $(CPP) $(filter-out -Wa$(comma)%,$(c_flags)) -DGUEST_PAGING_LEVELS=$* -c $< -o $@ + $(CPP) $(call cpp_flags,$(c_flags)) -DGUEST_PAGING_LEVELS=$* -c $< -o $@ guest_walk_%level.s: guest_walk.c Makefile $(CC) $(filter-out -Wa$(comma)%,$(c_flags)) -DGUEST_PAGING_LEVELS=$* -S $< -o $@ diff --git a/xen/arch/x86/mm/shadow/Makefile b/xen/arch/x86/mm/shadow/Makefile 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=$* -c $< -o $@ guest_%.i: multi.c Makefile - $(CPP) $(filter-out -Wa$(comma)%,$(c_flags)) -DGUEST_PAGING_LEVELS=$* -c $< -o $@ + $(CPP) $(call cpp_flags,$(c_flags)) -DGUEST_PAGING_LEVELS=$* -c $< -o $@ guest_%.s: multi.c Makefile $(CC) $(filter-out -Wa$(comma)%,$(c_flags)) -DGUEST_PAGING_LEVELS=$* -S $< -o $@ From patchwork Thu Jul 1 14:09:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12354149 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AA674C11F64 for ; Thu, 1 Jul 2021 14:10:40 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7626B613FD for ; Thu, 1 Jul 2021 14:10:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7626B613FD Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=citrix.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.148708.274851 (Exim 4.92) (envelope-from ) id 1lyxOk-0006ct-3t; Thu, 01 Jul 2021 14:10:34 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version 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-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 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 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 += $(CFLAGS-y) a_flags += $(CFLAGS-y) $(AFLAGS-y) -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 = LD $@ +cmd_cc_builtin = \ + $(CC) $(XEN_CFLAGS) -c -x c /dev/null -o $@ + +quiet_cmd_ld_builtin = LD $@ ifeq ($(CONFIG_LTO),y) - $(LD_LTO) -r -o $@ $(filter $(obj-y),$^) +cmd_ld_builtin = \ + $(LD_LTO) -r -o $@ $(filter $(obj-y),$(real-prereqs)) else - $(LD) $(XEN_LDFLAGS) -r -o $@ $(filter $(obj-y),$^) -endif +cmd_ld_builtin = \ + $(LD) $(XEN_LDFLAGS) -r -o $@ $(filter $(obj-y),$(real-prereqs)) endif +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) From patchwork Thu Jul 1 14:09:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12354153 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E2A93C11F67 for ; Thu, 1 Jul 2021 14:10:48 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A8797613FB for ; Thu, 1 Jul 2021 14:10:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A8797613FB Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=citrix.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.148712.274884 (Exim 4.92) (envelope-from ) id 1lyxOt-0007wz-JN; Thu, 01 Jul 2021 14:10:43 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version 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-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 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: SRCPATH := $(patsubst $(BASEDIR)/%,%,$(CURDIR)) -%.o: %.c Makefile +quiet_cmd_cc_o_c = 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 $<=$(SRCPATH)/$< $(@D)/.$(@F).tmp $@ -else - $(OBJCOPY) --redefine-sym $( X-Patchwork-Id: 12354157 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D5AE6C11F64 for ; Thu, 1 Jul 2021 14:10:54 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9CD1461406 for ; Thu, 1 Jul 2021 14:10:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9CD1461406 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=citrix.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.148714.274895 (Exim 4.92) (envelope-from ) id 1lyxOz-0000I6-1K; Thu, 01 Jul 2021 14:10:49 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version 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-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_Pau_Monn?= =?utf-8?q?=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 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 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. 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 = $(CPP) $(call cpp_flags,$(a_flags)) -MQ $@ -o $@ $< %.s: %.S FORCE $(call if_changed,cpp_s_S) +# Linker scripts, .lds.S -> .lds +quiet_cmd_cpp_lds_S = LDS $@ +cmd_cpp_lds_S = $(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 += vpsci.o obj-y += vuart.o extra-y += $(TARGET_SUBARCH)/head.o +extra-y += xen.lds + #obj-bin-y += ....o ifneq ($(CONFIG_DTB_FILE),"") @@ -133,8 +135,8 @@ $(TARGET)-syms: prelink.o xen.lds .PHONY: include include: -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) dtb.o: $(patsubst "%",%,$(CONFIG_DTB_FILE)) 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 += sysctl.o endif extra-y += asm-macros.i +extra-y += xen.lds ifneq ($(CONFIG_HVM),y) x86_emulate.o: CFLAGS-y += -Wno-unused-label @@ -240,6 +241,7 @@ endif note_file_option ?= $(note_file) ifeq ($(XEN_BUILD_PE),y) +extra-y += efi.lds $(TARGET).efi: 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 info from $(@F)" @@ -292,8 +294,8 @@ $(BASEDIR)/include/asm-x86/asm-macros.h: asm-macros.i Makefile $(call move-if-changed,$@.new,$@) efi.lds: AFLAGS-y += -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) boot/mkelf32: boot/mkelf32.c $(HOSTCC) $(HOSTCFLAGS) -o $@ $< From patchwork Thu Jul 1 14:09:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12354147 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8B4F6C11F69 for ; Thu, 1 Jul 2021 14:10:38 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 34FCC61400 for ; Thu, 1 Jul 2021 14:10:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 34FCC61400 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=citrix.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.148706.274829 (Exim 4.92) (envelope-from ) id 1lyxOg-0005yi-90; Thu, 01 Jul 2021 14:10:30 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version 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-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_Pau_Monn=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 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 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 -build-intermediate = $(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 := $(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 = $(filter-out -Wa$(comma)%,$(1)) # Calculation of flags, first the generic flags, then the arch specific flags, # and last the flags modified for a target or a directory. -c_flags = -MMD -MP -MF $(@D)/.$(@F).d $(XEN_CFLAGS) '-D__OBJECT_FILE__="$@"' +c_flags = -MMD -MP -MF $(@D)/.$(@F).d $(XEN_CFLAGS) a_flags = -MMD -MP -MF $(@D)/.$(@F).d $(XEN_AFLAGS) 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) += mem_sharing.o obj-y += p2m.o obj-$(CONFIG_HVM) += p2m-ept.o p2m-pod.o p2m-pt.o obj-y += paging.o - -guest_walk_%.o: guest_walk.c Makefile - $(CC) $(c_flags) -DGUEST_PAGING_LEVELS=$* -c $< -o $@ - -guest_walk_%.i: guest_walk.c Makefile - $(CPP) $(call cpp_flags,$(c_flags)) -DGUEST_PAGING_LEVELS=$* -c $< -o $@ - -guest_walk_%.s: guest_walk.c Makefile - $(CC) $(filter-out -Wa$(comma)%,$(c_flags)) -DGUEST_PAGING_LEVELS=$* -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 . */ -/* 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 += guest_walk_3level.o obj-y += guest_walk_4level.o obj-y += nested_hap.o obj-y += nested_ept.o - -guest_walk_%level.o: guest_walk.c Makefile - $(CC) $(c_flags) -DGUEST_PAGING_LEVELS=$* -c $< -o $@ - -guest_walk_%level.i: guest_walk.c Makefile - $(CPP) $(call cpp_flags,$(c_flags)) -DGUEST_PAGING_LEVELS=$* -c $< -o $@ - -guest_walk_%level.s: guest_walk.c Makefile - $(CC) $(filter-out -Wa$(comma)%,$(c_flags)) -DGUEST_PAGING_LEVELS=$* -S $< -o $@ diff --git a/xen/arch/x86/mm/hap/guest_walk.c b/xen/arch/x86/mm/hap/guest_walk.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 . */ -/* 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/Makefile 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) += pv.o guest_4.o else obj-y += none.o endif - -guest_%.o: multi.c Makefile - $(CC) $(c_flags) -DGUEST_PAGING_LEVELS=$* -c $< -o $@ - -guest_%.i: multi.c Makefile - $(CPP) $(call cpp_flags,$(c_flags)) -DGUEST_PAGING_LEVELS=$* -c $< -o $@ - -guest_%.s: multi.c Makefile - $(CC) $(filter-out -Wa$(comma)%,$(c_flags)) -DGUEST_PAGING_LEVELS=$* -S $< -o $@ diff --git a/xen/arch/x86/mm/shadow/guest_2.c b/xen/arch/x86/mm/shadow/guest_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/guest_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/guest_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 . */ -/* 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] = ""; char *sym, stype; - static enum { symbol, single_source, multi_source } last; static char *filename; int rc = -1; @@ -118,24 +117,11 @@ static int read_symbol(FILE *in, struct sym_entry *s) */ input_format == fmt_sysv && !*type && stype == '?' && 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 = strchr(str, '/') || (sym && sym[1] == 'o'); - - if (multi || last != multi_source) { - free(filename); - filename = *str ? strdup(str) : NULL; - } - last = multi ? multi_source : single_source; + free(filename); + filename = *str ? strdup(str) : NULL; goto skip_tail; } - last = symbol; rc = -1; sym = str; From patchwork Thu Jul 1 14:09:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12354145 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 520ABC11F64 for ; Thu, 1 Jul 2021 14:10:38 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 01FC5613FE for ; Thu, 1 Jul 2021 14:10:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 01FC5613FE Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=citrix.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.148707.274840 (Exim 4.92) (envelope-from ) id 1lyxOi-0006Kh-Ns; Thu, 01 Jul 2021 14:10:32 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version 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-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 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 v5: - removed "have 'xlat.lst' path as a variable" from the patch. 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_CFLAGS)) $(cppflags-y) -o $@ $< -compat/%.c: public/%.h xlat.lst Makefile $(BASEDIR)/tools/compat-build-source.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 $@ compat/.xlat/%.h: compat/%.h compat/.xlat/%.lst $(BASEDIR)/tools/get-fields.sh Makefile diff --git a/xen/tools/compat-build-source.py b/xen/tools/compat-build-source.py index 2bcaf27d05a3..274d6917ab7f 100755 --- a/xen/tools/compat-build-source.py +++ b/xen/tools/compat-build-source.py @@ -13,7 +13,11 @@ pats = [ [ r"XEN_GUEST_HANDLE", r"COMPAT_HANDLE" ], ]; -xlatf = open('xlat.lst', 'r') +try: + xlatf = open(sys.argv[1], 'r') +except IndexError: + print('missing path to xlat.lst argument') + sys.exit(1) for line in xlatf.readlines(): match = re.subn(r"^\s*\?\s+(\w*)\s.*", r"\1", line.rstrip()) if match[1]: @@ -25,6 +29,8 @@ for pat in pats: pat[0] = re.compile(pat[0]) for line in sys.stdin.readlines(): + if 'DEFINE_XEN_GUEST_HANDLE(long)' in line: + continue for pat in pats: line = re.sub(pat[0], pat[1], line) print(line.rstrip()) From patchwork Thu Jul 1 14:09:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12354151 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CAACBC11F64 for ; Thu, 1 Jul 2021 14:10:42 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 94C4C613B7 for ; Thu, 1 Jul 2021 14:10:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 94C4C613B7 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=citrix.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.148709.274862 (Exim 4.92) (envelope-from ) id 1lyxOn-00073f-Fi; Thu, 01 Jul 2021 14:10:37 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version 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-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 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 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. 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) := $(wildcard public/arch-arm/*.h public/arch-arm/*/*.h) .PHONY: all all: $(headers-y) -compat/%.h: compat/%.i Makefile $(BASEDIR)/tools/compat-build-header.py - set -e; id=_$$(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 $@ compat/%.i: compat/%.c Makefile diff --git a/xen/tools/compat-build-header.py b/xen/tools/compat-build-header.py index 065d3b1b6ee8..5f5474fba051 100755 --- a/xen/tools/compat-build-header.py +++ b/xen/tools/compat-build-header.py @@ -2,6 +2,12 @@ import re,sys +try: + maketrans = str.maketrans +except AttributeError: + # For python2 + from string import maketrans + pats = [ [ r"__InClUdE__(.*)", r"#include\1" ], [ r"__IfDeF__ (XEN_HAVE.*)", r"#ifdef \1" ], @@ -23,7 +29,41 @@ pats = [ [ r"(^|[^\w])long([^\w]|$$)", r"\1int\2" ] ]; +output_filename = sys.argv[1] + +# tr '[:lower:]-/.' '[:upper:]___' +header_id = '_' + \ + output_filename.upper().translate(maketrans('-/.','___')) + +header = """#ifndef {0} +#define {0} +#include """.format(header_id) + +print(header) + +if not re.match("compat/arch-.*.h$", output_filename): + x = output_filename.replace("compat/","public/") + print('#include <%s>' % x) + +last_line_empty = False for line in sys.stdin.readlines(): + line = line.rstrip() + + # Remove linemarkers generated by the preprocessor. + if re.match(r"^# \d", line): + continue + + # De-duplicate empty lines. + if len(line) == 0: + if not last_line_empty: + print(line) + last_line_empty = True + continue + else: + last_line_empty = False + for pat in pats: - line = re.subn(pat[0], pat[1], line)[0] - print(line.rstrip()) + line = re.sub(pat[0], pat[1], line) + print(line) + +print("#endif /* %s */" % header_id) From patchwork Thu Jul 1 14:09:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12354161 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5436CC11F6A for ; Thu, 1 Jul 2021 14:11:02 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 257EB613FB for ; Thu, 1 Jul 2021 14:11:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 257EB613FB Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=citrix.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.148716.274916 (Exim 4.92) (envelope-from ) id 1lyxP3-0001A3-R1; Thu, 01 Jul 2021 14:10:53 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version 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-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 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=$(ARCH) SRCARCH=$(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 From patchwork Thu Jul 1 14:09:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12354163 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C5504C11F69 for ; Thu, 1 Jul 2021 14:11:04 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 95DDC613FB for ; Thu, 1 Jul 2021 14:11:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 95DDC613FB Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=citrix.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.148718.274928 (Exim 4.92) (envelope-from ) id 1lyxP9-0001xe-CI; Thu, 01 Jul 2021 14:10:59 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version 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-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 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=$(ARCH) SRCARCH=$(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 From patchwork Thu Jul 1 14:09:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12354167 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 69363C11F64 for ; Thu, 1 Jul 2021 14:11:09 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3957C613B7 for ; Thu, 1 Jul 2021 14:11:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3957C613B7 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=citrix.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.148720.274950 (Exim 4.92) (envelope-from ) id 1lyxPE-0002x2-44; Thu, 01 Jul 2021 14:11:04 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version 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-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 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 # ========================================================================== subdir-all := $(subdir-y) $(subdir-n) $(subdir-) \ - $(filter %/, $(obj-y) $(obj-n) $(obj-)) + $(patsubst %/,%, $(filter %/, $(obj-y) $(obj-n) $(obj-))) DEPS_RM = $(DEPS) $(DEPS_INCLUDE) .PHONY: clean -clean:: $(addprefix _clean_, $(subdir-all)) +clean:: $(subdir-all) rm -f *.o .*.o.tmp *~ core $(DEPS_RM) # Descending # --------------------------------------------------------------------------- -_clean_%/: FORCE - $(MAKE) $(clean) $* +PHONY += $(subdir-all) +$(subdir-all): + $(MAKE) $(clean) $@ -# Force execution of pattern rules (for which PHONY cannot be directly used). -.PHONY: FORCE -FORCE: +.PHONY: $(PHONY) From patchwork Thu Jul 1 14:09:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12354175 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C0CD4C11F69 for ; Thu, 1 Jul 2021 14:11:43 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 91943613B7 for ; Thu, 1 Jul 2021 14:11:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 91943613B7 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=citrix.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.148725.274983 (Exim 4.92) (envelope-from ) id 1lyxPl-0005wC-BE; Thu, 01 Jul 2021 14:11:37 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version 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-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 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 ifneq ($(XEN_TARGET_ARCH),x86_32) # Xen 32-bit x86 hypervisor no longer supported, so has no test livepatches -SUBDIRS += livepatch +subdir-y += livepatch endif 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 From patchwork Thu Jul 1 14:09:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12354159 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4A772C11F64 for ; Thu, 1 Jul 2021 14:10:58 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 162D6613FE for ; Thu, 1 Jul 2021 14:10:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 162D6613FE Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=citrix.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.148715.274906 (Exim 4.92) (envelope-from ) id 1lyxP2-0000mx-Dy; Thu, 01 Jul 2021 14:10:52 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version 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-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 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 .PHONY: default -default: - $(MAKE) symbols +default: symbols .PHONY: clean clean: From patchwork Thu Jul 1 14:09:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12354165 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 59904C11F64 for ; Thu, 1 Jul 2021 14:11:07 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2761E613FB for ; Thu, 1 Jul 2021 14:11:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2761E613FB Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=citrix.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.148719.274939 (Exim 4.92) (envelope-from ) id 1lyxPB-0002OX-Pc; Thu, 01 Jul 2021 14:11:01 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version 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-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 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 -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 += --fix-cortex-a53-843419 - endif -endif - targets += prelink.o $(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-outline-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 += --fix-cortex-a53-843419 + endif +endif From patchwork Thu Jul 1 14:09:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12354169 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4FB35C11F64 for ; Thu, 1 Jul 2021 14:11:18 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 227D9613B7 for ; Thu, 1 Jul 2021 14:11:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 227D9613B7 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=citrix.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.148722.274961 (Exim 4.92) (envelope-from ) id 1lyxPM-00040O-Lz; Thu, 01 Jul 2021 14:11:12 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version 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-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 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. +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 now.") +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 -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 now.") -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 := $(BASEDIR)/xen # Note that link order matters! From patchwork Thu Jul 1 14:09:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12354171 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4B1B2C11F64 for ; Thu, 1 Jul 2021 14:11:41 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 194AA613FD for ; Thu, 1 Jul 2021 14:11:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 194AA613FD Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=citrix.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.148723.274972 (Exim 4.92) (envelope-from ) id 1lyxPj-0005br-1X; Thu, 01 Jul 2021 14:11:35 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version 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-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 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) += vpl011.o obj-y += vsmc.o obj-y += vpsci.o obj-y += vuart.o -extra-y += $(TARGET_SUBARCH)/head.o extra-y += xen.lds @@ -76,6 +75,12 @@ endif ALL_OBJS := $(TARGET_SUBARCH)/head.o $(ALL_OBJS) +# head.o is built by descending into the sub-directory, depends on the part of +# $(ALL_OBJS) that will eventually recurse into $(TARGET_SUBARCH)/ and build +# head.o +$(TARGET_SUBARCH)/head.o: $(BASEDIR)/arch/arm/built_in.o +$(TARGET_SUBARCH)/head.o: ; + ifdef CONFIG_LIVEPATCH all_symbols = --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 += smpboot.o obj-y += traps.o obj-y += vfp.o +extra-y += 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 += smpboot.o obj-y += traps.o obj-y += vfp.o obj-y += vsysreg.o + +extra-y += head.o From patchwork Thu Jul 1 14:09:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12354177 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F147AC11F6B for ; Thu, 1 Jul 2021 14:11:44 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B7E76613B7 for ; Thu, 1 Jul 2021 14:11:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B7E76613B7 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=citrix.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.148728.274994 (Exim 4.92) (envelope-from ) id 1lyxPm-00063p-5y; Thu, 01 Jul 2021 14:11:38 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version 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-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 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) config_data.o: config.gz -config_data.S: $(BASEDIR)/tools/binfile - $(SHELL) $(BASEDIR)/tools/binfile $@ config.gz xen_config_data +quiet_cmd_binfile = BINFILE $@ +cmd_binfile = $(SHELL) $< $@ config.gz xen_config_data + +config_data.S: $(BASEDIR)/tools/binfile FORCE + $(call if_changed,binfile) +targets += config_data.S 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) $(mkaccess) FORCE obj-bin-$(CONFIG_XSM_FLASK_POLICY) += flask-policy.o flask-policy.o: policy.bin -flask-policy.S: $(BASEDIR)/tools/binfile - $(SHELL) $(BASEDIR)/tools/binfile -i $@ policy.bin xsm_flask_init_policy +quiet_cmd_binfile = BINFILE $@ +cmd_binfile = $(SHELL) $< -i $@ policy.bin xsm_flask_init_policy + +flask-policy.S: $(BASEDIR)/tools/binfile FORCE + $(call if_changed,binfile) +targets += flask-policy.S FLASK_BUILD_DIR := $(CURDIR) POLICY_SRC := $(FLASK_BUILD_DIR)/xenpolicy-$(XEN_FULLVERSION) From patchwork Thu Jul 1 14:09:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12354215 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7D2D4C11F64 for ; Thu, 1 Jul 2021 14:22:01 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1136B613FE for ; Thu, 1 Jul 2021 14:22:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1136B613FE Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=citrix.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.148800.275125 (Exim 4.92) (envelope-from ) id 1lyxZf-0004c3-GI; Thu, 01 Jul 2021 14:21:51 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version 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-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_Pau_Monn?= =?utf-8?q?=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 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 => arch-arm/asm}/acpi.h | 0 .../{asm-arm => arch-arm/asm}/alternative.h | 0 .../{asm-arm => arch-arm/asm}/altp2m.h | 0 .../{asm-arm => arch-arm/asm}/arm32/atomic.h | 0 .../{asm-arm => arch-arm/asm}/arm32/bitops.h | 0 .../{asm-arm => arch-arm/asm}/arm32/bug.h | 0 .../{asm-arm => arch-arm/asm}/arm32/cmpxchg.h | 0 .../asm}/arm32/flushtlb.h | 0 .../{asm-arm => arch-arm/asm}/arm32/insn.h | 0 .../{asm-arm => arch-arm/asm}/arm32/io.h | 0 .../{asm-arm => arch-arm/asm}/arm32/macros.h | 0 .../{asm-arm => arch-arm/asm}/arm32/mm.h | 0 .../{asm-arm => arch-arm/asm}/arm32/page.h | 0 .../asm}/arm32/processor.h | 0 .../{asm-arm => arch-arm/asm}/arm32/sysregs.h | 0 .../{asm-arm => arch-arm/asm}/arm32/system.h | 0 .../{asm-arm => arch-arm/asm}/arm32/traps.h | 0 .../{asm-arm => arch-arm/asm}/arm32/vfp.h | 0 .../{asm-arm => arch-arm/asm}/arm64/atomic.h | 0 .../{asm-arm => arch-arm/asm}/arm64/bitops.h | 0 .../{asm-arm => arch-arm/asm}/arm64/brk.h | 0 .../{asm-arm => arch-arm/asm}/arm64/bug.h | 0 .../{asm-arm => arch-arm/asm}/arm64/cmpxchg.h | 0 .../{asm-arm => arch-arm/asm}/arm64/efibind.h | 0 .../asm}/arm64/flushtlb.h | 0 .../{asm-arm => arch-arm/asm}/arm64/hsr.h | 0 .../{asm-arm => arch-arm/asm}/arm64/insn.h | 0 .../{asm-arm => arch-arm/asm}/arm64/io.h | 0 .../{asm-arm => arch-arm/asm}/arm64/macros.h | 0 .../{asm-arm => arch-arm/asm}/arm64/mm.h | 0 .../{asm-arm => arch-arm/asm}/arm64/page.h | 0 .../asm}/arm64/processor.h | 0 .../{asm-arm => arch-arm/asm}/arm64/sysregs.h | 0 .../{asm-arm => arch-arm/asm}/arm64/system.h | 0 .../{asm-arm => arch-arm/asm}/arm64/traps.h | 0 .../{asm-arm => arch-arm/asm}/arm64/vfp.h | 0 .../{asm-arm => arch-arm/asm}/asm_defns.h | 0 .../{asm-arm => arch-arm/asm}/atomic.h | 0 .../{asm-arm => arch-arm/asm}/bitops.h | 0 xen/include/{asm-arm => arch-arm/asm}/bug.h | 0 .../{asm-arm => arch-arm/asm}/byteorder.h | 0 xen/include/{asm-arm => arch-arm/asm}/cache.h | 0 .../{asm-arm => arch-arm/asm}/cadence-uart.h | 0 .../{asm-arm => arch-arm/asm}/config.h | 0 .../{asm-arm => arch-arm/asm}/cpregs.h | 0 .../{asm-arm => arch-arm/asm}/cpuerrata.h | 0 .../{asm-arm => arch-arm/asm}/cpufeature.h | 0 .../{asm-arm => arch-arm/asm}/current.h | 0 .../{asm-arm => arch-arm/asm}/debugger.h | 0 xen/include/{asm-arm => arch-arm/asm}/delay.h | 0 xen/include/{asm-arm => arch-arm/asm}/desc.h | 0 .../{asm-arm => arch-arm/asm}/device.h | 0 xen/include/{asm-arm => arch-arm/asm}/div64.h | 0 .../{asm-arm => arch-arm/asm}/domain.h | 0 .../{asm-arm => arch-arm/asm}/domain_build.h | 0 .../{asm-arm => arch-arm/asm}/early_printk.h | 0 .../{asm-arm => arch-arm/asm}/efibind.h | 0 xen/include/{asm-arm => arch-arm/asm}/elf.h | 0 xen/include/{asm-arm => arch-arm/asm}/event.h | 0 .../asm}/exynos4210-uart.h | 0 .../{asm-arm => arch-arm/asm}/flushtlb.h | 0 xen/include/{asm-arm => arch-arm/asm}/gic.h | 0 .../{asm-arm => arch-arm/asm}/gic_v3_defs.h | 0 .../{asm-arm => arch-arm/asm}/gic_v3_its.h | 0 .../{asm-arm => arch-arm/asm}/grant_table.h | 0 .../{asm-arm => arch-arm/asm}/guest_access.h | 0 .../{asm-arm => arch-arm/asm}/guest_atomics.h | 0 .../{asm-arm => arch-arm/asm}/guest_walk.h | 0 .../{asm-arm => arch-arm/asm}/hardirq.h | 0 xen/include/{asm-arm => arch-arm/asm}/hsr.h | 0 .../{asm-arm => arch-arm/asm}/hypercall.h | 0 xen/include/{asm-arm => arch-arm/asm}/init.h | 0 xen/include/{asm-arm => arch-arm/asm}/insn.h | 0 xen/include/{asm-arm => arch-arm/asm}/io.h | 0 xen/include/{asm-arm => arch-arm/asm}/iocap.h | 0 xen/include/{asm-arm => arch-arm/asm}/iommu.h | 0 .../{asm-arm => arch-arm/asm}/iommu_fwspec.h | 0 xen/include/{asm-arm => arch-arm/asm}/ioreq.h | 0 xen/include/{asm-arm => arch-arm/asm}/irq.h | 0 .../{asm-arm => arch-arm/asm}/kernel.h | 0 .../{asm-arm => arch-arm/asm}/livepatch.h | 0 xen/include/{asm-arm => arch-arm/asm}/lpae.h | 0 .../{asm-arm => arch-arm/asm}/macros.h | 0 .../{asm-arm => arch-arm/asm}/mem_access.h | 0 xen/include/{asm-arm => arch-arm/asm}/mm.h | 0 xen/include/{asm-arm => arch-arm/asm}/mmio.h | 0 .../{asm-arm => arch-arm/asm}/monitor.h | 0 .../{asm-arm => arch-arm/asm}/new_vgic.h | 0 .../{asm-arm => arch-arm/asm}/nospec.h | 0 xen/include/{asm-arm => arch-arm/asm}/numa.h | 0 xen/include/{asm-arm => arch-arm/asm}/p2m.h | 0 .../{asm-arm => arch-arm/asm}/page-bits.h | 0 xen/include/{asm-arm => arch-arm/asm}/page.h | 0 .../{asm-arm => arch-arm/asm}/paging.h | 0 xen/include/{asm-arm => arch-arm/asm}/pci.h | 0 .../{asm-arm => arch-arm/asm}/percpu.h | 0 xen/include/{asm-arm => arch-arm/asm}/perfc.h | 0 .../{asm-arm => arch-arm/asm}/perfc_defn.h | 0 .../{asm-arm => arch-arm/asm}/pl011-uart.h | 0 .../{asm-arm => 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 => arch-arm/asm}/processor.h | 0 .../{asm-arm => arch-arm/asm}/procinfo.h | 0 xen/include/{asm-arm => arch-arm/asm}/psci.h | 0 .../{asm-arm => arch-arm/asm}/random.h | 0 xen/include/{asm-arm => arch-arm/asm}/regs.h | 0 .../{asm-arm => arch-arm/asm}/scif-uart.h | 0 xen/include/{asm-arm => arch-arm/asm}/setup.h | 0 .../{asm-arm => arch-arm/asm}/short-desc.h | 0 xen/include/{asm-arm => arch-arm/asm}/smccc.h | 0 xen/include/{asm-arm => arch-arm/asm}/smp.h | 0 .../{asm-arm => arch-arm/asm}/softirq.h | 0 .../{asm-arm => arch-arm/asm}/spinlock.h | 0 .../{asm-arm => arch-arm/asm}/string.h | 0 .../{asm-arm => arch-arm/asm}/sysregs.h | 0 .../{asm-arm => arch-arm/asm}/system.h | 0 .../{asm-arm => arch-arm/asm}/tee/optee_msg.h | 0 .../asm}/tee/optee_rpc_cmd.h | 0 .../{asm-arm => arch-arm/asm}/tee/optee_smc.h | 0 .../{asm-arm => arch-arm/asm}/tee/tee.h | 0 xen/include/{asm-arm => arch-arm/asm}/time.h | 0 xen/include/{asm-arm => arch-arm/asm}/trace.h | 0 xen/include/{asm-arm => arch-arm/asm}/traps.h | 0 xen/include/{asm-arm => arch-arm/asm}/types.h | 0 xen/include/{asm-arm => arch-arm/asm}/vfp.h | 0 .../{asm-arm => arch-arm/asm}/vgic-emul.h | 0 xen/include/{asm-arm => arch-arm/asm}/vgic.h | 0 .../{asm-arm => arch-arm/asm}/vm_event.h | 0 .../{asm-arm => arch-arm/asm}/vpl011.h | 0 xen/include/{asm-arm => arch-arm/asm}/vpsci.h | 0 xen/include/{asm-arm => arch-arm/asm}/vreg.h | 0 .../{asm-arm => arch-arm/asm}/vtimer.h | 0 .../{asm-arm => arch-arm/asm}/xenoprof.h | 0 .../{asm-riscv => arch-riscv/asm}/config.h | 0 xen/include/{asm-x86 => arch-x86/asm}/acpi.h | 0 .../asm}/alternative-asm.h | 0 .../{asm-x86 => arch-x86/asm}/alternative.h | 0 .../{asm-x86 => arch-x86/asm}/altp2m.h | 0 xen/include/{asm-x86 => arch-x86/asm}/amd.h | 0 xen/include/{asm-x86 => arch-x86/asm}/apic.h | 0 .../{asm-x86 => arch-x86/asm}/apicdef.h | 0 .../{asm-x86 => arch-x86/asm}/asm-defns.h | 0 .../{asm-x86 => arch-x86/asm}/asm_defns.h | 0 .../{asm-x86 => arch-x86/asm}/atomic.h | 0 .../{asm-x86 => arch-x86/asm}/bitops.h | 0 xen/include/{asm-x86 => arch-x86/asm}/bug.h | 0 .../{asm-x86 => arch-x86/asm}/byteorder.h | 0 .../{asm-x86 => arch-x86/asm}/bzimage.h | 0 xen/include/{asm-x86 => arch-x86/asm}/cache.h | 0 .../{asm-x86 => arch-x86/asm}/compat.h | 0 .../{asm-x86 => arch-x86/asm}/config.h | 0 .../{asm-x86 => arch-x86/asm}/cpufeature.h | 0 .../{asm-x86 => arch-x86/asm}/cpufeatures.h | 0 .../{asm-x86 => arch-x86/asm}/cpufeatureset.h | 0 xen/include/{asm-x86 => arch-x86/asm}/cpuid.h | 0 .../{asm-x86 => arch-x86/asm}/cpuidle.h | 0 .../{asm-x86 => arch-x86/asm}/current.h | 2 +- .../{asm-x86 => arch-x86/asm}/debugger.h | 0 .../{asm-x86 => arch-x86/asm}/debugreg.h | 0 xen/include/{asm-x86 => arch-x86/asm}/delay.h | 0 xen/include/{asm-x86 => arch-x86/asm}/desc.h | 0 .../{asm-x86 => arch-x86/asm}/device.h | 0 xen/include/{asm-x86 => arch-x86/asm}/div64.h | 0 .../{asm-x86 => arch-x86/asm}/dom0_build.h | 0 .../{asm-x86 => arch-x86/asm}/domain.h | 2 +- xen/include/{asm-x86 => arch-x86/asm}/e820.h | 0 xen/include/{asm-x86 => arch-x86/asm}/edd.h | 0 .../{asm-x86 => arch-x86/asm}/efibind.h | 0 xen/include/{asm-x86 => arch-x86/asm}/elf.h | 0 xen/include/{asm-x86 => arch-x86/asm}/event.h | 0 .../{asm-x86 => arch-x86/asm}/fixmap.h | 0 .../{asm-x86 => arch-x86/asm}/flushtlb.h | 0 .../{asm-x86 => arch-x86/asm}/genapic.h | 0 .../{asm-x86 => arch-x86/asm}/grant_table.h | 0 xen/include/{asm-x86 => arch-x86/asm}/guest.h | 0 .../asm}/guest/hyperv-hcall.h | 0 .../asm}/guest/hyperv-tlfs.h | 0 .../{asm-x86 => 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 => arch-x86/asm}/guest/xen.h | 0 .../{asm-x86 => arch-x86/asm}/guest_access.h | 0 .../{asm-x86 => arch-x86/asm}/guest_atomics.h | 0 .../{asm-x86 => arch-x86/asm}/guest_pt.h | 0 xen/include/{asm-x86 => arch-x86/asm}/hap.h | 0 .../{asm-x86 => arch-x86/asm}/hardirq.h | 0 xen/include/{asm-x86 => arch-x86/asm}/hpet.h | 0 .../{asm-x86 => arch-x86/asm}/hvm/asid.h | 0 .../{asm-x86 => arch-x86/asm}/hvm/cacheattr.h | 0 .../{asm-x86 => arch-x86/asm}/hvm/domain.h | 0 .../{asm-x86 => arch-x86/asm}/hvm/emulate.h | 0 .../asm}/hvm/grant_table.h | 0 .../asm}/hvm/guest_access.h | 0 .../{asm-x86 => arch-x86/asm}/hvm/hvm.h | 0 .../{asm-x86 => arch-x86/asm}/hvm/io.h | 0 .../{asm-x86 => arch-x86/asm}/hvm/ioreq.h | 0 .../{asm-x86 => arch-x86/asm}/hvm/irq.h | 0 .../{asm-x86 => arch-x86/asm}/hvm/monitor.h | 0 .../{asm-x86 => arch-x86/asm}/hvm/nestedhvm.h | 0 .../{asm-x86 => arch-x86/asm}/hvm/save.h | 0 .../{asm-x86 => arch-x86/asm}/hvm/support.h | 0 .../{asm-x86 => arch-x86/asm}/hvm/svm/asid.h | 0 .../asm}/hvm/svm/emulate.h | 0 .../{asm-x86 => arch-x86/asm}/hvm/svm/intr.h | 0 .../asm}/hvm/svm/nestedsvm.h | 0 .../{asm-x86 => arch-x86/asm}/hvm/svm/svm.h | 0 .../asm}/hvm/svm/svmdebug.h | 0 .../{asm-x86 => arch-x86/asm}/hvm/svm/vmcb.h | 0 .../{asm-x86 => arch-x86/asm}/hvm/trace.h | 0 .../{asm-x86 => arch-x86/asm}/hvm/vcpu.h | 0 .../{asm-x86 => arch-x86/asm}/hvm/vioapic.h | 0 .../{asm-x86 => arch-x86/asm}/hvm/viridian.h | 0 .../{asm-x86 => arch-x86/asm}/hvm/vlapic.h | 0 .../{asm-x86 => arch-x86/asm}/hvm/vm_event.h | 0 .../{asm-x86 => arch-x86/asm}/hvm/vmx/vmcs.h | 0 .../{asm-x86 => arch-x86/asm}/hvm/vmx/vmx.h | 0 .../{asm-x86 => arch-x86/asm}/hvm/vmx/vvmx.h | 0 .../{asm-x86 => arch-x86/asm}/hvm/vpic.h | 0 .../{asm-x86 => arch-x86/asm}/hvm/vpt.h | 0 .../{asm-x86 => arch-x86/asm}/hypercall.h | 0 xen/include/{asm-x86 => arch-x86/asm}/i387.h | 0 xen/include/{asm-x86 => arch-x86/asm}/init.h | 0 .../{asm-x86 => arch-x86/asm}/invpcid.h | 0 xen/include/{asm-x86 => arch-x86/asm}/io.h | 0 .../{asm-x86 => arch-x86/asm}/io_apic.h | 0 xen/include/{asm-x86 => arch-x86/asm}/iocap.h | 0 xen/include/{asm-x86 => arch-x86/asm}/iommu.h | 0 xen/include/{asm-x86 => arch-x86/asm}/ioreq.h | 0 xen/include/{asm-x86 => arch-x86/asm}/irq.h | 0 xen/include/{asm-x86 => arch-x86/asm}/ldt.h | 0 .../{asm-x86 => 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 => arch-x86/asm}/machine_kexec.h | 0 .../{asm-x86 => arch-x86/asm}/mc146818rtc.h | 0 xen/include/{asm-x86 => arch-x86/asm}/mce.h | 0 .../{asm-x86 => arch-x86/asm}/mem_access.h | 0 .../{asm-x86 => arch-x86/asm}/mem_paging.h | 0 .../{asm-x86 => arch-x86/asm}/mem_sharing.h | 0 .../{asm-x86 => arch-x86/asm}/microcode.h | 0 xen/include/{asm-x86 => arch-x86/asm}/mm.h | 0 .../{asm-x86 => arch-x86/asm}/monitor.h | 0 .../{asm-x86 => arch-x86/asm}/mpspec.h | 0 .../{asm-x86 => arch-x86/asm}/mpspec_def.h | 0 xen/include/{asm-x86 => arch-x86/asm}/msi.h | 0 .../{asm-x86 => arch-x86/asm}/msr-index.h | 0 xen/include/{asm-x86 => arch-x86/asm}/msr.h | 0 xen/include/{asm-x86 => arch-x86/asm}/mtrr.h | 0 .../{asm-x86 => arch-x86/asm}/multicall.h | 0 xen/include/{asm-x86 => arch-x86/asm}/mwait.h | 0 xen/include/{asm-x86 => arch-x86/asm}/nmi.h | 0 xen/include/{asm-x86 => arch-x86/asm}/nops.h | 0 .../{asm-x86 => arch-x86/asm}/nospec.h | 0 xen/include/{asm-x86 => arch-x86/asm}/numa.h | 0 xen/include/{asm-x86 => arch-x86/asm}/p2m.h | 0 .../{asm-x86 => arch-x86/asm}/page-bits.h | 0 xen/include/{asm-x86 => arch-x86/asm}/page.h | 0 .../{asm-x86 => arch-x86/asm}/paging.h | 0 xen/include/{asm-x86 => arch-x86/asm}/pci.h | 0 .../{asm-x86 => arch-x86/asm}/percpu.h | 0 xen/include/{asm-x86 => arch-x86/asm}/perfc.h | 0 .../{asm-x86 => arch-x86/asm}/perfc_defn.h | 0 .../{asm-x86 => arch-x86/asm}/processor.h | 0 xen/include/{asm-x86 => arch-x86/asm}/psr.h | 0 .../{asm-x86 => arch-x86/asm}/pv/domain.h | 0 .../asm}/pv/grant_table.h | 0 xen/include/{asm-x86 => arch-x86/asm}/pv/mm.h | 0 .../{asm-x86 => arch-x86/asm}/pv/shim.h | 0 .../{asm-x86 => arch-x86/asm}/pv/traps.h | 0 .../{asm-x86 => arch-x86/asm}/random.h | 0 xen/include/{asm-x86 => arch-x86/asm}/regs.h | 0 xen/include/{asm-x86 => arch-x86/asm}/setup.h | 0 .../{asm-x86 => arch-x86/asm}/shadow.h | 0 .../{asm-x86 => arch-x86/asm}/shared.h | 0 xen/include/{asm-x86 => arch-x86/asm}/smp.h | 0 .../{asm-x86 => arch-x86/asm}/softirq.h | 0 .../{asm-x86 => arch-x86/asm}/spec_ctrl.h | 0 .../{asm-x86 => arch-x86/asm}/spec_ctrl_asm.h | 0 .../{asm-x86 => arch-x86/asm}/spinlock.h | 0 .../{asm-x86 => arch-x86/asm}/string.h | 0 .../{asm-x86 => arch-x86/asm}/system.h | 0 xen/include/{asm-x86 => arch-x86/asm}/tboot.h | 0 xen/include/{asm-x86 => arch-x86/asm}/time.h | 0 xen/include/{asm-x86 => arch-x86/asm}/trace.h | 0 xen/include/{asm-x86 => arch-x86/asm}/traps.h | 0 xen/include/{asm-x86 => arch-x86/asm}/types.h | 0 .../{asm-x86 => arch-x86/asm}/uaccess.h | 0 .../{asm-x86 => arch-x86/asm}/unaligned.h | 0 .../{asm-x86 => arch-x86/asm}/vm_event.h | 0 xen/include/{asm-x86 => arch-x86/asm}/vpmu.h | 0 .../{asm-x86 => arch-x86/asm}/x86-defns.h | 0 .../{asm-x86 => arch-x86/asm}/x86-vendors.h | 0 .../asm}/x86_64/efibind.h | 0 .../{asm-x86 => arch-x86/asm}/x86_64/elf.h | 0 .../{asm-x86 => arch-x86/asm}/x86_64/page.h | 0 .../{asm-x86 => arch-x86/asm}/x86_64/regs.h | 0 .../{asm-x86 => arch-x86/asm}/x86_64/system.h | 0 .../asm}/x86_64/uaccess.h | 0 .../{asm-x86 => arch-x86/asm}/x86_emulate.h | 0 .../{asm-x86 => arch-x86/asm}/xenoprof.h | 0 .../{asm-x86 => 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 => arch-arm/asm}/acpi.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/alternative.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/altp2m.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/arm32/atomic.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/arm32/bitops.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/arm32/bug.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/arm32/cmpxchg.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/arm32/flushtlb.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/arm32/insn.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/arm32/io.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/arm32/macros.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/arm32/mm.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/arm32/page.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/arm32/processor.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/arm32/sysregs.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/arm32/system.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/arm32/traps.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/arm32/vfp.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/arm64/atomic.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/arm64/bitops.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/arm64/brk.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/arm64/bug.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/arm64/cmpxchg.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/arm64/efibind.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/arm64/flushtlb.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/arm64/hsr.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/arm64/insn.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/arm64/io.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/arm64/macros.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/arm64/mm.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/arm64/page.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/arm64/processor.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/arm64/sysregs.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/arm64/system.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/arm64/traps.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/arm64/vfp.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/asm_defns.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/atomic.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/bitops.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/bug.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/byteorder.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/cache.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/cadence-uart.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/config.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/cpregs.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/cpuerrata.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/cpufeature.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/current.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/debugger.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/delay.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/desc.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/device.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/div64.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/domain.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/domain_build.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/early_printk.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/efibind.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/elf.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/event.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/exynos4210-uart.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/flushtlb.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/gic.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/gic_v3_defs.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/gic_v3_its.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/grant_table.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/guest_access.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/guest_atomics.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/guest_walk.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/hardirq.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/hsr.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/hypercall.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/init.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/insn.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/io.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/iocap.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/iommu.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/iommu_fwspec.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/ioreq.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/irq.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/kernel.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/livepatch.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/lpae.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/macros.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/mem_access.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/mm.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/mmio.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/monitor.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/new_vgic.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/nospec.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/numa.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/p2m.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/page-bits.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/page.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/paging.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/pci.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/percpu.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/perfc.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/perfc_defn.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/pl011-uart.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/platform.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/platforms/exynos5.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/platforms/midway.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/platforms/omap5.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/platforms/vexpress.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/platforms/xilinx-zynqmp-eemi.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/processor.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/procinfo.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/psci.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/random.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/regs.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/scif-uart.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/setup.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/short-desc.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/smccc.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/smp.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/softirq.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/spinlock.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/string.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/sysregs.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/system.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/tee/optee_msg.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/tee/optee_rpc_cmd.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/tee/optee_smc.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/tee/tee.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/time.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/trace.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/traps.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/types.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/vfp.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/vgic-emul.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/vgic.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/vm_event.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/vpl011.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/vpsci.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/vreg.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/vtimer.h (100%) rename xen/include/{asm-arm => arch-arm/asm}/xenoprof.h (100%) rename xen/include/{asm-riscv => arch-riscv/asm}/config.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/acpi.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/alternative-asm.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/alternative.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/altp2m.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/amd.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/apic.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/apicdef.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/asm-defns.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/asm_defns.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/atomic.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/bitops.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/bug.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/byteorder.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/bzimage.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/cache.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/compat.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/config.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/cpufeature.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/cpufeatures.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/cpufeatureset.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/cpuid.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/cpuidle.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/current.h (99%) rename xen/include/{asm-x86 => arch-x86/asm}/debugger.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/debugreg.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/delay.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/desc.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/device.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/div64.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/dom0_build.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/domain.h (99%) rename xen/include/{asm-x86 => arch-x86/asm}/e820.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/edd.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/efibind.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/elf.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/event.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/fixmap.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/flushtlb.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/genapic.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/grant_table.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/guest.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/guest/hyperv-hcall.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/guest/hyperv-tlfs.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/guest/hyperv.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/guest/hypervisor.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/guest/pvh-boot.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/guest/xen-hcall.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/guest/xen.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/guest_access.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/guest_atomics.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/guest_pt.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/hap.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/hardirq.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/hpet.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/hvm/asid.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/hvm/cacheattr.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/hvm/domain.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/hvm/emulate.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/hvm/grant_table.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/hvm/guest_access.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/hvm/hvm.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/hvm/io.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/hvm/ioreq.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/hvm/irq.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/hvm/monitor.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/hvm/nestedhvm.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/hvm/save.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/hvm/support.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/hvm/svm/asid.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/hvm/svm/emulate.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/hvm/svm/intr.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/hvm/svm/nestedsvm.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/hvm/svm/svm.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/hvm/svm/svmdebug.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/hvm/svm/vmcb.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/hvm/trace.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/hvm/vcpu.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/hvm/vioapic.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/hvm/viridian.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/hvm/vlapic.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/hvm/vm_event.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/hvm/vmx/vmcs.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/hvm/vmx/vmx.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/hvm/vmx/vvmx.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/hvm/vpic.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/hvm/vpt.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/hypercall.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/i387.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/init.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/invpcid.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/io.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/io_apic.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/iocap.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/iommu.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/ioreq.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/irq.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/ldt.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/livepatch.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/mach-default/bios_ebda.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/mach-default/io_ports.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/mach-default/irq_vectors.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/mach-default/mach_mpparse.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/mach-default/mach_mpspec.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/mach-generic/mach_apic.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/mach-generic/mach_mpparse.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/machine_kexec.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/mc146818rtc.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/mce.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/mem_access.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/mem_paging.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/mem_sharing.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/microcode.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/mm.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/monitor.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/mpspec.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/mpspec_def.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/msi.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/msr-index.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/msr.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/mtrr.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/multicall.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/mwait.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/nmi.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/nops.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/nospec.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/numa.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/p2m.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/page-bits.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/page.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/paging.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/pci.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/percpu.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/perfc.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/perfc_defn.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/processor.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/psr.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/pv/domain.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/pv/grant_table.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/pv/mm.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/pv/shim.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/pv/traps.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/random.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/regs.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/setup.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/shadow.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/shared.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/smp.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/softirq.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/spec_ctrl.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/spec_ctrl_asm.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/spinlock.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/string.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/system.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/tboot.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/time.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/trace.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/traps.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/types.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/uaccess.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/unaligned.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/vm_event.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/vpmu.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/x86-defns.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/x86-vendors.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/x86_64/efibind.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/x86_64/elf.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/x86_64/page.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/x86_64/regs.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/x86_64/system.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/x86_64/uaccess.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/x86_emulate.h (100%) rename xen/include/{asm-x86 => arch-x86/asm}/xenoprof.h (100%) rename xen/include/{asm-x86 => 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 @@ -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 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 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 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/* @@ -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 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 VPCI M: Roger Pau Monné @@ -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 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 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)) -/* 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 -/* 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 */ 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: -hpet.h: $(XEN_ROOT)/xen/include/asm-x86/hpet.h +hpet.h: $(XEN_ROOT)/xen/include/arch-x86/asm/hpet.h cp $< $@ 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 = $(call as-insn,$(CC),".L0: .L1: .skip (.L1 - .L0)",,-no-integrated-as) # Check whether clang asm()-s support .include. -t2 = $(call as-insn,$(CC) -I$(BASEDIR)/include,".include \"asm-x86/asm-defns.h\"",,-no-integrated-as) +t2 = $(call as-insn,$(CC) -I$(BASEDIR)/include/arch-x86,".include \"asm/asm-defns.h\"",,-no-integrated-as) # Check whether clang keeps .macro-s between asm()-s: # https://bugs.llvm.org/show_bug.cgi?id=36110 @@ -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 .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-offsets.h $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) $@ # drivers/char/console.o contains static banner/compile info. Blow it away. @@ -429,7 +428,7 @@ 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,$@) -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 SUBDIRS = 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 diff --git a/xen/arch/arm/README.LinuxPrimitives b/xen/arch/arm/README.LinuxPrimitives index 664a9f89ed27..733cc22c2cd5 100644 --- a/xen/arch/arm/README.LinuxPrimitives +++ b/xen/arch/arm/README.LinuxPrimitives @@ -8,19 +8,19 @@ arm64: bitops: last sync @ v3.16-rc6 (last commit: 8715466b6027) -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/bitops.h --------------------------------------------------------------------- cmpxchg: last sync @ v3.16-rc6 (last commit: e1dfda9ced9b) -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/cmpxchg.h --------------------------------------------------------------------- atomics: last sync @ v3.16-rc6 (last commit: 8715466b6027) -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/atomic.h 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/arm32/lib/findbit.S cmpxchg: last sync @ v3.16-rc6 (last commit: c32ffce0f66e) -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/cmpxchg.h --------------------------------------------------------------------- atomics: last sync @ v3.16-rc6 (last commit: 030d0178bdbd) -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/atomic.h 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 CFLAGS += -I$(BASEDIR)/include +CFLAGS += -I$(BASEDIR)/include/arch-$(TARGET_ARCH) $(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] identity_mapping_removed: - /* See asm-arm/arm32/flushtlb.h for the explanation of the sequence. */ + /* See arch-arm/asm/arm32/flushtlb.h for the explanation of the sequence. */ 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] identity_mapping_removed: - /* See asm-arm/arm64/flushtlb.h for the explanation of the sequence. */ + /* See arch-arm/asm/arm64/flushtlb.h for the explanation of the sequence. */ 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] = { [0 ... NR_CPUS-1] = MPIDR_INVALID }; -/* 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 = { { [0] = 1UL } }; /* 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, uint32_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: ; .PHONY: include -include: $(BASEDIR)/include/asm-x86/asm-macros.h +include: $(BASEDIR)/include/arch-x86/asm/asm-macros.h asm-macros.i: CFLAGS-y += -D__ASSEMBLY__ -P -$(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 := 0x200000 CFLAGS += -I$(BASEDIR)/include -CFLAGS += -I$(BASEDIR)/include/asm-x86/mach-generic -CFLAGS += -I$(BASEDIR)/include/asm-x86/mach-default +CFLAGS += -I$(BASEDIR)/include/arch-$(TARGET_ARCH) +CFLAGS += -I$(BASEDIR)/include/arch-x86/asm/mach-generic +CFLAGS += -I$(BASEDIR)/include/arch-x86/asm/mach-default CFLAGS += -DXEN_IMG_OFFSET=$(XEN_IMG_OFFSET) # 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 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=3), 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=3), 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. */ 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); /* * 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 = INVALID_MFN_INITIALIZER; 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/alternative.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/arm32/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/asm/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/arm32/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/arm32/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/arm32/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/arm32/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/asm/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/arm32/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/arm32/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/arm64/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/arm64/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/asm/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/arm64/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/arm64/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/arm64/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/arm64/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/arm64/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/asm/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/arm64/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/arm64/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/byteorder.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/cpuerrata.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/cpufeature.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/current.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/debugger.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/efibind.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/asm/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/flushtlb.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/gic_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/gic_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/grant_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/guest_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/hardirq.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/hypercall.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/livepatch.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/mem_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/monitor.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/page-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/perfc_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/pl011-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/platform.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/asm/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-arm/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/include/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/processor.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/procinfo.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/scif-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/short-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/softirq.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/spinlock.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/sysregs.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/tee.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/vgic-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_event.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/xenoprof.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/config.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/asm/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/alternative.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/apicdef.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/byteorder.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/bzimage.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/cpufeature.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/cpufeatures.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/cpuidle.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/current.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; - /* 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/debugger.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/debugreg.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/dom0_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; /* 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/efibind.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/flushtlb.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/genapic.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/grant_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-x86/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/asm/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/asm/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/guest/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/guest_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/hardirq.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/hvm/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/hvm/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/asm/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/hvm.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/irq.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/hvm/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/hvm/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/asm/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/hvm/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/hvm/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/hvm/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/hvm/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/vpt.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/hypercall.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/invpcid.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_apic.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/livepatch.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/arch-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/arch-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/arch-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/arch-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/mc146818rtc.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/mem_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/mem_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/mem_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/microcode.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/monitor.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/mpspec_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/multicall.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/page-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/perfc_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/processor.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/asm/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/shim.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/traps.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/softirq.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/spec_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/spinlock.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/uaccess.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/unaligned.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_event.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/x86-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/asm/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/x86_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/x86_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/x86_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/asm/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/x86_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/xenoprof.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) /* - * 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/fixmap.h + * or arch-arm/asm/config.h, 64 pages(256KB) is large enough for most cases.) */ #define NUM_FIXMAP_ACPI_PAGES 64 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. From patchwork Thu Jul 1 14:09:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12354219 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 06A21C11F6E for ; Thu, 1 Jul 2021 14:22:07 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D10BE613FE for ; Thu, 1 Jul 2021 14:22:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D10BE613FE Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=citrix.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.148824.275159 (Exim 4.92) (envelope-from ) id 1lyxZp-0006Gf-3o; Thu, 01 Jul 2021 14:22:01 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version 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-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 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 -.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 = 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 += .banner # compile.h contains dynamic build info. Rebuilt on every 'make' invocation. include/xen/compile.h: include/xen/compile.h.in .banner From patchwork Thu Jul 1 14:10:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12354173 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 65B25C11F64 for ; Thu, 1 Jul 2021 14:11:43 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1EEB7613FE for ; Thu, 1 Jul 2021 14:11:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1EEB7613FE Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=citrix.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.148726.274988 (Exim 4.92) (envelope-from ) id 1lyxPl-0005zt-PE; Thu, 01 Jul 2021 14:11:37 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version 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-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 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 .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 .PHONY: _distclean _distclean: clean @@ -378,7 +378,7 @@ $(TARGET).gz: $(TARGET) gzip -n -f -9 < $< > $@.new mv $@.new $@ -$(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-offsets.h $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) $@ -# 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 = BANNER $@ define cmd_banner if which figlet >/dev/null 2>&1 ; then \ @@ -413,22 +405,29 @@ endef $(call if_changed,banner) targets += .banner -# compile.h contains dynamic build info. Rebuilt on every 'make' invocation. -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 "unavailable")!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) 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 = $(filter-out $(PHONY), $^) # Escape single quote for use in echo statements escsq = $(subst $(squote),'\$(squote)',$1) +### +# Easy method for doing a status message + kecho := : + quiet_kecho := echo +silent_kecho := : +kecho := $($(quiet)kecho) + +### +# filechk is used to check if the content of a generated file is updated. +# Sample usage: +# +# filechk_sample = 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 += $(call as-insn,CC FLAGS,"insn",option-yes,option-no) as-insn = $(if $(shell echo 'void _(void) { asm volatile ( $(2) ); }' \ From patchwork Thu Jul 1 14:10:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12354217 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1489CC11F69 for ; Thu, 1 Jul 2021 14:22:05 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DE937613FE for ; Thu, 1 Jul 2021 14:22:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DE937613FE Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=citrix.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.148818.275146 (Exim 4.92) (envelope-from ) id 1lyxZl-0005bc-Qk; Thu, 01 Jul 2021 14:21:57 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version 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-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_Pau_Monn=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 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),) # Check if the compiler supports the MS ABI. -export XEN_BUILD_EFI := $(shell $(CC) $(XEN_CFLAGS) -c efi/check.c -o efi/check.o 2>/dev/null && echo y) +XEN_BUILD_EFI := $(shell $(CC) $(XEN_CFLAGS) -c efi/check.c -o efi/check.o 2>/dev/null && echo y) CFLAGS-$(XEN_BUILD_EFI) += -DXEN_BUILD_EFI # 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=alignment) endif +ifneq ($(CONFIG_PV_SHIM_EXCLUSIVE),y) +# Check if the compiler supports the MS ABI. +export XEN_BUILD_EFI := $(call try-run,$(CC) $(CFLAGS) -c arch/x86/efi/check.c -o "$$TMPO",y) +endif + # Set up the assembler include path properly for older toolchains. CFLAGS += -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 +# output directory for tests below +TMPOUT = .tmp_$$$$ + +# try-run +# Usage: option = $(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 = $(shell set -e; \ + TMP=$(TMPOUT)/tmp; \ + TMPO=$(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 += $(call as-insn,CC FLAGS,"insn",option-yes,option-no) as-insn = $(if $(shell echo 'void _(void) { asm volatile ( $(2) ); }' \ From patchwork Thu Jul 1 14:10:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12354197 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7AB17C11F64 for ; Thu, 1 Jul 2021 14:21:48 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 49FB761406 for ; Thu, 1 Jul 2021 14:21:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 49FB761406 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=citrix.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.148778.275049 (Exim 4.92) (envelope-from ) id 1lyxZV-00028B-Q2; Thu, 01 Jul 2021 14:21:41 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version 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-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 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 ifeq ($(CONFIG_LTO),y) From patchwork Thu Jul 1 14:10:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12354211 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9DDD3C11F64 for ; Thu, 1 Jul 2021 14:21:53 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 731E561406 for ; Thu, 1 Jul 2021 14:21:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 731E561406 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=citrix.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.148792.275101 (Exim 4.92) (envelope-from ) id 1lyxZb-0003gP-CC; Thu, 01 Jul 2021 14:21:47 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version 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-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_Pau_Monn=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 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]* note.o: $(TARGET)-syms - $(OBJCOPY) -O binary --only-section=.note.gnu.build-id $(BASEDIR)/xen-syms $@.bin + $(OBJCOPY) -O binary --only-section=.note.gnu.build-id $< $@.bin $(OBJCOPY) -I binary -O elf64-x86-64 -B i386:x86-64 \ --rename-section=.data=.note.gnu.build-id -S $@.bin $@ rm -f $@.bin From patchwork Thu Jul 1 14:10:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12354203 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 18556C11F6B for ; Thu, 1 Jul 2021 14:21:50 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B807C613FE for ; Thu, 1 Jul 2021 14:21:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B807C613FE Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=citrix.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.148784.275072 (Exim 4.92) (envelope-from ) id 1lyxZX-0002jG-OV; Thu, 01 Jul 2021 14:21:43 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version 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-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_Pau_Monn?= =?utf-8?q?=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 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 += -flto LDFLAGS-$(CONFIG_CC_IS_CLANG) += -plugin LLVMgold.so endif +# Note that link order matters! +ALL_OBJS-y := common/built_in.o +ALL_OBJS-y += drivers/built_in.o +ALL_OBJS-y += lib/built_in.o +ALL_OBJS-y += xsm/built_in.o +ALL_OBJS-y += arch/$(TARGET_ARCH)/built_in.o +ALL_OBJS-$(CONFIG_CRYPTO) += crypto/built_in.o + +ALL_LIBS-y := lib/lib.a + include $(BASEDIR)/arch/$(TARGET_ARCH)/arch.mk +export ALL_OBJS := $(ALL_OBJS-y) +export ALL_LIBS := $(ALL_LIBS-y) + # define new variables to avoid the ones defined in Config.mk export XEN_CFLAGS := $(CFLAGS) export XEN_AFLAGS := $(AFLAGS) @@ -378,7 +391,8 @@ $(TARGET).gz: $(TARGET) gzip -n -f -9 < $< > $@.new mv $@.new $@ -$(TARGET): FORCE +PHONY += 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-offsets.h + +$(ALL_OBJS) $(ALL_LIBS): prepare + +# head.o is built by descending into arch/arm/$(TARGET_SUBARCH), depends on 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_lto.o FORCE + $(call if_changed,ld) +else +prelink.o: $(ALL_OBJS) $(ALL_LIBS) FORCE + $(call if_changed,ld) +endif + +targets += prelink.o + +$(TARGET): prelink.o FORCE $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) $@ quiet_cmd_banner = 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 TARGET := $(BASEDIR)/xen -# Note that link order matters! -ALL_OBJS-y += $(BASEDIR)/common/built_in.o -ALL_OBJS-y += $(BASEDIR)/drivers/built_in.o -ALL_OBJS-y += $(BASEDIR)/lib/built_in.o -ALL_OBJS-y += $(BASEDIR)/xsm/built_in.o -ALL_OBJS-y += $(BASEDIR)/arch/$(TARGET_ARCH)/built_in.o -ALL_OBJS-$(CONFIG_CRYPTO) += $(BASEDIR)/crypto/built_in.o - -ALL_LIBS-y := $(BASEDIR)/lib/lib.a - # Initialise some variables lib-y := targets := CFLAGS-y := AFLAGS-y := -ALL_OBJS := $(ALL_OBJS-y) -ALL_LIBS := $(ALL_LIBS-y) - SPECIAL_DATA_SECTIONS := 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 += dtb.o endif -ALL_OBJS := $(TARGET_SUBARCH)/head.o $(ALL_OBJS) - -# head.o is built by descending into the sub-directory, depends on the part of -# $(ALL_OBJS) that will eventually recurse into $(TARGET_SUBARCH)/ and build -# head.o -$(TARGET_SUBARCH)/head.o: $(BASEDIR)/arch/arm/built_in.o -$(TARGET_SUBARCH)/head.o: ; - ifdef CONFIG_LIVEPATCH all_symbols = --all-symbols ifdef CONFIG_FAST_SYMBOL_LOOKUP @@ -96,33 +88,18 @@ ifeq ($(CONFIG_ARM_64),y) ln -sf $(@F) $@.efi endif -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_lto.o - $(call if_changed,ld) -else -prelink.o: $(ALL_OBJS) $(ALL_LIBS) FORCE - $(call if_changed,ld) -endif - -targets += 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=sysv $(@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=sysv $(@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=sysv $(@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 += --fix-cortex-a53-843419 endif endif + +ALL_OBJS-y := 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) endif # $(efi-y) -ALL_OBJS := $(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_lto.o FORCE - $(call if_changed,ld) -else -prelink.o: $(ALL_OBJS) $(ALL_LIBS) FORCE - $(call if_changed,ld) -endif - -targets += 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=sysv $(@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=sysv $(@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=sysv $(@D)/$(@F) \ | $(BASEDIR)/tools/symbols --all-symbols --xensyms --sysv --sort \ @@ -242,7 +225,7 @@ note_file_option ?= $(note_file) ifeq ($(XEN_BUILD_PE),y) extra-y += efi.lds -$(TARGET).efi: prelink.o $(note_file) efi.lds efi/relocs-dummy.o efi/mkreloc +$(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 info 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 # Set up the assembler include path properly for older toolchains. CFLAGS += -Wa,-I$(BASEDIR)/include + +ALL_OBJS-y := arch/x86/boot/built_in.o arch/x86/efi/built_in.o $(ALL_OBJS-y) From patchwork Thu Jul 1 14:10:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12354205 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B9B21C11F6C for ; Thu, 1 Jul 2021 14:21:51 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 89498613FE for ; Thu, 1 Jul 2021 14:21:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 89498613FE Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=citrix.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.148786.275086 (Exim 4.92) (envelope-from ) id 1lyxZZ-00036P-DP; Thu, 01 Jul 2021 14:21:45 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version 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-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_Pau_Monn=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 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 += xen.lds ifneq ($(CONFIG_HVM),y) x86_emulate.o: CFLAGS-y += -Wno-unused-label endif -x86_emulate.o: x86_emulate/x86_emulate.c x86_emulate/x86_emulate.h efi-y := $(shell if [ ! -r $(BASEDIR)/include/xen/compile.h -o \ -O $(BASEDIR)/include/xen/compile.h ]; then \ From patchwork Thu Jul 1 14:10:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12354195 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B91EDC11F64 for ; Thu, 1 Jul 2021 14:21:44 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 81B8F613FE for ; Thu, 1 Jul 2021 14:21:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 81B8F613FE Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=citrix.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.148759.275027 (Exim 4.92) (envelope-from ) id 1lyxZS-0001hQ-FV; Thu, 01 Jul 2021 14:21:38 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version 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-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 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 := $(subdir-y) $(subdir-n) $(subdir-) \ $(patsubst %/,%, $(filter %/, $(obj-y) $(obj-n) $(obj-))) -DEPS_RM = $(DEPS) $(DEPS_INCLUDE) .PHONY: clean clean:: $(subdir-all) - rm -f *.o .*.o.tmp *~ core $(DEPS_RM) # Descending # --------------------------------------------------------------------------- From patchwork Thu Jul 1 14:10:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12354213 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7DB40C11F67 for ; Thu, 1 Jul 2021 14:22:04 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2DD03613FE for ; Thu, 1 Jul 2021 14:22:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2DD03613FE Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=citrix.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.148811.275137 (Exim 4.92) (envelope-from ) id 1lyxZj-0005IG-RI; Thu, 01 Jul 2021 14:21:55 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version 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-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_Pau_Monn?= =?utf-8?q?=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 In a future patch, when building a subdirectory, we will set "obj=$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 # +obj := . +src := $(obj) + -include $(BASEDIR)/include/config/auto.conf include $(XEN_ROOT)/Config.mk @@ -23,7 +26,7 @@ SPECIAL_DATA_SECTIONS := rodata $(foreach a,1 2 4 8 16, \ rodata.cst$(a)) \ $(foreach r,rel rel.ro,data.$(r).local) -include Makefile +include $(src)/Makefile # 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 -$(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=sysv $(@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=sysv $(@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=sysv $(@D)/$(@F) \ | $(BASEDIR)/tools/symbols --all-symbols --xensyms --sysv --sort \ @@ -109,13 +109,13 @@ $(TARGET)-syms: $(BASEDIR)/prelink.o xen.lds .PHONY: include include: -xen.lds: xen.lds.S FORCE +$(obj)/xen.lds: $(src)/xen.lds.S FORCE $(call if_changed,cpp_lds_S) -dtb.o: $(patsubst "%",%,$(CONFIG_DTB_FILE)) +$(obj)/dtb.o: $(patsubst "%",%,$(CONFIG_DTB_FILE)) .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 += asm-macros.i extra-y += xen.lds ifneq ($(CONFIG_HVM),y) -x86_emulate.o: CFLAGS-y += -Wno-unused-label +$(obj)/x86_emulate.o: CFLAGS-y += -Wno-unused-label endif efi-y := $(shell if [ ! -r $(BASEDIR)/include/xen/compile.h -o \ @@ -113,8 +113,8 @@ syms-warn-dup-$(CONFIG_SUPPRESS_DUPLICATE_SYMBOL_WARNINGS) := syms-warn-dup-$(CONFIG_ENFORCE_UNIQUE_SYMBOLS) := --error-dup $(TARGET): TMP = $(@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_rwdata_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),) # Check if the compiler supports the MS ABI. -XEN_BUILD_EFI := $(shell $(CC) $(XEN_CFLAGS) -c efi/check.c -o efi/check.o 2>/dev/null && echo y) +XEN_BUILD_EFI := $(shell $(CC) $(XEN_CFLAGS) -c $(src)/efi/check.c -o $(obj)/efi/check.o 2>/dev/null && echo y) CFLAGS-$(XEN_BUILD_EFI) += -DXEN_BUILD_EFI # Check if the linker supports PE. EFI_LDFLAGS = $(patsubst -m%,-mi386pep,$(XEN_LDFLAGS)) --subsystem=10 -XEN_BUILD_PE := $(if $(XEN_BUILD_EFI),$(call ld-option,$(EFI_LDFLAGS) --image-base=0x100000000 -o efi/check.efi efi/check.o)) +XEN_BUILD_PE := $(if $(XEN_BUILD_EFI),$(call ld-option,$(EFI_LDFLAGS) --image-base=0x100000000 -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 += --strip-debug -XEN_BUILD_PE := $(call ld-option,$(EFI_LDFLAGS) --image-base=0x100000000 -o efi/check.efi efi/check.o) +XEN_BUILD_PE := $(call ld-option,$(EFI_LDFLAGS) --image-base=0x100000000 -o $(obj)/efi/check.efi $(obj)/efi/check.o) endif ifeq ($(XEN_BUILD_PE),y) # Check if the linker produces fixups in PE by default -nr-fixups := $(shell $(OBJDUMP) -p efi/check.efi | grep '^[[:blank:]]*reloc[[:blank:]]*[0-9][[:blank:]].*DIR64$$' | wc -l) +nr-fixups := $(shell $(OBJDUMP) -p $(obj)/efi/check.efi | grep '^[[:blank:]]*reloc[[:blank:]]*[0-9][[:blank:]].*DIR64$$' | wc -l) ifeq ($(nr-fixups),2) MKRELOC := : relocs-dummy := else -MKRELOC := efi/mkreloc -relocs-dummy := efi/relocs-dummy.o +MKRELOC := $(obj)/efi/mkreloc +relocs-dummy := $(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 wouldn't # recognize the option. @@ -160,27 +160,27 @@ endif # $(XEN_BUILD_PE) endif # $(efi-y) -$(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=sysv $(@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=sysv $(@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=sysv $(@D)/$(@F) \ | $(BASEDIR)/tools/symbols --all-symbols --xensyms --sysv --sort \ >$(@D)/$(@F).map rm -f $(@D)/.$(@F).[0-9]* $(@D)/..$(@F).[0-9]* -note.o: $(TARGET)-syms +$(obj)/note.o: $(TARGET)-syms $(OBJCOPY) -O binary --only-section=.note.gnu.build-id $< $@.bin $(OBJCOPY) -I binary -O elf64-x86-64 -B i386:x86-64 \ --rename-section=.data=.note.gnu.build-id -S $@.bin $@ @@ -199,23 +199,23 @@ ifdef SOURCE_DATE_EPOCH EFI_LDFLAGS += --no-insert-timestamp endif -$(TARGET).efi: VIRT_BASE = 0x$(shell $(NM) efi/relocs-dummy.o | sed -n 's, A VIRT_START$$,,p') +$(TARGET).efi: VIRT_BASE = 0x$(shell $(NM) $(obj)/efi/relocs-dummy.o | sed -n 's, A VIRT_START$$,,p') ifeq ($(MKRELOC),:) $(TARGET).efi: ALT_BASE := else -$(TARGET).efi: ALT_BASE = 0x$(shell $(NM) efi/relocs-dummy.o | sed -n 's, A ALT_START$$,,p') +$(TARGET).efi: ALT_BASE = 0x$(shell $(NM) $(obj)/efi/relocs-dummy.o | sed -n 's, A ALT_START$$,,p') endif ifneq ($(build_id_linker),) ifeq ($(call ld-ver-build-id,$(LD) $(filter -m%,$(EFI_LDFLAGS))),y) CFLAGS-y += -DBUILD_ID_EFI EFI_LDFLAGS += $(build_id_linker) -note_file := efi/buildid.o +note_file := $(obj)/efi/buildid.o # NB: this must be the last input in the linker call, because inputs following # the -b option will all be treated as being in the specified format. note_file_option := -b pe-x86-64 $(note_file) else -note_file := note.o +note_file := $(obj)/note.o endif else note_file := @@ -224,25 +224,25 @@ note_file_option ?= $(note_file) ifeq ($(XEN_BUILD_PE),y) extra-y += 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 info from $(@F)" endif $(foreach base, $(VIRT_BASE) $(ALT_BASE), \ - $(LD) $(call EFI_LDFLAGS,$(base)) -T efi.lds -N $< $(relocs-dummy) \ + $(LD) $(call EFI_LDFLAGS,$(base)) -T $(obj)/efi.lds -N $< $(relocs-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=sysv $(@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=sysv $(@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=sysv $(@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) disabled' endif -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/built_in.o +$(obj)/efi/buildid.o $(obj)/efi/relocs-dummy.o: ; .PHONY: include include: $(BASEDIR)/include/arch-x86/asm/asm-macros.h -asm-macros.i: CFLAGS-y += -D__ASSEMBLY__ -P +$(obj)/asm-macros.i: CFLAGS-y += -D__ASSEMBLY__ -P -$(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)/Makefile echo '#if 0' >$@.new echo '.if 0' >>$@.new echo '#endif' >>$@.new @@ -275,14 +275,14 @@ $(BASEDIR)/include/arch-x86/asm/asm-macros.h: asm-macros.i Makefile echo '#endif' >>$@.new $(call move-if-changed,$@.new,$@) -efi.lds: AFLAGS-y += -DEFI -xen.lds efi.lds: xen.lds.S FORCE +$(obj)/efi.lds: AFLAGS-y += -DEFI +$(obj)/xen.lds $(obj)/efi.lds: $(src)/xen.lds.S FORCE $(call if_changed,cpp_lds_S) -boot/mkelf32: boot/mkelf32.c +$(obj)/boot/mkelf32: $(src)/boot/mkelf32.c $(HOSTCC) $(HOSTCFLAGS) -o $@ $< -efi/mkreloc: efi/mkreloc.c +$(obj)/efi/mkreloc: $(src)/efi/mkreloc.c $(HOSTCC) $(HOSTCFLAGS) -g -o $@ $< .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 += head.o -DEFS_H_DEPS = defs.h $(BASEDIR)/include/xen/stdbool.h +DEFS_H_DEPS = $(src)/defs.h $(BASEDIR)/include/xen/stdbool.h -CMDLINE_DEPS = $(DEFS_H_DEPS) video.h +CMDLINE_DEPS = $(DEFS_H_DEPS) $(src)/video.h RELOC_DEPS = $(DEFS_H_DEPS) \ $(BASEDIR)/include/generated/autoconf.h \ @@ -11,10 +11,10 @@ RELOC_DEPS = $(DEFS_H_DEPS) \ $(BASEDIR)/include/xen/multiboot2.h \ $(BASEDIR)/include/public/arch-x86/hvm/start_info.h -head.o: cmdline.S reloc.S +$(obj)/head.o: $(obj)/cmdline.S $(obj)/reloc.S -cmdline.S: cmdline.c $(CMDLINE_DEPS) - $(MAKE) -f build32.mk $@ CMDLINE_DEPS="$(CMDLINE_DEPS)" +$(obj)/cmdline.S: $(src)/cmdline.c $(CMDLINE_DEPS) + $(MAKE) -f build32.mk -C $(obj) $(@F) CMDLINE_DEPS="$(CMDLINE_DEPS)" -reloc.S: reloc.c $(RELOC_DEPS) - $(MAKE) -f build32.mk $@ RELOC_DEPS="$(RELOC_DEPS)" +$(obj)/reloc.S: $(src)/reloc.c $(RELOC_DEPS) + $(MAKE) -f build32.mk -C $(obj) $(@F) RELOC_DEPS="$(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 += -fshort-wchar quiet_cmd_objcopy_o_ihex = OBJCOPY $@ cmd_objcopy_o_ihex = $(OBJCOPY) -I ihex -O binary $< $@ -%.o: %.ihex FORCE +$(obj)/%.o: $(src)/%.ihex FORCE $(call if_changed,objcopy_o_ihex) -boot.init.o: buildid.o +$(obj)/boot.init.o: $(obj)/buildid.o EFIOBJ-y := boot.init.o pe.init.o ebmalloc.o runtime.o EFIOBJ-$(CONFIG_COMPAT) += compat.o $(call cc-option-add,cflags-stack-boundary,CC,-mpreferred-stack-boundary=4) -$(EFIOBJ-y): CFLAGS-stack-boundary := $(cflags-stack-boundary) +$(addprefix $(obj)/,$(EFIOBJ-y)): CFLAGS-stack-boundary := $(cflags-stack-boundary) obj-y := stub.o obj-$(XEN_BUILD_EFI) := $(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) += libelf/ obj-$(CONFIG_HAS_DEVICE_TREE) += libfdt/ CONF_FILE := $(if $(patsubst /%,,$(KCONFIG_CONFIG)),$(BASEDIR)/)$(KCONFIG_CONFIG) -config.gz: $(CONF_FILE) +$(obj)/config.gz: $(CONF_FILE) gzip -n -c $< >$@ -config_data.o: config.gz +$(obj)/config_data.o: $(obj)/config.gz quiet_cmd_binfile = BINFILE $@ -cmd_binfile = $(SHELL) $< $@ config.gz xen_config_data +cmd_binfile = $(SHELL) $< $@ $(obj)/config.gz xen_config_data -config_data.S: $(BASEDIR)/tools/binfile FORCE +$(obj)/config_data.S: $(BASEDIR)/tools/binfile FORCE $(call if_changed,binfile) targets += config_data.S 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 := $(foreach s,$(SECTIONS),--rename-section .$(s)=.init.$(s)) CFLAGS-y += -Wno-pointer-sign -libelf.o: libelf-temp.o FORCE +$(obj)/libelf.o: $(obj)/libelf-temp.o FORCE $(call if_changed,objcopy) -libelf-temp.o: $(libelf-objs) FORCE +$(obj)/libelf-temp.o: $(addprefix $(obj)/,$(libelf-objs)) FORCE $(call if_changed,ld) extra-y += 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 SECTIONS := text data $(SPECIAL_DATA_SECTIONS) OBJCOPYFLAGS := $(foreach s,$(SECTIONS),--rename-section .$(s)=.init.$(s)) @@ -8,10 +8,10 @@ nocov-y += libfdt.o CFLAGS-y += -I$(BASEDIR)/include/xen/libfdt/ -libfdt.o: libfdt-temp.o FORCE +$(obj)/libfdt.o: $(obj)/libfdt-temp.o FORCE $(call if_changed,objcopy) -libfdt-temp.o: $(LIBFDT_OBJS) FORCE +$(obj)/libfdt-temp.o: $(addprefix $(obj)/,$(LIBFDT_OBJS)) FORCE $(call if_changed,ld) extra-y += 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) += -m32 endif -public-$(CONFIG_X86) := $(wildcard public/arch-x86/*.h public/arch-x86/*/*.h) -public-$(CONFIG_ARM) := $(wildcard public/arch-arm/*.h public/arch-arm/*/*.h) +public-$(CONFIG_X86) := $(wildcard $(src)/public/arch-x86/*.h $(src)/public/arch-x86/*/*.h) +public-$(CONFIG_ARM) := $(wildcard $(src)/public/arch-arm/*.h $(src)/public/arch-arm/*/*.h) .PHONY: all -all: $(headers-y) +all: $(addprefix $(obj)/,$(headers-y)) -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 $@ -compat/%.i: compat/%.c Makefile +$(obj)/compat/%.i: $(obj)/compat/%.c $(src)/Makefile $(CPP) $(filter-out -Wa$(comma)% -include %/include/xen/config.h,$(XEN_CFLAGS)) $(cppflags-y) -o $@ $< -compat/%.c: public/%.h xlat.lst $(BASEDIR)/tools/compat-build-source.py +$(obj)/compat/%.c: $(src)/public/%.h $(src)/xlat.lst $(BASEDIR)/tools/compat-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 $@ -compat/.xlat/%.h: compat/%.h compat/.xlat/%.lst $(BASEDIR)/tools/get-fields.sh Makefile +$(obj)/compat/.xlat/%.h: $(obj)/compat/%.h $(obj)/compat/.xlat/%.lst $(BASEDIR)/tools/get-fields.sh $(src)/Makefile export PYTHON=$(PYTHON); \ while read what name; do \ $(SHELL) $(BASEDIR)/tools/get-fields.sh "$$what" compat_$$name $< || exit $$?; \ done <$(patsubst compat/%,compat/.xlat/%,$(basename $<)).lst >$@.new mv -f $@.new $@ -.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,$@) -xlat-y := $(shell sed -ne 's,@arch@,$(compat-arch-y),g' -re 's,^[?!][[:blank:]]+[^[:blank:]]+[[:blank:]]+,,p' xlat.lst | uniq) +xlat-y := $(shell sed -ne 's,@arch@,$(compat-arch-y),g' -re 's,^[?!][[:blank:]]+[^[:blank:]]+[[:blank:]]+,,p' $(src)/xlat.lst | uniq) xlat-y := $(filter $(patsubst compat/%,%,$(headers-y)),$(xlat-y)) -compat/xlat.h: $(addprefix compat/.xlat/,$(xlat-y)) config/auto.conf Makefile +$(obj)/compat/xlat.h: $(addprefix $(obj)/compat/.xlat/,$(xlat-y)) $(obj)/config/auto.conf $(src)/Makefile cat $(filter %.h,$^) >$@.new mv -f $@.new $@ ifeq ($(XEN_TARGET_ARCH),$(XEN_COMPILE_ARCH)) -all: headers.chk headers99.chk headers++.chk +all: $(obj)/headers.chk $(obj)/headers99.chk $(obj)/headers++.chk -PUBLIC_HEADERS := $(filter-out public/arch-% public/dom0_ops.h, $(wildcard public/*.h public/*/*.h) $(public-y)) +PUBLIC_HEADERS := $(filter-out $(src)/public/arch-% $(src)/public/dom0_ops.h, $(wildcard $(src)/public/*.h $(src)/public/*/*.h) $(public-y)) -PUBLIC_C99_HEADERS := public/io/9pfs.h public/io/pvcalls.h -PUBLIC_ANSI_HEADERS := $(filter-out public/%ctl.h public/xsm/% public/%hvm/save.h $(PUBLIC_C99_HEADERS), $(PUBLIC_HEADERS)) +PUBLIC_C99_HEADERS := $(src)/public/io/9pfs.h $(src)/public/io/pvcalls.h +PUBLIC_ANSI_HEADERS := $(filter-out $(src)/public/%ctl.h $(src)/public/xsm/% $(src)/public/%hvm/save.h $(PUBLIC_C99_HEADERS), $(PUBLIC_HEADERS)) public/io/9pfs.h-prereq := string public/io/pvcalls.h-prereq := string -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 $@ -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 $@ -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=gnu++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 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 # ========================================================================== +obj := . +src := $(obj) + clean:: include $(BASEDIR)/scripts/Kbuild.include -include Makefile +include $(src)/Makefile # Figure out what we need to clean from the various variables # ========================================================================== 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 += flask_op.o obj-y += ss/ -CFLAGS-y += -I./include +CFLAGS-y += -I$(obj)/include AWK = awk -FLASK_H_DEPEND = policy/security_classes policy/initial_sids -AV_H_DEPEND = policy/access_vectors +FLASK_H_DEPEND := $(addprefix $(src)/policy/,security_classes initial_sids) +AV_H_DEPEND = $(src)/policy/access_vectors -FLASK_H_FILES = include/flask.h include/class_to_string.h include/initial_sid_to_string.h -AV_H_FILES = include/av_perm_to_string.h include/av_permissions.h -ALL_H_FILES = $(FLASK_H_FILES) $(AV_H_FILES) +FLASK_H_FILES := flask.h class_to_string.h initial_sid_to_string.h +AV_H_FILES := av_perm_to_string.h av_permissions.h +ALL_H_FILES := $(addprefix include/,$(FLASK_H_FILES) $(AV_H_FILES)) -$(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 += $(ALL_H_FILES) -mkflask := policy/mkflask.sh +mkflask := $(src)/policy/mkflask.sh quiet_cmd_mkflask = MKFLASK $@ -cmd_mkflask = $(SHELL) $(mkflask) $(AWK) include $(FLASK_H_DEPEND) +cmd_mkflask = $(SHELL) $(mkflask) $(AWK) $(obj)/include $(FLASK_H_DEPEND) -$(subst include/,%/,$(FLASK_H_FILES)): $(FLASK_H_DEPEND) $(mkflask) FORCE +$(addprefix $(obj)/%/,$(FLASK_H_FILES)): $(FLASK_H_DEPEND) $(mkflask) FORCE $(call if_changed,mkflask) -mkaccess := policy/mkaccess_vector.sh +mkaccess := $(src)/policy/mkaccess_vector.sh quiet_cmd_mkaccess = MKACCESS VECTOR $@ -cmd_mkaccess = $(SHELL) $(mkaccess) $(AWK) $(AV_H_DEPEND) +cmd_mkaccess = $(SHELL) $(mkaccess) $(AWK) $(obj)/include $(AV_H_DEPEND) -$(subst include/,%/,$(AV_H_FILES)): $(AV_H_DEPEND) $(mkaccess) FORCE +$(addprefix $(obj)/%/,$(AV_H_FILES)): $(AV_H_DEPEND) $(mkaccess) FORCE $(call if_changed,mkaccess) obj-bin-$(CONFIG_XSM_FLASK_POLICY) += flask-policy.o -flask-policy.o: policy.bin +$(obj)/flask-policy.o: $(obj)/policy.bin quiet_cmd_binfile = BINFILE $@ -cmd_binfile = $(SHELL) $< -i $@ policy.bin xsm_flask_init_policy +cmd_binfile = $(SHELL) $< -i $@ $(obj)/policy.bin xsm_flask_init_policy -flask-policy.S: $(BASEDIR)/tools/binfile FORCE +$(obj)/flask-policy.S: $(BASEDIR)/tools/binfile FORCE $(call if_changed,binfile) targets += flask-policy.S FLASK_BUILD_DIR := $(CURDIR) POLICY_SRC := $(FLASK_BUILD_DIR)/xenpolicy-$(XEN_FULLVERSION) -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=$(FLASK_BUILD_DIR) cmp -s $(POLICY_SRC) $@ || cp $(POLICY_SRC) $@ 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=$1 shift +output_dir=$1 +shift + # output files -av_permissions="include/av_permissions.h" -av_perm_to_string="include/av_perm_to_string.h" +av_permissions="$output_dir/av_permissions.h" +av_perm_to_string="$output_dir/av_perm_to_string.h" cat $* | $awk " BEGIN { From patchwork Thu Jul 1 14:10:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12354209 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 515C2C11F67 for ; Thu, 1 Jul 2021 14:21:52 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F186F61406 for ; Thu, 1 Jul 2021 14:21:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F186F61406 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=citrix.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.148782.275064 (Exim 4.92) (envelope-from ) id 1lyxZX-0002cM-4A; Thu, 01 Jul 2021 14:21:43 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version 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-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 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 = \ echo-why = $(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_add) +define multi_depend +$(foreach m, $(notdir $1), \ + $(eval $(obj)/$m: \ + $(addprefix $(obj)/, $(foreach s, $3, $($(m:%$(strip $2)=%$(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=$(shell nm --defined $(1) | grep $(2) | awk '{print "0x"$$1}') CODE_SZ=$(shell nm --defined -S $(1) | grep $(2) | awk '{ print "0x"$$2}') .PHONY: default - -LIVEPATCH := xen_hello_world.livepatch -LIVEPATCH_BYE := xen_bye_world.livepatch -LIVEPATCH_REPLACE := xen_replace_world.livepatch -LIVEPATCH_NOP := xen_nop.livepatch -LIVEPATCH_NO_XEN_BUILDID := xen_no_xen_buildid.livepatch -LIVEPATCH_PREPOST_HOOKS := xen_prepost_hooks.livepatch -LIVEPATCH_PREPOST_HOOKS_FAIL := xen_prepost_hooks_fail.livepatch -LIVEPATCH_ACTION_HOOKS := xen_action_hooks.livepatch -LIVEPATCH_ACTION_HOOKS_NOFUNC := xen_action_hooks_nofunc.livepatch -LIVEPATCH_ACTION_HOOKS_MARKER:= xen_action_hooks_marker.livepatch -LIVEPATCH_ACTION_HOOKS_NOAPPLY:= xen_action_hooks_noapply.livepatch -LIVEPATCH_ACTION_HOOKS_NOREVERT:= xen_action_hooks_norevert.livepatch -LIVEPATCH_EXPECTATIONS:= xen_expectations.livepatch -LIVEPATCH_EXPECTATIONS_FAIL:= xen_expectations_fail.livepatch - -LIVEPATCHES += $(LIVEPATCH) -LIVEPATCHES += $(LIVEPATCH_BYE) -LIVEPATCHES += $(LIVEPATCH_REPLACE) -LIVEPATCHES += $(LIVEPATCH_NOP) -LIVEPATCHES += $(LIVEPATCH_NO_XEN_BUILDID) -LIVEPATCHES += $(LIVEPATCH_PREPOST_HOOKS) -LIVEPATCHES += $(LIVEPATCH_PREPOST_HOOKS_FAIL) -LIVEPATCHES += $(LIVEPATCH_ACTION_HOOKS) -LIVEPATCHES += $(LIVEPATCH_ACTION_HOOKS_NOFUNC) -LIVEPATCHES += $(LIVEPATCH_ACTION_HOOKS_MARKER) -LIVEPATCHES += $(LIVEPATCH_ACTION_HOOKS_NOAPPLY) -LIVEPATCHES += $(LIVEPATCH_ACTION_HOOKS_NOREVERT) -LIVEPATCHES += $(LIVEPATCH_EXPECTATIONS) -LIVEPATCHES += $(LIVEPATCH_EXPECTATIONS_FAIL) - -LIVEPATCH_DEBUG_DIR ?= $(DEBUG_DIR)/xen-livepatch - build default: livepatch -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 += xen_hello_world.livepatch +xen_hello_world-objs := xen_hello_world_func.o xen_hello_world.o note.o xen_note.o modinfo.o +$(obj)/xen_hello_world.o: $(obj)/config.h # # 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=$(call CODE_SZ,$(BASEDIR)/xen-syms,xen_extra_version) -config.h: NEW_CODE_SZ=$(call CODE_SZ,$<,xen_hello_world) -config.h: MINOR_VERSION_SZ=$(call CODE_SZ,$(BASEDIR)/xen-syms,xen_minor_version) -config.h: MINOR_VERSION_ADDR=$(call CODE_ADDR,$(BASEDIR)/xen-syms,xen_minor_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_minor_version)"; \ + echo "#define MINOR_VERSION_ADDR $(call CODE_ADDR,$(BASEDIR)/xen-syms,xen_minor_version)"; \ + echo "#define OLD_CODE_SZ $(call CODE_SZ,$(BASEDIR)/xen-syms,xen_extra_version)") > $@ -xen_hello_world.o: config.h - -.PHONY: $(LIVEPATCH) -$(LIVEPATCH): xen_hello_world_func.o xen_hello_world.o note.o xen_note.o modinfo.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=.data=.modinfo,alloc,load,readonly,data,contents -S $@.bin $@ - #rm -f $@.bin + rm -f $@.bin # # 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=.note.gnu.build-id $(BASEDIR)/xen-syms $@.bin +$(obj)/note.o: $(BASEDIR)/xen-syms + $(OBJCOPY) -O binary --only-section=.note.gnu.build-id $< $@.bin $(OBJCOPY) $(OBJCOPY_MAGIC) \ --rename-section=.data=.livepatch.depends,alloc,load,readonly,data,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=.note.gnu.build-id $(BASEDIR)/xen-syms $@.bin +$(obj)/xen_note.o: $(BASEDIR)/xen-syms + $(OBJCOPY) -O binary --only-section=.note.gnu.build-id $< $@.bin $(OBJCOPY) $(OBJCOPY_MAGIC) \ --rename-section=.data=.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=.note.gnu.build-id $(LIVEPATCH) $@.bin +$(obj)/hello_world_note.o: $(obj)/xen_hello_world.livepatch + $(OBJCOPY) -O binary --only-section=.note.gnu.build-id $< $@.bin $(OBJCOPY) $(OBJCOPY_MAGIC) \ --rename-section=.data=.livepatch.depends,alloc,load,readonly,data,contents -S $@.bin $@ rm -f $@.bin -xen_bye_world.o: config.h -.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 += xen_bye_world.livepatch +xen_bye_world-objs := xen_bye_world_func.o xen_bye_world.o hello_world_note.o xen_note.o +$(obj)/xen_bye_world.o: $(obj)/config.h -xen_replace_world.o: config.h -.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 += xen_replace_world.livepatch +xen_replace_world-objs := xen_replace_world_func.o xen_replace_world.o note.o xen_note.o +$(obj)/xen_replace_world.o: $(obj)/config.h -xen_nop.o: config.h -.PHONY: $(LIVEPATCH_NOP) -$(LIVEPATCH_NOP): xen_nop.o note.o xen_note.o - $(LD) $(LDFLAGS) $(build_id_linker) -r -o $(LIVEPATCH_NOP) $^ +extra-y += xen_nop.livepatch +xen_nop-objs := xen_nop.o note.o xen_note.o +$(obj)/xen_nop.o: $(obj)/config.h # 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 += xen_no_xen_buildid.livepatch +xen_no_xen_buildid-objs := xen_nop.o note.o -xen_prepost_hooks.o: config.h +$(obj)/xen_prepost_hooks.o: $(obj)/config.h -.PHONY: $(LIVEPATCH_PREPOST_HOOKS) -$(LIVEPATCH_PREPOST_HOOKS): xen_prepost_hooks.o xen_hello_world_func.o note.o xen_note.o - $(LD) $(LDFLAGS) $(build_id_linker) -r -o $(LIVEPATCH_PREPOST_HOOKS) $^ +extra-y += xen_prepost_hooks.livepatch +xen_prepost_hooks-objs := xen_prepost_hooks.o xen_hello_world_func.o note.o xen_note.o -xen_prepost_hooks_fail.o: config.h +$(obj)/xen_prepost_hooks_fail.o: $(obj)/config.h -.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 += xen_prepost_hooks_fail.livepatch +xen_prepost_hooks_fail-objs := xen_prepost_hooks_fail.o xen_hello_world_func.o note.o xen_note.o -xen_action_hooks.o: config.h +$(obj)/xen_action_hooks.o: $(obj)/config.h -.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 += xen_action_hooks.livepatch +xen_action_hooks-objs := xen_action_hooks.o xen_hello_world_func.o note.o xen_note.o -xen_action_hooks_nofunc.o: config.h +$(obj)/xen_action_hooks_nofunc.o: $(obj)/config.h -.PHONY: $(LIVEPATCH_ACTION_HOOKS_NOFUNC) -$(LIVEPATCH_ACTION_HOOKS_NOFUNC): xen_action_hooks_nofunc.o note.o xen_note.o - $(LD) $(LDFLAGS) $(build_id_linker) -r -o $(LIVEPATCH_ACTION_HOOKS_NOFUNC) $^ +extra-y += xen_action_hooks_nofunc.livepatch +xen_action_hooks_nofunc-objs := xen_action_hooks_nofunc.o note.o xen_note.o -xen_action_hooks_marker.o: config.h +$(obj)/xen_action_hooks_marker.o: $(obj)/config.h -.PHONY: $(LIVEPATCH_ACTION_HOOKS_MARKER) -$(LIVEPATCH_ACTION_HOOKS_MARKER): xen_action_hooks_marker.o xen_hello_world_func.o note.o xen_note.o - $(LD) $(LDFLAGS) $(build_id_linker) -r -o $(LIVEPATCH_ACTION_HOOKS_MARKER) $^ +extra-y += xen_action_hooks_marker.livepatch +xen_action_hooks_marker-objs := xen_action_hooks_marker.o xen_hello_world_func.o note.o xen_note.o -xen_action_hooks_noapply.o: config.h +$(obj)/xen_action_hooks_noapply.o: $(obj)/config.h -.PHONY: $(LIVEPATCH_ACTION_HOOKS_NOAPPLY) -$(LIVEPATCH_ACTION_HOOKS_NOAPPLY): xen_action_hooks_marker.o xen_hello_world_func.o note.o xen_note.o - $(LD) $(LDFLAGS) $(build_id_linker) -r -o $(LIVEPATCH_ACTION_HOOKS_NOAPPLY) $^ +extra-y += xen_action_hooks_noapply.livepatch +xen_action_hooks_noapply-objs := xen_action_hooks_marker.o xen_hello_world_func.o note.o xen_note.o -xen_action_hooks_norevert.o: config.h +$(obj)/xen_action_hooks_norevert.o: $(obj)/config.h -.PHONY: $(LIVEPATCH_ACTION_HOOKS_NOREVERT) -$(LIVEPATCH_ACTION_HOOKS_NOREVERT): xen_action_hooks_marker.o xen_hello_world_func.o note.o xen_note.o - $(LD) $(LDFLAGS) $(build_id_linker) -r -o $(LIVEPATCH_ACTION_HOOKS_NOREVERT) $^ +extra-y += xen_action_hooks_norevert.livepatch +xen_action_hooks_norevert-objs := xen_action_hooks_marker.o xen_hello_world_func.o note.o xen_note.o EXPECT_BYTES_COUNT := 8 CODE_GET_EXPECT=$(shell $(OBJDUMP) -d --insn-width=1 $(1) | sed -n -e '/<'$(2)'>:$$/,/^$$/ p' | tail -n +2 | head -n $(EXPECT_BYTES_COUNT) | awk '{$$0=$$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=$(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)") > $@ -xen_expectations.o: expect_config.h +$(obj)/xen_expectations.o: $(obj)/expect_config.h -.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 += xen_expectations.livepatch +xen_expectations-objs := xen_expectations.o xen_hello_world_func.o note.o xen_note.o -.PHONY: $(LIVEPATCH_EXPECTATIONS_FAIL) -$(LIVEPATCH_EXPECTATIONS_FAIL): xen_expectations_fail.o xen_hello_world_func.o note.o xen_note.o - $(LD) $(LDFLAGS) $(build_id_linker) -r -o $(LIVEPATCH_EXPECTATIONS_FAIL) $^ +extra-y += xen_expectations_fail.livepatch +xen_expectations_fail-objs := xen_expectations_fail.o xen_hello_world_func.o note.o xen_note.o + + +quiet_cmd_livepatch = LD $@ +cmd_livepatch = $(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 += $(sort $(foreach m,$(basename $(notdir $(filter %.livepatch,$(extra-y)))), \ + $($(m)-objs))) + +LIVEPATCHES := $(filter %.livepatch,$(extra-y)) + +LIVEPATCH_DEBUG_DIR ?= $(DEBUG_DIR)/xen-livepatch .PHONY: livepatch -livepatch: $(LIVEPATCH) $(LIVEPATCH_BYE) $(LIVEPATCH_REPLACE) $(LIVEPATCH_NOP) $(LIVEPATCH_NO_XEN_BUILDID) \ - $(LIVEPATCH_PREPOST_HOOKS) $(LIVEPATCH_PREPOST_HOOKS_FAIL) $(LIVEPATCH_ACTION_HOOKS) \ - $(LIVEPATCH_ACTION_HOOKS_NOFUNC) $(LIVEPATCH_ACTION_HOOKS_MARKER) $(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 From patchwork Thu Jul 1 14:10:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12354199 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 89D91C11F67 for ; Thu, 1 Jul 2021 14:21:48 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3656D613FE for ; Thu, 1 Jul 2021 14:21:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3656D613FE Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=citrix.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.148771.275037 (Exim 4.92) (envelope-from ) id 1lyxZU-0001zi-NN; Thu, 01 Jul 2021 14:21:40 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version 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-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_Pau_Monn=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 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 ?= $(PYTHON_INTERPRETER) export BASEDIR := $(CURDIR) export XEN_ROOT := $(BASEDIR)/.. +srctree := . +objtree := . +export srctree objtree + # Do not use make's built-in rules and variables MAKEFLAGS += -rR @@ -234,7 +238,7 @@ endif CFLAGS += -nostdinc -fno-builtin -fno-common CFLAGS += -Werror -Wredundant-decls -Wno-pointer-arith $(call cc-option-add,CFLAGS,CC,-Wvla) -CFLAGS += -pipe -D__XEN__ -include $(BASEDIR)/include/xen/config.h +CFLAGS += -pipe -D__XEN__ -include $(objtree)/include/xen/config.h CFLAGS-$(CONFIG_DEBUG_INFO) += -g 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)=. _$@ else echo "*** Xen x86/32 target no longer supported!" endif @@ -335,10 +339,10 @@ _install: $(TARGET)$(CONFIG_XEN_INSTALL_SUFFIX) .PHONY: tests tests: - $(MAKE) -f $(BASEDIR)/Rules.mk -C test tests + $(MAKE) $(build)=test .PHONY: install-tests install-tests: - $(MAKE) -f $(BASEDIR)/Rules.mk -C test install + $(MAKE) $(build)=test install .PHONY: _uninstall _uninstall: D=$(DESTDIR) @@ -395,23 +399,26 @@ $(TARGET).gz: $(TARGET) PHONY += prepare prepare: $(MAKE) -C tools - $(MAKE) -f $(BASEDIR)/Rules.mk include/xen/compile.h + $(MAKE) $(build)=. 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-offsets.h + $(MAKE) $(build)=include all + $(MAKE) $(build)=arch/$(TARGET_ARCH) include + $(MAKE) $(build)=. 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 ; -$(ALL_OBJS) $(ALL_LIBS): prepare +build-dirs := $(patsubst %/built_in.o,%,$(filter %/built_in.o,$(ALL_OBJS) $(ALL_LIBS))) -# head.o is built by descending into arch/arm/$(TARGET_SUBARCH), depends on 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 += descend $(build-dirs) +descend: $(build-dirs) +$(build-dirs): prepare + $(MAKE) $(build)=$@ need-builtin=1 ifeq ($(CONFIG_LTO),y) # Gather all LTO objects together @@ -429,7 +436,7 @@ endif targets += prelink.o $(TARGET): prelink.o FORCE - $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) $@ + $(MAKE) $(build)=arch/$(TARGET_ARCH) $@ quiet_cmd_banner = 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 +# 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)=$(*D) $(*D)/$(@F) %.o %.s: %.S FORCE - $(MAKE) -f $(BASEDIR)/Rules.mk -C $(*D) $(@F) + $(MAKE) $(build)=$(*D) $(*D)/$(@F) %/: FORCE - $(MAKE) -f $(BASEDIR)/Rules.mk -C $* built_in.o built_in_bin.o + $(MAKE) $(build)=$* need-builtin=1 +endif .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 # -obj := . src := $(obj) +PHONY := __build +__build: + -include $(BASEDIR)/include/config/auto.conf include $(XEN_ROOT)/Config.mk include $(BASEDIR)/scripts/Kbuild.include +ifndef obj +$(warning kbuild: Makefile.build is included improperly) +endif -TARGET := $(BASEDIR)/xen +TARGET := xen # Initialise some variables +obj-y := lib-y := targets := +subdir-y := CFLAGS-y := AFLAGS-y := @@ -47,27 +54,52 @@ cmd_ar = rm -f $@; $(AR) cr $@ $(real-prereqs) quiet_cmd_objcopy = OBJCOPY $@ cmd_objcopy = $(OBJCOPY) $(OBJCOPYFLAGS) $< $@ -define gendep - ifneq ($(1),$(subst /,:,$(1))) - DEPS += $(dir $(1)).$(notdir $(1)).d - endif -endef -$(foreach o,$(filter-out %/,$(obj-y) $(obj-bin-y) $(extra-y)),$(eval $(call gendep,$(o)))) +# Figure out what we need to build from the various variables +# =========================================================================== + +# Libraries are always collected in one lib file. +# Filter out objects already built-in +lib-y := $(filter-out $(obj-y), $(sort $(lib-y))) + +# Subdirectories we need to descend into +subdir-y := $(subdir-y) $(patsubst %/,%,$(filter %/, $(obj-y))) # 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 := $(subdir-y) $(filter %/, $(obj-y)) +# - if we encounter foo/ in $(obj-y), replace it by foo/built_in.o +ifdef need-builtin obj-y := $(patsubst %/, %/built_in.o, $(obj-y)) +else +obj-y := $(filter-out %/, $(obj-y)) +endif -# $(subdir-obj-y) is the list of objects in $(obj-y) which uses dir/ to -# tell kbuild to descend -subdir-obj-y := $(filter %/built_in.o, $(obj-y)) +# Add subdir path -# Libraries are always collected in one lib file. -# Filter out objects already built-in -lib-y := $(filter-out $(obj-y), $(sort $(lib-y))) +extra-y := $(addprefix $(obj)/,$(extra-y)) +targets := $(addprefix $(obj)/,$(targets)) +lib-y := $(addprefix $(obj)/,$(lib-y)) +obj-y := $(addprefix $(obj)/,$(obj-y)) +obj-bin-y := $(addprefix $(obj)/,$(obj-bin-y)) +subdir-y := $(addprefix $(obj)/,$(subdir-y)) + +# subdir-builtin may contain duplications. Use $(sort ...) +subdir-builtin := $(sort $(filter %/built_in.o, $(obj-y))) + +targets-for-builtin := $(extra-y) + +ifneq ($(strip $(lib-y)),) + targets-for-builtin += $(obj)/lib.a +endif + +ifdef need-builtin + targets-for-builtin += $(obj)/built_in.o + ifneq ($(strip $(obj-bin-y)),) + ifeq ($(CONFIG_LTO),y) + targets-for-builtin += $(obj)/built_in_bin.o + endif + endif +endif + +targets += $(targets-for-builtin) $(filter %.init.o,$(obj-y) $(obj-bin-y) $(extra-y)): CFLAGS-y += -DINIT_SECTIONS_ONLY @@ -119,29 +151,28 @@ quiet_cmd_cc_builtin = LD $@ cmd_cc_builtin = \ $(CC) $(XEN_CFLAGS) -c -x c /dev/null -o $@ +# To build objects in subdirs, we need to descend into the directories +$(subdir-builtin): $(obj)/%/built_in.o: $(obj)/% ; + quiet_cmd_ld_builtin = LD $@ ifeq ($(CONFIG_LTO),y) cmd_ld_builtin = \ - $(LD_LTO) -r -o $@ $(filter $(obj-y),$(real-prereqs)) + $(LD_LTO) -r -o $@ $(real-prereqs) else cmd_ld_builtin = \ - $(LD) $(XEN_LDFLAGS) -r -o $@ $(filter $(obj-y),$(real-prereqs)) + $(LD) $(XEN_LDFLAGS) -r -o $@ $(real-prereqs) endif -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)) -lib.a: $(lib-y) FORCE +$(obj)/lib.a: $(lib-y) FORCE $(call if_changed,ar) -targets += built_in.o -ifneq ($(strip $(lib-y)),) -targets += lib.a -endif -targets += $(filter-out $(subdir-obj-y), $(obj-y) $(lib-y)) $(extra-y) -targets += $(MAKECMDGOALS) +targets += $(filter-out $(subdir-builtin), $(obj-y)) +targets += $(lib-y) $(MAKECMDGOALS) -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 += FORCE FORCE: -%/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 := $(patsubst $(BASEDIR)/%,%,$(CURDIR)) - quiet_cmd_cc_o_c = CC $@ ifeq ($(CONFIG_ENFORCE_UNIQUE_SYMBOLS),y) cmd_cc_o_c = $(CC) $(c_flags) -c $< -o $(dot-target).tmp -MQ $@ ifeq ($(CONFIG_CC_IS_CLANG),y) - cmd_objcopy_fix_sym = $(OBJCOPY) --redefine-sym $<=$(SRCPATH)/$< $(dot-target).tmp $@ + cmd_objcopy_fix_sym = $(OBJCOPY) --redefine-sym $( .lds quiet_cmd_cpp_lds_S = LDS $@ cmd_cpp_lds_S = $(CPP) -P $(call cpp_flags,$(a_flags)) -D__LINKER__ -MQ $@ -o $@ $< +targets := $(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 = $(foreach sfx, $(2), \ # %.init.o <- %.o targets += $(call intermediate_targets, .init.o, .o) --include $(DEPS_INCLUDE) +# Build +# --------------------------------------------------------------------------- + +__build: $(targets-for-builtin) $(subdir-y) + @: + +# Descending +# --------------------------------------------------------------------------- + +PHONY += $(subdir-y) +$(subdir-y): + $(Q)$(MAKE) $(build)=$@ need-builtin=$(if $(filter $@/built_in.o, $(subdir-builtin)),1) # 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 := $(wildcard $(sort $(targets))) -include $(foreach f,$(existing-targets),$(dir $(f)).$(notdir $(f)).cmd) +DEPS:= $(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=sysv $(@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)=$(@D) $(@D)/.$(@F).0.o $(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< \ $(@D)/.$(@F).0.o -o $(@D)/.$(@F).1 $(NM) -pa --format=sysv $(@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)=$(@D) $(@D)/.$(@F).1.o $(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< $(build_id_linker) \ $(@D)/.$(@F).1.o -o $@ $(NM) -pa --format=sysv $(@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 -CFLAGS += -I$(BASEDIR)/include -CFLAGS += -I$(BASEDIR)/include/arch-$(TARGET_ARCH) +CFLAGS += -I$(srctree)/include +CFLAGS += -I$(srctree)/include/arch-$(TARGET_ARCH) $(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) := $(riscv-march-y)c # -mcmodel=medlow would force Xen into the lower half. CFLAGS += -march=$(riscv-march-y) -mstrict-align -mcmodel=medany -CFLAGS += -I$(BASEDIR)/include +CFLAGS += -I$(srctree)/include +CFLAGS += -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 += asm-macros.i extra-y += xen.lds +# Allows usercopy.c to includes itself +$(obj)/usercopy.o: CFLAGS-y += -I. + ifneq ($(CONFIG_HVM),y) $(obj)/x86_emulate.o: CFLAGS-y += -Wno-unused-label endif @@ -166,13 +169,13 @@ $(TARGET)-syms: $(BASEDIR)/prelink.o $(obj)/xen.lds $(NM) -pa --format=sysv $(@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)=$(@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=sysv $(@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)=$(@D) $(@D)/.$(@F).1.o $(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< $(build_id_linker) \ $(@D)/.$(@F).1.o -o $@ $(NM) -pa --format=sysv $(@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=sysv $(@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)=$(@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=sysv $(@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)=$(@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=sysv $(@D)/$(@F) \ @@ -253,7 +256,7 @@ $(TARGET).efi: FORCE echo '$(if $(filter y,$(XEN_BUILD_EFI)),xen.efi generation,EFI support) disabled' endif -$(obj)/efi/buildid.o $(obj)/efi/relocs-dummy.o: $(BASEDIR)/arch/x86/efi/built_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: ; .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 ifneq ($(filter -DHAVE_AS_QUOTED_SYM,$(XEN_CFLAGS)),) -object_label_flags = '-D__OBJECT_LABEL__=$(subst $(BASEDIR)/,,$(CURDIR))/$@' +object_label_flags = '-D__OBJECT_LABEL__=$@' else -object_label_flags = '-D__OBJECT_LABEL__=$(subst /,$$,$(subst -,_,$(subst $(BASEDIR)/,,$(CURDIR))/$@))' +object_label_flags = '-D__OBJECT_LABEL__=$(subst /,$$,$(subst -,_,$@))' endif c_flags += $(object_label_flags) $(CFLAGS-stack-boundary) a_flags += $(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 @@ export XEN_IMG_OFFSET := 0x200000 -CFLAGS += -I$(BASEDIR)/include -CFLAGS += -I$(BASEDIR)/include/arch-$(TARGET_ARCH) -CFLAGS += -I$(BASEDIR)/include/arch-x86/asm/mach-generic -CFLAGS += -I$(BASEDIR)/include/arch-x86/asm/mach-default +CFLAGS += -I$(srctree)/include +CFLAGS += -I$(srctree)/include/arch-$(TARGET_ARCH) +CFLAGS += -I$(srctree)/include/arch-x86/asm/mach-generic +CFLAGS += -I$(srctree)/include/arch-x86/asm/mach-default CFLAGS += -DXEN_IMG_OFFSET=$(XEN_IMG_OFFSET) # Prevent floating-point variables from creeping into Xen. @@ -66,6 +66,6 @@ export XEN_BUILD_EFI := $(call try-run,$(CC) $(CFLAGS) -c arch/x86/efi/check.c - endif # Set up the assembler include path properly for older toolchains. -CFLAGS += -Wa,-I$(BASEDIR)/include +CFLAGS += -Wa,-I$(srctree)/include ALL_OBJS-y := arch/x86/boot/built_in.o arch/x86/efi/built_in.o $(ALL_OBJS-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 += head.o -DEFS_H_DEPS = $(src)/defs.h $(BASEDIR)/include/xen/stdbool.h +DEFS_H_DEPS = $(BASEDIR)/$(src)/defs.h $(BASEDIR)/include/xen/stdbool.h -CMDLINE_DEPS = $(DEFS_H_DEPS) $(src)/video.h +CMDLINE_DEPS = $(DEFS_H_DEPS) $(BASEDIR)/$(src)/video.h RELOC_DEPS = $(DEFS_H_DEPS) \ $(BASEDIR)/include/generated/autoconf.h \ @@ -14,7 +14,7 @@ RELOC_DEPS = $(DEFS_H_DEPS) \ $(obj)/head.o: $(obj)/cmdline.S $(obj)/reloc.S $(obj)/cmdline.S: $(src)/cmdline.c $(CMDLINE_DEPS) - $(MAKE) -f build32.mk -C $(obj) $(@F) CMDLINE_DEPS="$(CMDLINE_DEPS)" + $(MAKE) -f $(BASEDIR)/$(src)/build32.mk -C $(obj) $(@F) CMDLINE_DEPS="$(CMDLINE_DEPS)" $(obj)/reloc.S: $(src)/reloc.c $(RELOC_DEPS) - $(MAKE) -f build32.mk -C $(obj) $(@F) RELOC_DEPS="$(RELOC_DEPS)" + $(MAKE) -f $(BASEDIR)/$(src)/build32.mk -C $(obj) $(@F) RELOC_DEPS="$(RELOC_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=$(PYTHON); \ while read what name; do \ $(SHELL) $(BASEDIR)/tools/get-fields.sh "$$what" compat_$$name $< || exit $$?; \ - done <$(patsubst compat/%,compat/.xlat/%,$(basename $<)).lst >$@.new + done <$(patsubst $(obj)/compat/%,$(obj)/compat/.xlat/%,$(basename $<)).lst >$@.new mv -f $@.new $@ .PRECIOUS: $(obj)/compat/.xlat/%.lst @@ -86,8 +86,8 @@ PUBLIC_HEADERS := $(filter-out $(src)/public/arch-% $(src)/public/dom0_ops.h, $( PUBLIC_C99_HEADERS := $(src)/public/io/9pfs.h $(src)/public/io/pvcalls.h PUBLIC_ANSI_HEADERS := $(filter-out $(src)/public/%ctl.h $(src)/public/xsm/% $(src)/public/%hvm/save.h $(PUBLIC_C99_HEADERS), $(PUBLIC_HEADERS)) -public/io/9pfs.h-prereq := string -public/io/pvcalls.h-prereq := string +$(src)/public/io/9pfs.h-prereq := string +$(src)/public/io/pvcalls.h-prereq := string $(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 = $(call success,$(LD) -v $(1)) # Usage: EXTRA_CFLAGS += $(call cc-ifversion, -lt, 0402, -O1) cc-ifversion = $(shell [ $(CONFIG_GCC_VERSION)0 $(1) $(2)000 ] && echo $(3) || echo $(4)) +### +# Shorthand for $(Q)$(MAKE) -f scripts/Makefile.build obj= +# Usage: +# $(Q)$(MAKE) $(build)=dir +build := -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 @@ -tests all: build - - ifneq ($(XEN_TARGET_ARCH),x86_32) # Xen 32-bit x86 hypervisor no longer supported, so has no test livepatches subdir-y += livepatch endif -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)=$$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=$(shell nm --defined $(1) | grep $(2) | awk '{print "0x"$$1}') CODE_SZ=$(shell nm --defined -S $(1) | grep $(2) | awk '{ print "0x"$$2}') -.PHONY: default -build default: livepatch - extra-y += xen_hello_world.livepatch xen_hello_world-objs := 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 := $(filter %.livepatch,$(extra-y)) LIVEPATCH_DEBUG_DIR ?= $(DEBUG_DIR)/xen-livepatch -.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 += flask-policy.S -FLASK_BUILD_DIR := $(CURDIR) +FLASK_BUILD_DIR := $(BASEDIR)/$(obj) POLICY_SRC := $(FLASK_BUILD_DIR)/xenpolicy-$(XEN_FULLVERSION) $(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 += services.o obj-y += conditional.o obj-y += mls.o -CFLAGS-y += -I../include +CFLAGS-y += -Ixsm/flask/include From patchwork Thu Jul 1 14:10:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12354207 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,NORMAL_HTTP_TO_IP, NUMERIC_HTTP_ADDR,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 15585C11F69 for ; Thu, 1 Jul 2021 14:21:50 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B145061405 for ; Thu, 1 Jul 2021 14:21:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B145061405 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=citrix.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.148775.275042 (Exim 4.92) (envelope-from ) id 1lyxZV-00024m-6j; Thu, 01 Jul 2021 14:21:41 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version 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-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_Pau_Monn=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 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 := y endif # root-make-done +# =========================================================================== +# Rules shared between *config targets and build targets + +PHONY += tools_fixdep +tools_fixdep: + $(MAKE) -C tools fixdep + # Shorthand for kconfig kconfig = -f $(BASEDIR)/tools/kconfig/Makefile.kconfig ARCH=$(ARCH) SRCARCH=$(SRCARCH) HOSTCC="$(HOSTCC)" HOSTCXX="$(HOSTCXX)" @@ -397,7 +404,7 @@ $(TARGET).gz: $(TARGET) mv $@.new $@ PHONY += prepare -prepare: +prepare: tools_fixdep $(MAKE) -C tools $(MAKE) $(build)=. 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) +-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: # 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)=$(*D) $(*D)/$(@F) -%.o %.s: %.S FORCE +%.o %.s: %.S tools_fixdep FORCE $(MAKE) $(build)=$(*D) $(*D)/$(@F) -%/: FORCE +%/: tools_fixdep FORCE $(MAKE) $(build)=$* need-builtin=1 endif 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 = $(filter-out -Wa$(comma)%,$(1)) # Calculation of flags, first the generic flags, then the arch specific flags, # and last the flags modified for a target or a directory. -c_flags = -MMD -MP -MF $(@D)/.$(@F).d $(XEN_CFLAGS) -a_flags = -MMD -MP -MF $(@D)/.$(@F).d $(XEN_AFLAGS) +c_flags = -MMD -MP -MF $(depfile) $(XEN_CFLAGS) +a_flags = -MMD -MP -MF $(depfile) $(XEN_AFLAGS) include $(BASEDIR)/arch/$(TARGET_ARCH)/Rules.mk @@ -197,7 +197,7 @@ else endif 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 @@ -208,7 +208,7 @@ quiet_cmd_cc_o_S = CC $@ cmd_cc_o_S = $(CC) $(a_flags) -c $< -o $@ $(obj)/%.o: $(src)/%.S FORCE - $(call if_changed,cc_o_S) + $(call if_changed_dep,cc_o_S) quiet_cmd_obj_init_o = INIT_O $@ @@ -238,13 +238,13 @@ quiet_cmd_cpp_s_S = CPP $@ cmd_cpp_s_S = $(CPP) $(call cpp_flags,$(a_flags)) -MQ $@ -o $@ $< $(obj)/%.i: $(src)/%.c FORCE - $(call if_changed,cpp_i_c) + $(call if_changed_dep,cpp_i_c) $(obj)/%.s: $(src)/%.c FORCE - $(call if_changed,cc_s_c) + $(call if_changed_dep,cc_s_c) $(obj)/%.s: $(src)/%.S FORCE - $(call if_changed,cpp_s_S) + $(call if_changed_dep,cpp_s_S) # Linker scripts, .lds.S -> .lds quiet_cmd_cpp_lds_S = LDS $@ @@ -283,9 +283,6 @@ existing-targets := $(wildcard $(sort $(targets))) -include $(foreach f,$(existing-targets),$(dir $(f)).$(notdir $(f)).cmd) -DEPS:= $(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)/asm-macros.i $(src)/Makefil $(obj)/efi.lds: AFLAGS-y += -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) $(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. This -# then also suppresses re-generation of the respective .*.d2 files. -ifeq ($(filter-out .xen%.o,$(notdir $(MAKECMDGOALS))),) -DEPS_INCLUDE:= -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 = $(@D)/.$(@F) ### # dependencies -DEPS = .*.d -DEPS_INCLUDE = $(addsuffix .d2, $(basename $(wildcard $(DEPS)))) +depfile = $(dot-target).d ### # real prerequisites without phony targets @@ -129,6 +128,8 @@ cmd = @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 ifneq ($(KBUILD_NOCMDDEP),1) @@ -157,15 +158,19 @@ if_changed = $(if $(any-prereq)$(cmd-check), \ $(cmd); \ printf '%s\n' 'cmd_$@ := $(make-cmd)' > $(dot-target).cmd, @:) +# Execute the command and also postprocess generated .d dependencies file. +if_changed_dep = $(if $(any-prereq)$(cmd-check),$(cmd_and_fixdep),@:) + +cmd_and_fixdep = \ + $(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 = $(if $(any-prereq)$(cmd-check),$(rule_$(1)),@:) -cmd_and_record = \ - $(cmd); \ - printf '%s\n' 'cmd_$@ := $(make-cmd)' > $(dot-target).cmd - ### # why - tell why a target got built # enabled by make V=2 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 .PHONY: default -default: symbols +default: symbols fixdep .PHONY: clean clean: - rm -f *.o symbols + rm -f *.o symbols fixdep 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 + * =========================================================================== + * + * 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_ = + * + * 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 .*.cmd + * files. The return value of printf() and putchar() must be checked to catch + * 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 = vprintf(format, ap); + if (ret < 0) { + perror("fixdep"); + exit(1); + } + va_end(ap); +} + +static void xputchar(int c) +{ + int ret; + + ret = putchar(c); + if (ret == 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 = '/', i; + + xprintf(" $(wildcard %s/", dir); + for (i = 0; i < slen; i++) { + c = m[i]; + if (c == '_') + c = '/'; + else + c = tolower(c); + if (c != '/' || prev_c != '/') + xputchar(c); + prev_c = 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 = 2166136261U; + + for (i = 0; i < sz; i++) + hash = (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 = hashtab[hash % HASHSZ]; aux; aux = aux->next) { + if (aux->hash == hash && aux->len == len && + memcmp(aux->name, name, len) == 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 = malloc(sizeof(*aux) + len); + + if (!aux) { + perror("fixdep:malloc"); + exit(1); + } + memcpy(aux->name, name, len); + aux->len = len; + aux->hash = hash; + aux->next = hashtab[hash % HASHSZ]; + hashtab[hash % HASHSZ] = aux; +} + +/* + * Record the use of a CONFIG_* word. + */ +static void use_config(const char *m, int slen) +{ + unsigned int hash = 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 = 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 = p; + + while ((p = strstr(p, "CONFIG_"))) { + if (p > start && (isalnum(p[-1]) || p[-1] == '_')) { + p += 7; + continue; + } + p += 7; + q = p; + while (isalnum(*q) || *q == '_') + q++; + if (str_ends_with(p, q - p, "_MODULE")) + r = q - 7; + else + r = q; + if (r > p) + use_config(p, r - p); + p = q; + } +} + +static void *read_file(const char *filename) +{ + struct stat st; + int fd; + char *buf; + + fd = 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 = malloc(st.st_size + 1); + if (!buf) { + perror("fixdep: malloc"); + exit(2); + } + if (read(fd, buf, st.st_size) != st.st_size) { + perror("fixdep: read"); + exit(2); + } + buf[st.st_size] = '\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 = 0; + int is_first_dep = 0; + void *buf; + + while (1) { + /* Skip any "white space" */ + while (*m == ' ' || *m == '\\' || *m == '\n') + m++; + + if (!*m) + break; + + /* Find next "white space" */ + p = m; + while (*p && *p != ' ' && *p != '\\' && *p != '\n') + p++; + is_last = (*p == '\0'); + /* Is the token we found a target name? */ + is_target = (*(p-1) == ':'); + /* Don't write any target names into the dependency file */ + if (is_target) { + /* The /next/ file is the first dependency */ + is_first_dep = 1; + } else if (!is_ignored_file(m, p - m)) { + *p = '\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 = 1; + xprintf("source_%s := %s\n\n", + target, m); + xprintf("deps_%s := \\\n", target); + } + is_first_dep = 0; + } else { + xprintf(" %s \\\n", m); + } + + buf = 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 = 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 != 4) + usage(); + + depfile = argv[1]; + target = argv[2]; + cmdline = argv[3]; + + xprintf("cmd_%s := %s\n\n", target, cmdline); + + buf = read_file(depfile); + parse_dep_file(buf, target); + free(buf); + + return 0; +} From patchwork Thu Jul 1 14:10:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 12354201 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2F0F2C11F64 for ; Thu, 1 Jul 2021 14:21:51 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EBA12613FE for ; Thu, 1 Jul 2021 14:21:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EBA12613FE Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=citrix.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.148785.275080 (Exim 4.92) (envelope-from ) id 1lyxZY-0002uU-P9; Thu, 01 Jul 2021 14:21:44 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version 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-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 This allows to `make arch/riscv/riscv64/head.o`. Example of rune on a fresh copy of the repository: make XEN_TARGET_ARCH=riscv64 CROSS_COMPILE=riscv64-linux-gnu- KBUILD_DEFCONFIG=tiny64_defconfig arch/riscv/riscv64/head.o Signed-off-by: Anthony PERARD Acked-by: Bob Eshleman Reviewed-by: Alistair Francis Acked-by: Connor Davis --- 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/Makefile new file mode 100644 index 000000000000..15a4a65f6615 --- /dev/null +++ b/xen/arch/riscv/riscv64/Makefile @@ -0,0 +1 @@ +extra-y += head.o