1
0
mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2026-01-11 17:10:13 +00:00

Compare commits

..

2 Commits

Author SHA1 Message Date
Linus Torvalds
54e82e93ca - Make sure clang inlines trivial local_irq_* helpers
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEzv7L6UO9uDPlPSfHEsHwGGHeVUoFAmlaAKYACgkQEsHwGGHe
 VUpprw//ShFrVWAz9tqnDiwxmHU/4T8Mp9fLmu34t2R60QnMdScpcOBDSou7O+JD
 bp4209DMPVkmVIz+7OtaIfukHrLi6syWObRFCfhH8takfqb+xttSY5AwU8PRF57R
 uayAA5MMPsQxqYqwSc5iCUUMdgdfohzQJms8AEK6YWkd9eMcqc2pDZKFdEKJRUg6
 REYa87oaV5f6MBraHwSUQlVB8XYWjBHagdkj5uuamaEosRF1LaRc0HeaSd5DGCtS
 VhDa1/EfwJl0anVx408E1FixzqBFHKM5vzsC/z8Nf4h6AkrCXwHgVPaFSdb0xBWz
 heyfE7MLYb8Knep96fAI9NsAcwYGNzpSNiNfB3FaukWFxCd+Fl1Qk4vAc5r468+b
 NkmmPiks/IX/wtshNOdxt6HkHQi1tRHKLIhaq6yzQn8sWh9Q3AjMn80feZgfe4V/
 p08C/SrAIRdHkD5FeDLbbzZbtF3cv10UBmnkT4qHIIE6QgzoIXJeVBmQ7zU/lnU+
 pv4bxhlWZl6DBqZhi0gysDNn/a5oM+8pzTTo7swXtdujEjQVICNz9pXJr9kA/057
 ONaqIVZUevxquRjv7wdmP9QLqRPd0Se+c1K903r0NvN8XIoPg9D2VT5vjF2iJKMu
 kKQCoejj1szZVx+qIquGRTsvL9U4RludmPGuN51YOAE5MNgxNtk=
 =QxcB
 -----END PGP SIGNATURE-----

Merge tag 'core_urgent_for_v6.19_rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull core entry fix from Borislav Petkov:

 - Make sure clang inlines trivial local_irq_* helpers

* tag 'core_urgent_for_v6.19_rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  entry: Always inline local_irq_{enable,disable}_exit_to_user()
2026-01-04 07:21:18 -08:00
Eric Dumazet
4a824c3128 entry: Always inline local_irq_{enable,disable}_exit_to_user()
clang needs __always_inline instead of inline, even for tiny helpers.

This saves some cycles in system call fast path, and saves 195 bytes
on x86_64 build:

$ size vmlinux.before vmlinux.after
   text	   data	    bss	    dec	    hex	filename
34652814	22291961	5875180	62819955	3be8e73	vmlinux.before
34652619	22291961	5875180	62819760	3be8db0	vmlinux.after

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://patch.msgid.link/20251204153127.1321824-1-edumazet@google.com
2025-12-18 10:43:52 +01:00

View File

@ -110,7 +110,7 @@ static __always_inline void enter_from_user_mode(struct pt_regs *regs)
static inline void local_irq_enable_exit_to_user(unsigned long ti_work);
#ifndef local_irq_enable_exit_to_user
static inline void local_irq_enable_exit_to_user(unsigned long ti_work)
static __always_inline void local_irq_enable_exit_to_user(unsigned long ti_work)
{
local_irq_enable();
}
@ -125,7 +125,7 @@ static inline void local_irq_enable_exit_to_user(unsigned long ti_work)
static inline void local_irq_disable_exit_to_user(void);
#ifndef local_irq_disable_exit_to_user
static inline void local_irq_disable_exit_to_user(void)
static __always_inline void local_irq_disable_exit_to_user(void)
{
local_irq_disable();
}