From mboxrd@z Thu Jan 1 00:00:00 1970 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 34A40C433EF for ; Fri, 15 Oct 2021 08:02:09 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B715D60EE2 for ; Fri, 15 Oct 2021 08:02:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org B715D60EE2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 282AC900003; Fri, 15 Oct 2021 04:02:08 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 232EB900002; Fri, 15 Oct 2021 04:02:08 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0FB1B900003; Fri, 15 Oct 2021 04:02:08 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0234.hostedemail.com [216.40.44.234]) by kanga.kvack.org (Postfix) with ESMTP id F2399900002 for ; Fri, 15 Oct 2021 04:02:07 -0400 (EDT) Received: from smtpin31.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id AD2A68249980 for ; Fri, 15 Oct 2021 08:02:07 +0000 (UTC) X-FDA: 78697928694.31.ACD97E7 Received: from mail-pj1-f50.google.com (mail-pj1-f50.google.com [209.85.216.50]) by imf03.hostedemail.com (Postfix) with ESMTP id 9366D30000A4 for ; Fri, 15 Oct 2021 08:02:06 +0000 (UTC) Received: by mail-pj1-f50.google.com with SMTP id g13-20020a17090a3c8d00b00196286963b9so8786979pjc.3 for ; Fri, 15 Oct 2021 01:02:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:subject:to:cc:references:in-reply-to:mime-version :message-id:content-transfer-encoding; bh=LcM+UHlFK6Pfd+gEtHbJF09UeSP+pe47XQ11Z5avvEg=; b=ZyQ7hsmusqR3lpIB+4jVL1CZJhbUN3wIXVwfcqZRTh7YjNgeRMolohGOMUDgZa5JFk 5hu4f8+DyFDYQvHUKeaH4iwxqLbjXa6B5jwA0ZS3Q2cK/rTHNtvPRV7STwIhBJ4q0/dS gjTxe5u1++xCa1cryzKvYmDjPaNzP4pUAih2/vPPogCIkQd3KvJlMoEVBZJdkkyxFpK1 m9nlpZVULb3/vrI/ROKVbpfaBzpfcdMEQZCksz+V4o1oVt/iua2ZAVLU7FbsXVVsCRS4 wtE8V9dIYvn1mj3SwuRsaw8BSYmZJkXtfz0K4JkS/ZlBu5QRVlMHaHMbH8oAoCBhwJZb 9fsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:subject:to:cc:references:in-reply-to :mime-version:message-id:content-transfer-encoding; bh=LcM+UHlFK6Pfd+gEtHbJF09UeSP+pe47XQ11Z5avvEg=; b=X8PAbZQ26mJI1PHkl6PChYarYStNEogWyuoV3xM3+M5MMlhDGN8W6R1WvvKB48DMWG khWRKuhGdbgPQJxwDBaHOOY9F2mwR2RORLo89Z/I5jbR6y1Hr59dBue5hi0cJhk27/0h rzQG2R5LN36YIpVatQlckprMDUdXVVLTBn0M36ZRgIhPFRF6zeGoSR3mzNoeE3FnrAmm 0hmBmxBAlL69qjku0LFrB6BXiGpQM0nso1rmxoKxbPw107g7lmcX1sr+Y/luupc+mDyq XknKXWb2VVpNUOZ26ibH9iqB4NYMvdWEee6XzBy2mNP/6acUrrYF10uePIPZVhWAiILl f1hg== X-Gm-Message-State: AOAM531gPwXNTq4NFA84OJwy5fD9RDF3Vd/s9vGYPMTbYb5qNmr5de33 BpdzYZF8fF8/2dDB7TAeZOU= X-Google-Smtp-Source: ABdhPJzj9O7pqlmGSv6dHaxotuTUhJBqQGbDk2OY1xR8CUwFnQB2mcPNJnY0o5eFmCaqPtRJZKn3BQ== X-Received: by 2002:a17:90b:1bd2:: with SMTP id oa18mr3158237pjb.164.1634284926242; Fri, 15 Oct 2021 01:02:06 -0700 (PDT) Received: from localhost (14-203-144-177.static.tpgi.com.au. [14.203.144.177]) by smtp.gmail.com with ESMTPSA id m7sm4142769pgn.32.2021.10.15.01.02.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Oct 2021 01:02:05 -0700 (PDT) Date: Fri, 15 Oct 2021 18:02:00 +1000 From: Nicholas Piggin Subject: Re: [PATCH v2 06/13] asm-generic: Use HAVE_FUNCTION_DESCRIPTORS to define associated stubs To: Andrew Morton , Arnd Bergmann , Benjamin Herrenschmidt , Christophe Leroy , Helge Deller , Greg Kroah-Hartman , "James E.J. Bottomley" , Kees Cook , Michael Ellerman , Paul Mackerras Cc: linux-arch@vger.kernel.org, linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org References: <4fda65cda906e56aa87806b658e0828c64792403.1634190022.git.christophe.leroy@csgroup.eu> <1634278340.5yp7xtm7um.astroid@bobo.none> <7523a005-ea69-7c4c-64ad-bc2537921975@csgroup.eu> In-Reply-To: <7523a005-ea69-7c4c-64ad-bc2537921975@csgroup.eu> MIME-Version: 1.0 Message-Id: <1634284464.kd8scm0ckz.astroid@bobo.none> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 9366D30000A4 X-Stat-Signature: kyoiknzuyga1nui7h4icdtuefak13xa7 Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=ZyQ7hsmu; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf03.hostedemail.com: domain of npiggin@gmail.com designates 209.85.216.50 as permitted sender) smtp.mailfrom=npiggin@gmail.com X-Rspamd-Server: rspam02 X-HE-Tag: 1634284926-126383 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Excerpts from Christophe Leroy's message of October 15, 2021 4:24 pm: >=20 >=20 > Le 15/10/2021 =C3=A0 08:16, Nicholas Piggin a =C3=A9crit=C2=A0: >> Excerpts from Christophe Leroy's message of October 14, 2021 3:49 pm: >>> Replace HAVE_DEREFERENCE_FUNCTION_DESCRIPTOR by >>> HAVE_FUNCTION_DESCRIPTORS and use it instead of >>> 'dereference_function_descriptor' macro to know >>> whether an arch has function descriptors. >>> >>> To limit churn in one of the following patches, use >>> an #ifdef/#else construct with empty first part >>> instead of an #ifndef in asm-generic/sections.h >>=20 >> Is it worth putting this into Kconfig if you're going to >> change it? In any case >=20 > That was what I wanted to do in the begining but how can I do that in=20 > Kconfig ? >=20 > #ifdef __powerpc64__ > #if defined(_CALL_ELF) && _CALL_ELF =3D=3D 2 > #define PPC64_ELF_ABI_v2 > #else > #define PPC64_ELF_ABI_v1 > #endif > #endif /* __powerpc64__ */ >=20 > #ifdef PPC64_ELF_ABI_v1 > #define HAVE_DEREFERENCE_FUNCTION_DESCRIPTOR 1 We have ELFv2 ABI / function descriptors iff big-endian so you could=20 just select based on that. I have a patch that makes the ABI version configurable which cleans some of this up a bit, but that can be rebased on your series if we ever merge it. Maybe just add BUILD_BUG_ONs in the above ifdef block to ensure CONFIG_HAVE_FUNCTION_DESCRIPTORS was set the right way, so I don't forget. Thanks, Nick