aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/include/asm/segment.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2020-08-11 18:33:44 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2020-08-12 10:57:58 -0700
commit428e2976a5bf7e7f5554286d7a5a33b8147b106a (patch)
tree6982bd8552b87714561fcbe73158176cbf481e61 /arch/sh/include/asm/segment.h
parentriscv: include <asm/pgtable.h> in <asm/uaccess.h> (diff)
downloadlinux-dev-428e2976a5bf7e7f5554286d7a5a33b8147b106a.tar.xz
linux-dev-428e2976a5bf7e7f5554286d7a5a33b8147b106a.zip
uaccess: remove segment_eq
segment_eq is only used to implement uaccess_kernel. Just open code uaccess_kernel in the arch uaccess headers and remove one layer of indirection. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Acked-by: Linus Torvalds <torvalds@linux-foundation.org> Acked-by: Greentime Hu <green.hu@gmail.com> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Nick Hu <nickhu@andestech.com> Cc: Vincent Chen <deanbo422@gmail.com> Cc: Paul Walmsley <paul.walmsley@sifive.com> Cc: Palmer Dabbelt <palmer@dabbelt.com> Link: http://lkml.kernel.org/r/20200710135706.537715-5-hch@lst.de Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to '')
-rw-r--r--arch/sh/include/asm/segment.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/sh/include/asm/segment.h b/arch/sh/include/asm/segment.h
index 33d1d28057cb..02e54a3335d6 100644
--- a/arch/sh/include/asm/segment.h
+++ b/arch/sh/include/asm/segment.h
@@ -24,8 +24,7 @@ typedef struct {
#define USER_DS KERNEL_DS
#endif
-#define segment_eq(a, b) ((a).seg == (b).seg)
-
+#define uaccess_kernel() (get_fs().seg == KERNEL_DS.seg)
#define get_fs() (current_thread_info()->addr_limit)
#define set_fs(x) (current_thread_info()->addr_limit = (x))