Linux-csky Archive mirror
 help / color / mirror / Atom feed
From: Christophe Leroy <christophe.leroy@csgroup.eu>
To: Michael Ellerman <mpe@ellerman.id.au>,
	Arnd Bergmann <arnd@arndb.de>, Arnd Bergmann <arnd@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Masahiro Yamada <masahiroy@kernel.org>,
	"linux-kbuild@vger.kernel.org" <linux-kbuild@vger.kernel.org>
Cc: "Matt Turner" <mattst88@gmail.com>,
	"Vineet Gupta" <vgupta@kernel.org>,
	"Russell King" <linux@armlinux.org.uk>,
	"Catalin Marinas" <catalin.marinas@arm.com>,
	"Will Deacon" <will@kernel.org>,
	"Steven Rostedt" <rostedt@goodmis.org>,
	"Masami Hiramatsu" <mhiramat@kernel.org>,
	"Mark Rutland" <mark.rutland@arm.com>, guoren <guoren@kernel.org>,
	"Peter Zijlstra" <peterz@infradead.org>,
	"Ard Biesheuvel" <ardb@kernel.org>,
	"Huacai Chen" <chenhuacai@kernel.org>,
	"Greg Ungerer" <gerg@linux-m68k.org>,
	"Michal Simek" <monstr@monstr.eu>,
	"Thomas Bogendoerfer" <tsbogend@alpha.franken.de>,
	"Dinh Nguyen" <dinguyen@kernel.org>,
	"Nicholas Piggin" <npiggin@gmail.com>,
	"Geoff Levand" <geoff@infradead.org>,
	"Palmer Dabbelt" <palmer@dabbelt.com>,
	"Heiko Carstens" <hca@linux.ibm.com>,
	"John Paul Adrian Glaubitz" <glaubitz@physik.fu-berlin.de>,
	"David S . Miller" <davem@davemloft.net>,
	"Andy Lutomirski" <luto@kernel.org>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	"Ingo Molnar" <mingo@redhat.com>,
	"x86@kernel.org" <x86@kernel.org>, "Helge Deller" <deller@gmx.de>,
	"Sudip Mukherjee" <sudipm.mukherjee@gmail.com>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Timur Tabi" <timur@kernel.org>,
	"Kent Overstreet" <kent.overstreet@linux.dev>,
	"David Woodhouse" <dwmw2@infradead.org>,
	"Naveen N. Rao" <naveen.n.rao@linux.ibm.com>,
	"Anil S Keshavamurthy" <anil.s.keshavamurthy@intel.com>,
	"Kees Cook" <keescook@chromium.org>,
	"Vincenzo Frascino" <vincenzo.frascino@arm.com>,
	"Juri Lelli" <juri.lelli@redhat.com>,
	"Vincent Guittot" <vincent.guittot@linaro.org>,
	"Nathan Chancellor" <nathan@kernel.org>,
	"Nick Desaulniers" <ndesaulniers@google.com>,
	"Nicolas Schier" <nicolas@fjasle.eu>,
	"Alexander Viro" <viro@zeniv.linux.org.uk>,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	"linux-alpha@vger.kernel.org" <linux-alpha@vger.kernel.org>,
	"linux-snps-arc@lists.infradead.org"
	<linux-snps-arc@lists.infradead.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"linux-trace-kernel@vger.kernel.org"
	<linux-trace-kernel@vger.kernel.org>,
	"linux-csky@vger.kernel.org" <linux-csky@vger.kernel.org>,
	"loongarch@lists.linux.dev" <loongarch@lists.linux.dev>,
	"linux-m68k@lists.linux-m68k.org"
	<linux-m68k@lists.linux-m68k.org>,
	"linux-mips@vger.kernel.org" <linux-mips@vger.kernel.org>,
	"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
	"linux-riscv@lists.infradead.org"
	<linux-riscv@lists.infradead.org>,
	"linux-s390@vger.kernel.org" <linux-s390@vger.kernel.org>,
	"linux-sh@vger.kernel.org" <linux-sh@vger.kernel.org>,
	"sparclinux@vger.kernel.org" <sparclinux@vger.kernel.org>,
	Netdev <netdev@vger.kernel.org>,
	"linux-parisc@vger.kernel.org" <linux-parisc@vger.kernel.org>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"linux-fbdev@vger.kernel.org" <linux-fbdev@vger.kernel.org>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	"linux-bcachefs@vger.kernel.org" <linux-bcachefs@vger.kernel.org>,
	"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>
