Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2790985pxj; Mon, 10 May 2021 10:47:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwljV0THcBPWRSkFgQEux8tQCaVZ82zoQU6DDVIohU12r5IqIChhXRv/VH44mxz7T3cWWVB X-Received: by 2002:a17:907:161f:: with SMTP id hb31mr27127450ejc.514.1620668848628; Mon, 10 May 2021 10:47:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620668848; cv=none; d=google.com; s=arc-20160816; b=hKvylMyERLZpD30k5eabbeYLKx3DhGPccSSvSIeWyGrHKksRH4c04NmvLXT5XMEg9/ Bh0WFfZ+Pg2antpHo5RXpIIMkJLk3u1QAfx8/Rz/ahxe8UTLSlkYKb7lkGBEuV7EUnVU G3g3xduWXZeQtxFQee/kXQc5YaeCNX9f6JadkCkAZj5Bp04yl2SBS/5eb680olzclK4z w90lnvVxW4jRVWTivv1Su0PTu8uPnP/RZEUgg1ibHgSi0VfnZoyP7vrp7KPs+oz7VKBS exbKcKzIL2+RwZTzbNWeyDhYt//6iWwRek5H2DmTS762NWRDqaMcfipMd139RrwbBorZ ge/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter; bh=bGapOFI3jJjg4DaQVvj//BCsrNlWKEqvqlwR5LuvAto=; b=m8Mw+0Ems3CyU7K+SQvCgRnLA+VgW35HqXw518EGKaJrXH4a5L9hokEnqZLtkyfd0R PnaGuK3G1jsf0YgOiTuTZg+iJlHSs7myaSzV61rWxsv5jM5hI81h/tUtNmIsHFSZvym0 Nr5oPj30SLiYuYaEfrR+ds3R9U3U9Eex4OBMudLDF519nyCcUkuFUUa9FvgQ59RLHyU6 oTAvESkct95dZ+OezKneZFglcAdY1ACPFiNAfjq5ftIr8lW9foMD/M4Fos3O8Lc5SKL7 poDbcfcXbBbB6V6+GAnbmLfpCAqM22bjcKtJj65sic2QoaYR/sQbUqLzKnQrWS7d+LMw EyPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zytor.com header.s=2021042801 header.b=p+uh0y5r; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zytor.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s5si247115edw.318.2021.05.10.10.47.02; Mon, 10 May 2021 10:47:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@zytor.com header.s=2021042801 header.b=p+uh0y5r; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zytor.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233046AbhEJRrB (ORCPT + 99 others); Mon, 10 May 2021 13:47:01 -0400 Received: from terminus.zytor.com ([198.137.202.136]:36475 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231631AbhEJRqp (ORCPT ); Mon, 10 May 2021 13:46:45 -0400 Received: from tazenda.hos.anvin.org ([IPv6:2601:646:8602:8be0:7285:c2ff:fefb:fd4]) (authenticated bits=0) by mail.zytor.com (8.16.1/8.15.2) with ESMTPSA id 14AHjGkD2449170 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Mon, 10 May 2021 10:45:27 -0700 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.zytor.com 14AHjGkD2449170 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zytor.com; s=2021042801; t=1620668728; bh=bGapOFI3jJjg4DaQVvj//BCsrNlWKEqvqlwR5LuvAto=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=p+uh0y5robEX/TyE7TKGFWF2rjDFbVh5MHlj0KAyr9HUxKoiQFASx02HoTTxudjfr 1LBans60tXheZeDf/DnZJasEHOo/A3AmWHN36tak9CBfbjRCMzVR4Lg6S8tTnQJ9ax nctAWK6uk35U6BdZBv6tIA2hZwQxtcdIEcwXkpkD4A2xkEDcZDM4C2kOtTcOE0qLu0 LWivE2kwxPMfIARIL5PFdPdf5WgTl7wGIpcmWznSvTBxzD2fCZie/NC+XlgdAEOhR2 /4yLV6WFYwSNW3/DwAsaZ35pFzbTAYDO/53CoSmOXXZJG/jV5Kv8xesfYBxHqD2fyT iIG5TRIv6bemg== From: "H. Peter Anvin" To: Ingo Molnar , Thomas Gleixner , Andy Lutomirski , Borislav Petkov Cc: "H. Peter Anvin" , Linux Kernel Mailing List Subject: [RFC PATCH 3/6] x86/syscall: unconditionally prototype {ia32,x32}_sys_call_table[] Date: Mon, 10 May 2021 10:45:06 -0700 Message-Id: <20210510174509.3039991-4-hpa@zytor.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210510174509.3039991-1-hpa@zytor.com> References: <20210510174509.3039991-1-hpa@zytor.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: "H. Peter Anvin (Intel)" Even if these APIs are disabled, and the arrays therefore do not exist, having the prototypes allows us to use IS_ENABLED() rather than If something ends up trying to actually *use* these arrays a linker error will ensue. Signed-off-by: H. Peter Anvin (Intel) --- arch/x86/include/asm/syscall.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/arch/x86/include/asm/syscall.h b/arch/x86/include/asm/syscall.h index 4e20054d7533..f6593cafdbd9 100644 --- a/arch/x86/include/asm/syscall.h +++ b/arch/x86/include/asm/syscall.h @@ -21,13 +21,12 @@ extern const sys_call_ptr_t sys_call_table[]; #if defined(CONFIG_X86_32) #define ia32_sys_call_table sys_call_table -#endif - -#if defined(CONFIG_IA32_EMULATION) +#else +/* + * These may not exist, but still put the prototypes in so we + * can use IS_ENABLED(). + */ extern const sys_call_ptr_t ia32_sys_call_table[]; -#endif - -#ifdef CONFIG_X86_X32_ABI extern const sys_call_ptr_t x32_sys_call_table[]; #endif -- 2.31.1