.. | .. |
---|
113 | 113 | unsigned long code_base = 0; |
---|
114 | 114 | unsigned long code_limit = 0; /* Initialized to stop compiler warnings */ |
---|
115 | 115 | struct desc_struct code_descriptor; |
---|
116 | | - struct fpu *fpu = ¤t->thread.fpu; |
---|
117 | | - |
---|
118 | | - fpu__initialize(fpu); |
---|
119 | 116 | |
---|
120 | 117 | #ifdef RE_ENTRANT_CHECKING |
---|
121 | 118 | if (emulating) { |
---|
.. | .. |
---|
692 | 689 | |
---|
693 | 690 | int fpregs_soft_get(struct task_struct *target, |
---|
694 | 691 | const struct user_regset *regset, |
---|
695 | | - unsigned int pos, unsigned int count, |
---|
696 | | - void *kbuf, void __user *ubuf) |
---|
| 692 | + struct membuf to) |
---|
697 | 693 | { |
---|
698 | 694 | struct swregs_state *s387 = &target->thread.fpu.state.soft; |
---|
699 | 695 | const void *space = s387->st_space; |
---|
700 | | - int ret; |
---|
701 | 696 | int offset = (S387->ftop & 7) * 10, other = 80 - offset; |
---|
702 | 697 | |
---|
703 | 698 | RE_ENTRANT_CHECK_OFF; |
---|
.. | .. |
---|
712 | 707 | S387->fos |= 0xffff0000; |
---|
713 | 708 | #endif /* PECULIAR_486 */ |
---|
714 | 709 | |
---|
715 | | - ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, s387, 0, |
---|
716 | | - offsetof(struct swregs_state, st_space)); |
---|
717 | | - |
---|
718 | | - /* Copy all registers in stack order. */ |
---|
719 | | - if (!ret) |
---|
720 | | - ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, |
---|
721 | | - space + offset, 0, other); |
---|
722 | | - if (!ret) |
---|
723 | | - ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, |
---|
724 | | - space, 0, offset); |
---|
| 710 | + membuf_write(&to, s387, offsetof(struct swregs_state, st_space)); |
---|
| 711 | + membuf_write(&to, space + offset, other); |
---|
| 712 | + membuf_write(&to, space, offset); |
---|
725 | 713 | |
---|
726 | 714 | RE_ENTRANT_CHECK_ON; |
---|
727 | 715 | |
---|
728 | | - return ret; |
---|
| 716 | + return 0; |
---|
729 | 717 | } |
---|