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 7CCFFC433EF for ; Fri, 15 Oct 2021 11:52:53 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id F37F46101D for ; Fri, 15 Oct 2021 11:52:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org F37F46101D 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 43E5D940013; Fri, 15 Oct 2021 07:52:52 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3EDF2940009; Fri, 15 Oct 2021 07:52:52 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 28F3D940013; Fri, 15 Oct 2021 07:52:52 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0172.hostedemail.com [216.40.44.172]) by kanga.kvack.org (Postfix) with ESMTP id 162AA940009 for ; Fri, 15 Oct 2021 07:52:52 -0400 (EDT) Received: from smtpin16.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id BEA531846A710 for ; Fri, 15 Oct 2021 11:52:51 +0000 (UTC) X-FDA: 78698510142.16.AF14E51 Received: from mail-pj1-f47.google.com (mail-pj1-f47.google.com [209.85.216.47]) by imf25.hostedemail.com (Postfix) with ESMTP id B40BBB00008E for ; Fri, 15 Oct 2021 11:52:49 +0000 (UTC) Received: by mail-pj1-f47.google.com with SMTP id g13-20020a17090a3c8d00b00196286963b9so9144287pjc.3 for ; Fri, 15 Oct 2021 04:52:51 -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=JxOm4PejsflLixA5I77T/u/EeNwxcWFLBvedgG7X3g0=; b=RnbWBgff8R8VzvKZ7Ek8H2JjAGpnn0fYqUT20UYWFA1Evqdl9wbX2+SrmYs0VyUeof My+8NauijiAKQ1ELcOViTyu+YwKGpuVjGnDI/Y+s8zKBoD4CkdLl+3utOKqPrAi2ZvJa xco3Sdw7p4I0EprZLeBSKrXfq9dwLjRsRYR9egfDkYeulFpk8Eox9oQj1DskkBEoPdde DzFRCrsOV/c4XR1D5jF506cVi3Ja28oWzgZ8FGVSYlbrurACLwhG2aYSmIHMafvGUv1w KuiavOiwdgS7s9dl0tePyrXU6nuWqLUPQQGiQ0kpUPmXAeNoCjcP3qLfZBdChw5Qws0Q 81Pw== 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=JxOm4PejsflLixA5I77T/u/EeNwxcWFLBvedgG7X3g0=; b=L1PwdFyLS4PiDt6vNQ+iFtbDNRuDZY+3n1DmtSTuJUGqNtY+DS2rZW3uuKuQxJOOmJ TUxif7hBgi5Jjv6hqA/8y2+F+lejGFD8OzsMoOpJj/0RT0Azi+aQlKFY/2utLLMIJWjY kNXWv2rBwRPWClaiQSqHqj+6EZmEz7BilduayIQvtXZz2/+g7PPiyTNiIOzjZAD2PKQD sTYi3kC3Mj4H0RwdVoll6rVHmbexkv4/e1T9NtznCNGdUdgGQW5pKbSK/bVVXo48vmIm sFjYuT1BR3XIhSjjMOp2IfZpkc92lr3myS59xK2PRmENiCLQqKPvMqBOktulf1XpDHQO gxSQ== X-Gm-Message-State: AOAM530Z4F8M73q13sFoU2K5yQstg9FxDUB69WRezIefnzPaHK/1ApQh 8HVc8E/EvFUK8WQCv1ZAmlI= X-Google-Smtp-Source: ABdhPJziSb3RPlkgHBIcLy/GsNYHt7p9eqtN/IAdFB/eXr3Vs5LS6nSBulwrip6mVfmFdqJELfYQfQ== X-Received: by 2002:a17:902:a40a:b0:13e:6de3:76d2 with SMTP id p10-20020a170902a40a00b0013e6de376d2mr10599880plq.71.1634298770474; Fri, 15 Oct 2021 04:52:50 -0700 (PDT) Received: from localhost (14-203-144-177.static.tpgi.com.au. [14.203.144.177]) by smtp.gmail.com with ESMTPSA id d138sm4955442pfd.74.2021.10.15.04.52.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Oct 2021 04:52:50 -0700 (PDT) Date: Fri, 15 Oct 2021 21:52:44 +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> <1634284464.kd8scm0ckz.astroid@bobo.none> In-Reply-To: <1634284464.kd8scm0ckz.astroid@bobo.none> MIME-Version: 1.0 Message-Id: <1634298613.bp91trt1cz.astroid@bobo.none> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: B40BBB00008E X-Stat-Signature: ao3pwzp8nmh3e9bnmiomp4st8bpi1zz6 Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=RnbWBgff; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf25.hostedemail.com: domain of npiggin@gmail.com designates 209.85.216.47 as permitted sender) smtp.mailfrom=npiggin@gmail.com X-Rspamd-Server: rspam02 X-HE-Tag: 1634298769-77916 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 Nicholas Piggin's message of October 15, 2021 6:02 pm: > 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 >=20 > We have ELFv2 ABI / function descriptors iff big-endian so you could=20 > just select based on that. Of course that should read ELFv1. To be clearer: BE is ELFv1 ABI and LE is ELFv2 ABI. Thanks, Nick