xref: /kernel/linux/linux-5.10/arch/c6x/include/asm/flat.h
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /kernel/linux/linux-5.10/arch/c6x/include/asm/
18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
28c2ecf20Sopenharmony_ci#ifndef __ASM_C6X_FLAT_H
38c2ecf20Sopenharmony_ci#define __ASM_C6X_FLAT_H
48c2ecf20Sopenharmony_ci
58c2ecf20Sopenharmony_ci#include <asm/unaligned.h>
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_cistatic inline int flat_get_addr_from_rp(u32 __user *rp, u32 relval, u32 flags,
88c2ecf20Sopenharmony_ci					u32 *addr)
98c2ecf20Sopenharmony_ci{
108c2ecf20Sopenharmony_ci	*addr = get_unaligned((__force u32 *)rp);
118c2ecf20Sopenharmony_ci	return 0;
128c2ecf20Sopenharmony_ci}
138c2ecf20Sopenharmony_cistatic inline int flat_put_addr_at_rp(u32 __user *rp, u32 addr, u32 rel)
148c2ecf20Sopenharmony_ci{
158c2ecf20Sopenharmony_ci	put_unaligned(addr, (__force u32 *)rp);
168c2ecf20Sopenharmony_ci	return 0;
178c2ecf20Sopenharmony_ci}
188c2ecf20Sopenharmony_ci
198c2ecf20Sopenharmony_ci#endif /* __ASM_C6X_FLAT_H */
20

Indexes created Thu Nov 07 10:32:03 CST 2024