summaryrefslogtreecommitdiff
path: root/arch/sparc/include/asm/uaccess_64.h
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2022-02-11 17:19:14 +0100
committerArnd Bergmann <arnd@arndb.de>2022-02-25 09:36:06 +0100
commita5ad837843b63d4f0d90b5cd74dc8bc25a291cfd (patch)
tree47e2d070e3cc549ab8c5cd43961f4630156a85d6 /arch/sparc/include/asm/uaccess_64.h
parent5a06fcb15b43d1f7bf740c672950122331cb5655 (diff)
sparc64: remove CONFIG_SET_FS support
sparc64 uses address space identifiers to differentiate between kernel and user space, using ASI_P for kernel threads but ASI_AIUS for normal user space, with the option of changing between them. As nothing really changes the ASI any more, just hardcode ASI_AIUS everywhere. Kernel threads are not allowed to access __user pointers anyway. Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/sparc/include/asm/uaccess_64.h')
-rw-r--r--arch/sparc/include/asm/uaccess_64.h20
1 files changed, 1 insertions, 19 deletions
diff --git a/arch/sparc/include/asm/uaccess_64.h b/arch/sparc/include/asm/uaccess_64.h
index 59b9a545df23..94266a5c5b04 100644
--- a/arch/sparc/include/asm/uaccess_64.h
+++ b/arch/sparc/include/asm/uaccess_64.h
@@ -12,33 +12,15 @@
#include <asm/spitfire.h>
#include <asm/processor.h>
+#include <asm-generic/access_ok.h>
/*
* Sparc64 is segmented, though more like the M68K than the I386.
* We use the secondary ASI to address user memory, which references a
* completely different VM map, thus there is zero chance of the user
* doing something queer and tricking us into poking kernel memory.
- *
- * What is left here is basically what is needed for the other parts of
- * the kernel that expect to be able to manipulate, erum, "segments".
- * Or perhaps more properly, permissions.
- *
- * "For historical reasons, these macros are grossly misnamed." -Linus
*/
-#define KERNEL_DS ((mm_segment_t) { ASI_P })
-#define USER_DS ((mm_segment_t) { ASI_AIUS }) /* har har har */
-
-#define get_fs() ((mm_segment_t){(current_thread_info()->current_ds)})
-
-#include <asm-generic/access_ok.h>
-
-#define set_fs(val) \
-do { \
- current_thread_info()->current_ds = (val).seg; \
- __asm__ __volatile__ ("wr %%g0, %0, %%asi" : : "r" ((val).seg)); \
-} while(0)
-
/*
* Test whether a block of memory is a valid user space address.
* Returns 0 if the range is valid, nonzero otherwise.