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

TOMOYO Linux Cross Reference
Linux/tools/testing/selftests/arm64/fp/za-fork-asm.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-only
  2 // Copyright (C) 2021 ARM Limited.
  3 
  4 #include "sme-inst.h"
  5 
  6 .arch_extension sve
  7 
  8 #define MAGIC     42
  9 
 10 #define MAXVL     2048
 11 #define MAXVL_B   (MAXVL / 8)
 12 
 13 .pushsection .text
 14 .data
 15 .align 4
 16 scratch:
 17         .space  MAXVL_B
 18 .popsection
 19 
 20 .globl fork_test
 21 fork_test:
 22         smstart_za
 23 
 24         // For simplicity just set one word in one vector, other tests
 25         // cover general data corruption issues.
 26         ldr     x0, =scratch
 27         mov     x1, #MAGIC
 28         str     x1, [x0]
 29         mov     w12, wzr
 30         _ldr_za 12, 0                   // ZA.H[W12] loaded from [X0]
 31 
 32         // Tail call into the C portion that does the fork & verify
 33         b       fork_test_c
 34 
 35 .globl verify_fork
 36 verify_fork:
 37         // SVCR should have ZA=1, SM=0
 38         mrs     x0, S3_3_C4_C2_2
 39         and     x1, x0, #3
 40         cmp     x1, #2
 41         beq     1f
 42         mov     x0, xzr
 43         b       100f
 44 1:
 45 
 46         // ZA should still have the value we loaded
 47         ldr     x0, =scratch
 48         mov     w12, wzr
 49         _str_za 12, 0                   // ZA.H[W12] stored to [X0]
 50         ldr     x1, [x0]
 51         cmp     x1, #MAGIC
 52         beq     2f
 53         mov     x0, xzr
 54         b       100f
 55 
 56 2:
 57         // All tests passed
 58         mov     x0, #1
 59 100:
 60         ret
 61 

~ [ 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