2 * Copyright 2017 IBM Corp.
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version
7 * 2 of the License, or (at your option) any later version.
10 #ifndef _ASM_POWERNV_H
11 #define _ASM_POWERNV_H
13 #ifdef CONFIG_PPC_POWERNV
15 extern void powernv_set_nmmu_ptcr(unsigned long ptcr
);
16 extern struct npu_context
*pnv_npu2_init_context(struct pci_dev
*gpdev
,
18 struct npu_context
*(*cb
)(struct npu_context
*, void *),
20 extern void pnv_npu2_destroy_context(struct npu_context
*context
,
21 struct pci_dev
*gpdev
);
22 extern int pnv_npu2_handle_fault(struct npu_context
*context
, uintptr_t *ea
,
23 unsigned long *flags
, unsigned long *status
,
26 static inline void powernv_set_nmmu_ptcr(unsigned long ptcr
) { }
27 static inline struct npu_context
*pnv_npu2_init_context(struct pci_dev
*gpdev
,
29 struct npu_context
*(*cb
)(struct npu_context
*, void *),
30 void *priv
) { return ERR_PTR(-ENODEV
); }
31 static inline void pnv_npu2_destroy_context(struct npu_context
*context
,
32 struct pci_dev
*gpdev
) { }
34 static inline int pnv_npu2_handle_fault(struct npu_context
*context
,
35 uintptr_t *ea
, unsigned long *flags
,
36 unsigned long *status
, int count
) {
41 #endif /* _ASM_POWERNV_H */