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 70615C433EF for ; Mon, 18 Oct 2021 07:08:58 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id F1C90610A3 for ; Mon, 18 Oct 2021 07:08:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org F1C90610A3 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=csgroup.eu Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 93CBD6B006C; Mon, 18 Oct 2021 03:08:57 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8EC796B0071; Mon, 18 Oct 2021 03:08:57 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7DBA2900002; Mon, 18 Oct 2021 03:08:57 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0185.hostedemail.com [216.40.44.185]) by kanga.kvack.org (Postfix) with ESMTP id 702046B006C for ; Mon, 18 Oct 2021 03:08:57 -0400 (EDT) Received: from smtpin20.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 166FB18046D8A for ; Mon, 18 Oct 2021 07:08:57 +0000 (UTC) X-FDA: 78708681114.20.7D23478 Received: from pegase2.c-s.fr (pegase2.c-s.fr [93.17.235.10]) by imf06.hostedemail.com (Postfix) with ESMTP id EE86D801A88D for ; Mon, 18 Oct 2021 07:08:55 +0000 (UTC) Received: from localhost (mailhub3.si.c-s.fr [172.26.127.67]) by localhost (Postfix) with ESMTP id 4HXnzW21G5z9sSY; Mon, 18 Oct 2021 09:08:55 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from pegase2.c-s.fr ([172.26.127.65]) by localhost (pegase2.c-s.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7w9sEQhgZ9a0; Mon, 18 Oct 2021 09:08:55 +0200 (CEST) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase2.c-s.fr (Postfix) with ESMTP id 4HXnzW18Trz9sSD; Mon, 18 Oct 2021 09:08:55 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 09C118B76C; Mon, 18 Oct 2021 09:08:55 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id lqbCB8AX-POP; Mon, 18 Oct 2021 09:08:54 +0200 (CEST) Received: from PO20335.IDSI0.si.c-s.fr (unknown [172.25.230.103]) by messagerie.si.c-s.fr (Postfix) with ESMTP id C49F38B763; Mon, 18 Oct 2021 09:08:54 +0200 (CEST) Subject: Re: [PATCH v3 04/12] powerpc: Prepare func_desc_t for refactorisation To: Nicholas Piggin , Andrew Morton , Arnd Bergmann , Benjamin Herrenschmidt , 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> <1634536863.oq0s171f8c.astroid@bobo.none> From: Christophe Leroy Message-ID: <1f66d234-3624-7ba2-7b03-5d0e1bea087f@csgroup.eu> Date: Mon, 18 Oct 2021 09:08:54 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <1634536863.oq0s171f8c.astroid@bobo.none> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: fr-FR X-Rspamd-Queue-Id: EE86D801A88D Authentication-Results: imf06.hostedemail.com; dkim=none; spf=pass (imf06.hostedemail.com: domain of christophe.leroy@csgroup.eu designates 93.17.235.10 as permitted sender) smtp.mailfrom=christophe.leroy@csgroup.eu; dmarc=none X-Stat-Signature: comau8p1bk3pkbiyq8agdy4yywdqfuby X-Rspamd-Server: rspam05 X-HE-Tag: 1634540935-83501 Content-Transfer-Encoding: quoted-printable 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: Le 18/10/2021 =C3=A0 08:27, Nicholas Piggin a =C3=A9crit=C2=A0: > 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. >> >> This allows using single helpers common to ELFv1 and ELFv2. >> >> Signed-off-by: Christophe Leroy >=20 >> --- >> arch/powerpc/kernel/module_64.c | 32 ++++++++++++++-----------------= - >> 1 file changed, 14 insertions(+), 18 deletions(-) >> >> diff --git a/arch/powerpc/kernel/module_64.c b/arch/powerpc/kernel/mod= ule_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; >=20 > I'm not quite following why this change is done. I guess it is so you > can move this func_desc_t type into core code, but why do that? Is it > just to avoid using the preprocessor? I explained it in patch 7 but yes it probably also deserves some more=20 explanation here as well. That's right, it's to avoid having to spread #ifdefs everywhere. >=20 > On its own this patch looks okay. >=20 > Acked-by: Nicholas Piggin >=20