Subject: Re: [PATCH 15/22] arch: vdso: consolidate gettime prototypes
Date: Thu, 9 Nov 2023 10:49:05 +0000	[thread overview]
Message-ID: <886df4e4-9fc2-ca52-e7e9-53688e6e821a@csgroup.eu> (raw)
In-Reply-To: <87o7g3qlf5.fsf@mail.lhotse>



Le 09/11/2023 à 11:18, Michael Ellerman a écrit :
> "Arnd Bergmann" <arnd@arndb.de> writes:
>> On Wed, Nov 8, 2023, at 19:31, Christophe Leroy wrote:
>>> Le 08/11/2023 à 13:58, Arnd Bergmann a écrit :
>>
>>> powerpc has functions doing more or less the same, they are called
>>> __c_kernel_clock_gettime() and alike with their prototypes siting in
>>> arch/powerpc/include/asm/vdso/gettimeofday.h
>>>
>>> Should those prototypes be moved to include/vdso/gettime.h too and
>>> 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/arch/powerpc/kernel/vdso/vdso64.lds.S?h=v6.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 timezone *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.

I think it would not a been good idea, it would be less performant, for 
explanation see commit 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e876f0b69dc993e86ca7795e63e98385aa9a7ef3

Christophe

  reply	other threads:[~2023-11-09 10:49 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-08 12:58 [PATCH 00/22] -Wmissing-prototype warning fixes Arnd Bergmann
2023-11-08 12:58 ` [PATCH 01/22] [RESEND^2] ida: make 'ida_dump' static Arnd Bergmann
2023-11-08 12:58 ` [PATCH 02/22] [RESEND^2] jffs2: mark __jffs2_dbg_superblock_counts() static Arnd Bergmann
2023-11-09  1:07   ` Zhihao Cheng
2023-11-08 12:58 ` [PATCH 03/22] [RESEND] kprobes: unify kprobes_exceptions_nofify() prototypes Arnd Bergmann
2023-11-08 23:20   ` Masami Hiramatsu
2023-11-08 12:58 ` [PATCH 04/22] [RESEND] time: make sysfs_get_uname() function visible in header Arnd Bergmann
2023-11-10 12:41   ` Uwe Kleine-König
2023-11-08 12:58 ` [PATCH 05/22] [RESEND] parport: gsc: mark init function static Arnd Bergmann
2023-11-08 12:58 ` [PATCH 06/22] [RESEND] stackleak: add declarations for global functions Arnd Bergmann
2023-11-08 12:58 ` [PATCH 07/22] [RESEND] sched: fair: move unused stub functions to header Arnd Bergmann
2023-11-08 12:58 ` [PATCH 08/22] [v2] arch: consolidate arch_irq_work_raise prototypes Arnd Bergmann
2024-01-10  9:03   ` Geert Uytterhoeven
2024-01-10 10:20     ` Arnd Bergmann
2023-11-08 12:58 ` [PATCH 09/22] [v2] arch: fix asm-offsets.c building with -Wmissing-prototypes Arnd Bergmann
2023-11-08 19:10   ` Sam Ravnborg
2023-11-08 12:58 ` [PATCH 10/22] microblaze: include linux/cpu.h for trap_init() prototype Arnd Bergmann
2023-11-08 20:42   ` Geert Uytterhoeven
2023-11-08 21:07     ` Arnd Bergmann
2023-11-08 21:10       ` Geert Uytterhoeven
2023-11-08 12:58 ` [PATCH 11/22] x86: sta2x11: include header for sta2x11_get_instance() prototype Arnd Bergmann
2023-11-08 12:58 ` [PATCH 12/22] csky: fix arch_jump_label_transform_static override Arnd Bergmann
2023-11-12  4:21   ` Guo Ren
2023-11-08 12:58 ` [PATCH 13/22] arch: add do_page_fault prototypes Arnd Bergmann
2023-11-08 12:58 ` [PATCH 14/22] arch: add missing prepare_ftrace_return() prototypes Arnd Bergmann
2023-11-08 12:58 ` [PATCH 15/22] arch: vdso: consolidate gettime prototypes Arnd Bergmann
2023-11-08 18:31   ` Christophe Leroy
2023-11-08 19:37     ` Arnd Bergmann
2023-11-09  7:50       ` Christophe Leroy
2023-11-09 10:18       ` Michael Ellerman
2023-11-09 10:49         ` Christophe Leroy [this message]
2023-11-09 12:23           ` Michael Ellerman
2023-11-10 10:16   ` Vincenzo Frascino
2023-11-24 12:04   ` Mark Brown
2023-11-08 12:58 ` [PATCH 16/22] bcachefs: mark bch2_target_to_text_sb() static Arnd Bergmann
2023-11-08 20:19   ` Kent Overstreet
2023-11-08 12:58 ` [PATCH 17/22] powerpc: ps3: move udbg_shutdown_ps3gelic prototype Arnd Bergmann
2023-11-08 14:18   ` Geoff Levand
2023-11-08 15:10     ` Jakub Kicinski
2023-11-08 12:58 ` [PATCH 18/22] powerpc: pasemi: mark pas_shutdown() static Arnd Bergmann
2023-11-08 12:58 ` [PATCH 19/22] powerpc: powermac: mark smp_psurge_{give,take}_timebase static Arnd Bergmann
2023-11-08 12:58 ` [PATCH 20/22] usb: fsl-mph-dr-of: mark fsl_usb2_mpc5121_init() static Arnd Bergmann
2023-11-21 14:12   ` Greg Kroah-Hartman
2023-11-08 12:58 ` [PATCH 21/22] fbdev/fsl-diu-fb: mark wr_reg_wa() static Arnd Bergmann
2023-11-08 12:58 ` [PATCH 22/22] Makefile.extrawarn: turn on missing-prototypes globally Arnd Bergmann
2023-12-07 12:38 ` (subset) [PATCH 00/22] -Wmissing-prototype warning fixes Michael Ellerman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=886df4e4-9fc2-ca52-e7e9-53688e6e821a@csgroup.eu \
    --to=christophe.leroy@csgroup.eu \
    --cc=akpm@linux-foundation.org \
    --cc=anil.s.keshavamurthy@intel.com \
    --cc=ardb@kernel.org \
    --cc=arnd@arndb.de \
    --cc=arnd@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=chenhuacai@kernel.org \
    --cc=davem@davemloft.net \
    --cc=deller@gmx.de \
    --cc=dinguyen@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=dwmw2@infradead.org \
    --cc=geoff@infradead.org \
    --cc=gerg@linux-m68k.org \
    --cc=glaubitz@physik.fu-berlin.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=guoren@kernel.org \
    --cc=hca@linux.ibm.com \
    --cc=juri.lelli@redhat.com \
    --cc=keescook@chromium.org \
    --cc=kent.overstreet@linux.dev \
    --cc=linux-alpha@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-bcachefs@vger.kernel.org \
    --cc=linux-csky@vger.kernel.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-m68k@lists.linux-m68k.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=linux-parisc@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=linux-snps-arc@lists.infradead.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=loongarch@lists.linux.dev \
    --cc=luto@kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=masahiroy@kernel.org \
    --cc=mattst88@gmail.com \
    --cc=mhiramat@kernel.org \
    --cc=mingo@redhat.com \
    --cc=monstr@monstr.eu \
    --cc=mpe@ellerman.id.au \
    --cc=nathan@kernel.org \
    --cc=naveen.n.rao@linux.ibm.com \
    --cc=ndesaulniers@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=nicolas@fjasle.eu \
    --cc=npiggin@gmail.com \
    --cc=palmer@dabbelt.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=sparclinux@vger.kernel.org \
    --cc=sudipm.mukherjee@gmail.com \
    --cc=tglx@linutronix.de \
    --cc=timur@kernel.org \
    --cc=tsbogend@alpha.franken.de \
    --cc=u.kleine-koenig@pengutronix.de \
    --cc=vgupta@kernel.org \
    --cc=vincent.guittot@linaro.org \
    --cc=vincenzo.frascino@arm.com \
    --cc=viro@zeniv.linux.org.uk \
    --cc=will@kernel.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).