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 lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 34F01C0018C for ; Thu, 9 Nov 2023 11:20:25 +0000 (UTC) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ellerman.id.au header.i=@ellerman.id.au header.a=rsa-sha256 header.s=201909 header.b=RkjdJPjV; dkim-atps=neutral Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4SQzyb5tPbz3cb6 for ; Thu, 9 Nov 2023 22:20:23 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=ellerman.id.au header.i=@ellerman.id.au header.a=rsa-sha256 header.s=201909 header.b=RkjdJPjV; dkim-atps=neutral Received: from gandalf.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4SQycC0CL6z3c1L for ; Thu, 9 Nov 2023 21:19:23 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ellerman.id.au; s=201909; t=1699525158; bh=Z7EokJ1UdALEP2SiDB7dbNsZW0NCKV/oetJXlal69iM=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=RkjdJPjVAbZzNEKAPr8JL0kTpGz0UCZJIdVVndOCvDWZpxSw6ec518RfWPQG/IkiI 3U4qG8PeFJgQ1oMBVz7fnILZyAKQ1zplGG4nJux7vUUQsPp8SkZBfT889gzvIRdpmw WUQ+WW+9cu902RASJ4kEWsLYh3rMgChUmz1/ldOW9QzCrZm2l5oTa8LM/dau5laC33 KuCy2ECFzxgm0lOmPhhDCsKGLIbtABjZozYU/ee/LMkGnCNdVshd/3IasKaSCJFT9/ KHxNE3JhUBjryUMosmrOQrOBshaRABEKKf3tZkVHzFqfXwk5cxkuGy4gRH9dIH1XGz jvo7A0kAqYwOw== Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4SQybm4Pg2z4xhd; Thu, 9 Nov 2023 21:19:00 +1100 (AEDT) From: Michael Ellerman To: Arnd Bergmann , Christophe Leroy , Arnd Bergmann , Andrew Morton , "linux-kernel@vger.kernel.org" , Masahiro Yamada , "linux-kbuild@vger.kernel.org" Subject: Re: [PATCH 15/22] arch: vdso: consolidate gettime prototypes In-Reply-To: References: <20231108125843.3806765-1-arnd@kernel.org> <20231108125843.3806765-16-arnd@kernel.org> Date: Thu, 09 Nov 2023 21:18:54 +1100 Message-ID: <87o7g3qlf5.fsf@mail.lhotse> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Mailman-Approved-At: Thu, 09 Nov 2023 22:18:45 +1100 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Juri Lelli , "linux-fbdev@vger.kernel.org" , "x86@kernel.org" , "loongarch@lists.linux.dev" , "linux-sh@vger.kernel.org" , Peter Zijlstra , Catalin Marinas , "dri-devel@lists.freedesktop.org" , Netdev , guoren , "linux-csky@vger.kernel.org" , "sparclinux@vger.kernel.org" , "linux-riscv@lists.infradead.org" , Vincenzo Frascino , Will Deacon , Greg Ungerer , Nicolas Schier , "linux-s390@vger.kernel.org" , Vincent Guittot , Helge Deller , Huacai Chen , Russell King , Anil S Keshavamurthy , Ard Biesheuvel , "linux-bcachefs@vger.kernel.org" , Ingo Molnar , Vineet Gupta , "Naveen N. Rao" , Matt Turner , "linux-snps-arc@lists.infradead.org" , "linux-trace-kernel@vger.kernel.org" , Kees Cook , Heiko Carstens , Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= , "linuxppc-dev@lists.ozlabs.org" , Nicholas Piggin , Nathan Chancellor , "linux-m68k@lists.linux-m68k.org" , Steven Rostedt , Andy Lutomirski , John Paul Adrian Glaubitz , Thomas Gleixner , "linux-arm-kernel@lists.infradead.org" , Michal Simek , Thomas Bogendoerfer , "linux-parisc@vger.kernel.org" , Timur Tabi , Geoff Levand , Greg Kroah-Hartman , Kent Overstreet , Nick Desaulniers , "linux-mips@vger.kernel.org" , Sudip Mukherjee , Dinh Nguyen , "linux-usb@vger.kernel.org" , Palmer Dabbelt , Masami Hiramatsu , "linux-alpha@vger.kernel.org" , "linux-mtd@lists.infradead.org" , David Woodhouse , "David S . Miller" , Alexander Viro Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" "Arnd Bergmann" writes: > On Wed, Nov 8, 2023, at 19:31, Christophe Leroy wrote: >> Le 08/11/2023 =C3=A0 13:58, Arnd Bergmann a =C3=A9crit=C2=A0: > >> powerpc has functions doing more or less the same, they are called=20 >> __c_kernel_clock_gettime() and alike with their prototypes siting in=20 >> arch/powerpc/include/asm/vdso/gettimeofday.h >> >> Should those prototypes be moved to include/vdso/gettime.h too and=20 >> eventually renamed, or are they considered too powerpc specific ? > > I don't actually know, my initial interpretation was that > these function names are part of the user ABI for the vdso, > but I never looked closely enough at how vdso works to > be sure what the actual ABI is. AFAIK the ABI is just the symbols we export, as defined in the linker script: /* * This controls what symbols we export from the DSO. */ VERSION { VDSO_VERSION_STRING { global: __kernel_get_syscall_map; __kernel_gettimeofday; __kernel_clock_gettime; __kernel_clock_getres; __kernel_get_tbfreq; __kernel_sync_dicache; __kernel_sigtramp_rt64; __kernel_getcpu; __kernel_time; https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arc= h/powerpc/kernel/vdso/vdso64.lds.S?h=3Dv6.6&#n117 > If __c_kernel_clock_gettime() etc are not part of the user-facing > ABI, I think renaming them for consistency with the other > architectures would be best. The __c symbols are not part of the ABI, so we could rename them. At the moment though they don't have the same prototype as the generic versions, because we find the VDSO data in asm and pass it to the C functions, eg: int __c_kernel_gettimeofday(struct __kernel_old_timeval *tv, struct timezon= e *tz, const struct vdso_data *vd); I think we can rework that though, by implementing __arch_get_vdso_data() and getting the vdso_data in C. Then we'd be able to share the prototypes. cheers