Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'asm-generic-6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic

Pull asm-generic updates from Arnd Bergmann:
"These are cleanups for architecture specific header files:

- the comments in include/linux/syscalls.h have gone out of sync and
are really pointless, so these get removed

- The asm/bitsperlong.h header no longer needs to be architecture
specific on modern compilers, so use a generic version for newer
architectures that use new enough userspace compilers

- A cleanup for virt_to_pfn/virt_to_bus to have proper type checking,
forcing the use of pointers"

* tag 'asm-generic-6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic:
syscalls: Remove file path comments from headers
tools arch: Remove uapi bitsperlong.h of hexagon and microblaze
asm-generic: Unify uapi bitsperlong.h for arm64, riscv and loongarch
m68k/mm: Make pfn accessors static inlines
arm64: memory: Make virt_to_pfn() a static inline
ARM: mm: Make virt_to_pfn() a static inline
asm-generic/page.h: Make pfn accessors static inlines
xen/netback: Pass (void *) to virt_to_page()
netfs: Pass a pointer to virt_to_page()
cifs: Pass a pointer to virt_to_page() in cifsglob
cifs: Pass a pointer to virt_to_page()
riscv: mm: init: Pass a pointer to virt_to_page()
ARC: init: Pass a pointer to virt_to_pfn() in init
m68k: Pass a pointer to virt_to_pfn() virt_to_page()
fs/proc/kcore.c: Pass a pointer to virt_addr_valid()

