^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) // SPDX-License-Identifier: GPL-2.0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) #include <linux/types.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) #include <linux/errno.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) #include <linux/uaccess.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) int
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) stfd(void *frS, void *ea)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) #if 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) #ifdef DEBUG
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) printk("%s: S %p, ea %p: ", __func__, frS, ea);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) dump_double(frS);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) printk("\n");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) if (copy_to_user(ea, frS, sizeof(double)))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) return -EFAULT;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) }