~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/powerpc/kernel/vdso/datapage.S

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0-or-later */
  2 /*
  3  * Access to the shared data page by the vDSO & syscall map
  4  *
  5  * Copyright (C) 2004 Benjamin Herrenschmuidt (benh@kernel.crashing.org), IBM Corp.
  6  */
  7 
  8 #include <asm/processor.h>
  9 #include <asm/ppc_asm.h>
 10 #include <asm/asm-offsets.h>
 11 #include <asm/unistd.h>
 12 #include <asm/vdso.h>
 13 #include <asm/vdso_datapage.h>
 14 
 15         .text
 16 
 17 /*
 18  * void *__kernel_get_syscall_map(unsigned int *syscall_count) ;
 19  *
 20  * returns a pointer to the syscall map. the map is agnostic to the
 21  * size of "long", unlike kernel bitops, it stores bits from top to
 22  * bottom so that memory actually contains a linear bitmap
 23  * check for syscall N by testing bit (0x80000000 >> (N & 0x1f)) of
 24  * 32 bits int at N >> 5.
 25  */
 26 V_FUNCTION_BEGIN(__kernel_get_syscall_map)
 27   .cfi_startproc
 28         mflr    r12
 29   .cfi_register lr,r12
 30         mr.     r4,r3
 31         get_realdatapage        r3, r11
 32         mtlr    r12
 33 #ifdef __powerpc64__
 34         addi    r3,r3,CFG_SYSCALL_MAP64
 35 #else
 36         addi    r3,r3,CFG_SYSCALL_MAP32
 37 #endif
 38         crclr   cr0*4+so
 39         beqlr
 40         li      r0,NR_syscalls
 41         stw     r0,0(r4)
 42         blr
 43   .cfi_endproc
 44 V_FUNCTION_END(__kernel_get_syscall_map)
 45 
 46 /*
 47  * void unsigned long long  __kernel_get_tbfreq(void);
 48  *
 49  * returns the timebase frequency in HZ
 50  */
 51 V_FUNCTION_BEGIN(__kernel_get_tbfreq)
 52   .cfi_startproc
 53         mflr    r12
 54   .cfi_register lr,r12
 55         get_realdatapage        r3, r11
 56 #ifndef __powerpc64__
 57         lwz     r4,(CFG_TB_TICKS_PER_SEC + 4)(r3)
 58 #endif
 59         PPC_LL  r3,CFG_TB_TICKS_PER_SEC(r3)
 60         mtlr    r12
 61         crclr   cr0*4+so
 62         blr
 63   .cfi_endproc
 64 V_FUNCTION_END(__kernel_get_tbfreq)

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php