0002-RISC-V-Reserve-about-5K-space-in-mcontext_t-to-suppo.patch 1.0 KB

123456789101112131415161718192021222324252627282930
  1. From bcface37cf6df3f3b0800f79e4282a690122b0c8 Mon Sep 17 00:00:00 2001
  2. From: Vincent Chen <vincent.chen@sifive.com>
  3. Date: Mon, 13 Sep 2021 09:41:15 +0800
  4. Subject: [PATCH 2/8] RISC-V: Reserve about 5K space in mcontext_t to support
  5. future ISA expansion.
  6. Following the changes of struct sigcontext in Linux to reserve about 5K space
  7. to support future ISA expansion.
  8. Signed-off-by: max.ma <max.ma@starfivetech.com>
  9. ---
  10. sysdeps/unix/sysv/linux/riscv/sys/ucontext.h | 2 ++
  11. 1 file changed, 2 insertions(+)
  12. diff --git a/sysdeps/unix/sysv/linux/riscv/sys/ucontext.h b/sysdeps/unix/sysv/linux/riscv/sys/ucontext.h
  13. index cfafa44f99..80caf078fc 100644
  14. --- a/sysdeps/unix/sysv/linux/riscv/sys/ucontext.h
  15. +++ b/sysdeps/unix/sysv/linux/riscv/sys/ucontext.h
  16. @@ -82,6 +82,8 @@ typedef struct mcontext_t
  17. {
  18. __riscv_mc_gp_state __gregs;
  19. union __riscv_mc_fp_state __fpregs;
  20. + /* 5K + 256 reserved for vector state and future expansion. */
  21. + unsigned char __reserved[5376] __attribute__ ((__aligned__ (16)));
  22. } mcontext_t;
  23. /* Userlevel context. */
  24. --
  25. 2.33.1