Changes in 4.9.288 ALSA: seq: Fix a potential UAF by wrong private_free call order s390: fix strrchr() implementation xhci: Enable trust tx length quirk for Fresco FL11 USB controller cb710: avoid NULL pointer subtraction efi/cper: use stack buffer for error record decoding efi: Change down_interruptible() in virt_efi_reset_system() to down_trylock() Input: xpad - add support for another USB ID of Nacon GC-100 USB: serial: qcserial: add EM9191 QDL support USB: serial: option: add Telit LE910Cx composition 0x1204 nvmem: Fix shift-out-of-bound (UBSAN) with byte size cells iio: adc128s052: Fix the error handling path of 'adc128_probe()' iio: light: opt3001: Fixed timeout error when 0 lux iio: ssp_sensors: add more range checking in ssp_parse_dataframe() iio: ssp_sensors: fix error code in ssp_print_mcu_debug() net: arc: select CRC32 net: korina: select CRC32 net: encx24j600: check error in devm_regmap_init_encx24j600 ethernet: s2io: fix setting mac address during resume nfc: fix error handling of nfc_proto_register() NFC: digital: fix possible memory leak in digital_tg_listen_mdaa() NFC: digital: fix possible memory leak in digital_in_send_sdd_req() pata_legacy: fix a couple uninitialized variable bugs drm/msm: Fix null pointer dereference on pointer edp drm/msm/dsi: fix off by one in dsi_bus_clk_enable error handling r8152: select CRC32 and CRYPTO/CRYPTO_HASH/CRYPTO_SHA256 xtensa: xtfpga: use CONFIG_USE_OF instead of CONFIG_OF xtensa: xtfpga: Try software restart before simulating CPU reset NFSD: Keep existing listeners on portlist error netfilter: ipvs: make global sysctl readonly in non-init netns NIOS2: irqflags: rename a redefined register name can: rcar_can: fix suspend/resume can: peak_usb: pcan_usb_fd_decode_status(): fix back to ERROR_ACTIVE state notification can: peak_pci: peak_pci_remove(): fix UAF ocfs2: fix data corruption after conversion from inline format ocfs2: mount fails with buffer overflow in strlen elfcore: correct reference to CONFIG_UML vfs: check fd has read access in kernel_read_file_from_fd() ALSA: usb-audio: Provide quirk for Sennheiser GSP670 Headset ASoC: DAPM: Fix missing kctl change notifications nfc: nci: fix the UAF of rf_conn_info object isdn: cpai: check ctr->cnr to avoid array index out of bound netfilter: Kconfig: use 'default y' instead of 'm' for bool config option ARM: dts: spear3xx: Fix gmac node isdn: mISDN: Fix sleeping function called from invalid context platform/x86: intel_scu_ipc: Update timeout value in comment ALSA: hda: avoid write to STATESTS if controller is in reset net: mdiobus: Fix memory leak in __mdiobus_register tracing: Have all levels of checks prevent recursion ARM: 9122/1: select HAVE_FUTEX_CMPXCHG Linux 4.9.288 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: I8aaac774905fc04e20f969573f54832c3f18ad14
73 lines
1.8 KiB
C
73 lines
1.8 KiB
C
/*
|
|
* Copyright (C) 2010 Thomas Chou <thomas@wytron.com.tw>
|
|
*
|
|
* 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.
|
|
*
|
|
* This program is distributed in the hope that 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.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
*
|
|
*/
|
|
#ifndef _ASM_IRQFLAGS_H
|
|
#define _ASM_IRQFLAGS_H
|
|
|
|
#include <asm/registers.h>
|
|
|
|
static inline unsigned long arch_local_save_flags(void)
|
|
{
|
|
return RDCTL(CTL_FSTATUS);
|
|
}
|
|
|
|
/*
|
|
* This will restore ALL status register flags, not only the interrupt
|
|
* mask flag.
|
|
*/
|
|
static inline void arch_local_irq_restore(unsigned long flags)
|
|
{
|
|
WRCTL(CTL_FSTATUS, flags);
|
|
}
|
|
|
|
static inline void arch_local_irq_disable(void)
|
|
{
|
|
unsigned long flags;
|
|
|
|
flags = arch_local_save_flags();
|
|
arch_local_irq_restore(flags & ~STATUS_PIE);
|
|
}
|
|
|
|
static inline void arch_local_irq_enable(void)
|
|
{
|
|
unsigned long flags;
|
|
|
|
flags = arch_local_save_flags();
|
|
arch_local_irq_restore(flags | STATUS_PIE);
|
|
}
|
|
|
|
static inline int arch_irqs_disabled_flags(unsigned long flags)
|
|
{
|
|
return (flags & STATUS_PIE) == 0;
|
|
}
|
|
|
|
static inline int arch_irqs_disabled(void)
|
|
{
|
|
return arch_irqs_disabled_flags(arch_local_save_flags());
|
|
}
|
|
|
|
static inline unsigned long arch_local_irq_save(void)
|
|
{
|
|
unsigned long flags;
|
|
|
|
flags = arch_local_save_flags();
|
|
arch_local_irq_restore(flags & ~STATUS_PIE);
|
|
return flags;
|
|
}
|
|
|
|
#endif /* _ASM_IRQFLAGS_H */
|