.. | .. |
---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-or-later */ |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright (C) 2016 Imagination Technologies |
---|
3 | 4 | * Author: Paul Burton <paul.burton@mips.com> |
---|
4 | | - * |
---|
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. |
---|
9 | 5 | */ |
---|
10 | 6 | |
---|
11 | 7 | #ifndef __MIPS_ASM_DSEMUL_H__ |
---|
.. | .. |
---|
52 | 48 | * |
---|
53 | 49 | * Return: True if an emulation frame was returned from, else false. |
---|
54 | 50 | */ |
---|
| 51 | +#ifdef CONFIG_MIPS_FP_SUPPORT |
---|
55 | 52 | extern bool do_dsemulret(struct pt_regs *xcp); |
---|
| 53 | +#else |
---|
| 54 | +static inline bool do_dsemulret(struct pt_regs *xcp) |
---|
| 55 | +{ |
---|
| 56 | + return false; |
---|
| 57 | +} |
---|
| 58 | +#endif |
---|
56 | 59 | |
---|
57 | 60 | /** |
---|
58 | 61 | * dsemul_thread_cleanup() - Cleanup thread 'emulation' frame |
---|
.. | .. |
---|
63 | 66 | * |
---|
64 | 67 | * Return: True if a frame was freed, else false. |
---|
65 | 68 | */ |
---|
| 69 | +#ifdef CONFIG_MIPS_FP_SUPPORT |
---|
66 | 70 | extern bool dsemul_thread_cleanup(struct task_struct *tsk); |
---|
67 | | - |
---|
| 71 | +#else |
---|
| 72 | +static inline bool dsemul_thread_cleanup(struct task_struct *tsk) |
---|
| 73 | +{ |
---|
| 74 | + return false; |
---|
| 75 | +} |
---|
| 76 | +#endif |
---|
68 | 77 | /** |
---|
69 | 78 | * dsemul_thread_rollback() - Rollback from an 'emulation' frame |
---|
70 | 79 | * @regs: User thread register context. |
---|
.. | .. |
---|
77 | 86 | * |
---|
78 | 87 | * Return: True if a frame was exited, else false. |
---|
79 | 88 | */ |
---|
| 89 | +#ifdef CONFIG_MIPS_FP_SUPPORT |
---|
80 | 90 | extern bool dsemul_thread_rollback(struct pt_regs *regs); |
---|
| 91 | +#else |
---|
| 92 | +static inline bool dsemul_thread_rollback(struct pt_regs *regs) |
---|
| 93 | +{ |
---|
| 94 | + return false; |
---|
| 95 | +} |
---|
| 96 | +#endif |
---|
81 | 97 | |
---|
82 | 98 | /** |
---|
83 | 99 | * dsemul_mm_cleanup() - Cleanup per-mm delay slot 'emulation' state |
---|
.. | .. |
---|
87 | 103 | * for delay slot 'emulation' book-keeping is freed. This is to be called |
---|
88 | 104 | * before @mm is freed in order to avoid memory leaks. |
---|
89 | 105 | */ |
---|
| 106 | +#ifdef CONFIG_MIPS_FP_SUPPORT |
---|
90 | 107 | extern void dsemul_mm_cleanup(struct mm_struct *mm); |
---|
| 108 | +#else |
---|
| 109 | +static inline void dsemul_mm_cleanup(struct mm_struct *mm) |
---|
| 110 | +{ |
---|
| 111 | + /* no-op */ |
---|
| 112 | +} |
---|
| 113 | +#endif |
---|
91 | 114 | |
---|
92 | 115 | #endif /* __MIPS_ASM_DSEMUL_H__ */ |
---|