blob: fd2e166ea02ad953d6a502f08b254c5bfafff027 [file] [log] [blame]
Thomas Gleixner2874c5f2019-05-27 08:55:01 +02001/* SPDX-License-Identifier: GPL-2.0-or-later */
Ian Munsiee83d0162014-10-08 19:54:50 +11002/*
3 * Copyright 2014 IBM Corp.
Ian Munsiee83d0162014-10-08 19:54:50 +11004 */
5
6#ifndef _ASM_POWERPC_COPRO_H
7#define _ASM_POWERPC_COPRO_H
8
Souptick Joarder50a7ca32018-08-17 15:44:47 -07009#include <linux/mm_types.h>
10
Ian Munsie73d16a62014-10-08 19:54:51 +110011struct copro_slb
12{
13 u64 esid, vsid;
14};
15
Ian Munsiee83d0162014-10-08 19:54:50 +110016int copro_handle_mm_fault(struct mm_struct *mm, unsigned long ea,
Souptick Joarder50a7ca32018-08-17 15:44:47 -070017 unsigned long dsisr, vm_fault_t *flt);
Ian Munsiee83d0162014-10-08 19:54:50 +110018
Ian Munsie73d16a62014-10-08 19:54:51 +110019int copro_calculate_slb(struct mm_struct *mm, u64 ea, struct copro_slb *slb);
20
Ian Munsiebe3ebfe2014-10-08 19:54:52 +110021
22#ifdef CONFIG_PPC_COPRO_BASE
23void copro_flush_all_slbs(struct mm_struct *mm);
24#else
25static inline void copro_flush_all_slbs(struct mm_struct *mm) {}
26#endif
Ian Munsiee83d0162014-10-08 19:54:50 +110027#endif /* _ASM_POWERPC_COPRO_H */