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