From patchwork Tue Apr 4 11:36:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nico Boehr X-Patchwork-Id: 13199637 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 C54DEC6FD1D for ; Tue, 4 Apr 2023 11:37:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235005AbjDDLhP (ORCPT ); Tue, 4 Apr 2023 07:37:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39326 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234752AbjDDLhG (ORCPT ); Tue, 4 Apr 2023 07:37:06 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 741B12D66 for ; Tue, 4 Apr 2023 04:36:56 -0700 (PDT) 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 3349v9d5016327; Tue, 4 Apr 2023 11:36:54 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=eooVMNY12d4PIRdlfRREXKlBB/c6LetaDTS5O1I3m78=; b=Dsc9Sr+IZnY5Syg2yiZg9OMr9ykdUiVRVvBnxxt1C0WKDqFdmbU2jtRWWusEacLz94No RGysbBqpwXqRe4Fwl+Oq5rEOu1qKzvxwqZj0Vvvuh6goGLzAgEMISSH7koVqdoe6e7pz 3BOkPSpo4InMfEmt76dGg/mYWEb/0TE1oLCX7+DOkWQhPcbcuFz8b51JlxvcFTmPZnKs LEswMAmvDR/0B4vQANeR3fplGV5a8qtUwlKc+b6vxvHm8+GTlxgzJZjjv6OZKmioEfDS aEQ0e/sIyRuuOQM2CizT0UHJIVXalqExmOwn+zhUBNZ7Y4+AuLCql2fDyXcnk/n6gmw2 oQ== Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3prhqd2atv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 04 Apr 2023 11:36:54 +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 334BHqpv027117; Tue, 4 Apr 2023 11:36:53 GMT Received: from ppma02fra.de.ibm.com (47.49.7a9f.ip4.static.sl-reverse.com [159.122.73.71]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3prhqd2at8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 04 Apr 2023 11:36:53 +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 3342KaHA007870; Tue, 4 Apr 2023 11:36:51 GMT Received: from smtprelay02.fra02v.mail.ibm.com ([9.218.2.226]) by ppma02fra.de.ibm.com (PPS) with ESMTPS id 3ppc86suwk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 04 Apr 2023 11:36:51 +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 334BamIs20316866 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 4 Apr 2023 11:36:48 GMT Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 391A82004B; Tue, 4 Apr 2023 11:36:48 +0000 (GMT) Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A81C420043; Tue, 4 Apr 2023 11:36:47 +0000 (GMT) Received: from t14-nrb.ibmuc.com (unknown [9.171.55.238]) by smtpav05.fra02v.mail.ibm.com (Postfix) with ESMTP; Tue, 4 Apr 2023 11:36:47 +0000 (GMT) From: Nico Boehr To: thuth@redhat.com, pbonzini@redhat.com, andrew.jones@linux.dev Cc: kvm@vger.kernel.org, frankja@linux.ibm.com, imbrenda@linux.ibm.com, Marc Hartmayer Subject: [kvm-unit-tests GIT PULL v2 07/14] lib/linux/const.h: test for `__ASSEMBLER__` as well Date: Tue, 4 Apr 2023 13:36:32 +0200 Message-Id: <20230404113639.37544-8-nrb@linux.ibm.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230404113639.37544-1-nrb@linux.ibm.com> References: <20230404113639.37544-1-nrb@linux.ibm.com> X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: mPN-ogTOLF7-BYsw1BBUzlMO4z4jlwPB X-Proofpoint-GUID: vbdWlc4BBo0JxXJe8vnD4udo54sGFSXM X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-04-04_04,2023-04-04_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=999 lowpriorityscore=0 mlxscore=0 adultscore=0 priorityscore=1501 phishscore=0 malwarescore=0 bulkscore=0 clxscore=1015 suspectscore=0 spamscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303200000 definitions=main-2304040107 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org From: Marc Hartmayer 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 Link: https://lore.kernel.org/r/20230307091051.13945-8-mhartmay@linux.ibm.com Signed-off-by: Nico Boehr --- 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 c872bfd..be114dc 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