From patchwork Thu Jan 19 11:40:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Hartmayer X-Patchwork-Id: 13107750 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9FF0CC00A5A for ; Thu, 19 Jan 2023 11:41:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230468AbjASLld (ORCPT ); Thu, 19 Jan 2023 06:41:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45574 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230272AbjASLlM (ORCPT ); Thu, 19 Jan 2023 06:41:12 -0500 Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F1DD055A0 for ; Thu, 19 Jan 2023 03:41:07 -0800 (PST) Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 30JAomc5019346 for ; Thu, 19 Jan 2023 11:41:07 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=GU/8OYxZMo5ply/MpvrFYSci8rJ0mhEkQuiWlLs0EH4=; b=R7w6VUnjsY+7ZU/eJvU/XaWTpH298M6nFOVmV0P5ckCiteQs3/YpnyxCR2NycD2KQpjy d4GOnSYLT8B+e/FDWVkJWJZZs9yFt5K9IDG+PApXqqcQ10UR/GVIg34UXGARbl9LIHEf 7Y4ebuMj4BrnVucEp7OYsIjfNAcG/npkNeJ9hJMECFvLJhmjR+zgm6qN6RKlFUoAdRX6 D2BcmEgVOBl3UtEy5fVA/+zmXkBgLdEMNNgxAnSBfyARu75wdwPs8Z+3f3oIkPPvuZVg pZhXlgwSDGx/C78eGrI9eoeznUCvY2ZGsWvpXXYKd44NJXv8UuTfdEh59o88yp9iG4y6 yw== Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3n74f8962y-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 19 Jan 2023 11:41:07 +0000 Received: from m0098419.ppops.net (m0098419.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 30JBTQdu009922 for ; Thu, 19 Jan 2023 11:41:06 GMT Received: from ppma03ams.nl.ibm.com (62.31.33a9.ip4.static.sl-reverse.com [169.51.49.98]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3n74f8962f-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 19 Jan 2023 11:41:06 +0000 Received: from pps.filterd (ppma03ams.nl.ibm.com [127.0.0.1]) by ppma03ams.nl.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 30J5Okqp023774; Thu, 19 Jan 2023 11:41:04 GMT Received: from smtprelay07.fra02v.mail.ibm.com ([9.218.2.229]) by ppma03ams.nl.ibm.com (PPS) with ESMTPS id 3n3m16pm1q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 19 Jan 2023 11:41:04 +0000 Received: from smtpav05.fra02v.mail.ibm.com (smtpav05.fra02v.mail.ibm.com [10.20.54.104]) by smtprelay07.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 30JBf1m150200936 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 19 Jan 2023 11:41:01 GMT Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6DA3C20040; Thu, 19 Jan 2023 11:41:01 +0000 (GMT) Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id F0CBE2004B; Thu, 19 Jan 2023 11:41:00 +0000 (GMT) Received: from li-1de7cd4c-3205-11b2-a85c-d27f97db1fe1.ibm.com.com (unknown [9.171.91.27]) by smtpav05.fra02v.mail.ibm.com (Postfix) with ESMTP; Thu, 19 Jan 2023 11:41:00 +0000 (GMT) From: Marc Hartmayer To: Cc: Janosch Frank , David Hildenbrand , Claudio Imbrenda , Nina Schoetterl-Glausch , Nico Boehr , Thomas Huth Subject: [kvm-unit-tests PATCH v2 1/8] .gitignore: ignore `s390x/comm.key` file Date: Thu, 19 Jan 2023 12:40:38 +0100 Message-Id: <20230119114045.34553-2-mhartmay@linux.ibm.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230119114045.34553-1-mhartmay@linux.ibm.com> References: <20230119114045.34553-1-mhartmay@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: mhRFusi-UviRyBinmB89H6im9HEWfqht X-Proofpoint-ORIG-GUID: 3Vq6Sl3f-lBDPb-Jj2v-sHJjdxOwr8er X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.122.1 definitions=2023-01-19_09,2023-01-19_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 adultscore=0 suspectscore=0 malwarescore=0 spamscore=0 priorityscore=1501 mlxscore=0 lowpriorityscore=0 clxscore=1015 mlxlogscore=999 phishscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2301190091 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Ignore the Secure Execution Customer Communication Key file. Signed-off-by: Marc Hartmayer Reviewed-by: Janosch Frank Reviewed-by: Nico Boehr --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 33529b65a7e3..601822d67325 100644 --- a/.gitignore +++ b/.gitignore @@ -28,5 +28,6 @@ cscope.* /s390x/*.bin /s390x/snippets/*/*.gbin /efi-tests/* +/s390x/comm.key /s390x/snippets/*/*.hdr /s390x/snippets/*/*.*obj From patchwork Thu Jan 19 11:40:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Hartmayer X-Patchwork-Id: 13107757 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 84DEBC00A5A for ; Thu, 19 Jan 2023 11:42:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230497AbjASLmA (ORCPT ); Thu, 19 Jan 2023 06:42:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46048 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230459AbjASLlM (ORCPT ); Thu, 19 Jan 2023 06:41:12 -0500 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8417E358A for ; Thu, 19 Jan 2023 03:41:08 -0800 (PST) Received: from pps.filterd (m0127361.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 30JBcX5b034520 for ; Thu, 19 Jan 2023 11:41:07 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=gIVH8+Yqe1lNmrtjIq0FQEstA4pMEK4au/ZpVOgetEU=; b=onGnAjh+kAhALWCYzS+y3X+MfE4DeOdXtRJI4hYgUcyo/x2bsn21PbxqTb54UF5zyuKA lFZBQqqavG2cJ+nUZ7giO5XuzW8q0i+lsp+F8XyOIi2kyCj94X9A+ijF3F6uGtNvLJHp DfE/osGoclir0wU7SY5I0czaB8yANgiNH/q5SeC7cAYwFs9BJ0BoN/3LIdYdqSy/dALJ 2Q1nxRHmNCFATEutH1tWnDRSbVTvMVErZwonX6I+Kw0Qt4ZDSlsGiUZ/EbgJYDmPPf+l 3DgsbP8iMhtt4EorvobshyqBGrLotDVBv5HVk6Yt7+rt1vLbdtlH8K9Gp4xrACF2T/Hb 4w== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3n72624emj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 19 Jan 2023 11:41:07 +0000 Received: from m0127361.ppops.net (m0127361.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 30JBdStr039013 for ; Thu, 19 Jan 2023 11:41:07 GMT Received: from ppma02fra.de.ibm.com (47.49.7a9f.ip4.static.sl-reverse.com [159.122.73.71]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3n72624eky-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 19 Jan 2023 11:41:07 +0000 Received: from pps.filterd (ppma02fra.de.ibm.com [127.0.0.1]) by ppma02fra.de.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 30IMlW8u030244; Thu, 19 Jan 2023 11:41:05 GMT Received: from smtprelay01.fra02v.mail.ibm.com ([9.218.2.227]) by ppma02fra.de.ibm.com (PPS) with ESMTPS id 3n3m16mt38-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 19 Jan 2023 11:41:05 +0000 Received: from smtpav05.fra02v.mail.ibm.com (smtpav05.fra02v.mail.ibm.com [10.20.54.104]) by smtprelay01.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 30JBf21Z47710610 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 19 Jan 2023 11:41:02 GMT Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0189720040; Thu, 19 Jan 2023 11:41:02 +0000 (GMT) Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8277620043; Thu, 19 Jan 2023 11:41:01 +0000 (GMT) Received: from li-1de7cd4c-3205-11b2-a85c-d27f97db1fe1.ibm.com.com (unknown [9.171.91.27]) by smtpav05.fra02v.mail.ibm.com (Postfix) with ESMTP; Thu, 19 Jan 2023 11:41:01 +0000 (GMT) From: Marc Hartmayer To: Cc: Janosch Frank , David Hildenbrand , Claudio Imbrenda , Nina Schoetterl-Glausch , Nico Boehr , Thomas Huth Subject: [kvm-unit-tests PATCH v2 2/8] s390x/Makefile: simplify `%.hdr` target rules Date: Thu, 19 Jan 2023 12:40:39 +0100 Message-Id: <20230119114045.34553-3-mhartmay@linux.ibm.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230119114045.34553-1-mhartmay@linux.ibm.com> References: <20230119114045.34553-1-mhartmay@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: ceMX3ZmlRJbMkkiByGxAPPR1YxSVI_X6 X-Proofpoint-ORIG-GUID: zvQeBuf3nJcyLFRQZqFbS375iVnXFqsP X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.122.1 definitions=2023-01-19_09,2023-01-19_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 mlxscore=0 lowpriorityscore=0 phishscore=0 adultscore=0 suspectscore=0 clxscore=1015 priorityscore=1501 bulkscore=0 impostorscore=0 mlxlogscore=881 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2301190091 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Merge the two Makefile target rules `$(SNIPPET_DIR)/asm/%.hdr` and `$(SNIPPET_DIR)/c/%.hdr` into one target rule. Signed-off-by: Marc Hartmayer Reviewed-by: Janosch Frank --- s390x/Makefile | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/s390x/Makefile b/s390x/Makefile index 97a616111680..660ff06f1e7c 100644 --- a/s390x/Makefile +++ b/s390x/Makefile @@ -145,10 +145,7 @@ $(SNIPPET_DIR)/c/%.gbin: $(SNIPPET_DIR)/c/%.o $(snippet_lib) $(FLATLIBS) $(OBJCOPY) -O binary -j ".rodata" -j ".lowcore" -j ".text" -j ".data" -j ".bss" --set-section-flags .bss=alloc,load,contents $@ $@ truncate -s '%4096' $@ -$(SNIPPET_DIR)/asm/%.hdr: $(SNIPPET_DIR)/asm/%.gbin $(HOST_KEY_DOCUMENT) - $(GEN_SE_HEADER) -k $(HOST_KEY_DOCUMENT) -c $<,0x0,0x00000000000000420000000000000000 --psw-addr 0x4000 -o $@ - -$(SNIPPET_DIR)/c/%.hdr: $(SNIPPET_DIR)/c/%.gbin $(HOST_KEY_DOCUMENT) +%.hdr: %.gbin $(HOST_KEY_DOCUMENT) $(GEN_SE_HEADER) -k $(HOST_KEY_DOCUMENT) -c $<,0x0,0x00000000000000420000000000000000 --psw-addr 0x4000 -o $@ .SECONDARY: From patchwork Thu Jan 19 11:40:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Hartmayer X-Patchwork-Id: 13107751 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BE7DFC00A5A for ; Thu, 19 Jan 2023 11:41:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230433AbjASLlh (ORCPT ); Thu, 19 Jan 2023 06:41:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46344 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230458AbjASLlM (ORCPT ); Thu, 19 Jan 2023 06:41:12 -0500 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5893E21A20 for ; Thu, 19 Jan 2023 03:41:09 -0800 (PST) Received: from pps.filterd (m0187473.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 30JBMFsq038498 for ; Thu, 19 Jan 2023 11:41:09 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=OOD+d1bzYEF/rd/dWi3g8i2gUFqESzflZrs7feYg/LM=; b=ebm0Rc2i6ZNJvsG855DYWzLDsgbspDrx5UvIAplJAk8XSxzgwhrdxZfTUep0DPJ06tM7 4MEPizuuG9C2ydGZwZI0mqS6bHm+QL1IfsuNyurqqgJOhCqVYIg8e19KVlTqg3zQCGy6 hHMlsZcNXTSEALa8IlLTTyQy5SeUqQM/Hk46iHUTxOGqh73WJpKN01pFok6D9rWUeH1s qOxlERH9BcGY99pIW5kWgUrHxsz/PCwCAogWKoAdfndqBjb7LhZMnKCvKWdVxQLOy9ED zglWX9aMI3tJrdfI6z4HB1PMyQ9YM8g6Lv5iGSEiSPEP5BljEYtsgKCH6cQ42VPxo6d2 RQ== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3n72rbbqqg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 19 Jan 2023 11:41:08 +0000 Received: from m0187473.ppops.net (m0187473.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 30JB5ELm008458 for ; Thu, 19 Jan 2023 11:41:08 GMT Received: from ppma06fra.de.ibm.com (48.49.7a9f.ip4.static.sl-reverse.com [159.122.73.72]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3n72rbbqpq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 19 Jan 2023 11:41:08 +0000 Received: from pps.filterd (ppma06fra.de.ibm.com [127.0.0.1]) by ppma06fra.de.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 30J2TJa4029613; Thu, 19 Jan 2023 11:41:06 GMT Received: from smtprelay01.fra02v.mail.ibm.com ([9.218.2.227]) by ppma06fra.de.ibm.com (PPS) with ESMTPS id 3n3knfcu2s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 19 Jan 2023 11:41:05 +0000 Received: from smtpav05.fra02v.mail.ibm.com (smtpav05.fra02v.mail.ibm.com [10.20.54.104]) by smtprelay01.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 30JBf2DL47710614 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 19 Jan 2023 11:41:02 GMT Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7999320040; Thu, 19 Jan 2023 11:41:02 +0000 (GMT) Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1599420043; Thu, 19 Jan 2023 11:41:02 +0000 (GMT) Received: from li-1de7cd4c-3205-11b2-a85c-d27f97db1fe1.ibm.com.com (unknown [9.171.91.27]) by smtpav05.fra02v.mail.ibm.com (Postfix) with ESMTP; Thu, 19 Jan 2023 11:41:02 +0000 (GMT) From: Marc Hartmayer To: Cc: Janosch Frank , David Hildenbrand , Claudio Imbrenda , Nina Schoetterl-Glausch , Nico Boehr , Thomas Huth Subject: [kvm-unit-tests PATCH v2 3/8] s390x/Makefile: fix `*.gbin` target dependencies Date: Thu, 19 Jan 2023 12:40:40 +0100 Message-Id: <20230119114045.34553-4-mhartmay@linux.ibm.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230119114045.34553-1-mhartmay@linux.ibm.com> References: <20230119114045.34553-1-mhartmay@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: Yvu_-koFuk6O8JgwkPORkkzA3Sq1brn1 X-Proofpoint-ORIG-GUID: dUBXAWveec0UvHyKdqKDEt5AYvp9_CT5 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.122.1 definitions=2023-01-19_09,2023-01-19_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 malwarescore=0 clxscore=1015 mlxscore=0 suspectscore=0 bulkscore=0 priorityscore=1501 lowpriorityscore=0 mlxlogscore=911 phishscore=0 impostorscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2301190091 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org If the linker scripts change, then the .gbin binaries must be rebuilt. While at it, replace `$(SRCDIR)/s390x/snippets` with `$(SNIPPET_DIR)` for these Makefile rules. Signed-off-by: Marc Hartmayer Reviewed-by: Janosch Frank --- s390x/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/s390x/Makefile b/s390x/Makefile index 660ff06f1e7c..71e6563bbb61 100644 --- a/s390x/Makefile +++ b/s390x/Makefile @@ -135,13 +135,13 @@ $(SNIPPET_DIR)/asm/%.o: $(SNIPPET_DIR)/asm/%.S $(asm-offsets) $(SNIPPET_DIR)/c/%.o: $(SNIPPET_DIR)/c/%.c $(asm-offsets) $(CC) $(CFLAGS) -c -nostdlib -o $@ $< -$(SNIPPET_DIR)/asm/%.gbin: $(SNIPPET_DIR)/asm/%.o - $(CC) $(LDFLAGS) -o $@ -T $(SRCDIR)/s390x/snippets/asm/flat.lds $< +$(SNIPPET_DIR)/asm/%.gbin: $(SNIPPET_DIR)/asm/%.o $(SNIPPET_DIR)/asm/flat.lds + $(CC) $(LDFLAGS) -o $@ -T $(SNIPPET_DIR)/asm/flat.lds $< $(OBJCOPY) -O binary -j ".rodata" -j ".lowcore" -j ".text" -j ".data" -j ".bss" --set-section-flags .bss=alloc,load,contents $@ $@ truncate -s '%4096' $@ -$(SNIPPET_DIR)/c/%.gbin: $(SNIPPET_DIR)/c/%.o $(snippet_lib) $(FLATLIBS) - $(CC) $(LDFLAGS) -o $@ -T $(SRCDIR)/s390x/snippets/c/flat.lds $< $(snippet_lib) $(FLATLIBS) +$(SNIPPET_DIR)/c/%.gbin: $(SNIPPET_DIR)/c/%.o $(snippet_lib) $(FLATLIBS) $(SNIPPET_DIR)/c/flat.lds + $(CC) $(LDFLAGS) -o $@ -T $(SNIPPET_DIR)/c/flat.lds $< $(snippet_lib) $(FLATLIBS) $(OBJCOPY) -O binary -j ".rodata" -j ".lowcore" -j ".text" -j ".data" -j ".bss" --set-section-flags .bss=alloc,load,contents $@ $@ truncate -s '%4096' $@ From patchwork Thu Jan 19 11:40:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Hartmayer X-Patchwork-Id: 13107756 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C4551C00A5A for ; Thu, 19 Jan 2023 11:41:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230287AbjASLl6 (ORCPT ); Thu, 19 Jan 2023 06:41:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46206 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230460AbjASLlM (ORCPT ); Thu, 19 Jan 2023 06:41:12 -0500 Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CCD7D4589B for ; Thu, 19 Jan 2023 03:41:09 -0800 (PST) Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 30J98Tin008475 for ; Thu, 19 Jan 2023 11:41:09 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=1sKLTbsXhqw28RGvdCTZDxJYXBXS+R1+18UfSXMTVmc=; b=XXGcB4QMgc2PxnQJGgAqT0o+b619sU1hMXq3fnoJg5utR8NfGVkCKt4Yf+AjbptXq3aw TB9P6S0BAOdaBf/6x8IDUZ27DYTQYRBQhNjlNcBfL+FOzFDYWum7pUbPoYnEw2KSfIgt Z81mg4f8wH1T04Xqr5V0Uoe7Ky792fEweAyrNZQwoEMWjr4+WiPeQq3VuETexRnWX157 F6Lb6SQ46tpinm5zvqZlpgnLcokYbzgJ3eIzKaYd9W3ScyjXGdsJncoygLqjbtrbDDrx qn/hGJj6KeKwP2u3Z3Xet+nkG2xwIoEHlXMvCVu9k0blUDyMQ7mqUab2C41xYJ9vOfS/ Nw== Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3n6jc026cy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 19 Jan 2023 11:41:08 +0000 Received: from m0098420.ppops.net (m0098420.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 30JBP8lC020749 for ; Thu, 19 Jan 2023 11:41:08 GMT Received: from ppma06fra.de.ibm.com (48.49.7a9f.ip4.static.sl-reverse.com [159.122.73.72]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3n6jc026c9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 19 Jan 2023 11:41:08 +0000 Received: from pps.filterd (ppma06fra.de.ibm.com [127.0.0.1]) by ppma06fra.de.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 30J6Jeb1008380; Thu, 19 Jan 2023 11:41:06 GMT Received: from smtprelay02.fra02v.mail.ibm.com ([9.218.2.226]) by ppma06fra.de.ibm.com (PPS) with ESMTPS id 3n3knfcu2t-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 19 Jan 2023 11:41:06 +0000 Received: from smtpav05.fra02v.mail.ibm.com (smtpav05.fra02v.mail.ibm.com [10.20.54.104]) by smtprelay02.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 30JBf3Am47907284 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 19 Jan 2023 11:41:03 GMT Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0953920040; Thu, 19 Jan 2023 11:41:03 +0000 (GMT) Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8EF1720043; Thu, 19 Jan 2023 11:41:02 +0000 (GMT) Received: from li-1de7cd4c-3205-11b2-a85c-d27f97db1fe1.ibm.com.com (unknown [9.171.91.27]) by smtpav05.fra02v.mail.ibm.com (Postfix) with ESMTP; Thu, 19 Jan 2023 11:41:02 +0000 (GMT) From: Marc Hartmayer To: Cc: Janosch Frank , David Hildenbrand , Claudio Imbrenda , Nina Schoetterl-Glausch , Nico Boehr , Thomas Huth Subject: [kvm-unit-tests PATCH v2 4/8] s390x/Makefile: refactor CPPFLAGS Date: Thu, 19 Jan 2023 12:40:41 +0100 Message-Id: <20230119114045.34553-5-mhartmay@linux.ibm.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230119114045.34553-1-mhartmay@linux.ibm.com> References: <20230119114045.34553-1-mhartmay@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: KAFCav0CJLHOcd_KpaLXc0rBmbMMR6Yx X-Proofpoint-GUID: vNGcLr6VZpFi3HobybfYJkF_1Fszf2xb X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.122.1 definitions=2023-01-19_09,2023-01-19_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 suspectscore=0 mlxscore=0 bulkscore=0 adultscore=0 lowpriorityscore=0 phishscore=0 mlxlogscore=760 spamscore=0 clxscore=1015 priorityscore=1501 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2301190091 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org This change makes it easier to reuse them. While at it, remove `lib` include path since it seems to be unused. Signed-off-by: Marc Hartmayer Reviewed-by: Janosch Frank --- s390x/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/s390x/Makefile b/s390x/Makefile index 71e6563bbb61..8719f0c837cf 100644 --- a/s390x/Makefile +++ b/s390x/Makefile @@ -63,9 +63,12 @@ test_cases: $(tests) test_cases_binary: $(tests_binary) test_cases_pv: $(tests_pv_binary) +INCLUDE_PATHS = $(SRCDIR)/lib $(SRCDIR)/lib/s390x +CPPFLAGS = $(addprefix -I,$(INCLUDE_PATHS)) + CFLAGS += -std=gnu99 CFLAGS += -ffreestanding -CFLAGS += -I $(SRCDIR)/lib -I $(SRCDIR)/lib/s390x -I lib +CFLAGS += $(CPPFLAGS) CFLAGS += -O2 CFLAGS += -march=zEC12 CFLAGS += -mbackchain From patchwork Thu Jan 19 11:40:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Hartmayer X-Patchwork-Id: 13107752 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9E99FC00A5A for ; Thu, 19 Jan 2023 11:41:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231127AbjASLll (ORCPT ); Thu, 19 Jan 2023 06:41:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230461AbjASLlM (ORCPT ); Thu, 19 Jan 2023 06:41:12 -0500 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6AD5A4A20E for ; Thu, 19 Jan 2023 03:41:10 -0800 (PST) Received: from pps.filterd (m0127361.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 30JBcZdU034808 for ; Thu, 19 Jan 2023 11:41:09 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=Qs5Q+xpj6urHN266ZjGXNSAUX22Lbu1Wm/N7JAxz+1Y=; b=daERIN6AYwNH6TyrjTygkTZSk3D1lNUJ/mS8AWd9BhabJbt6zK/AglvMPiQoBE+PO1xb d7WMaxqgah19IX/3s/M2+BlK3CJkYbNroupamlm9lN4Rez+0ng/6zAMmlKglhQP2iI7o uAgPEA50W4JXiOHMs2LQN3idUYx1yWGMRbS90O31JOCr97mtLG2VtrmAV0x+xkz4yNIJ mLPU72PQl2sIqaanjfuO/TW6tH0lzw9wjcb2XOk0fkLup5aHMLywb1ZE/cGiEJvtO1JM bBaY+YE7C24MMG5G/7a5YoTomMT80xbyU9vAKpm3+uSYeyO5NzAoml3MmOUJNaIWGw3/ iw== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3n72624en6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 19 Jan 2023 11:41:09 +0000 Received: from m0127361.ppops.net (m0127361.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 30JBcd86035446 for ; Thu, 19 Jan 2023 11:41:08 GMT Received: from ppma06ams.nl.ibm.com (66.31.33a9.ip4.static.sl-reverse.com [169.51.49.102]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3n72624emp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 19 Jan 2023 11:41:08 +0000 Received: from pps.filterd (ppma06ams.nl.ibm.com [127.0.0.1]) by ppma06ams.nl.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 30J60kar006229; Thu, 19 Jan 2023 11:41:07 GMT Received: from smtprelay02.fra02v.mail.ibm.com ([9.218.2.226]) by ppma06ams.nl.ibm.com (PPS) with ESMTPS id 3n3knfpm2q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 19 Jan 2023 11:41:06 +0000 Received: from smtpav05.fra02v.mail.ibm.com (smtpav05.fra02v.mail.ibm.com [10.20.54.104]) by smtprelay02.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 30JBf3q547907288 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 19 Jan 2023 11:41:03 GMT Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 839FF20040; Thu, 19 Jan 2023 11:41:03 +0000 (GMT) Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1E2A020043; Thu, 19 Jan 2023 11:41:03 +0000 (GMT) Received: from li-1de7cd4c-3205-11b2-a85c-d27f97db1fe1.ibm.com.com (unknown [9.171.91.27]) by smtpav05.fra02v.mail.ibm.com (Postfix) with ESMTP; Thu, 19 Jan 2023 11:41:03 +0000 (GMT) From: Marc Hartmayer To: Cc: Janosch Frank , David Hildenbrand , Claudio Imbrenda , Nina Schoetterl-Glausch , Nico Boehr , Thomas Huth Subject: [kvm-unit-tests PATCH v2 5/8] s390x: use C pre-processor for linker script generation Date: Thu, 19 Jan 2023 12:40:42 +0100 Message-Id: <20230119114045.34553-6-mhartmay@linux.ibm.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230119114045.34553-1-mhartmay@linux.ibm.com> References: <20230119114045.34553-1-mhartmay@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: 4pKfHWwVZUDPBemoL3_V05DopR6Rq7b7 X-Proofpoint-ORIG-GUID: 5rlN520UxttL9t8OyJ52iWt02E0pRPaH X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.122.1 definitions=2023-01-19_09,2023-01-19_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 mlxscore=0 lowpriorityscore=0 phishscore=0 adultscore=0 suspectscore=0 clxscore=1015 priorityscore=1501 bulkscore=0 impostorscore=0 mlxlogscore=636 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2301190091 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Use the C pre-processor for the linker script generation. For example, this enables us the use of constants in the "linker scripts" `*.lds.S`. Signed-off-by: Marc Hartmayer --- .gitignore | 1 + s390x/Makefile | 6 ++++-- s390x/{flat.lds => flat.lds.S} | 0 s390x/snippets/asm/{flat.lds => flat.lds.S} | 0 s390x/snippets/c/{flat.lds => flat.lds.S} | 0 5 files changed, 5 insertions(+), 2 deletions(-) rename s390x/{flat.lds => flat.lds.S} (100%) rename s390x/snippets/asm/{flat.lds => flat.lds.S} (100%) rename s390x/snippets/c/{flat.lds => flat.lds.S} (100%) diff --git a/.gitignore b/.gitignore index 601822d67325..29f352c5ceb6 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,4 @@ cscope.* /s390x/comm.key /s390x/snippets/*/*.hdr /s390x/snippets/*/*.*obj +/s390x/**/*.lds diff --git a/s390x/Makefile b/s390x/Makefile index 8719f0c837cf..44ccca8102d6 100644 --- a/s390x/Makefile +++ b/s390x/Makefile @@ -76,7 +76,7 @@ CFLAGS += -fno-delete-null-pointer-checks LDFLAGS += -nostdlib -Wl,--build-id=none # We want to keep intermediate files -.PRECIOUS: %.o +.PRECIOUS: %.o %.lds asm-offsets = lib/$(ARCH)/asm-offsets.h include $(SRCDIR)/scripts/asm-offsets.mak @@ -159,6 +159,8 @@ $(SNIPPET_DIR)/c/%.gbin: $(SNIPPET_DIR)/c/%.o $(snippet_lib) $(FLATLIBS) $(SNIPP %.hdr.obj: %.hdr $(OBJCOPY) -I binary -O elf64-s390 -B "s390:64-bit" $< $@ +%.lds: %.lds.S + $(CPP) $(autodepend-flags) $(CPPFLAGS) -P -C -o $@ $< .SECONDEXPANSION: %.elf: $(FLATLIBS) $(asmlib) $(SRCDIR)/s390x/flat.lds $$(snippets-obj) $$(snippet-hdr-obj) %.o @@ -211,7 +213,7 @@ $(snippet_asmlib): $$(patsubst %.o,%.S,$$@) $(asm-offsets) arch_clean: asm_offsets_clean - $(RM) $(TEST_DIR)/*.{o,elf,bin} $(SNIPPET_DIR)/*/*.{o,elf,*bin,*obj,hdr} $(SNIPPET_DIR)/asm/.*.d $(TEST_DIR)/.*.d lib/s390x/.*.d $(comm-key) + $(RM) $(TEST_DIR)/*.{o,elf,bin,lds} $(SNIPPET_DIR)/*/*.{o,elf,*bin,*obj,hdr,lds} $(SNIPPET_DIR)/asm/.*.d $(TEST_DIR)/.*.d lib/s390x/.*.d $(comm-key) generated-files = $(asm-offsets) $(tests:.elf=.o) $(asmlib) $(cflatobjs): $(generated-files) diff --git a/s390x/flat.lds b/s390x/flat.lds.S similarity index 100% rename from s390x/flat.lds rename to s390x/flat.lds.S diff --git a/s390x/snippets/asm/flat.lds b/s390x/snippets/asm/flat.lds.S similarity index 100% rename from s390x/snippets/asm/flat.lds rename to s390x/snippets/asm/flat.lds.S diff --git a/s390x/snippets/c/flat.lds b/s390x/snippets/c/flat.lds.S similarity index 100% rename from s390x/snippets/c/flat.lds rename to s390x/snippets/c/flat.lds.S From patchwork Thu Jan 19 11:40:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Hartmayer X-Patchwork-Id: 13107753 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E140FC004D4 for ; Thu, 19 Jan 2023 11:41:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230455AbjASLlq (ORCPT ); Thu, 19 Jan 2023 06:41:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46360 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230159AbjASLlP (ORCPT ); Thu, 19 Jan 2023 06:41:15 -0500 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F1AF837B6A for ; Thu, 19 Jan 2023 03:41:10 -0800 (PST) Received: from pps.filterd (m0127361.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 30JBcYca034637 for ; Thu, 19 Jan 2023 11:41:10 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=/k163sN2KWyjHZayQwunJGYWD/JlmIKy/xhezyJ7L1w=; b=o4y/NxAeaTbZc/KWFh8+mLxVtHzFvooIUVy9rCZZ8WWLpJV3eX4YndunOV84MwU+nvL/ 0quSkct0LMQHAIrDenA4eGKiA4lcHiMfviw67DUuzRtt4EiiHN/ozdQIQVuUd4cS/oRC UG/B5oQSQ5k7Nc3F4nleit6AW8TXed6k2XoGAG2Y4ZHHGSyZ8mmjrWMJlVWedviEyyo6 0J9ULEu4HElq0KGStTobnwo5DMfmbDk09ZVLpxYmq7qlgyWKSTd7v6vqjxJpN+1VPZdW sdSlnrxnx6VGyC7eosSfgmiT3igTlEcXmC541uwNEySXDEg6/vs4E5Kk0j1v/poZUWtg EQ== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3n72624enk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 19 Jan 2023 11:41:09 +0000 Received: from m0127361.ppops.net (m0127361.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 30JBcjZA036075 for ; Thu, 19 Jan 2023 11:41:09 GMT Received: from ppma01fra.de.ibm.com (46.49.7a9f.ip4.static.sl-reverse.com [159.122.73.70]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3n72624emy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 19 Jan 2023 11:41:09 +0000 Received: from pps.filterd (ppma01fra.de.ibm.com [127.0.0.1]) by ppma01fra.de.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 30J0KLPJ025743; Thu, 19 Jan 2023 11:41:07 GMT Received: from smtprelay03.fra02v.mail.ibm.com ([9.218.2.224]) by ppma01fra.de.ibm.com (PPS) with ESMTPS id 3n3m16cu1u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 19 Jan 2023 11:41:07 +0000 Received: from smtpav05.fra02v.mail.ibm.com (smtpav05.fra02v.mail.ibm.com [10.20.54.104]) by smtprelay03.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 30JBf49Z49611094 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 19 Jan 2023 11:41:04 GMT Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 071A020040; Thu, 19 Jan 2023 11:41:04 +0000 (GMT) Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 981F820043; Thu, 19 Jan 2023 11:41:03 +0000 (GMT) Received: from li-1de7cd4c-3205-11b2-a85c-d27f97db1fe1.ibm.com.com (unknown [9.171.91.27]) by smtpav05.fra02v.mail.ibm.com (Postfix) with ESMTP; Thu, 19 Jan 2023 11:41:03 +0000 (GMT) From: Marc Hartmayer To: Cc: Janosch Frank , David Hildenbrand , Claudio Imbrenda , Nina Schoetterl-Glausch , Nico Boehr , Thomas Huth Subject: [kvm-unit-tests PATCH v2 6/8] s390x: define a macro for the stack frame size Date: Thu, 19 Jan 2023 12:40:43 +0100 Message-Id: <20230119114045.34553-7-mhartmay@linux.ibm.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230119114045.34553-1-mhartmay@linux.ibm.com> References: <20230119114045.34553-1-mhartmay@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: WJLYsCOzx1mOUnIq9qBLvRQ3JbSvVJZZ X-Proofpoint-ORIG-GUID: jboCHXem0ncyRdtXh3xwRz3qNvh0aH1O X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.122.1 definitions=2023-01-19_09,2023-01-19_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 mlxscore=0 lowpriorityscore=0 phishscore=0 adultscore=0 suspectscore=0 clxscore=1015 priorityscore=1501 bulkscore=0 impostorscore=0 mlxlogscore=999 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2301190091 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Define and use a macro for the stack frame size. Signed-off-by: Marc Hartmayer Reviewed-by: Nina Schoetterl-Glausch --- lib/s390x/asm-offsets.c | 1 + s390x/Makefile | 2 +- s390x/cstart64.S | 2 +- s390x/flat.lds.S | 4 +++- s390x/gs.c | 5 +++-- s390x/macros.S | 4 ++-- s390x/snippets/c/flat.lds.S | 6 ++++-- 7 files changed, 15 insertions(+), 9 deletions(-) diff --git a/lib/s390x/asm-offsets.c b/lib/s390x/asm-offsets.c index f612f3277a95..188dd2e51181 100644 --- a/lib/s390x/asm-offsets.c +++ b/lib/s390x/asm-offsets.c @@ -87,6 +87,7 @@ int main(void) OFFSET(STACK_FRAME_INT_GRS0, stack_frame_int, grs0); OFFSET(STACK_FRAME_INT_GRS1, stack_frame_int, grs1); DEFINE(STACK_FRAME_INT_SIZE, sizeof(struct stack_frame_int)); + DEFINE(STACK_FRAME_SIZE, sizeof(struct stack_frame)); return 0; } diff --git a/s390x/Makefile b/s390x/Makefile index 44ccca8102d6..9a8e2af1b2be 100644 --- a/s390x/Makefile +++ b/s390x/Makefile @@ -159,7 +159,7 @@ $(SNIPPET_DIR)/c/%.gbin: $(SNIPPET_DIR)/c/%.o $(snippet_lib) $(FLATLIBS) $(SNIPP %.hdr.obj: %.hdr $(OBJCOPY) -I binary -O elf64-s390 -B "s390:64-bit" $< $@ -%.lds: %.lds.S +%.lds: %.lds.S $(asm-offsets) $(CPP) $(autodepend-flags) $(CPPFLAGS) -P -C -o $@ $< .SECONDEXPANSION: diff --git a/s390x/cstart64.S b/s390x/cstart64.S index 6f83da2a6c0a..468ace3ea4df 100644 --- a/s390x/cstart64.S +++ b/s390x/cstart64.S @@ -38,7 +38,7 @@ start: /* setup stack */ larl %r15, stackptr /* Clear first stack frame */ - xc 0(160,%r15), 0(%r15) + xc 0(STACK_FRAME_SIZE,%r15), 0(%r15) /* setup initial PSW mask + control registers*/ larl %r1, initial_psw lpswe 0(%r1) diff --git a/s390x/flat.lds.S b/s390x/flat.lds.S index 952f6cd457ed..0cb7e383cc76 100644 --- a/s390x/flat.lds.S +++ b/s390x/flat.lds.S @@ -1,3 +1,5 @@ +#include + SECTIONS { .lowcore : { @@ -44,6 +46,6 @@ SECTIONS /* * stackptr set with initial stack frame preallocated */ - stackptr = . - 160; + stackptr = . - STACK_FRAME_SIZE; stacktop = .; } diff --git a/s390x/gs.c b/s390x/gs.c index 4993eb8f43a9..2c2b972d7e65 100644 --- a/s390x/gs.c +++ b/s390x/gs.c @@ -9,6 +9,7 @@ * Janosch Frank */ #include +#include #include #include #include @@ -41,8 +42,8 @@ extern void gs_handler_asm(void); " aghi %r15,-320\n" /* Allocate stack frame */ " stmg %r0,%r13,192(%r15)\n" /* Store regs to save area */ " stg %r14,312(%r15)\n" - " la %r2,160(%r15)\n" /* Store gscb address in this_cb */ - " .insn rxy,0xe30000000049,0,160(%r15)\n" /* stgsc */ + " la %r2," xstr(STACK_FRAME_SIZE) "(%r15) \n" /* Store gscb address in this_cb */ + " .insn rxy,0xe30000000049,0," xstr(STACK_FRAME_SIZE) "(%r15)\n" /* stgsc */ " lg %r14,24(%r2)\n" /* Get GSEPLA from GSCB*/ " lg %r14,40(%r14)\n" /* Get GSERA from GSEPL*/ " stg %r14,304(%r15)\n" /* Store GSERA in r14 of reg save area */ diff --git a/s390x/macros.S b/s390x/macros.S index 13cff299488f..e2a56a366c70 100644 --- a/s390x/macros.S +++ b/s390x/macros.S @@ -21,14 +21,14 @@ /* Save the stack address in GR2 which is the first function argument */ lgr %r2, %r15 /* Allocate stack space for called C function, as specified in s390 ELF ABI */ - slgfi %r15, 160 + slgfi %r15, STACK_FRAME_SIZE /* * Save the address of the interrupt stack into the back chain * of the called function. */ stg %r2, STACK_FRAME_INT_BACKCHAIN(%r15) brasl %r14, \c_func - algfi %r15, 160 + algfi %r15, STACK_FRAME_SIZE RESTORE_REGS_STACK lpswe \old_psw .endm diff --git a/s390x/snippets/c/flat.lds.S b/s390x/snippets/c/flat.lds.S index 9e5eb66bec23..468b5f1eebe8 100644 --- a/s390x/snippets/c/flat.lds.S +++ b/s390x/snippets/c/flat.lds.S @@ -1,3 +1,5 @@ +#include + SECTIONS { .lowcore : { @@ -18,9 +20,9 @@ SECTIONS . = 0x4000; /* * The stack grows down from 0x4000 to 0x2000, we pre-allocoate - * a frame via the -160. + * a frame via the -STACK_FRAME_SIZE. */ - stackptr = . - 160; + stackptr = . - STACK_FRAME_SIZE; stacktop = .; /* Start text 0x4000 */ .text : { From patchwork Thu Jan 19 11:40:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Hartmayer X-Patchwork-Id: 13107755 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4A7B2C46467 for ; Thu, 19 Jan 2023 11:41:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231181AbjASLlz (ORCPT ); Thu, 19 Jan 2023 06:41:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46220 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230479AbjASLlO (ORCPT ); Thu, 19 Jan 2023 06:41:14 -0500 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57E804B49D for ; Thu, 19 Jan 2023 03:41:11 -0800 (PST) Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 30JA84M7014849 for ; Thu, 19 Jan 2023 11:41:11 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : mime-version; s=pp1; bh=Urvy7PYuOHZOqM1CF7bHcgafdIoAQwuMNMFiX7oBlHI=; b=OruwkVU23/bfrECbqIM+BBCkwCxCKr+AV9Yu7AcuvMP4mC//CPB15j1g+v5qsn2ZJzub dk6izACT4S8Gwsbr70sW5CNkcqlAL6uzD/NLQwcAO2hiD6v5gOsy9hdTJ8PY8AmxneC/ 2PGLECSssv6J9Ec39JKhh8YPHhijtQ3qyfjIWnhF07sS66xL5zpSPg89ThgLqeUuNdVu CljCAId2ihNU1waCjocuo2J6o/zwbNB/jAwUaaqESKnIRO0oGTKU5CWr0/BAMbNZdFMf onbMbQNwXjs2Rkx7yDWpHNFz60ahx6PKQn1xxnKTANFSZT05o3gGa0BsueOKtXDIjolP DA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3n717ydngq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 19 Jan 2023 11:41:10 +0000 Received: from m0098404.ppops.net (m0098404.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 30JB9WsN000581 for ; Thu, 19 Jan 2023 11:41:10 GMT Received: from ppma05fra.de.ibm.com (6c.4a.5195.ip4.static.sl-reverse.com [149.81.74.108]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3n717ydng7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 19 Jan 2023 11:41:10 +0000 Received: from pps.filterd (ppma05fra.de.ibm.com [127.0.0.1]) by ppma05fra.de.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 30JA1hSB013361; Thu, 19 Jan 2023 11:41:08 GMT Received: from smtprelay03.fra02v.mail.ibm.com ([9.218.2.224]) by ppma05fra.de.ibm.com (PPS) with ESMTPS id 3n3m16ctv2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 19 Jan 2023 11:41:07 +0000 Received: from smtpav05.fra02v.mail.ibm.com (smtpav05.fra02v.mail.ibm.com [10.20.54.104]) by smtprelay03.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 30JBf4W247382870 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 19 Jan 2023 11:41:04 GMT Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8906820040; Thu, 19 Jan 2023 11:41:04 +0000 (GMT) Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1B32220043; Thu, 19 Jan 2023 11:41:04 +0000 (GMT) Received: from li-1de7cd4c-3205-11b2-a85c-d27f97db1fe1.ibm.com.com (unknown [9.171.91.27]) by smtpav05.fra02v.mail.ibm.com (Postfix) with ESMTP; Thu, 19 Jan 2023 11:41:04 +0000 (GMT) From: Marc Hartmayer To: Cc: Janosch Frank , David Hildenbrand , Claudio Imbrenda , Nina Schoetterl-Glausch , Nico Boehr , Thomas Huth Subject: [kvm-unit-tests PATCH v2 7/8] lib/linux/const.h: test for `__ASSEMBLER__` as well Date: Thu, 19 Jan 2023 12:40:44 +0100 Message-Id: <20230119114045.34553-8-mhartmay@linux.ibm.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230119114045.34553-1-mhartmay@linux.ibm.com> References: <20230119114045.34553-1-mhartmay@linux.ibm.com> X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: O7tnIqjuYPgzY7whJL21t2PlFboHBUWK X-Proofpoint-GUID: ll3jTOqr46OVbYv5l8uav91Qi7KK2ADT X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.122.1 definitions=2023-01-19_09,2023-01-19_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=872 impostorscore=0 mlxscore=0 clxscore=1015 priorityscore=1501 spamscore=0 adultscore=0 malwarescore=0 lowpriorityscore=0 bulkscore=0 suspectscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2301190091 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On s390x we're using the preprocessor for generating our linker scripts out of assembly files. The macro `__ASSEMBLER__` is defined with value 1 when preprocessing assembly language using gcc. [1] Therefore, let's check for the macro `__ASSEMBLER__` in `lib/linux/const.h` as well. Thus we can use macros that makes use of the `_AC` or `_AT` macro in the "linker scripts". [1] https://gcc.gnu.org/onlinedocs/cpp/Standard-Predefined-Macros.html Signed-off-by: Marc Hartmayer Reviewed-by: Janosch Frank --- lib/linux/const.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/linux/const.h b/lib/linux/const.h index c872bfd25e13..be114dc4a553 100644 --- a/lib/linux/const.h +++ b/lib/linux/const.h @@ -12,7 +12,7 @@ * leave it unchanged in asm. */ -#ifdef __ASSEMBLY__ +#if defined(__ASSEMBLY__) || defined(__ASSEMBLER__) #define _AC(X,Y) X #define _AT(T,X) X #else From patchwork Thu Jan 19 11:40:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Hartmayer X-Patchwork-Id: 13107754 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B4A9EC004D4 for ; Thu, 19 Jan 2023 11:41:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231153AbjASLlt (ORCPT ); Thu, 19 Jan 2023 06:41:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46362 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230477AbjASLlO (ORCPT ); Thu, 19 Jan 2023 06:41:14 -0500 Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CBDF14B898 for ; Thu, 19 Jan 2023 03:41:11 -0800 (PST) Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 30JANRGZ029976 for ; Thu, 19 Jan 2023 11:41:11 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=atxlL22lTpQD0qkiYh+cNXVkDDhIGvAQ7WEieHWn0j4=; b=Vo4bRxaD3yYMiOizF6uOev25pTV7apyIWON9NPYbBGHllxh0ZcGdFjVEZknIT8wiTvET f32v9P1njuHVkWBzfLHsg90afI22exzU0Vju1Ha/eiUZKgnL4UI7qjeh2ZfqMyggnDfb T7mOqtRm22vskHO1eqzVzWVIsPc0tQ9wxkjQfsoN5qoAtnC/5RKCFfPukcyQdUeOuQJW rrGX7qElU5L077QcQK8R+i5bTcbK/SbELkvBxktZABBqQaht2q7YdxQrDUXM85mVvcEm jKL8WIEb6OR/tpimAUuddUW5Fve8OhVLMTNNHUHmAzOuvJyr+HTX4/Y3dHb57V5Xzqq+ rw== Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3n6jc026dp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 19 Jan 2023 11:41:10 +0000 Received: from m0098420.ppops.net (m0098420.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 30JBKADC001202 for ; Thu, 19 Jan 2023 11:41:10 GMT Received: from ppma03ams.nl.ibm.com (62.31.33a9.ip4.static.sl-reverse.com [169.51.49.98]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3n6jc026d5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 19 Jan 2023 11:41:10 +0000 Received: from pps.filterd (ppma03ams.nl.ibm.com [127.0.0.1]) by ppma03ams.nl.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 30J5X3x9023782; Thu, 19 Jan 2023 11:41:08 GMT Received: from smtprelay04.fra02v.mail.ibm.com ([9.218.2.228]) by ppma03ams.nl.ibm.com (PPS) with ESMTPS id 3n3m16pm1u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 19 Jan 2023 11:41:08 +0000 Received: from smtpav05.fra02v.mail.ibm.com (smtpav05.fra02v.mail.ibm.com [10.20.54.104]) by smtprelay04.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 30JBf5ZR26018472 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 19 Jan 2023 11:41:05 GMT Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0D3BB20049; Thu, 19 Jan 2023 11:41:05 +0000 (GMT) Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9D17F20043; Thu, 19 Jan 2023 11:41:04 +0000 (GMT) Received: from li-1de7cd4c-3205-11b2-a85c-d27f97db1fe1.ibm.com.com (unknown [9.171.91.27]) by smtpav05.fra02v.mail.ibm.com (Postfix) with ESMTP; Thu, 19 Jan 2023 11:41:04 +0000 (GMT) From: Marc Hartmayer To: Cc: Janosch Frank , David Hildenbrand , Claudio Imbrenda , Nina Schoetterl-Glausch , Nico Boehr , Thomas Huth Subject: [kvm-unit-tests PATCH v2 8/8] s390x/Makefile: add an extra `%.aux.o` target Date: Thu, 19 Jan 2023 12:40:45 +0100 Message-Id: <20230119114045.34553-9-mhartmay@linux.ibm.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230119114045.34553-1-mhartmay@linux.ibm.com> References: <20230119114045.34553-1-mhartmay@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: 9pj9ezN0zQt28Nw7Woqj_TXO_xjSbcbp X-Proofpoint-GUID: k-m9TFrYfKkVTskkacI2ShExlHtS2AHx X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.122.1 definitions=2023-01-19_09,2023-01-19_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 suspectscore=0 mlxscore=0 bulkscore=0 adultscore=0 lowpriorityscore=0 phishscore=0 mlxlogscore=999 spamscore=0 clxscore=1015 priorityscore=1501 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2301190091 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org It's unusual to create multiple files in one target rule, therefore let's create an extra target for `%.aux.o`. As a side effect, this change fixes the dependency tracking of the prerequisites of `.aux.o` (lib/auxinfo.c wasn't listed before). Signed-off-by: Marc Hartmayer --- s390x/Makefile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/s390x/Makefile b/s390x/Makefile index 9a8e2af1b2be..6fa62416c0e9 100644 --- a/s390x/Makefile +++ b/s390x/Makefile @@ -162,13 +162,14 @@ $(SNIPPET_DIR)/c/%.gbin: $(SNIPPET_DIR)/c/%.o $(snippet_lib) $(FLATLIBS) $(SNIPP %.lds: %.lds.S $(asm-offsets) $(CPP) $(autodepend-flags) $(CPPFLAGS) -P -C -o $@ $< +%.aux.o: $(SRCDIR)/lib/auxinfo.c + $(CC) $(CFLAGS) -c -o $@ $^ -DPROGNAME=\"$(@:.aux.o=.elf)\" + .SECONDEXPANSION: -%.elf: $(FLATLIBS) $(asmlib) $(SRCDIR)/s390x/flat.lds $$(snippets-obj) $$(snippet-hdr-obj) %.o - $(CC) $(CFLAGS) -c -o $(@:.elf=.aux.o) $(SRCDIR)/lib/auxinfo.c -DPROGNAME=\"$@\" +%.elf: $(FLATLIBS) $(asmlib) $(SRCDIR)/s390x/flat.lds $$(snippets-obj) $$(snippet-hdr-obj) %.o %.aux.o @$(CC) $(LDFLAGS) -o $@ -T $(SRCDIR)/s390x/flat.lds \ - $(filter %.o, $^) $(FLATLIBS) $(snippets-obj) $(snippet-hdr-obj) $(@:.elf=.aux.o) || \ + $(filter %.o, $^) $(FLATLIBS) $(snippets-obj) $(snippet-hdr-obj) || \ { echo "Failure probably caused by missing definition of gen-se-header executable"; exit 1; } - $(RM) $(@:.elf=.aux.o) @chmod a-x $@ # Secure Execution Customer Communication Key file