/* * Copyright 2015, Cyril Bur, IBM Corp. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ #include "basic_asm.h" #include "gpr_asm.h" #include "fpu_asm.h" #include "vmx_asm.h" #include "vsx_asm.h" /* * Large caveat here being that the caller cannot expect the * signal to always be sent! The hardware can (AND WILL!) abort * the transaction between the tbegin and the tsuspend (however * unlikely it seems or infrequently it actually happens). * You have been warned. */ /* long tm_signal_self(pid_t pid, long *gprs, double *fps, vector *vms, vector *vss); */ FUNC_START(tm_signal_self_context_load) PUSH_BASIC_STACK(512) /* * Don't strictly need to save and restore as it depends on if * we're going to use them, however this reduces messy logic */ PUSH_VMX(STACK_FRAME_LOCAL(5,0),r8) PUSH_FPU(512) PUSH_NVREGS_BELOW_FPU(512) std r3, STACK_FRAME_PARAM(0)(sp) /* pid */ std r4, STACK_FRAME_PARAM(1)(sp) /* gps */ std r5, STACK_FRAME_PARAM(2)(sp) /* fps */ std r6, STACK_FRAME_PARAM(3)(sp) /* vms */ std r7, STACK_FRAME_PARAM(4)(sp) /* vss */ ld r3, STACK_FRAME_PARAM(1)(sp) cmpdi r3, 0 beq skip_gpr_lc bl load_gpr skip_gpr_lc: ld r3, STACK_FRAME_PARAM(2)(sp) cmpdi r3, 0 beq skip_fpu_lc bl load_fpu skip_fpu_lc: ld r3, STACK_FRAME_PARAM(3)(sp) cmpdi r3, 0 beq skip_vmx_lc bl load_vmx skip_vmx_lc: ld r3, STACK_FRAME_PARAM(4)(sp) cmpdi r3, 0 beq skip_vsx_lc bl load_vsx skip_vsx_lc: /* * Set r3 (return value) before tbegin. Use the pid as a known * 'all good' return value, zero is used to indicate a non-doomed * transaction. */ ld r3, STACK_FRAME_PARAM(0)(sp) tbegin. beq 1f tsuspend. /* Can't enter a syscall transactionally */ ld r3, STACK_FRAME_PARAM(1)(sp) cmpdi r3, 0 beq skip_gpr_lt /* Get the second half of the array */ addi r3, r3, 8 * 18 bl load_gpr skip_gpr_lt: ld r3, STACK_FRAME_PARAM(2)(sp) cmpdi r3, 0 beq skip_fpu_lt /* Get the second half of the array */ addi r3, r3, 8 * 18 bl load_fpu skip_fpu_lt: ld r3, STACK_FRAME_PARAM(3)(sp) cmpdi r3, 0 beq skip_vmx_lt /* Get the second half of the array */ addi r3, r3, 16 * 12 bl load_vmx skip_vmx_lt: ld r3, STACK_FRAME_PARAM(4)(sp) cmpdi r3, 0 beq skip_vsx_lt /* Get the second half of the array */ addi r3, r3, 16 * 12 bl load_vsx skip_vsx_lt: li r0, 37 /* sys_kill */ ld r3, STACK_FRAME_PARAM(0)(sp) /* pid */ li r4, 10 /* SIGUSR1 */ sc /* Taking the signal will doom the transaction */ tabort. 0 tresume. /* Be super sure we abort */ /* * This will cause us to resume doomed transaction and cause * hardware to cleanup, we'll end up at 1: anything between * tresume. and 1: shouldn't ever run. */ li r3, 0 1: POP_VMX(STACK_FRAME_LOCAL(5,0),r4) POP_FPU(512) POP_NVREGS_BELOW_FPU(512) POP_BASIC_STACK(512) blr FUNC_END(tm_signal_self_context_load) name='id' value='2fb78e89405f4321b86274a0c24b30896dd50529'/>
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-01-27 12:36:39 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2017-01-27 12:36:39 -0800
commit2fb78e89405f4321b86274a0c24b30896dd50529 (patch)
tree4de241e242441b80bd3f0022fc546bb07374571f /net/netlabel
parentdd3b9f25c867cb2507a45e436d6ede8eb08e7b05 (diff)
parentc14024dbb156c8392908aaa822097d27c6af8ec8 (diff)
Merge branch 'for-linus' of git://git.kernel.dk/linux-block
Pull block fixes from Jens Axboe: "A set of fixes for this series. This contains: - Set of fixes for the nvme target code - A revert of patch from this merge window, causing a regression with WRITE_SAME on iSCSI targets at least. - A fix for a use-after-free in the new O_DIRECT bdev code. - Two fixes for the xen-blkfront driver" * 'for-linus' of git://git.kernel.dk/linux-block: Revert "sd: remove __data_len hack for WRITE SAME" nvme-fc: use blk_rq_nr_phys_segments nvmet-rdma: Fix missing dma sync to nvme data structures nvmet: Call fatal_error from keep-alive timout expiration nvmet: cancel fatal error and flush async work before free controller nvmet: delete controllers deletion upon subsystem release nvmet_fc: correct logic in disconnect queue LS handling block: fix use after free in __blkdev_direct_IO xen-blkfront: correct maximum segment accounting xen-blkfront: feature flags handling adjustments
Diffstat (limited to 'net/netlabel')