mirror of
https://github.com/fail0verflow/switch-linux.git
synced 2025-05-04 02:34:21 -04:00
riscv: remove CONFIG_MMU ifdefs
The RISC-V port doesn't suport a nommu mode, so there is no reason to provide some code only under a CONFIG_MMU ifdef. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
This commit is contained in:
parent
9e49a4ed07
commit
c163fb38ca
4 changed files with 0 additions and 24 deletions
|
@ -21,8 +21,6 @@
|
||||||
|
|
||||||
#include <linux/types.h>
|
#include <linux/types.h>
|
||||||
|
|
||||||
#ifdef CONFIG_MMU
|
|
||||||
|
|
||||||
extern void __iomem *ioremap(phys_addr_t offset, unsigned long size);
|
extern void __iomem *ioremap(phys_addr_t offset, unsigned long size);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -36,8 +34,6 @@ extern void __iomem *ioremap(phys_addr_t offset, unsigned long size);
|
||||||
|
|
||||||
extern void iounmap(volatile void __iomem *addr);
|
extern void iounmap(volatile void __iomem *addr);
|
||||||
|
|
||||||
#endif /* CONFIG_MMU */
|
|
||||||
|
|
||||||
/* Generic IO read/write. These perform native-endian accesses. */
|
/* Generic IO read/write. These perform native-endian accesses. */
|
||||||
#define __raw_writeb __raw_writeb
|
#define __raw_writeb __raw_writeb
|
||||||
static inline void __raw_writeb(u8 val, volatile void __iomem *addr)
|
static inline void __raw_writeb(u8 val, volatile void __iomem *addr)
|
||||||
|
|
|
@ -20,8 +20,6 @@
|
||||||
|
|
||||||
#ifndef __ASSEMBLY__
|
#ifndef __ASSEMBLY__
|
||||||
|
|
||||||
#ifdef CONFIG_MMU
|
|
||||||
|
|
||||||
/* Page Upper Directory not used in RISC-V */
|
/* Page Upper Directory not used in RISC-V */
|
||||||
#include <asm-generic/pgtable-nopud.h>
|
#include <asm-generic/pgtable-nopud.h>
|
||||||
#include <asm/page.h>
|
#include <asm/page.h>
|
||||||
|
@ -413,8 +411,6 @@ static inline void pgtable_cache_init(void)
|
||||||
/* No page table caches to initialize */
|
/* No page table caches to initialize */
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_MMU */
|
|
||||||
|
|
||||||
#define VMALLOC_SIZE (KERN_VIRT_SIZE >> 1)
|
#define VMALLOC_SIZE (KERN_VIRT_SIZE >> 1)
|
||||||
#define VMALLOC_END (PAGE_OFFSET - 1)
|
#define VMALLOC_END (PAGE_OFFSET - 1)
|
||||||
#define VMALLOC_START (PAGE_OFFSET - VMALLOC_SIZE)
|
#define VMALLOC_START (PAGE_OFFSET - VMALLOC_SIZE)
|
||||||
|
|
|
@ -15,8 +15,6 @@
|
||||||
#ifndef _ASM_RISCV_TLBFLUSH_H
|
#ifndef _ASM_RISCV_TLBFLUSH_H
|
||||||
#define _ASM_RISCV_TLBFLUSH_H
|
#define _ASM_RISCV_TLBFLUSH_H
|
||||||
|
|
||||||
#ifdef CONFIG_MMU
|
|
||||||
|
|
||||||
#include <linux/mm_types.h>
|
#include <linux/mm_types.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -64,6 +62,4 @@ static inline void flush_tlb_kernel_range(unsigned long start,
|
||||||
flush_tlb_all();
|
flush_tlb_all();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_MMU */
|
|
||||||
|
|
||||||
#endif /* _ASM_RISCV_TLBFLUSH_H */
|
#endif /* _ASM_RISCV_TLBFLUSH_H */
|
||||||
|
|
|
@ -127,7 +127,6 @@ extern int fixup_exception(struct pt_regs *state);
|
||||||
* call.
|
* call.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef CONFIG_MMU
|
|
||||||
#define __get_user_asm(insn, x, ptr, err) \
|
#define __get_user_asm(insn, x, ptr, err) \
|
||||||
do { \
|
do { \
|
||||||
uintptr_t __tmp; \
|
uintptr_t __tmp; \
|
||||||
|
@ -153,13 +152,11 @@ do { \
|
||||||
__disable_user_access(); \
|
__disable_user_access(); \
|
||||||
(x) = __x; \
|
(x) = __x; \
|
||||||
} while (0)
|
} while (0)
|
||||||
#endif /* CONFIG_MMU */
|
|
||||||
|
|
||||||
#ifdef CONFIG_64BIT
|
#ifdef CONFIG_64BIT
|
||||||
#define __get_user_8(x, ptr, err) \
|
#define __get_user_8(x, ptr, err) \
|
||||||
__get_user_asm("ld", x, ptr, err)
|
__get_user_asm("ld", x, ptr, err)
|
||||||
#else /* !CONFIG_64BIT */
|
#else /* !CONFIG_64BIT */
|
||||||
#ifdef CONFIG_MMU
|
|
||||||
#define __get_user_8(x, ptr, err) \
|
#define __get_user_8(x, ptr, err) \
|
||||||
do { \
|
do { \
|
||||||
u32 __user *__ptr = (u32 __user *)(ptr); \
|
u32 __user *__ptr = (u32 __user *)(ptr); \
|
||||||
|
@ -193,7 +190,6 @@ do { \
|
||||||
(x) = (__typeof__(x))((__typeof__((x)-(x)))( \
|
(x) = (__typeof__(x))((__typeof__((x)-(x)))( \
|
||||||
(((u64)__hi << 32) | __lo))); \
|
(((u64)__hi << 32) | __lo))); \
|
||||||
} while (0)
|
} while (0)
|
||||||
#endif /* CONFIG_MMU */
|
|
||||||
#endif /* CONFIG_64BIT */
|
#endif /* CONFIG_64BIT */
|
||||||
|
|
||||||
|
|
||||||
|
@ -267,8 +263,6 @@ do { \
|
||||||
((x) = 0, -EFAULT); \
|
((x) = 0, -EFAULT); \
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
#ifdef CONFIG_MMU
|
|
||||||
#define __put_user_asm(insn, x, ptr, err) \
|
#define __put_user_asm(insn, x, ptr, err) \
|
||||||
do { \
|
do { \
|
||||||
uintptr_t __tmp; \
|
uintptr_t __tmp; \
|
||||||
|
@ -292,14 +286,11 @@ do { \
|
||||||
: "rJ" (__x), "i" (-EFAULT)); \
|
: "rJ" (__x), "i" (-EFAULT)); \
|
||||||
__disable_user_access(); \
|
__disable_user_access(); \
|
||||||
} while (0)
|
} while (0)
|
||||||
#endif /* CONFIG_MMU */
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef CONFIG_64BIT
|
#ifdef CONFIG_64BIT
|
||||||
#define __put_user_8(x, ptr, err) \
|
#define __put_user_8(x, ptr, err) \
|
||||||
__put_user_asm("sd", x, ptr, err)
|
__put_user_asm("sd", x, ptr, err)
|
||||||
#else /* !CONFIG_64BIT */
|
#else /* !CONFIG_64BIT */
|
||||||
#ifdef CONFIG_MMU
|
|
||||||
#define __put_user_8(x, ptr, err) \
|
#define __put_user_8(x, ptr, err) \
|
||||||
do { \
|
do { \
|
||||||
u32 __user *__ptr = (u32 __user *)(ptr); \
|
u32 __user *__ptr = (u32 __user *)(ptr); \
|
||||||
|
@ -329,7 +320,6 @@ do { \
|
||||||
: "rJ" (__x), "rJ" (__x >> 32), "i" (-EFAULT)); \
|
: "rJ" (__x), "rJ" (__x >> 32), "i" (-EFAULT)); \
|
||||||
__disable_user_access(); \
|
__disable_user_access(); \
|
||||||
} while (0)
|
} while (0)
|
||||||
#endif /* CONFIG_MMU */
|
|
||||||
#endif /* CONFIG_64BIT */
|
#endif /* CONFIG_64BIT */
|
||||||
|
|
||||||
|
|
||||||
|
@ -438,7 +428,6 @@ unsigned long __must_check clear_user(void __user *to, unsigned long n)
|
||||||
* will set "err" to -EFAULT, while successful accesses return the previous
|
* will set "err" to -EFAULT, while successful accesses return the previous
|
||||||
* value.
|
* value.
|
||||||
*/
|
*/
|
||||||
#ifdef CONFIG_MMU
|
|
||||||
#define __cmpxchg_user(ptr, old, new, err, size, lrb, scb) \
|
#define __cmpxchg_user(ptr, old, new, err, size, lrb, scb) \
|
||||||
({ \
|
({ \
|
||||||
__typeof__(ptr) __ptr = (ptr); \
|
__typeof__(ptr) __ptr = (ptr); \
|
||||||
|
@ -508,6 +497,5 @@ unsigned long __must_check clear_user(void __user *to, unsigned long n)
|
||||||
(err) = __err; \
|
(err) = __err; \
|
||||||
__ret; \
|
__ret; \
|
||||||
})
|
})
|
||||||
#endif /* CONFIG_MMU */
|
|
||||||
|
|
||||||
#endif /* _ASM_RISCV_UACCESS_H */
|
#endif /* _ASM_RISCV_UACCESS_H */
|
||||||
|
|
Loading…
Add table
Reference in a new issue