File tree Expand file tree Collapse file tree 1 file changed +2
-24
lines changed Expand file tree Collapse file tree 1 file changed +2
-24
lines changed Original file line number Diff line number Diff line change 14
14
15
15
#include <asm/ptrace.h>
16
16
17
- /*
18
- * addr is a hint to the maximum userspace address that mmap should provide, so
19
- * this macro needs to return the largest address space available so that
20
- * mmap_end < addr, being mmap_end the top of that address space.
21
- * See Documentation/arch/riscv/vm-layout.rst for more details.
22
- */
23
17
#define arch_get_mmap_end (addr , len , flags ) \
24
18
({ \
25
- unsigned long mmap_end; \
26
- typeof(addr) _addr = (addr); \
27
- if ((_addr) == 0 || is_compat_task() || \
28
- ((_addr + len) > BIT(VA_BITS - 1))) \
29
- mmap_end = STACK_TOP_MAX; \
30
- else \
31
- mmap_end = (_addr + len); \
32
- mmap_end; \
19
+ STACK_TOP_MAX; \
33
20
})
34
21
35
22
#define arch_get_mmap_base (addr , base ) \
36
23
({ \
37
- unsigned long mmap_base; \
38
- typeof(addr) _addr = (addr); \
39
- typeof(base) _base = (base); \
40
- unsigned long rnd_gap = DEFAULT_MAP_WINDOW - (_base); \
41
- if ((_addr) == 0 || is_compat_task() || \
42
- ((_addr + len) > BIT(VA_BITS - 1))) \
43
- mmap_base = (_base); \
44
- else \
45
- mmap_base = (_addr + len) - rnd_gap; \
46
- mmap_base; \
24
+ base; \
47
25
})
48
26
49
27
#ifdef CONFIG_64BIT
You can’t perform that action at this time.
0 commit comments