sgx.h (e7e0545299d8cb0fd6fe3ba50401b7f5c3937362) sgx.h (d2285493bef310b66b56dfe4eb75c1e2f431ea5c)
1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef _X86_SGX_H
3#define _X86_SGX_H
4
5#include <linux/bitops.h>
6#include <linux/err.h>
7#include <linux/io.h>
8#include <linux/rwsem.h>

--- 43 unchanged lines hidden (view full) ---

52 struct sgx_epc_section *section = &sgx_epc_sections[page->section];
53 unsigned long index;
54
55 index = ((unsigned long)page - (unsigned long)section->pages) / sizeof(*page);
56
57 return section->virt_addr + index * PAGE_SIZE;
58}
59
1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef _X86_SGX_H
3#define _X86_SGX_H
4
5#include <linux/bitops.h>
6#include <linux/err.h>
7#include <linux/io.h>
8#include <linux/rwsem.h>

--- 43 unchanged lines hidden (view full) ---

52 struct sgx_epc_section *section = &sgx_epc_sections[page->section];
53 unsigned long index;
54
55 index = ((unsigned long)page - (unsigned long)section->pages) / sizeof(*page);
56
57 return section->virt_addr + index * PAGE_SIZE;
58}
59
60struct sgx_epc_page *__sgx_alloc_epc_page(void);
61void sgx_free_epc_page(struct sgx_epc_page *page);
62
60#endif /* _X86_SGX_H */
63#endif /* _X86_SGX_H */