mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 09:40:58 +07:00
asm-generic: optimize generic uaccess for 8-byte loads and stores
On 64-bit architectures we can also use the direct load/store trick for 8-byte values. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
parent
bd79f94758
commit
6edd1dbace
@ -24,6 +24,11 @@ raw_copy_from_user(void *to, const void __user * from, unsigned long n)
|
||||
case 4:
|
||||
*(u32 *)to = *(u32 __force *)from;
|
||||
return 0;
|
||||
#ifdef CONFIG_64BIT
|
||||
case 8:
|
||||
*(u64 *)to = *(u64 __force *)from;
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@ -45,6 +50,11 @@ raw_copy_to_user(void __user *to, const void *from, unsigned long n)
|
||||
case 4:
|
||||
*(u32 __force *)to = *(u32 *)from;
|
||||
return 0;
|
||||
#ifdef CONFIG_64BIT
|
||||
case 8:
|
||||
*(u64 __force *)to = *(u64 *)from;
|
||||
return 0;
|
||||
#endif
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user