From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2EBA318C0A; Thu, 9 Nov 2023 10:19:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ellerman.id.au header.i=@ellerman.id.au header.b="RkjdJPjV" Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1D2D310A; Thu, 9 Nov 2023 02:19:23 -0800 (PST) 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" Cc: Matt Turner , Vineet Gupta , Russell King , Catalin Marinas , Will Deacon , Steven Rostedt , Masami Hiramatsu , Mark Rutland , guoren , Peter Zijlstra , Ard Biesheuvel , Huacai Chen , Greg Ungerer , Michal Simek , Thomas Bogendoerfer , Dinh Nguyen , Nicholas Piggin , Geoff Levand , Palmer Dabbelt , Heiko Carstens , John Paul Adrian Glaubitz , "David S . Miller" , Andy Lutomirski , Thomas Gleixner , Ingo Molnar , "x86@kernel.org" , Helge Deller , Sudip Mukherjee , Greg Kroah-Hartman , Timur Tabi , Kent Overstreet , David Woodhouse , "Naveen N. Rao" , Anil S Keshavamurthy , Kees Cook , Vincenzo Frascino , Juri Lelli , Vincent Guittot , Nathan Chancellor , Nick Desaulniers , Nicolas Schier , Alexander Viro , Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= , "linux-alpha@vger.kernel.org" , "linux-snps-arc@lists.infradead.org" , "linux-arm-kernel@lists.infradead.org" , "linux-trace-kernel@vger.kernel.org" , "linux-csky@vger.kernel.org" , "loongarch@lists.linux.dev" , "linux-m68k@lists.linux-m68k.org" , "linux-mips@vger.kernel.org" , "linuxppc-dev@lists.ozlabs.org" , "linux-riscv@lists.infradead.org" , "linux-s390@vger.kernel.org" , "linux-sh@vger.kernel.org" , "sparclinux@vger.kernel.org" , Netdev , "linux-parisc@vger.kernel.org" , "linux-usb@vger.kernel.org" , "linux-fbdev@vger.kernel.org" , "dri-devel@lists.freedesktop.org" , "linux-bcachefs@vger.kernel.org" , "linux-mtd@lists.infradead.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> Precedence: bulk X-Mailing-List: linux-alpha@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable "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