/* * thunks.S - assembly helpers for mixed-bitness code * Copyright (c) 2015 Andrew Lutomirski * * This program is free software; you can redistribute it and/or modify * it under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * These are little helpers that make it easier to switch bitness on * the fly. */ .text .global call32_from_64 .type call32_from_64, @function call32_from_64: // rdi: stack to use // esi: function to call // Save registers pushq %rbx pushq %rbp pushq %r12 pushq %r13 pushq %r14 pushq %r15 pushfq // Switch stacks mov %rsp,(%rdi) mov %rdi,%rsp // Switch to compatibility mode pushq $0x23 /* USER32_CS */ pushq $1f lretq 1: .code32 // Call the function call *%esi // Switch back to long mode jmp $0x33,$1f .code64 1: // Restore the stack mov (%rsp),%rsp // Restore registers popfq popq %r15 popq %r14 popq %r13 popq %r12 popq %rbp popq %rbx ret .size call32_from_64, .-call32_from_64 back net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
path: root/drivers/usb/storage/protocol.c
diff options
context:
space:
mode:
authorRicardo Ribalda <ricardo.ribalda@gmail.com>2017-02-02 20:15:16 +0100
committerWolfram Sang <wsa@the-dreams.de>2017-02-09 17:13:01 +0100
commitbbb27fc33d44e7b8d96369810654df4ee1837566 (patch)
treeb769e165ad52c0021054f1a048b62bd7e4fbec47 /drivers/usb/storage/protocol.c
parentf43128c75202f29ee71aa83e6c320a911137c189 (diff)
i2c: piix4: Request the SMBUS semaphore inside the mutex
SMBSLVCNT must be protected with the piix4_mutex_sb800 in order to avoid multiple buses accessing to the semaphore at the same time. Fixes: 701dc207bf55 ("i2c: piix4: Avoid race conditions with IMC") Reported-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/usb/storage/protocol.c')