Merge 4.9.69 into android-4.9
Changes in 4.9.69 usb: gadget: udc: renesas_usb3: fix number of the pipes can: ti_hecc: Fix napi poll return value for repoll can: kvaser_usb: free buf in error paths can: kvaser_usb: Fix comparison bug in kvaser_usb_read_bulk_callback() can: kvaser_usb: ratelimit errors if incomplete messages are received can: kvaser_usb: cancel urb on -EPIPE and -EPROTO can: ems_usb: cancel urb on -EPIPE and -EPROTO can: esd_usb2: cancel urb on -EPIPE and -EPROTO can: usb_8dev: cancel urb on -EPIPE and -EPROTO virtio: release virtio index when fail to device_register hv: kvp: Avoid reading past allocated blocks from KVP file isa: Prevent NULL dereference in isa_bus driver callbacks scsi: dma-mapping: always provide dma_get_cache_alignment scsi: use dma_get_cache_alignment() as minimum DMA alignment scsi: libsas: align sata_device's rps_resp on a cacheline efi: Move some sysfs files to be read-only by root efi/esrt: Use memunmap() instead of kfree() to free the remapping ASN.1: fix out-of-bounds read when parsing indefinite length item ASN.1: check for error from ASN1_OP_END__ACT actions KEYS: add missing permission check for request_key() destination X.509: reject invalid BIT STRING for subjectPublicKey X.509: fix comparisons of ->pkey_algo x86/PCI: Make broadcom_postcore_init() check acpi_disabled KVM: x86: fix APIC page invalidation btrfs: fix missing error return in btrfs_drop_snapshot ALSA: pcm: prevent UAF in snd_pcm_info ALSA: seq: Remove spurious WARN_ON() at timer check ALSA: usb-audio: Fix out-of-bound error ALSA: usb-audio: Add check return value for usb_string() iommu/vt-d: Fix scatterlist offset handling smp/hotplug: Move step CPUHP_AP_SMPCFD_DYING to the correct place s390: fix compat system call table KVM: s390: Fix skey emulation permission check powerpc/64s: Initialize ISAv3 MMU registers before setting partition table brcmfmac: change driver unbind order of the sdio function devices kdb: Fix handling of kallsyms_symbol_next() return value drm/exynos: gem: Drop NONCONTIG flag for buffers allocated without IOMMU media: dvb: i2c transfers over usb cannot be done from stack arm64: KVM: fix VTTBR_BADDR_MASK BUG_ON off-by-one arm: KVM: Fix VTTBR_BADDR_MASK BUG_ON off-by-one KVM: VMX: remove I/O port 0x80 bypass on Intel hosts KVM: arm/arm64: Fix broken GICH_ELRSR big endian conversion KVM: arm/arm64: vgic-irqfd: Fix MSI entry allocation KVM: arm/arm64: vgic-its: Check result of allocation before use arm64: fpsimd: Prevent registers leaking from dead tasks bus: arm-cci: Fix use of smp_processor_id() in preemptible context bus: arm-ccn: Check memory allocation failure bus: arm-ccn: Fix use of smp_processor_id() in preemptible context bus: arm-ccn: fix module unloading Error: Removing state 147 which has instances left. crypto: talitos - fix AEAD test failures crypto: talitos - fix memory corruption on SEC2 crypto: talitos - fix setkey to check key weakness crypto: talitos - fix AEAD for sha224 on non sha224 capable chips crypto: talitos - fix use of sg_link_tbl_len crypto: talitos - fix ctr-aes-talitos usb: f_fs: Force Reserved1=1 in OS_DESC_EXT_COMPAT ARM: BUG if jumping to usermode address in kernel mode ARM: avoid faulting on qemu thp: reduce indentation level in change_huge_pmd() thp: fix MADV_DONTNEED vs. numa balancing race mm: drop unused pmdp_huge_get_and_clear_notify() Revert "drm/armada: Fix compile fail" Revert "spi: SPI_FSL_DSPI should depend on HAS_DMA" ARM: 8657/1: uaccess: consistently check object sizes vti6: Don't report path MTU below IPV6_MIN_MTU. ARM: OMAP2+: gpmc-onenand: propagate error on initialization failure x86/selftests: Add clobbers for int80 on x86_64 x86/platform/uv/BAU: Fix HUB errors by remove initial write to sw-ack register sched/fair: Make select_idle_cpu() more aggressive x86/hpet: Prevent might sleep splat on resume powerpc/64: Invalidate process table caching after setting process table selftest/powerpc: Fix false failures for skipped tests powerpc: Fix compiling a BE kernel with a powerpc64le toolchain lirc: fix dead lock between open and wakeup_filter module: set __jump_table alignment to 8 powerpc/64: Fix checksum folding in csum_add() ARM: OMAP2+: Fix device node reference counts ARM: OMAP2+: Release device node after it is no longer needed. ASoC: rcar: avoid SSI_MODEx settings for SSI8 gpio: altera: Use handle_level_irq when configured as a level_high HID: chicony: Add support for another ASUS Zen AiO keyboard usb: gadget: configs: plug memory leak USB: gadgetfs: Fix a potential memory leak in 'dev_config()' usb: dwc3: gadget: Fix system suspend/resume on TI platforms usb: gadget: pxa27x: Test for a valid argument pointer usb: gadget: udc: net2280: Fix tmp reusage in net2280 driver kvm: nVMX: VMCLEAR should not cause the vCPU to shut down libata: drop WARN from protocol error in ata_sff_qc_issue() workqueue: trigger WARN if queue_delayed_work() is called with NULL @wq scsi: qla2xxx: Fix ql_dump_buffer scsi: lpfc: Fix crash during Hardware error recovery on SLI3 adapters irqchip/crossbar: Fix incorrect type of register size KVM: nVMX: reset nested_run_pending if the vCPU is going to be reset arm: KVM: Survive unknown traps from guests arm64: KVM: Survive unknown traps from guests KVM: arm/arm64: VGIC: Fix command handling while ITS being disabled spi_ks8995: fix "BUG: key accdaa28 not in .data!" spi_ks8995: regs_size incorrect for some devices bnx2x: prevent crash when accessing PTP with interface down bnx2x: fix possible overrun of VFPF multicast addresses array bnx2x: fix detection of VLAN filtering feature for VF bnx2x: do not rollback VF MAC/VLAN filters we did not configure rds: tcp: Sequence teardown of listen and acceptor sockets to avoid races ibmvnic: Fix overflowing firmware/hardware TX queue ibmvnic: Allocate number of rx/tx buffers agreed on by firmware ipv6: reorder icmpv6_init() and ip6_mr_init() crypto: s5p-sss - Fix completing crypto request in IRQ handler i2c: riic: fix restart condition blk-mq: initialize mq kobjects in blk_mq_init_allocated_queue() zram: set physical queue limits to avoid array out of bounds accesses netfilter: don't track fragmented packets axonram: Fix gendisk handling drm/amd/amdgpu: fix console deadlock if late init failed powerpc/powernv/ioda2: Gracefully fail if too many TCE levels requested EDAC, i5000, i5400: Fix use of MTR_DRAM_WIDTH macro EDAC, i5000, i5400: Fix definition of NRECMEMB register kbuild: pkg: use --transform option to prefix paths in tar coccinelle: fix parallel build with CHECK=scripts/coccicheck x86/mpx/selftests: Fix up weird arrays mac80211_hwsim: Fix memory leak in hwsim_new_radio_nl() gre6: use log_ecn_error module parameter in ip6_tnl_rcv() route: also update fnhe_genid when updating a route cache route: update fnhe_expires for redirect when the fnhe exists drivers/rapidio/devices/rio_mport_cdev.c: fix resource leak in error handling path in 'rio_dma_transfer()' lib/genalloc.c: make the avail variable an atomic_long_t dynamic-debug-howto: fix optional/omitted ending line number to be LARGE instead of 0 NFS: Fix a typo in nfs_rename() sunrpc: Fix rpc_task_begin trace point xfs: fix forgotten rcu read unlock when skipping inode reclaim dt-bindings: usb: fix reg-property port-number range block: wake up all tasks blocked in get_request() sparc64/mm: set fields in deferred pages zsmalloc: calling zs_map_object() from irq is a bug sctp: do not free asoc when it is already dead in sctp_sendmsg sctp: use the right sk after waking up from wait_buf sleep bpf: fix lockdep splat clk: uniphier: fix DAPLL2 clock rate of Pro5 atm: horizon: Fix irq release error jump_label: Invoke jump_label_test() via early_initcall() xfrm: Copy policy family in clone_policy IB/mlx4: Increase maximal message size under UD QP IB/mlx5: Assign send CQ and recv CQ of UMR QP afs: Connect up the CB.ProbeUuid Linux 4.9.69 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
@@ -11,7 +11,7 @@ Required properties:
|
|||||||
be used, but a device adhering to this binding may leave out all except
|
be used, but a device adhering to this binding may leave out all except
|
||||||
for usbVID,PID.
|
for usbVID,PID.
|
||||||
- reg: the port number which this device is connecting to, the range
|
- reg: the port number which this device is connecting to, the range
|
||||||
is 1-31.
|
is 1-255.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
VERSION = 4
|
VERSION = 4
|
||||||
PATCHLEVEL = 9
|
PATCHLEVEL = 9
|
||||||
SUBLEVEL = 68
|
SUBLEVEL = 69
|
||||||
EXTRAVERSION =
|
EXTRAVERSION =
|
||||||
NAME = Roaring Lionus
|
NAME = Roaring Lionus
|
||||||
|
|
||||||
|
|||||||
@@ -516,4 +516,22 @@ THUMB( orr \reg , \reg , #PSR_T_BIT )
|
|||||||
#endif
|
#endif
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
|
.macro bug, msg, line
|
||||||
|
#ifdef CONFIG_THUMB2_KERNEL
|
||||||
|
1: .inst 0xde02
|
||||||
|
#else
|
||||||
|
1: .inst 0xe7f001f2
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_DEBUG_BUGVERBOSE
|
||||||
|
.pushsection .rodata.str, "aMS", %progbits, 1
|
||||||
|
2: .asciz "\msg"
|
||||||
|
.popsection
|
||||||
|
.pushsection __bug_table, "aw"
|
||||||
|
.align 2
|
||||||
|
.word 1b, 2b
|
||||||
|
.hword \line
|
||||||
|
.popsection
|
||||||
|
#endif
|
||||||
|
.endm
|
||||||
|
|
||||||
#endif /* __ASM_ASSEMBLER_H__ */
|
#endif /* __ASM_ASSEMBLER_H__ */
|
||||||
|
|||||||
@@ -161,8 +161,7 @@
|
|||||||
#else
|
#else
|
||||||
#define VTTBR_X (5 - KVM_T0SZ)
|
#define VTTBR_X (5 - KVM_T0SZ)
|
||||||
#endif
|
#endif
|
||||||
#define VTTBR_BADDR_SHIFT (VTTBR_X - 1)
|
#define VTTBR_BADDR_MASK (((_AC(1, ULL) << (40 - VTTBR_X)) - 1) << VTTBR_X)
|
||||||
#define VTTBR_BADDR_MASK (((_AC(1, ULL) << (40 - VTTBR_X)) - 1) << VTTBR_BADDR_SHIFT)
|
|
||||||
#define VTTBR_VMID_SHIFT _AC(48, ULL)
|
#define VTTBR_VMID_SHIFT _AC(48, ULL)
|
||||||
#define VTTBR_VMID_MASK(size) (_AT(u64, (1 << size) - 1) << VTTBR_VMID_SHIFT)
|
#define VTTBR_VMID_MASK(size) (_AT(u64, (1 << size) - 1) << VTTBR_VMID_SHIFT)
|
||||||
|
|
||||||
@@ -209,6 +208,7 @@
|
|||||||
#define HSR_EC_IABT_HYP (0x21)
|
#define HSR_EC_IABT_HYP (0x21)
|
||||||
#define HSR_EC_DABT (0x24)
|
#define HSR_EC_DABT (0x24)
|
||||||
#define HSR_EC_DABT_HYP (0x25)
|
#define HSR_EC_DABT_HYP (0x25)
|
||||||
|
#define HSR_EC_MAX (0x3f)
|
||||||
|
|
||||||
#define HSR_WFI_IS_WFE (_AC(1, UL) << 0)
|
#define HSR_WFI_IS_WFE (_AC(1, UL) << 0)
|
||||||
|
|
||||||
|
|||||||
@@ -478,11 +478,10 @@ extern unsigned long __must_check
|
|||||||
arm_copy_from_user(void *to, const void __user *from, unsigned long n);
|
arm_copy_from_user(void *to, const void __user *from, unsigned long n);
|
||||||
|
|
||||||
static inline unsigned long __must_check
|
static inline unsigned long __must_check
|
||||||
__copy_from_user(void *to, const void __user *from, unsigned long n)
|
__arch_copy_from_user(void *to, const void __user *from, unsigned long n)
|
||||||
{
|
{
|
||||||
unsigned int __ua_flags;
|
unsigned int __ua_flags;
|
||||||
|
|
||||||
check_object_size(to, n, false);
|
|
||||||
__ua_flags = uaccess_save_and_enable();
|
__ua_flags = uaccess_save_and_enable();
|
||||||
n = arm_copy_from_user(to, from, n);
|
n = arm_copy_from_user(to, from, n);
|
||||||
uaccess_restore(__ua_flags);
|
uaccess_restore(__ua_flags);
|
||||||
@@ -495,18 +494,15 @@ extern unsigned long __must_check
|
|||||||
__copy_to_user_std(void __user *to, const void *from, unsigned long n);
|
__copy_to_user_std(void __user *to, const void *from, unsigned long n);
|
||||||
|
|
||||||
static inline unsigned long __must_check
|
static inline unsigned long __must_check
|
||||||
__copy_to_user(void __user *to, const void *from, unsigned long n)
|
__arch_copy_to_user(void __user *to, const void *from, unsigned long n)
|
||||||
{
|
{
|
||||||
#ifndef CONFIG_UACCESS_WITH_MEMCPY
|
#ifndef CONFIG_UACCESS_WITH_MEMCPY
|
||||||
unsigned int __ua_flags;
|
unsigned int __ua_flags;
|
||||||
|
|
||||||
check_object_size(from, n, true);
|
|
||||||
__ua_flags = uaccess_save_and_enable();
|
__ua_flags = uaccess_save_and_enable();
|
||||||
n = arm_copy_to_user(to, from, n);
|
n = arm_copy_to_user(to, from, n);
|
||||||
uaccess_restore(__ua_flags);
|
uaccess_restore(__ua_flags);
|
||||||
return n;
|
return n;
|
||||||
#else
|
#else
|
||||||
check_object_size(from, n, true);
|
|
||||||
return arm_copy_to_user(to, from, n);
|
return arm_copy_to_user(to, from, n);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@@ -526,25 +522,49 @@ __clear_user(void __user *addr, unsigned long n)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
#define __copy_from_user(to, from, n) (memcpy(to, (void __force *)from, n), 0)
|
#define __arch_copy_from_user(to, from, n) \
|
||||||
#define __copy_to_user(to, from, n) (memcpy((void __force *)to, from, n), 0)
|
(memcpy(to, (void __force *)from, n), 0)
|
||||||
|
#define __arch_copy_to_user(to, from, n) \
|
||||||
|
(memcpy((void __force *)to, from, n), 0)
|
||||||
#define __clear_user(addr, n) (memset((void __force *)addr, 0, n), 0)
|
#define __clear_user(addr, n) (memset((void __force *)addr, 0, n), 0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static inline unsigned long __must_check copy_from_user(void *to, const void __user *from, unsigned long n)
|
static inline unsigned long __must_check
|
||||||
|
__copy_from_user(void *to, const void __user *from, unsigned long n)
|
||||||
|
{
|
||||||
|
check_object_size(to, n, false);
|
||||||
|
return __arch_copy_from_user(to, from, n);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline unsigned long __must_check
|
||||||
|
copy_from_user(void *to, const void __user *from, unsigned long n)
|
||||||
{
|
{
|
||||||
unsigned long res = n;
|
unsigned long res = n;
|
||||||
|
|
||||||
|
check_object_size(to, n, false);
|
||||||
|
|
||||||
if (likely(access_ok(VERIFY_READ, from, n)))
|
if (likely(access_ok(VERIFY_READ, from, n)))
|
||||||
res = __copy_from_user(to, from, n);
|
res = __arch_copy_from_user(to, from, n);
|
||||||
if (unlikely(res))
|
if (unlikely(res))
|
||||||
memset(to + (n - res), 0, res);
|
memset(to + (n - res), 0, res);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline unsigned long __must_check copy_to_user(void __user *to, const void *from, unsigned long n)
|
static inline unsigned long __must_check
|
||||||
|
__copy_to_user(void __user *to, const void *from, unsigned long n)
|
||||||
{
|
{
|
||||||
|
check_object_size(from, n, true);
|
||||||
|
|
||||||
|
return __arch_copy_to_user(to, from, n);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline unsigned long __must_check
|
||||||
|
copy_to_user(void __user *to, const void *from, unsigned long n)
|
||||||
|
{
|
||||||
|
check_object_size(from, n, true);
|
||||||
|
|
||||||
if (access_ok(VERIFY_WRITE, to, n))
|
if (access_ok(VERIFY_WRITE, to, n))
|
||||||
n = __copy_to_user(to, from, n);
|
n = __arch_copy_to_user(to, from, n);
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -299,6 +299,8 @@
|
|||||||
mov r2, sp
|
mov r2, sp
|
||||||
ldr r1, [r2, #\offset + S_PSR] @ get calling cpsr
|
ldr r1, [r2, #\offset + S_PSR] @ get calling cpsr
|
||||||
ldr lr, [r2, #\offset + S_PC]! @ get pc
|
ldr lr, [r2, #\offset + S_PC]! @ get pc
|
||||||
|
tst r1, #PSR_I_BIT | 0x0f
|
||||||
|
bne 1f
|
||||||
msr spsr_cxsf, r1 @ save in spsr_svc
|
msr spsr_cxsf, r1 @ save in spsr_svc
|
||||||
#if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_32v6K)
|
#if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_32v6K)
|
||||||
@ We must avoid clrex due to Cortex-A15 erratum #830321
|
@ We must avoid clrex due to Cortex-A15 erratum #830321
|
||||||
@@ -313,6 +315,7 @@
|
|||||||
@ after ldm {}^
|
@ after ldm {}^
|
||||||
add sp, sp, #\offset + PT_REGS_SIZE
|
add sp, sp, #\offset + PT_REGS_SIZE
|
||||||
movs pc, lr @ return & move spsr_svc into cpsr
|
movs pc, lr @ return & move spsr_svc into cpsr
|
||||||
|
1: bug "Returning to usermode but unexpected PSR bits set?", \@
|
||||||
#elif defined(CONFIG_CPU_V7M)
|
#elif defined(CONFIG_CPU_V7M)
|
||||||
@ V7M restore.
|
@ V7M restore.
|
||||||
@ Note that we don't need to do clrex here as clearing the local
|
@ Note that we don't need to do clrex here as clearing the local
|
||||||
@@ -328,6 +331,8 @@
|
|||||||
ldr r1, [sp, #\offset + S_PSR] @ get calling cpsr
|
ldr r1, [sp, #\offset + S_PSR] @ get calling cpsr
|
||||||
ldr lr, [sp, #\offset + S_PC] @ get pc
|
ldr lr, [sp, #\offset + S_PC] @ get pc
|
||||||
add sp, sp, #\offset + S_SP
|
add sp, sp, #\offset + S_SP
|
||||||
|
tst r1, #PSR_I_BIT | 0x0f
|
||||||
|
bne 1f
|
||||||
msr spsr_cxsf, r1 @ save in spsr_svc
|
msr spsr_cxsf, r1 @ save in spsr_svc
|
||||||
|
|
||||||
@ We must avoid clrex due to Cortex-A15 erratum #830321
|
@ We must avoid clrex due to Cortex-A15 erratum #830321
|
||||||
@@ -340,6 +345,7 @@
|
|||||||
.endif
|
.endif
|
||||||
add sp, sp, #PT_REGS_SIZE - S_SP
|
add sp, sp, #PT_REGS_SIZE - S_SP
|
||||||
movs pc, lr @ return & move spsr_svc into cpsr
|
movs pc, lr @ return & move spsr_svc into cpsr
|
||||||
|
1: bug "Returning to usermode but unexpected PSR bits set?", \@
|
||||||
#endif /* !CONFIG_THUMB2_KERNEL */
|
#endif /* !CONFIG_THUMB2_KERNEL */
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
|
|||||||
@@ -79,7 +79,19 @@ static int kvm_handle_wfx(struct kvm_vcpu *vcpu, struct kvm_run *run)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int kvm_handle_unknown_ec(struct kvm_vcpu *vcpu, struct kvm_run *run)
|
||||||
|
{
|
||||||
|
u32 hsr = kvm_vcpu_get_hsr(vcpu);
|
||||||
|
|
||||||
|
kvm_pr_unimpl("Unknown exception class: hsr: %#08x\n",
|
||||||
|
hsr);
|
||||||
|
|
||||||
|
kvm_inject_undefined(vcpu);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
static exit_handle_fn arm_exit_handlers[] = {
|
static exit_handle_fn arm_exit_handlers[] = {
|
||||||
|
[0 ... HSR_EC_MAX] = kvm_handle_unknown_ec,
|
||||||
[HSR_EC_WFI] = kvm_handle_wfx,
|
[HSR_EC_WFI] = kvm_handle_wfx,
|
||||||
[HSR_EC_CP15_32] = kvm_handle_cp15_32,
|
[HSR_EC_CP15_32] = kvm_handle_cp15_32,
|
||||||
[HSR_EC_CP15_64] = kvm_handle_cp15_64,
|
[HSR_EC_CP15_64] = kvm_handle_cp15_64,
|
||||||
@@ -98,13 +110,6 @@ static exit_handle_fn kvm_get_exit_handler(struct kvm_vcpu *vcpu)
|
|||||||
{
|
{
|
||||||
u8 hsr_ec = kvm_vcpu_trap_get_class(vcpu);
|
u8 hsr_ec = kvm_vcpu_trap_get_class(vcpu);
|
||||||
|
|
||||||
if (hsr_ec >= ARRAY_SIZE(arm_exit_handlers) ||
|
|
||||||
!arm_exit_handlers[hsr_ec]) {
|
|
||||||
kvm_err("Unknown exception class: hsr: %#08x\n",
|
|
||||||
(unsigned int)kvm_vcpu_get_hsr(vcpu));
|
|
||||||
BUG();
|
|
||||||
}
|
|
||||||
|
|
||||||
return arm_exit_handlers[hsr_ec];
|
return arm_exit_handlers[hsr_ec];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -367,7 +367,7 @@ static int gpmc_onenand_setup(void __iomem *onenand_base, int *freq_ptr)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
void gpmc_onenand_init(struct omap_onenand_platform_data *_onenand_data)
|
int gpmc_onenand_init(struct omap_onenand_platform_data *_onenand_data)
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
struct device *dev = &gpmc_onenand_device.dev;
|
struct device *dev = &gpmc_onenand_device.dev;
|
||||||
@@ -393,15 +393,17 @@ void gpmc_onenand_init(struct omap_onenand_platform_data *_onenand_data)
|
|||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
dev_err(dev, "Cannot request GPMC CS %d, error %d\n",
|
dev_err(dev, "Cannot request GPMC CS %d, error %d\n",
|
||||||
gpmc_onenand_data->cs, err);
|
gpmc_onenand_data->cs, err);
|
||||||
return;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
gpmc_onenand_resource.end = gpmc_onenand_resource.start +
|
gpmc_onenand_resource.end = gpmc_onenand_resource.start +
|
||||||
ONENAND_IO_SIZE - 1;
|
ONENAND_IO_SIZE - 1;
|
||||||
|
|
||||||
if (platform_device_register(&gpmc_onenand_device) < 0) {
|
err = platform_device_register(&gpmc_onenand_device);
|
||||||
|
if (err) {
|
||||||
dev_err(dev, "Unable to register OneNAND device\n");
|
dev_err(dev, "Unable to register OneNAND device\n");
|
||||||
gpmc_cs_free(gpmc_onenand_data->cs);
|
gpmc_cs_free(gpmc_onenand_data->cs);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return err;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3828,16 +3828,20 @@ static struct omap_hwmod_ocp_if *omap3xxx_dss_hwmod_ocp_ifs[] __initdata = {
|
|||||||
* Return: 0 if device named @dev_name is not likely to be accessible,
|
* Return: 0 if device named @dev_name is not likely to be accessible,
|
||||||
* or 1 if it is likely to be accessible.
|
* or 1 if it is likely to be accessible.
|
||||||
*/
|
*/
|
||||||
static int __init omap3xxx_hwmod_is_hs_ip_block_usable(struct device_node *bus,
|
static bool __init omap3xxx_hwmod_is_hs_ip_block_usable(struct device_node *bus,
|
||||||
const char *dev_name)
|
const char *dev_name)
|
||||||
{
|
{
|
||||||
|
struct device_node *node;
|
||||||
|
bool available;
|
||||||
|
|
||||||
if (!bus)
|
if (!bus)
|
||||||
return (omap_type() == OMAP2_DEVICE_TYPE_GP) ? 1 : 0;
|
return omap_type() == OMAP2_DEVICE_TYPE_GP;
|
||||||
|
|
||||||
if (of_device_is_available(of_find_node_by_name(bus, dev_name)))
|
node = of_get_child_by_name(bus, dev_name);
|
||||||
return 1;
|
available = of_device_is_available(node);
|
||||||
|
of_node_put(node);
|
||||||
|
|
||||||
return 0;
|
return available;
|
||||||
}
|
}
|
||||||
|
|
||||||
int __init omap3xxx_hwmod_init(void)
|
int __init omap3xxx_hwmod_init(void)
|
||||||
@@ -3906,15 +3910,20 @@ int __init omap3xxx_hwmod_init(void)
|
|||||||
|
|
||||||
if (h_sham && omap3xxx_hwmod_is_hs_ip_block_usable(bus, "sham")) {
|
if (h_sham && omap3xxx_hwmod_is_hs_ip_block_usable(bus, "sham")) {
|
||||||
r = omap_hwmod_register_links(h_sham);
|
r = omap_hwmod_register_links(h_sham);
|
||||||
if (r < 0)
|
if (r < 0) {
|
||||||
|
of_node_put(bus);
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (h_aes && omap3xxx_hwmod_is_hs_ip_block_usable(bus, "aes")) {
|
if (h_aes && omap3xxx_hwmod_is_hs_ip_block_usable(bus, "aes")) {
|
||||||
r = omap_hwmod_register_links(h_aes);
|
r = omap_hwmod_register_links(h_aes);
|
||||||
if (r < 0)
|
if (r < 0) {
|
||||||
|
of_node_put(bus);
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
of_node_put(bus);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Register hwmod links specific to certain ES levels of a
|
* Register hwmod links specific to certain ES levels of a
|
||||||
|
|||||||
@@ -170,8 +170,7 @@
|
|||||||
#define VTCR_EL2_FLAGS (VTCR_EL2_COMMON_BITS | VTCR_EL2_TGRAN_FLAGS)
|
#define VTCR_EL2_FLAGS (VTCR_EL2_COMMON_BITS | VTCR_EL2_TGRAN_FLAGS)
|
||||||
#define VTTBR_X (VTTBR_X_TGRAN_MAGIC - VTCR_EL2_T0SZ_IPA)
|
#define VTTBR_X (VTTBR_X_TGRAN_MAGIC - VTCR_EL2_T0SZ_IPA)
|
||||||
|
|
||||||
#define VTTBR_BADDR_SHIFT (VTTBR_X - 1)
|
#define VTTBR_BADDR_MASK (((UL(1) << (PHYS_MASK_SHIFT - VTTBR_X)) - 1) << VTTBR_X)
|
||||||
#define VTTBR_BADDR_MASK (((UL(1) << (PHYS_MASK_SHIFT - VTTBR_X)) - 1) << VTTBR_BADDR_SHIFT)
|
|
||||||
#define VTTBR_VMID_SHIFT (UL(48))
|
#define VTTBR_VMID_SHIFT (UL(48))
|
||||||
#define VTTBR_VMID_MASK(size) (_AT(u64, (1 << size) - 1) << VTTBR_VMID_SHIFT)
|
#define VTTBR_VMID_MASK(size) (_AT(u64, (1 << size) - 1) << VTTBR_VMID_SHIFT)
|
||||||
|
|
||||||
|
|||||||
@@ -321,6 +321,15 @@ int copy_thread(unsigned long clone_flags, unsigned long stack_start,
|
|||||||
|
|
||||||
memset(&p->thread.cpu_context, 0, sizeof(struct cpu_context));
|
memset(&p->thread.cpu_context, 0, sizeof(struct cpu_context));
|
||||||
|
|
||||||
|
/*
|
||||||
|
* In case p was allocated the same task_struct pointer as some
|
||||||
|
* other recently-exited task, make sure p is disassociated from
|
||||||
|
* any cpu that may have run that now-exited task recently.
|
||||||
|
* Otherwise we could erroneously skip reloading the FPSIMD
|
||||||
|
* registers for p.
|
||||||
|
*/
|
||||||
|
fpsimd_flush_task_state(p);
|
||||||
|
|
||||||
if (likely(!(p->flags & PF_KTHREAD))) {
|
if (likely(!(p->flags & PF_KTHREAD))) {
|
||||||
*childregs = *current_pt_regs();
|
*childregs = *current_pt_regs();
|
||||||
childregs->regs[0] = 0;
|
childregs->regs[0] = 0;
|
||||||
|
|||||||
@@ -125,7 +125,19 @@ static int kvm_handle_guest_debug(struct kvm_vcpu *vcpu, struct kvm_run *run)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int kvm_handle_unknown_ec(struct kvm_vcpu *vcpu, struct kvm_run *run)
|
||||||
|
{
|
||||||
|
u32 hsr = kvm_vcpu_get_hsr(vcpu);
|
||||||
|
|
||||||
|
kvm_pr_unimpl("Unknown exception class: hsr: %#08x -- %s\n",
|
||||||
|
hsr, esr_get_class_string(hsr));
|
||||||
|
|
||||||
|
kvm_inject_undefined(vcpu);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
static exit_handle_fn arm_exit_handlers[] = {
|
static exit_handle_fn arm_exit_handlers[] = {
|
||||||
|
[0 ... ESR_ELx_EC_MAX] = kvm_handle_unknown_ec,
|
||||||
[ESR_ELx_EC_WFx] = kvm_handle_wfx,
|
[ESR_ELx_EC_WFx] = kvm_handle_wfx,
|
||||||
[ESR_ELx_EC_CP15_32] = kvm_handle_cp15_32,
|
[ESR_ELx_EC_CP15_32] = kvm_handle_cp15_32,
|
||||||
[ESR_ELx_EC_CP15_64] = kvm_handle_cp15_64,
|
[ESR_ELx_EC_CP15_64] = kvm_handle_cp15_64,
|
||||||
@@ -151,13 +163,6 @@ static exit_handle_fn kvm_get_exit_handler(struct kvm_vcpu *vcpu)
|
|||||||
u32 hsr = kvm_vcpu_get_hsr(vcpu);
|
u32 hsr = kvm_vcpu_get_hsr(vcpu);
|
||||||
u8 hsr_ec = ESR_ELx_EC(hsr);
|
u8 hsr_ec = ESR_ELx_EC(hsr);
|
||||||
|
|
||||||
if (hsr_ec >= ARRAY_SIZE(arm_exit_handlers) ||
|
|
||||||
!arm_exit_handlers[hsr_ec]) {
|
|
||||||
kvm_err("Unknown exception class: hsr: %#08x -- %s\n",
|
|
||||||
hsr, esr_get_class_string(hsr));
|
|
||||||
BUG();
|
|
||||||
}
|
|
||||||
|
|
||||||
return arm_exit_handlers[hsr_ec];
|
return arm_exit_handlers[hsr_ec];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+10
-1
@@ -72,8 +72,15 @@ GNUTARGET := powerpc
|
|||||||
MULTIPLEWORD := -mmultiple
|
MULTIPLEWORD := -mmultiple
|
||||||
endif
|
endif
|
||||||
|
|
||||||
cflags-$(CONFIG_CPU_BIG_ENDIAN) += $(call cc-option,-mbig-endian)
|
ifdef CONFIG_PPC64
|
||||||
|
cflags-$(CONFIG_CPU_BIG_ENDIAN) += $(call cc-option,-mabi=elfv1)
|
||||||
|
cflags-$(CONFIG_CPU_BIG_ENDIAN) += $(call cc-option,-mcall-aixdesc)
|
||||||
|
aflags-$(CONFIG_CPU_BIG_ENDIAN) += $(call cc-option,-mabi=elfv1)
|
||||||
|
aflags-$(CONFIG_CPU_LITTLE_ENDIAN) += -mabi=elfv2
|
||||||
|
endif
|
||||||
|
|
||||||
cflags-$(CONFIG_CPU_LITTLE_ENDIAN) += -mlittle-endian
|
cflags-$(CONFIG_CPU_LITTLE_ENDIAN) += -mlittle-endian
|
||||||
|
cflags-$(CONFIG_CPU_BIG_ENDIAN) += $(call cc-option,-mbig-endian)
|
||||||
ifneq ($(cc-name),clang)
|
ifneq ($(cc-name),clang)
|
||||||
cflags-$(CONFIG_CPU_LITTLE_ENDIAN) += -mno-strict-align
|
cflags-$(CONFIG_CPU_LITTLE_ENDIAN) += -mno-strict-align
|
||||||
endif
|
endif
|
||||||
@@ -113,7 +120,9 @@ ifeq ($(CONFIG_CPU_LITTLE_ENDIAN),y)
|
|||||||
CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mabi=elfv2,$(call cc-option,-mcall-aixdesc))
|
CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mabi=elfv2,$(call cc-option,-mcall-aixdesc))
|
||||||
AFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mabi=elfv2)
|
AFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mabi=elfv2)
|
||||||
else
|
else
|
||||||
|
CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mabi=elfv1)
|
||||||
CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mcall-aixdesc)
|
CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mcall-aixdesc)
|
||||||
|
AFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mabi=elfv1)
|
||||||
endif
|
endif
|
||||||
CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mcmodel=medium,$(call cc-option,-mminimal-toc))
|
CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mcmodel=medium,$(call cc-option,-mminimal-toc))
|
||||||
CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mno-pointers-to-nested-functions)
|
CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mno-pointers-to-nested-functions)
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ static inline __wsum csum_add(__wsum csum, __wsum addend)
|
|||||||
|
|
||||||
#ifdef __powerpc64__
|
#ifdef __powerpc64__
|
||||||
res += (__force u64)addend;
|
res += (__force u64)addend;
|
||||||
return (__force __wsum)((u32)res + (res >> 32));
|
return (__force __wsum) from64to32(res);
|
||||||
#else
|
#else
|
||||||
asm("addc %0,%0,%1;"
|
asm("addc %0,%0,%1;"
|
||||||
"addze %0,%0;"
|
"addze %0,%0;"
|
||||||
|
|||||||
@@ -97,6 +97,7 @@ _GLOBAL(__setup_cpu_power9)
|
|||||||
beqlr
|
beqlr
|
||||||
li r0,0
|
li r0,0
|
||||||
mtspr SPRN_LPID,r0
|
mtspr SPRN_LPID,r0
|
||||||
|
mtspr SPRN_PID,r0
|
||||||
mfspr r3,SPRN_LPCR
|
mfspr r3,SPRN_LPCR
|
||||||
LOAD_REG_IMMEDIATE(r4, LPCR_PECEDH | LPCR_PECE_HVEE | LPCR_HVICE)
|
LOAD_REG_IMMEDIATE(r4, LPCR_PECEDH | LPCR_PECE_HVEE | LPCR_HVICE)
|
||||||
or r3, r3, r4
|
or r3, r3, r4
|
||||||
@@ -119,6 +120,7 @@ _GLOBAL(__restore_cpu_power9)
|
|||||||
beqlr
|
beqlr
|
||||||
li r0,0
|
li r0,0
|
||||||
mtspr SPRN_LPID,r0
|
mtspr SPRN_LPID,r0
|
||||||
|
mtspr SPRN_PID,r0
|
||||||
mfspr r3,SPRN_LPCR
|
mfspr r3,SPRN_LPCR
|
||||||
LOAD_REG_IMMEDIATE(r4, LPCR_PECEDH | LPCR_PECE_HVEE | LPCR_HVICE)
|
LOAD_REG_IMMEDIATE(r4, LPCR_PECEDH | LPCR_PECE_HVEE | LPCR_HVICE)
|
||||||
or r3, r3, r4
|
or r3, r3, r4
|
||||||
|
|||||||
@@ -173,6 +173,10 @@ redo:
|
|||||||
*/
|
*/
|
||||||
register_process_table(__pa(process_tb), 0, PRTB_SIZE_SHIFT - 12);
|
register_process_table(__pa(process_tb), 0, PRTB_SIZE_SHIFT - 12);
|
||||||
pr_info("Process table %p and radix root for kernel: %p\n", process_tb, init_mm.pgd);
|
pr_info("Process table %p and radix root for kernel: %p\n", process_tb, init_mm.pgd);
|
||||||
|
asm volatile("ptesync" : : : "memory");
|
||||||
|
asm volatile(PPC_TLBIE_5(%0,%1,2,1,1) : :
|
||||||
|
"r" (TLBIEL_INVAL_SET_LPID), "r" (0));
|
||||||
|
asm volatile("eieio; tlbsync; ptesync" : : : "memory");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void __init radix_init_partition_table(void)
|
static void __init radix_init_partition_table(void)
|
||||||
|
|||||||
@@ -2623,6 +2623,9 @@ static long pnv_pci_ioda2_table_alloc_pages(int nid, __u64 bus_offset,
|
|||||||
level_shift = entries_shift + 3;
|
level_shift = entries_shift + 3;
|
||||||
level_shift = max_t(unsigned, level_shift, PAGE_SHIFT);
|
level_shift = max_t(unsigned, level_shift, PAGE_SHIFT);
|
||||||
|
|
||||||
|
if ((level_shift - 3) * levels + page_shift >= 60)
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
/* Allocate TCE table */
|
/* Allocate TCE table */
|
||||||
addr = pnv_pci_ioda2_table_do_alloc_pages(nid, level_shift,
|
addr = pnv_pci_ioda2_table_do_alloc_pages(nid, level_shift,
|
||||||
levels, tce_table_size, &offset, &total_allocated);
|
levels, tce_table_size, &offset, &total_allocated);
|
||||||
|
|||||||
@@ -274,7 +274,9 @@ failed:
|
|||||||
if (bank->disk->major > 0)
|
if (bank->disk->major > 0)
|
||||||
unregister_blkdev(bank->disk->major,
|
unregister_blkdev(bank->disk->major,
|
||||||
bank->disk->disk_name);
|
bank->disk->disk_name);
|
||||||
|
if (bank->disk->flags & GENHD_FL_UP)
|
||||||
del_gendisk(bank->disk);
|
del_gendisk(bank->disk);
|
||||||
|
put_disk(bank->disk);
|
||||||
}
|
}
|
||||||
device->dev.platform_data = NULL;
|
device->dev.platform_data = NULL;
|
||||||
if (bank->io_addr != 0)
|
if (bank->io_addr != 0)
|
||||||
@@ -299,6 +301,7 @@ axon_ram_remove(struct platform_device *device)
|
|||||||
device_remove_file(&device->dev, &dev_attr_ecc);
|
device_remove_file(&device->dev, &dev_attr_ecc);
|
||||||
free_irq(bank->irq_id, device);
|
free_irq(bank->irq_id, device);
|
||||||
del_gendisk(bank->disk);
|
del_gendisk(bank->disk);
|
||||||
|
put_disk(bank->disk);
|
||||||
iounmap((void __iomem *) bank->io_addr);
|
iounmap((void __iomem *) bank->io_addr);
|
||||||
kfree(bank);
|
kfree(bank);
|
||||||
|
|
||||||
|
|||||||
@@ -369,10 +369,10 @@ SYSCALL(sys_recvmmsg,compat_sys_recvmmsg)
|
|||||||
SYSCALL(sys_sendmmsg,compat_sys_sendmmsg)
|
SYSCALL(sys_sendmmsg,compat_sys_sendmmsg)
|
||||||
SYSCALL(sys_socket,sys_socket)
|
SYSCALL(sys_socket,sys_socket)
|
||||||
SYSCALL(sys_socketpair,compat_sys_socketpair) /* 360 */
|
SYSCALL(sys_socketpair,compat_sys_socketpair) /* 360 */
|
||||||
SYSCALL(sys_bind,sys_bind)
|
SYSCALL(sys_bind,compat_sys_bind)
|
||||||
SYSCALL(sys_connect,sys_connect)
|
SYSCALL(sys_connect,compat_sys_connect)
|
||||||
SYSCALL(sys_listen,sys_listen)
|
SYSCALL(sys_listen,sys_listen)
|
||||||
SYSCALL(sys_accept4,sys_accept4)
|
SYSCALL(sys_accept4,compat_sys_accept4)
|
||||||
SYSCALL(sys_getsockopt,compat_sys_getsockopt) /* 365 */
|
SYSCALL(sys_getsockopt,compat_sys_getsockopt) /* 365 */
|
||||||
SYSCALL(sys_setsockopt,compat_sys_setsockopt)
|
SYSCALL(sys_setsockopt,compat_sys_setsockopt)
|
||||||
SYSCALL(sys_getsockname,compat_sys_getsockname)
|
SYSCALL(sys_getsockname,compat_sys_getsockname)
|
||||||
|
|||||||
@@ -197,8 +197,6 @@ static int try_handle_skey(struct kvm_vcpu *vcpu)
|
|||||||
VCPU_EVENT(vcpu, 4, "%s", "retrying storage key operation");
|
VCPU_EVENT(vcpu, 4, "%s", "retrying storage key operation");
|
||||||
return -EAGAIN;
|
return -EAGAIN;
|
||||||
}
|
}
|
||||||
if (vcpu->arch.sie_block->gpsw.mask & PSW_MASK_PSTATE)
|
|
||||||
return kvm_s390_inject_program_int(vcpu, PGM_PRIVILEGED_OP);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -209,6 +207,9 @@ static int handle_iske(struct kvm_vcpu *vcpu)
|
|||||||
int reg1, reg2;
|
int reg1, reg2;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
|
if (vcpu->arch.sie_block->gpsw.mask & PSW_MASK_PSTATE)
|
||||||
|
return kvm_s390_inject_program_int(vcpu, PGM_PRIVILEGED_OP);
|
||||||
|
|
||||||
rc = try_handle_skey(vcpu);
|
rc = try_handle_skey(vcpu);
|
||||||
if (rc)
|
if (rc)
|
||||||
return rc != -EAGAIN ? rc : 0;
|
return rc != -EAGAIN ? rc : 0;
|
||||||
@@ -238,6 +239,9 @@ static int handle_rrbe(struct kvm_vcpu *vcpu)
|
|||||||
int reg1, reg2;
|
int reg1, reg2;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
|
if (vcpu->arch.sie_block->gpsw.mask & PSW_MASK_PSTATE)
|
||||||
|
return kvm_s390_inject_program_int(vcpu, PGM_PRIVILEGED_OP);
|
||||||
|
|
||||||
rc = try_handle_skey(vcpu);
|
rc = try_handle_skey(vcpu);
|
||||||
if (rc)
|
if (rc)
|
||||||
return rc != -EAGAIN ? rc : 0;
|
return rc != -EAGAIN ? rc : 0;
|
||||||
@@ -273,6 +277,9 @@ static int handle_sske(struct kvm_vcpu *vcpu)
|
|||||||
int reg1, reg2;
|
int reg1, reg2;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
|
if (vcpu->arch.sie_block->gpsw.mask & PSW_MASK_PSTATE)
|
||||||
|
return kvm_s390_inject_program_int(vcpu, PGM_PRIVILEGED_OP);
|
||||||
|
|
||||||
rc = try_handle_skey(vcpu);
|
rc = try_handle_skey(vcpu);
|
||||||
if (rc)
|
if (rc)
|
||||||
return rc != -EAGAIN ? rc : 0;
|
return rc != -EAGAIN ? rc : 0;
|
||||||
|
|||||||
@@ -2391,9 +2391,16 @@ void __init mem_init(void)
|
|||||||
{
|
{
|
||||||
high_memory = __va(last_valid_pfn << PAGE_SHIFT);
|
high_memory = __va(last_valid_pfn << PAGE_SHIFT);
|
||||||
|
|
||||||
register_page_bootmem_info();
|
|
||||||
free_all_bootmem();
|
free_all_bootmem();
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Must be done after boot memory is put on freelist, because here we
|
||||||
|
* might set fields in deferred struct pages that have not yet been
|
||||||
|
* initialized, and free_all_bootmem() initializes all the reserved
|
||||||
|
* deferred pages for us.
|
||||||
|
*/
|
||||||
|
register_page_bootmem_info();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Set up the zero page, mark it reserved, so that page count
|
* Set up the zero page, mark it reserved, so that page count
|
||||||
* is not manipulated when freeing the page from user ptes.
|
* is not manipulated when freeing the page from user ptes.
|
||||||
|
|||||||
@@ -1397,4 +1397,7 @@ static inline int kvm_cpu_get_apicid(int mps_cpu)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void kvm_arch_mmu_notifier_invalidate_range(struct kvm *kvm,
|
||||||
|
unsigned long start, unsigned long end);
|
||||||
|
|
||||||
#endif /* _ASM_X86_KVM_HOST_H */
|
#endif /* _ASM_X86_KVM_HOST_H */
|
||||||
|
|||||||
@@ -354,7 +354,7 @@ static int hpet_resume(struct clock_event_device *evt, int timer)
|
|||||||
|
|
||||||
irq_domain_deactivate_irq(irq_get_irq_data(hdev->irq));
|
irq_domain_deactivate_irq(irq_get_irq_data(hdev->irq));
|
||||||
irq_domain_activate_irq(irq_get_irq_data(hdev->irq));
|
irq_domain_activate_irq(irq_get_irq_data(hdev->irq));
|
||||||
disable_irq(hdev->irq);
|
disable_hardirq(hdev->irq);
|
||||||
irq_set_affinity(hdev->irq, cpumask_of(hdev->cpu));
|
irq_set_affinity(hdev->irq, cpumask_of(hdev->cpu));
|
||||||
enable_irq(hdev->irq);
|
enable_irq(hdev->irq);
|
||||||
}
|
}
|
||||||
|
|||||||
+7
-24
@@ -6413,12 +6413,7 @@ static __init int hardware_setup(void)
|
|||||||
memset(vmx_vmread_bitmap, 0xff, PAGE_SIZE);
|
memset(vmx_vmread_bitmap, 0xff, PAGE_SIZE);
|
||||||
memset(vmx_vmwrite_bitmap, 0xff, PAGE_SIZE);
|
memset(vmx_vmwrite_bitmap, 0xff, PAGE_SIZE);
|
||||||
|
|
||||||
/*
|
|
||||||
* Allow direct access to the PC debug port (it is often used for I/O
|
|
||||||
* delays, but the vmexits simply slow things down).
|
|
||||||
*/
|
|
||||||
memset(vmx_io_bitmap_a, 0xff, PAGE_SIZE);
|
memset(vmx_io_bitmap_a, 0xff, PAGE_SIZE);
|
||||||
clear_bit(0x80, vmx_io_bitmap_a);
|
|
||||||
|
|
||||||
memset(vmx_io_bitmap_b, 0xff, PAGE_SIZE);
|
memset(vmx_io_bitmap_b, 0xff, PAGE_SIZE);
|
||||||
|
|
||||||
@@ -7208,9 +7203,8 @@ static int handle_vmoff(struct kvm_vcpu *vcpu)
|
|||||||
static int handle_vmclear(struct kvm_vcpu *vcpu)
|
static int handle_vmclear(struct kvm_vcpu *vcpu)
|
||||||
{
|
{
|
||||||
struct vcpu_vmx *vmx = to_vmx(vcpu);
|
struct vcpu_vmx *vmx = to_vmx(vcpu);
|
||||||
|
u32 zero = 0;
|
||||||
gpa_t vmptr;
|
gpa_t vmptr;
|
||||||
struct vmcs12 *vmcs12;
|
|
||||||
struct page *page;
|
|
||||||
|
|
||||||
if (!nested_vmx_check_permission(vcpu))
|
if (!nested_vmx_check_permission(vcpu))
|
||||||
return 1;
|
return 1;
|
||||||
@@ -7221,22 +7215,9 @@ static int handle_vmclear(struct kvm_vcpu *vcpu)
|
|||||||
if (vmptr == vmx->nested.current_vmptr)
|
if (vmptr == vmx->nested.current_vmptr)
|
||||||
nested_release_vmcs12(vmx);
|
nested_release_vmcs12(vmx);
|
||||||
|
|
||||||
page = nested_get_page(vcpu, vmptr);
|
kvm_vcpu_write_guest(vcpu,
|
||||||
if (page == NULL) {
|
vmptr + offsetof(struct vmcs12, launch_state),
|
||||||
/*
|
&zero, sizeof(zero));
|
||||||
* For accurate processor emulation, VMCLEAR beyond available
|
|
||||||
* physical memory should do nothing at all. However, it is
|
|
||||||
* possible that a nested vmx bug, not a guest hypervisor bug,
|
|
||||||
* resulted in this case, so let's shut down before doing any
|
|
||||||
* more damage:
|
|
||||||
*/
|
|
||||||
kvm_make_request(KVM_REQ_TRIPLE_FAULT, vcpu);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
vmcs12 = kmap(page);
|
|
||||||
vmcs12->launch_state = 0;
|
|
||||||
kunmap(page);
|
|
||||||
nested_release_page(page);
|
|
||||||
|
|
||||||
nested_free_vmcs02(vmx, vmptr);
|
nested_free_vmcs02(vmx, vmptr);
|
||||||
|
|
||||||
@@ -10902,8 +10883,10 @@ static void nested_vmx_vmexit(struct kvm_vcpu *vcpu, u32 exit_reason,
|
|||||||
*/
|
*/
|
||||||
static void vmx_leave_nested(struct kvm_vcpu *vcpu)
|
static void vmx_leave_nested(struct kvm_vcpu *vcpu)
|
||||||
{
|
{
|
||||||
if (is_guest_mode(vcpu))
|
if (is_guest_mode(vcpu)) {
|
||||||
|
to_vmx(vcpu)->nested.nested_run_pending = 0;
|
||||||
nested_vmx_vmexit(vcpu, -1, 0, 0);
|
nested_vmx_vmexit(vcpu, -1, 0, 0);
|
||||||
|
}
|
||||||
free_nested(to_vmx(vcpu));
|
free_nested(to_vmx(vcpu));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6526,6 +6526,20 @@ static void kvm_vcpu_flush_tlb(struct kvm_vcpu *vcpu)
|
|||||||
kvm_x86_ops->tlb_flush(vcpu);
|
kvm_x86_ops->tlb_flush(vcpu);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void kvm_arch_mmu_notifier_invalidate_range(struct kvm *kvm,
|
||||||
|
unsigned long start, unsigned long end)
|
||||||
|
{
|
||||||
|
unsigned long apic_address;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The physical address of apic access page is stored in the VMCS.
|
||||||
|
* Update it when it becomes invalid.
|
||||||
|
*/
|
||||||
|
apic_address = gfn_to_hva(kvm, APIC_DEFAULT_PHYS_BASE >> PAGE_SHIFT);
|
||||||
|
if (start <= apic_address && apic_address < end)
|
||||||
|
kvm_make_all_cpus_request(kvm, KVM_REQ_APIC_PAGE_RELOAD);
|
||||||
|
}
|
||||||
|
|
||||||
void kvm_vcpu_reload_apic_access_page(struct kvm_vcpu *vcpu)
|
void kvm_vcpu_reload_apic_access_page(struct kvm_vcpu *vcpu)
|
||||||
{
|
{
|
||||||
struct page *page = NULL;
|
struct page *page = NULL;
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ static int __init broadcom_postcore_init(void)
|
|||||||
* We should get host bridge information from ACPI unless the BIOS
|
* We should get host bridge information from ACPI unless the BIOS
|
||||||
* doesn't support it.
|
* doesn't support it.
|
||||||
*/
|
*/
|
||||||
if (acpi_os_get_root_pointer())
|
if (!acpi_disabled && acpi_os_get_root_pointer())
|
||||||
return 0;
|
return 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -1848,7 +1848,6 @@ static void pq_init(int node, int pnode)
|
|||||||
|
|
||||||
ops.write_payload_first(pnode, first);
|
ops.write_payload_first(pnode, first);
|
||||||
ops.write_payload_last(pnode, last);
|
ops.write_payload_last(pnode, last);
|
||||||
ops.write_g_sw_ack(pnode, 0xffffUL);
|
|
||||||
|
|
||||||
/* in effect, all msg_type's are set to MSG_NOOP */
|
/* in effect, all msg_type's are set to MSG_NOOP */
|
||||||
memset(pqp, 0, sizeof(struct bau_pq_entry) * DEST_Q_SIZE);
|
memset(pqp, 0, sizeof(struct bau_pq_entry) * DEST_Q_SIZE);
|
||||||
|
|||||||
+2
-2
@@ -529,8 +529,8 @@ void blk_set_queue_dying(struct request_queue *q)
|
|||||||
|
|
||||||
blk_queue_for_each_rl(rl, q) {
|
blk_queue_for_each_rl(rl, q) {
|
||||||
if (rl->rq_pool) {
|
if (rl->rq_pool) {
|
||||||
wake_up(&rl->wait[BLK_RW_SYNC]);
|
wake_up_all(&rl->wait[BLK_RW_SYNC]);
|
||||||
wake_up(&rl->wait[BLK_RW_ASYNC]);
|
wake_up_all(&rl->wait[BLK_RW_ASYNC]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -429,7 +429,7 @@ void blk_mq_hctx_kobj_init(struct blk_mq_hw_ctx *hctx)
|
|||||||
kobject_init(&hctx->kobj, &blk_mq_hw_ktype);
|
kobject_init(&hctx->kobj, &blk_mq_hw_ktype);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void blk_mq_sysfs_init(struct request_queue *q)
|
void blk_mq_sysfs_init(struct request_queue *q)
|
||||||
{
|
{
|
||||||
struct blk_mq_ctx *ctx;
|
struct blk_mq_ctx *ctx;
|
||||||
int cpu;
|
int cpu;
|
||||||
@@ -449,8 +449,6 @@ int blk_mq_register_dev(struct device *dev, struct request_queue *q)
|
|||||||
|
|
||||||
blk_mq_disable_hotplug();
|
blk_mq_disable_hotplug();
|
||||||
|
|
||||||
blk_mq_sysfs_init(q);
|
|
||||||
|
|
||||||
ret = kobject_add(&q->mq_kobj, kobject_get(&dev->kobj), "%s", "mq");
|
ret = kobject_add(&q->mq_kobj, kobject_get(&dev->kobj), "%s", "mq");
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
goto out;
|
goto out;
|
||||||
|
|||||||
+3
-1
@@ -1707,7 +1707,6 @@ static void blk_mq_init_cpu_queues(struct request_queue *q,
|
|||||||
struct blk_mq_ctx *__ctx = per_cpu_ptr(q->queue_ctx, i);
|
struct blk_mq_ctx *__ctx = per_cpu_ptr(q->queue_ctx, i);
|
||||||
struct blk_mq_hw_ctx *hctx;
|
struct blk_mq_hw_ctx *hctx;
|
||||||
|
|
||||||
memset(__ctx, 0, sizeof(*__ctx));
|
|
||||||
__ctx->cpu = i;
|
__ctx->cpu = i;
|
||||||
spin_lock_init(&__ctx->lock);
|
spin_lock_init(&__ctx->lock);
|
||||||
INIT_LIST_HEAD(&__ctx->rq_list);
|
INIT_LIST_HEAD(&__ctx->rq_list);
|
||||||
@@ -1970,6 +1969,9 @@ struct request_queue *blk_mq_init_allocated_queue(struct blk_mq_tag_set *set,
|
|||||||
if (!q->queue_ctx)
|
if (!q->queue_ctx)
|
||||||
goto err_exit;
|
goto err_exit;
|
||||||
|
|
||||||
|
/* init q->mq_kobj and sw queues' kobjects */
|
||||||
|
blk_mq_sysfs_init(q);
|
||||||
|
|
||||||
q->queue_hw_ctx = kzalloc_node(nr_cpu_ids * sizeof(*(q->queue_hw_ctx)),
|
q->queue_hw_ctx = kzalloc_node(nr_cpu_ids * sizeof(*(q->queue_hw_ctx)),
|
||||||
GFP_KERNEL, set->numa_node);
|
GFP_KERNEL, set->numa_node);
|
||||||
if (!q->queue_hw_ctx)
|
if (!q->queue_hw_ctx)
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ static inline struct blk_mq_hw_ctx *blk_mq_map_queue(struct request_queue *q,
|
|||||||
/*
|
/*
|
||||||
* sysfs helpers
|
* sysfs helpers
|
||||||
*/
|
*/
|
||||||
|
extern void blk_mq_sysfs_init(struct request_queue *q);
|
||||||
extern int blk_mq_sysfs_register(struct request_queue *q);
|
extern int blk_mq_sysfs_register(struct request_queue *q);
|
||||||
extern void blk_mq_sysfs_unregister(struct request_queue *q);
|
extern void blk_mq_sysfs_unregister(struct request_queue *q);
|
||||||
extern void blk_mq_hctx_kobj_init(struct blk_mq_hw_ctx *hctx);
|
extern void blk_mq_hctx_kobj_init(struct blk_mq_hw_ctx *hctx);
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ static int pkcs7_find_key(struct pkcs7_message *pkcs7,
|
|||||||
pr_devel("Sig %u: Found cert serial match X.509[%u]\n",
|
pr_devel("Sig %u: Found cert serial match X.509[%u]\n",
|
||||||
sinfo->index, certix);
|
sinfo->index, certix);
|
||||||
|
|
||||||
if (x509->pub->pkey_algo != sinfo->sig->pkey_algo) {
|
if (strcmp(x509->pub->pkey_algo, sinfo->sig->pkey_algo) != 0) {
|
||||||
pr_warn("Sig %u: X.509 algo and PKCS#7 sig algo don't match\n",
|
pr_warn("Sig %u: X.509 algo and PKCS#7 sig algo don't match\n",
|
||||||
sinfo->index);
|
sinfo->index);
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
@@ -408,6 +408,8 @@ int x509_extract_key_data(void *context, size_t hdrlen,
|
|||||||
ctx->cert->pub->pkey_algo = "rsa";
|
ctx->cert->pub->pkey_algo = "rsa";
|
||||||
|
|
||||||
/* Discard the BIT STRING metadata */
|
/* Discard the BIT STRING metadata */
|
||||||
|
if (vlen < 1 || *(const u8 *)value != 0)
|
||||||
|
return -EBADMSG;
|
||||||
ctx->key = value + 1;
|
ctx->key = value + 1;
|
||||||
ctx->key_size = vlen - 1;
|
ctx->key_size = vlen - 1;
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ int x509_check_for_self_signed(struct x509_certificate *cert)
|
|||||||
}
|
}
|
||||||
|
|
||||||
ret = -EKEYREJECTED;
|
ret = -EKEYREJECTED;
|
||||||
if (cert->pub->pkey_algo != cert->sig->pkey_algo)
|
if (strcmp(cert->pub->pkey_algo, cert->sig->pkey_algo) != 0)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
ret = public_key_verify_signature(cert->pub, cert->sig);
|
ret = public_key_verify_signature(cert->pub, cert->sig);
|
||||||
|
|||||||
@@ -1481,7 +1481,6 @@ unsigned int ata_sff_qc_issue(struct ata_queued_cmd *qc)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
WARN_ON_ONCE(1);
|
|
||||||
return AC_ERR_SYSTEM;
|
return AC_ERR_SYSTEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2802,7 +2802,7 @@ out:
|
|||||||
return err;
|
return err;
|
||||||
|
|
||||||
out_free_irq:
|
out_free_irq:
|
||||||
free_irq(dev->irq, dev);
|
free_irq(irq, dev);
|
||||||
out_free:
|
out_free:
|
||||||
kfree(dev);
|
kfree(dev);
|
||||||
out_release:
|
out_release:
|
||||||
|
|||||||
+5
-5
@@ -39,7 +39,7 @@ static int isa_bus_probe(struct device *dev)
|
|||||||
{
|
{
|
||||||
struct isa_driver *isa_driver = dev->platform_data;
|
struct isa_driver *isa_driver = dev->platform_data;
|
||||||
|
|
||||||
if (isa_driver->probe)
|
if (isa_driver && isa_driver->probe)
|
||||||
return isa_driver->probe(dev, to_isa_dev(dev)->id);
|
return isa_driver->probe(dev, to_isa_dev(dev)->id);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@@ -49,7 +49,7 @@ static int isa_bus_remove(struct device *dev)
|
|||||||
{
|
{
|
||||||
struct isa_driver *isa_driver = dev->platform_data;
|
struct isa_driver *isa_driver = dev->platform_data;
|
||||||
|
|
||||||
if (isa_driver->remove)
|
if (isa_driver && isa_driver->remove)
|
||||||
return isa_driver->remove(dev, to_isa_dev(dev)->id);
|
return isa_driver->remove(dev, to_isa_dev(dev)->id);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@@ -59,7 +59,7 @@ static void isa_bus_shutdown(struct device *dev)
|
|||||||
{
|
{
|
||||||
struct isa_driver *isa_driver = dev->platform_data;
|
struct isa_driver *isa_driver = dev->platform_data;
|
||||||
|
|
||||||
if (isa_driver->shutdown)
|
if (isa_driver && isa_driver->shutdown)
|
||||||
isa_driver->shutdown(dev, to_isa_dev(dev)->id);
|
isa_driver->shutdown(dev, to_isa_dev(dev)->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -67,7 +67,7 @@ static int isa_bus_suspend(struct device *dev, pm_message_t state)
|
|||||||
{
|
{
|
||||||
struct isa_driver *isa_driver = dev->platform_data;
|
struct isa_driver *isa_driver = dev->platform_data;
|
||||||
|
|
||||||
if (isa_driver->suspend)
|
if (isa_driver && isa_driver->suspend)
|
||||||
return isa_driver->suspend(dev, to_isa_dev(dev)->id, state);
|
return isa_driver->suspend(dev, to_isa_dev(dev)->id, state);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@@ -77,7 +77,7 @@ static int isa_bus_resume(struct device *dev)
|
|||||||
{
|
{
|
||||||
struct isa_driver *isa_driver = dev->platform_data;
|
struct isa_driver *isa_driver = dev->platform_data;
|
||||||
|
|
||||||
if (isa_driver->resume)
|
if (isa_driver && isa_driver->resume)
|
||||||
return isa_driver->resume(dev, to_isa_dev(dev)->id);
|
return isa_driver->resume(dev, to_isa_dev(dev)->id);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@@ -1286,6 +1286,8 @@ static int zram_add(void)
|
|||||||
blk_queue_io_min(zram->disk->queue, PAGE_SIZE);
|
blk_queue_io_min(zram->disk->queue, PAGE_SIZE);
|
||||||
blk_queue_io_opt(zram->disk->queue, PAGE_SIZE);
|
blk_queue_io_opt(zram->disk->queue, PAGE_SIZE);
|
||||||
zram->disk->queue->limits.discard_granularity = PAGE_SIZE;
|
zram->disk->queue->limits.discard_granularity = PAGE_SIZE;
|
||||||
|
zram->disk->queue->limits.max_sectors = SECTORS_PER_PAGE;
|
||||||
|
zram->disk->queue->limits.chunk_sectors = 0;
|
||||||
blk_queue_max_discard_sectors(zram->disk->queue, UINT_MAX);
|
blk_queue_max_discard_sectors(zram->disk->queue, UINT_MAX);
|
||||||
/*
|
/*
|
||||||
* zram_bio_discard() will clear all logical blocks if logical block
|
* zram_bio_discard() will clear all logical blocks if logical block
|
||||||
|
|||||||
@@ -1755,14 +1755,17 @@ static int cci_pmu_probe(struct platform_device *pdev)
|
|||||||
raw_spin_lock_init(&cci_pmu->hw_events.pmu_lock);
|
raw_spin_lock_init(&cci_pmu->hw_events.pmu_lock);
|
||||||
mutex_init(&cci_pmu->reserve_mutex);
|
mutex_init(&cci_pmu->reserve_mutex);
|
||||||
atomic_set(&cci_pmu->active_events, 0);
|
atomic_set(&cci_pmu->active_events, 0);
|
||||||
cpumask_set_cpu(smp_processor_id(), &cci_pmu->cpus);
|
cpumask_set_cpu(get_cpu(), &cci_pmu->cpus);
|
||||||
|
|
||||||
ret = cci_pmu_init(cci_pmu, pdev);
|
ret = cci_pmu_init(cci_pmu, pdev);
|
||||||
if (ret)
|
if (ret) {
|
||||||
|
put_cpu();
|
||||||
return ret;
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
cpuhp_state_add_instance_nocalls(CPUHP_AP_PERF_ARM_CCI_ONLINE,
|
cpuhp_state_add_instance_nocalls(CPUHP_AP_PERF_ARM_CCI_ONLINE,
|
||||||
&cci_pmu->node);
|
&cci_pmu->node);
|
||||||
|
put_cpu();
|
||||||
pr_info("ARM %s PMU driver probed", cci_pmu->model->name);
|
pr_info("ARM %s PMU driver probed", cci_pmu->model->name);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1271,6 +1271,10 @@ static int arm_ccn_pmu_init(struct arm_ccn *ccn)
|
|||||||
int len = snprintf(NULL, 0, "ccn_%d", ccn->dt.id);
|
int len = snprintf(NULL, 0, "ccn_%d", ccn->dt.id);
|
||||||
|
|
||||||
name = devm_kzalloc(ccn->dev, len + 1, GFP_KERNEL);
|
name = devm_kzalloc(ccn->dev, len + 1, GFP_KERNEL);
|
||||||
|
if (!name) {
|
||||||
|
err = -ENOMEM;
|
||||||
|
goto error_choose_name;
|
||||||
|
}
|
||||||
snprintf(name, len + 1, "ccn_%d", ccn->dt.id);
|
snprintf(name, len + 1, "ccn_%d", ccn->dt.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1297,7 +1301,7 @@ static int arm_ccn_pmu_init(struct arm_ccn *ccn)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Pick one CPU which we will use to collect data from CCN... */
|
/* Pick one CPU which we will use to collect data from CCN... */
|
||||||
cpumask_set_cpu(smp_processor_id(), &ccn->dt.cpu);
|
cpumask_set_cpu(get_cpu(), &ccn->dt.cpu);
|
||||||
|
|
||||||
/* Also make sure that the overflow interrupt is handled by this CPU */
|
/* Also make sure that the overflow interrupt is handled by this CPU */
|
||||||
if (ccn->irq) {
|
if (ccn->irq) {
|
||||||
@@ -1314,10 +1318,13 @@ static int arm_ccn_pmu_init(struct arm_ccn *ccn)
|
|||||||
|
|
||||||
cpuhp_state_add_instance_nocalls(CPUHP_AP_PERF_ARM_CCN_ONLINE,
|
cpuhp_state_add_instance_nocalls(CPUHP_AP_PERF_ARM_CCN_ONLINE,
|
||||||
&ccn->dt.node);
|
&ccn->dt.node);
|
||||||
|
put_cpu();
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
error_pmu_register:
|
error_pmu_register:
|
||||||
error_set_affinity:
|
error_set_affinity:
|
||||||
|
put_cpu();
|
||||||
|
error_choose_name:
|
||||||
ida_simple_remove(&arm_ccn_pmu_ida, ccn->dt.id);
|
ida_simple_remove(&arm_ccn_pmu_ida, ccn->dt.id);
|
||||||
for (i = 0; i < ccn->num_xps; i++)
|
for (i = 0; i < ccn->num_xps; i++)
|
||||||
writel(0, ccn->xp[i].base + CCN_XP_DT_CONTROL);
|
writel(0, ccn->xp[i].base + CCN_XP_DT_CONTROL);
|
||||||
@@ -1578,8 +1585,8 @@ static int __init arm_ccn_init(void)
|
|||||||
|
|
||||||
static void __exit arm_ccn_exit(void)
|
static void __exit arm_ccn_exit(void)
|
||||||
{
|
{
|
||||||
cpuhp_remove_multi_state(CPUHP_AP_PERF_ARM_CCN_ONLINE);
|
|
||||||
platform_driver_unregister(&arm_ccn_driver);
|
platform_driver_unregister(&arm_ccn_driver);
|
||||||
|
cpuhp_remove_multi_state(CPUHP_AP_PERF_ARM_CCN_ONLINE);
|
||||||
}
|
}
|
||||||
|
|
||||||
module_init(arm_ccn_init);
|
module_init(arm_ccn_init);
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ const struct uniphier_clk_data uniphier_sld8_sys_clk_data[] = {
|
|||||||
const struct uniphier_clk_data uniphier_pro5_sys_clk_data[] = {
|
const struct uniphier_clk_data uniphier_pro5_sys_clk_data[] = {
|
||||||
UNIPHIER_CLK_FACTOR("spll", -1, "ref", 120, 1), /* 2400 MHz */
|
UNIPHIER_CLK_FACTOR("spll", -1, "ref", 120, 1), /* 2400 MHz */
|
||||||
UNIPHIER_CLK_FACTOR("dapll1", -1, "ref", 128, 1), /* 2560 MHz */
|
UNIPHIER_CLK_FACTOR("dapll1", -1, "ref", 128, 1), /* 2560 MHz */
|
||||||
UNIPHIER_CLK_FACTOR("dapll2", -1, "ref", 144, 125), /* 2949.12 MHz */
|
UNIPHIER_CLK_FACTOR("dapll2", -1, "dapll1", 144, 125), /* 2949.12 MHz */
|
||||||
UNIPHIER_CLK_FACTOR("uart", 0, "dapll2", 1, 40),
|
UNIPHIER_CLK_FACTOR("uart", 0, "dapll2", 1, 40),
|
||||||
UNIPHIER_CLK_FACTOR("i2c", 1, "spll", 1, 48),
|
UNIPHIER_CLK_FACTOR("i2c", 1, "spll", 1, 48),
|
||||||
UNIPHIER_PRO5_SYS_CLK_SD,
|
UNIPHIER_PRO5_SYS_CLK_SD,
|
||||||
|
|||||||
@@ -805,8 +805,9 @@ static int s5p_aes_probe(struct platform_device *pdev)
|
|||||||
dev_warn(dev, "feed control interrupt is not available.\n");
|
dev_warn(dev, "feed control interrupt is not available.\n");
|
||||||
goto err_irq;
|
goto err_irq;
|
||||||
}
|
}
|
||||||
err = devm_request_irq(dev, pdata->irq_fc, s5p_aes_interrupt,
|
err = devm_request_threaded_irq(dev, pdata->irq_fc, NULL,
|
||||||
IRQF_SHARED, pdev->name, pdev);
|
s5p_aes_interrupt, IRQF_ONESHOT,
|
||||||
|
pdev->name, pdev);
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
dev_warn(dev, "feed control interrupt is not available.\n");
|
dev_warn(dev, "feed control interrupt is not available.\n");
|
||||||
goto err_irq;
|
goto err_irq;
|
||||||
|
|||||||
+45
-19
@@ -1232,12 +1232,11 @@ static int ipsec_esp(struct talitos_edesc *edesc, struct aead_request *areq,
|
|||||||
sg_link_tbl_len += authsize;
|
sg_link_tbl_len += authsize;
|
||||||
}
|
}
|
||||||
|
|
||||||
sg_count = talitos_sg_map(dev, areq->src, cryptlen, edesc,
|
ret = talitos_sg_map(dev, areq->src, sg_link_tbl_len, edesc,
|
||||||
&desc->ptr[4], sg_count, areq->assoclen,
|
&desc->ptr[4], sg_count, areq->assoclen, tbl_off);
|
||||||
tbl_off);
|
|
||||||
|
|
||||||
if (sg_count > 1) {
|
if (ret > 1) {
|
||||||
tbl_off += sg_count;
|
tbl_off += ret;
|
||||||
sync_needed = true;
|
sync_needed = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1248,14 +1247,15 @@ static int ipsec_esp(struct talitos_edesc *edesc, struct aead_request *areq,
|
|||||||
dma_map_sg(dev, areq->dst, sg_count, DMA_FROM_DEVICE);
|
dma_map_sg(dev, areq->dst, sg_count, DMA_FROM_DEVICE);
|
||||||
}
|
}
|
||||||
|
|
||||||
sg_count = talitos_sg_map(dev, areq->dst, cryptlen, edesc,
|
ret = talitos_sg_map(dev, areq->dst, cryptlen, edesc, &desc->ptr[5],
|
||||||
&desc->ptr[5], sg_count, areq->assoclen,
|
sg_count, areq->assoclen, tbl_off);
|
||||||
tbl_off);
|
|
||||||
|
|
||||||
if (desc->hdr & DESC_HDR_TYPE_IPSEC_ESP)
|
if (desc->hdr & DESC_HDR_TYPE_IPSEC_ESP)
|
||||||
to_talitos_ptr_ext_or(&desc->ptr[5], authsize, is_sec1);
|
to_talitos_ptr_ext_or(&desc->ptr[5], authsize, is_sec1);
|
||||||
|
|
||||||
if (sg_count > 1) {
|
/* ICV data */
|
||||||
|
if (ret > 1) {
|
||||||
|
tbl_off += ret;
|
||||||
edesc->icv_ool = true;
|
edesc->icv_ool = true;
|
||||||
sync_needed = true;
|
sync_needed = true;
|
||||||
|
|
||||||
@@ -1265,9 +1265,7 @@ static int ipsec_esp(struct talitos_edesc *edesc, struct aead_request *areq,
|
|||||||
sizeof(struct talitos_ptr) + authsize;
|
sizeof(struct talitos_ptr) + authsize;
|
||||||
|
|
||||||
/* Add an entry to the link table for ICV data */
|
/* Add an entry to the link table for ICV data */
|
||||||
tbl_ptr += sg_count - 1;
|
to_talitos_ptr_ext_set(tbl_ptr - 1, 0, is_sec1);
|
||||||
to_talitos_ptr_ext_set(tbl_ptr, 0, is_sec1);
|
|
||||||
tbl_ptr++;
|
|
||||||
to_talitos_ptr_ext_set(tbl_ptr, DESC_PTR_LNKTBL_RETURN,
|
to_talitos_ptr_ext_set(tbl_ptr, DESC_PTR_LNKTBL_RETURN,
|
||||||
is_sec1);
|
is_sec1);
|
||||||
to_talitos_ptr_len(tbl_ptr, authsize, is_sec1);
|
to_talitos_ptr_len(tbl_ptr, authsize, is_sec1);
|
||||||
@@ -1275,16 +1273,31 @@ static int ipsec_esp(struct talitos_edesc *edesc, struct aead_request *areq,
|
|||||||
/* icv data follows link tables */
|
/* icv data follows link tables */
|
||||||
to_talitos_ptr(tbl_ptr, edesc->dma_link_tbl + offset,
|
to_talitos_ptr(tbl_ptr, edesc->dma_link_tbl + offset,
|
||||||
is_sec1);
|
is_sec1);
|
||||||
|
} else {
|
||||||
|
dma_addr_t addr = edesc->dma_link_tbl;
|
||||||
|
|
||||||
|
if (is_sec1)
|
||||||
|
addr += areq->assoclen + cryptlen;
|
||||||
|
else
|
||||||
|
addr += sizeof(struct talitos_ptr) * tbl_off;
|
||||||
|
|
||||||
|
to_talitos_ptr(&desc->ptr[6], addr, is_sec1);
|
||||||
|
to_talitos_ptr_len(&desc->ptr[6], authsize, is_sec1);
|
||||||
}
|
}
|
||||||
|
} else if (!(desc->hdr & DESC_HDR_TYPE_IPSEC_ESP)) {
|
||||||
|
ret = talitos_sg_map(dev, areq->dst, authsize, edesc,
|
||||||
|
&desc->ptr[6], sg_count, areq->assoclen +
|
||||||
|
cryptlen,
|
||||||
|
tbl_off);
|
||||||
|
if (ret > 1) {
|
||||||
|
tbl_off += ret;
|
||||||
|
edesc->icv_ool = true;
|
||||||
|
sync_needed = true;
|
||||||
} else {
|
} else {
|
||||||
edesc->icv_ool = false;
|
edesc->icv_ool = false;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
/* ICV data */
|
edesc->icv_ool = false;
|
||||||
if (!(desc->hdr & DESC_HDR_TYPE_IPSEC_ESP)) {
|
|
||||||
to_talitos_ptr_len(&desc->ptr[6], authsize, is_sec1);
|
|
||||||
to_talitos_ptr(&desc->ptr[6], edesc->dma_link_tbl +
|
|
||||||
areq->assoclen + cryptlen, is_sec1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* iv out */
|
/* iv out */
|
||||||
@@ -1494,12 +1507,20 @@ static int ablkcipher_setkey(struct crypto_ablkcipher *cipher,
|
|||||||
const u8 *key, unsigned int keylen)
|
const u8 *key, unsigned int keylen)
|
||||||
{
|
{
|
||||||
struct talitos_ctx *ctx = crypto_ablkcipher_ctx(cipher);
|
struct talitos_ctx *ctx = crypto_ablkcipher_ctx(cipher);
|
||||||
|
u32 tmp[DES_EXPKEY_WORDS];
|
||||||
|
|
||||||
if (keylen > TALITOS_MAX_KEY_SIZE) {
|
if (keylen > TALITOS_MAX_KEY_SIZE) {
|
||||||
crypto_ablkcipher_set_flags(cipher, CRYPTO_TFM_RES_BAD_KEY_LEN);
|
crypto_ablkcipher_set_flags(cipher, CRYPTO_TFM_RES_BAD_KEY_LEN);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (unlikely(crypto_ablkcipher_get_flags(cipher) &
|
||||||
|
CRYPTO_TFM_REQ_WEAK_KEY) &&
|
||||||
|
!des_ekey(tmp, key)) {
|
||||||
|
crypto_ablkcipher_set_flags(cipher, CRYPTO_TFM_RES_WEAK_KEY);
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
memcpy(&ctx->key, key, keylen);
|
memcpy(&ctx->key, key, keylen);
|
||||||
ctx->keylen = keylen;
|
ctx->keylen = keylen;
|
||||||
|
|
||||||
@@ -2614,7 +2635,7 @@ static struct talitos_alg_template driver_algs[] = {
|
|||||||
.ivsize = AES_BLOCK_SIZE,
|
.ivsize = AES_BLOCK_SIZE,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
.desc_hdr_template = DESC_HDR_TYPE_COMMON_NONSNOOP_NO_AFEU |
|
.desc_hdr_template = DESC_HDR_TYPE_AESU_CTR_NONSNOOP |
|
||||||
DESC_HDR_SEL0_AESU |
|
DESC_HDR_SEL0_AESU |
|
||||||
DESC_HDR_MODE0_AESU_CTR,
|
DESC_HDR_MODE0_AESU_CTR,
|
||||||
},
|
},
|
||||||
@@ -3047,6 +3068,11 @@ static struct talitos_crypto_alg *talitos_alg_alloc(struct device *dev,
|
|||||||
t_alg->algt.alg.aead.setkey = aead_setkey;
|
t_alg->algt.alg.aead.setkey = aead_setkey;
|
||||||
t_alg->algt.alg.aead.encrypt = aead_encrypt;
|
t_alg->algt.alg.aead.encrypt = aead_encrypt;
|
||||||
t_alg->algt.alg.aead.decrypt = aead_decrypt;
|
t_alg->algt.alg.aead.decrypt = aead_decrypt;
|
||||||
|
if (!(priv->features & TALITOS_FTR_SHA224_HWINIT) &&
|
||||||
|
!strncmp(alg->cra_name, "authenc(hmac(sha224)", 20)) {
|
||||||
|
kfree(t_alg);
|
||||||
|
return ERR_PTR(-ENOTSUPP);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case CRYPTO_ALG_TYPE_AHASH:
|
case CRYPTO_ALG_TYPE_AHASH:
|
||||||
alg = &t_alg->algt.alg.hash.halg.base;
|
alg = &t_alg->algt.alg.hash.halg.base;
|
||||||
|
|||||||
@@ -227,7 +227,7 @@
|
|||||||
#define NREC_RDWR(x) (((x)>>11) & 1)
|
#define NREC_RDWR(x) (((x)>>11) & 1)
|
||||||
#define NREC_RANK(x) (((x)>>8) & 0x7)
|
#define NREC_RANK(x) (((x)>>8) & 0x7)
|
||||||
#define NRECMEMB 0xC0
|
#define NRECMEMB 0xC0
|
||||||
#define NREC_CAS(x) (((x)>>16) & 0xFFFFFF)
|
#define NREC_CAS(x) (((x)>>16) & 0xFFF)
|
||||||
#define NREC_RAS(x) ((x) & 0x7FFF)
|
#define NREC_RAS(x) ((x) & 0x7FFF)
|
||||||
#define NRECFGLOG 0xC4
|
#define NRECFGLOG 0xC4
|
||||||
#define NREEECFBDA 0xC8
|
#define NREEECFBDA 0xC8
|
||||||
@@ -371,7 +371,7 @@ struct i5000_error_info {
|
|||||||
/* These registers are input ONLY if there was a
|
/* These registers are input ONLY if there was a
|
||||||
* Non-Recoverable Error */
|
* Non-Recoverable Error */
|
||||||
u16 nrecmema; /* Non-Recoverable Mem log A */
|
u16 nrecmema; /* Non-Recoverable Mem log A */
|
||||||
u16 nrecmemb; /* Non-Recoverable Mem log B */
|
u32 nrecmemb; /* Non-Recoverable Mem log B */
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -407,7 +407,7 @@ static void i5000_get_error_info(struct mem_ctl_info *mci,
|
|||||||
NERR_FAT_FBD, &info->nerr_fat_fbd);
|
NERR_FAT_FBD, &info->nerr_fat_fbd);
|
||||||
pci_read_config_word(pvt->branchmap_werrors,
|
pci_read_config_word(pvt->branchmap_werrors,
|
||||||
NRECMEMA, &info->nrecmema);
|
NRECMEMA, &info->nrecmema);
|
||||||
pci_read_config_word(pvt->branchmap_werrors,
|
pci_read_config_dword(pvt->branchmap_werrors,
|
||||||
NRECMEMB, &info->nrecmemb);
|
NRECMEMB, &info->nrecmemb);
|
||||||
|
|
||||||
/* Clear the error bits, by writing them back */
|
/* Clear the error bits, by writing them back */
|
||||||
@@ -1293,7 +1293,7 @@ static int i5000_init_csrows(struct mem_ctl_info *mci)
|
|||||||
dimm->mtype = MEM_FB_DDR2;
|
dimm->mtype = MEM_FB_DDR2;
|
||||||
|
|
||||||
/* ask what device type on this row */
|
/* ask what device type on this row */
|
||||||
if (MTR_DRAM_WIDTH(mtr))
|
if (MTR_DRAM_WIDTH(mtr) == 8)
|
||||||
dimm->dtype = DEV_X8;
|
dimm->dtype = DEV_X8;
|
||||||
else
|
else
|
||||||
dimm->dtype = DEV_X4;
|
dimm->dtype = DEV_X4;
|
||||||
|
|||||||
@@ -368,7 +368,7 @@ struct i5400_error_info {
|
|||||||
|
|
||||||
/* These registers are input ONLY if there was a Non-Rec Error */
|
/* These registers are input ONLY if there was a Non-Rec Error */
|
||||||
u16 nrecmema; /* Non-Recoverable Mem log A */
|
u16 nrecmema; /* Non-Recoverable Mem log A */
|
||||||
u16 nrecmemb; /* Non-Recoverable Mem log B */
|
u32 nrecmemb; /* Non-Recoverable Mem log B */
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -458,7 +458,7 @@ static void i5400_get_error_info(struct mem_ctl_info *mci,
|
|||||||
NERR_FAT_FBD, &info->nerr_fat_fbd);
|
NERR_FAT_FBD, &info->nerr_fat_fbd);
|
||||||
pci_read_config_word(pvt->branchmap_werrors,
|
pci_read_config_word(pvt->branchmap_werrors,
|
||||||
NRECMEMA, &info->nrecmema);
|
NRECMEMA, &info->nrecmema);
|
||||||
pci_read_config_word(pvt->branchmap_werrors,
|
pci_read_config_dword(pvt->branchmap_werrors,
|
||||||
NRECMEMB, &info->nrecmemb);
|
NRECMEMB, &info->nrecmemb);
|
||||||
|
|
||||||
/* Clear the error bits, by writing them back */
|
/* Clear the error bits, by writing them back */
|
||||||
@@ -1207,13 +1207,14 @@ static int i5400_init_dimms(struct mem_ctl_info *mci)
|
|||||||
|
|
||||||
dimm->nr_pages = size_mb << 8;
|
dimm->nr_pages = size_mb << 8;
|
||||||
dimm->grain = 8;
|
dimm->grain = 8;
|
||||||
dimm->dtype = MTR_DRAM_WIDTH(mtr) ? DEV_X8 : DEV_X4;
|
dimm->dtype = MTR_DRAM_WIDTH(mtr) == 8 ?
|
||||||
|
DEV_X8 : DEV_X4;
|
||||||
dimm->mtype = MEM_FB_DDR2;
|
dimm->mtype = MEM_FB_DDR2;
|
||||||
/*
|
/*
|
||||||
* The eccc mechanism is SDDC (aka SECC), with
|
* The eccc mechanism is SDDC (aka SECC), with
|
||||||
* is similar to Chipkill.
|
* is similar to Chipkill.
|
||||||
*/
|
*/
|
||||||
dimm->edac_mode = MTR_DRAM_WIDTH(mtr) ?
|
dimm->edac_mode = MTR_DRAM_WIDTH(mtr) == 8 ?
|
||||||
EDAC_S8ECD8ED : EDAC_S4ECD4ED;
|
EDAC_S8ECD8ED : EDAC_S4ECD4ED;
|
||||||
ndimms++;
|
ndimms++;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -120,8 +120,7 @@ static ssize_t systab_show(struct kobject *kobj,
|
|||||||
return str - buf;
|
return str - buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct kobj_attribute efi_attr_systab =
|
static struct kobj_attribute efi_attr_systab = __ATTR_RO_MODE(systab, 0400);
|
||||||
__ATTR(systab, 0400, systab_show, NULL);
|
|
||||||
|
|
||||||
#define EFI_FIELD(var) efi.var
|
#define EFI_FIELD(var) efi.var
|
||||||
|
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ static const struct sysfs_ops esre_attr_ops = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* Generic ESRT Entry ("ESRE") support. */
|
/* Generic ESRT Entry ("ESRE") support. */
|
||||||
static ssize_t esre_fw_class_show(struct esre_entry *entry, char *buf)
|
static ssize_t fw_class_show(struct esre_entry *entry, char *buf)
|
||||||
{
|
{
|
||||||
char *str = buf;
|
char *str = buf;
|
||||||
|
|
||||||
@@ -117,18 +117,16 @@ static ssize_t esre_fw_class_show(struct esre_entry *entry, char *buf)
|
|||||||
return str - buf;
|
return str - buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct esre_attribute esre_fw_class = __ATTR(fw_class, 0400,
|
static struct esre_attribute esre_fw_class = __ATTR_RO_MODE(fw_class, 0400);
|
||||||
esre_fw_class_show, NULL);
|
|
||||||
|
|
||||||
#define esre_attr_decl(name, size, fmt) \
|
#define esre_attr_decl(name, size, fmt) \
|
||||||
static ssize_t esre_##name##_show(struct esre_entry *entry, char *buf) \
|
static ssize_t name##_show(struct esre_entry *entry, char *buf) \
|
||||||
{ \
|
{ \
|
||||||
return sprintf(buf, fmt "\n", \
|
return sprintf(buf, fmt "\n", \
|
||||||
le##size##_to_cpu(entry->esre.esre1->name)); \
|
le##size##_to_cpu(entry->esre.esre1->name)); \
|
||||||
} \
|
} \
|
||||||
\
|
\
|
||||||
static struct esre_attribute esre_##name = __ATTR(name, 0400, \
|
static struct esre_attribute esre_##name = __ATTR_RO_MODE(name, 0400)
|
||||||
esre_##name##_show, NULL)
|
|
||||||
|
|
||||||
esre_attr_decl(fw_type, 32, "%u");
|
esre_attr_decl(fw_type, 32, "%u");
|
||||||
esre_attr_decl(fw_version, 32, "%u");
|
esre_attr_decl(fw_version, 32, "%u");
|
||||||
@@ -193,14 +191,13 @@ static int esre_create_sysfs_entry(void *esre, int entry_num)
|
|||||||
|
|
||||||
/* support for displaying ESRT fields at the top level */
|
/* support for displaying ESRT fields at the top level */
|
||||||
#define esrt_attr_decl(name, size, fmt) \
|
#define esrt_attr_decl(name, size, fmt) \
|
||||||
static ssize_t esrt_##name##_show(struct kobject *kobj, \
|
static ssize_t name##_show(struct kobject *kobj, \
|
||||||
struct kobj_attribute *attr, char *buf)\
|
struct kobj_attribute *attr, char *buf)\
|
||||||
{ \
|
{ \
|
||||||
return sprintf(buf, fmt "\n", le##size##_to_cpu(esrt->name)); \
|
return sprintf(buf, fmt "\n", le##size##_to_cpu(esrt->name)); \
|
||||||
} \
|
} \
|
||||||
\
|
\
|
||||||
static struct kobj_attribute esrt_##name = __ATTR(name, 0400, \
|
static struct kobj_attribute esrt_##name = __ATTR_RO_MODE(name, 0400)
|
||||||
esrt_##name##_show, NULL)
|
|
||||||
|
|
||||||
esrt_attr_decl(fw_resource_count, 32, "%u");
|
esrt_attr_decl(fw_resource_count, 32, "%u");
|
||||||
esrt_attr_decl(fw_resource_count_max, 32, "%u");
|
esrt_attr_decl(fw_resource_count_max, 32, "%u");
|
||||||
@@ -431,7 +428,7 @@ err_remove_group:
|
|||||||
err_remove_esrt:
|
err_remove_esrt:
|
||||||
kobject_put(esrt_kobj);
|
kobject_put(esrt_kobj);
|
||||||
err:
|
err:
|
||||||
kfree(esrt);
|
memunmap(esrt);
|
||||||
esrt = NULL;
|
esrt = NULL;
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,11 +63,11 @@ static ssize_t map_attr_show(struct kobject *kobj, struct attribute *attr,
|
|||||||
return map_attr->show(entry, buf);
|
return map_attr->show(entry, buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct map_attribute map_type_attr = __ATTR_RO(type);
|
static struct map_attribute map_type_attr = __ATTR_RO_MODE(type, 0400);
|
||||||
static struct map_attribute map_phys_addr_attr = __ATTR_RO(phys_addr);
|
static struct map_attribute map_phys_addr_attr = __ATTR_RO_MODE(phys_addr, 0400);
|
||||||
static struct map_attribute map_virt_addr_attr = __ATTR_RO(virt_addr);
|
static struct map_attribute map_virt_addr_attr = __ATTR_RO_MODE(virt_addr, 0400);
|
||||||
static struct map_attribute map_num_pages_attr = __ATTR_RO(num_pages);
|
static struct map_attribute map_num_pages_attr = __ATTR_RO_MODE(num_pages, 0400);
|
||||||
static struct map_attribute map_attribute_attr = __ATTR_RO(attribute);
|
static struct map_attribute map_attribute_attr = __ATTR_RO_MODE(attribute, 0400);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* These are default attributes that are added for every memmap entry.
|
* These are default attributes that are added for every memmap entry.
|
||||||
|
|||||||
+11
-15
@@ -90,21 +90,18 @@ static int altera_gpio_irq_set_type(struct irq_data *d,
|
|||||||
|
|
||||||
altera_gc = gpiochip_get_data(irq_data_get_irq_chip_data(d));
|
altera_gc = gpiochip_get_data(irq_data_get_irq_chip_data(d));
|
||||||
|
|
||||||
if (type == IRQ_TYPE_NONE)
|
if (type == IRQ_TYPE_NONE) {
|
||||||
|
irq_set_handler_locked(d, handle_bad_irq);
|
||||||
return 0;
|
return 0;
|
||||||
if (type == IRQ_TYPE_LEVEL_HIGH &&
|
}
|
||||||
altera_gc->interrupt_trigger == IRQ_TYPE_LEVEL_HIGH)
|
if (type == altera_gc->interrupt_trigger) {
|
||||||
|
if (type == IRQ_TYPE_LEVEL_HIGH)
|
||||||
|
irq_set_handler_locked(d, handle_level_irq);
|
||||||
|
else
|
||||||
|
irq_set_handler_locked(d, handle_simple_irq);
|
||||||
return 0;
|
return 0;
|
||||||
if (type == IRQ_TYPE_EDGE_RISING &&
|
}
|
||||||
altera_gc->interrupt_trigger == IRQ_TYPE_EDGE_RISING)
|
irq_set_handler_locked(d, handle_bad_irq);
|
||||||
return 0;
|
|
||||||
if (type == IRQ_TYPE_EDGE_FALLING &&
|
|
||||||
altera_gc->interrupt_trigger == IRQ_TYPE_EDGE_FALLING)
|
|
||||||
return 0;
|
|
||||||
if (type == IRQ_TYPE_EDGE_BOTH &&
|
|
||||||
altera_gc->interrupt_trigger == IRQ_TYPE_EDGE_BOTH)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -230,7 +227,6 @@ static void altera_gpio_irq_edge_handler(struct irq_desc *desc)
|
|||||||
chained_irq_exit(chip, desc);
|
chained_irq_exit(chip, desc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void altera_gpio_irq_leveL_high_handler(struct irq_desc *desc)
|
static void altera_gpio_irq_leveL_high_handler(struct irq_desc *desc)
|
||||||
{
|
{
|
||||||
struct altera_gpio_chip *altera_gc;
|
struct altera_gpio_chip *altera_gc;
|
||||||
@@ -310,7 +306,7 @@ static int altera_gpio_probe(struct platform_device *pdev)
|
|||||||
altera_gc->interrupt_trigger = reg;
|
altera_gc->interrupt_trigger = reg;
|
||||||
|
|
||||||
ret = gpiochip_irqchip_add(&altera_gc->mmchip.gc, &altera_irq_chip, 0,
|
ret = gpiochip_irqchip_add(&altera_gc->mmchip.gc, &altera_irq_chip, 0,
|
||||||
handle_simple_irq, IRQ_TYPE_NONE);
|
handle_bad_irq, IRQ_TYPE_NONE);
|
||||||
|
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(&pdev->dev, "could not add irqchip\n");
|
dev_err(&pdev->dev, "could not add irqchip\n");
|
||||||
|
|||||||
@@ -2020,8 +2020,11 @@ int amdgpu_device_resume(struct drm_device *dev, bool resume, bool fbcon)
|
|||||||
}
|
}
|
||||||
|
|
||||||
r = amdgpu_late_init(adev);
|
r = amdgpu_late_init(adev);
|
||||||
if (r)
|
if (r) {
|
||||||
|
if (fbcon)
|
||||||
|
console_unlock();
|
||||||
return r;
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
/* pin cursors */
|
/* pin cursors */
|
||||||
list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
|
list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
|
||||||
|
|||||||
@@ -4,5 +4,3 @@ armada-y += armada_510.o
|
|||||||
armada-$(CONFIG_DEBUG_FS) += armada_debugfs.o
|
armada-$(CONFIG_DEBUG_FS) += armada_debugfs.o
|
||||||
|
|
||||||
obj-$(CONFIG_DRM_ARMADA) := armada.o
|
obj-$(CONFIG_DRM_ARMADA) := armada.o
|
||||||
|
|
||||||
CFLAGS_armada_trace.o := -I$(src)
|
|
||||||
|
|||||||
@@ -246,6 +246,15 @@ struct exynos_drm_gem *exynos_drm_gem_create(struct drm_device *dev,
|
|||||||
if (IS_ERR(exynos_gem))
|
if (IS_ERR(exynos_gem))
|
||||||
return exynos_gem;
|
return exynos_gem;
|
||||||
|
|
||||||
|
if (!is_drm_iommu_supported(dev) && (flags & EXYNOS_BO_NONCONTIG)) {
|
||||||
|
/*
|
||||||
|
* when no IOMMU is available, all allocated buffers are
|
||||||
|
* contiguous anyway, so drop EXYNOS_BO_NONCONTIG flag
|
||||||
|
*/
|
||||||
|
flags &= ~EXYNOS_BO_NONCONTIG;
|
||||||
|
DRM_WARN("Non-contiguous allocation is not supported without IOMMU, falling back to contiguous buffer\n");
|
||||||
|
}
|
||||||
|
|
||||||
/* set memory type and cache attribute from user side. */
|
/* set memory type and cache attribute from user side. */
|
||||||
exynos_gem->flags = flags;
|
exynos_gem->flags = flags;
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -175,11 +175,11 @@ config HID_CHERRY
|
|||||||
Support for Cherry Cymotion keyboard.
|
Support for Cherry Cymotion keyboard.
|
||||||
|
|
||||||
config HID_CHICONY
|
config HID_CHICONY
|
||||||
tristate "Chicony Tactical pad"
|
tristate "Chicony devices"
|
||||||
depends on HID
|
depends on HID
|
||||||
default !EXPERT
|
default !EXPERT
|
||||||
---help---
|
---help---
|
||||||
Support for Chicony Tactical pad.
|
Support for Chicony Tactical pad and special keys on Chicony keyboards.
|
||||||
|
|
||||||
config HID_CORSAIR
|
config HID_CORSAIR
|
||||||
tristate "Corsair devices"
|
tristate "Corsair devices"
|
||||||
|
|||||||
@@ -86,6 +86,7 @@ static const struct hid_device_id ch_devices[] = {
|
|||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_WIRELESS2) },
|
{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_WIRELESS2) },
|
||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_AK1D) },
|
{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_AK1D) },
|
||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_ACER_SWITCH12) },
|
{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_ACER_SWITCH12) },
|
||||||
|
{ HID_USB_DEVICE(USB_VENDOR_ID_JESS, USB_DEVICE_ID_JESS_ZEN_AIO_KBD) },
|
||||||
{ }
|
{ }
|
||||||
};
|
};
|
||||||
MODULE_DEVICE_TABLE(hid, ch_devices);
|
MODULE_DEVICE_TABLE(hid, ch_devices);
|
||||||
|
|||||||
@@ -1906,6 +1906,7 @@ static const struct hid_device_id hid_have_special_driver[] = {
|
|||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK_ALT, USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A081) },
|
{ HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK_ALT, USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A081) },
|
||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK_ALT, USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A0C2) },
|
{ HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK_ALT, USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A0C2) },
|
||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_HUION, USB_DEVICE_ID_HUION_TABLET) },
|
{ HID_USB_DEVICE(USB_VENDOR_ID_HUION, USB_DEVICE_ID_HUION_TABLET) },
|
||||||
|
{ HID_USB_DEVICE(USB_VENDOR_ID_JESS, USB_DEVICE_ID_JESS_ZEN_AIO_KBD) },
|
||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_JESS2, USB_DEVICE_ID_JESS2_COLOR_RUMBLE_PAD) },
|
{ HID_USB_DEVICE(USB_VENDOR_ID_JESS2, USB_DEVICE_ID_JESS2_COLOR_RUMBLE_PAD) },
|
||||||
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_ION, USB_DEVICE_ID_ICADE) },
|
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_ION, USB_DEVICE_ID_ICADE) },
|
||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_KENSINGTON, USB_DEVICE_ID_KS_SLIMBLADE) },
|
{ HID_USB_DEVICE(USB_VENDOR_ID_KENSINGTON, USB_DEVICE_ID_KS_SLIMBLADE) },
|
||||||
|
|||||||
@@ -558,6 +558,7 @@
|
|||||||
|
|
||||||
#define USB_VENDOR_ID_JESS 0x0c45
|
#define USB_VENDOR_ID_JESS 0x0c45
|
||||||
#define USB_DEVICE_ID_JESS_YUREX 0x1010
|
#define USB_DEVICE_ID_JESS_YUREX 0x1010
|
||||||
|
#define USB_DEVICE_ID_JESS_ZEN_AIO_KBD 0x5112
|
||||||
|
|
||||||
#define USB_VENDOR_ID_JESS2 0x0f30
|
#define USB_VENDOR_ID_JESS2 0x0f30
|
||||||
#define USB_DEVICE_ID_JESS2_COLOR_RUMBLE_PAD 0x0111
|
#define USB_DEVICE_ID_JESS2_COLOR_RUMBLE_PAD 0x0111
|
||||||
|
|||||||
@@ -218,8 +218,12 @@ static irqreturn_t riic_tend_isr(int irq, void *data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (riic->is_last || riic->err) {
|
if (riic->is_last || riic->err) {
|
||||||
riic_clear_set_bit(riic, 0, ICIER_SPIE, RIIC_ICIER);
|
riic_clear_set_bit(riic, ICIER_TEIE, ICIER_SPIE, RIIC_ICIER);
|
||||||
writeb(ICCR2_SP, riic->base + RIIC_ICCR2);
|
writeb(ICCR2_SP, riic->base + RIIC_ICCR2);
|
||||||
|
} else {
|
||||||
|
/* Transfer is complete, but do not send STOP */
|
||||||
|
riic_clear_set_bit(riic, ICIER_TEIE, 0, RIIC_ICIER);
|
||||||
|
complete(&riic->msg_done);
|
||||||
}
|
}
|
||||||
|
|
||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
|
|||||||
@@ -1669,7 +1669,7 @@ static int __mlx4_ib_modify_qp(struct ib_qp *ibqp,
|
|||||||
context->mtu_msgmax = (IB_MTU_4096 << 5) |
|
context->mtu_msgmax = (IB_MTU_4096 << 5) |
|
||||||
ilog2(dev->dev->caps.max_gso_sz);
|
ilog2(dev->dev->caps.max_gso_sz);
|
||||||
else
|
else
|
||||||
context->mtu_msgmax = (IB_MTU_4096 << 5) | 12;
|
context->mtu_msgmax = (IB_MTU_4096 << 5) | 13;
|
||||||
} else if (attr_mask & IB_QP_PATH_MTU) {
|
} else if (attr_mask & IB_QP_PATH_MTU) {
|
||||||
if (attr->path_mtu < IB_MTU_256 || attr->path_mtu > IB_MTU_4096) {
|
if (attr->path_mtu < IB_MTU_256 || attr->path_mtu > IB_MTU_4096) {
|
||||||
pr_err("path MTU (%u) is invalid\n",
|
pr_err("path MTU (%u) is invalid\n",
|
||||||
|
|||||||
@@ -2514,6 +2514,8 @@ static int create_umr_res(struct mlx5_ib_dev *dev)
|
|||||||
qp->real_qp = qp;
|
qp->real_qp = qp;
|
||||||
qp->uobject = NULL;
|
qp->uobject = NULL;
|
||||||
qp->qp_type = MLX5_IB_QPT_REG_UMR;
|
qp->qp_type = MLX5_IB_QPT_REG_UMR;
|
||||||
|
qp->send_cq = init_attr->send_cq;
|
||||||
|
qp->recv_cq = init_attr->recv_cq;
|
||||||
|
|
||||||
attr->qp_state = IB_QPS_INIT;
|
attr->qp_state = IB_QPS_INIT;
|
||||||
attr->port_num = 1;
|
attr->port_num = 1;
|
||||||
|
|||||||
@@ -2245,10 +2245,12 @@ static int __domain_mapping(struct dmar_domain *domain, unsigned long iov_pfn,
|
|||||||
uint64_t tmp;
|
uint64_t tmp;
|
||||||
|
|
||||||
if (!sg_res) {
|
if (!sg_res) {
|
||||||
|
unsigned int pgoff = sg->offset & ~PAGE_MASK;
|
||||||
|
|
||||||
sg_res = aligned_nrpages(sg->offset, sg->length);
|
sg_res = aligned_nrpages(sg->offset, sg->length);
|
||||||
sg->dma_address = ((dma_addr_t)iov_pfn << VTD_PAGE_SHIFT) + sg->offset;
|
sg->dma_address = ((dma_addr_t)iov_pfn << VTD_PAGE_SHIFT) + pgoff;
|
||||||
sg->dma_length = sg->length;
|
sg->dma_length = sg->length;
|
||||||
pteval = page_to_phys(sg_page(sg)) | prot;
|
pteval = (sg_phys(sg) - pgoff) | prot;
|
||||||
phys_pfn = pteval >> VTD_PAGE_SHIFT;
|
phys_pfn = pteval >> VTD_PAGE_SHIFT;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3894,7 +3896,7 @@ static int intel_nontranslate_map_sg(struct device *hddev,
|
|||||||
|
|
||||||
for_each_sg(sglist, sg, nelems, i) {
|
for_each_sg(sglist, sg, nelems, i) {
|
||||||
BUG_ON(!sg_page(sg));
|
BUG_ON(!sg_page(sg));
|
||||||
sg->dma_address = page_to_phys(sg_page(sg)) + sg->offset;
|
sg->dma_address = sg_phys(sg);
|
||||||
sg->dma_length = sg->length;
|
sg->dma_length = sg->length;
|
||||||
}
|
}
|
||||||
return nelems;
|
return nelems;
|
||||||
|
|||||||
@@ -199,7 +199,7 @@ static const struct irq_domain_ops crossbar_domain_ops = {
|
|||||||
static int __init crossbar_of_init(struct device_node *node)
|
static int __init crossbar_of_init(struct device_node *node)
|
||||||
{
|
{
|
||||||
int i, size, reserved = 0;
|
int i, size, reserved = 0;
|
||||||
u32 max = 0, entry;
|
u32 max = 0, entry, reg_size;
|
||||||
const __be32 *irqsr;
|
const __be32 *irqsr;
|
||||||
int ret = -ENOMEM;
|
int ret = -ENOMEM;
|
||||||
|
|
||||||
@@ -276,9 +276,9 @@ static int __init crossbar_of_init(struct device_node *node)
|
|||||||
if (!cb->register_offsets)
|
if (!cb->register_offsets)
|
||||||
goto err_irq_map;
|
goto err_irq_map;
|
||||||
|
|
||||||
of_property_read_u32(node, "ti,reg-size", &size);
|
of_property_read_u32(node, "ti,reg-size", ®_size);
|
||||||
|
|
||||||
switch (size) {
|
switch (reg_size) {
|
||||||
case 1:
|
case 1:
|
||||||
cb->write = crossbar_writeb;
|
cb->write = crossbar_writeb;
|
||||||
break;
|
break;
|
||||||
@@ -304,7 +304,7 @@ static int __init crossbar_of_init(struct device_node *node)
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
cb->register_offsets[i] = reserved;
|
cb->register_offsets[i] = reserved;
|
||||||
reserved += size;
|
reserved += reg_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
of_property_read_u32(node, "ti,irqs-safe-map", &cb->safe_map);
|
of_property_read_u32(node, "ti,irqs-safe-map", &cb->safe_map);
|
||||||
|
|||||||
@@ -446,6 +446,8 @@ int lirc_dev_fop_open(struct inode *inode, struct file *file)
|
|||||||
return -ERESTARTSYS;
|
return -ERESTARTSYS;
|
||||||
|
|
||||||
ir = irctls[iminor(inode)];
|
ir = irctls[iminor(inode)];
|
||||||
|
mutex_unlock(&lirc_dev_lock);
|
||||||
|
|
||||||
if (!ir) {
|
if (!ir) {
|
||||||
retval = -ENODEV;
|
retval = -ENODEV;
|
||||||
goto error;
|
goto error;
|
||||||
@@ -486,8 +488,6 @@ int lirc_dev_fop_open(struct inode *inode, struct file *file)
|
|||||||
}
|
}
|
||||||
|
|
||||||
error:
|
error:
|
||||||
mutex_unlock(&lirc_dev_lock);
|
|
||||||
|
|
||||||
nonseekable_open(inode, file);
|
nonseekable_open(inode, file);
|
||||||
|
|
||||||
return retval;
|
return retval;
|
||||||
|
|||||||
@@ -223,8 +223,20 @@ EXPORT_SYMBOL(dibusb_i2c_algo);
|
|||||||
|
|
||||||
int dibusb_read_eeprom_byte(struct dvb_usb_device *d, u8 offs, u8 *val)
|
int dibusb_read_eeprom_byte(struct dvb_usb_device *d, u8 offs, u8 *val)
|
||||||
{
|
{
|
||||||
u8 wbuf[1] = { offs };
|
u8 *buf;
|
||||||
return dibusb_i2c_msg(d, 0x50, wbuf, 1, val, 1);
|
int rc;
|
||||||
|
|
||||||
|
buf = kmalloc(2, GFP_KERNEL);
|
||||||
|
if (!buf)
|
||||||
|
return -ENOMEM;
|
||||||
|
|
||||||
|
buf[0] = offs;
|
||||||
|
|
||||||
|
rc = dibusb_i2c_msg(d, 0x50, &buf[0], 1, &buf[1], 1);
|
||||||
|
*val = buf[1];
|
||||||
|
kfree(buf);
|
||||||
|
|
||||||
|
return rc;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(dibusb_read_eeprom_byte);
|
EXPORT_SYMBOL(dibusb_read_eeprom_byte);
|
||||||
|
|
||||||
|
|||||||
@@ -1947,9 +1947,7 @@ static int gpmc_probe_onenand_child(struct platform_device *pdev,
|
|||||||
if (!of_property_read_u32(child, "dma-channel", &val))
|
if (!of_property_read_u32(child, "dma-channel", &val))
|
||||||
gpmc_onenand_data->dma_channel = val;
|
gpmc_onenand_data->dma_channel = val;
|
||||||
|
|
||||||
gpmc_onenand_init(gpmc_onenand_data);
|
return gpmc_onenand_init(gpmc_onenand_data);
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
static int gpmc_probe_onenand_child(struct platform_device *pdev,
|
static int gpmc_probe_onenand_child(struct platform_device *pdev,
|
||||||
|
|||||||
@@ -652,6 +652,9 @@ static int ti_hecc_rx_poll(struct napi_struct *napi, int quota)
|
|||||||
mbx_mask = hecc_read(priv, HECC_CANMIM);
|
mbx_mask = hecc_read(priv, HECC_CANMIM);
|
||||||
mbx_mask |= HECC_TX_MBOX_MASK;
|
mbx_mask |= HECC_TX_MBOX_MASK;
|
||||||
hecc_write(priv, HECC_CANMIM, mbx_mask);
|
hecc_write(priv, HECC_CANMIM, mbx_mask);
|
||||||
|
} else {
|
||||||
|
/* repoll is done only if whole budget is used */
|
||||||
|
num_pkts = quota;
|
||||||
}
|
}
|
||||||
|
|
||||||
return num_pkts;
|
return num_pkts;
|
||||||
|
|||||||
@@ -288,6 +288,8 @@ static void ems_usb_read_interrupt_callback(struct urb *urb)
|
|||||||
|
|
||||||
case -ECONNRESET: /* unlink */
|
case -ECONNRESET: /* unlink */
|
||||||
case -ENOENT:
|
case -ENOENT:
|
||||||
|
case -EPIPE:
|
||||||
|
case -EPROTO:
|
||||||
case -ESHUTDOWN:
|
case -ESHUTDOWN:
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|||||||
@@ -393,6 +393,8 @@ static void esd_usb2_read_bulk_callback(struct urb *urb)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case -ENOENT:
|
case -ENOENT:
|
||||||
|
case -EPIPE:
|
||||||
|
case -EPROTO:
|
||||||
case -ESHUTDOWN:
|
case -ESHUTDOWN:
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|||||||
@@ -609,7 +609,7 @@ static int kvaser_usb_wait_msg(const struct kvaser_usb *dev, u8 id,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (pos + tmp->len > actual_len) {
|
if (pos + tmp->len > actual_len) {
|
||||||
dev_err(dev->udev->dev.parent,
|
dev_err_ratelimited(dev->udev->dev.parent,
|
||||||
"Format error\n");
|
"Format error\n");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -813,6 +813,7 @@ static int kvaser_usb_simple_msg_async(struct kvaser_usb_net_priv *priv,
|
|||||||
if (err) {
|
if (err) {
|
||||||
netdev_err(netdev, "Error transmitting URB\n");
|
netdev_err(netdev, "Error transmitting URB\n");
|
||||||
usb_unanchor_urb(urb);
|
usb_unanchor_urb(urb);
|
||||||
|
kfree(buf);
|
||||||
usb_free_urb(urb);
|
usb_free_urb(urb);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
@@ -1325,6 +1326,8 @@ static void kvaser_usb_read_bulk_callback(struct urb *urb)
|
|||||||
case 0:
|
case 0:
|
||||||
break;
|
break;
|
||||||
case -ENOENT:
|
case -ENOENT:
|
||||||
|
case -EPIPE:
|
||||||
|
case -EPROTO:
|
||||||
case -ESHUTDOWN:
|
case -ESHUTDOWN:
|
||||||
return;
|
return;
|
||||||
default:
|
default:
|
||||||
@@ -1333,7 +1336,7 @@ static void kvaser_usb_read_bulk_callback(struct urb *urb)
|
|||||||
goto resubmit_urb;
|
goto resubmit_urb;
|
||||||
}
|
}
|
||||||
|
|
||||||
while (pos <= urb->actual_length - MSG_HEADER_LEN) {
|
while (pos <= (int)(urb->actual_length - MSG_HEADER_LEN)) {
|
||||||
msg = urb->transfer_buffer + pos;
|
msg = urb->transfer_buffer + pos;
|
||||||
|
|
||||||
/* The Kvaser firmware can only read and write messages that
|
/* The Kvaser firmware can only read and write messages that
|
||||||
@@ -1352,7 +1355,8 @@ static void kvaser_usb_read_bulk_callback(struct urb *urb)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (pos + msg->len > urb->actual_length) {
|
if (pos + msg->len > urb->actual_length) {
|
||||||
dev_err(dev->udev->dev.parent, "Format error\n");
|
dev_err_ratelimited(dev->udev->dev.parent,
|
||||||
|
"Format error\n");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1768,6 +1772,7 @@ static netdev_tx_t kvaser_usb_start_xmit(struct sk_buff *skb,
|
|||||||
spin_unlock_irqrestore(&priv->tx_contexts_lock, flags);
|
spin_unlock_irqrestore(&priv->tx_contexts_lock, flags);
|
||||||
|
|
||||||
usb_unanchor_urb(urb);
|
usb_unanchor_urb(urb);
|
||||||
|
kfree(buf);
|
||||||
|
|
||||||
stats->tx_dropped++;
|
stats->tx_dropped++;
|
||||||
|
|
||||||
|
|||||||
@@ -524,6 +524,8 @@ static void usb_8dev_read_bulk_callback(struct urb *urb)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case -ENOENT:
|
case -ENOENT:
|
||||||
|
case -EPIPE:
|
||||||
|
case -EPROTO:
|
||||||
case -ESHUTDOWN:
|
case -ESHUTDOWN:
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|||||||
@@ -13293,17 +13293,15 @@ static int bnx2x_init_dev(struct bnx2x *bp, struct pci_dev *pdev,
|
|||||||
dev->vlan_features = NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM |
|
dev->vlan_features = NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM |
|
||||||
NETIF_F_TSO | NETIF_F_TSO_ECN | NETIF_F_TSO6 | NETIF_F_HIGHDMA;
|
NETIF_F_TSO | NETIF_F_TSO_ECN | NETIF_F_TSO6 | NETIF_F_HIGHDMA;
|
||||||
|
|
||||||
/* VF with OLD Hypervisor or old PF do not support filtering */
|
|
||||||
if (IS_PF(bp)) {
|
if (IS_PF(bp)) {
|
||||||
if (chip_is_e1x)
|
if (chip_is_e1x)
|
||||||
bp->accept_any_vlan = true;
|
bp->accept_any_vlan = true;
|
||||||
else
|
else
|
||||||
dev->hw_features |= NETIF_F_HW_VLAN_CTAG_FILTER;
|
dev->hw_features |= NETIF_F_HW_VLAN_CTAG_FILTER;
|
||||||
#ifdef CONFIG_BNX2X_SRIOV
|
|
||||||
} else if (bp->acquire_resp.pfdev_info.pf_cap & PFVF_CAP_VLAN_FILTER) {
|
|
||||||
dev->hw_features |= NETIF_F_HW_VLAN_CTAG_FILTER;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
/* For VF we'll know whether to enable VLAN filtering after
|
||||||
|
* getting a response to CHANNEL_TLV_ACQUIRE from PF.
|
||||||
|
*/
|
||||||
|
|
||||||
dev->features |= dev->hw_features | NETIF_F_HW_VLAN_CTAG_RX;
|
dev->features |= dev->hw_features | NETIF_F_HW_VLAN_CTAG_RX;
|
||||||
dev->features |= NETIF_F_HIGHDMA;
|
dev->features |= NETIF_F_HIGHDMA;
|
||||||
@@ -13735,7 +13733,7 @@ static int bnx2x_ptp_adjfreq(struct ptp_clock_info *ptp, s32 ppb)
|
|||||||
if (!netif_running(bp->dev)) {
|
if (!netif_running(bp->dev)) {
|
||||||
DP(BNX2X_MSG_PTP,
|
DP(BNX2X_MSG_PTP,
|
||||||
"PTP adjfreq called while the interface is down\n");
|
"PTP adjfreq called while the interface is down\n");
|
||||||
return -EFAULT;
|
return -ENETDOWN;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ppb < 0) {
|
if (ppb < 0) {
|
||||||
@@ -13794,6 +13792,12 @@ static int bnx2x_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta)
|
|||||||
{
|
{
|
||||||
struct bnx2x *bp = container_of(ptp, struct bnx2x, ptp_clock_info);
|
struct bnx2x *bp = container_of(ptp, struct bnx2x, ptp_clock_info);
|
||||||
|
|
||||||
|
if (!netif_running(bp->dev)) {
|
||||||
|
DP(BNX2X_MSG_PTP,
|
||||||
|
"PTP adjtime called while the interface is down\n");
|
||||||
|
return -ENETDOWN;
|
||||||
|
}
|
||||||
|
|
||||||
DP(BNX2X_MSG_PTP, "PTP adjtime called, delta = %llx\n", delta);
|
DP(BNX2X_MSG_PTP, "PTP adjtime called, delta = %llx\n", delta);
|
||||||
|
|
||||||
timecounter_adjtime(&bp->timecounter, delta);
|
timecounter_adjtime(&bp->timecounter, delta);
|
||||||
@@ -13806,6 +13810,12 @@ static int bnx2x_ptp_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts)
|
|||||||
struct bnx2x *bp = container_of(ptp, struct bnx2x, ptp_clock_info);
|
struct bnx2x *bp = container_of(ptp, struct bnx2x, ptp_clock_info);
|
||||||
u64 ns;
|
u64 ns;
|
||||||
|
|
||||||
|
if (!netif_running(bp->dev)) {
|
||||||
|
DP(BNX2X_MSG_PTP,
|
||||||
|
"PTP gettime called while the interface is down\n");
|
||||||
|
return -ENETDOWN;
|
||||||
|
}
|
||||||
|
|
||||||
ns = timecounter_read(&bp->timecounter);
|
ns = timecounter_read(&bp->timecounter);
|
||||||
|
|
||||||
DP(BNX2X_MSG_PTP, "PTP gettime called, ns = %llu\n", ns);
|
DP(BNX2X_MSG_PTP, "PTP gettime called, ns = %llu\n", ns);
|
||||||
@@ -13821,6 +13831,12 @@ static int bnx2x_ptp_settime(struct ptp_clock_info *ptp,
|
|||||||
struct bnx2x *bp = container_of(ptp, struct bnx2x, ptp_clock_info);
|
struct bnx2x *bp = container_of(ptp, struct bnx2x, ptp_clock_info);
|
||||||
u64 ns;
|
u64 ns;
|
||||||
|
|
||||||
|
if (!netif_running(bp->dev)) {
|
||||||
|
DP(BNX2X_MSG_PTP,
|
||||||
|
"PTP settime called while the interface is down\n");
|
||||||
|
return -ENETDOWN;
|
||||||
|
}
|
||||||
|
|
||||||
ns = timespec64_to_ns(ts);
|
ns = timespec64_to_ns(ts);
|
||||||
|
|
||||||
DP(BNX2X_MSG_PTP, "PTP settime called, ns = %llu\n", ns);
|
DP(BNX2X_MSG_PTP, "PTP settime called, ns = %llu\n", ns);
|
||||||
@@ -13988,6 +14004,14 @@ static int bnx2x_init_one(struct pci_dev *pdev,
|
|||||||
rc = bnx2x_vfpf_acquire(bp, tx_count, rx_count);
|
rc = bnx2x_vfpf_acquire(bp, tx_count, rx_count);
|
||||||
if (rc)
|
if (rc)
|
||||||
goto init_one_freemem;
|
goto init_one_freemem;
|
||||||
|
|
||||||
|
#ifdef CONFIG_BNX2X_SRIOV
|
||||||
|
/* VF with OLD Hypervisor or old PF do not support filtering */
|
||||||
|
if (bp->acquire_resp.pfdev_info.pf_cap & PFVF_CAP_VLAN_FILTER) {
|
||||||
|
dev->hw_features |= NETIF_F_HW_VLAN_CTAG_FILTER;
|
||||||
|
dev->features |= NETIF_F_HW_VLAN_CTAG_FILTER;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Enable SRIOV if capability found in configuration space */
|
/* Enable SRIOV if capability found in configuration space */
|
||||||
|
|||||||
@@ -434,7 +434,9 @@ static int bnx2x_vf_mac_vlan_config(struct bnx2x *bp,
|
|||||||
|
|
||||||
/* Add/Remove the filter */
|
/* Add/Remove the filter */
|
||||||
rc = bnx2x_config_vlan_mac(bp, &ramrod);
|
rc = bnx2x_config_vlan_mac(bp, &ramrod);
|
||||||
if (rc && rc != -EEXIST) {
|
if (rc == -EEXIST)
|
||||||
|
return 0;
|
||||||
|
if (rc) {
|
||||||
BNX2X_ERR("Failed to %s %s\n",
|
BNX2X_ERR("Failed to %s %s\n",
|
||||||
filter->add ? "add" : "delete",
|
filter->add ? "add" : "delete",
|
||||||
(filter->type == BNX2X_VF_FILTER_VLAN_MAC) ?
|
(filter->type == BNX2X_VF_FILTER_VLAN_MAC) ?
|
||||||
@@ -444,6 +446,8 @@ static int bnx2x_vf_mac_vlan_config(struct bnx2x *bp,
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
filter->applied = true;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -471,6 +475,8 @@ int bnx2x_vf_mac_vlan_config_list(struct bnx2x *bp, struct bnx2x_virtf *vf,
|
|||||||
BNX2X_ERR("Managed only %d/%d filters - rolling back\n",
|
BNX2X_ERR("Managed only %d/%d filters - rolling back\n",
|
||||||
i, filters->count + 1);
|
i, filters->count + 1);
|
||||||
while (--i >= 0) {
|
while (--i >= 0) {
|
||||||
|
if (!filters->filters[i].applied)
|
||||||
|
continue;
|
||||||
filters->filters[i].add = !filters->filters[i].add;
|
filters->filters[i].add = !filters->filters[i].add;
|
||||||
bnx2x_vf_mac_vlan_config(bp, vf, qid,
|
bnx2x_vf_mac_vlan_config(bp, vf, qid,
|
||||||
&filters->filters[i],
|
&filters->filters[i],
|
||||||
|
|||||||
@@ -114,6 +114,7 @@ struct bnx2x_vf_mac_vlan_filter {
|
|||||||
(BNX2X_VF_FILTER_MAC | BNX2X_VF_FILTER_VLAN) /*shortcut*/
|
(BNX2X_VF_FILTER_MAC | BNX2X_VF_FILTER_VLAN) /*shortcut*/
|
||||||
|
|
||||||
bool add;
|
bool add;
|
||||||
|
bool applied;
|
||||||
u8 *mac;
|
u8 *mac;
|
||||||
u16 vid;
|
u16 vid;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -868,7 +868,7 @@ int bnx2x_vfpf_set_mcast(struct net_device *dev)
|
|||||||
struct bnx2x *bp = netdev_priv(dev);
|
struct bnx2x *bp = netdev_priv(dev);
|
||||||
struct vfpf_set_q_filters_tlv *req = &bp->vf2pf_mbox->req.set_q_filters;
|
struct vfpf_set_q_filters_tlv *req = &bp->vf2pf_mbox->req.set_q_filters;
|
||||||
struct pfvf_general_resp_tlv *resp = &bp->vf2pf_mbox->resp.general_resp;
|
struct pfvf_general_resp_tlv *resp = &bp->vf2pf_mbox->resp.general_resp;
|
||||||
int rc, i = 0;
|
int rc = 0, i = 0;
|
||||||
struct netdev_hw_addr *ha;
|
struct netdev_hw_addr *ha;
|
||||||
|
|
||||||
if (bp->state != BNX2X_STATE_OPEN) {
|
if (bp->state != BNX2X_STATE_OPEN) {
|
||||||
@@ -883,6 +883,15 @@ int bnx2x_vfpf_set_mcast(struct net_device *dev)
|
|||||||
/* Get Rx mode requested */
|
/* Get Rx mode requested */
|
||||||
DP(NETIF_MSG_IFUP, "dev->flags = %x\n", dev->flags);
|
DP(NETIF_MSG_IFUP, "dev->flags = %x\n", dev->flags);
|
||||||
|
|
||||||
|
/* We support PFVF_MAX_MULTICAST_PER_VF mcast addresses tops */
|
||||||
|
if (netdev_mc_count(dev) > PFVF_MAX_MULTICAST_PER_VF) {
|
||||||
|
DP(NETIF_MSG_IFUP,
|
||||||
|
"VF supports not more than %d multicast MAC addresses\n",
|
||||||
|
PFVF_MAX_MULTICAST_PER_VF);
|
||||||
|
rc = -EINVAL;
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
netdev_for_each_mc_addr(ha, dev) {
|
netdev_for_each_mc_addr(ha, dev) {
|
||||||
DP(NETIF_MSG_IFUP, "Adding mcast MAC: %pM\n",
|
DP(NETIF_MSG_IFUP, "Adding mcast MAC: %pM\n",
|
||||||
bnx2x_mc_addr(ha));
|
bnx2x_mc_addr(ha));
|
||||||
@@ -890,16 +899,6 @@ int bnx2x_vfpf_set_mcast(struct net_device *dev)
|
|||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* We support four PFVF_MAX_MULTICAST_PER_VF mcast
|
|
||||||
* addresses tops
|
|
||||||
*/
|
|
||||||
if (i >= PFVF_MAX_MULTICAST_PER_VF) {
|
|
||||||
DP(NETIF_MSG_IFUP,
|
|
||||||
"VF supports not more than %d multicast MAC addresses\n",
|
|
||||||
PFVF_MAX_MULTICAST_PER_VF);
|
|
||||||
return -EINVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
req->n_multicast = i;
|
req->n_multicast = i;
|
||||||
req->flags |= VFPF_SET_Q_FILTERS_MULTICAST_CHANGED;
|
req->flags |= VFPF_SET_Q_FILTERS_MULTICAST_CHANGED;
|
||||||
req->vf_qid = 0;
|
req->vf_qid = 0;
|
||||||
@@ -924,7 +923,7 @@ int bnx2x_vfpf_set_mcast(struct net_device *dev)
|
|||||||
out:
|
out:
|
||||||
bnx2x_vfpf_finalize(bp, &req->first_tlv);
|
bnx2x_vfpf_finalize(bp, &req->first_tlv);
|
||||||
|
|
||||||
return 0;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* request pf to add a vlan for the vf */
|
/* request pf to add a vlan for the vf */
|
||||||
|
|||||||
@@ -404,7 +404,7 @@ static int ibmvnic_open(struct net_device *netdev)
|
|||||||
send_map_query(adapter);
|
send_map_query(adapter);
|
||||||
for (i = 0; i < rxadd_subcrqs; i++) {
|
for (i = 0; i < rxadd_subcrqs; i++) {
|
||||||
init_rx_pool(adapter, &adapter->rx_pool[i],
|
init_rx_pool(adapter, &adapter->rx_pool[i],
|
||||||
IBMVNIC_BUFFS_PER_POOL, i,
|
adapter->req_rx_add_entries_per_subcrq, i,
|
||||||
be64_to_cpu(size_array[i]), 1);
|
be64_to_cpu(size_array[i]), 1);
|
||||||
if (alloc_rx_pool(adapter, &adapter->rx_pool[i])) {
|
if (alloc_rx_pool(adapter, &adapter->rx_pool[i])) {
|
||||||
dev_err(dev, "Couldn't alloc rx pool\n");
|
dev_err(dev, "Couldn't alloc rx pool\n");
|
||||||
@@ -419,23 +419,23 @@ static int ibmvnic_open(struct net_device *netdev)
|
|||||||
for (i = 0; i < tx_subcrqs; i++) {
|
for (i = 0; i < tx_subcrqs; i++) {
|
||||||
tx_pool = &adapter->tx_pool[i];
|
tx_pool = &adapter->tx_pool[i];
|
||||||
tx_pool->tx_buff =
|
tx_pool->tx_buff =
|
||||||
kcalloc(adapter->max_tx_entries_per_subcrq,
|
kcalloc(adapter->req_tx_entries_per_subcrq,
|
||||||
sizeof(struct ibmvnic_tx_buff), GFP_KERNEL);
|
sizeof(struct ibmvnic_tx_buff), GFP_KERNEL);
|
||||||
if (!tx_pool->tx_buff)
|
if (!tx_pool->tx_buff)
|
||||||
goto tx_pool_alloc_failed;
|
goto tx_pool_alloc_failed;
|
||||||
|
|
||||||
if (alloc_long_term_buff(adapter, &tx_pool->long_term_buff,
|
if (alloc_long_term_buff(adapter, &tx_pool->long_term_buff,
|
||||||
adapter->max_tx_entries_per_subcrq *
|
adapter->req_tx_entries_per_subcrq *
|
||||||
adapter->req_mtu))
|
adapter->req_mtu))
|
||||||
goto tx_ltb_alloc_failed;
|
goto tx_ltb_alloc_failed;
|
||||||
|
|
||||||
tx_pool->free_map =
|
tx_pool->free_map =
|
||||||
kcalloc(adapter->max_tx_entries_per_subcrq,
|
kcalloc(adapter->req_tx_entries_per_subcrq,
|
||||||
sizeof(int), GFP_KERNEL);
|
sizeof(int), GFP_KERNEL);
|
||||||
if (!tx_pool->free_map)
|
if (!tx_pool->free_map)
|
||||||
goto tx_fm_alloc_failed;
|
goto tx_fm_alloc_failed;
|
||||||
|
|
||||||
for (j = 0; j < adapter->max_tx_entries_per_subcrq; j++)
|
for (j = 0; j < adapter->req_tx_entries_per_subcrq; j++)
|
||||||
tx_pool->free_map[j] = j;
|
tx_pool->free_map[j] = j;
|
||||||
|
|
||||||
tx_pool->consumer_index = 0;
|
tx_pool->consumer_index = 0;
|
||||||
@@ -705,6 +705,7 @@ static int ibmvnic_xmit(struct sk_buff *skb, struct net_device *netdev)
|
|||||||
u8 *hdrs = (u8 *)&adapter->tx_rx_desc_req;
|
u8 *hdrs = (u8 *)&adapter->tx_rx_desc_req;
|
||||||
struct device *dev = &adapter->vdev->dev;
|
struct device *dev = &adapter->vdev->dev;
|
||||||
struct ibmvnic_tx_buff *tx_buff = NULL;
|
struct ibmvnic_tx_buff *tx_buff = NULL;
|
||||||
|
struct ibmvnic_sub_crq_queue *tx_scrq;
|
||||||
struct ibmvnic_tx_pool *tx_pool;
|
struct ibmvnic_tx_pool *tx_pool;
|
||||||
unsigned int tx_send_failed = 0;
|
unsigned int tx_send_failed = 0;
|
||||||
unsigned int tx_map_failed = 0;
|
unsigned int tx_map_failed = 0;
|
||||||
@@ -724,6 +725,7 @@ static int ibmvnic_xmit(struct sk_buff *skb, struct net_device *netdev)
|
|||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
tx_pool = &adapter->tx_pool[queue_num];
|
tx_pool = &adapter->tx_pool[queue_num];
|
||||||
|
tx_scrq = adapter->tx_scrq[queue_num];
|
||||||
txq = netdev_get_tx_queue(netdev, skb_get_queue_mapping(skb));
|
txq = netdev_get_tx_queue(netdev, skb_get_queue_mapping(skb));
|
||||||
handle_array = (u64 *)((u8 *)(adapter->login_rsp_buf) +
|
handle_array = (u64 *)((u8 *)(adapter->login_rsp_buf) +
|
||||||
be32_to_cpu(adapter->login_rsp_buf->
|
be32_to_cpu(adapter->login_rsp_buf->
|
||||||
@@ -744,7 +746,7 @@ static int ibmvnic_xmit(struct sk_buff *skb, struct net_device *netdev)
|
|||||||
|
|
||||||
tx_pool->consumer_index =
|
tx_pool->consumer_index =
|
||||||
(tx_pool->consumer_index + 1) %
|
(tx_pool->consumer_index + 1) %
|
||||||
adapter->max_tx_entries_per_subcrq;
|
adapter->req_tx_entries_per_subcrq;
|
||||||
|
|
||||||
tx_buff = &tx_pool->tx_buff[index];
|
tx_buff = &tx_pool->tx_buff[index];
|
||||||
tx_buff->skb = skb;
|
tx_buff->skb = skb;
|
||||||
@@ -817,7 +819,7 @@ static int ibmvnic_xmit(struct sk_buff *skb, struct net_device *netdev)
|
|||||||
|
|
||||||
if (tx_pool->consumer_index == 0)
|
if (tx_pool->consumer_index == 0)
|
||||||
tx_pool->consumer_index =
|
tx_pool->consumer_index =
|
||||||
adapter->max_tx_entries_per_subcrq - 1;
|
adapter->req_tx_entries_per_subcrq - 1;
|
||||||
else
|
else
|
||||||
tx_pool->consumer_index--;
|
tx_pool->consumer_index--;
|
||||||
|
|
||||||
@@ -826,6 +828,14 @@ static int ibmvnic_xmit(struct sk_buff *skb, struct net_device *netdev)
|
|||||||
ret = NETDEV_TX_BUSY;
|
ret = NETDEV_TX_BUSY;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
atomic_inc(&tx_scrq->used);
|
||||||
|
|
||||||
|
if (atomic_read(&tx_scrq->used) >= adapter->req_tx_entries_per_subcrq) {
|
||||||
|
netdev_info(netdev, "Stopping queue %d\n", queue_num);
|
||||||
|
netif_stop_subqueue(netdev, queue_num);
|
||||||
|
}
|
||||||
|
|
||||||
tx_packets++;
|
tx_packets++;
|
||||||
tx_bytes += skb->len;
|
tx_bytes += skb->len;
|
||||||
txq->trans_start = jiffies;
|
txq->trans_start = jiffies;
|
||||||
@@ -1220,6 +1230,7 @@ static struct ibmvnic_sub_crq_queue *init_sub_crq_queue(struct ibmvnic_adapter
|
|||||||
scrq->adapter = adapter;
|
scrq->adapter = adapter;
|
||||||
scrq->size = 4 * PAGE_SIZE / sizeof(*scrq->msgs);
|
scrq->size = 4 * PAGE_SIZE / sizeof(*scrq->msgs);
|
||||||
scrq->cur = 0;
|
scrq->cur = 0;
|
||||||
|
atomic_set(&scrq->used, 0);
|
||||||
scrq->rx_skb_top = NULL;
|
scrq->rx_skb_top = NULL;
|
||||||
spin_lock_init(&scrq->lock);
|
spin_lock_init(&scrq->lock);
|
||||||
|
|
||||||
@@ -1368,14 +1379,28 @@ restart_loop:
|
|||||||
DMA_TO_DEVICE);
|
DMA_TO_DEVICE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (txbuff->last_frag)
|
if (txbuff->last_frag) {
|
||||||
|
atomic_dec(&scrq->used);
|
||||||
|
|
||||||
|
if (atomic_read(&scrq->used) <=
|
||||||
|
(adapter->req_tx_entries_per_subcrq / 2) &&
|
||||||
|
netif_subqueue_stopped(adapter->netdev,
|
||||||
|
txbuff->skb)) {
|
||||||
|
netif_wake_subqueue(adapter->netdev,
|
||||||
|
scrq->pool_index);
|
||||||
|
netdev_dbg(adapter->netdev,
|
||||||
|
"Started queue %d\n",
|
||||||
|
scrq->pool_index);
|
||||||
|
}
|
||||||
|
|
||||||
dev_kfree_skb_any(txbuff->skb);
|
dev_kfree_skb_any(txbuff->skb);
|
||||||
|
}
|
||||||
|
|
||||||
adapter->tx_pool[pool].free_map[adapter->tx_pool[pool].
|
adapter->tx_pool[pool].free_map[adapter->tx_pool[pool].
|
||||||
producer_index] = index;
|
producer_index] = index;
|
||||||
adapter->tx_pool[pool].producer_index =
|
adapter->tx_pool[pool].producer_index =
|
||||||
(adapter->tx_pool[pool].producer_index + 1) %
|
(adapter->tx_pool[pool].producer_index + 1) %
|
||||||
adapter->max_tx_entries_per_subcrq;
|
adapter->req_tx_entries_per_subcrq;
|
||||||
}
|
}
|
||||||
/* remove tx_comp scrq*/
|
/* remove tx_comp scrq*/
|
||||||
next->tx_comp.first = 0;
|
next->tx_comp.first = 0;
|
||||||
|
|||||||
@@ -863,6 +863,7 @@ struct ibmvnic_sub_crq_queue {
|
|||||||
spinlock_t lock;
|
spinlock_t lock;
|
||||||
struct sk_buff *rx_skb_top;
|
struct sk_buff *rx_skb_top;
|
||||||
struct ibmvnic_adapter *adapter;
|
struct ibmvnic_adapter *adapter;
|
||||||
|
atomic_t used;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ibmvnic_long_term_buff {
|
struct ibmvnic_long_term_buff {
|
||||||
|
|||||||
@@ -491,13 +491,14 @@ static int ks8995_probe(struct spi_device *spi)
|
|||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
ks->regs_attr.size = ks->chip->regs_size;
|
|
||||||
memcpy(&ks->regs_attr, &ks8995_registers_attr, sizeof(ks->regs_attr));
|
memcpy(&ks->regs_attr, &ks8995_registers_attr, sizeof(ks->regs_attr));
|
||||||
|
ks->regs_attr.size = ks->chip->regs_size;
|
||||||
|
|
||||||
err = ks8995_reset(ks);
|
err = ks8995_reset(ks);
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
|
sysfs_attr_init(&ks->regs_attr.attr);
|
||||||
err = sysfs_create_bin_file(&spi->dev.kobj, &ks->regs_attr);
|
err = sysfs_create_bin_file(&spi->dev.kobj, &ks->regs_attr);
|
||||||
if (err) {
|
if (err) {
|
||||||
dev_err(&spi->dev, "unable to create sysfs file, err=%d\n",
|
dev_err(&spi->dev, "unable to create sysfs file, err=%d\n",
|
||||||
|
|||||||
@@ -4080,8 +4080,8 @@ release:
|
|||||||
sdio_release_host(sdiodev->func[1]);
|
sdio_release_host(sdiodev->func[1]);
|
||||||
fail:
|
fail:
|
||||||
brcmf_dbg(TRACE, "failed: dev=%s, err=%d\n", dev_name(dev), err);
|
brcmf_dbg(TRACE, "failed: dev=%s, err=%d\n", dev_name(dev), err);
|
||||||
device_release_driver(dev);
|
|
||||||
device_release_driver(&sdiodev->func[2]->dev);
|
device_release_driver(&sdiodev->func[2]->dev);
|
||||||
|
device_release_driver(dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct brcmf_sdio *brcmf_sdio_probe(struct brcmf_sdio_dev *sdiodev)
|
struct brcmf_sdio *brcmf_sdio_probe(struct brcmf_sdio_dev *sdiodev)
|
||||||
|
|||||||
@@ -3047,6 +3047,7 @@ static int hwsim_new_radio_nl(struct sk_buff *msg, struct genl_info *info)
|
|||||||
{
|
{
|
||||||
struct hwsim_new_radio_params param = { 0 };
|
struct hwsim_new_radio_params param = { 0 };
|
||||||
const char *hwname = NULL;
|
const char *hwname = NULL;
|
||||||
|
int ret;
|
||||||
|
|
||||||
param.reg_strict = info->attrs[HWSIM_ATTR_REG_STRICT_REG];
|
param.reg_strict = info->attrs[HWSIM_ATTR_REG_STRICT_REG];
|
||||||
param.p2p_device = info->attrs[HWSIM_ATTR_SUPPORT_P2P_DEVICE];
|
param.p2p_device = info->attrs[HWSIM_ATTR_SUPPORT_P2P_DEVICE];
|
||||||
@@ -3086,7 +3087,9 @@ static int hwsim_new_radio_nl(struct sk_buff *msg, struct genl_info *info)
|
|||||||
param.regd = hwsim_world_regdom_custom[idx];
|
param.regd = hwsim_world_regdom_custom[idx];
|
||||||
}
|
}
|
||||||
|
|
||||||
return mac80211_hwsim_new_radio(info, ¶m);
|
ret = mac80211_hwsim_new_radio(info, ¶m);
|
||||||
|
kfree(hwname);
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int hwsim_del_radio_nl(struct sk_buff *msg, struct genl_info *info)
|
static int hwsim_del_radio_nl(struct sk_buff *msg, struct genl_info *info)
|
||||||
|
|||||||
@@ -964,7 +964,8 @@ rio_dma_transfer(struct file *filp, u32 transfer_mode,
|
|||||||
req->sgt.sgl, req->sgt.nents, dir);
|
req->sgt.sgl, req->sgt.nents, dir);
|
||||||
if (nents == -EFAULT) {
|
if (nents == -EFAULT) {
|
||||||
rmcd_error("Failed to map SG list");
|
rmcd_error("Failed to map SG list");
|
||||||
return -EFAULT;
|
ret = -EFAULT;
|
||||||
|
goto err_pg;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = do_dma_request(req, xfer, sync, nents);
|
ret = do_dma_request(req, xfer, sync, nents);
|
||||||
|
|||||||
@@ -8185,11 +8185,17 @@ lpfc_cmpl_reg_new_vport(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb)
|
|||||||
spin_lock_irq(shost->host_lock);
|
spin_lock_irq(shost->host_lock);
|
||||||
vport->fc_flag |= FC_VPORT_NEEDS_REG_VPI;
|
vport->fc_flag |= FC_VPORT_NEEDS_REG_VPI;
|
||||||
spin_unlock_irq(shost->host_lock);
|
spin_unlock_irq(shost->host_lock);
|
||||||
if (vport->port_type == LPFC_PHYSICAL_PORT
|
if (mb->mbxStatus == MBX_NOT_FINISHED)
|
||||||
&& !(vport->fc_flag & FC_LOGO_RCVD_DID_CHNG))
|
break;
|
||||||
|
if ((vport->port_type == LPFC_PHYSICAL_PORT) &&
|
||||||
|
!(vport->fc_flag & FC_LOGO_RCVD_DID_CHNG)) {
|
||||||
|
if (phba->sli_rev == LPFC_SLI_REV4)
|
||||||
lpfc_issue_init_vfi(vport);
|
lpfc_issue_init_vfi(vport);
|
||||||
else
|
else
|
||||||
|
lpfc_initial_flogi(vport);
|
||||||
|
} else {
|
||||||
lpfc_initial_fdisc(vport);
|
lpfc_initial_fdisc(vport);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -2707,13 +2707,9 @@ ql_dump_buffer(uint32_t level, scsi_qla_host_t *vha, int32_t id,
|
|||||||
"%-+5d 0 1 2 3 4 5 6 7 8 9 A B C D E F\n", size);
|
"%-+5d 0 1 2 3 4 5 6 7 8 9 A B C D E F\n", size);
|
||||||
ql_dbg(level, vha, id,
|
ql_dbg(level, vha, id,
|
||||||
"----- -----------------------------------------------\n");
|
"----- -----------------------------------------------\n");
|
||||||
for (cnt = 0; cnt < size; cnt++, buf++) {
|
for (cnt = 0; cnt < size; cnt += 16) {
|
||||||
if (cnt % 16 == 0)
|
ql_dbg(level, vha, id, "%04x: ", cnt);
|
||||||
ql_dbg(level, vha, id, "%04x:", cnt & ~0xFU);
|
print_hex_dump(KERN_CONT, "", DUMP_PREFIX_NONE, 16, 1,
|
||||||
printk(" %02x", *buf);
|
buf + cnt, min(16U, size - cnt), false);
|
||||||
if (cnt % 16 == 15)
|
|
||||||
printk("\n");
|
|
||||||
}
|
}
|
||||||
if (cnt % 16 != 0)
|
|
||||||
printk("\n");
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2041,11 +2041,13 @@ static void __scsi_init_queue(struct Scsi_Host *shost, struct request_queue *q)
|
|||||||
q->limits.cluster = 0;
|
q->limits.cluster = 0;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* set a reasonable default alignment on word boundaries: the
|
* Set a reasonable default alignment: The larger of 32-byte (dword),
|
||||||
* host and device may alter it using
|
* which is a common minimum for HBAs, and the minimum DMA alignment,
|
||||||
* blk_queue_update_dma_alignment() later.
|
* which is set by the platform.
|
||||||
|
*
|
||||||
|
* Devices that require a bigger alignment can increase it later.
|
||||||
*/
|
*/
|
||||||
blk_queue_dma_alignment(q, 0x03);
|
blk_queue_dma_alignment(q, max(4, dma_get_cache_alignment()) - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct request_queue *__scsi_alloc_queue(struct Scsi_Host *shost,
|
struct request_queue *__scsi_alloc_queue(struct Scsi_Host *shost,
|
||||||
|
|||||||
@@ -365,7 +365,6 @@ config SPI_FSL_SPI
|
|||||||
config SPI_FSL_DSPI
|
config SPI_FSL_DSPI
|
||||||
tristate "Freescale DSPI controller"
|
tristate "Freescale DSPI controller"
|
||||||
select REGMAP_MMIO
|
select REGMAP_MMIO
|
||||||
depends on HAS_DMA
|
|
||||||
depends on SOC_VF610 || SOC_LS1021A || ARCH_LAYERSCAPE || COMPILE_TEST
|
depends on SOC_VF610 || SOC_LS1021A || ARCH_LAYERSCAPE || COMPILE_TEST
|
||||||
help
|
help
|
||||||
This enables support for the Freescale DSPI controller in master
|
This enables support for the Freescale DSPI controller in master
|
||||||
|
|||||||
@@ -3092,15 +3092,10 @@ void dwc3_gadget_exit(struct dwc3 *dwc)
|
|||||||
|
|
||||||
int dwc3_gadget_suspend(struct dwc3 *dwc)
|
int dwc3_gadget_suspend(struct dwc3 *dwc)
|
||||||
{
|
{
|
||||||
int ret;
|
|
||||||
|
|
||||||
if (!dwc->gadget_driver)
|
if (!dwc->gadget_driver)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
ret = dwc3_gadget_run_stop(dwc, false, false);
|
dwc3_gadget_run_stop(dwc, false, false);
|
||||||
if (ret < 0)
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
dwc3_disconnect_gadget(dwc);
|
dwc3_disconnect_gadget(dwc);
|
||||||
__dwc3_gadget_stop(dwc);
|
__dwc3_gadget_stop(dwc);
|
||||||
|
|
||||||
|
|||||||
@@ -300,6 +300,7 @@ static ssize_t gadget_dev_desc_UDC_store(struct config_item *item,
|
|||||||
ret = unregister_gadget(gi);
|
ret = unregister_gadget(gi);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto err;
|
goto err;
|
||||||
|
kfree(name);
|
||||||
} else {
|
} else {
|
||||||
if (gi->composite.gadget_driver.udc_name) {
|
if (gi->composite.gadget_driver.udc_name) {
|
||||||
ret = -EBUSY;
|
ret = -EBUSY;
|
||||||
|
|||||||
@@ -2262,9 +2262,18 @@ static int __ffs_data_do_os_desc(enum ffs_os_desc_type type,
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (len < sizeof(*d) ||
|
if (len < sizeof(*d) ||
|
||||||
d->bFirstInterfaceNumber >= ffs->interfaces_count ||
|
d->bFirstInterfaceNumber >= ffs->interfaces_count)
|
||||||
d->Reserved1)
|
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
if (d->Reserved1 != 1) {
|
||||||
|
/*
|
||||||
|
* According to the spec, Reserved1 must be set to 1
|
||||||
|
* but older kernels incorrectly rejected non-zero
|
||||||
|
* values. We fix it here to avoid returning EINVAL
|
||||||
|
* in response to values we used to accept.
|
||||||
|
*/
|
||||||
|
pr_debug("usb_ext_compat_desc::Reserved1 forced to 1\n");
|
||||||
|
d->Reserved1 = 1;
|
||||||
|
}
|
||||||
for (i = 0; i < ARRAY_SIZE(d->Reserved2); ++i)
|
for (i = 0; i < ARRAY_SIZE(d->Reserved2); ++i)
|
||||||
if (d->Reserved2[i])
|
if (d->Reserved2[i])
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|||||||
@@ -1819,8 +1819,10 @@ dev_config (struct file *fd, const char __user *buf, size_t len, loff_t *ptr)
|
|||||||
|
|
||||||
spin_lock_irq (&dev->lock);
|
spin_lock_irq (&dev->lock);
|
||||||
value = -EINVAL;
|
value = -EINVAL;
|
||||||
if (dev->buf)
|
if (dev->buf) {
|
||||||
|
kfree(kbuf);
|
||||||
goto fail;
|
goto fail;
|
||||||
|
}
|
||||||
dev->buf = kbuf;
|
dev->buf = kbuf;
|
||||||
|
|
||||||
/* full or low speed config */
|
/* full or low speed config */
|
||||||
|
|||||||
@@ -1146,15 +1146,15 @@ static int scan_dma_completions(struct net2280_ep *ep)
|
|||||||
*/
|
*/
|
||||||
while (!list_empty(&ep->queue)) {
|
while (!list_empty(&ep->queue)) {
|
||||||
struct net2280_request *req;
|
struct net2280_request *req;
|
||||||
u32 tmp;
|
u32 req_dma_count;
|
||||||
|
|
||||||
req = list_entry(ep->queue.next,
|
req = list_entry(ep->queue.next,
|
||||||
struct net2280_request, queue);
|
struct net2280_request, queue);
|
||||||
if (!req->valid)
|
if (!req->valid)
|
||||||
break;
|
break;
|
||||||
rmb();
|
rmb();
|
||||||
tmp = le32_to_cpup(&req->td->dmacount);
|
req_dma_count = le32_to_cpup(&req->td->dmacount);
|
||||||
if ((tmp & BIT(VALID_BIT)) != 0)
|
if ((req_dma_count & BIT(VALID_BIT)) != 0)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* SHORT_PACKET_TRANSFERRED_INTERRUPT handles "usb-short"
|
/* SHORT_PACKET_TRANSFERRED_INTERRUPT handles "usb-short"
|
||||||
@@ -1163,40 +1163,41 @@ static int scan_dma_completions(struct net2280_ep *ep)
|
|||||||
*/
|
*/
|
||||||
if (unlikely(req->td->dmadesc == 0)) {
|
if (unlikely(req->td->dmadesc == 0)) {
|
||||||
/* paranoia */
|
/* paranoia */
|
||||||
tmp = readl(&ep->dma->dmacount);
|
u32 const ep_dmacount = readl(&ep->dma->dmacount);
|
||||||
if (tmp & DMA_BYTE_COUNT_MASK)
|
|
||||||
|
if (ep_dmacount & DMA_BYTE_COUNT_MASK)
|
||||||
break;
|
break;
|
||||||
/* single transfer mode */
|
/* single transfer mode */
|
||||||
dma_done(ep, req, tmp, 0);
|
dma_done(ep, req, req_dma_count, 0);
|
||||||
num_completed++;
|
num_completed++;
|
||||||
break;
|
break;
|
||||||
} else if (!ep->is_in &&
|
} else if (!ep->is_in &&
|
||||||
(req->req.length % ep->ep.maxpacket) &&
|
(req->req.length % ep->ep.maxpacket) &&
|
||||||
!(ep->dev->quirks & PLX_PCIE)) {
|
!(ep->dev->quirks & PLX_PCIE)) {
|
||||||
|
|
||||||
tmp = readl(&ep->regs->ep_stat);
|
u32 const ep_stat = readl(&ep->regs->ep_stat);
|
||||||
/* AVOID TROUBLE HERE by not issuing short reads from
|
/* AVOID TROUBLE HERE by not issuing short reads from
|
||||||
* your gadget driver. That helps avoids errata 0121,
|
* your gadget driver. That helps avoids errata 0121,
|
||||||
* 0122, and 0124; not all cases trigger the warning.
|
* 0122, and 0124; not all cases trigger the warning.
|
||||||
*/
|
*/
|
||||||
if ((tmp & BIT(NAK_OUT_PACKETS)) == 0) {
|
if ((ep_stat & BIT(NAK_OUT_PACKETS)) == 0) {
|
||||||
ep_warn(ep->dev, "%s lost packet sync!\n",
|
ep_warn(ep->dev, "%s lost packet sync!\n",
|
||||||
ep->ep.name);
|
ep->ep.name);
|
||||||
req->req.status = -EOVERFLOW;
|
req->req.status = -EOVERFLOW;
|
||||||
} else {
|
} else {
|
||||||
tmp = readl(&ep->regs->ep_avail);
|
u32 const ep_avail = readl(&ep->regs->ep_avail);
|
||||||
if (tmp) {
|
if (ep_avail) {
|
||||||
/* fifo gets flushed later */
|
/* fifo gets flushed later */
|
||||||
ep->out_overflow = 1;
|
ep->out_overflow = 1;
|
||||||
ep_dbg(ep->dev,
|
ep_dbg(ep->dev,
|
||||||
"%s dma, discard %d len %d\n",
|
"%s dma, discard %d len %d\n",
|
||||||
ep->ep.name, tmp,
|
ep->ep.name, ep_avail,
|
||||||
req->req.length);
|
req->req.length);
|
||||||
req->req.status = -EOVERFLOW;
|
req->req.status = -EOVERFLOW;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
dma_done(ep, req, tmp, 0);
|
dma_done(ep, req, req_dma_count, 0);
|
||||||
num_completed++;
|
num_completed++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2534,9 +2534,10 @@ static int pxa_udc_remove(struct platform_device *_dev)
|
|||||||
usb_del_gadget_udc(&udc->gadget);
|
usb_del_gadget_udc(&udc->gadget);
|
||||||
pxa_cleanup_debugfs(udc);
|
pxa_cleanup_debugfs(udc);
|
||||||
|
|
||||||
if (!IS_ERR_OR_NULL(udc->transceiver))
|
if (!IS_ERR_OR_NULL(udc->transceiver)) {
|
||||||
usb_unregister_notifier(udc->transceiver, &pxa27x_udc_phy);
|
usb_unregister_notifier(udc->transceiver, &pxa27x_udc_phy);
|
||||||
usb_put_phy(udc->transceiver);
|
usb_put_phy(udc->transceiver);
|
||||||
|
}
|
||||||
|
|
||||||
udc->transceiver = NULL;
|
udc->transceiver = NULL;
|
||||||
the_controller = NULL;
|
the_controller = NULL;
|
||||||
|
|||||||
@@ -222,7 +222,7 @@
|
|||||||
#define USB3_EP0_SS_MAX_PACKET_SIZE 512
|
#define USB3_EP0_SS_MAX_PACKET_SIZE 512
|
||||||
#define USB3_EP0_HSFS_MAX_PACKET_SIZE 64
|
#define USB3_EP0_HSFS_MAX_PACKET_SIZE 64
|
||||||
#define USB3_EP0_BUF_SIZE 8
|
#define USB3_EP0_BUF_SIZE 8
|
||||||
#define USB3_MAX_NUM_PIPES 30
|
#define USB3_MAX_NUM_PIPES 6 /* This includes PIPE 0 */
|
||||||
#define USB3_WAIT_US 3
|
#define USB3_WAIT_US 3
|
||||||
|
|
||||||
struct renesas_usb3;
|
struct renesas_usb3;
|
||||||
|
|||||||
@@ -323,6 +323,8 @@ int register_virtio_device(struct virtio_device *dev)
|
|||||||
/* device_register() causes the bus infrastructure to look for a
|
/* device_register() causes the bus infrastructure to look for a
|
||||||
* matching driver. */
|
* matching driver. */
|
||||||
err = device_register(&dev->dev);
|
err = device_register(&dev->dev);
|
||||||
|
if (err)
|
||||||
|
ida_simple_remove(&virtio_index_ida, dev->index);
|
||||||
out:
|
out:
|
||||||
if (err)
|
if (err)
|
||||||
add_status(dev, VIRTIO_CONFIG_S_FAILED);
|
add_status(dev, VIRTIO_CONFIG_S_FAILED);
|
||||||
|
|||||||
@@ -106,6 +106,9 @@ bool afs_cm_incoming_call(struct afs_call *call)
|
|||||||
case CBProbe:
|
case CBProbe:
|
||||||
call->type = &afs_SRXCBProbe;
|
call->type = &afs_SRXCBProbe;
|
||||||
return true;
|
return true;
|
||||||
|
case CBProbeUuid:
|
||||||
|
call->type = &afs_SRXCBProbeUuid;
|
||||||
|
return true;
|
||||||
case CBTellMeAboutYourself:
|
case CBTellMeAboutYourself:
|
||||||
call->type = &afs_SRXCBTellMeAboutYourself;
|
call->type = &afs_SRXCBTellMeAboutYourself;
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -9362,6 +9362,7 @@ int btrfs_drop_snapshot(struct btrfs_root *root,
|
|||||||
ret = btrfs_del_root(trans, tree_root, &root->root_key);
|
ret = btrfs_del_root(trans, tree_root, &root->root_key);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
btrfs_abort_transaction(trans, ret);
|
btrfs_abort_transaction(trans, ret);
|
||||||
|
err = ret;
|
||||||
goto out_end_trans;
|
goto out_end_trans;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -2098,7 +2098,7 @@ out:
|
|||||||
if (new_inode != NULL)
|
if (new_inode != NULL)
|
||||||
nfs_drop_nlink(new_inode);
|
nfs_drop_nlink(new_inode);
|
||||||
d_move(old_dentry, new_dentry);
|
d_move(old_dentry, new_dentry);
|
||||||
nfs_set_verifier(new_dentry,
|
nfs_set_verifier(old_dentry,
|
||||||
nfs_save_change_attribute(new_dir));
|
nfs_save_change_attribute(new_dir));
|
||||||
} else if (error == -ENOENT)
|
} else if (error == -ENOENT)
|
||||||
nfs_dentry_handle_enoent(old_dentry);
|
nfs_dentry_handle_enoent(old_dentry);
|
||||||
|
|||||||
@@ -2386,6 +2386,7 @@ retry:
|
|||||||
*/
|
*/
|
||||||
if (ip->i_ino != inum + i) {
|
if (ip->i_ino != inum + i) {
|
||||||
xfs_iunlock(ip, XFS_ILOCK_EXCL);
|
xfs_iunlock(ip, XFS_ILOCK_EXCL);
|
||||||
|
rcu_read_unlock();
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -659,7 +659,6 @@ static inline void *dma_zalloc_coherent(struct device *dev, size_t size,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_HAS_DMA
|
|
||||||
static inline int dma_get_cache_alignment(void)
|
static inline int dma_get_cache_alignment(void)
|
||||||
{
|
{
|
||||||
#ifdef ARCH_DMA_MINALIGN
|
#ifdef ARCH_DMA_MINALIGN
|
||||||
@@ -667,7 +666,6 @@ static inline int dma_get_cache_alignment(void)
|
|||||||
#endif
|
#endif
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
/* flags for the coherent memory api */
|
/* flags for the coherent memory api */
|
||||||
#define DMA_MEMORY_MAP 0x01
|
#define DMA_MEMORY_MAP 0x01
|
||||||
|
|||||||
@@ -32,6 +32,7 @@
|
|||||||
|
|
||||||
#include <linux/types.h>
|
#include <linux/types.h>
|
||||||
#include <linux/spinlock_types.h>
|
#include <linux/spinlock_types.h>
|
||||||
|
#include <linux/atomic.h>
|
||||||
|
|
||||||
struct device;
|
struct device;
|
||||||
struct device_node;
|
struct device_node;
|
||||||
@@ -70,7 +71,7 @@ struct gen_pool {
|
|||||||
*/
|
*/
|
||||||
struct gen_pool_chunk {
|
struct gen_pool_chunk {
|
||||||
struct list_head next_chunk; /* next chunk in pool */
|
struct list_head next_chunk; /* next chunk in pool */
|
||||||
atomic_t avail;
|
atomic_long_t avail;
|
||||||
phys_addr_t phys_addr; /* physical starting address of memory chunk */
|
phys_addr_t phys_addr; /* physical starting address of memory chunk */
|
||||||
unsigned long start_addr; /* start address of memory chunk */
|
unsigned long start_addr; /* start address of memory chunk */
|
||||||
unsigned long end_addr; /* end address of memory chunk (inclusive) */
|
unsigned long end_addr; /* end address of memory chunk (inclusive) */
|
||||||
|
|||||||
@@ -381,18 +381,6 @@ static inline void mmu_notifier_mm_destroy(struct mm_struct *mm)
|
|||||||
___pmd; \
|
___pmd; \
|
||||||
})
|
})
|
||||||
|
|
||||||
#define pmdp_huge_get_and_clear_notify(__mm, __haddr, __pmd) \
|
|
||||||
({ \
|
|
||||||
unsigned long ___haddr = __haddr & HPAGE_PMD_MASK; \
|
|
||||||
pmd_t ___pmd; \
|
|
||||||
\
|
|
||||||
___pmd = pmdp_huge_get_and_clear(__mm, __haddr, __pmd); \
|
|
||||||
mmu_notifier_invalidate_range(__mm, ___haddr, \
|
|
||||||
___haddr + HPAGE_PMD_SIZE); \
|
|
||||||
\
|
|
||||||
___pmd; \
|
|
||||||
})
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* set_pte_at_notify() sets the pte _after_ running the notifier.
|
* set_pte_at_notify() sets the pte _after_ running the notifier.
|
||||||
* This is safe to start by updating the secondary MMUs, because the primary MMU
|
* This is safe to start by updating the secondary MMUs, because the primary MMU
|
||||||
@@ -480,7 +468,6 @@ static inline void mmu_notifier_mm_destroy(struct mm_struct *mm)
|
|||||||
#define pmdp_clear_young_notify pmdp_test_and_clear_young
|
#define pmdp_clear_young_notify pmdp_test_and_clear_young
|
||||||
#define ptep_clear_flush_notify ptep_clear_flush
|
#define ptep_clear_flush_notify ptep_clear_flush
|
||||||
#define pmdp_huge_clear_flush_notify pmdp_huge_clear_flush
|
#define pmdp_huge_clear_flush_notify pmdp_huge_clear_flush
|
||||||
#define pmdp_huge_get_and_clear_notify pmdp_huge_get_and_clear
|
|
||||||
#define set_pte_at_notify set_pte_at
|
#define set_pte_at_notify set_pte_at
|
||||||
|
|
||||||
#endif /* CONFIG_MMU_NOTIFIER */
|
#endif /* CONFIG_MMU_NOTIFIER */
|
||||||
|
|||||||
@@ -88,10 +88,11 @@ static inline int gpmc_nand_init(struct omap_nand_platform_data *d,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if IS_ENABLED(CONFIG_MTD_ONENAND_OMAP2)
|
#if IS_ENABLED(CONFIG_MTD_ONENAND_OMAP2)
|
||||||
extern void gpmc_onenand_init(struct omap_onenand_platform_data *d);
|
extern int gpmc_onenand_init(struct omap_onenand_platform_data *d);
|
||||||
#else
|
#else
|
||||||
#define board_onenand_data NULL
|
#define board_onenand_data NULL
|
||||||
static inline void gpmc_onenand_init(struct omap_onenand_platform_data *d)
|
static inline int gpmc_onenand_init(struct omap_onenand_platform_data *d)
|
||||||
{
|
{
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -116,6 +116,12 @@ struct attribute_group {
|
|||||||
.show = _name##_show, \
|
.show = _name##_show, \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define __ATTR_RO_MODE(_name, _mode) { \
|
||||||
|
.attr = { .name = __stringify(_name), \
|
||||||
|
.mode = VERIFY_OCTAL_PERMISSIONS(_mode) }, \
|
||||||
|
.show = _name##_show, \
|
||||||
|
}
|
||||||
|
|
||||||
#define __ATTR_WO(_name) { \
|
#define __ATTR_WO(_name) { \
|
||||||
.attr = { .name = __stringify(_name), .mode = S_IWUSR }, \
|
.attr = { .name = __stringify(_name), .mode = S_IWUSR }, \
|
||||||
.store = _name##_store, \
|
.store = _name##_store, \
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user