Linux 5.7.6
[linux/fpc-iii.git] / arch / sparc / include / asm / adi_64.h
blob4301c6fd87f7acb32215e3650e3edd5a54ad1024
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /* adi_64.h: ADI related data structures
4 * Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
5 * Author: Khalid Aziz (khalid.aziz@oracle.com)
6 */
7 #ifndef __ASM_SPARC64_ADI_H
8 #define __ASM_SPARC64_ADI_H
10 #include <linux/types.h>
12 #ifndef __ASSEMBLY__
14 struct adi_caps {
15 __u64 blksz;
16 __u64 nbits;
17 __u64 ue_on_adi;
20 struct adi_config {
21 bool enabled;
22 struct adi_caps caps;
25 extern struct adi_config adi_state;
27 extern void mdesc_adi_init(void);
29 static inline bool adi_capable(void)
31 return adi_state.enabled;
34 static inline unsigned long adi_blksize(void)
36 return adi_state.caps.blksz;
39 static inline unsigned long adi_nbits(void)
41 return adi_state.caps.nbits;
44 #endif /* __ASSEMBLY__ */
46 #endif /* !(__ASM_SPARC64_ADI_H) */