+218 -716
+1 -1
arch/arc/mm/init.c
··· 87 87 setup_initial_init_mm(_text, _etext, _edata, _end); 88 88 89 89 /* first page of system - kernel .vector starts here */ 90 - min_low_pfn = virt_to_pfn(CONFIG_LINUX_RAM_BASE); 90 + min_low_pfn = virt_to_pfn((void *)CONFIG_LINUX_RAM_BASE); 91 91 92 92 /* Last usable page of low mem */ 93 93 max_low_pfn = max_pfn = PFN_DOWN(low_mem_start + low_mem_sz);
+1 -1
arch/arm/common/sharpsl_param.c
··· 11 11 #include <linux/module.h> 12 12 #include <linux/string.h> 13 13 #include <asm/mach/sharpsl_param.h> 14 - #include <asm/memory.h> 14 + #include <asm/page.h> 15 15 16 16 /* 17 17 * Certain hardware parameters determined at the time of device manufacture,
+1 -1
arch/arm/include/asm/delay.h
··· 7 7 #ifndef __ASM_ARM_DELAY_H 8 8 #define __ASM_ARM_DELAY_H 9 9 10 - #include <asm/memory.h> 10 + #include <asm/page.h> 11 11 #include <asm/param.h> /* HZ */ 12 12 13 13 /*
+1 -1
arch/arm/include/asm/io.h
··· 23 23 #include <linux/string.h> 24 24 #include <linux/types.h> 25 25 #include <asm/byteorder.h> 26 - #include <asm/memory.h> 26 + #include <asm/page.h> 27 27 #include <asm-generic/pci_iomap.h> 28 28 29 29 /*
+12 -5
arch/arm/include/asm/memory.h
··· 5 5 * Copyright (C) 2000-2002 Russell King 6 6 * modification for nommu, Hyok S. Choi, 2004 7 7 * 8 - * Note: this file should not be included by non-asm/.h files 8 + * Note: this file should not be included explicitly, include <asm/page.h> 9 + * to get access to these definitions. 9 10 */ 10 11 #ifndef __ASM_ARM_MEMORY_H 11 12 #define __ASM_ARM_MEMORY_H 13 + 14 + #ifndef _ASMARM_PAGE_H 15 + #error "Do not include <asm/memory.h> directly" 16 + #endif 12 17 13 18 #include <linux/compiler.h> 14 19 #include <linux/const.h> ··· 293 288 294 289 #endif 295 290 296 - #define virt_to_pfn(kaddr) \ 297 - ((((unsigned long)(kaddr) - PAGE_OFFSET) >> PAGE_SHIFT) + \ 298 - PHYS_PFN_OFFSET) 299 - 291 + static inline unsigned long virt_to_pfn(const void *p) 292 + { 293 + unsigned long kaddr = (unsigned long)p; 294 + return (((kaddr - PAGE_OFFSET) >> PAGE_SHIFT) + 295 + PHYS_PFN_OFFSET); 296 + } 300 297 #define __pa_symbol_nodebug(x) __virt_to_phys_nodebug((x)) 301 298 302 299 #ifdef CONFIG_DEBUG_VIRTUAL
+2 -2
arch/arm/include/asm/page.h
··· 183 183 #define pfn_valid pfn_valid 184 184 #endif 185 185 186 - #include <asm/memory.h> 187 - 188 186 #endif /* !__ASSEMBLY__ */ 187 + 188 + #include <asm/memory.h> 189 189 190 190 #define VM_DATA_DEFAULT_FLAGS VM_DATA_FLAGS_TSK_EXEC 191 191
+1 -1
arch/arm/include/asm/pgtable.h
··· 27 27 #else 28 28 29 29 #include <asm-generic/pgtable-nopud.h> 30 - #include <asm/memory.h> 30 + #include <asm/page.h> 31 31 #include <asm/pgtable-hwdef.h> 32 32 33 33
-2
arch/arm/include/asm/proc-fns.h
··· 147 147 148 148 extern void cpu_resume(void); 149 149 150 - #include <asm/memory.h> 151 - 152 150 #ifdef CONFIG_MMU 153 151 154 152 #define cpu_switch_mm(pgd,mm) cpu_do_switch_mm(virt_to_phys(pgd),mm)
+1 -1
arch/arm/include/asm/sparsemem.h
··· 2 2 #ifndef ASMARM_SPARSEMEM_H 3 3 #define ASMARM_SPARSEMEM_H 4 4 5 - #include <asm/memory.h> 5 + #include <asm/page.h> 6 6 7 7 /* 8 8 * Two definitions are required for sparsemem:
+1 -1
arch/arm/include/asm/uaccess-asm.h
··· 5 5 6 6 #include <asm/asm-offsets.h> 7 7 #include <asm/domain.h> 8 - #include <asm/memory.h> 8 + #include <asm/page.h> 9 9 #include <asm/thread_info.h> 10 10 11 11 .macro csdb
+1 -1
arch/arm/include/asm/uaccess.h
··· 9 9 * User space memory access functions 10 10 */ 11 11 #include <linux/string.h> 12 - #include <asm/memory.h> 12 + #include <asm/page.h> 13 13 #include <asm/domain.h> 14 14 #include <asm/unaligned.h> 15 15 #include <asm/unified.h>
+1 -1
arch/arm/kernel/asm-offsets.c
··· 17 17 #include <asm/glue-pf.h> 18 18 #include <asm/mach/arch.h> 19 19 #include <asm/thread_info.h> 20 - #include <asm/memory.h> 20 + #include <asm/page.h> 21 21 #include <asm/mpu.h> 22 22 #include <asm/procinfo.h> 23 23 #include <asm/suspend.h>
+1 -1
arch/arm/kernel/entry-armv.S
··· 15 15 #include <linux/init.h> 16 16 17 17 #include <asm/assembler.h> 18 - #include <asm/memory.h> 18 + #include <asm/page.h> 19 19 #include <asm/glue-df.h> 20 20 #include <asm/glue-pf.h> 21 21 #include <asm/vfpmacros.h>
+1 -1
arch/arm/kernel/entry-common.S
··· 9 9 #include <asm/unistd.h> 10 10 #include <asm/ftrace.h> 11 11 #include <asm/unwind.h> 12 - #include <asm/memory.h> 12 + #include <asm/page.h> 13 13 #ifdef CONFIG_AEABI 14 14 #include <asm/unistd-oabi.h> 15 15 #endif
+1 -1
arch/arm/kernel/entry-v7m.S
··· 6 6 * 7 7 * Low-level vector interface routines for the ARMv7-M architecture 8 8 */ 9 - #include <asm/memory.h> 9 + #include <asm/page.h> 10 10 #include <asm/glue.h> 11 11 #include <asm/thread_notify.h> 12 12 #include <asm/v7m.h>
+1 -2
arch/arm/kernel/head-nommu.S
··· 14 14 #include <asm/assembler.h> 15 15 #include <asm/ptrace.h> 16 16 #include <asm/asm-offsets.h> 17 - #include <asm/memory.h> 17 + #include <asm/page.h> 18 18 #include <asm/cp15.h> 19 19 #include <asm/thread_info.h> 20 20 #include <asm/v7m.h> 21 21 #include <asm/mpu.h> 22 - #include <asm/page.h> 23 22 24 23 /* 25 24 * Kernel startup entry point.
+1 -1
arch/arm/kernel/head.S
··· 17 17 #include <asm/domain.h> 18 18 #include <asm/ptrace.h> 19 19 #include <asm/asm-offsets.h> 20 - #include <asm/memory.h> 20 + #include <asm/page.h> 21 21 #include <asm/thread_info.h> 22 22 23 23 #if defined(CONFIG_DEBUG_LL) && !defined(CONFIG_DEBUG_SEMIHOSTING)
+1 -1
arch/arm/kernel/hibernate.c
··· 19 19 #include <asm/system_misc.h> 20 20 #include <asm/idmap.h> 21 21 #include <asm/suspend.h> 22 - #include <asm/memory.h> 22 + #include <asm/page.h> 23 23 #include <asm/sections.h> 24 24 #include "reboot.h" 25 25
+1 -1
arch/arm/kernel/suspend.c
··· 8 8 #include <asm/bugs.h> 9 9 #include <asm/cacheflush.h> 10 10 #include <asm/idmap.h> 11 - #include <asm/memory.h> 11 + #include <asm/page.h> 12 12 #include <asm/smp_plat.h> 13 13 #include <asm/suspend.h> 14 14 #include <asm/tlbflush.h>
+1 -1
arch/arm/kernel/tcm.c
··· 15 15 #include <linux/string.h> /* memcpy */ 16 16 #include <asm/cputype.h> 17 17 #include <asm/mach/map.h> 18 - #include <asm/memory.h> 18 + #include <asm/page.h> 19 19 #include <asm/system_info.h> 20 20 #include <asm/traps.h> 21 21 #include <asm/tcm.h>
+1 -2
arch/arm/kernel/vmlinux-xip.lds.S
··· 12 12 #include <asm/vmlinux.lds.h> 13 13 #include <asm/cache.h> 14 14 #include <asm/thread_info.h> 15 - #include <asm/memory.h> 16 - #include <asm/mpu.h> 17 15 #include <asm/page.h> 16 + #include <asm/mpu.h> 18 17 19 18 OUTPUT_ARCH(arm) 20 19 ENTRY(stext)
+1 -2
arch/arm/kernel/vmlinux.lds.S
··· 12 12 #include <asm/vmlinux.lds.h> 13 13 #include <asm/cache.h> 14 14 #include <asm/thread_info.h> 15 - #include <asm/memory.h> 16 - #include <asm/mpu.h> 17 15 #include <asm/page.h> 16 + #include <asm/mpu.h> 18 17 19 18 OUTPUT_ARCH(arm) 20 19 ENTRY(stext)
+1 -1
arch/arm/mach-berlin/platsmp.c
··· 12 12 13 13 #include <asm/cacheflush.h> 14 14 #include <asm/cp15.h> 15 - #include <asm/memory.h> 15 + #include <asm/page.h> 16 16 #include <asm/smp_plat.h> 17 17 #include <asm/smp_scu.h> 18 18
+1 -1
arch/arm/mach-keystone/keystone.c
··· 18 18 #include <asm/mach/map.h> 19 19 #include <asm/mach/arch.h> 20 20 #include <asm/mach/time.h> 21 - #include <asm/memory.h> 21 + #include <asm/page.h> 22 22 23 23 #include "memory.h" 24 24
+1 -1
arch/arm/mach-omap2/sleep33xx.S
··· 10 10 #include <linux/platform_data/pm33xx.h> 11 11 #include <linux/ti-emif-sram.h> 12 12 #include <asm/assembler.h> 13 - #include <asm/memory.h> 13 + #include <asm/page.h> 14 14 15 15 #include "iomap.h" 16 16 #include "cm33xx.h"
+1 -1
arch/arm/mach-omap2/sleep43xx.S
··· 11 11 #include <linux/platform_data/pm33xx.h> 12 12 #include <asm/assembler.h> 13 13 #include <asm/hardware/cache-l2x0.h> 14 - #include <asm/memory.h> 14 + #include <asm/page.h> 15 15 16 16 #include "cm33xx.h" 17 17 #include "common.h"
+1 -1
arch/arm/mach-omap2/sleep44xx.S
··· 9 9 #include <linux/linkage.h> 10 10 #include <asm/assembler.h> 11 11 #include <asm/smp_scu.h> 12 - #include <asm/memory.h> 12 + #include <asm/page.h> 13 13 #include <asm/hardware/cache-l2x0.h> 14 14 15 15 #include "omap-secure.h"
+1 -1
arch/arm/mach-pxa/gumstix.c
··· 26 26 #include <linux/clk.h> 27 27 28 28 #include <asm/setup.h> 29 - #include <asm/memory.h> 29 + #include <asm/page.h> 30 30 #include <asm/mach-types.h> 31 31 #include <asm/irq.h> 32 32 #include <linux/sizes.h>
+1 -1
arch/arm/mach-rockchip/sleep.S
··· 6 6 7 7 #include <linux/linkage.h> 8 8 #include <asm/assembler.h> 9 - #include <asm/memory.h> 9 + #include <asm/page.h> 10 10 11 11 .data 12 12 /*
+1 -1
arch/arm/mach-sa1100/pm.c
··· 29 29 #include <linux/time.h> 30 30 31 31 #include <mach/hardware.h> 32 - #include <asm/memory.h> 32 + #include <asm/page.h> 33 33 #include <asm/suspend.h> 34 34 #include <asm/mach/time.h> 35 35
+1 -1
arch/arm/mach-shmobile/headsmp-scu.S
··· 7 7 8 8 #include <linux/linkage.h> 9 9 #include <linux/init.h> 10 - #include <asm/memory.h> 10 + #include <asm/page.h> 11 11 12 12 /* 13 13 * Boot code for secondary CPUs.
+1 -1
arch/arm/mach-shmobile/headsmp.S
··· 11 11 #include <linux/linkage.h> 12 12 #include <linux/threads.h> 13 13 #include <asm/assembler.h> 14 - #include <asm/memory.h> 14 + #include <asm/page.h> 15 15 16 16 #define SCTLR_MMU 0x01 17 17 #define BOOTROM_ADDRESS 0xE6340000
+1 -1
arch/arm/mach-socfpga/headsmp.S
··· 6 6 */ 7 7 #include <linux/linkage.h> 8 8 #include <linux/init.h> 9 - #include <asm/memory.h> 9 + #include <asm/page.h> 10 10 #include <asm/assembler.h> 11 11 12 12 .arch armv7-a
+1 -1
arch/arm/mach-spear/spear.h
··· 10 10 #ifndef __MACH_SPEAR_H 11 11 #define __MACH_SPEAR_H 12 12 13 - #include <asm/memory.h> 13 + #include <asm/page.h> 14 14 15 15 #if defined(CONFIG_ARCH_SPEAR3XX) || defined (CONFIG_ARCH_SPEAR6XX) 16 16
-1
arch/arm/mm/cache-fa.S
··· 13 13 #include <linux/linkage.h> 14 14 #include <linux/init.h> 15 15 #include <asm/assembler.h> 16 - #include <asm/memory.h> 17 16 #include <asm/page.h> 18 17 19 18 #include "proc-macros.S"
-1
arch/arm/mm/cache-v4wb.S
··· 7 7 #include <linux/linkage.h> 8 8 #include <linux/init.h> 9 9 #include <asm/assembler.h> 10 - #include <asm/memory.h> 11 10 #include <asm/page.h> 12 11 #include "proc-macros.S" 13 12
+1 -1
arch/arm/mm/dma-mapping.c
··· 25 25 #include <linux/sizes.h> 26 26 #include <linux/cma.h> 27 27 28 - #include <asm/memory.h> 28 + #include <asm/page.h> 29 29 #include <asm/highmem.h> 30 30 #include <asm/cacheflush.h> 31 31 #include <asm/tlbflush.h>
+1 -1
arch/arm/mm/dump.c
··· 15 15 16 16 #include <asm/domain.h> 17 17 #include <asm/fixmap.h> 18 - #include <asm/memory.h> 18 + #include <asm/page.h> 19 19 #include <asm/ptdump.h> 20 20 21 21 static struct addr_marker address_markers[] = {
+1 -1
arch/arm/mm/init.c
··· 26 26 #include <asm/cp15.h> 27 27 #include <asm/mach-types.h> 28 28 #include <asm/memblock.h> 29 - #include <asm/memory.h> 29 + #include <asm/page.h> 30 30 #include <asm/prom.h> 31 31 #include <asm/sections.h> 32 32 #include <asm/setup.h>
-1
arch/arm/mm/kasan_init.c
··· 17 17 #include <asm/cputype.h> 18 18 #include <asm/highmem.h> 19 19 #include <asm/mach/map.h> 20 - #include <asm/memory.h> 21 20 #include <asm/page.h> 22 21 #include <asm/pgalloc.h> 23 22 #include <asm/procinfo.h>
+1 -1
arch/arm/mm/mmu.c
··· 27 27 #include <asm/system_info.h> 28 28 #include <asm/traps.h> 29 29 #include <asm/procinfo.h> 30 - #include <asm/memory.h> 30 + #include <asm/page.h> 31 31 #include <asm/pgalloc.h> 32 32 #include <asm/kasan_def.h> 33 33
+1 -1
arch/arm/mm/physaddr.c
··· 6 6 #include <linux/mm.h> 7 7 8 8 #include <asm/sections.h> 9 - #include <asm/memory.h> 9 + #include <asm/page.h> 10 10 #include <asm/fixmap.h> 11 11 #include <asm/dma.h> 12 12
+1 -1
arch/arm/mm/pmsa-v8.c
··· 11 11 #include <asm/cputype.h> 12 12 #include <asm/mpu.h> 13 13 14 - #include <asm/memory.h> 14 + #include <asm/page.h> 15 15 #include <asm/sections.h> 16 16 17 17 #include "mm.h"
+1 -1
arch/arm/mm/proc-v7.S
··· 14 14 #include <asm/asm-offsets.h> 15 15 #include <asm/hwcap.h> 16 16 #include <asm/pgtable-hwdef.h> 17 - #include <asm/memory.h> 17 + #include <asm/page.h> 18 18 19 19 #include "proc-macros.S" 20 20
+1 -1
arch/arm/mm/proc-v7m.S
··· 9 9 */ 10 10 #include <linux/linkage.h> 11 11 #include <asm/assembler.h> 12 - #include <asm/memory.h> 12 + #include <asm/page.h> 13 13 #include <asm/v7m.h> 14 14 #include "proc-macros.S" 15 15
+1 -1
arch/arm/mm/pv-fixup-asm.S
··· 9 9 #include <linux/pgtable.h> 10 10 #include <asm/asm-offsets.h> 11 11 #include <asm/cp15.h> 12 - #include <asm/memory.h> 12 + #include <asm/page.h> 13 13 14 14 .section ".idmap.text", "ax" 15 15
+8 -1
arch/arm64/include/asm/memory.h
··· 333 333 return (void *)(__phys_to_virt(x)); 334 334 } 335 335 336 + /* Needed already here for resolving __phys_to_pfn() in virt_to_pfn() */ 337 + #include <asm-generic/memory_model.h> 338 + 339 + static inline unsigned long virt_to_pfn(const void *kaddr) 340 + { 341 + return __phys_to_pfn(virt_to_phys(kaddr)); 342 + } 343 + 336 344 /* 337 345 * Drivers should NOT use these either. 338 346 */ ··· 349 341 #define __pa_nodebug(x) __virt_to_phys_nodebug((unsigned long)(x)) 350 342 #define __va(x) ((void *)__phys_to_virt((phys_addr_t)(x))) 351 343 #define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT) 352 - #define virt_to_pfn(x) __phys_to_pfn(__virt_to_phys((unsigned long)(x))) 353 344 #define sym_to_pfn(x) __phys_to_pfn(__pa_symbol(x)) 354 345 355 346 /*
-24
arch/arm64/include/uapi/asm/bitsperlong.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 - /* 3 - * Copyright (C) 2012 ARM Ltd. 4 - * 5 - * This program is free software; you can redistribute it and/or modify 6 - * it under the terms of the GNU General Public License version 2 as 7 - * published by the Free Software Foundation. 8 - * 9 - * This program is distributed in the hope that it will be useful, 10 - * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 - * GNU General Public License for more details. 13 - * 14 - * You should have received a copy of the GNU General Public License 15 - * along with this program. If not, see <http://www.gnu.org/licenses/>. 16 - */ 17 - #ifndef __ASM_BITSPERLONG_H 18 - #define __ASM_BITSPERLONG_H 19 - 20 - #define __BITS_PER_LONG 64 21 - 22 - #include <asm-generic/bitsperlong.h> 23 - 24 - #endif /* __ASM_BITSPERLONG_H */
-9
arch/loongarch/include/uapi/asm/bitsperlong.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 - #ifndef __ASM_LOONGARCH_BITSPERLONG_H 3 - #define __ASM_LOONGARCH_BITSPERLONG_H 4 - 5 - #define __BITS_PER_LONG (__SIZEOF_LONG__ * 8) 6 - 7 - #include <asm-generic/bitsperlong.h> 8 - 9 - #endif /* __ASM_LOONGARCH_BITSPERLONG_H */
+1 -2
arch/m68k/include/asm/mcf_pgtable.h
··· 115 115 pgd_val(*pgdp) = virt_to_phys(pmdp); 116 116 } 117 117 118 - #define __pte_page(pte) ((unsigned long) (pte_val(pte) & PAGE_MASK)) 118 + #define __pte_page(pte) ((void *) (pte_val(pte) & PAGE_MASK)) 119 119 #define pmd_page_vaddr(pmd) ((unsigned long) (pmd_val(pmd))) 120 120 121 121 static inline int pte_none(pte_t pte) ··· 134 134 pte_val(*ptep) = 0; 135 135 } 136 136 137 - #define pte_pagenr(pte) ((__pte_page(pte) - PAGE_OFFSET) >> PAGE_SHIFT) 138 137 #define pte_page(pte) virt_to_page(__pte_page(pte)) 139 138 140 139 static inline int pmd_none2(pmd_t *pmd) { return !pmd_val(*pmd); }
+9 -2
arch/m68k/include/asm/page_mm.h
··· 121 121 * TODO: implement (fast) pfn<->pgdat_idx conversion functions, this makes lots 122 122 * of the shifts unnecessary. 123 123 */ 124 - #define virt_to_pfn(kaddr) (__pa(kaddr) >> PAGE_SHIFT) 125 - #define pfn_to_virt(pfn) __va((pfn) << PAGE_SHIFT) 124 + static inline unsigned long virt_to_pfn(const void *kaddr) 125 + { 126 + return __pa(kaddr) >> PAGE_SHIFT; 127 + } 128 + 129 + static inline void *pfn_to_virt(unsigned long pfn) 130 + { 131 + return __va(pfn << PAGE_SHIFT); 132 + } 126 133 127 134 extern int m68k_virt_to_node_shift; 128 135
+9 -2
arch/m68k/include/asm/page_no.h
··· 19 19 #define __pa(vaddr) ((unsigned long)(vaddr)) 20 20 #define __va(paddr) ((void *)((unsigned long)(paddr))) 21 21 22 - #define virt_to_pfn(kaddr) (__pa(kaddr) >> PAGE_SHIFT) 23 - #define pfn_to_virt(pfn) __va((pfn) << PAGE_SHIFT) 22 + static inline unsigned long virt_to_pfn(const void *kaddr) 23 + { 24 + return __pa(kaddr) >> PAGE_SHIFT; 25 + } 26 + 27 + static inline void *pfn_to_virt(unsigned long pfn) 28 + { 29 + return __va(pfn << PAGE_SHIFT); 30 + } 24 31 25 32 #define virt_to_page(addr) (mem_map + (((unsigned long)(addr)-PAGE_OFFSET) >> PAGE_SHIFT)) 26 33 #define page_to_virt(page) __va(((((page) - mem_map) << PAGE_SHIFT) + PAGE_OFFSET))
+2 -2
arch/m68k/include/asm/sun3_pgtable.h
··· 91 91 #define pmd_set(pmdp,ptep) do {} while (0) 92 92 93 93 #define __pte_page(pte) \ 94 - ((unsigned long) __va ((pte_val (pte) & SUN3_PAGE_PGNUM_MASK) << PAGE_SHIFT)) 94 + (__va ((pte_val (pte) & SUN3_PAGE_PGNUM_MASK) << PAGE_SHIFT)) 95 95 96 96 static inline unsigned long pmd_page_vaddr(pmd_t pmd) 97 97 { ··· 111 111 112 112 #define pte_page(pte) virt_to_page(__pte_page(pte)) 113 113 #define pmd_pfn(pmd) (pmd_val(pmd) >> PAGE_SHIFT) 114 - #define pmd_page(pmd) virt_to_page(pmd_page_vaddr(pmd)) 114 + #define pmd_page(pmd) virt_to_page((void *)pmd_page_vaddr(pmd)) 115 115 116 116 117 117 static inline int pmd_none2 (pmd_t *pmd) { return !pmd_val (*pmd); }
+2 -1
arch/m68k/mm/mcfmmu.c
··· 69 69 70 70 /* now change pg_table to kernel virtual addresses */ 71 71 for (i = 0; i < PTRS_PER_PTE; ++i, ++pg_table) { 72 - pte_t pte = pfn_pte(virt_to_pfn(address), PAGE_INIT); 72 + pte_t pte = pfn_pte(virt_to_pfn((void *)address), 73 + PAGE_INIT); 73 74 if (address >= (unsigned long) high_memory) 74 75 pte_val(pte) = 0; 75 76
+2 -2
arch/m68k/mm/motorola.c
··· 102 102 LIST_HEAD_INIT(ptable_list[1]), 103 103 }; 104 104 105 - #define PD_PTABLE(page) ((ptable_desc *)&(virt_to_page(page)->lru)) 105 + #define PD_PTABLE(page) ((ptable_desc *)&(virt_to_page((void *)(page))->lru)) 106 106 #define PD_PAGE(ptable) (list_entry(ptable, struct page, lru)) 107 107 #define PD_MARKBITS(dp) (*(unsigned int *)&PD_PAGE(dp)->index) 108 108 ··· 201 201 list_del(dp); 202 202 mmu_page_dtor((void *)page); 203 203 if (type == TABLE_PTE) 204 - pgtable_pte_page_dtor(virt_to_page(page)); 204 + pgtable_pte_page_dtor(virt_to_page((void *)page)); 205 205 free_page (page); 206 206 return 1; 207 207 } else if (ptable_list[type].next != dp) {
+1 -1
arch/m68k/mm/sun3mmu.c
··· 75 75 /* now change pg_table to kernel virtual addresses */ 76 76 pg_table = (pte_t *) __va ((unsigned long) pg_table); 77 77 for (i=0; i<PTRS_PER_PTE; ++i, ++pg_table) { 78 - pte_t pte = pfn_pte(virt_to_pfn(address), PAGE_INIT); 78 + pte_t pte = pfn_pte(virt_to_pfn((void *)address), PAGE_INIT); 79 79 if (address >= (unsigned long)high_memory) 80 80 pte_val (pte) = 0; 81 81 set_pte (pg_table, pte);
+1 -1
arch/m68k/sun3/dvma.c
··· 29 29 j = *(volatile unsigned long *)kaddr; 30 30 *(volatile unsigned long *)kaddr = j; 31 31 32 - ptep = pfn_pte(virt_to_pfn(kaddr), PAGE_KERNEL); 32 + ptep = pfn_pte(virt_to_pfn((void *)kaddr), PAGE_KERNEL); 33 33 pte = pte_val(ptep); 34 34 // pr_info("dvma_remap: addr %lx -> %lx pte %08lx\n", kaddr, vaddr, pte); 35 35 if(ptelist[(vaddr & 0xff000) >> PAGE_SHIFT] != pte) {
+1 -1
arch/m68k/sun3x/dvma.c
··· 125 125 do { 126 126 pr_debug("mapping %08lx phys to %08lx\n", 127 127 __pa(kaddr), vaddr); 128 - set_pte(pte, pfn_pte(virt_to_pfn(kaddr), 128 + set_pte(pte, pfn_pte(virt_to_pfn((void *)kaddr), 129 129 PAGE_KERNEL)); 130 130 pte++; 131 131 kaddr += PAGE_SIZE;
-14
arch/riscv/include/uapi/asm/bitsperlong.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */ 2 - /* 3 - * Copyright (C) 2012 ARM Ltd. 4 - * Copyright (C) 2015 Regents of the University of California 5 - */ 6 - 7 - #ifndef _UAPI_ASM_RISCV_BITSPERLONG_H 8 - #define _UAPI_ASM_RISCV_BITSPERLONG_H 9 - 10 - #define __BITS_PER_LONG (__SIZEOF_POINTER__ * 8) 11 - 12 - #include <asm-generic/bitsperlong.h> 13 - 14 - #endif /* _UAPI_ASM_RISCV_BITSPERLONG_H */
+2 -2
arch/riscv/mm/init.c
··· 357 357 unsigned long vaddr; 358 358 359 359 vaddr = __get_free_page(GFP_KERNEL); 360 - BUG_ON(!vaddr || !pgtable_pte_page_ctor(virt_to_page(vaddr))); 360 + BUG_ON(!vaddr || !pgtable_pte_page_ctor(virt_to_page((void *)vaddr))); 361 361 362 362 return __pa(vaddr); 363 363 } ··· 440 440 unsigned long vaddr; 441 441 442 442 vaddr = __get_free_page(GFP_KERNEL); 443 - BUG_ON(!vaddr || !pgtable_pmd_page_ctor(virt_to_page(vaddr))); 443 + BUG_ON(!vaddr || !pgtable_pmd_page_ctor(virt_to_page((void *)vaddr))); 444 444 445 445 return __pa(vaddr); 446 446 }
+1 -1
drivers/memory/ti-emif-sram-pm.S
··· 8 8 9 9 #include <linux/linkage.h> 10 10 #include <asm/assembler.h> 11 - #include <asm/memory.h> 11 + #include <asm/page.h> 12 12 13 13 #include "emif.h" 14 14 #include "ti-emif-asm-offsets.h"
+1 -1
drivers/net/xen-netback/netback.c
··· 689 689 prev_pending_idx = pending_idx; 690 690 691 691 txp = &queue->pending_tx_info[pending_idx].req; 692 - page = virt_to_page(idx_to_kaddr(queue, pending_idx)); 692 + page = virt_to_page((void *)idx_to_kaddr(queue, pending_idx)); 693 693 __skb_fill_page_desc(skb, i, page, txp->offset, txp->size); 694 694 skb->len += txp->size; 695 695 skb->data_len += txp->size;
+1 -1
fs/proc/kcore.c
··· 199 199 ent->addr = (unsigned long)page_to_virt(p); 200 200 ent->size = nr_pages << PAGE_SHIFT; 201 201 202 - if (!virt_addr_valid(ent->addr)) 202 + if (!virt_addr_valid((void *)ent->addr)) 203 203 goto free_out; 204 204 205 205 /* cut not-mapped area. ....from ppc-32 code. */
+1 -1
fs/smb/client/cifsglob.h
··· 2179 2179 } while (buflen); 2180 2180 } else { 2181 2181 sg_set_page(&sgtable->sgl[sgtable->nents++], 2182 - virt_to_page(addr), buflen, off); 2182 + virt_to_page((void *)addr), buflen, off); 2183 2183 } 2184 2184 } 2185 2185
+1 -1
fs/smb/client/smbdirect.c
··· 2500 2500 if (is_vmalloc_or_module_addr((void *)kaddr)) 2501 2501 page = vmalloc_to_page((void *)kaddr); 2502 2502 else 2503 - page = virt_to_page(kaddr); 2503 + page = virt_to_page((void *)kaddr); 2504 2504 2505 2505 if (!smb_set_sge(rdma, page, off, seg)) 2506 2506 return -EIO;
+10 -2
include/asm-generic/page.h
··· 74 74 #define __va(x) ((void *)((unsigned long) (x))) 75 75 #define __pa(x) ((unsigned long) (x)) 76 76 77 - #define virt_to_pfn(kaddr) (__pa(kaddr) >> PAGE_SHIFT) 78 - #define pfn_to_virt(pfn) __va((pfn) << PAGE_SHIFT) 77 + static inline unsigned long virt_to_pfn(const void *kaddr) 78 + { 79 + return __pa(kaddr) >> PAGE_SHIFT; 80 + } 81 + #define virt_to_pfn virt_to_pfn 82 + static inline void *pfn_to_virt(unsigned long pfn) 83 + { 84 + return __va(pfn) << PAGE_SHIFT; 85 + } 86 + #define pfn_to_virt pfn_to_virt 79 87 80 88 #define virt_to_page(addr) pfn_to_page(virt_to_pfn(addr)) 81 89 #define page_to_virt(page) pfn_to_virt(page_to_pfn(page))
+9 -73
include/linux/compat.h
··· 581 581 struct io_event __user *events, 582 582 struct __kernel_timespec __user *timeout, 583 583 const struct __compat_aio_sigset __user *usig); 584 - 585 - /* fs/cookies.c */ 586 584 asmlinkage long compat_sys_lookup_dcookie(u32, u32, char __user *, compat_size_t); 587 - 588 - /* fs/eventpoll.c */ 589 585 asmlinkage long compat_sys_epoll_pwait(int epfd, 590 586 struct epoll_event __user *events, 591 587 int maxevents, int timeout, ··· 593 597 const struct __kernel_timespec __user *timeout, 594 598 const compat_sigset_t __user *sigmask, 595 599 compat_size_t sigsetsize); 596 - 597 - /* fs/fcntl.c */ 598 600 asmlinkage long compat_sys_fcntl(unsigned int fd, unsigned int cmd, 599 601 compat_ulong_t arg); 600 602 asmlinkage long compat_sys_fcntl64(unsigned int fd, unsigned int cmd, 601 603 compat_ulong_t arg); 602 - 603 - /* fs/ioctl.c */ 604 604 asmlinkage long compat_sys_ioctl(unsigned int fd, unsigned int cmd, 605 605 compat_ulong_t arg); 606 - 607 - /* fs/open.c */ 608 606 asmlinkage long compat_sys_statfs(const char __user *pathname, 609 607 struct compat_statfs __user *buf); 610 608 asmlinkage long compat_sys_statfs64(const char __user *pathname, ··· 613 623 /* No generic prototype for truncate64, ftruncate64, fallocate */ 614 624 asmlinkage long compat_sys_openat(int dfd, const char __user *filename, 615 625 int flags, umode_t mode); 616 - 617 - /* fs/readdir.c */ 618 626 asmlinkage long compat_sys_getdents(unsigned int fd, 619 627 struct compat_linux_dirent __user *dirent, 620 628 unsigned int count); 621 - 622 - /* fs/read_write.c */ 623 629 asmlinkage long compat_sys_lseek(unsigned int, compat_off_t, unsigned int); 624 630 /* No generic prototype for pread64 and pwrite64 */ 625 631 asmlinkage ssize_t compat_sys_preadv(compat_ulong_t fd, ··· 635 649 const struct iovec __user *vec, 636 650 unsigned long vlen, loff_t pos); 637 651 #endif 638 - 639 - /* fs/sendfile.c */ 640 652 asmlinkage long compat_sys_sendfile(int out_fd, int in_fd, 641 653 compat_off_t __user *offset, compat_size_t count); 642 654 asmlinkage long compat_sys_sendfile64(int out_fd, int in_fd, 643 655 compat_loff_t __user *offset, compat_size_t count); 644 - 645 - /* fs/select.c */ 646 656 asmlinkage long compat_sys_pselect6_time32(int n, compat_ulong_t __user *inp, 647 657 compat_ulong_t __user *outp, 648 658 compat_ulong_t __user *exp, ··· 659 677 struct __kernel_timespec __user *tsp, 660 678 const compat_sigset_t __user *sigmask, 661 679 compat_size_t sigsetsize); 662 - 663 - /* fs/signalfd.c */ 664 680 asmlinkage long compat_sys_signalfd4(int ufd, 665 681 const compat_sigset_t __user *sigmask, 666 682 compat_size_t sigsetsize, int flags); 667 - 668 - /* fs/stat.c */ 669 683 asmlinkage long compat_sys_newfstatat(unsigned int dfd, 670 684 const char __user *filename, 671 685 struct compat_stat __user *statbuf, 672 686 int flag); 673 687 asmlinkage long compat_sys_newfstat(unsigned int fd, 674 688 struct compat_stat __user *statbuf); 675 - 676 - /* fs/sync.c: No generic prototype for sync_file_range and sync_file_range2 */ 677 - 678 - /* kernel/exit.c */ 689 + /* No generic prototype for sync_file_range and sync_file_range2 */ 679 690 asmlinkage long compat_sys_waitid(int, compat_pid_t, 680 691 struct compat_siginfo __user *, int, 681 692 struct compat_rusage __user *); 682 - 683 - 684 - 685 - /* kernel/futex.c */ 686 693 asmlinkage long 687 694 compat_sys_set_robust_list(struct compat_robust_list_head __user *head, 688 695 compat_size_t len); 689 696 asmlinkage long 690 697 compat_sys_get_robust_list(int pid, compat_uptr_t __user *head_ptr, 691 698 compat_size_t __user *len_ptr); 692 - 693 - /* kernel/itimer.c */ 694 699 asmlinkage long compat_sys_getitimer(int which, 695 700 struct old_itimerval32 __user *it); 696 701 asmlinkage long compat_sys_setitimer(int which, 697 702 struct old_itimerval32 __user *in, 698 703 struct old_itimerval32 __user *out); 699 - 700 - /* kernel/kexec.c */ 701 704 asmlinkage long compat_sys_kexec_load(compat_ulong_t entry, 702 705 compat_ulong_t nr_segments, 703 706 struct compat_kexec_segment __user *, 704 707 compat_ulong_t flags); 705 - 706 - /* kernel/posix-timers.c */ 707 708 asmlinkage long compat_sys_timer_create(clockid_t which_clock, 708 709 struct compat_sigevent __user *timer_event_spec, 709 710 timer_t __user *created_timer_id); 710 - 711 - /* kernel/ptrace.c */ 712 711 asmlinkage long compat_sys_ptrace(compat_long_t request, compat_long_t pid, 713 712 compat_long_t addr, compat_long_t data); 714 - 715 - /* kernel/sched/core.c */ 716 713 asmlinkage long compat_sys_sched_setaffinity(compat_pid_t pid, 717 714 unsigned int len, 718 715 compat_ulong_t __user *user_mask_ptr); 719 716 asmlinkage long compat_sys_sched_getaffinity(compat_pid_t pid, 720 717 unsigned int len, 721 718 compat_ulong_t __user *user_mask_ptr); 722 - 723 - /* kernel/signal.c */ 724 719 asmlinkage long compat_sys_sigaltstack(const compat_stack_t __user *uss_ptr, 725 720 compat_stack_t __user *uoss_ptr); 726 721 asmlinkage long compat_sys_rt_sigsuspend(compat_sigset_t __user *unewset, ··· 722 763 asmlinkage long compat_sys_rt_sigqueueinfo(compat_pid_t pid, int sig, 723 764 struct compat_siginfo __user *uinfo); 724 765 /* No generic prototype for rt_sigreturn */ 725 - 726 - /* kernel/sys.c */ 727 766 asmlinkage long compat_sys_times(struct compat_tms __user *tbuf); 728 767 asmlinkage long compat_sys_getrlimit(unsigned int resource, 729 768 struct compat_rlimit __user *rlim); 730 769 asmlinkage long compat_sys_setrlimit(unsigned int resource, 731 770 struct compat_rlimit __user *rlim); 732 771 asmlinkage long compat_sys_getrusage(int who, struct compat_rusage __user *ru); 733 - 734 - /* kernel/time.c */ 735 772 asmlinkage long compat_sys_gettimeofday(struct old_timeval32 __user *tv, 736 773 struct timezone __user *tz); 737 774 asmlinkage long compat_sys_settimeofday(struct old_timeval32 __user *tv, 738 775 struct timezone __user *tz); 739 - 740 - /* kernel/timer.c */ 741 776 asmlinkage long compat_sys_sysinfo(struct compat_sysinfo __user *info); 742 - 743 - /* ipc/mqueue.c */ 744 777 asmlinkage long compat_sys_mq_open(const char __user *u_name, 745 778 int oflag, compat_mode_t mode, 746 779 struct compat_mq_attr __user *u_attr); ··· 741 790 asmlinkage long compat_sys_mq_getsetattr(mqd_t mqdes, 742 791 const struct compat_mq_attr __user *u_mqstat, 743 792 struct compat_mq_attr __user *u_omqstat); 744 - 745 - /* ipc/msg.c */ 746 793 asmlinkage long compat_sys_msgctl(int first, int second, void __user *uptr); 747 794 asmlinkage long compat_sys_msgrcv(int msqid, compat_uptr_t msgp, 748 795 compat_ssize_t msgsz, compat_long_t msgtyp, int msgflg); 749 796 asmlinkage long compat_sys_msgsnd(int msqid, compat_uptr_t msgp, 750 797 compat_ssize_t msgsz, int msgflg); 751 - 752 - /* ipc/sem.c */ 753 798 asmlinkage long compat_sys_semctl(int semid, int semnum, int cmd, int arg); 754 - 755 - /* ipc/shm.c */ 756 799 asmlinkage long compat_sys_shmctl(int first, int second, void __user *uptr); 757 800 asmlinkage long compat_sys_shmat(int shmid, compat_uptr_t shmaddr, int shmflg); 758 - 759 - /* net/socket.c */ 760 801 asmlinkage long compat_sys_recvfrom(int fd, void __user *buf, compat_size_t len, 761 802 unsigned flags, struct sockaddr __user *addr, 762 803 int __user *addrlen); ··· 756 813 unsigned flags); 757 814 asmlinkage long compat_sys_recvmsg(int fd, struct compat_msghdr __user *msg, 758 815 unsigned int flags); 759 - 760 - /* mm/filemap.c: No generic prototype for readahead */ 761 - 762 - /* security/keys/keyctl.c */ 816 + /* No generic prototype for readahead */ 763 817 asmlinkage long compat_sys_keyctl(u32 option, 764 818 u32 arg2, u32 arg3, u32 arg4, u32 arg5); 765 - 766 - /* arch/example/kernel/sys_example.c */ 767 819 asmlinkage long compat_sys_execve(const char __user *filename, const compat_uptr_t __user *argv, 768 820 const compat_uptr_t __user *envp); 769 - 770 - /* mm/fadvise.c: No generic prototype for fadvise64_64 */ 771 - 772 - /* mm/, CONFIG_MMU only */ 821 + /* No generic prototype for fadvise64_64 */ 822 + /* CONFIG_MMU only */ 773 823 asmlinkage long compat_sys_rt_tgsigqueueinfo(compat_pid_t tgid, 774 824 compat_pid_t pid, int sig, 775 825 struct compat_siginfo __user *uinfo); ··· 832 896 asmlinkage long compat_sys_recv(int fd, void __user *buf, compat_size_t len, 833 897 unsigned flags); 834 898 835 - /* obsolete: fs/readdir.c */ 899 + /* obsolete */ 836 900 asmlinkage long compat_sys_old_readdir(unsigned int fd, 837 901 struct compat_old_linux_dirent __user *, 838 902 unsigned int count); 839 903 840 - /* obsolete: fs/select.c */ 904 + /* obsolete */ 841 905 asmlinkage long compat_sys_old_select(struct compat_sel_arg_struct __user *arg); 842 906 843 - /* obsolete: ipc */ 907 + /* obsolete */ 844 908 asmlinkage long compat_sys_ipc(u32, int, int, u32, compat_uptr_t, u32); 845 909 846 - /* obsolete: kernel/signal.c */ 910 + /* obsolete */ 847 911 #ifdef __ARCH_WANT_SYS_SIGPENDING 848 912 asmlinkage long compat_sys_sigpending(compat_old_sigset_t __user *set); 849 913 #endif ··· 858 922 struct compat_old_sigaction __user *oact); 859 923 #endif 860 924 861 - /* obsolete: net/socket.c */ 925 + /* obsolete */ 862 926 asmlinkage long compat_sys_socketcall(int call, u32 __user *args); 863 927 864 928 #ifdef __ARCH_WANT_COMPAT_TRUNCATE64
+15 -125
include/linux/syscalls.h
··· 348 348 const void __user *argp, size_t argsz); 349 349 asmlinkage long sys_io_uring_register(unsigned int fd, unsigned int op, 350 350 void __user *arg, unsigned int nr_args); 351 - 352 - /* fs/xattr.c */ 353 351 asmlinkage long sys_setxattr(const char __user *path, const char __user *name, 354 352 const void __user *value, size_t size, int flags); 355 353 asmlinkage long sys_lsetxattr(const char __user *path, const char __user *name, ··· 370 372 asmlinkage long sys_lremovexattr(const char __user *path, 371 373 const char __user *name); 372 374 asmlinkage long sys_fremovexattr(int fd, const char __user *name); 373 - 374 - /* fs/dcache.c */ 375 375 asmlinkage long sys_getcwd(char __user *buf, unsigned long size); 376 - 377 - /* fs/cookies.c */ 378 376 asmlinkage long sys_lookup_dcookie(u64 cookie64, char __user *buf, size_t len); 379 - 380 - /* fs/eventfd.c */ 381 377 asmlinkage long sys_eventfd2(unsigned int count, int flags); 382 - 383 - /* fs/eventpoll.c */ 384 378 asmlinkage long sys_epoll_create1(int flags); 385 379 asmlinkage long sys_epoll_ctl(int epfd, int op, int fd, 386 380 struct epoll_event __user *event); ··· 385 395 const struct __kernel_timespec __user *timeout, 386 396 const sigset_t __user *sigmask, 387 397 size_t sigsetsize); 388 - 389 - /* fs/fcntl.c */ 390 398 asmlinkage long sys_dup(unsigned int fildes); 391 399 asmlinkage long sys_dup3(unsigned int oldfd, unsigned int newfd, int flags); 392 400 asmlinkage long sys_fcntl(unsigned int fd, unsigned int cmd, unsigned long arg); ··· 392 404 asmlinkage long sys_fcntl64(unsigned int fd, 393 405 unsigned int cmd, unsigned long arg); 394 406 #endif 395 - 396 - /* fs/inotify_user.c */ 397 407 asmlinkage long sys_inotify_init1(int flags); 398 408 asmlinkage long sys_inotify_add_watch(int fd, const char __user *path, 399 409 u32 mask); 400 410 asmlinkage long sys_inotify_rm_watch(int fd, __s32 wd); 401 - 402 - /* fs/ioctl.c */ 403 411 asmlinkage long sys_ioctl(unsigned int fd, unsigned int cmd, 404 412 unsigned long arg); 405 - 406 - /* fs/ioprio.c */ 407 413 asmlinkage long sys_ioprio_set(int which, int who, int ioprio); 408 414 asmlinkage long sys_ioprio_get(int which, int who); 409 - 410 - /* fs/locks.c */ 411 415 asmlinkage long sys_flock(unsigned int fd, unsigned int cmd); 412 - 413 - /* fs/namei.c */ 414 416 asmlinkage long sys_mknodat(int dfd, const char __user * filename, umode_t mode, 415 417 unsigned dev); 416 418 asmlinkage long sys_mkdirat(int dfd, const char __user * pathname, umode_t mode); ··· 411 433 int newdfd, const char __user *newname, int flags); 412 434 asmlinkage long sys_renameat(int olddfd, const char __user * oldname, 413 435 int newdfd, const char __user * newname); 414 - 415 - /* fs/namespace.c */ 416 436 asmlinkage long sys_umount(char __user *name, int flags); 417 437 asmlinkage long sys_mount(char __user *dev_name, char __user *dir_name, 418 438 char __user *type, unsigned long flags, 419 439 void __user *data); 420 440 asmlinkage long sys_pivot_root(const char __user *new_root, 421 441 const char __user *put_old); 422 - 423 - /* fs/nfsctl.c */ 424 - 425 - /* fs/open.c */ 426 442 asmlinkage long sys_statfs(const char __user * path, 427 443 struct statfs __user *buf); 428 444 asmlinkage long sys_statfs64(const char __user *path, size_t sz, ··· 451 479 asmlinkage long sys_close_range(unsigned int fd, unsigned int max_fd, 452 480 unsigned int flags); 453 481 asmlinkage long sys_vhangup(void); 454 - 455 - /* fs/pipe.c */ 456 482 asmlinkage long sys_pipe2(int __user *fildes, int flags); 457 - 458 - /* fs/quota.c */ 459 483 asmlinkage long sys_quotactl(unsigned int cmd, const char __user *special, 460 484 qid_t id, void __user *addr); 461 485 asmlinkage long sys_quotactl_fd(unsigned int fd, unsigned int cmd, qid_t id, 462 486 void __user *addr); 463 - 464 - /* fs/readdir.c */ 465 487 asmlinkage long sys_getdents64(unsigned int fd, 466 488 struct linux_dirent64 __user *dirent, 467 489 unsigned int count); 468 - 469 - /* fs/read_write.c */ 470 490 asmlinkage long sys_llseek(unsigned int fd, unsigned long offset_high, 471 491 unsigned long offset_low, loff_t __user *result, 472 492 unsigned int whence); ··· 481 517 unsigned long vlen, unsigned long pos_l, unsigned long pos_h); 482 518 asmlinkage long sys_pwritev(unsigned long fd, const struct iovec __user *vec, 483 519 unsigned long vlen, unsigned long pos_l, unsigned long pos_h); 484 - 485 - /* fs/sendfile.c */ 486 520 asmlinkage long sys_sendfile64(int out_fd, int in_fd, 487 521 loff_t __user *offset, size_t count); 488 - 489 - /* fs/select.c */ 490 522 asmlinkage long sys_pselect6(int, fd_set __user *, fd_set __user *, 491 523 fd_set __user *, struct __kernel_timespec __user *, 492 524 void __user *); ··· 495 535 asmlinkage long sys_ppoll_time32(struct pollfd __user *, unsigned int, 496 536 struct old_timespec32 __user *, const sigset_t __user *, 497 537 size_t); 498 - 499 - /* fs/signalfd.c */ 500 538 asmlinkage long sys_signalfd4(int ufd, sigset_t __user *user_mask, size_t sizemask, int flags); 501 - 502 - /* fs/splice.c */ 503 539 asmlinkage long sys_vmsplice(int fd, const struct iovec __user *iov, 504 540 unsigned long nr_segs, unsigned int flags); 505 541 asmlinkage long sys_splice(int fd_in, loff_t __user *off_in, 506 542 int fd_out, loff_t __user *off_out, 507 543 size_t len, unsigned int flags); 508 544 asmlinkage long sys_tee(int fdin, int fdout, size_t len, unsigned int flags); 509 - 510 - /* fs/stat.c */ 511 545 asmlinkage long sys_readlinkat(int dfd, const char __user *path, char __user *buf, 512 546 int bufsiz); 513 547 asmlinkage long sys_newfstatat(int dfd, const char __user *filename, ··· 512 558 asmlinkage long sys_fstatat64(int dfd, const char __user *filename, 513 559 struct stat64 __user *statbuf, int flag); 514 560 #endif 515 - 516 - /* fs/sync.c */ 517 561 asmlinkage long sys_sync(void); 518 562 asmlinkage long sys_fsync(unsigned int fd); 519 563 asmlinkage long sys_fdatasync(unsigned int fd); ··· 519 567 loff_t offset, loff_t nbytes); 520 568 asmlinkage long sys_sync_file_range(int fd, loff_t offset, loff_t nbytes, 521 569 unsigned int flags); 522 - 523 - /* fs/timerfd.c */ 524 570 asmlinkage long sys_timerfd_create(int clockid, int flags); 525 571 asmlinkage long sys_timerfd_settime(int ufd, int flags, 526 572 const struct __kernel_itimerspec __user *utmr, ··· 529 579 asmlinkage long sys_timerfd_settime32(int ufd, int flags, 530 580 const struct old_itimerspec32 __user *utmr, 531 581 struct old_itimerspec32 __user *otmr); 532 - 533 - /* fs/utimes.c */ 534 582 asmlinkage long sys_utimensat(int dfd, const char __user *filename, 535 583 struct __kernel_timespec __user *utimes, 536 584 int flags); 537 585 asmlinkage long sys_utimensat_time32(unsigned int dfd, 538 586 const char __user *filename, 539 587 struct old_timespec32 __user *t, int flags); 540 - 541 - /* kernel/acct.c */ 542 588 asmlinkage long sys_acct(const char __user *name); 543 - 544 - /* kernel/capability.c */ 545 589 asmlinkage long sys_capget(cap_user_header_t header, 546 590 cap_user_data_t dataptr); 547 591 asmlinkage long sys_capset(cap_user_header_t header, 548 592 const cap_user_data_t data); 549 - 550 - /* kernel/exec_domain.c */ 551 593 asmlinkage long sys_personality(unsigned int personality); 552 - 553 - /* kernel/exit.c */ 554 594 asmlinkage long sys_exit(int error_code); 555 595 asmlinkage long sys_exit_group(int error_code); 556 596 asmlinkage long sys_waitid(int which, pid_t pid, 557 597 struct siginfo __user *infop, 558 598 int options, struct rusage __user *ru); 559 - 560 - /* kernel/fork.c */ 561 599 asmlinkage long sys_set_tid_address(int __user *tidptr); 562 600 asmlinkage long sys_unshare(unsigned long unshare_flags); 563 - 564 - /* kernel/futex/syscalls.c */ 565 601 asmlinkage long sys_futex(u32 __user *uaddr, int op, u32 val, 566 602 const struct __kernel_timespec __user *utime, 567 603 u32 __user *uaddr2, u32 val3); ··· 563 627 asmlinkage long sys_futex_waitv(struct futex_waitv *waiters, 564 628 unsigned int nr_futexes, unsigned int flags, 565 629 struct __kernel_timespec __user *timeout, clockid_t clockid); 566 - 567 - /* kernel/hrtimer.c */ 568 630 asmlinkage long sys_nanosleep(struct __kernel_timespec __user *rqtp, 569 631 struct __kernel_timespec __user *rmtp); 570 632 asmlinkage long sys_nanosleep_time32(struct old_timespec32 __user *rqtp, 571 633 struct old_timespec32 __user *rmtp); 572 - 573 - /* kernel/itimer.c */ 574 634 asmlinkage long sys_getitimer(int which, struct __kernel_old_itimerval __user *value); 575 635 asmlinkage long sys_setitimer(int which, 576 636 struct __kernel_old_itimerval __user *value, 577 637 struct __kernel_old_itimerval __user *ovalue); 578 - 579 - /* kernel/kexec.c */ 580 638 asmlinkage long sys_kexec_load(unsigned long entry, unsigned long nr_segments, 581 639 struct kexec_segment __user *segments, 582 640 unsigned long flags); 583 - 584 - /* kernel/module.c */ 585 641 asmlinkage long sys_init_module(void __user *umod, unsigned long len, 586 642 const char __user *uargs); 587 643 asmlinkage long sys_delete_module(const char __user *name_user, 588 644 unsigned int flags); 589 - 590 - /* kernel/posix-timers.c */ 591 645 asmlinkage long sys_timer_create(clockid_t which_clock, 592 646 struct sigevent __user *timer_event_spec, 593 647 timer_t __user * created_timer_id); ··· 611 685 asmlinkage long sys_clock_nanosleep_time32(clockid_t which_clock, int flags, 612 686 struct old_timespec32 __user *rqtp, 613 687 struct old_timespec32 __user *rmtp); 614 - 615 - /* kernel/printk.c */ 616 688 asmlinkage long sys_syslog(int type, char __user *buf, int len); 617 - 618 - /* kernel/ptrace.c */ 619 689 asmlinkage long sys_ptrace(long request, long pid, unsigned long addr, 620 690 unsigned long data); 621 - /* kernel/sched/core.c */ 622 - 623 691 asmlinkage long sys_sched_setparam(pid_t pid, 624 692 struct sched_param __user *param); 625 693 asmlinkage long sys_sched_setscheduler(pid_t pid, int policy, ··· 632 712 struct __kernel_timespec __user *interval); 633 713 asmlinkage long sys_sched_rr_get_interval_time32(pid_t pid, 634 714 struct old_timespec32 __user *interval); 635 - 636 - /* kernel/signal.c */ 637 715 asmlinkage long sys_restart_syscall(void); 638 716 asmlinkage long sys_kill(pid_t pid, int sig); 639 717 asmlinkage long sys_tkill(pid_t pid, int sig); ··· 657 739 const struct old_timespec32 __user *uts, 658 740 size_t sigsetsize); 659 741 asmlinkage long sys_rt_sigqueueinfo(pid_t pid, int sig, siginfo_t __user *uinfo); 660 - 661 - /* kernel/sys.c */ 662 742 asmlinkage long sys_setpriority(int which, int who, int niceval); 663 743 asmlinkage long sys_getpriority(int which, int who); 664 744 asmlinkage long sys_reboot(int magic1, int magic2, unsigned int cmd, ··· 690 774 asmlinkage long sys_prctl(int option, unsigned long arg2, unsigned long arg3, 691 775 unsigned long arg4, unsigned long arg5); 692 776 asmlinkage long sys_getcpu(unsigned __user *cpu, unsigned __user *node, struct getcpu_cache __user *cache); 693 - 694 - /* kernel/time.c */ 695 777 asmlinkage long sys_gettimeofday(struct __kernel_old_timeval __user *tv, 696 778 struct timezone __user *tz); 697 779 asmlinkage long sys_settimeofday(struct __kernel_old_timeval __user *tv, 698 780 struct timezone __user *tz); 699 781 asmlinkage long sys_adjtimex(struct __kernel_timex __user *txc_p); 700 782 asmlinkage long sys_adjtimex_time32(struct old_timex32 __user *txc_p); 701 - 702 - /* kernel/sys.c */ 703 783 asmlinkage long sys_getpid(void); 704 784 asmlinkage long sys_getppid(void); 705 785 asmlinkage long sys_getuid(void); ··· 704 792 asmlinkage long sys_getegid(void); 705 793 asmlinkage long sys_gettid(void); 706 794 asmlinkage long sys_sysinfo(struct sysinfo __user *info); 707 - 708 - /* ipc/mqueue.c */ 709 795 asmlinkage long sys_mq_open(const char __user *name, int oflag, umode_t mode, struct mq_attr __user *attr); 710 796 asmlinkage long sys_mq_unlink(const char __user *name); 711 797 asmlinkage long sys_mq_timedsend(mqd_t mqdes, const char __user *msg_ptr, size_t msg_len, unsigned int msg_prio, const struct __kernel_timespec __user *abs_timeout); ··· 718 808 const char __user *u_msg_ptr, 719 809 unsigned int msg_len, unsigned int msg_prio, 720 810 const struct old_timespec32 __user *u_abs_timeout); 721 - 722 - /* ipc/msg.c */ 723 811 asmlinkage long sys_msgget(key_t key, int msgflg); 724 812 asmlinkage long sys_old_msgctl(int msqid, int cmd, struct msqid_ds __user *buf); 725 813 asmlinkage long sys_msgctl(int msqid, int cmd, struct msqid_ds __user *buf); ··· 725 817 size_t msgsz, long msgtyp, int msgflg); 726 818 asmlinkage long sys_msgsnd(int msqid, struct msgbuf __user *msgp, 727 819 size_t msgsz, int msgflg); 728 - 729 - /* ipc/sem.c */ 730 820 asmlinkage long sys_semget(key_t key, int nsems, int semflg); 731 821 asmlinkage long sys_semctl(int semid, int semnum, int cmd, unsigned long arg); 732 822 asmlinkage long sys_old_semctl(int semid, int semnum, int cmd, unsigned long arg); ··· 736 830 const struct old_timespec32 __user *timeout); 737 831 asmlinkage long sys_semop(int semid, struct sembuf __user *sops, 738 832 unsigned nsops); 739 - 740 - /* ipc/shm.c */ 741 833 asmlinkage long sys_shmget(key_t key, size_t size, int flag); 742 834 asmlinkage long sys_old_shmctl(int shmid, int cmd, struct shmid_ds __user *buf); 743 835 asmlinkage long sys_shmctl(int shmid, int cmd, struct shmid_ds __user *buf); 744 836 asmlinkage long sys_shmat(int shmid, char __user *shmaddr, int shmflg); 745 837 asmlinkage long sys_shmdt(char __user *shmaddr); 746 - 747 - /* net/socket.c */ 748 838 asmlinkage long sys_socket(int, int, int); 749 839 asmlinkage long sys_socketpair(int, int, int, int __user *); 750 840 asmlinkage long sys_bind(int, struct sockaddr __user *, int); ··· 760 858 asmlinkage long sys_shutdown(int, int); 761 859 asmlinkage long sys_sendmsg(int fd, struct user_msghdr __user *msg, unsigned flags); 762 860 asmlinkage long sys_recvmsg(int fd, struct user_msghdr __user *msg, unsigned flags); 763 - 764 - /* mm/filemap.c */ 765 861 asmlinkage long sys_readahead(int fd, loff_t offset, size_t count); 766 - 767 - /* mm/nommu.c, also with MMU */ 768 862 asmlinkage long sys_brk(unsigned long brk); 769 863 asmlinkage long sys_munmap(unsigned long addr, size_t len); 770 864 asmlinkage long sys_mremap(unsigned long addr, 771 865 unsigned long old_len, unsigned long new_len, 772 866 unsigned long flags, unsigned long new_addr); 773 - 774 - /* security/keys/keyctl.c */ 775 867 asmlinkage long sys_add_key(const char __user *_type, 776 868 const char __user *_description, 777 869 const void __user *_payload, ··· 777 881 key_serial_t destringid); 778 882 asmlinkage long sys_keyctl(int cmd, unsigned long arg2, unsigned long arg3, 779 883 unsigned long arg4, unsigned long arg5); 780 - 781 - /* arch/example/kernel/sys_example.c */ 782 884 #ifdef CONFIG_CLONE_BACKWARDS 783 885 asmlinkage long sys_clone(unsigned long, unsigned long, int __user *, unsigned long, 784 886 int __user *); ··· 795 901 asmlinkage long sys_execve(const char __user *filename, 796 902 const char __user *const __user *argv, 797 903 const char __user *const __user *envp); 798 - 799 - /* mm/fadvise.c */ 800 904 asmlinkage long sys_fadvise64_64(int fd, loff_t offset, loff_t len, int advice); 801 905 802 - /* mm/, CONFIG_MMU only */ 906 + /* CONFIG_MMU only */ 803 907 asmlinkage long sys_swapon(const char __user *specialfile, int swap_flags); 804 908 asmlinkage long sys_swapoff(const char __user *specialfile); 805 909 asmlinkage long sys_mprotect(unsigned long start, size_t len, ··· 835 943 const int __user *nodes, 836 944 int __user *status, 837 945 int flags); 838 - 839 946 asmlinkage long sys_rt_tgsigqueueinfo(pid_t tgid, pid_t pid, int sig, 840 947 siginfo_t __user *uinfo); 841 948 asmlinkage long sys_perf_event_open( ··· 847 956 asmlinkage long sys_recvmmsg_time32(int fd, struct mmsghdr __user *msg, 848 957 unsigned int vlen, unsigned flags, 849 958 struct old_timespec32 __user *timeout); 850 - 851 959 asmlinkage long sys_wait4(pid_t pid, int __user *stat_addr, 852 960 int options, struct rusage __user *ru); 853 961 asmlinkage long sys_prlimit64(pid_t pid, unsigned int resource, ··· 958 1068 * Architecture-specific system calls 959 1069 */ 960 1070 961 - /* arch/x86/kernel/ioport.c */ 1071 + /* x86 */ 962 1072 asmlinkage long sys_ioperm(unsigned long from, unsigned long num, int on); 963 1073 964 1074 /* pciconfig: alpha, arm, arm64, ia64, sparc */ ··· 1066 1176 unsigned long arg1, unsigned long arg2); 1067 1177 asmlinkage long sys_fork(void); 1068 1178 1069 - /* obsolete: kernel/time/time.c */ 1179 + /* obsolete */ 1070 1180 asmlinkage long sys_stime(__kernel_old_time_t __user *tptr); 1071 1181 asmlinkage long sys_stime32(old_time32_t __user *tptr); 1072 1182 1073 - /* obsolete: kernel/signal.c */ 1183 + /* obsolete */ 1074 1184 asmlinkage long sys_sigpending(old_sigset_t __user *uset); 1075 1185 asmlinkage long sys_sigprocmask(int how, old_sigset_t __user *set, 1076 1186 old_sigset_t __user *oset); ··· 1090 1200 asmlinkage long sys_ssetmask(int newmask); 1091 1201 asmlinkage long sys_signal(int sig, __sighandler_t handler); 1092 1202 1093 - /* obsolete: kernel/sched/core.c */ 1203 + /* obsolete */ 1094 1204 asmlinkage long sys_nice(int increment); 1095 1205 1096 - /* obsolete: kernel/kexec_file.c */ 1206 + /* obsolete */ 1097 1207 asmlinkage long sys_kexec_file_load(int kernel_fd, int initrd_fd, 1098 1208 unsigned long cmdline_len, 1099 1209 const char __user *cmdline_ptr, 1100 1210 unsigned long flags); 1101 1211 1102 - /* obsolete: kernel/exit.c */ 1212 + /* obsolete */ 1103 1213 asmlinkage long sys_waitpid(pid_t pid, int __user *stat_addr, int options); 1104 1214 1105 - /* obsolete: kernel/uid16.c */ 1215 + /* obsolete */ 1106 1216 #ifdef CONFIG_HAVE_UID16 1107 1217 asmlinkage long sys_chown16(const char __user *filename, 1108 1218 old_uid_t user, old_gid_t group); ··· 1129 1239 asmlinkage long sys_getegid16(void); 1130 1240 #endif 1131 1241 1132 - /* obsolete: net/socket.c */ 1242 + /* obsolete */ 1133 1243 asmlinkage long sys_socketcall(int call, unsigned long __user *args); 1134 1244 1135 - /* obsolete: fs/stat.c */ 1245 + /* obsolete */ 1136 1246 asmlinkage long sys_stat(const char __user *filename, 1137 1247 struct __old_kernel_stat __user *statbuf); 1138 1248 asmlinkage long sys_lstat(const char __user *filename, ··· 1142 1252 asmlinkage long sys_readlink(const char __user *path, 1143 1253 char __user *buf, int bufsiz); 1144 1254 1145 - /* obsolete: fs/select.c */ 1255 + /* obsolete */ 1146 1256 asmlinkage long sys_old_select(struct sel_arg_struct __user *arg); 1147 1257 1148 - /* obsolete: fs/readdir.c */ 1258 + /* obsolete */ 1149 1259 asmlinkage long sys_old_readdir(unsigned int, struct old_linux_dirent __user *, unsigned int); 1150 1260 1151 - /* obsolete: kernel/sys.c */ 1261 + /* obsolete */ 1152 1262 asmlinkage long sys_gethostname(char __user *name, int len); 1153 1263 asmlinkage long sys_uname(struct old_utsname __user *); 1154 1264 asmlinkage long sys_olduname(struct oldold_utsname __user *); ··· 1156 1266 asmlinkage long sys_old_getrlimit(unsigned int resource, struct rlimit __user *rlim); 1157 1267 #endif 1158 1268 1159 - /* obsolete: ipc */ 1269 + /* obsolete */ 1160 1270 asmlinkage long sys_ipc(unsigned int call, int first, unsigned long second, 1161 1271 unsigned long third, void __user *ptr, long fifth); 1162 1272 1163 - /* obsolete: mm/ */ 1273 + /* obsolete */ 1164 1274 asmlinkage long sys_mmap_pgoff(unsigned long addr, unsigned long len, 1165 1275 unsigned long prot, unsigned long flags, 1166 1276 unsigned long fd, unsigned long pgoff);
+12 -1
include/uapi/asm-generic/bitsperlong.h
··· 2 2 #ifndef _UAPI__ASM_GENERIC_BITS_PER_LONG 3 3 #define _UAPI__ASM_GENERIC_BITS_PER_LONG 4 4 5 + #ifndef __BITS_PER_LONG 6 + /* 7 + * In order to keep safe and avoid regression, only unify uapi 8 + * bitsperlong.h for some archs which are using newer toolchains 9 + * that have the definitions of __CHAR_BIT__ and __SIZEOF_LONG__. 10 + * See the following link for more info: 11 + * https://lore.kernel.org/linux-arch/b9624545-2c80-49a1-ac3c-39264a591f7b@app.fastmail.com/ 12 + */ 13 + #if defined(__CHAR_BIT__) && defined(__SIZEOF_LONG__) 14 + #define __BITS_PER_LONG (__CHAR_BIT__ * __SIZEOF_LONG__) 15 + #else 5 16 /* 6 17 * There seems to be no way of detecting this automatically from user 7 18 * space, so 64 bit architectures should override this in their ··· 20 9 * both 32 and 64 bit user space must not rely on CONFIG_64BIT 21 10 * to decide it, but rather check a compiler provided macro. 22 11 */ 23 - #ifndef __BITS_PER_LONG 24 12 #define __BITS_PER_LONG 32 13 + #endif 25 14 #endif 26 15 27 16 #endif /* _UAPI__ASM_GENERIC_BITS_PER_LONG */
+30 -99
include/uapi/asm-generic/unistd.h
··· 38 38 __SC_COMP(__NR_io_submit, sys_io_submit, compat_sys_io_submit) 39 39 #define __NR_io_cancel 3 40 40 __SYSCALL(__NR_io_cancel, sys_io_cancel) 41 + 41 42 #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 42 43 #define __NR_io_getevents 4 43 44 __SC_3264(__NR_io_getevents, sys_io_getevents_time32, sys_io_getevents) 44 45 #endif 45 46 46 - /* fs/xattr.c */ 47 47 #define __NR_setxattr 5 48 48 __SYSCALL(__NR_setxattr, sys_setxattr) 49 49 #define __NR_lsetxattr 6 ··· 68 68 __SYSCALL(__NR_lremovexattr, sys_lremovexattr) 69 69 #define __NR_fremovexattr 16 70 70 __SYSCALL(__NR_fremovexattr, sys_fremovexattr) 71 - 72 - /* fs/dcache.c */ 73 71 #define __NR_getcwd 17 74 72 __SYSCALL(__NR_getcwd, sys_getcwd) 75 - 76 - /* fs/cookies.c */ 77 73 #define __NR_lookup_dcookie 18 78 74 __SC_COMP(__NR_lookup_dcookie, sys_lookup_dcookie, compat_sys_lookup_dcookie) 79 - 80 - /* fs/eventfd.c */ 81 75 #define __NR_eventfd2 19 82 76 __SYSCALL(__NR_eventfd2, sys_eventfd2) 83 - 84 - /* fs/eventpoll.c */ 85 77 #define __NR_epoll_create1 20 86 78 __SYSCALL(__NR_epoll_create1, sys_epoll_create1) 87 79 #define __NR_epoll_ctl 21 88 80 __SYSCALL(__NR_epoll_ctl, sys_epoll_ctl) 89 81 #define __NR_epoll_pwait 22 90 82 __SC_COMP(__NR_epoll_pwait, sys_epoll_pwait, compat_sys_epoll_pwait) 91 - 92 - /* fs/fcntl.c */ 93 83 #define __NR_dup 23 94 84 __SYSCALL(__NR_dup, sys_dup) 95 85 #define __NR_dup3 24 96 86 __SYSCALL(__NR_dup3, sys_dup3) 97 87 #define __NR3264_fcntl 25 98 88 __SC_COMP_3264(__NR3264_fcntl, sys_fcntl64, sys_fcntl, compat_sys_fcntl64) 99 - 100 - /* fs/inotify_user.c */ 101 89 #define __NR_inotify_init1 26 102 90 __SYSCALL(__NR_inotify_init1, sys_inotify_init1) 103 91 #define __NR_inotify_add_watch 27 104 92 __SYSCALL(__NR_inotify_add_watch, sys_inotify_add_watch) 105 93 #define __NR_inotify_rm_watch 28 106 94 __SYSCALL(__NR_inotify_rm_watch, sys_inotify_rm_watch) 107 - 108 - /* fs/ioctl.c */ 109 95 #define __NR_ioctl 29 110 96 __SC_COMP(__NR_ioctl, sys_ioctl, compat_sys_ioctl) 111 - 112 - /* fs/ioprio.c */ 113 97 #define __NR_ioprio_set 30 114 98 __SYSCALL(__NR_ioprio_set, sys_ioprio_set) 115 99 #define __NR_ioprio_get 31 116 100 __SYSCALL(__NR_ioprio_get, sys_ioprio_get) 117 - 118 - /* fs/locks.c */ 119 101 #define __NR_flock 32 120 102 __SYSCALL(__NR_flock, sys_flock) 121 - 122 - /* fs/namei.c */ 123 103 #define __NR_mknodat 33 124 104 __SYSCALL(__NR_mknodat, sys_mknodat) 125 105 #define __NR_mkdirat 34 ··· 110 130 __SYSCALL(__NR_symlinkat, sys_symlinkat) 111 131 #define __NR_linkat 37 112 132 __SYSCALL(__NR_linkat, sys_linkat) 133 + 113 134 #ifdef __ARCH_WANT_RENAMEAT 114 135 /* renameat is superseded with flags by renameat2 */ 115 136 #define __NR_renameat 38 116 137 __SYSCALL(__NR_renameat, sys_renameat) 117 138 #endif /* __ARCH_WANT_RENAMEAT */ 118 139 119 - /* fs/namespace.c */ 120 140 #define __NR_umount2 39 121 141 __SYSCALL(__NR_umount2, sys_umount) 122 142 #define __NR_mount 40 123 143 __SYSCALL(__NR_mount, sys_mount) 124 144 #define __NR_pivot_root 41 125 145 __SYSCALL(__NR_pivot_root, sys_pivot_root) 126 - 127 - /* fs/nfsctl.c */ 128 146 #define __NR_nfsservctl 42 129 147 __SYSCALL(__NR_nfsservctl, sys_ni_syscall) 130 - 131 - /* fs/open.c */ 132 148 #define __NR3264_statfs 43 133 149 __SC_COMP_3264(__NR3264_statfs, sys_statfs64, sys_statfs, \ 134 150 compat_sys_statfs64) ··· 137 161 #define __NR3264_ftruncate 46 138 162 __SC_COMP_3264(__NR3264_ftruncate, sys_ftruncate64, sys_ftruncate, \ 139 163 compat_sys_ftruncate64) 140 - 141 164 #define __NR_fallocate 47 142 165 __SC_COMP(__NR_fallocate, sys_fallocate, compat_sys_fallocate) 143 166 #define __NR_faccessat 48 ··· 161 186 __SYSCALL(__NR_close, sys_close) 162 187 #define __NR_vhangup 58 163 188 __SYSCALL(__NR_vhangup, sys_vhangup) 164 - 165 - /* fs/pipe.c */ 166 189 #define __NR_pipe2 59 167 190 __SYSCALL(__NR_pipe2, sys_pipe2) 168 - 169 - /* fs/quota.c */ 170 191 #define __NR_quotactl 60 171 192 __SYSCALL(__NR_quotactl, sys_quotactl) 172 - 173 - /* fs/readdir.c */ 174 193 #define __NR_getdents64 61 175 194 __SYSCALL(__NR_getdents64, sys_getdents64) 176 - 177 - /* fs/read_write.c */ 178 195 #define __NR3264_lseek 62 179 196 __SC_3264(__NR3264_lseek, sys_llseek, sys_lseek) 180 197 #define __NR_read 63 ··· 185 218 __SC_COMP(__NR_preadv, sys_preadv, compat_sys_preadv) 186 219 #define __NR_pwritev 70 187 220 __SC_COMP(__NR_pwritev, sys_pwritev, compat_sys_pwritev) 188 - 189 - /* fs/sendfile.c */ 190 221 #define __NR3264_sendfile 71 191 222 __SYSCALL(__NR3264_sendfile, sys_sendfile64) 192 223 193 - /* fs/select.c */ 194 224 #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 195 225 #define __NR_pselect6 72 196 226 __SC_COMP_3264(__NR_pselect6, sys_pselect6_time32, sys_pselect6, compat_sys_pselect6_time32) ··· 195 231 __SC_COMP_3264(__NR_ppoll, sys_ppoll_time32, sys_ppoll, compat_sys_ppoll_time32) 196 232 #endif 197 233 198 - /* fs/signalfd.c */ 199 234 #define __NR_signalfd4 74 200 235 __SC_COMP(__NR_signalfd4, sys_signalfd4, compat_sys_signalfd4) 201 - 202 - /* fs/splice.c */ 203 236 #define __NR_vmsplice 75 204 237 __SYSCALL(__NR_vmsplice, sys_vmsplice) 205 238 #define __NR_splice 76 206 239 __SYSCALL(__NR_splice, sys_splice) 207 240 #define __NR_tee 77 208 241 __SYSCALL(__NR_tee, sys_tee) 209 - 210 - /* fs/stat.c */ 211 242 #define __NR_readlinkat 78 212 243 __SYSCALL(__NR_readlinkat, sys_readlinkat) 244 + 213 245 #if defined(__ARCH_WANT_NEW_STAT) || defined(__ARCH_WANT_STAT64) 214 246 #define __NR3264_fstatat 79 215 247 __SC_3264(__NR3264_fstatat, sys_fstatat64, sys_newfstatat) ··· 213 253 __SC_3264(__NR3264_fstat, sys_fstat64, sys_newfstat) 214 254 #endif 215 255 216 - /* fs/sync.c */ 217 256 #define __NR_sync 81 218 257 __SYSCALL(__NR_sync, sys_sync) 219 258 #define __NR_fsync 82 220 259 __SYSCALL(__NR_fsync, sys_fsync) 221 260 #define __NR_fdatasync 83 222 261 __SYSCALL(__NR_fdatasync, sys_fdatasync) 262 + 223 263 #ifdef __ARCH_WANT_SYNC_FILE_RANGE2 224 264 #define __NR_sync_file_range2 84 225 265 __SC_COMP(__NR_sync_file_range2, sys_sync_file_range2, \ ··· 230 270 compat_sys_sync_file_range) 231 271 #endif 232 272 233 - /* fs/timerfd.c */ 234 273 #define __NR_timerfd_create 85 235 274 __SYSCALL(__NR_timerfd_create, sys_timerfd_create) 275 + 236 276 #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 237 277 #define __NR_timerfd_settime 86 238 278 __SC_3264(__NR_timerfd_settime, sys_timerfd_settime32, \ ··· 242 282 sys_timerfd_gettime) 243 283 #endif 244 284 245 - /* fs/utimes.c */ 246 285 #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 247 286 #define __NR_utimensat 88 248 287 __SC_3264(__NR_utimensat, sys_utimensat_time32, sys_utimensat) 249 288 #endif 250 289 251 - /* kernel/acct.c */ 252 290 #define __NR_acct 89 253 291 __SYSCALL(__NR_acct, sys_acct) 254 - 255 - /* kernel/capability.c */ 256 292 #define __NR_capget 90 257 293 __SYSCALL(__NR_capget, sys_capget) 258 294 #define __NR_capset 91 259 295 __SYSCALL(__NR_capset, sys_capset) 260 - 261 - /* kernel/exec_domain.c */ 262 296 #define __NR_personality 92 263 297 __SYSCALL(__NR_personality, sys_personality) 264 - 265 - /* kernel/exit.c */ 266 298 #define __NR_exit 93 267 299 __SYSCALL(__NR_exit, sys_exit) 268 300 #define __NR_exit_group 94 269 301 __SYSCALL(__NR_exit_group, sys_exit_group) 270 302 #define __NR_waitid 95 271 303 __SC_COMP(__NR_waitid, sys_waitid, compat_sys_waitid) 272 - 273 - /* kernel/fork.c */ 274 304 #define __NR_set_tid_address 96 275 305 __SYSCALL(__NR_set_tid_address, sys_set_tid_address) 276 306 #define __NR_unshare 97 277 307 __SYSCALL(__NR_unshare, sys_unshare) 278 308 279 - /* kernel/futex.c */ 280 309 #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 281 310 #define __NR_futex 98 282 311 __SC_3264(__NR_futex, sys_futex_time32, sys_futex) 283 312 #endif 313 + 284 314 #define __NR_set_robust_list 99 285 315 __SC_COMP(__NR_set_robust_list, sys_set_robust_list, \ 286 316 compat_sys_set_robust_list) ··· 278 328 __SC_COMP(__NR_get_robust_list, sys_get_robust_list, \ 279 329 compat_sys_get_robust_list) 280 330 281 - /* kernel/hrtimer.c */ 282 331 #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 283 332 #define __NR_nanosleep 101 284 333 __SC_3264(__NR_nanosleep, sys_nanosleep_time32, sys_nanosleep) 285 334 #endif 286 335 287 - /* kernel/itimer.c */ 288 336 #define __NR_getitimer 102 289 337 __SC_COMP(__NR_getitimer, sys_getitimer, compat_sys_getitimer) 290 338 #define __NR_setitimer 103 291 339 __SC_COMP(__NR_setitimer, sys_setitimer, compat_sys_setitimer) 292 - 293 - /* kernel/kexec.c */ 294 340 #define __NR_kexec_load 104 295 341 __SC_COMP(__NR_kexec_load, sys_kexec_load, compat_sys_kexec_load) 296 - 297 - /* kernel/module.c */ 298 342 #define __NR_init_module 105 299 343 __SYSCALL(__NR_init_module, sys_init_module) 300 344 #define __NR_delete_module 106 301 345 __SYSCALL(__NR_delete_module, sys_delete_module) 302 - 303 - /* kernel/posix-timers.c */ 304 346 #define __NR_timer_create 107 305 347 __SC_COMP(__NR_timer_create, sys_timer_create, compat_sys_timer_create) 348 + 306 349 #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 307 350 #define __NR_timer_gettime 108 308 351 __SC_3264(__NR_timer_gettime, sys_timer_gettime32, sys_timer_gettime) 309 352 #endif 353 + 310 354 #define __NR_timer_getoverrun 109 311 355 __SYSCALL(__NR_timer_getoverrun, sys_timer_getoverrun) 356 + 312 357 #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 313 358 #define __NR_timer_settime 110 314 359 __SC_3264(__NR_timer_settime, sys_timer_settime32, sys_timer_settime) 315 360 #endif 361 + 316 362 #define __NR_timer_delete 111 317 363 __SYSCALL(__NR_timer_delete, sys_timer_delete) 364 + 318 365 #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 319 366 #define __NR_clock_settime 112 320 367 __SC_3264(__NR_clock_settime, sys_clock_settime32, sys_clock_settime) ··· 324 377 sys_clock_nanosleep) 325 378 #endif 326 379 327 - /* kernel/printk.c */ 328 380 #define __NR_syslog 116 329 381 __SYSCALL(__NR_syslog, sys_syslog) 330 - 331 - /* kernel/ptrace.c */ 332 382 #define __NR_ptrace 117 333 383 __SC_COMP(__NR_ptrace, sys_ptrace, compat_sys_ptrace) 334 - 335 - /* kernel/sched/core.c */ 336 384 #define __NR_sched_setparam 118 337 385 __SYSCALL(__NR_sched_setparam, sys_sched_setparam) 338 386 #define __NR_sched_setscheduler 119 ··· 348 406 __SYSCALL(__NR_sched_get_priority_max, sys_sched_get_priority_max) 349 407 #define __NR_sched_get_priority_min 126 350 408 __SYSCALL(__NR_sched_get_priority_min, sys_sched_get_priority_min) 409 + 351 410 #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 352 411 #define __NR_sched_rr_get_interval 127 353 412 __SC_3264(__NR_sched_rr_get_interval, sys_sched_rr_get_interval_time32, \ 354 413 sys_sched_rr_get_interval) 355 414 #endif 356 415 357 - /* kernel/signal.c */ 358 416 #define __NR_restart_syscall 128 359 417 __SYSCALL(__NR_restart_syscall, sys_restart_syscall) 360 418 #define __NR_kill 129 ··· 373 431 __SC_COMP(__NR_rt_sigprocmask, sys_rt_sigprocmask, compat_sys_rt_sigprocmask) 374 432 #define __NR_rt_sigpending 136 375 433 __SC_COMP(__NR_rt_sigpending, sys_rt_sigpending, compat_sys_rt_sigpending) 434 + 376 435 #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 377 436 #define __NR_rt_sigtimedwait 137 378 437 __SC_COMP_3264(__NR_rt_sigtimedwait, sys_rt_sigtimedwait_time32, \ 379 438 sys_rt_sigtimedwait, compat_sys_rt_sigtimedwait_time32) 380 439 #endif 440 + 381 441 #define __NR_rt_sigqueueinfo 138 382 442 __SC_COMP(__NR_rt_sigqueueinfo, sys_rt_sigqueueinfo, \ 383 443 compat_sys_rt_sigqueueinfo) 384 444 #define __NR_rt_sigreturn 139 385 445 __SC_COMP(__NR_rt_sigreturn, sys_rt_sigreturn, compat_sys_rt_sigreturn) 386 - 387 - /* kernel/sys.c */ 388 446 #define __NR_setpriority 140 389 447 __SYSCALL(__NR_setpriority, sys_setpriority) 390 448 #define __NR_getpriority 141 ··· 449 507 #define __NR_getcpu 168 450 508 __SYSCALL(__NR_getcpu, sys_getcpu) 451 509 452 - /* kernel/time.c */ 453 510 #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 454 511 #define __NR_gettimeofday 169 455 512 __SC_COMP(__NR_gettimeofday, sys_gettimeofday, compat_sys_gettimeofday) ··· 458 517 __SC_3264(__NR_adjtimex, sys_adjtimex_time32, sys_adjtimex) 459 518 #endif 460 519 461 - /* kernel/sys.c */ 462 520 #define __NR_getpid 172 463 521 __SYSCALL(__NR_getpid, sys_getpid) 464 522 #define __NR_getppid 173 ··· 474 534 __SYSCALL(__NR_gettid, sys_gettid) 475 535 #define __NR_sysinfo 179 476 536 __SC_COMP(__NR_sysinfo, sys_sysinfo, compat_sys_sysinfo) 477 - 478 - /* ipc/mqueue.c */ 479 537 #define __NR_mq_open 180 480 538 __SC_COMP(__NR_mq_open, sys_mq_open, compat_sys_mq_open) 481 539 #define __NR_mq_unlink 181 482 540 __SYSCALL(__NR_mq_unlink, sys_mq_unlink) 541 + 483 542 #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 484 543 #define __NR_mq_timedsend 182 485 544 __SC_3264(__NR_mq_timedsend, sys_mq_timedsend_time32, sys_mq_timedsend) ··· 486 547 __SC_3264(__NR_mq_timedreceive, sys_mq_timedreceive_time32, \ 487 548 sys_mq_timedreceive) 488 549 #endif 550 + 489 551 #define __NR_mq_notify 184 490 552 __SC_COMP(__NR_mq_notify, sys_mq_notify, compat_sys_mq_notify) 491 553 #define __NR_mq_getsetattr 185 492 554 __SC_COMP(__NR_mq_getsetattr, sys_mq_getsetattr, compat_sys_mq_getsetattr) 493 - 494 - /* ipc/msg.c */ 495 555 #define __NR_msgget 186 496 556 __SYSCALL(__NR_msgget, sys_msgget) 497 557 #define __NR_msgctl 187 ··· 499 561 __SC_COMP(__NR_msgrcv, sys_msgrcv, compat_sys_msgrcv) 500 562 #define __NR_msgsnd 189 501 563 __SC_COMP(__NR_msgsnd, sys_msgsnd, compat_sys_msgsnd) 502 - 503 - /* ipc/sem.c */ 504 564 #define __NR_semget 190 505 565 __SYSCALL(__NR_semget, sys_semget) 506 566 #define __NR_semctl 191 507 567 __SC_COMP(__NR_semctl, sys_semctl, compat_sys_semctl) 568 + 508 569 #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 509 570 #define __NR_semtimedop 192 510 571 __SC_3264(__NR_semtimedop, sys_semtimedop_time32, sys_semtimedop) 511 572 #endif 573 + 512 574 #define __NR_semop 193 513 575 __SYSCALL(__NR_semop, sys_semop) 514 - 515 - /* ipc/shm.c */ 516 576 #define __NR_shmget 194 517 577 __SYSCALL(__NR_shmget, sys_shmget) 518 578 #define __NR_shmctl 195 ··· 519 583 __SC_COMP(__NR_shmat, sys_shmat, compat_sys_shmat) 520 584 #define __NR_shmdt 197 521 585 __SYSCALL(__NR_shmdt, sys_shmdt) 522 - 523 - /* net/socket.c */ 524 586 #define __NR_socket 198 525 587 __SYSCALL(__NR_socket, sys_socket) 526 588 #define __NR_socketpair 199 ··· 549 615 __SC_COMP(__NR_sendmsg, sys_sendmsg, compat_sys_sendmsg) 550 616 #define __NR_recvmsg 212 551 617 __SC_COMP(__NR_recvmsg, sys_recvmsg, compat_sys_recvmsg) 552 - 553 - /* mm/filemap.c */ 554 618 #define __NR_readahead 213 555 619 __SC_COMP(__NR_readahead, sys_readahead, compat_sys_readahead) 556 - 557 - /* mm/nommu.c, also with MMU */ 558 620 #define __NR_brk 214 559 621 __SYSCALL(__NR_brk, sys_brk) 560 622 #define __NR_munmap 215 561 623 __SYSCALL(__NR_munmap, sys_munmap) 562 624 #define __NR_mremap 216 563 625 __SYSCALL(__NR_mremap, sys_mremap) 564 - 565 - /* security/keys/keyctl.c */ 566 626 #define __NR_add_key 217 567 627 __SYSCALL(__NR_add_key, sys_add_key) 568 628 #define __NR_request_key 218 569 629 __SYSCALL(__NR_request_key, sys_request_key) 570 630 #define __NR_keyctl 219 571 631 __SC_COMP(__NR_keyctl, sys_keyctl, compat_sys_keyctl) 572 - 573 - /* arch/example/kernel/sys_example.c */ 574 632 #define __NR_clone 220 575 633 __SYSCALL(__NR_clone, sys_clone) 576 634 #define __NR_execve 221 577 635 __SC_COMP(__NR_execve, sys_execve, compat_sys_execve) 578 - 579 636 #define __NR3264_mmap 222 580 637 __SC_3264(__NR3264_mmap, sys_mmap2, sys_mmap) 581 - /* mm/fadvise.c */ 582 638 #define __NR3264_fadvise64 223 583 639 __SC_COMP(__NR3264_fadvise64, sys_fadvise64_64, compat_sys_fadvise64_64) 584 640 585 - /* mm/, CONFIG_MMU only */ 641 + /* CONFIG_MMU only */ 586 642 #ifndef __ARCH_NOMMU 587 643 #define __NR_swapon 224 588 644 __SYSCALL(__NR_swapon, sys_swapon) ··· 615 691 __SYSCALL(__NR_perf_event_open, sys_perf_event_open) 616 692 #define __NR_accept4 242 617 693 __SYSCALL(__NR_accept4, sys_accept4) 694 + 618 695 #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 619 696 #define __NR_recvmmsg 243 620 697 __SC_COMP_3264(__NR_recvmmsg, sys_recvmmsg_time32, sys_recvmmsg, compat_sys_recvmmsg_time32) ··· 631 706 #define __NR_wait4 260 632 707 __SC_COMP(__NR_wait4, sys_wait4, compat_sys_wait4) 633 708 #endif 709 + 634 710 #define __NR_prlimit64 261 635 711 __SYSCALL(__NR_prlimit64, sys_prlimit64) 636 712 #define __NR_fanotify_init 262 ··· 642 716 __SYSCALL(__NR_name_to_handle_at, sys_name_to_handle_at) 643 717 #define __NR_open_by_handle_at 265 644 718 __SYSCALL(__NR_open_by_handle_at, sys_open_by_handle_at) 719 + 645 720 #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 646 721 #define __NR_clock_adjtime 266 647 722 __SC_3264(__NR_clock_adjtime, sys_clock_adjtime32, sys_clock_adjtime) 648 723 #endif 724 + 649 725 #define __NR_syncfs 267 650 726 __SYSCALL(__NR_syncfs, sys_syncfs) 651 727 #define __NR_setns 268 ··· 698 770 __SYSCALL(__NR_pkey_free, sys_pkey_free) 699 771 #define __NR_statx 291 700 772 __SYSCALL(__NR_statx, sys_statx) 773 + 701 774 #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 702 775 #define __NR_io_pgetevents 292 703 776 __SC_COMP_3264(__NR_io_pgetevents, sys_io_pgetevents_time32, sys_io_pgetevents, compat_sys_io_pgetevents) 704 777 #endif 778 + 705 779 #define __NR_rseq 293 706 780 __SYSCALL(__NR_rseq, sys_rseq) 707 781 #define __NR_kexec_file_load 294 708 782 __SYSCALL(__NR_kexec_file_load, sys_kexec_file_load) 783 + 709 784 /* 295 through 402 are unassigned to sync up with generic numbers, don't use */ 785 + 710 786 #if defined(__SYSCALL_COMPAT) || __BITS_PER_LONG == 32 711 787 #define __NR_clock_gettime64 403 712 788 __SYSCALL(__NR_clock_gettime64, sys_clock_gettime) ··· 776 844 __SYSCALL(__NR_fspick, sys_fspick) 777 845 #define __NR_pidfd_open 434 778 846 __SYSCALL(__NR_pidfd_open, sys_pidfd_open) 847 + 779 848 #ifdef __ARCH_WANT_SYS_CLONE3 780 849 #define __NR_clone3 435 781 850 __SYSCALL(__NR_clone3, sys_clone3) 782 851 #endif 852 + 783 853 #define __NR_close_range 436 784 854 __SYSCALL(__NR_close_range, sys_close_range) 785 - 786 855 #define __NR_openat2 437 787 856 __SYSCALL(__NR_openat2, sys_openat2) 788 857 #define __NR_pidfd_getfd 438 ··· 798 865 __SYSCALL(__NR_mount_setattr, sys_mount_setattr) 799 866 #define __NR_quotactl_fd 443 800 867 __SYSCALL(__NR_quotactl_fd, sys_quotactl_fd) 801 - 802 868 #define __NR_landlock_create_ruleset 444 803 869 __SYSCALL(__NR_landlock_create_ruleset, sys_landlock_create_ruleset) 804 870 #define __NR_landlock_add_rule 445 ··· 809 877 #define __NR_memfd_secret 447 810 878 __SYSCALL(__NR_memfd_secret, sys_memfd_secret) 811 879 #endif 880 + 812 881 #define __NR_process_mrelease 448 813 882 __SYSCALL(__NR_process_mrelease, sys_process_mrelease) 814 - 815 883 #define __NR_futex_waitv 449 816 884 __SYSCALL(__NR_futex_waitv, sys_futex_waitv) 817 - 818 885 #define __NR_set_mempolicy_home_node 450 819 886 __SYSCALL(__NR_set_mempolicy_home_node, sys_set_mempolicy_home_node) 820 887
+1 -109
kernel/sys_ni.c
··· 51 51 COND_SYSCALL(io_uring_setup); 52 52 COND_SYSCALL(io_uring_enter); 53 53 COND_SYSCALL(io_uring_register); 54 - 55 - /* fs/xattr.c */ 56 - 57 - /* fs/dcache.c */ 58 - 59 - /* fs/cookies.c */ 60 54 COND_SYSCALL(lookup_dcookie); 61 55 COND_SYSCALL_COMPAT(lookup_dcookie); 62 - 63 - /* fs/eventfd.c */ 64 56 COND_SYSCALL(eventfd2); 65 - 66 - /* fs/eventfd.c */ 67 57 COND_SYSCALL(epoll_create1); 68 58 COND_SYSCALL(epoll_ctl); 69 59 COND_SYSCALL(epoll_pwait); 70 60 COND_SYSCALL_COMPAT(epoll_pwait); 71 61 COND_SYSCALL(epoll_pwait2); 72 62 COND_SYSCALL_COMPAT(epoll_pwait2); 73 - 74 - /* fs/fcntl.c */ 75 - 76 - /* fs/inotify_user.c */ 77 63 COND_SYSCALL(inotify_init1); 78 64 COND_SYSCALL(inotify_add_watch); 79 65 COND_SYSCALL(inotify_rm_watch); 80 - 81 - /* fs/ioctl.c */ 82 - 83 - /* fs/ioprio.c */ 84 66 COND_SYSCALL(ioprio_set); 85 67 COND_SYSCALL(ioprio_get); 86 - 87 - /* fs/locks.c */ 88 68 COND_SYSCALL(flock); 89 - 90 - /* fs/namei.c */ 91 - 92 - /* fs/namespace.c */ 93 - 94 - /* fs/nfsctl.c */ 95 - 96 - /* fs/open.c */ 97 - 98 - /* fs/pipe.c */ 99 - 100 - /* fs/quota.c */ 101 69 COND_SYSCALL(quotactl); 102 70 COND_SYSCALL(quotactl_fd); 103 - 104 - /* fs/readdir.c */ 105 - 106 - /* fs/read_write.c */ 107 - 108 - /* fs/sendfile.c */ 109 - 110 - /* fs/select.c */ 111 - 112 - /* fs/signalfd.c */ 113 71 COND_SYSCALL(signalfd4); 114 72 COND_SYSCALL_COMPAT(signalfd4); 115 - 116 - /* fs/splice.c */ 117 - 118 - /* fs/stat.c */ 119 - 120 - /* fs/sync.c */ 121 - 122 - /* fs/timerfd.c */ 123 73 COND_SYSCALL(timerfd_create); 124 74 COND_SYSCALL(timerfd_settime); 125 75 COND_SYSCALL(timerfd_settime32); 126 76 COND_SYSCALL(timerfd_gettime); 127 77 COND_SYSCALL(timerfd_gettime32); 128 - 129 - /* fs/utimes.c */ 130 - 131 - /* kernel/acct.c */ 132 78 COND_SYSCALL(acct); 133 - 134 - /* kernel/capability.c */ 135 79 COND_SYSCALL(capget); 136 80 COND_SYSCALL(capset); 137 - 138 - /* kernel/exec_domain.c */ 139 - 140 - /* kernel/exit.c */ 141 - 142 - /* kernel/fork.c */ 143 81 /* __ARCH_WANT_SYS_CLONE3 */ 144 82 COND_SYSCALL(clone3); 145 - 146 - /* kernel/futex/syscalls.c */ 147 83 COND_SYSCALL(futex); 148 84 COND_SYSCALL(futex_time32); 149 85 COND_SYSCALL(set_robust_list); ··· 87 151 COND_SYSCALL(get_robust_list); 88 152 COND_SYSCALL_COMPAT(get_robust_list); 89 153 COND_SYSCALL(futex_waitv); 90 - 91 - /* kernel/hrtimer.c */ 92 - 93 - /* kernel/itimer.c */ 94 - 95 - /* kernel/kexec.c */ 96 154 COND_SYSCALL(kexec_load); 97 155 COND_SYSCALL_COMPAT(kexec_load); 98 - 99 - /* kernel/module.c */ 100 156 COND_SYSCALL(init_module); 101 157 COND_SYSCALL(delete_module); 102 - 103 - /* kernel/posix-timers.c */ 104 - 105 - /* kernel/printk.c */ 106 158 COND_SYSCALL(syslog); 107 - 108 - /* kernel/ptrace.c */ 109 - 110 - /* kernel/sched/core.c */ 111 - 112 - /* kernel/sys.c */ 113 159 COND_SYSCALL(setregid); 114 160 COND_SYSCALL(setgid); 115 161 COND_SYSCALL(setreuid); ··· 104 186 COND_SYSCALL(setfsgid); 105 187 COND_SYSCALL(setgroups); 106 188 COND_SYSCALL(getgroups); 107 - 108 - /* kernel/time.c */ 109 - 110 - /* kernel/timer.c */ 111 - 112 - /* ipc/mqueue.c */ 113 189 COND_SYSCALL(mq_open); 114 190 COND_SYSCALL_COMPAT(mq_open); 115 191 COND_SYSCALL(mq_unlink); ··· 115 203 COND_SYSCALL_COMPAT(mq_notify); 116 204 COND_SYSCALL(mq_getsetattr); 117 205 COND_SYSCALL_COMPAT(mq_getsetattr); 118 - 119 - /* ipc/msg.c */ 120 206 COND_SYSCALL(msgget); 121 207 COND_SYSCALL(old_msgctl); 122 208 COND_SYSCALL(msgctl); ··· 124 214 COND_SYSCALL_COMPAT(msgrcv); 125 215 COND_SYSCALL(msgsnd); 126 216 COND_SYSCALL_COMPAT(msgsnd); 127 - 128 - /* ipc/sem.c */ 129 217 COND_SYSCALL(semget); 130 218 COND_SYSCALL(old_semctl); 131 219 COND_SYSCALL(semctl); ··· 132 224 COND_SYSCALL(semtimedop); 133 225 COND_SYSCALL(semtimedop_time32); 134 226 COND_SYSCALL(semop); 135 - 136 - /* ipc/shm.c */ 137 227 COND_SYSCALL(shmget); 138 228 COND_SYSCALL(old_shmctl); 139 229 COND_SYSCALL(shmctl); ··· 140 234 COND_SYSCALL(shmat); 141 235 COND_SYSCALL_COMPAT(shmat); 142 236 COND_SYSCALL(shmdt); 143 - 144 - /* net/socket.c */ 145 237 COND_SYSCALL(socket); 146 238 COND_SYSCALL(socketpair); 147 239 COND_SYSCALL(bind); ··· 160 256 COND_SYSCALL_COMPAT(sendmsg); 161 257 COND_SYSCALL(recvmsg); 162 258 COND_SYSCALL_COMPAT(recvmsg); 163 - 164 - /* mm/filemap.c */ 165 - 166 - /* mm/nommu.c, also with MMU */ 167 259 COND_SYSCALL(mremap); 168 - 169 - /* security/keys/keyctl.c */ 170 260 COND_SYSCALL(add_key); 171 261 COND_SYSCALL(request_key); 172 262 COND_SYSCALL(keyctl); 173 263 COND_SYSCALL_COMPAT(keyctl); 174 - 175 - /* security/landlock/syscalls.c */ 176 264 COND_SYSCALL(landlock_create_ruleset); 177 265 COND_SYSCALL(landlock_add_rule); 178 266 COND_SYSCALL(landlock_restrict_self); 179 - 180 - /* arch/example/kernel/sys_example.c */ 181 - 182 - /* mm/fadvise.c */ 183 267 COND_SYSCALL(fadvise64_64); 184 268 COND_SYSCALL_COMPAT(fadvise64_64); 185 269 186 - /* mm/, CONFIG_MMU only */ 270 + /* CONFIG_MMU only */ 187 271 COND_SYSCALL(swapon); 188 272 COND_SYSCALL(swapoff); 189 273 COND_SYSCALL(mprotect);
+1 -1
lib/scatterlist.c
··· 1237 1237 if (is_vmalloc_or_module_addr((void *)kaddr)) 1238 1238 page = vmalloc_to_page((void *)kaddr); 1239 1239 else 1240 - page = virt_to_page(kaddr); 1240 + page = virt_to_page((void *)kaddr); 1241 1241 1242 1242 sg_set_page(sg, page, len, off); 1243 1243 sgtable->nents++;
-24
tools/arch/arm64/include/uapi/asm/bitsperlong.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 - /* 3 - * Copyright (C) 2012 ARM Ltd. 4 - * 5 - * This program is free software; you can redistribute it and/or modify 6 - * it under the terms of the GNU General Public License version 2 as 7 - * published by the Free Software Foundation. 8 - * 9 - * This program is distributed in the hope that it will be useful, 10 - * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 - * GNU General Public License for more details. 13 - * 14 - * You should have received a copy of the GNU General Public License 15 - * along with this program. If not, see <http://www.gnu.org/licenses/>. 16 - */ 17 - #ifndef __ASM_BITSPERLONG_H 18 - #define __ASM_BITSPERLONG_H 19 - 20 - #define __BITS_PER_LONG 64 21 - 22 - #include <asm-generic/bitsperlong.h> 23 - 24 - #endif /* __ASM_BITSPERLONG_H */
-27
tools/arch/hexagon/include/uapi/asm/bitsperlong.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 - /* 3 - * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. 4 - * 5 - * This program is free software; you can redistribute it and/or modify 6 - * it under the terms of the GNU General Public License version 2 and 7 - * only version 2 as published by the Free Software Foundation. 8 - * 9 - * This program is distributed in the hope that it will be useful, 10 - * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 - * GNU General Public License for more details. 13 - * 14 - * You should have received a copy of the GNU General Public License 15 - * along with this program; if not, write to the Free Software 16 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 17 - * 02110-1301, USA. 18 - */ 19 - 20 - #ifndef __ASM_HEXAGON_BITSPERLONG_H 21 - #define __ASM_HEXAGON_BITSPERLONG_H 22 - 23 - #define __BITS_PER_LONG 32 24 - 25 - #include <asm-generic/bitsperlong.h> 26 - 27 - #endif
-9
tools/arch/loongarch/include/uapi/asm/bitsperlong.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 - #ifndef __ASM_LOONGARCH_BITSPERLONG_H 3 - #define __ASM_LOONGARCH_BITSPERLONG_H 4 - 5 - #define __BITS_PER_LONG (__SIZEOF_LONG__ * 8) 6 - 7 - #include <asm-generic/bitsperlong.h> 8 - 9 - #endif /* __ASM_LOONGARCH_BITSPERLONG_H */
-2
tools/arch/microblaze/include/uapi/asm/bitsperlong.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 - #include <asm-generic/bitsperlong.h>
-14
tools/arch/riscv/include/uapi/asm/bitsperlong.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0-only */ 2 - /* 3 - * Copyright (C) 2012 ARM Ltd. 4 - * Copyright (C) 2015 Regents of the University of California 5 - */ 6 - 7 - #ifndef _UAPI_ASM_RISCV_BITSPERLONG_H 8 - #define _UAPI_ASM_RISCV_BITSPERLONG_H 9 - 10 - #define __BITS_PER_LONG (__SIZEOF_POINTER__ * 8) 11 - 12 - #include <asm-generic/bitsperlong.h> 13 - 14 - #endif /* _UAPI_ASM_RISCV_BITSPERLONG_H */
+13 -1
tools/include/uapi/asm-generic/bitsperlong.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 1 2 #ifndef _UAPI__ASM_GENERIC_BITS_PER_LONG 2 3 #define _UAPI__ASM_GENERIC_BITS_PER_LONG 3 4 5 + #ifndef __BITS_PER_LONG 6 + /* 7 + * In order to keep safe and avoid regression, only unify uapi 8 + * bitsperlong.h for some archs which are using newer toolchains 9 + * that have the definitions of __CHAR_BIT__ and __SIZEOF_LONG__. 10 + * See the following link for more info: 11 + * https://lore.kernel.org/linux-arch/b9624545-2c80-49a1-ac3c-39264a591f7b@app.fastmail.com/ 12 + */ 13 + #if defined(__CHAR_BIT__) && defined(__SIZEOF_LONG__) 14 + #define __BITS_PER_LONG (__CHAR_BIT__ * __SIZEOF_LONG__) 15 + #else 4 16 /* 5 17 * There seems to be no way of detecting this automatically from user 6 18 * space, so 64 bit architectures should override this in their ··· 20 8 * both 32 and 64 bit user space must not rely on CONFIG_64BIT 21 9 * to decide it, but rather check a compiler provided macro. 22 10 */ 23 - #ifndef __BITS_PER_LONG 24 11 #define __BITS_PER_LONG 32 12 + #endif 25 13 #endif 26 14 27 15 #endif /* _UAPI__ASM_GENERIC_BITS_PER_LONG */
+30 -99
tools/include/uapi/asm-generic/unistd.h
··· 38 38 __SC_COMP(__NR_io_submit, sys_io_submit, compat_sys_io_submit) 39 39 #define __NR_io_cancel 3 40 40 __SYSCALL(__NR_io_cancel, sys_io_cancel) 41 + 41 42 #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 42 43 #define __NR_io_getevents 4 43 44 __SC_3264(__NR_io_getevents, sys_io_getevents_time32, sys_io_getevents) 44 45 #endif 45 46 46 - /* fs/xattr.c */ 47 47 #define __NR_setxattr 5 48 48 __SYSCALL(__NR_setxattr, sys_setxattr) 49 49 #define __NR_lsetxattr 6 ··· 68 68 __SYSCALL(__NR_lremovexattr, sys_lremovexattr) 69 69 #define __NR_fremovexattr 16 70 70 __SYSCALL(__NR_fremovexattr, sys_fremovexattr) 71 - 72 - /* fs/dcache.c */ 73 71 #define __NR_getcwd 17 74 72 __SYSCALL(__NR_getcwd, sys_getcwd) 75 - 76 - /* fs/cookies.c */ 77 73 #define __NR_lookup_dcookie 18 78 74 __SC_COMP(__NR_lookup_dcookie, sys_lookup_dcookie, compat_sys_lookup_dcookie) 79 - 80 - /* fs/eventfd.c */ 81 75 #define __NR_eventfd2 19 82 76 __SYSCALL(__NR_eventfd2, sys_eventfd2) 83 - 84 - /* fs/eventpoll.c */ 85 77 #define __NR_epoll_create1 20 86 78 __SYSCALL(__NR_epoll_create1, sys_epoll_create1) 87 79 #define __NR_epoll_ctl 21 88 80 __SYSCALL(__NR_epoll_ctl, sys_epoll_ctl) 89 81 #define __NR_epoll_pwait 22 90 82 __SC_COMP(__NR_epoll_pwait, sys_epoll_pwait, compat_sys_epoll_pwait) 91 - 92 - /* fs/fcntl.c */ 93 83 #define __NR_dup 23 94 84 __SYSCALL(__NR_dup, sys_dup) 95 85 #define __NR_dup3 24 96 86 __SYSCALL(__NR_dup3, sys_dup3) 97 87 #define __NR3264_fcntl 25 98 88 __SC_COMP_3264(__NR3264_fcntl, sys_fcntl64, sys_fcntl, compat_sys_fcntl64) 99 - 100 - /* fs/inotify_user.c */ 101 89 #define __NR_inotify_init1 26 102 90 __SYSCALL(__NR_inotify_init1, sys_inotify_init1) 103 91 #define __NR_inotify_add_watch 27 104 92 __SYSCALL(__NR_inotify_add_watch, sys_inotify_add_watch) 105 93 #define __NR_inotify_rm_watch 28 106 94 __SYSCALL(__NR_inotify_rm_watch, sys_inotify_rm_watch) 107 - 108 - /* fs/ioctl.c */ 109 95 #define __NR_ioctl 29 110 96 __SC_COMP(__NR_ioctl, sys_ioctl, compat_sys_ioctl) 111 - 112 - /* fs/ioprio.c */ 113 97 #define __NR_ioprio_set 30 114 98 __SYSCALL(__NR_ioprio_set, sys_ioprio_set) 115 99 #define __NR_ioprio_get 31 116 100 __SYSCALL(__NR_ioprio_get, sys_ioprio_get) 117 - 118 - /* fs/locks.c */ 119 101 #define __NR_flock 32 120 102 __SYSCALL(__NR_flock, sys_flock) 121 - 122 - /* fs/namei.c */ 123 103 #define __NR_mknodat 33 124 104 __SYSCALL(__NR_mknodat, sys_mknodat) 125 105 #define __NR_mkdirat 34 ··· 110 130 __SYSCALL(__NR_symlinkat, sys_symlinkat) 111 131 #define __NR_linkat 37 112 132 __SYSCALL(__NR_linkat, sys_linkat) 133 + 113 134 #ifdef __ARCH_WANT_RENAMEAT 114 135 /* renameat is superseded with flags by renameat2 */ 115 136 #define __NR_renameat 38 116 137 __SYSCALL(__NR_renameat, sys_renameat) 117 138 #endif /* __ARCH_WANT_RENAMEAT */ 118 139 119 - /* fs/namespace.c */ 120 140 #define __NR_umount2 39 121 141 __SYSCALL(__NR_umount2, sys_umount) 122 142 #define __NR_mount 40 123 143 __SYSCALL(__NR_mount, sys_mount) 124 144 #define __NR_pivot_root 41 125 145 __SYSCALL(__NR_pivot_root, sys_pivot_root) 126 - 127 - /* fs/nfsctl.c */ 128 146 #define __NR_nfsservctl 42 129 147 __SYSCALL(__NR_nfsservctl, sys_ni_syscall) 130 - 131 - /* fs/open.c */ 132 148 #define __NR3264_statfs 43 133 149 __SC_COMP_3264(__NR3264_statfs, sys_statfs64, sys_statfs, \ 134 150 compat_sys_statfs64) ··· 137 161 #define __NR3264_ftruncate 46 138 162 __SC_COMP_3264(__NR3264_ftruncate, sys_ftruncate64, sys_ftruncate, \ 139 163 compat_sys_ftruncate64) 140 - 141 164 #define __NR_fallocate 47 142 165 __SC_COMP(__NR_fallocate, sys_fallocate, compat_sys_fallocate) 143 166 #define __NR_faccessat 48 ··· 161 186 __SYSCALL(__NR_close, sys_close) 162 187 #define __NR_vhangup 58 163 188 __SYSCALL(__NR_vhangup, sys_vhangup) 164 - 165 - /* fs/pipe.c */ 166 189 #define __NR_pipe2 59 167 190 __SYSCALL(__NR_pipe2, sys_pipe2) 168 - 169 - /* fs/quota.c */ 170 191 #define __NR_quotactl 60 171 192 __SYSCALL(__NR_quotactl, sys_quotactl) 172 - 173 - /* fs/readdir.c */ 174 193 #define __NR_getdents64 61 175 194 __SYSCALL(__NR_getdents64, sys_getdents64) 176 - 177 - /* fs/read_write.c */ 178 195 #define __NR3264_lseek 62 179 196 __SC_3264(__NR3264_lseek, sys_llseek, sys_lseek) 180 197 #define __NR_read 63 ··· 185 218 __SC_COMP(__NR_preadv, sys_preadv, compat_sys_preadv) 186 219 #define __NR_pwritev 70 187 220 __SC_COMP(__NR_pwritev, sys_pwritev, compat_sys_pwritev) 188 - 189 - /* fs/sendfile.c */ 190 221 #define __NR3264_sendfile 71 191 222 __SYSCALL(__NR3264_sendfile, sys_sendfile64) 192 223 193 - /* fs/select.c */ 194 224 #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 195 225 #define __NR_pselect6 72 196 226 __SC_COMP_3264(__NR_pselect6, sys_pselect6_time32, sys_pselect6, compat_sys_pselect6_time32) ··· 195 231 __SC_COMP_3264(__NR_ppoll, sys_ppoll_time32, sys_ppoll, compat_sys_ppoll_time32) 196 232 #endif 197 233 198 - /* fs/signalfd.c */ 199 234 #define __NR_signalfd4 74 200 235 __SC_COMP(__NR_signalfd4, sys_signalfd4, compat_sys_signalfd4) 201 - 202 - /* fs/splice.c */ 203 236 #define __NR_vmsplice 75 204 237 __SYSCALL(__NR_vmsplice, sys_vmsplice) 205 238 #define __NR_splice 76 206 239 __SYSCALL(__NR_splice, sys_splice) 207 240 #define __NR_tee 77 208 241 __SYSCALL(__NR_tee, sys_tee) 209 - 210 - /* fs/stat.c */ 211 242 #define __NR_readlinkat 78 212 243 __SYSCALL(__NR_readlinkat, sys_readlinkat) 244 + 213 245 #if defined(__ARCH_WANT_NEW_STAT) || defined(__ARCH_WANT_STAT64) 214 246 #define __NR3264_fstatat 79 215 247 __SC_3264(__NR3264_fstatat, sys_fstatat64, sys_newfstatat) ··· 213 253 __SC_3264(__NR3264_fstat, sys_fstat64, sys_newfstat) 214 254 #endif 215 255 216 - /* fs/sync.c */ 217 256 #define __NR_sync 81 218 257 __SYSCALL(__NR_sync, sys_sync) 219 258 #define __NR_fsync 82 220 259 __SYSCALL(__NR_fsync, sys_fsync) 221 260 #define __NR_fdatasync 83 222 261 __SYSCALL(__NR_fdatasync, sys_fdatasync) 262 + 223 263 #ifdef __ARCH_WANT_SYNC_FILE_RANGE2 224 264 #define __NR_sync_file_range2 84 225 265 __SC_COMP(__NR_sync_file_range2, sys_sync_file_range2, \ ··· 230 270 compat_sys_sync_file_range) 231 271 #endif 232 272 233 - /* fs/timerfd.c */ 234 273 #define __NR_timerfd_create 85 235 274 __SYSCALL(__NR_timerfd_create, sys_timerfd_create) 275 + 236 276 #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 237 277 #define __NR_timerfd_settime 86 238 278 __SC_3264(__NR_timerfd_settime, sys_timerfd_settime32, \ ··· 242 282 sys_timerfd_gettime) 243 283 #endif 244 284 245 - /* fs/utimes.c */ 246 285 #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 247 286 #define __NR_utimensat 88 248 287 __SC_3264(__NR_utimensat, sys_utimensat_time32, sys_utimensat) 249 288 #endif 250 289 251 - /* kernel/acct.c */ 252 290 #define __NR_acct 89 253 291 __SYSCALL(__NR_acct, sys_acct) 254 - 255 - /* kernel/capability.c */ 256 292 #define __NR_capget 90 257 293 __SYSCALL(__NR_capget, sys_capget) 258 294 #define __NR_capset 91 259 295 __SYSCALL(__NR_capset, sys_capset) 260 - 261 - /* kernel/exec_domain.c */ 262 296 #define __NR_personality 92 263 297 __SYSCALL(__NR_personality, sys_personality) 264 - 265 - /* kernel/exit.c */ 266 298 #define __NR_exit 93 267 299 __SYSCALL(__NR_exit, sys_exit) 268 300 #define __NR_exit_group 94 269 301 __SYSCALL(__NR_exit_group, sys_exit_group) 270 302 #define __NR_waitid 95 271 303 __SC_COMP(__NR_waitid, sys_waitid, compat_sys_waitid) 272 - 273 - /* kernel/fork.c */ 274 304 #define __NR_set_tid_address 96 275 305 __SYSCALL(__NR_set_tid_address, sys_set_tid_address) 276 306 #define __NR_unshare 97 277 307 __SYSCALL(__NR_unshare, sys_unshare) 278 308 279 - /* kernel/futex.c */ 280 309 #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 281 310 #define __NR_futex 98 282 311 __SC_3264(__NR_futex, sys_futex_time32, sys_futex) 283 312 #endif 313 + 284 314 #define __NR_set_robust_list 99 285 315 __SC_COMP(__NR_set_robust_list, sys_set_robust_list, \ 286 316 compat_sys_set_robust_list) ··· 278 328 __SC_COMP(__NR_get_robust_list, sys_get_robust_list, \ 279 329 compat_sys_get_robust_list) 280 330 281 - /* kernel/hrtimer.c */ 282 331 #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 283 332 #define __NR_nanosleep 101 284 333 __SC_3264(__NR_nanosleep, sys_nanosleep_time32, sys_nanosleep) 285 334 #endif 286 335 287 - /* kernel/itimer.c */ 288 336 #define __NR_getitimer 102 289 337 __SC_COMP(__NR_getitimer, sys_getitimer, compat_sys_getitimer) 290 338 #define __NR_setitimer 103 291 339 __SC_COMP(__NR_setitimer, sys_setitimer, compat_sys_setitimer) 292 - 293 - /* kernel/kexec.c */ 294 340 #define __NR_kexec_load 104 295 341 __SC_COMP(__NR_kexec_load, sys_kexec_load, compat_sys_kexec_load) 296 - 297 - /* kernel/module.c */ 298 342 #define __NR_init_module 105 299 343 __SYSCALL(__NR_init_module, sys_init_module) 300 344 #define __NR_delete_module 106 301 345 __SYSCALL(__NR_delete_module, sys_delete_module) 302 - 303 - /* kernel/posix-timers.c */ 304 346 #define __NR_timer_create 107 305 347 __SC_COMP(__NR_timer_create, sys_timer_create, compat_sys_timer_create) 348 + 306 349 #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 307 350 #define __NR_timer_gettime 108 308 351 __SC_3264(__NR_timer_gettime, sys_timer_gettime32, sys_timer_gettime) 309 352 #endif 353 + 310 354 #define __NR_timer_getoverrun 109 311 355 __SYSCALL(__NR_timer_getoverrun, sys_timer_getoverrun) 356 + 312 357 #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 313 358 #define __NR_timer_settime 110 314 359 __SC_3264(__NR_timer_settime, sys_timer_settime32, sys_timer_settime) 315 360 #endif 361 + 316 362 #define __NR_timer_delete 111 317 363 __SYSCALL(__NR_timer_delete, sys_timer_delete) 364 + 318 365 #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 319 366 #define __NR_clock_settime 112 320 367 __SC_3264(__NR_clock_settime, sys_clock_settime32, sys_clock_settime) ··· 324 377 sys_clock_nanosleep) 325 378 #endif 326 379 327 - /* kernel/printk.c */ 328 380 #define __NR_syslog 116 329 381 __SYSCALL(__NR_syslog, sys_syslog) 330 - 331 - /* kernel/ptrace.c */ 332 382 #define __NR_ptrace 117 333 383 __SC_COMP(__NR_ptrace, sys_ptrace, compat_sys_ptrace) 334 - 335 - /* kernel/sched/core.c */ 336 384 #define __NR_sched_setparam 118 337 385 __SYSCALL(__NR_sched_setparam, sys_sched_setparam) 338 386 #define __NR_sched_setscheduler 119 ··· 348 406 __SYSCALL(__NR_sched_get_priority_max, sys_sched_get_priority_max) 349 407 #define __NR_sched_get_priority_min 126 350 408 __SYSCALL(__NR_sched_get_priority_min, sys_sched_get_priority_min) 409 + 351 410 #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 352 411 #define __NR_sched_rr_get_interval 127 353 412 __SC_3264(__NR_sched_rr_get_interval, sys_sched_rr_get_interval_time32, \ 354 413 sys_sched_rr_get_interval) 355 414 #endif 356 415 357 - /* kernel/signal.c */ 358 416 #define __NR_restart_syscall 128 359 417 __SYSCALL(__NR_restart_syscall, sys_restart_syscall) 360 418 #define __NR_kill 129 ··· 373 431 __SC_COMP(__NR_rt_sigprocmask, sys_rt_sigprocmask, compat_sys_rt_sigprocmask) 374 432 #define __NR_rt_sigpending 136 375 433 __SC_COMP(__NR_rt_sigpending, sys_rt_sigpending, compat_sys_rt_sigpending) 434 + 376 435 #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 377 436 #define __NR_rt_sigtimedwait 137 378 437 __SC_COMP_3264(__NR_rt_sigtimedwait, sys_rt_sigtimedwait_time32, \ 379 438 sys_rt_sigtimedwait, compat_sys_rt_sigtimedwait_time32) 380 439 #endif 440 + 381 441 #define __NR_rt_sigqueueinfo 138 382 442 __SC_COMP(__NR_rt_sigqueueinfo, sys_rt_sigqueueinfo, \ 383 443 compat_sys_rt_sigqueueinfo) 384 444 #define __NR_rt_sigreturn 139 385 445 __SC_COMP(__NR_rt_sigreturn, sys_rt_sigreturn, compat_sys_rt_sigreturn) 386 - 387 - /* kernel/sys.c */ 388 446 #define __NR_setpriority 140 389 447 __SYSCALL(__NR_setpriority, sys_setpriority) 390 448 #define __NR_getpriority 141 ··· 449 507 #define __NR_getcpu 168 450 508 __SYSCALL(__NR_getcpu, sys_getcpu) 451 509 452 - /* kernel/time.c */ 453 510 #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 454 511 #define __NR_gettimeofday 169 455 512 __SC_COMP(__NR_gettimeofday, sys_gettimeofday, compat_sys_gettimeofday) ··· 458 517 __SC_3264(__NR_adjtimex, sys_adjtimex_time32, sys_adjtimex) 459 518 #endif 460 519 461 - /* kernel/sys.c */ 462 520 #define __NR_getpid 172 463 521 __SYSCALL(__NR_getpid, sys_getpid) 464 522 #define __NR_getppid 173 ··· 474 534 __SYSCALL(__NR_gettid, sys_gettid) 475 535 #define __NR_sysinfo 179 476 536 __SC_COMP(__NR_sysinfo, sys_sysinfo, compat_sys_sysinfo) 477 - 478 - /* ipc/mqueue.c */ 479 537 #define __NR_mq_open 180 480 538 __SC_COMP(__NR_mq_open, sys_mq_open, compat_sys_mq_open) 481 539 #define __NR_mq_unlink 181 482 540 __SYSCALL(__NR_mq_unlink, sys_mq_unlink) 541 + 483 542 #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 484 543 #define __NR_mq_timedsend 182 485 544 __SC_3264(__NR_mq_timedsend, sys_mq_timedsend_time32, sys_mq_timedsend) ··· 486 547 __SC_3264(__NR_mq_timedreceive, sys_mq_timedreceive_time32, \ 487 548 sys_mq_timedreceive) 488 549 #endif 550 + 489 551 #define __NR_mq_notify 184 490 552 __SC_COMP(__NR_mq_notify, sys_mq_notify, compat_sys_mq_notify) 491 553 #define __NR_mq_getsetattr 185 492 554 __SC_COMP(__NR_mq_getsetattr, sys_mq_getsetattr, compat_sys_mq_getsetattr) 493 - 494 - /* ipc/msg.c */ 495 555 #define __NR_msgget 186 496 556 __SYSCALL(__NR_msgget, sys_msgget) 497 557 #define __NR_msgctl 187 ··· 499 561 __SC_COMP(__NR_msgrcv, sys_msgrcv, compat_sys_msgrcv) 500 562 #define __NR_msgsnd 189 501 563 __SC_COMP(__NR_msgsnd, sys_msgsnd, compat_sys_msgsnd) 502 - 503 - /* ipc/sem.c */ 504 564 #define __NR_semget 190 505 565 __SYSCALL(__NR_semget, sys_semget) 506 566 #define __NR_semctl 191 507 567 __SC_COMP(__NR_semctl, sys_semctl, compat_sys_semctl) 568 + 508 569 #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 509 570 #define __NR_semtimedop 192 510 571 __SC_3264(__NR_semtimedop, sys_semtimedop_time32, sys_semtimedop) 511 572 #endif 573 + 512 574 #define __NR_semop 193 513 575 __SYSCALL(__NR_semop, sys_semop) 514 - 515 - /* ipc/shm.c */ 516 576 #define __NR_shmget 194 517 577 __SYSCALL(__NR_shmget, sys_shmget) 518 578 #define __NR_shmctl 195 ··· 519 583 __SC_COMP(__NR_shmat, sys_shmat, compat_sys_shmat) 520 584 #define __NR_shmdt 197 521 585 __SYSCALL(__NR_shmdt, sys_shmdt) 522 - 523 - /* net/socket.c */ 524 586 #define __NR_socket 198 525 587 __SYSCALL(__NR_socket, sys_socket) 526 588 #define __NR_socketpair 199 ··· 549 615 __SC_COMP(__NR_sendmsg, sys_sendmsg, compat_sys_sendmsg) 550 616 #define __NR_recvmsg 212 551 617 __SC_COMP(__NR_recvmsg, sys_recvmsg, compat_sys_recvmsg) 552 - 553 - /* mm/filemap.c */ 554 618 #define __NR_readahead 213 555 619 __SC_COMP(__NR_readahead, sys_readahead, compat_sys_readahead) 556 - 557 - /* mm/nommu.c, also with MMU */ 558 620 #define __NR_brk 214 559 621 __SYSCALL(__NR_brk, sys_brk) 560 622 #define __NR_munmap 215 561 623 __SYSCALL(__NR_munmap, sys_munmap) 562 624 #define __NR_mremap 216 563 625 __SYSCALL(__NR_mremap, sys_mremap) 564 - 565 - /* security/keys/keyctl.c */ 566 626 #define __NR_add_key 217 567 627 __SYSCALL(__NR_add_key, sys_add_key) 568 628 #define __NR_request_key 218 569 629 __SYSCALL(__NR_request_key, sys_request_key) 570 630 #define __NR_keyctl 219 571 631 __SC_COMP(__NR_keyctl, sys_keyctl, compat_sys_keyctl) 572 - 573 - /* arch/example/kernel/sys_example.c */ 574 632 #define __NR_clone 220 575 633 __SYSCALL(__NR_clone, sys_clone) 576 634 #define __NR_execve 221 577 635 __SC_COMP(__NR_execve, sys_execve, compat_sys_execve) 578 - 579 636 #define __NR3264_mmap 222 580 637 __SC_3264(__NR3264_mmap, sys_mmap2, sys_mmap) 581 - /* mm/fadvise.c */ 582 638 #define __NR3264_fadvise64 223 583 639 __SC_COMP(__NR3264_fadvise64, sys_fadvise64_64, compat_sys_fadvise64_64) 584 640 585 - /* mm/, CONFIG_MMU only */ 641 + /* CONFIG_MMU only */ 586 642 #ifndef __ARCH_NOMMU 587 643 #define __NR_swapon 224 588 644 __SYSCALL(__NR_swapon, sys_swapon) ··· 615 691 __SYSCALL(__NR_perf_event_open, sys_perf_event_open) 616 692 #define __NR_accept4 242 617 693 __SYSCALL(__NR_accept4, sys_accept4) 694 + 618 695 #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 619 696 #define __NR_recvmmsg 243 620 697 __SC_COMP_3264(__NR_recvmmsg, sys_recvmmsg_time32, sys_recvmmsg, compat_sys_recvmmsg_time32) ··· 631 706 #define __NR_wait4 260 632 707 __SC_COMP(__NR_wait4, sys_wait4, compat_sys_wait4) 633 708 #endif 709 + 634 710 #define __NR_prlimit64 261 635 711 __SYSCALL(__NR_prlimit64, sys_prlimit64) 636 712 #define __NR_fanotify_init 262 ··· 642 716 __SYSCALL(__NR_name_to_handle_at, sys_name_to_handle_at) 643 717 #define __NR_open_by_handle_at 265 644 718 __SYSCALL(__NR_open_by_handle_at, sys_open_by_handle_at) 719 + 645 720 #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 646 721 #define __NR_clock_adjtime 266 647 722 __SC_3264(__NR_clock_adjtime, sys_clock_adjtime32, sys_clock_adjtime) 648 723 #endif 724 + 649 725 #define __NR_syncfs 267 650 726 __SYSCALL(__NR_syncfs, sys_syncfs) 651 727 #define __NR_setns 268 ··· 698 770 __SYSCALL(__NR_pkey_free, sys_pkey_free) 699 771 #define __NR_statx 291 700 772 __SYSCALL(__NR_statx, sys_statx) 773 + 701 774 #if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 702 775 #define __NR_io_pgetevents 292 703 776 __SC_COMP_3264(__NR_io_pgetevents, sys_io_pgetevents_time32, sys_io_pgetevents, compat_sys_io_pgetevents) 704 777 #endif 778 + 705 779 #define __NR_rseq 293 706 780 __SYSCALL(__NR_rseq, sys_rseq) 707 781 #define __NR_kexec_file_load 294 708 782 __SYSCALL(__NR_kexec_file_load, sys_kexec_file_load) 783 + 709 784 /* 295 through 402 are unassigned to sync up with generic numbers, don't use */ 785 + 710 786 #if defined(__SYSCALL_COMPAT) || __BITS_PER_LONG == 32 711 787 #define __NR_clock_gettime64 403 712 788 __SYSCALL(__NR_clock_gettime64, sys_clock_gettime) ··· 776 844 __SYSCALL(__NR_fspick, sys_fspick) 777 845 #define __NR_pidfd_open 434 778 846 __SYSCALL(__NR_pidfd_open, sys_pidfd_open) 847 + 779 848 #ifdef __ARCH_WANT_SYS_CLONE3 780 849 #define __NR_clone3 435 781 850 __SYSCALL(__NR_clone3, sys_clone3) 782 851 #endif 852 + 783 853 #define __NR_close_range 436 784 854 __SYSCALL(__NR_close_range, sys_close_range) 785 - 786 855 #define __NR_openat2 437 787 856 __SYSCALL(__NR_openat2, sys_openat2) 788 857 #define __NR_pidfd_getfd 438 ··· 798 865 __SYSCALL(__NR_mount_setattr, sys_mount_setattr) 799 866 #define __NR_quotactl_fd 443 800 867 __SYSCALL(__NR_quotactl_fd, sys_quotactl_fd) 801 - 802 868 #define __NR_landlock_create_ruleset 444 803 869 __SYSCALL(__NR_landlock_create_ruleset, sys_landlock_create_ruleset) 804 870 #define __NR_landlock_add_rule 445 ··· 809 877 #define __NR_memfd_secret 447 810 878 __SYSCALL(__NR_memfd_secret, sys_memfd_secret) 811 879 #endif 880 + 812 881 #define __NR_process_mrelease 448 813 882 __SYSCALL(__NR_process_mrelease, sys_process_mrelease) 814 - 815 883 #define __NR_futex_waitv 449 816 884 __SYSCALL(__NR_futex_waitv, sys_futex_waitv) 817 - 818 885 #define __NR_set_mempolicy_home_node 450 819 886 __SYSCALL(__NR_set_mempolicy_home_node, sys_set_mempolicy_home_node) 820 887
-6
tools/include/uapi/asm/bitsperlong.h
··· 1 1 /* SPDX-License-Identifier: GPL-2.0 */ 2 2 #if defined(__i386__) || defined(__x86_64__) 3 3 #include "../../../arch/x86/include/uapi/asm/bitsperlong.h" 4 - #elif defined(__aarch64__) 5 - #include "../../../arch/arm64/include/uapi/asm/bitsperlong.h" 6 4 #elif defined(__powerpc__) 7 5 #include "../../../arch/powerpc/include/uapi/asm/bitsperlong.h" 8 6 #elif defined(__s390__) ··· 11 13 #include "../../../arch/mips/include/uapi/asm/bitsperlong.h" 12 14 #elif defined(__ia64__) 13 15 #include "../../../arch/ia64/include/uapi/asm/bitsperlong.h" 14 - #elif defined(__riscv) 15 - #include "../../../arch/riscv/include/uapi/asm/bitsperlong.h" 16 16 #elif defined(__alpha__) 17 17 #include "../../../arch/alpha/include/uapi/asm/bitsperlong.h" 18 - #elif defined(__loongarch__) 19 - #include "../../../arch/loongarch/include/uapi/asm/bitsperlong.h" 20 18 #else 21 19 #include <asm-generic/bitsperlong.h> 22 20 #endif