blob: 0db0375235b48382d258406336b07d69d1e8ff9a [file] [log] [blame]
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00001/* SPDX-License-Identifier: GPL-2.0 */
2
3#include <asm/asm.h>
4#include <asm/export.h>
5#include <linux/linkage.h>
6
7/*
8 * unsigned long native_save_fl(void)
9 */
Olivier Deprez157378f2022-04-04 15:47:50 +020010SYM_FUNC_START(native_save_fl)
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000011 pushf
12 pop %_ASM_AX
13 ret
Olivier Deprez157378f2022-04-04 15:47:50 +020014SYM_FUNC_END(native_save_fl)
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000015EXPORT_SYMBOL(native_save_fl)
16
17/*
18 * void native_restore_fl(unsigned long flags)
19 * %eax/%rdi: flags
20 */
Olivier Deprez157378f2022-04-04 15:47:50 +020021SYM_FUNC_START(native_restore_fl)
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000022 push %_ASM_ARG1
23 popf
24 ret
Olivier Deprez157378f2022-04-04 15:47:50 +020025SYM_FUNC_END(native_restore_fl)
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000026EXPORT_SYMBOL(native_restore_fl)