lx_emul: shadow asm/cpufeature and asm/page_64

Issue #4450
This commit is contained in:
Alexander Boettcher 2022-02-08 16:47:35 +01:00 committed by Christian Helmuth
parent fd8df3a623
commit 279f038b9e
2 changed files with 32 additions and 0 deletions

View File

@ -7,7 +7,18 @@
#ifndef _ASM__CPUFEATURE_H_
#define _ASM__CPUFEATURE_H_
#include <asm/processor.h>
#if defined(__KERNEL__) && !defined(__ASSEMBLY__)
#include <asm/asm.h>
#include <linux/bitops.h>
#include <asm/alternative.h>
#define boot_cpu_has(bit) 0
#define static_cpu_has(bit) boot_cpu_has(bit)
#define cpu_has(value, bit) ( (void)value, 0 )
#endif /* defined(__KERNEL__) && !defined(__ASSEMBLY__) */
#endif

View File

@ -0,0 +1,21 @@
/*
* \brief Shadows Linux kernel asm/page_64.h
* \author Alexander Boettcher
* \date 2022-02-08
*/
/*
* Copyright (C) 2022 Genode Labs GmbH
*
* This file is distributed under the terms of the GNU General Public License
* version 2.
*/
#ifndef __ASM_PAGE_64_H
#define __ASM_PAGE_64_H
#define clear_page(page) __builtin_memset((page), 0, PAGE_SIZE)
void copy_page(void *to, void *from);
#endif /* __ASM_PAGE_64_H */