summaryrefslogtreecommitdiff
path: root/arch/openrisc/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2024-03-14 15:53:10 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2024-03-14 15:53:10 -0700
commit29da654bd20842d4c1e17c6d4dc1b12642ca16ac (patch)
tree644b9ead916c8814f1e87a059882a35504c9e127 /arch/openrisc/include
parent6d75c6f40a03c97e1ecd683ae54e249abb9d922b (diff)
parent7f1e2fc493480086fbb375f4f6d33cb93fc069d6 (diff)
downloadlinux-29da654bd20842d4c1e17c6d4dc1b12642ca16ac.tar.gz
linux-29da654bd20842d4c1e17c6d4dc1b12642ca16ac.tar.bz2
linux-29da654bd20842d4c1e17c6d4dc1b12642ca16ac.zip
Merge tag 'for-linus' of https://github.com/openrisc/linux
Pull OpenRISC updates from Stafford Horne: "Just a few cleanups and updates that were sent in: - Replace asm/fixmap.h with asm-generic version - Fix to move memblock setup up before it's used during init" * tag 'for-linus' of https://github.com/openrisc/linux: openrisc: Use asm-generic's version of fix_to_virt() & virt_to_fix() openrisc: Call setup_memory() earlier in the init sequence
Diffstat (limited to 'arch/openrisc/include')
-rw-r--r--arch/openrisc/include/asm/fixmap.h31
1 files changed, 1 insertions, 30 deletions
diff --git a/arch/openrisc/include/asm/fixmap.h b/arch/openrisc/include/asm/fixmap.h
index ad78e50b7ba3..ecdb98a5839f 100644
--- a/arch/openrisc/include/asm/fixmap.h
+++ b/arch/openrisc/include/asm/fixmap.h
@@ -50,35 +50,6 @@ enum fixed_addresses {
/* FIXADDR_BOTTOM might be a better name here... */
#define FIXADDR_START (FIXADDR_TOP - FIXADDR_SIZE)
-#define __fix_to_virt(x) (FIXADDR_TOP - ((x) << PAGE_SHIFT))
-#define __virt_to_fix(x) ((FIXADDR_TOP - ((x)&PAGE_MASK)) >> PAGE_SHIFT)
-
-/*
- * 'index to address' translation. If anyone tries to use the idx
- * directly without tranlation, we catch the bug with a NULL-deference
- * kernel oops. Illegal ranges of incoming indices are caught too.
- */
-static __always_inline unsigned long fix_to_virt(const unsigned int idx)
-{
- /*
- * this branch gets completely eliminated after inlining,
- * except when someone tries to use fixaddr indices in an
- * illegal way. (such as mixing up address types or using
- * out-of-range indices).
- *
- * If it doesn't get removed, the linker will complain
- * loudly with a reasonably clear error message..
- */
- if (idx >= __end_of_fixed_addresses)
- BUG();
-
- return __fix_to_virt(idx);
-}
-
-static inline unsigned long virt_to_fix(const unsigned long vaddr)
-{
- BUG_ON(vaddr >= FIXADDR_TOP || vaddr < FIXADDR_START);
- return __virt_to_fix(vaddr);
-}
+#include <asm-generic/fixmap.h>
#endif