arm: vdso: add include file defining __get_datapage()
PATCH v5 2/12 arm: vdso: add include file defining __get_datapage()
Take an effort to recode the arm64 vdso code from assembler to C previously submitted by Andrew Pinski <[email protected]>, rework it for use in both arm and arm64, overlapping any optimizations for each architecture. But instead of landing it in arm64, land the result into lib/vdso and unify both implementations to simplify future maintenance.
Define the prototype for __get_datapage() in local datapage.h header. Rename all vdata variable that point to the datapage shortened to vd to relect a consistent and concise style. Make sure that all references to the datapage in vdso operations are readonly (const). Make sure datapage is first parameter to all subroutines to also be consistent.
v2:
- split first CL into 2 of 7 pieces
v4:
- update commit message to reflect overall reasoning
v5:
- rebase
--- arch/arm/vdso/datapage.h | 25 +++++++++++ arch/arm/vdso/vgettimeofday.c | 99 +++++++++++++++++++++---------------------- 2 files changed, 73 insertions(+), 51 deletions(-) create mode 100644 arch/arm/vdso/datapage.h
arch/arm/vdso/datapage.h new file +25 -0
@@ -0,0 +1,25 @@ +/* +* Userspace implementations of __get_datapage +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#ifndef __VDSO_DATAPAGE_H +#define __VDSO_DATAPAGE_H + +#include <linux/types.h> +#include <asm/vdso_datapage.h> + +extern const struct vdso_data *__get_datapage (void ); + +#endif /* __VDSO_DATAPAGE_H */
arch/arm/vdso/vgettimeofday.c +48 -51
234 lines not on this page · raw message
Signature · 1 line
2.15.0.403.gc27cc4dac6-goog