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 E5BEBC433F5 for ; Mon, 18 Oct 2021 06:27:26 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7DD9660F11 for ; Mon, 18 Oct 2021 06:27:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 7DD9660F11 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 044866B006C; Mon, 18 Oct 2021 02:27:26 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id F36C36B0071; Mon, 18 Oct 2021 02:27:25 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DFF19900002; Mon, 18 Oct 2021 02:27:25 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0031.hostedemail.com [216.40.44.31]) by kanga.kvack.org (Postfix) with ESMTP id D0F8C6B006C for ; Mon, 18 Oct 2021 02:27:25 -0400 (EDT) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 8F91E1833948E for ; Mon, 18 Oct 2021 06:27:25 +0000 (UTC) X-FDA: 78708576450.24.D6D2640 Received: from mail-pj1-f52.google.com (mail-pj1-f52.google.com [209.85.216.52]) by imf29.hostedemail.com (Postfix) with ESMTP id 47AB39000094 for ; Mon, 18 Oct 2021 06:27:23 +0000 (UTC) Received: by mail-pj1-f52.google.com with SMTP id na16-20020a17090b4c1000b0019f5bb661f9so11822641pjb.0 for ; Sun, 17 Oct 2021 23:27:25 -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=xax6w8vdDeorgOHfukYruV4crW1zSmA0Yn4dKXojVlM=; b=Yk6LSNqkisKS10pGs8UquN9x1ScpNWbbgjoL8+BGGKLSgbjdOJ3dp2g4efx3BdfCeO cpsPii0dvmpI5i4at1AfbwppVJhgOZ26idOW0GLdOQeVwmefcEItygifPo86mrnha+x4 NIWZpYpHR6kFun2FQLxF27U9o+qV07b0vK5G5WgPn0ZpzX17VLkkiSKRVCgpZqXAf1zx dde5W/U0tdvOvf4D4gu07I1Mu1xeQafVvUZkcLv7n3kFF4kmbn3gONaEYyunqyFktKGo 6DMc6sMtkN+zto4NUMtwLpDv/oq52HG/WZSSVvcUNKEUfVlsnVRXiyWwOzDYjZsSlcBw 1jHw== 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=xax6w8vdDeorgOHfukYruV4crW1zSmA0Yn4dKXojVlM=; b=jpt/p8px92aY43QkpjbtTl/XmJS/r6DNBYoIywIKZall9MSgBNbjrMwAf6wcanjcxy KPwpR3dsfBYCnSHdihP1+jUzZUNCHw+lWcLF7sP0R7hPJukytKJ0RYB2vmJouFNx8HEH z3D5iym6p2SDRXtEJJoEThH0HUZZ1ME7Vdk+1udPxcAPwYaEXVUK6r0Q7nusSqHGReUy 2vnSbF95ih080BT7HVZb4AlvxdMG2PyDgreddwcWz7nR7/+3Qc0DJHN8aUZ/TV5aopJe siu1UiF08jZ7cp4OAB1KL/TFKR841nWOPl66tGLBw6497fDZSA0ozEIF354pq0KhA9gh NnHQ== X-Gm-Message-State: AOAM533oQDRV4S3Y5QwA8YR0igsGwdEAXnEBneji6CvVR8W9E3rSxAXk E1Hkdz6ifD3atONJNU9Jd8Y= X-Google-Smtp-Source: ABdhPJw0GP7RprUuWC+8YWTOwY32i9+w+LmnM+jhtULZlF66OhLA6thzoj0Ge0GcMhEsc7ZGu2Pfgw== X-Received: by 2002:a17:90a:1a43:: with SMTP id 3mr46829314pjl.242.1634538444308; Sun, 17 Oct 2021 23:27:24 -0700 (PDT) Received: from localhost ([1.128.241.185]) by smtp.gmail.com with ESMTPSA id t125sm11910863pfc.119.2021.10.17.23.27.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Oct 2021 23:27:24 -0700 (PDT) Date: Mon, 18 Oct 2021 16:27:17 +1000 From: Nicholas Piggin Subject: Re: [PATCH v3 04/12] powerpc: Prepare func_desc_t for refactorisation 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: <86c393ce0a6f603f94e6d2ceca08d535f654bb23.1634457599.git.christophe.leroy@csgroup.eu> In-Reply-To: <86c393ce0a6f603f94e6d2ceca08d535f654bb23.1634457599.git.christophe.leroy@csgroup.eu> MIME-Version: 1.0 Message-Id: <1634536863.oq0s171f8c.astroid@bobo.none> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 47AB39000094 X-Stat-Signature: 63jpe6yhib4ry8zqkgptk9xgho9t3pd5 Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=Yk6LSNqk; spf=pass (imf29.hostedemail.com: domain of npiggin@gmail.com designates 209.85.216.52 as permitted sender) smtp.mailfrom=npiggin@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-HE-Tag: 1634538443-157329 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 17, 2021 10:38 pm: > In preparation of making func_desc_t generic, change the ELFv2 > version to a struct containing 'addr' element. >=20 > This allows using single helpers common to ELFv1 and ELFv2. >=20 > Signed-off-by: Christophe Leroy > --- > arch/powerpc/kernel/module_64.c | 32 ++++++++++++++------------------ > 1 file changed, 14 insertions(+), 18 deletions(-) >=20 > diff --git a/arch/powerpc/kernel/module_64.c b/arch/powerpc/kernel/module= _64.c > index a89da0ee25e2..b687ef88c4c4 100644 > --- a/arch/powerpc/kernel/module_64.c > +++ b/arch/powerpc/kernel/module_64.c > @@ -33,19 +33,13 @@ > #ifdef PPC64_ELF_ABI_v2 > =20 > /* An address is simply the address of the function. */ > -typedef unsigned long func_desc_t; > +typedef struct { > + unsigned long addr; > +} func_desc_t; I'm not quite following why this change is done. I guess it is so you=20 can move this func_desc_t type into core code, but why do that? Is it just to avoid using the preprocessor? On its own this patch looks okay. Acked-by: Nicholas Piggin