David Daney | c52d0d3 | 2010-02-18 16:13:04 -0800 | [diff] [blame] | 1 | /* |
Alex Smith | ebb5e78 | 2015-10-21 09:54:38 +0100 | [diff] [blame^] | 2 | * Copyright (C) 2015 Imagination Technologies |
| 3 | * Author: Alex Smith <alex.smith@imgtec.com> |
David Daney | c52d0d3 | 2010-02-18 16:13:04 -0800 | [diff] [blame] | 4 | * |
Alex Smith | ebb5e78 | 2015-10-21 09:54:38 +0100 | [diff] [blame^] | 5 | * This program is free software; you can redistribute it and/or modify it |
| 6 | * under the terms of the GNU General Public License as published by the |
| 7 | * Free Software Foundation; either version 2 of the License, or (at your |
| 8 | * option) any later version. |
David Daney | c52d0d3 | 2010-02-18 16:13:04 -0800 | [diff] [blame] | 9 | */ |
| 10 | |
| 11 | #ifndef __ASM_VDSO_H |
| 12 | #define __ASM_VDSO_H |
| 13 | |
Alex Smith | ebb5e78 | 2015-10-21 09:54:38 +0100 | [diff] [blame^] | 14 | #include <linux/mm_types.h> |
David Daney | c52d0d3 | 2010-02-18 16:13:04 -0800 | [diff] [blame] | 15 | |
Alex Smith | ebb5e78 | 2015-10-21 09:54:38 +0100 | [diff] [blame^] | 16 | /** |
| 17 | * struct mips_vdso_image - Details of a VDSO image. |
| 18 | * @data: Pointer to VDSO image data (page-aligned). |
| 19 | * @size: Size of the VDSO image data (page-aligned). |
| 20 | * @off_sigreturn: Offset of the sigreturn() trampoline. |
| 21 | * @off_rt_sigreturn: Offset of the rt_sigreturn() trampoline. |
| 22 | * @mapping: Special mapping structure. |
| 23 | * |
| 24 | * This structure contains details of a VDSO image, including the image data |
| 25 | * and offsets of certain symbols required by the kernel. It is generated as |
| 26 | * part of the VDSO build process, aside from the mapping page array, which is |
| 27 | * populated at runtime. |
| 28 | */ |
| 29 | struct mips_vdso_image { |
| 30 | void *data; |
| 31 | unsigned long size; |
David Daney | c52d0d3 | 2010-02-18 16:13:04 -0800 | [diff] [blame] | 32 | |
Alex Smith | ebb5e78 | 2015-10-21 09:54:38 +0100 | [diff] [blame^] | 33 | unsigned long off_sigreturn; |
| 34 | unsigned long off_rt_sigreturn; |
| 35 | |
| 36 | struct vm_special_mapping mapping; |
David Daney | c52d0d3 | 2010-02-18 16:13:04 -0800 | [diff] [blame] | 37 | }; |
Alex Smith | ebb5e78 | 2015-10-21 09:54:38 +0100 | [diff] [blame^] | 38 | |
| 39 | /* |
| 40 | * The following structures are auto-generated as part of the build for each |
| 41 | * ABI by genvdso, see arch/mips/vdso/Makefile. |
| 42 | */ |
| 43 | |
| 44 | extern struct mips_vdso_image vdso_image; |
| 45 | |
| 46 | #ifdef CONFIG_MIPS32_O32 |
| 47 | extern struct mips_vdso_image vdso_image_o32; |
| 48 | #endif |
| 49 | |
| 50 | #ifdef CONFIG_MIPS32_N32 |
| 51 | extern struct mips_vdso_image vdso_image_n32; |
| 52 | #endif |
| 53 | |
| 54 | /** |
| 55 | * union mips_vdso_data - Data provided by the kernel for the VDSO. |
| 56 | * |
| 57 | * This structure contains data needed by functions within the VDSO. It is |
| 58 | * populated by the kernel and mapped read-only into user memory. |
| 59 | * |
| 60 | * Note: Care should be taken when modifying as the layout must remain the same |
| 61 | * for both 64- and 32-bit (for 32-bit userland on 64-bit kernel). |
| 62 | */ |
| 63 | union mips_vdso_data { |
| 64 | struct { |
| 65 | }; |
| 66 | |
| 67 | u8 page[PAGE_SIZE]; |
David Daney | c52d0d3 | 2010-02-18 16:13:04 -0800 | [diff] [blame] | 68 | }; |
David Daney | c52d0d3 | 2010-02-18 16:13:04 -0800 | [diff] [blame] | 69 | |
| 70 | #endif /* __ASM_VDSO_H */ |