mirror of
https://github.com/a52xq-dev/kernel.git
synced 2026-10-18 21:58:11 +07:00
Merge 4.19.133 into android-4.19-stable
Changes in 4.19.133 KVM: s390: reduce number of IO pins to 1 spi: spi-fsl-dspi: Adding shutdown hook spi: spi-fsl-dspi: Fix lockup if device is removed during SPI transfer spi: spi-fsl-dspi: use IRQF_SHARED mode to request IRQ spi: spi-fsl-dspi: Fix external abort on interrupt in resume or exit paths regmap: fix alignment issue ARM: dts: omap4-droid4: Fix spi configuration and increase rate drm/tegra: hub: Do not enable orphaned window group gpu: host1x: Detach driver on unregister spi: spidev: fix a race between spidev_release and spidev_remove spi: spidev: fix a potential use-after-free in spidev_release() ixgbe: protect ring accesses with READ- and WRITE_ONCE i40e: protect ring accesses with READ- and WRITE_ONCE drm: panel-orientation-quirks: Add quirk for Asus T101HA panel drm: panel-orientation-quirks: Use generic orientation-data for Acer S1003 s390/kasan: fix early pgm check handler execution cifs: update ctime and mtime during truncate ARM: imx6: add missing put_device() call in imx6q_suspend_init() scsi: mptscsih: Fix read sense data size usb: dwc3: pci: Fix reference count leak in dwc3_pci_resume_work block: release bip in a right way in error path nvme-rdma: assign completion vector correctly x86/entry: Increase entry_stack size to a full page net: qrtr: Fix an out of bounds read qrtr_endpoint_post() drm/mediatek: Check plane visibility in atomic_update net: cxgb4: fix return error value in t4_prep_fw smsc95xx: check return value of smsc95xx_reset smsc95xx: avoid memory leak in smsc95xx_bind net: hns3: fix use-after-free when doing self test ALSA: compress: fix partial_drain completion state arm64: kgdb: Fix single-step exception handling oops nbd: Fix memory leak in nbd_add_socket cxgb4: fix all-mask IP address comparison bnxt_en: fix NULL dereference in case SR-IOV configuration fails net: macb: mark device wake capable when "magic-packet" property present mlxsw: spectrum_router: Remove inappropriate usage of WARN_ON() ALSA: opl3: fix infoleak in opl3 ALSA: hda - let hs_mic be picked ahead of hp_mic ALSA: usb-audio: add quirk for MacroSilicon MS2109 KVM: arm64: Fix definition of PAGE_HYP_DEVICE KVM: arm64: Stop clobbering x0 for HVC_SOFT_RESTART KVM: x86: bit 8 of non-leaf PDPEs is not reserved KVM: x86: Inject #GP if guest attempts to toggle CR4.LA57 in 64-bit mode KVM: x86: Mark CR4.TSD as being possibly owned by the guest kallsyms: Refactor kallsyms_show_value() to take cred kernel: module: Use struct_size() helper module: Refactor section attr into bin attribute module: Do not expose section addresses to non-CAP_SYSLOG kprobes: Do not expose probe addresses to non-CAP_SYSLOG bpf: Check correct cred for CAP_SYSLOG in bpf_dump_raw_ok() Revert "ath9k: Fix general protection fault in ath9k_hif_usb_rx_cb" btrfs: fix fatal extent_buffer readahead vs releasepage race drm/radeon: fix double free dm: use noio when sending kobject event ARC: entry: fix potential EFA clobber when TIF_SYSCALL_TRACE ARC: elf: use right ELF_ARCH s390/mm: fix huge pte soft dirty copying Linux 4.19.133 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: I0a0198d501017d2bc701b653d75dc9cedd1ebbd9
This commit is contained in:
commit
588b1f9c92
57 changed files with 478 additions and 301 deletions
2
Makefile
2
Makefile
|
|
@ -1,7 +1,7 @@
|
|||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 4
|
||||
PATCHLEVEL = 19
|
||||
SUBLEVEL = 132
|
||||
SUBLEVEL = 133
|
||||
EXTRAVERSION =
|
||||
NAME = "People's Front"
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
#define R_ARC_32_PCREL 0x31
|
||||
|
||||
/*to set parameters in the core dumps */
|
||||
#define ELF_ARCH EM_ARCOMPACT
|
||||
#define ELF_ARCH EM_ARC_INUSE
|
||||
#define ELF_CLASS ELFCLASS32
|
||||
|
||||
#ifdef CONFIG_CPU_BIG_ENDIAN
|
||||
|
|
|
|||
|
|
@ -156,7 +156,6 @@ END(EV_Extension)
|
|||
tracesys:
|
||||
; save EFA in case tracer wants the PC of traced task
|
||||
; using ERET won't work since next-PC has already committed
|
||||
lr r12, [efa]
|
||||
GET_CURR_TASK_FIELD_PTR TASK_THREAD, r11
|
||||
st r12, [r11, THREAD_FAULT_ADDR] ; thread.fault_address
|
||||
|
||||
|
|
@ -199,15 +198,9 @@ tracesys_exit:
|
|||
; Breakpoint TRAP
|
||||
; ---------------------------------------------
|
||||
trap_with_param:
|
||||
|
||||
; stop_pc info by gdb needs this info
|
||||
lr r0, [efa]
|
||||
mov r0, r12 ; EFA in case ptracer/gdb wants stop_pc
|
||||
mov r1, sp
|
||||
|
||||
; Now that we have read EFA, it is safe to do "fake" rtie
|
||||
; and get out of CPU exception mode
|
||||
FAKE_RET_FROM_EXCPN
|
||||
|
||||
; Save callee regs in case gdb wants to have a look
|
||||
; SP will grow up by size of CALLEE Reg-File
|
||||
; NOTE: clobbers r12
|
||||
|
|
@ -234,6 +227,10 @@ ENTRY(EV_Trap)
|
|||
|
||||
EXCEPTION_PROLOGUE
|
||||
|
||||
lr r12, [efa]
|
||||
|
||||
FAKE_RET_FROM_EXCPN
|
||||
|
||||
;============ TRAP 1 :breakpoints
|
||||
; Check ECR for trap with arg (PROLOGUE ensures r9 has ECR)
|
||||
bmsk.f 0, r9, 7
|
||||
|
|
@ -241,9 +238,6 @@ ENTRY(EV_Trap)
|
|||
|
||||
;============ TRAP (no param): syscall top level
|
||||
|
||||
; First return from Exception to pure K mode (Exception/IRQs renabled)
|
||||
FAKE_RET_FROM_EXCPN
|
||||
|
||||
; If syscall tracing ongoing, invoke pre-post-hooks
|
||||
GET_CURR_THR_INFO_FLAGS r10
|
||||
btst r10, TIF_SYSCALL_TRACE
|
||||
|
|
|
|||
|
|
@ -16,8 +16,10 @@
|
|||
#interrupt-cells = <2>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
spi-max-frequency = <3000000>;
|
||||
spi-max-frequency = <9600000>;
|
||||
spi-cs-high;
|
||||
spi-cpol;
|
||||
spi-cpha;
|
||||
|
||||
cpcap_adc: adc {
|
||||
compatible = "motorola,mapphone-cpcap-adc";
|
||||
|
|
|
|||
|
|
@ -497,14 +497,14 @@ static int __init imx6q_suspend_init(const struct imx6_pm_socdata *socdata)
|
|||
if (!ocram_pool) {
|
||||
pr_warn("%s: ocram pool unavailable!\n", __func__);
|
||||
ret = -ENODEV;
|
||||
goto put_node;
|
||||
goto put_device;
|
||||
}
|
||||
|
||||
ocram_base = gen_pool_alloc(ocram_pool, MX6Q_SUSPEND_OCRAM_SIZE);
|
||||
if (!ocram_base) {
|
||||
pr_warn("%s: unable to alloc ocram!\n", __func__);
|
||||
ret = -ENOMEM;
|
||||
goto put_node;
|
||||
goto put_device;
|
||||
}
|
||||
|
||||
ocram_pbase = gen_pool_virt_to_phys(ocram_pool, ocram_base);
|
||||
|
|
@ -527,7 +527,7 @@ static int __init imx6q_suspend_init(const struct imx6_pm_socdata *socdata)
|
|||
ret = imx6_pm_get_base(&pm_info->mmdc_base, socdata->mmdc_compat);
|
||||
if (ret) {
|
||||
pr_warn("%s: failed to get mmdc base %d!\n", __func__, ret);
|
||||
goto put_node;
|
||||
goto put_device;
|
||||
}
|
||||
|
||||
ret = imx6_pm_get_base(&pm_info->src_base, socdata->src_compat);
|
||||
|
|
@ -574,7 +574,7 @@ static int __init imx6q_suspend_init(const struct imx6_pm_socdata *socdata)
|
|||
&imx6_suspend,
|
||||
MX6Q_SUSPEND_OCRAM_SIZE - sizeof(*pm_info));
|
||||
|
||||
goto put_node;
|
||||
goto put_device;
|
||||
|
||||
pl310_cache_map_failed:
|
||||
iounmap(pm_info->gpc_base.vbase);
|
||||
|
|
@ -584,6 +584,8 @@ iomuxc_map_failed:
|
|||
iounmap(pm_info->src_base.vbase);
|
||||
src_map_failed:
|
||||
iounmap(pm_info->mmdc_base.vbase);
|
||||
put_device:
|
||||
put_device(&pdev->dev);
|
||||
put_node:
|
||||
of_node_put(node);
|
||||
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@
|
|||
#define PAGE_HYP __pgprot(_HYP_PAGE_DEFAULT | PTE_HYP | PTE_HYP_XN)
|
||||
#define PAGE_HYP_EXEC __pgprot(_HYP_PAGE_DEFAULT | PTE_HYP | PTE_RDONLY)
|
||||
#define PAGE_HYP_RO __pgprot(_HYP_PAGE_DEFAULT | PTE_HYP | PTE_RDONLY | PTE_HYP_XN)
|
||||
#define PAGE_HYP_DEVICE __pgprot(PROT_DEVICE_nGnRE | PTE_HYP)
|
||||
#define PAGE_HYP_DEVICE __pgprot(_PROT_DEFAULT | PTE_ATTRINDX(MT_DEVICE_nGnRE) | PTE_HYP | PTE_HYP_XN)
|
||||
|
||||
#define PAGE_S2_MEMATTR(attr) \
|
||||
({ \
|
||||
|
|
|
|||
|
|
@ -269,7 +269,7 @@ static int kgdb_step_brk_fn(struct pt_regs *regs, unsigned int esr)
|
|||
if (user_mode(regs) || !kgdb_single_step)
|
||||
return DBG_HOOK_ERROR;
|
||||
|
||||
kgdb_handle_exception(1, SIGTRAP, 0, regs);
|
||||
kgdb_handle_exception(0, SIGTRAP, 0, regs);
|
||||
return DBG_HOOK_HANDLED;
|
||||
}
|
||||
NOKPROBE_SYMBOL(kgdb_step_brk_fn);
|
||||
|
|
|
|||
|
|
@ -144,11 +144,15 @@ ENTRY(__kvm_handle_stub_hvc)
|
|||
|
||||
1: cmp x0, #HVC_RESET_VECTORS
|
||||
b.ne 1f
|
||||
reset:
|
||||
|
||||
/*
|
||||
* Reset kvm back to the hyp stub. Do not clobber x0-x4 in
|
||||
* case we coming via HVC_SOFT_RESTART.
|
||||
* Set the HVC_RESET_VECTORS return code before entering the common
|
||||
* path so that we do not clobber x0-x2 in case we are coming via
|
||||
* HVC_SOFT_RESTART.
|
||||
*/
|
||||
mov x0, xzr
|
||||
reset:
|
||||
/* Reset kvm back to the hyp stub. */
|
||||
mrs x5, sctlr_el2
|
||||
ldr x6, =SCTLR_ELx_FLAGS
|
||||
bic x5, x5, x6 // Clear SCTL_M and etc
|
||||
|
|
@ -159,7 +163,6 @@ reset:
|
|||
/* Install stub vectors */
|
||||
adr_l x5, __hyp_stub_vectors
|
||||
msr vbar_el2, x5
|
||||
mov x0, xzr
|
||||
eret
|
||||
|
||||
1: /* Bad stub call */
|
||||
|
|
|
|||
|
|
@ -30,12 +30,12 @@
|
|||
#define KVM_USER_MEM_SLOTS 32
|
||||
|
||||
/*
|
||||
* These seem to be used for allocating ->chip in the routing table,
|
||||
* which we don't use. 4096 is an out-of-thin-air value. If we need
|
||||
* to look at ->chip later on, we'll need to revisit this.
|
||||
* These seem to be used for allocating ->chip in the routing table, which we
|
||||
* don't use. 1 is as small as we can get to reduce the needed memory. If we
|
||||
* need to look at ->chip later on, we'll need to revisit this.
|
||||
*/
|
||||
#define KVM_NR_IRQCHIPS 1
|
||||
#define KVM_IRQCHIP_NUM_PINS 4096
|
||||
#define KVM_IRQCHIP_NUM_PINS 1
|
||||
#define KVM_HALT_POLL_NS_DEFAULT 80000
|
||||
|
||||
/* s390-specific vcpu->requests bit members */
|
||||
|
|
|
|||
|
|
@ -155,6 +155,8 @@ static noinline __init void setup_lowcore_early(void)
|
|||
psw_t psw;
|
||||
|
||||
psw.mask = PSW_MASK_BASE | PSW_DEFAULT_KEY | PSW_MASK_EA | PSW_MASK_BA;
|
||||
if (IS_ENABLED(CONFIG_KASAN))
|
||||
psw.mask |= PSW_MASK_DAT;
|
||||
psw.addr = (unsigned long) s390_base_ext_handler;
|
||||
S390_lowcore.external_new_psw = psw;
|
||||
psw.addr = (unsigned long) s390_base_pgm_handler;
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ static inline pte_t __rste_to_pte(unsigned long rste)
|
|||
_PAGE_YOUNG);
|
||||
#ifdef CONFIG_MEM_SOFT_DIRTY
|
||||
pte_val(pte) |= move_set_bit(rste, _SEGMENT_ENTRY_SOFT_DIRTY,
|
||||
_PAGE_DIRTY);
|
||||
_PAGE_SOFT_DIRTY);
|
||||
#endif
|
||||
pte_val(pte) |= move_set_bit(rste, _SEGMENT_ENTRY_NOEXEC,
|
||||
_PAGE_NOEXEC);
|
||||
|
|
|
|||
|
|
@ -337,7 +337,7 @@ struct x86_hw_tss {
|
|||
#define INVALID_IO_BITMAP_OFFSET 0x8000
|
||||
|
||||
struct entry_stack {
|
||||
unsigned long words[64];
|
||||
char stack[PAGE_SIZE];
|
||||
};
|
||||
|
||||
struct entry_stack_page {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
#define KVM_POSSIBLE_CR0_GUEST_BITS X86_CR0_TS
|
||||
#define KVM_POSSIBLE_CR4_GUEST_BITS \
|
||||
(X86_CR4_PVI | X86_CR4_DE | X86_CR4_PCE | X86_CR4_OSFXSR \
|
||||
| X86_CR4_OSXMMEXCPT | X86_CR4_LA57 | X86_CR4_PGE)
|
||||
| X86_CR4_OSXMMEXCPT | X86_CR4_LA57 | X86_CR4_PGE | X86_CR4_TSD)
|
||||
|
||||
static inline unsigned long kvm_register_read(struct kvm_vcpu *vcpu,
|
||||
enum kvm_reg reg)
|
||||
|
|
|
|||
|
|
@ -4474,7 +4474,7 @@ __reset_rsvds_bits_mask(struct kvm_vcpu *vcpu,
|
|||
nonleaf_bit8_rsvd | rsvd_bits(7, 7) |
|
||||
rsvd_bits(maxphyaddr, 51);
|
||||
rsvd_check->rsvd_bits_mask[0][2] = exb_bit_rsvd |
|
||||
nonleaf_bit8_rsvd | gbpages_bit_rsvd |
|
||||
gbpages_bit_rsvd |
|
||||
rsvd_bits(maxphyaddr, 51);
|
||||
rsvd_check->rsvd_bits_mask[0][1] = exb_bit_rsvd |
|
||||
rsvd_bits(maxphyaddr, 51);
|
||||
|
|
|
|||
|
|
@ -6335,6 +6335,8 @@ static void vmx_set_constant_host_state(struct vcpu_vmx *vmx)
|
|||
|
||||
static void set_cr4_guest_host_mask(struct vcpu_vmx *vmx)
|
||||
{
|
||||
BUILD_BUG_ON(KVM_CR4_GUEST_OWNED_BITS & ~KVM_POSSIBLE_CR4_GUEST_BITS);
|
||||
|
||||
vmx->vcpu.arch.cr4_guest_owned_bits = KVM_CR4_GUEST_OWNED_BITS;
|
||||
if (enable_ept)
|
||||
vmx->vcpu.arch.cr4_guest_owned_bits |= X86_CR4_PGE;
|
||||
|
|
|
|||
|
|
@ -865,6 +865,8 @@ int kvm_set_cr4(struct kvm_vcpu *vcpu, unsigned long cr4)
|
|||
if (is_long_mode(vcpu)) {
|
||||
if (!(cr4 & X86_CR4_PAE))
|
||||
return 1;
|
||||
if ((cr4 ^ old_cr4) & X86_CR4_LA57)
|
||||
return 1;
|
||||
} else if (is_paging(vcpu) && (cr4 & X86_CR4_PAE)
|
||||
&& ((cr4 ^ old_cr4) & pdptr_bits)
|
||||
&& !load_pdptrs(vcpu, vcpu->arch.walk_mmu,
|
||||
|
|
|
|||
|
|
@ -38,6 +38,18 @@ void blk_flush_integrity(void)
|
|||
flush_workqueue(kintegrityd_wq);
|
||||
}
|
||||
|
||||
void __bio_integrity_free(struct bio_set *bs, struct bio_integrity_payload *bip)
|
||||
{
|
||||
if (bs && mempool_initialized(&bs->bio_integrity_pool)) {
|
||||
if (bip->bip_vec)
|
||||
bvec_free(&bs->bvec_integrity_pool, bip->bip_vec,
|
||||
bip->bip_slab);
|
||||
mempool_free(bip, &bs->bio_integrity_pool);
|
||||
} else {
|
||||
kfree(bip);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* bio_integrity_alloc - Allocate integrity payload and attach it to bio
|
||||
* @bio: bio to attach integrity metadata to
|
||||
|
|
@ -90,7 +102,7 @@ struct bio_integrity_payload *bio_integrity_alloc(struct bio *bio,
|
|||
|
||||
return bip;
|
||||
err:
|
||||
mempool_free(bip, &bs->bio_integrity_pool);
|
||||
__bio_integrity_free(bs, bip);
|
||||
return ERR_PTR(-ENOMEM);
|
||||
}
|
||||
EXPORT_SYMBOL(bio_integrity_alloc);
|
||||
|
|
@ -111,14 +123,7 @@ static void bio_integrity_free(struct bio *bio)
|
|||
kfree(page_address(bip->bip_vec->bv_page) +
|
||||
bip->bip_vec->bv_offset);
|
||||
|
||||
if (bs && mempool_initialized(&bs->bio_integrity_pool)) {
|
||||
bvec_free(&bs->bvec_integrity_pool, bip->bip_vec, bip->bip_slab);
|
||||
|
||||
mempool_free(bip, &bs->bio_integrity_pool);
|
||||
} else {
|
||||
kfree(bip);
|
||||
}
|
||||
|
||||
__bio_integrity_free(bs, bip);
|
||||
bio->bi_integrity = NULL;
|
||||
bio->bi_opf &= ~REQ_INTEGRITY;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
#include <linux/delay.h>
|
||||
#include <linux/log2.h>
|
||||
#include <linux/hwspinlock.h>
|
||||
#include <asm/unaligned.h>
|
||||
|
||||
#define CREATE_TRACE_POINTS
|
||||
#include "trace.h"
|
||||
|
|
@ -232,22 +233,20 @@ static void regmap_format_8(void *buf, unsigned int val, unsigned int shift)
|
|||
|
||||
static void regmap_format_16_be(void *buf, unsigned int val, unsigned int shift)
|
||||
{
|
||||
__be16 *b = buf;
|
||||
|
||||
b[0] = cpu_to_be16(val << shift);
|
||||
put_unaligned_be16(val << shift, buf);
|
||||
}
|
||||
|
||||
static void regmap_format_16_le(void *buf, unsigned int val, unsigned int shift)
|
||||
{
|
||||
__le16 *b = buf;
|
||||
|
||||
b[0] = cpu_to_le16(val << shift);
|
||||
put_unaligned_le16(val << shift, buf);
|
||||
}
|
||||
|
||||
static void regmap_format_16_native(void *buf, unsigned int val,
|
||||
unsigned int shift)
|
||||
{
|
||||
*(u16 *)buf = val << shift;
|
||||
u16 v = val << shift;
|
||||
|
||||
memcpy(buf, &v, sizeof(v));
|
||||
}
|
||||
|
||||
static void regmap_format_24(void *buf, unsigned int val, unsigned int shift)
|
||||
|
|
@ -263,43 +262,39 @@ static void regmap_format_24(void *buf, unsigned int val, unsigned int shift)
|
|||
|
||||
static void regmap_format_32_be(void *buf, unsigned int val, unsigned int shift)
|
||||
{
|
||||
__be32 *b = buf;
|
||||
|
||||
b[0] = cpu_to_be32(val << shift);
|
||||
put_unaligned_be32(val << shift, buf);
|
||||
}
|
||||
|
||||
static void regmap_format_32_le(void *buf, unsigned int val, unsigned int shift)
|
||||
{
|
||||
__le32 *b = buf;
|
||||
|
||||
b[0] = cpu_to_le32(val << shift);
|
||||
put_unaligned_le32(val << shift, buf);
|
||||
}
|
||||
|
||||
static void regmap_format_32_native(void *buf, unsigned int val,
|
||||
unsigned int shift)
|
||||
{
|
||||
*(u32 *)buf = val << shift;
|
||||
u32 v = val << shift;
|
||||
|
||||
memcpy(buf, &v, sizeof(v));
|
||||
}
|
||||
|
||||
#ifdef CONFIG_64BIT
|
||||
static void regmap_format_64_be(void *buf, unsigned int val, unsigned int shift)
|
||||
{
|
||||
__be64 *b = buf;
|
||||
|
||||
b[0] = cpu_to_be64((u64)val << shift);
|
||||
put_unaligned_be64((u64) val << shift, buf);
|
||||
}
|
||||
|
||||
static void regmap_format_64_le(void *buf, unsigned int val, unsigned int shift)
|
||||
{
|
||||
__le64 *b = buf;
|
||||
|
||||
b[0] = cpu_to_le64((u64)val << shift);
|
||||
put_unaligned_le64((u64) val << shift, buf);
|
||||
}
|
||||
|
||||
static void regmap_format_64_native(void *buf, unsigned int val,
|
||||
unsigned int shift)
|
||||
{
|
||||
*(u64 *)buf = (u64)val << shift;
|
||||
u64 v = (u64) val << shift;
|
||||
|
||||
memcpy(buf, &v, sizeof(v));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
@ -316,35 +311,34 @@ static unsigned int regmap_parse_8(const void *buf)
|
|||
|
||||
static unsigned int regmap_parse_16_be(const void *buf)
|
||||
{
|
||||
const __be16 *b = buf;
|
||||
|
||||
return be16_to_cpu(b[0]);
|
||||
return get_unaligned_be16(buf);
|
||||
}
|
||||
|
||||
static unsigned int regmap_parse_16_le(const void *buf)
|
||||
{
|
||||
const __le16 *b = buf;
|
||||
|
||||
return le16_to_cpu(b[0]);
|
||||
return get_unaligned_le16(buf);
|
||||
}
|
||||
|
||||
static void regmap_parse_16_be_inplace(void *buf)
|
||||
{
|
||||
__be16 *b = buf;
|
||||
u16 v = get_unaligned_be16(buf);
|
||||
|
||||
b[0] = be16_to_cpu(b[0]);
|
||||
memcpy(buf, &v, sizeof(v));
|
||||
}
|
||||
|
||||
static void regmap_parse_16_le_inplace(void *buf)
|
||||
{
|
||||
__le16 *b = buf;
|
||||
u16 v = get_unaligned_le16(buf);
|
||||
|
||||
b[0] = le16_to_cpu(b[0]);
|
||||
memcpy(buf, &v, sizeof(v));
|
||||
}
|
||||
|
||||
static unsigned int regmap_parse_16_native(const void *buf)
|
||||
{
|
||||
return *(u16 *)buf;
|
||||
u16 v;
|
||||
|
||||
memcpy(&v, buf, sizeof(v));
|
||||
return v;
|
||||
}
|
||||
|
||||
static unsigned int regmap_parse_24(const void *buf)
|
||||
|
|
@ -359,69 +353,67 @@ static unsigned int regmap_parse_24(const void *buf)
|
|||
|
||||
static unsigned int regmap_parse_32_be(const void *buf)
|
||||
{
|
||||
const __be32 *b = buf;
|
||||
|
||||
return be32_to_cpu(b[0]);
|
||||
return get_unaligned_be32(buf);
|
||||
}
|
||||
|
||||
static unsigned int regmap_parse_32_le(const void *buf)
|
||||
{
|
||||
const __le32 *b = buf;
|
||||
|
||||
return le32_to_cpu(b[0]);
|
||||
return get_unaligned_le32(buf);
|
||||
}
|
||||
|
||||
static void regmap_parse_32_be_inplace(void *buf)
|
||||
{
|
||||
__be32 *b = buf;
|
||||
u32 v = get_unaligned_be32(buf);
|
||||
|
||||
b[0] = be32_to_cpu(b[0]);
|
||||
memcpy(buf, &v, sizeof(v));
|
||||
}
|
||||
|
||||
static void regmap_parse_32_le_inplace(void *buf)
|
||||
{
|
||||
__le32 *b = buf;
|
||||
u32 v = get_unaligned_le32(buf);
|
||||
|
||||
b[0] = le32_to_cpu(b[0]);
|
||||
memcpy(buf, &v, sizeof(v));
|
||||
}
|
||||
|
||||
static unsigned int regmap_parse_32_native(const void *buf)
|
||||
{
|
||||
return *(u32 *)buf;
|
||||
u32 v;
|
||||
|
||||
memcpy(&v, buf, sizeof(v));
|
||||
return v;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_64BIT
|
||||
static unsigned int regmap_parse_64_be(const void *buf)
|
||||
{
|
||||
const __be64 *b = buf;
|
||||
|
||||
return be64_to_cpu(b[0]);
|
||||
return get_unaligned_be64(buf);
|
||||
}
|
||||
|
||||
static unsigned int regmap_parse_64_le(const void *buf)
|
||||
{
|
||||
const __le64 *b = buf;
|
||||
|
||||
return le64_to_cpu(b[0]);
|
||||
return get_unaligned_le64(buf);
|
||||
}
|
||||
|
||||
static void regmap_parse_64_be_inplace(void *buf)
|
||||
{
|
||||
__be64 *b = buf;
|
||||
u64 v = get_unaligned_be64(buf);
|
||||
|
||||
b[0] = be64_to_cpu(b[0]);
|
||||
memcpy(buf, &v, sizeof(v));
|
||||
}
|
||||
|
||||
static void regmap_parse_64_le_inplace(void *buf)
|
||||
{
|
||||
__le64 *b = buf;
|
||||
u64 v = get_unaligned_le64(buf);
|
||||
|
||||
b[0] = le64_to_cpu(b[0]);
|
||||
memcpy(buf, &v, sizeof(v));
|
||||
}
|
||||
|
||||
static unsigned int regmap_parse_64_native(const void *buf)
|
||||
{
|
||||
return *(u64 *)buf;
|
||||
u64 v;
|
||||
|
||||
memcpy(&v, buf, sizeof(v));
|
||||
return v;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -974,25 +974,26 @@ static int nbd_add_socket(struct nbd_device *nbd, unsigned long arg,
|
|||
test_bit(NBD_BOUND, &config->runtime_flags))) {
|
||||
dev_err(disk_to_dev(nbd->disk),
|
||||
"Device being setup by another task");
|
||||
sockfd_put(sock);
|
||||
return -EBUSY;
|
||||
err = -EBUSY;
|
||||
goto put_socket;
|
||||
}
|
||||
|
||||
nsock = kzalloc(sizeof(*nsock), GFP_KERNEL);
|
||||
if (!nsock) {
|
||||
err = -ENOMEM;
|
||||
goto put_socket;
|
||||
}
|
||||
|
||||
socks = krealloc(config->socks, (config->num_connections + 1) *
|
||||
sizeof(struct nbd_sock *), GFP_KERNEL);
|
||||
if (!socks) {
|
||||
sockfd_put(sock);
|
||||
return -ENOMEM;
|
||||
kfree(nsock);
|
||||
err = -ENOMEM;
|
||||
goto put_socket;
|
||||
}
|
||||
|
||||
config->socks = socks;
|
||||
|
||||
nsock = kzalloc(sizeof(struct nbd_sock), GFP_KERNEL);
|
||||
if (!nsock) {
|
||||
sockfd_put(sock);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
nsock->fallback_index = -1;
|
||||
nsock->dead = false;
|
||||
mutex_init(&nsock->tx_lock);
|
||||
|
|
@ -1004,6 +1005,10 @@ static int nbd_add_socket(struct nbd_device *nbd, unsigned long arg,
|
|||
atomic_inc(&config->live_connections);
|
||||
|
||||
return 0;
|
||||
|
||||
put_socket:
|
||||
sockfd_put(sock);
|
||||
return err;
|
||||
}
|
||||
|
||||
static int nbd_reconnect_socket(struct nbd_device *nbd, unsigned long arg)
|
||||
|
|
|
|||
|
|
@ -30,12 +30,6 @@ struct drm_dmi_panel_orientation_data {
|
|||
int orientation;
|
||||
};
|
||||
|
||||
static const struct drm_dmi_panel_orientation_data acer_s1003 = {
|
||||
.width = 800,
|
||||
.height = 1280,
|
||||
.orientation = DRM_MODE_PANEL_ORIENTATION_RIGHT_UP,
|
||||
};
|
||||
|
||||
static const struct drm_dmi_panel_orientation_data asus_t100ha = {
|
||||
.width = 800,
|
||||
.height = 1280,
|
||||
|
|
@ -100,13 +94,19 @@ static const struct dmi_system_id orientation_data[] = {
|
|||
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Acer"),
|
||||
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "One S1003"),
|
||||
},
|
||||
.driver_data = (void *)&acer_s1003,
|
||||
.driver_data = (void *)&lcd800x1280_rightside_up,
|
||||
}, { /* Asus T100HA */
|
||||
.matches = {
|
||||
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
|
||||
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "T100HAN"),
|
||||
},
|
||||
.driver_data = (void *)&asus_t100ha,
|
||||
}, { /* Asus T101HA */
|
||||
.matches = {
|
||||
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
|
||||
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "T101HA"),
|
||||
},
|
||||
.driver_data = (void *)&lcd800x1280_rightside_up,
|
||||
}, { /* GPD MicroPC (generic strings, also match on bios date) */
|
||||
.matches = {
|
||||
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Default string"),
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue