blob: db2d45be8f2ed314628bfa0ec1958221e6abf800 [file] [log] [blame]
David Daneyc52d0d32010-02-18 16:13:04 -08001/*
Alex Smithebb5e782015-10-21 09:54:38 +01002 * Copyright (C) 2015 Imagination Technologies
3 * Author: Alex Smith <alex.smith@imgtec.com>
David Daneyc52d0d32010-02-18 16:13:04 -08004 *
Alex Smithebb5e782015-10-21 09:54:38 +01005 * 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 Daneyc52d0d32010-02-18 16:13:04 -08009 */
10
11#ifndef __ASM_VDSO_H
12#define __ASM_VDSO_H
13
Alex Smithebb5e782015-10-21 09:54:38 +010014#include <linux/mm_types.h>
David Daneyc52d0d32010-02-18 16:13:04 -080015
Alex Smithebb5e782015-10-21 09:54:38 +010016/**
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 */
29struct mips_vdso_image {
30 void *data;
31 unsigned long size;
David Daneyc52d0d32010-02-18 16:13:04 -080032
Alex Smithebb5e782015-10-21 09:54:38 +010033 unsigned long off_sigreturn;
34 unsigned long off_rt_sigreturn;
35
36 struct vm_special_mapping mapping;
David Daneyc52d0d32010-02-18 16:13:04 -080037};
Alex Smithebb5e782015-10-21 09:54:38 +010038
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
44extern struct mips_vdso_image vdso_image;
45
46#ifdef CONFIG_MIPS32_O32
47extern struct mips_vdso_image vdso_image_o32;
48#endif
49
50#ifdef CONFIG_MIPS32_N32
51extern 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 */
63union mips_vdso_data {
64 struct {
65 };
66
67 u8 page[PAGE_SIZE];
David Daneyc52d0d32010-02-18 16:13:04 -080068};
David Daneyc52d0d32010-02-18 16:13:04 -080069
70#endif /* __ASM_VDSO_H */