HEX
Server: Apache/2.4.58 (Ubuntu)
System: Linux ip-172-26-0-120 6.17.0-1009-aws #9~24.04.2-Ubuntu SMP Fri Mar 6 23:50:29 UTC 2026 x86_64
User: ubuntu (1000)
PHP: 8.3.6
Disabled: NONE
Upload Files
File: //usr/src/linux-headers-7.0.0-1009-aws/arch/riscv/include/asm/mman.h
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __ASM_MMAN_H__
#define __ASM_MMAN_H__

#include <linux/compiler.h>
#include <linux/types.h>
#include <linux/mm.h>
#include <uapi/asm/mman.h>

static inline unsigned long arch_calc_vm_prot_bits(unsigned long prot,
						   unsigned long pkey __always_unused)
{
	unsigned long ret = 0;

	/*
	 * If PROT_WRITE was specified, force it to VM_READ | VM_WRITE.
	 * Only VM_WRITE means shadow stack.
	 */
	if (prot & PROT_WRITE)
		ret = (VM_READ | VM_WRITE);
	return ret;
}

#define arch_calc_vm_prot_bits(prot, pkey) arch_calc_vm_prot_bits(prot, pkey)

#endif /* ! __ASM_MMAN_H__ */