Merge 4.14.106 into android-4.14
Changes in 4.14.106
cpufreq: Use struct kobj_attribute instead of struct global_attr
USB: serial: option: add Telit ME910 ECM composition
USB: serial: cp210x: add ID for Ingenico 3070
USB: serial: ftdi_sio: add ID for Hjelmslund Electronics USB485
staging: comedi: ni_660x: fix missing break in switch statement
staging: wilc1000: fix to set correct value for 'vif_num'
staging: android: ion: fix sys heap pool's gfp_flags
ip6mr: Do not call __IP6_INC_STATS() from preemptible context
net: dsa: mv88e6xxx: handle unknown duplex modes gracefully in mv88e6xxx_port_set_duplex
net-sysfs: Fix mem leak in netdev_register_kobject
sky2: Disable MSI on Dell Inspiron 1545 and Gateway P-79
team: Free BPF filter when unregistering netdev
tipc: fix RDM/DGRAM connect() regression
bnxt_en: Drop oversize TX packets to prevent errors.
geneve: correctly handle ipv6.disable module parameter
hv_netvsc: Fix IP header checksum for coalesced packets
net: dsa: mv88e6xxx: Fix u64 statistics
netlabel: fix out-of-bounds memory accesses
net: netem: fix skb length BUG_ON in __skb_to_sgvec
net: nfc: Fix NULL dereference on nfc_llcp_build_tlv fails
net: phy: phylink: fix uninitialized variable in phylink_get_mac_state
net: sit: fix memory leak in sit_init_net()
net: socket: set sock->sk to NULL after calling proto_ops::release()
xen-netback: don't populate the hash cache on XenBus disconnect
xen-netback: fix occasional leak of grant ref mappings under memory pressure
net: Add __icmp_send helper.
net: avoid use IPCB in cipso_v4_error
ipv4: Return error for RTA_VIA attribute
ipv6: Return error for RTA_VIA attribute
mpls: Return error for RTA_GATEWAY attribute
tun: fix blocking read
tun: remove unnecessary memory barrier
net: phy: Micrel KSZ8061: link failure after cable connect
net: dsa: mv88e6xxx: Fix statistics on mv88e6161
x86/CPU/AMD: Set the CPB bit unconditionally on F17h
applicom: Fix potential Spectre v1 vulnerabilities
MIPS: irq: Allocate accurate order pages for irq stack
hugetlbfs: fix races and page leaks during migration
xtensa: fix get_wchan
Bluetooth: Fix locking in bt_accept_enqueue() for BH context
exec: Fix mem leak in kernel_read_file
scsi: core: reset host byte in DID_NEXUS_FAILURE case
media: uvcvideo: Fix 'type' check leading to overflow
vti4: Fix a ipip packet processing bug in 'IPCOMP' virtual tunnel
perf core: Fix perf_proc_update_handler() bug
perf tools: Handle TOPOLOGY headers with no CPU
IB/{hfi1, qib}: Fix WC.byte_len calculation for UD_SEND_WITH_IMM
iommu/amd: Call free_iova_fast with pfn in map_sg
iommu/amd: Unmap all mapped pages in error path of map_sg
ipvs: Fix signed integer overflow when setsockopt timeout
iommu/amd: Fix IOMMU page flush when detach device from a domain
xtensa: SMP: fix ccount_timer_shutdown
selftests: cpu-hotplug: fix case where CPUs offline > CPUs present
xtensa: SMP: fix secondary CPU initialization
xtensa: smp_lx200_defconfig: fix vectors clash
xtensa: SMP: mark each possible CPU as present
xtensa: SMP: limit number of possible CPUs by NR_CPUS
net: altera_tse: fix msgdma_tx_completion on non-zero fill_level case
net: hns: Fix for missing of_node_put() after of_parse_phandle()
net: hns: Restart autoneg need return failed when autoneg off
net: hns: Fix wrong read accesses via Clause 45 MDIO protocol
net: stmmac: dwmac-rk: fix error handling in rk_gmac_powerup()
netfilter: ebtables: compat: un-break 32bit setsockopt when no rules are present
gpio: vf610: Mask all GPIO interrupts
selftests: timers: use LDLIBS instead of LDFLAGS
nfs: Fix NULL pointer dereference of dev_name
qed: Fix bug in tx promiscuous mode settings
qed: Fix LACP pdu drops for VFs
qed: Fix VF probe failure while FLR
qed: Fix system crash in ll2 xmit
qed: Fix stack out of bounds bug
scsi: libfc: free skb when receiving invalid flogi resp
scsi: 53c700: pass correct "dev" to dma_alloc_attrs()
platform/x86: Fix unmet dependency warning for SAMSUNG_Q10
cifs: fix computation for MAX_SMB2_HDR_SIZE
x86/microcode/amd: Don't falsely trick the late loading mechanism
arm64: kprobe: Always blacklist the KVM world-switch code
apparmor: Fix aa_label_build() error handling for failed merges
x86/kexec: Don't setup EFI info if EFI runtime is not enabled
x86_64: increase stack size for KASAN_EXTRA
mm, memory_hotplug: is_mem_section_removable do not pass the end of a zone
mm, memory_hotplug: test_pages_in_a_zone do not pass the end of zone
lib/test_kmod.c: potential double free in error handling
fs/drop_caches.c: avoid softlockups in drop_pagecache_sb()
autofs: drop dentry reference only when it is never used
autofs: fix error return in autofs_fill_super()
ARM: dts: omap4-droid4: Fix typo in cpcap IRQ flags
arm64: dts: renesas: r8a7796: Enable DMA for SCIF2
soc: fsl: qbman: avoid race in clearing QMan interrupt
bpf: sock recvbuff must be limited by rmem_max in bpf_setsockopt()
ARM: pxa: ssp: unneeded to free devm_ allocated data
arm64: dts: add msm8996 compatible to gicv3
DTS: CI20: Fix bugs in ci20's device tree.
usb: phy: fix link errors
irqchip/mmp: Only touch the PJ4 IRQ & FIQ bits on enable/disable
net: stmmac: Fallback to Platform Data clock in Watchdog conversion
net: stmmac: Send TSO packets always from Queue 0
net: stmmac: Disable EEE mode earlier in XMIT callback
irqchip/gic-v3-its: Fix ITT_entry_size accessor
relay: check return of create_buf_file() properly
bpf, selftests: fix handling of sparse CPU allocations
bpf: fix lockdep false positive in percpu_freelist
drm/sun4i: tcon: Prepare and enable TCON channel 0 clock at init
dmaengine: at_xdmac: Fix wrongfull report of a channel as in use
vsock/virtio: fix kernel panic after device hot-unplug
vsock/virtio: reset connected sockets on device removal
dmaengine: dmatest: Abort test in case of mapping error
selftests: netfilter: fix config fragment CONFIG_NF_TABLES_INET
selftests: netfilter: add simple masq/redirect test cases
netfilter: nf_nat: skip nat clash resolution for same-origin entries
s390/qeth: fix use-after-free in error path
perf symbols: Filter out hidden symbols from labels
perf trace: Support multiple "vfs_getname" probes
MIPS: Remove function size check in get_frame_info()
i2c: omap: Use noirq system sleep pm ops to idle device for suspend
fs: ratelimit __find_get_block_slow() failure message.
qed: Fix EQ full firmware assert.
qed: Consider TX tcs while deriving the max num_queues for PF.
Input: wacom_serial4 - add support for Wacom ArtPad II tablet
Input: elan_i2c - add id for touchpad found in Lenovo s21e-20
iscsi_ibft: Fix missing break in switch statement
scsi: aacraid: Fix missing break in switch statement
arm64: dts: hikey: Give wifi some time after power-on
ARM: dts: exynos: Fix pinctrl definition for eMMC RTSN line on Odroid X2/U3
ARM: dts: exynos: Add minimal clkout parameters to Exynos3250 PMU
drm: disable uncached DMA optimization for ARM and arm64
ARM: 8781/1: Fix Thumb-2 syscall return for binutils 2.29+
gfs2: Fix missed wakeups in find_insert_glock
ath9k: Avoid OF no-EEPROM quirks without qca,no-eeprom
driver core: Postpone DMA tear-down until after devres release
perf/x86/intel: Make cpuc allocations consistent
perf/x86/intel: Generalize dynamic constraint creation
x86: Add TSX Force Abort CPUID/MSR
perf/x86/intel: Implement support for TSX Force Abort
Linux 4.14.106
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
2
Makefile
2
Makefile
@@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 4
|
||||
PATCHLEVEL = 14
|
||||
SUBLEVEL = 105
|
||||
SUBLEVEL = 106
|
||||
EXTRAVERSION =
|
||||
NAME = Petit Gorille
|
||||
|
||||
|
||||
@@ -172,6 +172,9 @@
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <3>;
|
||||
interrupt-parent = <&gic>;
|
||||
clock-names = "clkout8";
|
||||
clocks = <&cmu CLK_FIN_PLL>;
|
||||
#clock-cells = <1>;
|
||||
};
|
||||
|
||||
mipi_phy: video-phy {
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
};
|
||||
|
||||
emmc_pwrseq: pwrseq {
|
||||
pinctrl-0 = <&sd1_cd>;
|
||||
pinctrl-0 = <&emmc_rstn>;
|
||||
pinctrl-names = "default";
|
||||
compatible = "mmc-pwrseq-emmc";
|
||||
reset-gpios = <&gpk1 2 GPIO_ACTIVE_LOW>;
|
||||
@@ -161,12 +161,6 @@
|
||||
cpu0-supply = <&buck2_reg>;
|
||||
};
|
||||
|
||||
/* RSTN signal for eMMC */
|
||||
&sd1_cd {
|
||||
samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
|
||||
samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
|
||||
};
|
||||
|
||||
&pinctrl_1 {
|
||||
gpio_power_key: power_key {
|
||||
samsung,pins = "gpx1-3";
|
||||
@@ -184,6 +178,11 @@
|
||||
samsung,pins = "gpx3-7";
|
||||
samsung,pin-pud = <EXYNOS_PIN_PULL_DOWN>;
|
||||
};
|
||||
|
||||
emmc_rstn: emmc-rstn {
|
||||
samsung,pins = "gpk1-2";
|
||||
samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
|
||||
};
|
||||
};
|
||||
|
||||
&ehci {
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
interrupts-extended = <
|
||||
&cpcap 15 0 &cpcap 14 0 &cpcap 28 0 &cpcap 19 0
|
||||
&cpcap 18 0 &cpcap 17 0 &cpcap 16 0 &cpcap 49 0
|
||||
&cpcap 48 1
|
||||
&cpcap 48 0
|
||||
>;
|
||||
interrupt-names =
|
||||
"id_ground", "id_float", "se0conn", "vbusvld",
|
||||
|
||||
@@ -46,6 +46,7 @@ saved_pc .req lr
|
||||
* features make this path too inefficient.
|
||||
*/
|
||||
ret_fast_syscall:
|
||||
__ret_fast_syscall:
|
||||
UNWIND(.fnstart )
|
||||
UNWIND(.cantunwind )
|
||||
disable_irq_notrace @ disable interrupts
|
||||
@@ -75,6 +76,7 @@ fast_work_pending:
|
||||
* r0 first to avoid needing to save registers around each C function call.
|
||||
*/
|
||||
ret_fast_syscall:
|
||||
__ret_fast_syscall:
|
||||
UNWIND(.fnstart )
|
||||
UNWIND(.cantunwind )
|
||||
str r0, [sp, #S_R0 + S_OFF]! @ save returned r0
|
||||
@@ -241,7 +243,7 @@ local_restart:
|
||||
tst r10, #_TIF_SYSCALL_WORK @ are we tracing syscalls?
|
||||
bne __sys_trace
|
||||
|
||||
invoke_syscall tbl, scno, r10, ret_fast_syscall
|
||||
invoke_syscall tbl, scno, r10, __ret_fast_syscall
|
||||
|
||||
add r1, sp, #S_OFF
|
||||
2: cmp scno, #(__ARM_NR_BASE - __NR_SYSCALL_BASE)
|
||||
|
||||
@@ -237,8 +237,6 @@ static int pxa_ssp_remove(struct platform_device *pdev)
|
||||
if (ssp == NULL)
|
||||
return -ENODEV;
|
||||
|
||||
iounmap(ssp->mmio_base);
|
||||
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
release_mem_region(res->start, resource_size(res));
|
||||
|
||||
@@ -248,7 +246,6 @@ static int pxa_ssp_remove(struct platform_device *pdev)
|
||||
list_del(&ssp->node);
|
||||
mutex_unlock(&ssp_lock);
|
||||
|
||||
kfree(ssp);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -118,6 +118,7 @@
|
||||
reset-gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
|
||||
clocks = <&pmic>;
|
||||
clock-names = "ext_clock";
|
||||
post-power-on-delay-ms = <10>;
|
||||
power-off-delay-us = <10>;
|
||||
};
|
||||
|
||||
|
||||
@@ -359,7 +359,7 @@
|
||||
};
|
||||
|
||||
intc: interrupt-controller@9bc0000 {
|
||||
compatible = "arm,gic-v3";
|
||||
compatible = "qcom,msm8996-gic-v3", "arm,gic-v3";
|
||||
#interrupt-cells = <3>;
|
||||
interrupt-controller;
|
||||
#redistributor-regions = <1>;
|
||||
|
||||
@@ -937,6 +937,9 @@
|
||||
<&cpg CPG_CORE R8A7796_CLK_S3D1>,
|
||||
<&scif_clk>;
|
||||
clock-names = "fck", "brg_int", "scif_clk";
|
||||
dmas = <&dmac1 0x13>, <&dmac1 0x12>,
|
||||
<&dmac2 0x13>, <&dmac2 0x12>;
|
||||
dma-names = "tx", "rx", "tx", "rx";
|
||||
power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
|
||||
resets = <&cpg 310>;
|
||||
status = "disabled";
|
||||
|
||||
@@ -554,13 +554,13 @@ bool arch_within_kprobe_blacklist(unsigned long addr)
|
||||
addr < (unsigned long)__entry_text_end) ||
|
||||
(addr >= (unsigned long)__idmap_text_start &&
|
||||
addr < (unsigned long)__idmap_text_end) ||
|
||||
(addr >= (unsigned long)__hyp_text_start &&
|
||||
addr < (unsigned long)__hyp_text_end) ||
|
||||
!!search_exception_tables(addr))
|
||||
return true;
|
||||
|
||||
if (!is_kernel_in_hyp_mode()) {
|
||||
if ((addr >= (unsigned long)__hyp_text_start &&
|
||||
addr < (unsigned long)__hyp_text_end) ||
|
||||
(addr >= (unsigned long)__hyp_idmap_text_start &&
|
||||
if ((addr >= (unsigned long)__hyp_idmap_text_start &&
|
||||
addr < (unsigned long)__hyp_idmap_text_end))
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
status = "okay";
|
||||
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pins_uart2>;
|
||||
pinctrl-0 = <&pins_uart3>;
|
||||
};
|
||||
|
||||
&uart4 {
|
||||
@@ -174,9 +174,9 @@
|
||||
bias-disable;
|
||||
};
|
||||
|
||||
pins_uart2: uart2 {
|
||||
function = "uart2";
|
||||
groups = "uart2-data", "uart2-hwflow";
|
||||
pins_uart3: uart3 {
|
||||
function = "uart3";
|
||||
groups = "uart3-data", "uart3-hwflow";
|
||||
bias-disable;
|
||||
};
|
||||
|
||||
|
||||
@@ -52,6 +52,7 @@ asmlinkage void spurious_interrupt(void)
|
||||
void __init init_IRQ(void)
|
||||
{
|
||||
int i;
|
||||
unsigned int order = get_order(IRQ_STACK_SIZE);
|
||||
|
||||
for (i = 0; i < NR_IRQS; i++)
|
||||
irq_set_noprobe(i);
|
||||
@@ -62,8 +63,7 @@ void __init init_IRQ(void)
|
||||
arch_init_irq();
|
||||
|
||||
for_each_possible_cpu(i) {
|
||||
int irq_pages = IRQ_STACK_SIZE / PAGE_SIZE;
|
||||
void *s = (void *)__get_free_pages(GFP_KERNEL, irq_pages);
|
||||
void *s = (void *)__get_free_pages(GFP_KERNEL, order);
|
||||
|
||||
irq_stack[i] = s;
|
||||
pr_debug("CPU%d IRQ stack at 0x%p - 0x%p\n", i,
|
||||
|
||||
@@ -370,7 +370,7 @@ static inline int is_sp_move_ins(union mips_instruction *ip, int *frame_size)
|
||||
static int get_frame_info(struct mips_frame_info *info)
|
||||
{
|
||||
bool is_mmips = IS_ENABLED(CONFIG_CPU_MICROMIPS);
|
||||
union mips_instruction insn, *ip, *ip_end;
|
||||
union mips_instruction insn, *ip;
|
||||
const unsigned int max_insns = 128;
|
||||
unsigned int last_insn_size = 0;
|
||||
unsigned int i;
|
||||
@@ -383,10 +383,9 @@ static int get_frame_info(struct mips_frame_info *info)
|
||||
if (!ip)
|
||||
goto err;
|
||||
|
||||
ip_end = (void *)ip + info->func_size;
|
||||
|
||||
for (i = 0; i < max_insns && ip < ip_end; i++) {
|
||||
for (i = 0; i < max_insns; i++) {
|
||||
ip = (void *)ip + last_insn_size;
|
||||
|
||||
if (is_mmips && mm_insn_16bit(ip->halfword[0])) {
|
||||
insn.word = ip->halfword[0] << 16;
|
||||
last_insn_size = 2;
|
||||
|
||||
@@ -1968,7 +1968,7 @@ static int x86_pmu_commit_txn(struct pmu *pmu)
|
||||
*/
|
||||
static void free_fake_cpuc(struct cpu_hw_events *cpuc)
|
||||
{
|
||||
kfree(cpuc->shared_regs);
|
||||
intel_cpuc_finish(cpuc);
|
||||
kfree(cpuc);
|
||||
}
|
||||
|
||||
@@ -1980,14 +1980,11 @@ static struct cpu_hw_events *allocate_fake_cpuc(void)
|
||||
cpuc = kzalloc(sizeof(*cpuc), GFP_KERNEL);
|
||||
if (!cpuc)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
/* only needed, if we have extra_regs */
|
||||
if (x86_pmu.extra_regs) {
|
||||
cpuc->shared_regs = allocate_shared_regs(cpu);
|
||||
if (!cpuc->shared_regs)
|
||||
goto error;
|
||||
}
|
||||
cpuc->is_fake = 1;
|
||||
|
||||
if (intel_cpuc_prepare(cpuc, cpu))
|
||||
goto error;
|
||||
|
||||
return cpuc;
|
||||
error:
|
||||
free_fake_cpuc(cpuc);
|
||||
|
||||
@@ -1995,6 +1995,39 @@ static void intel_pmu_nhm_enable_all(int added)
|
||||
intel_pmu_enable_all(added);
|
||||
}
|
||||
|
||||
static void intel_set_tfa(struct cpu_hw_events *cpuc, bool on)
|
||||
{
|
||||
u64 val = on ? MSR_TFA_RTM_FORCE_ABORT : 0;
|
||||
|
||||
if (cpuc->tfa_shadow != val) {
|
||||
cpuc->tfa_shadow = val;
|
||||
wrmsrl(MSR_TSX_FORCE_ABORT, val);
|
||||
}
|
||||
}
|
||||
|
||||
static void intel_tfa_commit_scheduling(struct cpu_hw_events *cpuc, int idx, int cntr)
|
||||
{
|
||||
/*
|
||||
* We're going to use PMC3, make sure TFA is set before we touch it.
|
||||
*/
|
||||
if (cntr == 3 && !cpuc->is_fake)
|
||||
intel_set_tfa(cpuc, true);
|
||||
}
|
||||
|
||||
static void intel_tfa_pmu_enable_all(int added)
|
||||
{
|
||||
struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events);
|
||||
|
||||
/*
|
||||
* If we find PMC3 is no longer used when we enable the PMU, we can
|
||||
* clear TFA.
|
||||
*/
|
||||
if (!test_bit(3, cpuc->active_mask))
|
||||
intel_set_tfa(cpuc, false);
|
||||
|
||||
intel_pmu_enable_all(added);
|
||||
}
|
||||
|
||||
static inline u64 intel_pmu_get_status(void)
|
||||
{
|
||||
u64 status;
|
||||
@@ -2639,6 +2672,35 @@ intel_stop_scheduling(struct cpu_hw_events *cpuc)
|
||||
raw_spin_unlock(&excl_cntrs->lock);
|
||||
}
|
||||
|
||||
static struct event_constraint *
|
||||
dyn_constraint(struct cpu_hw_events *cpuc, struct event_constraint *c, int idx)
|
||||
{
|
||||
WARN_ON_ONCE(!cpuc->constraint_list);
|
||||
|
||||
if (!(c->flags & PERF_X86_EVENT_DYNAMIC)) {
|
||||
struct event_constraint *cx;
|
||||
|
||||
/*
|
||||
* grab pre-allocated constraint entry
|
||||
*/
|
||||
cx = &cpuc->constraint_list[idx];
|
||||
|
||||
/*
|
||||
* initialize dynamic constraint
|
||||
* with static constraint
|
||||
*/
|
||||
*cx = *c;
|
||||
|
||||
/*
|
||||
* mark constraint as dynamic
|
||||
*/
|
||||
cx->flags |= PERF_X86_EVENT_DYNAMIC;
|
||||
c = cx;
|
||||
}
|
||||
|
||||
return c;
|
||||
}
|
||||
|
||||
static struct event_constraint *
|
||||
intel_get_excl_constraints(struct cpu_hw_events *cpuc, struct perf_event *event,
|
||||
int idx, struct event_constraint *c)
|
||||
@@ -2669,27 +2731,7 @@ intel_get_excl_constraints(struct cpu_hw_events *cpuc, struct perf_event *event,
|
||||
* only needed when constraint has not yet
|
||||
* been cloned (marked dynamic)
|
||||
*/
|
||||
if (!(c->flags & PERF_X86_EVENT_DYNAMIC)) {
|
||||
struct event_constraint *cx;
|
||||
|
||||
/*
|
||||
* grab pre-allocated constraint entry
|
||||
*/
|
||||
cx = &cpuc->constraint_list[idx];
|
||||
|
||||
/*
|
||||
* initialize dynamic constraint
|
||||
* with static constraint
|
||||
*/
|
||||
*cx = *c;
|
||||
|
||||
/*
|
||||
* mark constraint as dynamic, so we
|
||||
* can free it later on
|
||||
*/
|
||||
cx->flags |= PERF_X86_EVENT_DYNAMIC;
|
||||
c = cx;
|
||||
}
|
||||
c = dyn_constraint(cpuc, c, idx);
|
||||
|
||||
/*
|
||||
* From here on, the constraint is dynamic.
|
||||
@@ -3209,6 +3251,26 @@ glp_get_event_constraints(struct cpu_hw_events *cpuc, int idx,
|
||||
return c;
|
||||
}
|
||||
|
||||
static bool allow_tsx_force_abort = true;
|
||||
|
||||
static struct event_constraint *
|
||||
tfa_get_event_constraints(struct cpu_hw_events *cpuc, int idx,
|
||||
struct perf_event *event)
|
||||
{
|
||||
struct event_constraint *c = hsw_get_event_constraints(cpuc, idx, event);
|
||||
|
||||
/*
|
||||
* Without TFA we must not use PMC3.
|
||||
*/
|
||||
if (!allow_tsx_force_abort && test_bit(3, c->idxmsk)) {
|
||||
c = dyn_constraint(cpuc, c, idx);
|
||||
c->idxmsk64 &= ~(1ULL << 3);
|
||||
c->weight--;
|
||||
}
|
||||
|
||||
return c;
|
||||
}
|
||||
|
||||
/*
|
||||
* Broadwell:
|
||||
*
|
||||
@@ -3262,7 +3324,7 @@ ssize_t intel_event_sysfs_show(char *page, u64 config)
|
||||
return x86_event_sysfs_show(page, config, event);
|
||||
}
|
||||
|
||||
struct intel_shared_regs *allocate_shared_regs(int cpu)
|
||||
static struct intel_shared_regs *allocate_shared_regs(int cpu)
|
||||
{
|
||||
struct intel_shared_regs *regs;
|
||||
int i;
|
||||
@@ -3294,23 +3356,24 @@ static struct intel_excl_cntrs *allocate_excl_cntrs(int cpu)
|
||||
return c;
|
||||
}
|
||||
|
||||
static int intel_pmu_cpu_prepare(int cpu)
|
||||
{
|
||||
struct cpu_hw_events *cpuc = &per_cpu(cpu_hw_events, cpu);
|
||||
|
||||
int intel_cpuc_prepare(struct cpu_hw_events *cpuc, int cpu)
|
||||
{
|
||||
if (x86_pmu.extra_regs || x86_pmu.lbr_sel_map) {
|
||||
cpuc->shared_regs = allocate_shared_regs(cpu);
|
||||
if (!cpuc->shared_regs)
|
||||
goto err;
|
||||
}
|
||||
|
||||
if (x86_pmu.flags & PMU_FL_EXCL_CNTRS) {
|
||||
if (x86_pmu.flags & (PMU_FL_EXCL_CNTRS | PMU_FL_TFA)) {
|
||||
size_t sz = X86_PMC_IDX_MAX * sizeof(struct event_constraint);
|
||||
|
||||
cpuc->constraint_list = kzalloc(sz, GFP_KERNEL);
|
||||
cpuc->constraint_list = kzalloc_node(sz, GFP_KERNEL, cpu_to_node(cpu));
|
||||
if (!cpuc->constraint_list)
|
||||
goto err_shared_regs;
|
||||
}
|
||||
|
||||
if (x86_pmu.flags & PMU_FL_EXCL_CNTRS) {
|
||||
cpuc->excl_cntrs = allocate_excl_cntrs(cpu);
|
||||
if (!cpuc->excl_cntrs)
|
||||
goto err_constraint_list;
|
||||
@@ -3332,6 +3395,11 @@ err:
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
static int intel_pmu_cpu_prepare(int cpu)
|
||||
{
|
||||
return intel_cpuc_prepare(&per_cpu(cpu_hw_events, cpu), cpu);
|
||||
}
|
||||
|
||||
static void flip_smm_bit(void *data)
|
||||
{
|
||||
unsigned long set = *(unsigned long *)data;
|
||||
@@ -3403,9 +3471,8 @@ static void intel_pmu_cpu_starting(int cpu)
|
||||
}
|
||||
}
|
||||
|
||||
static void free_excl_cntrs(int cpu)
|
||||
static void free_excl_cntrs(struct cpu_hw_events *cpuc)
|
||||
{
|
||||
struct cpu_hw_events *cpuc = &per_cpu(cpu_hw_events, cpu);
|
||||
struct intel_excl_cntrs *c;
|
||||
|
||||
c = cpuc->excl_cntrs;
|
||||
@@ -3413,9 +3480,10 @@ static void free_excl_cntrs(int cpu)
|
||||
if (c->core_id == -1 || --c->refcnt == 0)
|
||||
kfree(c);
|
||||
cpuc->excl_cntrs = NULL;
|
||||
kfree(cpuc->constraint_list);
|
||||
cpuc->constraint_list = NULL;
|
||||
}
|
||||
|
||||
kfree(cpuc->constraint_list);
|
||||
cpuc->constraint_list = NULL;
|
||||
}
|
||||
|
||||
static void intel_pmu_cpu_dying(int cpu)
|
||||
@@ -3423,9 +3491,8 @@ static void intel_pmu_cpu_dying(int cpu)
|
||||
fini_debug_store_on_cpu(cpu);
|
||||
}
|
||||
|
||||
static void intel_pmu_cpu_dead(int cpu)
|
||||
void intel_cpuc_finish(struct cpu_hw_events *cpuc)
|
||||
{
|
||||
struct cpu_hw_events *cpuc = &per_cpu(cpu_hw_events, cpu);
|
||||
struct intel_shared_regs *pc;
|
||||
|
||||
pc = cpuc->shared_regs;
|
||||
@@ -3435,7 +3502,12 @@ static void intel_pmu_cpu_dead(int cpu)
|
||||
cpuc->shared_regs = NULL;
|
||||
}
|
||||
|
||||
free_excl_cntrs(cpu);
|
||||
free_excl_cntrs(cpuc);
|
||||
}
|
||||
|
||||
static void intel_pmu_cpu_dead(int cpu)
|
||||
{
|
||||
intel_cpuc_finish(&per_cpu(cpu_hw_events, cpu));
|
||||
}
|
||||
|
||||
static void intel_pmu_sched_task(struct perf_event_context *ctx,
|
||||
@@ -3896,8 +3968,11 @@ static struct attribute *intel_pmu_caps_attrs[] = {
|
||||
NULL
|
||||
};
|
||||
|
||||
DEVICE_BOOL_ATTR(allow_tsx_force_abort, 0644, allow_tsx_force_abort);
|
||||
|
||||
static struct attribute *intel_pmu_attrs[] = {
|
||||
&dev_attr_freeze_on_smi.attr,
|
||||
NULL, /* &dev_attr_allow_tsx_force_abort.attr.attr */
|
||||
NULL,
|
||||
};
|
||||
|
||||
@@ -4353,6 +4428,15 @@ __init int intel_pmu_init(void)
|
||||
x86_pmu.cpu_events = get_hsw_events_attrs();
|
||||
intel_pmu_pebs_data_source_skl(
|
||||
boot_cpu_data.x86_model == INTEL_FAM6_SKYLAKE_X);
|
||||
|
||||
if (boot_cpu_has(X86_FEATURE_TSX_FORCE_ABORT)) {
|
||||
x86_pmu.flags |= PMU_FL_TFA;
|
||||
x86_pmu.get_event_constraints = tfa_get_event_constraints;
|
||||
x86_pmu.enable_all = intel_tfa_pmu_enable_all;
|
||||
x86_pmu.commit_scheduling = intel_tfa_commit_scheduling;
|
||||
intel_pmu_attrs[1] = &dev_attr_allow_tsx_force_abort.attr.attr;
|
||||
}
|
||||
|
||||
pr_cont("Skylake events, ");
|
||||
name = "skylake";
|
||||
break;
|
||||
@@ -4494,7 +4578,7 @@ static __init int fixup_ht_bug(void)
|
||||
hardlockup_detector_perf_restart();
|
||||
|
||||
for_each_online_cpu(c)
|
||||
free_excl_cntrs(c);
|
||||
free_excl_cntrs(&per_cpu(cpu_hw_events, c));
|
||||
|
||||
cpus_read_unlock();
|
||||
pr_info("PMU erratum BJ122, BV98, HSD29 workaround disabled, HT off\n");
|
||||
|
||||
@@ -238,6 +238,11 @@ struct cpu_hw_events {
|
||||
struct intel_excl_cntrs *excl_cntrs;
|
||||
int excl_thread_id; /* 0 or 1 */
|
||||
|
||||
/*
|
||||
* SKL TSX_FORCE_ABORT shadow
|
||||
*/
|
||||
u64 tfa_shadow;
|
||||
|
||||
/*
|
||||
* AMD specific bits
|
||||
*/
|
||||
@@ -672,6 +677,7 @@ do { \
|
||||
#define PMU_FL_HAS_RSP_1 0x2 /* has 2 equivalent offcore_rsp regs */
|
||||
#define PMU_FL_EXCL_CNTRS 0x4 /* has exclusive counter requirements */
|
||||
#define PMU_FL_EXCL_ENABLED 0x8 /* exclusive counter active */
|
||||
#define PMU_FL_TFA 0x20 /* deal with TSX force abort */
|
||||
|
||||
#define EVENT_VAR(_id) event_attr_##_id
|
||||
#define EVENT_PTR(_id) &event_attr_##_id.attr.attr
|
||||
@@ -880,7 +886,8 @@ struct event_constraint *
|
||||
x86_get_event_constraints(struct cpu_hw_events *cpuc, int idx,
|
||||
struct perf_event *event);
|
||||
|
||||
struct intel_shared_regs *allocate_shared_regs(int cpu);
|
||||
extern int intel_cpuc_prepare(struct cpu_hw_events *cpuc, int cpu);
|
||||
extern void intel_cpuc_finish(struct cpu_hw_events *cpuc);
|
||||
|
||||
int intel_pmu_init(void);
|
||||
|
||||
@@ -1014,9 +1021,13 @@ static inline int intel_pmu_init(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline struct intel_shared_regs *allocate_shared_regs(int cpu)
|
||||
static inline int intel_cpuc_prepare(struct cpu_hw_event *cpuc, int cpu)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void intel_cpuc_finish(struct cpu_hw_event *cpuc)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline int is_ht_workaround_enabled(void)
|
||||
|
||||
@@ -339,6 +339,7 @@
|
||||
/* Intel-defined CPU features, CPUID level 0x00000007:0 (EDX), word 18 */
|
||||
#define X86_FEATURE_AVX512_4VNNIW (18*32+ 2) /* AVX-512 Neural Network Instructions */
|
||||
#define X86_FEATURE_AVX512_4FMAPS (18*32+ 3) /* AVX-512 Multiply Accumulation Single precision */
|
||||
#define X86_FEATURE_TSX_FORCE_ABORT (18*32+13) /* "" TSX_FORCE_ABORT */
|
||||
#define X86_FEATURE_PCONFIG (18*32+18) /* Intel PCONFIG */
|
||||
#define X86_FEATURE_SPEC_CTRL (18*32+26) /* "" Speculation Control (IBRS + IBPB) */
|
||||
#define X86_FEATURE_INTEL_STIBP (18*32+27) /* "" Single Thread Indirect Branch Predictors */
|
||||
|
||||
@@ -610,6 +610,12 @@
|
||||
|
||||
#define MSR_IA32_TSC_DEADLINE 0x000006E0
|
||||
|
||||
|
||||
#define MSR_TSX_FORCE_ABORT 0x0000010F
|
||||
|
||||
#define MSR_TFA_RTM_FORCE_ABORT_BIT 0
|
||||
#define MSR_TFA_RTM_FORCE_ABORT BIT_ULL(MSR_TFA_RTM_FORCE_ABORT_BIT)
|
||||
|
||||
/* P4/Xeon+ specific */
|
||||
#define MSR_IA32_MCG_EAX 0x00000180
|
||||
#define MSR_IA32_MCG_EBX 0x00000181
|
||||
|
||||
@@ -7,7 +7,11 @@
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_KASAN
|
||||
#ifdef CONFIG_KASAN_EXTRA
|
||||
#define KASAN_STACK_ORDER 2
|
||||
#else
|
||||
#define KASAN_STACK_ORDER 1
|
||||
#endif
|
||||
#else
|
||||
#define KASAN_STACK_ORDER 0
|
||||
#endif
|
||||
|
||||
@@ -791,11 +791,9 @@ static void init_amd_bd(struct cpuinfo_x86 *c)
|
||||
static void init_amd_zn(struct cpuinfo_x86 *c)
|
||||
{
|
||||
set_cpu_cap(c, X86_FEATURE_ZEN);
|
||||
/*
|
||||
* Fix erratum 1076: CPB feature bit not being set in CPUID. It affects
|
||||
* all up to and including B1.
|
||||
*/
|
||||
if (c->x86_model <= 1 && c->x86_stepping <= 1)
|
||||
|
||||
/* Fix erratum 1076: CPB feature bit not being set in CPUID. */
|
||||
if (!cpu_has(c, X86_FEATURE_CPB))
|
||||
set_cpu_cap(c, X86_FEATURE_CPB);
|
||||
}
|
||||
|
||||
|
||||
@@ -707,7 +707,7 @@ load_microcode_amd(bool save, u8 family, const u8 *data, size_t size)
|
||||
if (!p) {
|
||||
return ret;
|
||||
} else {
|
||||
if (boot_cpu_data.microcode == p->patch_id)
|
||||
if (boot_cpu_data.microcode >= p->patch_id)
|
||||
return ret;
|
||||
|
||||
ret = UCODE_NEW;
|
||||
|
||||
@@ -167,6 +167,9 @@ setup_efi_state(struct boot_params *params, unsigned long params_load_addr,
|
||||
struct efi_info *current_ei = &boot_params.efi_info;
|
||||
struct efi_info *ei = ¶ms->efi_info;
|
||||
|
||||
if (!efi_enabled(EFI_RUNTIME_SERVICES))
|
||||
return 0;
|
||||
|
||||
if (!current_ei->efi_memmap_size)
|
||||
return 0;
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@ CONFIG_SMP=y
|
||||
CONFIG_HOTPLUG_CPU=y
|
||||
# CONFIG_INITIALIZE_XTENSA_MMU_INSIDE_VMLINUX is not set
|
||||
# CONFIG_PCI is not set
|
||||
CONFIG_VECTORS_OFFSET=0x00002000
|
||||
CONFIG_XTENSA_PLATFORM_XTFPGA=y
|
||||
CONFIG_CMDLINE_BOOL=y
|
||||
CONFIG_CMDLINE="earlycon=uart8250,mmio32native,0xfd050020,115200n8 console=ttyS0,115200n8 ip=dhcp root=/dev/nfs rw debug memmap=96M@0"
|
||||
|
||||
@@ -281,12 +281,13 @@ should_never_return:
|
||||
|
||||
movi a2, cpu_start_ccount
|
||||
1:
|
||||
memw
|
||||
l32i a3, a2, 0
|
||||
beqi a3, 0, 1b
|
||||
movi a3, 0
|
||||
s32i a3, a2, 0
|
||||
memw
|
||||
1:
|
||||
memw
|
||||
l32i a3, a2, 0
|
||||
beqi a3, 0, 1b
|
||||
wsr a3, ccount
|
||||
@@ -323,11 +324,13 @@ ENTRY(cpu_restart)
|
||||
rsr a0, prid
|
||||
neg a2, a0
|
||||
movi a3, cpu_start_id
|
||||
memw
|
||||
s32i a2, a3, 0
|
||||
#if XCHAL_DCACHE_IS_WRITEBACK
|
||||
dhwbi a3, 0
|
||||
#endif
|
||||
1:
|
||||
memw
|
||||
l32i a2, a3, 0
|
||||
dhi a3, 0
|
||||
bne a2, a0, 1b
|
||||
|
||||
@@ -314,8 +314,8 @@ unsigned long get_wchan(struct task_struct *p)
|
||||
|
||||
/* Stack layout: sp-4: ra, sp-3: sp' */
|
||||
|
||||
pc = MAKE_PC_FROM_RA(*(unsigned long*)sp - 4, sp);
|
||||
sp = *(unsigned long *)sp - 3;
|
||||
pc = MAKE_PC_FROM_RA(SPILL_SLOT(sp, 0), sp);
|
||||
sp = SPILL_SLOT(sp, 1);
|
||||
} while (count++ < 16);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
|
||||
{
|
||||
unsigned i;
|
||||
|
||||
for (i = 0; i < max_cpus; ++i)
|
||||
for_each_possible_cpu(i)
|
||||
set_cpu_present(i, true);
|
||||
}
|
||||
|
||||
@@ -96,6 +96,11 @@ void __init smp_init_cpus(void)
|
||||
pr_info("%s: Core Count = %d\n", __func__, ncpus);
|
||||
pr_info("%s: Core Id = %d\n", __func__, core_id);
|
||||
|
||||
if (ncpus > NR_CPUS) {
|
||||
ncpus = NR_CPUS;
|
||||
pr_info("%s: limiting core count by %d\n", __func__, ncpus);
|
||||
}
|
||||
|
||||
for (i = 0; i < ncpus; ++i)
|
||||
set_cpu_possible(i, true);
|
||||
}
|
||||
@@ -195,9 +200,11 @@ static int boot_secondary(unsigned int cpu, struct task_struct *ts)
|
||||
int i;
|
||||
|
||||
#ifdef CONFIG_HOTPLUG_CPU
|
||||
cpu_start_id = cpu;
|
||||
system_flush_invalidate_dcache_range(
|
||||
(unsigned long)&cpu_start_id, sizeof(cpu_start_id));
|
||||
WRITE_ONCE(cpu_start_id, cpu);
|
||||
/* Pairs with the third memw in the cpu_restart */
|
||||
mb();
|
||||
system_flush_invalidate_dcache_range((unsigned long)&cpu_start_id,
|
||||
sizeof(cpu_start_id));
|
||||
#endif
|
||||
smp_call_function_single(0, mx_cpu_start, (void *)cpu, 1);
|
||||
|
||||
@@ -206,18 +213,21 @@ static int boot_secondary(unsigned int cpu, struct task_struct *ts)
|
||||
ccount = get_ccount();
|
||||
while (!ccount);
|
||||
|
||||
cpu_start_ccount = ccount;
|
||||
WRITE_ONCE(cpu_start_ccount, ccount);
|
||||
|
||||
while (time_before(jiffies, timeout)) {
|
||||
do {
|
||||
/*
|
||||
* Pairs with the first two memws in the
|
||||
* .Lboot_secondary.
|
||||
*/
|
||||
mb();
|
||||
if (!cpu_start_ccount)
|
||||
break;
|
||||
}
|
||||
ccount = READ_ONCE(cpu_start_ccount);
|
||||
} while (ccount && time_before(jiffies, timeout));
|
||||
|
||||
if (cpu_start_ccount) {
|
||||
if (ccount) {
|
||||
smp_call_function_single(0, mx_cpu_stop,
|
||||
(void *)cpu, 1);
|
||||
cpu_start_ccount = 0;
|
||||
(void *)cpu, 1);
|
||||
WRITE_ONCE(cpu_start_ccount, 0);
|
||||
return -EIO;
|
||||
}
|
||||
}
|
||||
@@ -237,6 +247,7 @@ int __cpu_up(unsigned int cpu, struct task_struct *idle)
|
||||
pr_debug("%s: Calling wakeup_secondary(cpu:%d, idle:%p, sp: %08lx)\n",
|
||||
__func__, cpu, idle, start_info.stack);
|
||||
|
||||
init_completion(&cpu_running);
|
||||
ret = boot_secondary(cpu, idle);
|
||||
if (ret == 0) {
|
||||
wait_for_completion_timeout(&cpu_running,
|
||||
@@ -298,8 +309,10 @@ void __cpu_die(unsigned int cpu)
|
||||
unsigned long timeout = jiffies + msecs_to_jiffies(1000);
|
||||
while (time_before(jiffies, timeout)) {
|
||||
system_invalidate_dcache_range((unsigned long)&cpu_start_id,
|
||||
sizeof(cpu_start_id));
|
||||
if (cpu_start_id == -cpu) {
|
||||
sizeof(cpu_start_id));
|
||||
/* Pairs with the second memw in the cpu_restart */
|
||||
mb();
|
||||
if (READ_ONCE(cpu_start_id) == -cpu) {
|
||||
platform_cpu_kill(cpu);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ static int ccount_timer_shutdown(struct clock_event_device *evt)
|
||||
container_of(evt, struct ccount_timer, evt);
|
||||
|
||||
if (timer->irq_enabled) {
|
||||
disable_irq(evt->irq);
|
||||
disable_irq_nosync(evt->irq);
|
||||
timer->irq_enabled = 0;
|
||||
}
|
||||
return 0;
|
||||
|
||||
@@ -850,9 +850,9 @@ static void __device_release_driver(struct device *dev, struct device *parent)
|
||||
drv->remove(dev);
|
||||
|
||||
device_links_driver_cleanup(dev);
|
||||
dma_deconfigure(dev);
|
||||
|
||||
devres_release_all(dev);
|
||||
dma_deconfigure(dev);
|
||||
dev->driver = NULL;
|
||||
dev_set_drvdata(dev, NULL);
|
||||
if (dev->pm_domain && dev->pm_domain->dismiss)
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#include <linux/wait.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/fs.h>
|
||||
#include <linux/nospec.h>
|
||||
|
||||
#include <asm/io.h>
|
||||
#include <linux/uaccess.h>
|
||||
@@ -386,7 +387,11 @@ static ssize_t ac_write(struct file *file, const char __user *buf, size_t count,
|
||||
TicCard = st_loc.tic_des_from_pc; /* tic number to send */
|
||||
IndexCard = NumCard - 1;
|
||||
|
||||
if((NumCard < 1) || (NumCard > MAX_BOARD) || !apbs[IndexCard].RamIO)
|
||||
if (IndexCard >= MAX_BOARD)
|
||||
return -EINVAL;
|
||||
IndexCard = array_index_nospec(IndexCard, MAX_BOARD);
|
||||
|
||||
if (!apbs[IndexCard].RamIO)
|
||||
return -EINVAL;
|
||||
|
||||
#ifdef DEBUG
|
||||
@@ -697,6 +702,7 @@ static long ac_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
|
||||
unsigned char IndexCard;
|
||||
void __iomem *pmem;
|
||||
int ret = 0;
|
||||
static int warncount = 10;
|
||||
volatile unsigned char byte_reset_it;
|
||||
struct st_ram_io *adgl;
|
||||
void __user *argp = (void __user *)arg;
|
||||
@@ -711,16 +717,12 @@ static long ac_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
|
||||
mutex_lock(&ac_mutex);
|
||||
IndexCard = adgl->num_card-1;
|
||||
|
||||
if(cmd != 6 && ((IndexCard >= MAX_BOARD) || !apbs[IndexCard].RamIO)) {
|
||||
static int warncount = 10;
|
||||
if (warncount) {
|
||||
printk( KERN_WARNING "APPLICOM driver IOCTL, bad board number %d\n",(int)IndexCard+1);
|
||||
warncount--;
|
||||
}
|
||||
kfree(adgl);
|
||||
mutex_unlock(&ac_mutex);
|
||||
return -EINVAL;
|
||||
}
|
||||
if (cmd != 6 && IndexCard >= MAX_BOARD)
|
||||
goto err;
|
||||
IndexCard = array_index_nospec(IndexCard, MAX_BOARD);
|
||||
|
||||
if (cmd != 6 && !apbs[IndexCard].RamIO)
|
||||
goto err;
|
||||
|
||||
switch (cmd) {
|
||||
|
||||
@@ -838,5 +840,16 @@ static long ac_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
|
||||
kfree(adgl);
|
||||
mutex_unlock(&ac_mutex);
|
||||
return 0;
|
||||
|
||||
err:
|
||||
if (warncount) {
|
||||
pr_warn("APPLICOM driver IOCTL, bad board number %d\n",
|
||||
(int)IndexCard + 1);
|
||||
warncount--;
|
||||
}
|
||||
kfree(adgl);
|
||||
mutex_unlock(&ac_mutex);
|
||||
return -EINVAL;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -556,13 +556,13 @@ EXPORT_SYMBOL_GPL(cpufreq_policy_transition_delay_us);
|
||||
* SYSFS INTERFACE *
|
||||
*********************************************************************/
|
||||
static ssize_t show_boost(struct kobject *kobj,
|
||||
struct attribute *attr, char *buf)
|
||||
struct kobj_attribute *attr, char *buf)
|
||||
{
|
||||
return sprintf(buf, "%d\n", cpufreq_driver->boost_enabled);
|
||||
}
|
||||
|
||||
static ssize_t store_boost(struct kobject *kobj, struct attribute *attr,
|
||||
const char *buf, size_t count)
|
||||
static ssize_t store_boost(struct kobject *kobj, struct kobj_attribute *attr,
|
||||
const char *buf, size_t count)
|
||||
{
|
||||
int ret, enable;
|
||||
|
||||
|
||||
@@ -811,7 +811,7 @@ static void intel_pstate_update_policies(void)
|
||||
/************************** sysfs begin ************************/
|
||||
#define show_one(file_name, object) \
|
||||
static ssize_t show_##file_name \
|
||||
(struct kobject *kobj, struct attribute *attr, char *buf) \
|
||||
(struct kobject *kobj, struct kobj_attribute *attr, char *buf) \
|
||||
{ \
|
||||
return sprintf(buf, "%u\n", global.object); \
|
||||
}
|
||||
@@ -820,7 +820,7 @@ static ssize_t intel_pstate_show_status(char *buf);
|
||||
static int intel_pstate_update_status(const char *buf, size_t size);
|
||||
|
||||
static ssize_t show_status(struct kobject *kobj,
|
||||
struct attribute *attr, char *buf)
|
||||
struct kobj_attribute *attr, char *buf)
|
||||
{
|
||||
ssize_t ret;
|
||||
|
||||
@@ -831,7 +831,7 @@ static ssize_t show_status(struct kobject *kobj,
|
||||
return ret;
|
||||
}
|
||||
|
||||
static ssize_t store_status(struct kobject *a, struct attribute *b,
|
||||
static ssize_t store_status(struct kobject *a, struct kobj_attribute *b,
|
||||
const char *buf, size_t count)
|
||||
{
|
||||
char *p = memchr(buf, '\n', count);
|
||||
@@ -845,7 +845,7 @@ static ssize_t store_status(struct kobject *a, struct attribute *b,
|
||||
}
|
||||
|
||||
static ssize_t show_turbo_pct(struct kobject *kobj,
|
||||
struct attribute *attr, char *buf)
|
||||
struct kobj_attribute *attr, char *buf)
|
||||
{
|
||||
struct cpudata *cpu;
|
||||
int total, no_turbo, turbo_pct;
|
||||
@@ -871,7 +871,7 @@ static ssize_t show_turbo_pct(struct kobject *kobj,
|
||||
}
|
||||
|
||||
static ssize_t show_num_pstates(struct kobject *kobj,
|
||||
struct attribute *attr, char *buf)
|
||||
struct kobj_attribute *attr, char *buf)
|
||||
{
|
||||
struct cpudata *cpu;
|
||||
int total;
|
||||
@@ -892,7 +892,7 @@ static ssize_t show_num_pstates(struct kobject *kobj,
|
||||
}
|
||||
|
||||
static ssize_t show_no_turbo(struct kobject *kobj,
|
||||
struct attribute *attr, char *buf)
|
||||
struct kobj_attribute *attr, char *buf)
|
||||
{
|
||||
ssize_t ret;
|
||||
|
||||
@@ -914,7 +914,7 @@ static ssize_t show_no_turbo(struct kobject *kobj,
|
||||
return ret;
|
||||
}
|
||||
|
||||
static ssize_t store_no_turbo(struct kobject *a, struct attribute *b,
|
||||
static ssize_t store_no_turbo(struct kobject *a, struct kobj_attribute *b,
|
||||
const char *buf, size_t count)
|
||||
{
|
||||
unsigned int input;
|
||||
@@ -961,7 +961,7 @@ static ssize_t store_no_turbo(struct kobject *a, struct attribute *b,
|
||||
return count;
|
||||
}
|
||||
|
||||
static ssize_t store_max_perf_pct(struct kobject *a, struct attribute *b,
|
||||
static ssize_t store_max_perf_pct(struct kobject *a, struct kobj_attribute *b,
|
||||
const char *buf, size_t count)
|
||||
{
|
||||
unsigned int input;
|
||||
@@ -991,7 +991,7 @@ static ssize_t store_max_perf_pct(struct kobject *a, struct attribute *b,
|
||||
return count;
|
||||
}
|
||||
|
||||
static ssize_t store_min_perf_pct(struct kobject *a, struct attribute *b,
|
||||
static ssize_t store_min_perf_pct(struct kobject *a, struct kobj_attribute *b,
|
||||
const char *buf, size_t count)
|
||||
{
|
||||
unsigned int input;
|
||||
|
||||
@@ -203,6 +203,7 @@ struct at_xdmac_chan {
|
||||
u32 save_cim;
|
||||
u32 save_cnda;
|
||||
u32 save_cndc;
|
||||
u32 irq_status;
|
||||
unsigned long status;
|
||||
struct tasklet_struct tasklet;
|
||||
struct dma_slave_config sconfig;
|
||||
@@ -1580,8 +1581,8 @@ static void at_xdmac_tasklet(unsigned long data)
|
||||
struct at_xdmac_desc *desc;
|
||||
u32 error_mask;
|
||||
|
||||
dev_dbg(chan2dev(&atchan->chan), "%s: status=0x%08lx\n",
|
||||
__func__, atchan->status);
|
||||
dev_dbg(chan2dev(&atchan->chan), "%s: status=0x%08x\n",
|
||||
__func__, atchan->irq_status);
|
||||
|
||||
error_mask = AT_XDMAC_CIS_RBEIS
|
||||
| AT_XDMAC_CIS_WBEIS
|
||||
@@ -1589,15 +1590,15 @@ static void at_xdmac_tasklet(unsigned long data)
|
||||
|
||||
if (at_xdmac_chan_is_cyclic(atchan)) {
|
||||
at_xdmac_handle_cyclic(atchan);
|
||||
} else if ((atchan->status & AT_XDMAC_CIS_LIS)
|
||||
|| (atchan->status & error_mask)) {
|
||||
} else if ((atchan->irq_status & AT_XDMAC_CIS_LIS)
|
||||
|| (atchan->irq_status & error_mask)) {
|
||||
struct dma_async_tx_descriptor *txd;
|
||||
|
||||
if (atchan->status & AT_XDMAC_CIS_RBEIS)
|
||||
if (atchan->irq_status & AT_XDMAC_CIS_RBEIS)
|
||||
dev_err(chan2dev(&atchan->chan), "read bus error!!!");
|
||||
if (atchan->status & AT_XDMAC_CIS_WBEIS)
|
||||
if (atchan->irq_status & AT_XDMAC_CIS_WBEIS)
|
||||
dev_err(chan2dev(&atchan->chan), "write bus error!!!");
|
||||
if (atchan->status & AT_XDMAC_CIS_ROIS)
|
||||
if (atchan->irq_status & AT_XDMAC_CIS_ROIS)
|
||||
dev_err(chan2dev(&atchan->chan), "request overflow error!!!");
|
||||
|
||||
spin_lock_bh(&atchan->lock);
|
||||
@@ -1652,7 +1653,7 @@ static irqreturn_t at_xdmac_interrupt(int irq, void *dev_id)
|
||||
atchan = &atxdmac->chan[i];
|
||||
chan_imr = at_xdmac_chan_read(atchan, AT_XDMAC_CIM);
|
||||
chan_status = at_xdmac_chan_read(atchan, AT_XDMAC_CIS);
|
||||
atchan->status = chan_status & chan_imr;
|
||||
atchan->irq_status = chan_status & chan_imr;
|
||||
dev_vdbg(atxdmac->dma.dev,
|
||||
"%s: chan%d: imr=0x%x, status=0x%x\n",
|
||||
__func__, i, chan_imr, chan_status);
|
||||
@@ -1666,7 +1667,7 @@ static irqreturn_t at_xdmac_interrupt(int irq, void *dev_id)
|
||||
at_xdmac_chan_read(atchan, AT_XDMAC_CDA),
|
||||
at_xdmac_chan_read(atchan, AT_XDMAC_CUBC));
|
||||
|
||||
if (atchan->status & (AT_XDMAC_CIS_RBEIS | AT_XDMAC_CIS_WBEIS))
|
||||
if (atchan->irq_status & (AT_XDMAC_CIS_RBEIS | AT_XDMAC_CIS_WBEIS))
|
||||
at_xdmac_write(atxdmac, AT_XDMAC_GD, atchan->mask);
|
||||
|
||||
tasklet_schedule(&atchan->tasklet);
|
||||
|
||||
@@ -626,11 +626,9 @@ static int dmatest_func(void *data)
|
||||
srcs[i] = um->addr[i] + src_off;
|
||||
ret = dma_mapping_error(dev->dev, um->addr[i]);
|
||||
if (ret) {
|
||||
dmaengine_unmap_put(um);
|
||||
result("src mapping error", total_tests,
|
||||
src_off, dst_off, len, ret);
|
||||
failed_tests++;
|
||||
continue;
|
||||
goto error_unmap_continue;
|
||||
}
|
||||
um->to_cnt++;
|
||||
}
|
||||
@@ -645,11 +643,9 @@ static int dmatest_func(void *data)
|
||||
DMA_BIDIRECTIONAL);
|
||||
ret = dma_mapping_error(dev->dev, dsts[i]);
|
||||
if (ret) {
|
||||
dmaengine_unmap_put(um);
|
||||
result("dst mapping error", total_tests,
|
||||
src_off, dst_off, len, ret);
|
||||
failed_tests++;
|
||||
continue;
|
||||
goto error_unmap_continue;
|
||||
}
|
||||
um->bidi_cnt++;
|
||||
}
|
||||
@@ -679,12 +675,10 @@ static int dmatest_func(void *data)
|
||||
}
|
||||
|
||||
if (!tx) {
|
||||
dmaengine_unmap_put(um);
|
||||
result("prep error", total_tests, src_off,
|
||||
dst_off, len, ret);
|
||||
msleep(100);
|
||||
failed_tests++;
|
||||
continue;
|
||||
goto error_unmap_continue;
|
||||
}
|
||||
|
||||
done->done = false;
|
||||
@@ -693,12 +687,10 @@ static int dmatest_func(void *data)
|
||||
cookie = tx->tx_submit(tx);
|
||||
|
||||
if (dma_submit_error(cookie)) {
|
||||
dmaengine_unmap_put(um);
|
||||
result("submit error", total_tests, src_off,
|
||||
dst_off, len, ret);
|
||||
msleep(100);
|
||||
failed_tests++;
|
||||
continue;
|
||||
goto error_unmap_continue;
|
||||
}
|
||||
dma_async_issue_pending(chan);
|
||||
|
||||
@@ -711,16 +703,14 @@ static int dmatest_func(void *data)
|
||||
dmaengine_unmap_put(um);
|
||||
result("test timed out", total_tests, src_off, dst_off,
|
||||
len, 0);
|
||||
failed_tests++;
|
||||
continue;
|
||||
goto error_unmap_continue;
|
||||
} else if (status != DMA_COMPLETE) {
|
||||
dmaengine_unmap_put(um);
|
||||
result(status == DMA_ERROR ?
|
||||
"completion error status" :
|
||||
"completion busy status", total_tests, src_off,
|
||||
dst_off, len, ret);
|
||||
failed_tests++;
|
||||
continue;
|
||||
goto error_unmap_continue;
|
||||
}
|
||||
|
||||
dmaengine_unmap_put(um);
|
||||
@@ -765,6 +755,12 @@ static int dmatest_func(void *data)
|
||||
verbose_result("test passed", total_tests, src_off,
|
||||
dst_off, len, 0);
|
||||
}
|
||||
|
||||
continue;
|
||||
|
||||
error_unmap_continue:
|
||||
dmaengine_unmap_put(um);
|
||||
failed_tests++;
|
||||
}
|
||||
ktime = ktime_sub(ktime_get(), ktime);
|
||||
ktime = ktime_sub(ktime, comparetime);
|
||||
|
||||
@@ -542,6 +542,7 @@ static umode_t __init ibft_check_tgt_for(void *data, int type)
|
||||
case ISCSI_BOOT_TGT_NIC_ASSOC:
|
||||
case ISCSI_BOOT_TGT_CHAP_TYPE:
|
||||
rc = S_IRUGO;
|
||||
break;
|
||||
case ISCSI_BOOT_TGT_NAME:
|
||||
if (tgt->tgt_name_len)
|
||||
rc = S_IRUGO;
|
||||
|
||||
@@ -261,6 +261,7 @@ static int vf610_gpio_probe(struct platform_device *pdev)
|
||||
struct vf610_gpio_port *port;
|
||||
struct resource *iores;
|
||||
struct gpio_chip *gc;
|
||||
int i;
|
||||
int ret;
|
||||
|
||||
port = devm_kzalloc(&pdev->dev, sizeof(*port), GFP_KERNEL);
|
||||
@@ -300,6 +301,10 @@ static int vf610_gpio_probe(struct platform_device *pdev)
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
/* Mask all GPIO interrupts */
|
||||
for (i = 0; i < gc->ngpio; i++)
|
||||
vf610_gpio_writel(0, port->base + PORT_PCR(i));
|
||||
|
||||
/* Clear the interrupt status register for all GPIO's */
|
||||
vf610_gpio_writel(~0, port->base + PORT_ISFR);
|
||||
|
||||
|
||||
@@ -371,6 +371,7 @@ static int sun4i_tcon_init_clocks(struct device *dev,
|
||||
dev_err(dev, "Couldn't get the TCON channel 0 clock\n");
|
||||
return PTR_ERR(tcon->sclk0);
|
||||
}
|
||||
clk_prepare_enable(tcon->sclk0);
|
||||
|
||||
if (tcon->quirks->has_channel_1) {
|
||||
tcon->sclk1 = devm_clk_get(dev, "tcon-ch1");
|
||||
@@ -385,6 +386,7 @@ static int sun4i_tcon_init_clocks(struct device *dev,
|
||||
|
||||
static void sun4i_tcon_free_clocks(struct sun4i_tcon *tcon)
|
||||
{
|
||||
clk_disable_unprepare(tcon->sclk0);
|
||||
clk_disable_unprepare(tcon->clk);
|
||||
}
|
||||
|
||||
|
||||
@@ -1477,8 +1477,7 @@ static int omap_i2c_remove(struct platform_device *pdev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
static int omap_i2c_runtime_suspend(struct device *dev)
|
||||
static int __maybe_unused omap_i2c_runtime_suspend(struct device *dev)
|
||||
{
|
||||
struct omap_i2c_dev *omap = dev_get_drvdata(dev);
|
||||
|
||||
@@ -1504,7 +1503,7 @@ static int omap_i2c_runtime_suspend(struct device *dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int omap_i2c_runtime_resume(struct device *dev)
|
||||
static int __maybe_unused omap_i2c_runtime_resume(struct device *dev)
|
||||
{
|
||||
struct omap_i2c_dev *omap = dev_get_drvdata(dev);
|
||||
|
||||
@@ -1519,20 +1518,18 @@ static int omap_i2c_runtime_resume(struct device *dev)
|
||||
}
|
||||
|
||||
static const struct dev_pm_ops omap_i2c_pm_ops = {
|
||||
SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
|
||||
pm_runtime_force_resume)
|
||||
SET_RUNTIME_PM_OPS(omap_i2c_runtime_suspend,
|
||||
omap_i2c_runtime_resume, NULL)
|
||||
};
|
||||
#define OMAP_I2C_PM_OPS (&omap_i2c_pm_ops)
|
||||
#else
|
||||
#define OMAP_I2C_PM_OPS NULL
|
||||
#endif /* CONFIG_PM */
|
||||
|
||||
static struct platform_driver omap_i2c_driver = {
|
||||
.probe = omap_i2c_probe,
|
||||
.remove = omap_i2c_remove,
|
||||
.driver = {
|
||||
.name = "omap_i2c",
|
||||
.pm = OMAP_I2C_PM_OPS,
|
||||
.pm = &omap_i2c_pm_ops,
|
||||
.of_match_table = of_match_ptr(omap_i2c_of_match),
|
||||
},
|
||||
};
|
||||
|
||||
@@ -954,7 +954,6 @@ void hfi1_ud_rcv(struct hfi1_packet *packet)
|
||||
opcode == IB_OPCODE_UD_SEND_ONLY_WITH_IMMEDIATE) {
|
||||
wc.ex.imm_data = ohdr->u.ud.imm_data;
|
||||
wc.wc_flags = IB_WC_WITH_IMM;
|
||||
tlen -= sizeof(u32);
|
||||
} else if (opcode == IB_OPCODE_UD_SEND_ONLY) {
|
||||
wc.ex.imm_data = 0;
|
||||
wc.wc_flags = 0;
|
||||
|
||||
@@ -515,7 +515,6 @@ void qib_ud_rcv(struct qib_ibport *ibp, struct ib_header *hdr,
|
||||
opcode == IB_OPCODE_UD_SEND_ONLY_WITH_IMMEDIATE) {
|
||||
wc.ex.imm_data = ohdr->u.ud.imm_data;
|
||||
wc.wc_flags = IB_WC_WITH_IMM;
|
||||
tlen -= sizeof(u32);
|
||||
} else if (opcode == IB_OPCODE_UD_SEND_ONLY) {
|
||||
wc.ex.imm_data = 0;
|
||||
wc.wc_flags = 0;
|
||||
|
||||
@@ -1252,6 +1252,7 @@ static const struct acpi_device_id elan_acpi_id[] = {
|
||||
{ "ELAN0000", 0 },
|
||||
{ "ELAN0100", 0 },
|
||||
{ "ELAN0600", 0 },
|
||||
{ "ELAN0601", 0 },
|
||||
{ "ELAN0602", 0 },
|
||||
{ "ELAN0605", 0 },
|
||||
{ "ELAN0608", 0 },
|
||||
|
||||
@@ -187,6 +187,7 @@ enum {
|
||||
MODEL_DIGITIZER_II = 0x5544, /* UD */
|
||||
MODEL_GRAPHIRE = 0x4554, /* ET */
|
||||
MODEL_PENPARTNER = 0x4354, /* CT */
|
||||
MODEL_ARTPAD_II = 0x4B54, /* KT */
|
||||
};
|
||||
|
||||
static void wacom_handle_model_response(struct wacom *wacom)
|
||||
@@ -245,6 +246,7 @@ static void wacom_handle_model_response(struct wacom *wacom)
|
||||
wacom->flags = F_HAS_STYLUS2 | F_HAS_SCROLLWHEEL;
|
||||
break;
|
||||
|
||||
case MODEL_ARTPAD_II:
|
||||
case MODEL_DIGITIZER_II:
|
||||
wacom->dev->name = "Wacom Digitizer II";
|
||||
wacom->dev->id.version = MODEL_DIGITIZER_II;
|
||||
|
||||
@@ -1919,6 +1919,7 @@ static void do_attach(struct iommu_dev_data *dev_data,
|
||||
|
||||
static void do_detach(struct iommu_dev_data *dev_data)
|
||||
{
|
||||
struct protection_domain *domain = dev_data->domain;
|
||||
struct amd_iommu *iommu;
|
||||
u16 alias;
|
||||
|
||||
@@ -1934,10 +1935,6 @@ static void do_detach(struct iommu_dev_data *dev_data)
|
||||
iommu = amd_iommu_rlookup_table[dev_data->devid];
|
||||
alias = dev_data->alias;
|
||||
|
||||
/* decrease reference counters */
|
||||
dev_data->domain->dev_iommu[iommu->index] -= 1;
|
||||
dev_data->domain->dev_cnt -= 1;
|
||||
|
||||
/* Update data structures */
|
||||
dev_data->domain = NULL;
|
||||
list_del(&dev_data->list);
|
||||
@@ -1947,6 +1944,16 @@ static void do_detach(struct iommu_dev_data *dev_data)
|
||||
|
||||
/* Flush the DTE entry */
|
||||
device_flush_dte(dev_data);
|
||||
|
||||
/* Flush IOTLB */
|
||||
domain_flush_tlb_pde(domain);
|
||||
|
||||
/* Wait for the flushes to finish */
|
||||
domain_flush_complete(domain);
|
||||
|
||||
/* decrease reference counters - needs to happen after the flushes */
|
||||
domain->dev_iommu[iommu->index] -= 1;
|
||||
domain->dev_cnt -= 1;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -2560,13 +2567,13 @@ out_unmap:
|
||||
bus_addr = address + s->dma_address + (j << PAGE_SHIFT);
|
||||
iommu_unmap_page(domain, bus_addr, PAGE_SIZE);
|
||||
|
||||
if (--mapped_pages)
|
||||
if (--mapped_pages == 0)
|
||||
goto out_free_iova;
|
||||
}
|
||||
}
|
||||
|
||||
out_free_iova:
|
||||
free_iova_fast(&dma_dom->iovad, address, npages);
|
||||
free_iova_fast(&dma_dom->iovad, address >> PAGE_SHIFT, npages);
|
||||
|
||||
out_err:
|
||||
return 0;
|
||||
|
||||
@@ -34,6 +34,9 @@
|
||||
#define SEL_INT_PENDING (1 << 6)
|
||||
#define SEL_INT_NUM_MASK 0x3f
|
||||
|
||||
#define MMP2_ICU_INT_ROUTE_PJ4_IRQ (1 << 5)
|
||||
#define MMP2_ICU_INT_ROUTE_PJ4_FIQ (1 << 6)
|
||||
|
||||
struct icu_chip_data {
|
||||
int nr_irqs;
|
||||
unsigned int virq_base;
|
||||
@@ -190,7 +193,8 @@ static const struct mmp_intc_conf mmp_conf = {
|
||||
static const struct mmp_intc_conf mmp2_conf = {
|
||||
.conf_enable = 0x20,
|
||||
.conf_disable = 0x0,
|
||||
.conf_mask = 0x7f,
|
||||
.conf_mask = MMP2_ICU_INT_ROUTE_PJ4_IRQ |
|
||||
MMP2_ICU_INT_ROUTE_PJ4_FIQ,
|
||||
};
|
||||
|
||||
static void __exception_irq_entry mmp_handle_irq(struct pt_regs *regs)
|
||||
|
||||
@@ -1054,11 +1054,19 @@ static int uvc_parse_standard_control(struct uvc_device *dev,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* Make sure the terminal type MSB is not null, otherwise it
|
||||
* could be confused with a unit.
|
||||
/*
|
||||
* Reject invalid terminal types that would cause issues:
|
||||
*
|
||||
* - The high byte must be non-zero, otherwise it would be
|
||||
* confused with a unit.
|
||||
*
|
||||
* - Bit 15 must be 0, as we use it internally as a terminal
|
||||
* direction flag.
|
||||
*
|
||||
* Other unknown types are accepted.
|
||||
*/
|
||||
type = get_unaligned_le16(&buffer[4]);
|
||||
if ((type & 0xff00) == 0) {
|
||||
if ((type & 0x7f00) == 0 || (type & 0x8000) != 0) {
|
||||
uvc_trace(UVC_TRACE_DESCR, "device %d videocontrol "
|
||||
"interface %d INPUT_TERMINAL %d has invalid "
|
||||
"type 0x%04x, skipping\n", udev->devnum,
|
||||
|
||||
@@ -639,7 +639,7 @@ static uint64_t _mv88e6xxx_get_ethtool_stat(struct mv88e6xxx_chip *chip,
|
||||
default:
|
||||
return UINT64_MAX;
|
||||
}
|
||||
value = (((u64)high) << 16) | low;
|
||||
value = (((u64)high) << 32) | low;
|
||||
return value;
|
||||
}
|
||||
|
||||
@@ -2569,7 +2569,7 @@ static const struct mv88e6xxx_ops mv88e6161_ops = {
|
||||
.port_pause_limit = mv88e6097_port_pause_limit,
|
||||
.port_disable_learn_limit = mv88e6xxx_port_disable_learn_limit,
|
||||
.port_disable_pri_override = mv88e6xxx_port_disable_pri_override,
|
||||
.stats_snapshot = mv88e6320_g1_stats_snapshot,
|
||||
.stats_snapshot = mv88e6xxx_g1_stats_snapshot,
|
||||
.stats_get_sset_count = mv88e6095_stats_get_sset_count,
|
||||
.stats_get_strings = mv88e6095_stats_get_strings,
|
||||
.stats_get_stats = mv88e6095_stats_get_stats,
|
||||
|
||||
@@ -165,7 +165,7 @@ int mv88e6xxx_port_set_duplex(struct mv88e6xxx_chip *chip, int port, int dup)
|
||||
/* normal duplex detection */
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
err = mv88e6xxx_port_write(chip, port, MV88E6XXX_PORT_MAC_CTL, reg);
|
||||
|
||||
@@ -145,7 +145,8 @@ u32 msgdma_tx_completions(struct altera_tse_private *priv)
|
||||
& 0xffff;
|
||||
|
||||
if (inuse) { /* Tx FIFO is not empty */
|
||||
ready = priv->tx_prod - priv->tx_cons - inuse - 1;
|
||||
ready = max_t(int,
|
||||
priv->tx_prod - priv->tx_cons - inuse - 1, 0);
|
||||
} else {
|
||||
/* Check for buffered last packet */
|
||||
status = csrrd32(priv->tx_dma_csr, msgdma_csroffs(status));
|
||||
|
||||
@@ -447,6 +447,12 @@ normal_tx:
|
||||
}
|
||||
|
||||
length >>= 9;
|
||||
if (unlikely(length >= ARRAY_SIZE(bnxt_lhint_arr))) {
|
||||
dev_warn_ratelimited(&pdev->dev, "Dropped oversize %d bytes TX packet.\n",
|
||||
skb->len);
|
||||
i = 0;
|
||||
goto tx_dma_error;
|
||||
}
|
||||
flags |= bnxt_lhint_arr[length];
|
||||
txbd->tx_bd_len_flags_type = cpu_to_le32(flags);
|
||||
|
||||
|
||||
@@ -2532,6 +2532,8 @@ static int hns_nic_dev_probe(struct platform_device *pdev)
|
||||
out_notify_fail:
|
||||
(void)cancel_work_sync(&priv->service_task);
|
||||
out_read_prop_fail:
|
||||
/* safe for ACPI FW */
|
||||
of_node_put(to_of_node(priv->fwnode));
|
||||
free_netdev(ndev);
|
||||
return ret;
|
||||
}
|
||||
@@ -2561,6 +2563,9 @@ static int hns_nic_dev_remove(struct platform_device *pdev)
|
||||
set_bit(NIC_STATE_REMOVING, &priv->state);
|
||||
(void)cancel_work_sync(&priv->service_task);
|
||||
|
||||
/* safe for ACPI FW */
|
||||
of_node_put(to_of_node(priv->fwnode));
|
||||
|
||||
free_netdev(ndev);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1154,16 +1154,18 @@ static int hns_get_regs_len(struct net_device *net_dev)
|
||||
*/
|
||||
static int hns_nic_nway_reset(struct net_device *netdev)
|
||||
{
|
||||
int ret = 0;
|
||||
struct phy_device *phy = netdev->phydev;
|
||||
|
||||
if (netif_running(netdev)) {
|
||||
/* if autoneg is disabled, don't restart auto-negotiation */
|
||||
if (phy && phy->autoneg == AUTONEG_ENABLE)
|
||||
ret = genphy_restart_aneg(phy);
|
||||
}
|
||||
if (!netif_running(netdev))
|
||||
return 0;
|
||||
|
||||
return ret;
|
||||
if (!phy)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
if (phy->autoneg != AUTONEG_ENABLE)
|
||||
return -EINVAL;
|
||||
|
||||
return genphy_restart_aneg(phy);
|
||||
}
|
||||
|
||||
static u32
|
||||
|
||||
@@ -321,7 +321,7 @@ static int hns_mdio_read(struct mii_bus *bus, int phy_id, int regnum)
|
||||
}
|
||||
|
||||
hns_mdio_cmd_write(mdio_dev, is_c45,
|
||||
MDIO_C45_WRITE_ADDR, phy_id, devad);
|
||||
MDIO_C45_READ, phy_id, devad);
|
||||
}
|
||||
|
||||
/* Step 5: waitting for MDIO_COMMAND_REG 's mdio_start==0,*/
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
#include <linux/mii.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/of_net.h>
|
||||
#include <linux/dmi.h>
|
||||
|
||||
#include <asm/irq.h>
|
||||
|
||||
@@ -93,7 +94,7 @@ static int copybreak __read_mostly = 128;
|
||||
module_param(copybreak, int, 0);
|
||||
MODULE_PARM_DESC(copybreak, "Receive copy threshold");
|
||||
|
||||
static int disable_msi = 0;
|
||||
static int disable_msi = -1;
|
||||
module_param(disable_msi, int, 0);
|
||||
MODULE_PARM_DESC(disable_msi, "Disable Message Signaled Interrupt (MSI)");
|
||||
|
||||
@@ -4931,6 +4932,24 @@ static const char *sky2_name(u8 chipid, char *buf, int sz)
|
||||
return buf;
|
||||
}
|
||||
|
||||
static const struct dmi_system_id msi_blacklist[] = {
|
||||
{
|
||||
.ident = "Dell Inspiron 1545",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 1545"),
|
||||
},
|
||||
},
|
||||
{
|
||||
.ident = "Gateway P-79",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "Gateway"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "P-79"),
|
||||
},
|
||||
},
|
||||
{}
|
||||
};
|
||||
|
||||
static int sky2_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
{
|
||||
struct net_device *dev, *dev1;
|
||||
@@ -5042,6 +5061,9 @@ static int sky2_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
goto err_out_free_pci;
|
||||
}
|
||||
|
||||
if (disable_msi == -1)
|
||||
disable_msi = !!dmi_check_system(msi_blacklist);
|
||||
|
||||
if (!disable_msi && pci_enable_msi(pdev) == 0) {
|
||||
err = sky2_test_msi(hw);
|
||||
if (err) {
|
||||
|
||||
@@ -435,19 +435,19 @@ static void qed_init_qm_pq(struct qed_hwfn *p_hwfn,
|
||||
|
||||
/* get pq index according to PQ_FLAGS */
|
||||
static u16 *qed_init_qm_get_idx_from_flags(struct qed_hwfn *p_hwfn,
|
||||
u32 pq_flags)
|
||||
unsigned long pq_flags)
|
||||
{
|
||||
struct qed_qm_info *qm_info = &p_hwfn->qm_info;
|
||||
|
||||
/* Can't have multiple flags set here */
|
||||
if (bitmap_weight((unsigned long *)&pq_flags,
|
||||
if (bitmap_weight(&pq_flags,
|
||||
sizeof(pq_flags) * BITS_PER_BYTE) > 1) {
|
||||
DP_ERR(p_hwfn, "requested multiple pq flags 0x%x\n", pq_flags);
|
||||
DP_ERR(p_hwfn, "requested multiple pq flags 0x%lx\n", pq_flags);
|
||||
goto err;
|
||||
}
|
||||
|
||||
if (!(qed_get_pq_flags(p_hwfn) & pq_flags)) {
|
||||
DP_ERR(p_hwfn, "pq flag 0x%x is not set\n", pq_flags);
|
||||
DP_ERR(p_hwfn, "pq flag 0x%lx is not set\n", pq_flags);
|
||||
goto err;
|
||||
}
|
||||
|
||||
|
||||
@@ -607,6 +607,10 @@ qed_sp_update_accept_mode(struct qed_hwfn *p_hwfn,
|
||||
(!!(accept_filter & QED_ACCEPT_MCAST_MATCHED) &&
|
||||
!!(accept_filter & QED_ACCEPT_MCAST_UNMATCHED)));
|
||||
|
||||
SET_FIELD(state, ETH_VPORT_TX_MODE_UCAST_ACCEPT_ALL,
|
||||
(!!(accept_filter & QED_ACCEPT_UCAST_MATCHED) &&
|
||||
!!(accept_filter & QED_ACCEPT_UCAST_UNMATCHED)));
|
||||
|
||||
SET_FIELD(state, ETH_VPORT_TX_MODE_BCAST_ACCEPT_ALL,
|
||||
!!(accept_filter & QED_ACCEPT_BCAST));
|
||||
|
||||
@@ -743,6 +747,11 @@ int qed_sp_vport_update(struct qed_hwfn *p_hwfn,
|
||||
return rc;
|
||||
}
|
||||
|
||||
if (p_params->update_ctl_frame_check) {
|
||||
p_cmn->ctl_frame_mac_check_en = p_params->mac_chk_en;
|
||||
p_cmn->ctl_frame_ethtype_check_en = p_params->ethtype_chk_en;
|
||||
}
|
||||
|
||||
/* Update mcast bins for VFs, PF doesn't use this functionality */
|
||||
qed_sp_update_mcast_bin(p_hwfn, p_ramrod, p_params);
|
||||
|
||||
@@ -2161,7 +2170,7 @@ static int qed_fill_eth_dev_info(struct qed_dev *cdev,
|
||||
u16 num_queues = 0;
|
||||
|
||||
/* Since the feature controls only queue-zones,
|
||||
* make sure we have the contexts [rx, tx, xdp] to
|
||||
* make sure we have the contexts [rx, xdp, tcs] to
|
||||
* match.
|
||||
*/
|
||||
for_each_hwfn(cdev, i) {
|
||||
@@ -2171,7 +2180,8 @@ static int qed_fill_eth_dev_info(struct qed_dev *cdev,
|
||||
u16 cids;
|
||||
|
||||
cids = hwfn->pf_params.eth_pf_params.num_cons;
|
||||
num_queues += min_t(u16, l2_queues, cids / 3);
|
||||
cids /= (2 + info->num_tc);
|
||||
num_queues += min_t(u16, l2_queues, cids);
|
||||
}
|
||||
|
||||
/* queues might theoretically be >256, but interrupts'
|
||||
@@ -2640,7 +2650,8 @@ static int qed_configure_filter_rx_mode(struct qed_dev *cdev,
|
||||
if (type == QED_FILTER_RX_MODE_TYPE_PROMISC) {
|
||||
accept_flags.rx_accept_filter |= QED_ACCEPT_UCAST_UNMATCHED |
|
||||
QED_ACCEPT_MCAST_UNMATCHED;
|
||||
accept_flags.tx_accept_filter |= QED_ACCEPT_MCAST_UNMATCHED;
|
||||
accept_flags.tx_accept_filter |= QED_ACCEPT_UCAST_UNMATCHED |
|
||||
QED_ACCEPT_MCAST_UNMATCHED;
|
||||
} else if (type == QED_FILTER_RX_MODE_TYPE_MULTI_PROMISC) {
|
||||
accept_flags.rx_accept_filter |= QED_ACCEPT_MCAST_UNMATCHED;
|
||||
accept_flags.tx_accept_filter |= QED_ACCEPT_MCAST_UNMATCHED;
|
||||
|
||||
@@ -218,6 +218,9 @@ struct qed_sp_vport_update_params {
|
||||
struct qed_rss_params *rss_params;
|
||||
struct qed_filter_accept_flags accept_flags;
|
||||
struct qed_sge_tpa_params *sge_tpa_params;
|
||||
u8 update_ctl_frame_check;
|
||||
u8 mac_chk_en;
|
||||
u8 ethtype_chk_en;
|
||||
};
|
||||
|
||||
int qed_sp_vport_update(struct qed_hwfn *p_hwfn,
|
||||
|
||||
@@ -2299,19 +2299,24 @@ static int qed_ll2_start_xmit(struct qed_dev *cdev, struct sk_buff *skb)
|
||||
{
|
||||
struct qed_ll2_tx_pkt_info pkt;
|
||||
const skb_frag_t *frag;
|
||||
u8 flags = 0, nr_frags;
|
||||
int rc = -EINVAL, i;
|
||||
dma_addr_t mapping;
|
||||
u16 vlan = 0;
|
||||
u8 flags = 0;
|
||||
|
||||
if (unlikely(skb->ip_summed != CHECKSUM_NONE)) {
|
||||
DP_INFO(cdev, "Cannot transmit a checksumed packet\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (1 + skb_shinfo(skb)->nr_frags > CORE_LL2_TX_MAX_BDS_PER_PACKET) {
|
||||
/* Cache number of fragments from SKB since SKB may be freed by
|
||||
* the completion routine after calling qed_ll2_prepare_tx_packet()
|
||||
*/
|
||||
nr_frags = skb_shinfo(skb)->nr_frags;
|
||||
|
||||
if (1 + nr_frags > CORE_LL2_TX_MAX_BDS_PER_PACKET) {
|
||||
DP_ERR(cdev, "Cannot transmit a packet with %d fragments\n",
|
||||
1 + skb_shinfo(skb)->nr_frags);
|
||||
1 + nr_frags);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@@ -2333,7 +2338,7 @@ static int qed_ll2_start_xmit(struct qed_dev *cdev, struct sk_buff *skb)
|
||||
}
|
||||
|
||||
memset(&pkt, 0, sizeof(pkt));
|
||||
pkt.num_of_bds = 1 + skb_shinfo(skb)->nr_frags;
|
||||
pkt.num_of_bds = 1 + nr_frags;
|
||||
pkt.vlan = vlan;
|
||||
pkt.bd_flags = flags;
|
||||
pkt.tx_dest = QED_LL2_TX_DEST_NW;
|
||||
@@ -2341,12 +2346,17 @@ static int qed_ll2_start_xmit(struct qed_dev *cdev, struct sk_buff *skb)
|
||||
pkt.first_frag_len = skb->len;
|
||||
pkt.cookie = skb;
|
||||
|
||||
/* qed_ll2_prepare_tx_packet() may actually send the packet if
|
||||
* there are no fragments in the skb and subsequently the completion
|
||||
* routine may run and free the SKB, so no dereferencing the SKB
|
||||
* beyond this point unless skb has any fragments.
|
||||
*/
|
||||
rc = qed_ll2_prepare_tx_packet(&cdev->hwfns[0], cdev->ll2->handle,
|
||||
&pkt, 1);
|
||||
if (rc)
|
||||
goto err;
|
||||
|
||||
for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) {
|
||||
for (i = 0; i < nr_frags; i++) {
|
||||
frag = &skb_shinfo(skb)->frags[i];
|
||||
|
||||
mapping = skb_frag_dma_map(&cdev->pdev->dev, frag, 0,
|
||||
|
||||
@@ -380,6 +380,7 @@ void qed_consq_setup(struct qed_hwfn *p_hwfn);
|
||||
* @param p_hwfn
|
||||
*/
|
||||
void qed_consq_free(struct qed_hwfn *p_hwfn);
|
||||
int qed_spq_pend_post(struct qed_hwfn *p_hwfn);
|
||||
|
||||
/**
|
||||
* @file
|
||||
|
||||
@@ -404,6 +404,11 @@ int qed_eq_completion(struct qed_hwfn *p_hwfn, void *cookie)
|
||||
|
||||
qed_eq_prod_update(p_hwfn, qed_chain_get_prod_idx(p_chain));
|
||||
|
||||
/* Attempt to post pending requests */
|
||||
spin_lock_bh(&p_hwfn->p_spq->lock);
|
||||
rc = qed_spq_pend_post(p_hwfn);
|
||||
spin_unlock_bh(&p_hwfn->p_spq->lock);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
@@ -747,7 +752,7 @@ static int qed_spq_post_list(struct qed_hwfn *p_hwfn,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int qed_spq_pend_post(struct qed_hwfn *p_hwfn)
|
||||
int qed_spq_pend_post(struct qed_hwfn *p_hwfn)
|
||||
{
|
||||
struct qed_spq *p_spq = p_hwfn->p_spq;
|
||||
struct qed_spq_entry *p_ent = NULL;
|
||||
@@ -879,7 +884,6 @@ int qed_spq_completion(struct qed_hwfn *p_hwfn,
|
||||
struct qed_spq_entry *p_ent = NULL;
|
||||
struct qed_spq_entry *tmp;
|
||||
struct qed_spq_entry *found = NULL;
|
||||
int rc;
|
||||
|
||||
if (!p_hwfn)
|
||||
return -EINVAL;
|
||||
@@ -937,12 +941,7 @@ int qed_spq_completion(struct qed_hwfn *p_hwfn,
|
||||
*/
|
||||
qed_spq_return_entry(p_hwfn, found);
|
||||
|
||||
/* Attempt to post pending requests */
|
||||
spin_lock_bh(&p_spq->lock);
|
||||
rc = qed_spq_pend_post(p_hwfn);
|
||||
spin_unlock_bh(&p_spq->lock);
|
||||
|
||||
return rc;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int qed_consq_alloc(struct qed_hwfn *p_hwfn)
|
||||
|
||||
@@ -1963,7 +1963,9 @@ static void qed_iov_vf_mbx_start_vport(struct qed_hwfn *p_hwfn,
|
||||
params.vport_id = vf->vport_id;
|
||||
params.max_buffers_per_cqe = start->max_buffers_per_cqe;
|
||||
params.mtu = vf->mtu;
|
||||
params.check_mac = true;
|
||||
|
||||
/* Non trusted VFs should enable control frame filtering */
|
||||
params.check_mac = !vf->p_vf_info.is_trusted_configured;
|
||||
|
||||
rc = qed_sp_eth_vport_start(p_hwfn, ¶ms);
|
||||
if (rc) {
|
||||
@@ -4910,6 +4912,9 @@ static void qed_iov_handle_trust_change(struct qed_hwfn *hwfn)
|
||||
params.opaque_fid = vf->opaque_fid;
|
||||
params.vport_id = vf->vport_id;
|
||||
|
||||
params.update_ctl_frame_check = 1;
|
||||
params.mac_chk_en = !vf_info->is_trusted_configured;
|
||||
|
||||
if (vf_info->rx_accept_mode & mask) {
|
||||
flags->update_rx_mode_config = 1;
|
||||
flags->rx_accept_filter = vf_info->rx_accept_mode;
|
||||
@@ -4927,7 +4932,8 @@ static void qed_iov_handle_trust_change(struct qed_hwfn *hwfn)
|
||||
}
|
||||
|
||||
if (flags->update_rx_mode_config ||
|
||||
flags->update_tx_mode_config)
|
||||
flags->update_tx_mode_config ||
|
||||
params.update_ctl_frame_check)
|
||||
qed_sp_vport_update(hwfn, ¶ms,
|
||||
QED_SPQ_MODE_EBLOCK, NULL);
|
||||
}
|
||||
|
||||
@@ -261,6 +261,7 @@ static int qed_vf_pf_acquire(struct qed_hwfn *p_hwfn)
|
||||
struct pfvf_acquire_resp_tlv *resp = &p_iov->pf2vf_reply->acquire_resp;
|
||||
struct pf_vf_pfdev_info *pfdev_info = &resp->pfdev_info;
|
||||
struct vf_pf_resc_request *p_resc;
|
||||
u8 retry_cnt = VF_ACQUIRE_THRESH;
|
||||
bool resources_acquired = false;
|
||||
struct vfpf_acquire_tlv *req;
|
||||
int rc = 0, attempts = 0;
|
||||
@@ -314,6 +315,15 @@ static int qed_vf_pf_acquire(struct qed_hwfn *p_hwfn)
|
||||
|
||||
/* send acquire request */
|
||||
rc = qed_send_msg2pf(p_hwfn, &resp->hdr.status, sizeof(*resp));
|
||||
|
||||
/* Re-try acquire in case of vf-pf hw channel timeout */
|
||||
if (retry_cnt && rc == -EBUSY) {
|
||||
DP_VERBOSE(p_hwfn, QED_MSG_IOV,
|
||||
"VF retrying to acquire due to VPC timeout\n");
|
||||
retry_cnt--;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (rc)
|
||||
goto exit;
|
||||
|
||||
|
||||
@@ -1284,8 +1284,10 @@ static int rk_gmac_powerup(struct rk_priv_data *bsp_priv)
|
||||
}
|
||||
|
||||
ret = phy_power_on(bsp_priv, true);
|
||||
if (ret)
|
||||
if (ret) {
|
||||
gmac_clk_enable(bsp_priv, false);
|
||||
return ret;
|
||||
}
|
||||
|
||||
pm_runtime_enable(dev);
|
||||
pm_runtime_get_sync(dev);
|
||||
|
||||
@@ -702,8 +702,11 @@ static u32 stmmac_usec2riwt(u32 usec, struct stmmac_priv *priv)
|
||||
{
|
||||
unsigned long clk = clk_get_rate(priv->plat->stmmac_clk);
|
||||
|
||||
if (!clk)
|
||||
return 0;
|
||||
if (!clk) {
|
||||
clk = priv->plat->clk_ref_rate;
|
||||
if (!clk)
|
||||
return 0;
|
||||
}
|
||||
|
||||
return (usec * (clk / 1000000)) / 256;
|
||||
}
|
||||
@@ -712,8 +715,11 @@ static u32 stmmac_riwt2usec(u32 riwt, struct stmmac_priv *priv)
|
||||
{
|
||||
unsigned long clk = clk_get_rate(priv->plat->stmmac_clk);
|
||||
|
||||
if (!clk)
|
||||
return 0;
|
||||
if (!clk) {
|
||||
clk = priv->plat->clk_ref_rate;
|
||||
if (!clk)
|
||||
return 0;
|
||||
}
|
||||
|
||||
return (riwt * 256) / (clk / 1000000);
|
||||
}
|
||||
|
||||
@@ -3017,10 +3017,22 @@ static netdev_tx_t stmmac_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
|
||||
tx_q = &priv->tx_queue[queue];
|
||||
|
||||
if (priv->tx_path_in_lpi_mode)
|
||||
stmmac_disable_eee_mode(priv);
|
||||
|
||||
/* Manage oversized TCP frames for GMAC4 device */
|
||||
if (skb_is_gso(skb) && priv->tso) {
|
||||
if (skb_shinfo(skb)->gso_type & (SKB_GSO_TCPV4 | SKB_GSO_TCPV6))
|
||||
if (skb_shinfo(skb)->gso_type & (SKB_GSO_TCPV4 | SKB_GSO_TCPV6)) {
|
||||
/*
|
||||
* There is no way to determine the number of TSO
|
||||
* capable Queues. Let's use always the Queue 0
|
||||
* because if TSO is supported then at least this
|
||||
* one will be capable.
|
||||
*/
|
||||
skb_set_queue_mapping(skb, 0);
|
||||
|
||||
return stmmac_tso_xmit(skb, dev);
|
||||
}
|
||||
}
|
||||
|
||||
if (unlikely(stmmac_tx_avail(priv, queue) < nfrags + 1)) {
|
||||
@@ -3035,9 +3047,6 @@ static netdev_tx_t stmmac_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
return NETDEV_TX_BUSY;
|
||||
}
|
||||
|
||||
if (priv->tx_path_in_lpi_mode)
|
||||
stmmac_disable_eee_mode(priv);
|
||||
|
||||
entry = tx_q->cur_tx;
|
||||
first_entry = entry;
|
||||
|
||||
|
||||
@@ -632,15 +632,20 @@ out:
|
||||
static int geneve_open(struct net_device *dev)
|
||||
{
|
||||
struct geneve_dev *geneve = netdev_priv(dev);
|
||||
bool ipv6 = !!(geneve->info.mode & IP_TUNNEL_INFO_IPV6);
|
||||
bool metadata = geneve->collect_md;
|
||||
bool ipv4, ipv6;
|
||||
int ret = 0;
|
||||
|
||||
ipv6 = geneve->info.mode & IP_TUNNEL_INFO_IPV6 || metadata;
|
||||
ipv4 = !ipv6 || metadata;
|
||||
#if IS_ENABLED(CONFIG_IPV6)
|
||||
if (ipv6 || metadata)
|
||||
if (ipv6) {
|
||||
ret = geneve_sock_add(geneve, true);
|
||||
if (ret < 0 && ret != -EAFNOSUPPORT)
|
||||
ipv4 = false;
|
||||
}
|
||||
#endif
|
||||
if (!ret && (!ipv6 || metadata))
|
||||
if (ipv4)
|
||||
ret = geneve_sock_add(geneve, false);
|
||||
if (ret < 0)
|
||||
geneve_sock_release(geneve);
|
||||
|
||||
@@ -741,6 +741,14 @@ void netvsc_linkstatus_callback(struct hv_device *device_obj,
|
||||
schedule_delayed_work(&ndev_ctx->dwork, 0);
|
||||
}
|
||||
|
||||
static void netvsc_comp_ipcsum(struct sk_buff *skb)
|
||||
{
|
||||
struct iphdr *iph = (struct iphdr *)skb->data;
|
||||
|
||||
iph->check = 0;
|
||||
iph->check = ip_fast_csum(iph, iph->ihl);
|
||||
}
|
||||
|
||||
static struct sk_buff *netvsc_alloc_recv_skb(struct net_device *net,
|
||||
struct napi_struct *napi,
|
||||
const struct ndis_tcp_ip_checksum_info *csum_info,
|
||||
@@ -764,9 +772,17 @@ static struct sk_buff *netvsc_alloc_recv_skb(struct net_device *net,
|
||||
/* skb is already created with CHECKSUM_NONE */
|
||||
skb_checksum_none_assert(skb);
|
||||
|
||||
/*
|
||||
* In Linux, the IP checksum is always checked.
|
||||
* Do L4 checksum offload if enabled and present.
|
||||
/* Incoming packets may have IP header checksum verified by the host.
|
||||
* They may not have IP header checksum computed after coalescing.
|
||||
* We compute it here if the flags are set, because on Linux, the IP
|
||||
* checksum is always checked.
|
||||
*/
|
||||
if (csum_info && csum_info->receive.ip_checksum_value_invalid &&
|
||||
csum_info->receive.ip_checksum_succeeded &&
|
||||
skb->protocol == htons(ETH_P_IP))
|
||||
netvsc_comp_ipcsum(skb);
|
||||
|
||||
/* Do L4 checksum offload if enabled and present.
|
||||
*/
|
||||
if (csum_info && (net->features & NETIF_F_RXCSUM)) {
|
||||
if (csum_info->receive.tcp_checksum_succeeded ||
|
||||
|
||||
@@ -339,6 +339,17 @@ static int ksz8041_config_aneg(struct phy_device *phydev)
|
||||
return genphy_config_aneg(phydev);
|
||||
}
|
||||
|
||||
static int ksz8061_config_init(struct phy_device *phydev)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = phy_write_mmd(phydev, MDIO_MMD_PMAPMD, MDIO_DEVID1, 0xB61A);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
return kszphy_config_init(phydev);
|
||||
}
|
||||
|
||||
static int ksz9021_load_values_from_of(struct phy_device *phydev,
|
||||
const struct device_node *of_node,
|
||||
u16 reg,
|
||||
@@ -938,7 +949,7 @@ static struct phy_driver ksphy_driver[] = {
|
||||
.phy_id_mask = MICREL_PHY_ID_MASK,
|
||||
.features = PHY_BASIC_FEATURES,
|
||||
.flags = PHY_HAS_INTERRUPT,
|
||||
.config_init = kszphy_config_init,
|
||||
.config_init = ksz8061_config_init,
|
||||
.config_aneg = genphy_config_aneg,
|
||||
.read_status = genphy_read_status,
|
||||
.ack_interrupt = kszphy_ack_interrupt,
|
||||
|
||||
@@ -333,6 +333,10 @@ static int phylink_get_mac_state(struct phylink *pl, struct phylink_link_state *
|
||||
linkmode_zero(state->lp_advertising);
|
||||
state->interface = pl->link_config.interface;
|
||||
state->an_enabled = pl->link_config.an_enabled;
|
||||
state->speed = SPEED_UNKNOWN;
|
||||
state->duplex = DUPLEX_UNKNOWN;
|
||||
state->pause = MLO_PAUSE_NONE;
|
||||
state->an_complete = 0;
|
||||
state->link = 1;
|
||||
|
||||
return pl->ops->mac_link_state(ndev, state);
|
||||
|
||||
@@ -319,6 +319,20 @@ static int lb_bpf_func_set(struct team *team, struct team_gsetter_ctx *ctx)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void lb_bpf_func_free(struct team *team)
|
||||
{
|
||||
struct lb_priv *lb_priv = get_lb_priv(team);
|
||||
struct bpf_prog *fp;
|
||||
|
||||
if (!lb_priv->ex->orig_fprog)
|
||||
return;
|
||||
|
||||
__fprog_destroy(lb_priv->ex->orig_fprog);
|
||||
fp = rcu_dereference_protected(lb_priv->fp,
|
||||
lockdep_is_held(&team->lock));
|
||||
bpf_prog_destroy(fp);
|
||||
}
|
||||
|
||||
static int lb_tx_method_get(struct team *team, struct team_gsetter_ctx *ctx)
|
||||
{
|
||||
struct lb_priv *lb_priv = get_lb_priv(team);
|
||||
@@ -633,6 +647,7 @@ static void lb_exit(struct team *team)
|
||||
|
||||
team_options_unregister(team, lb_options,
|
||||
ARRAY_SIZE(lb_options));
|
||||
lb_bpf_func_free(team);
|
||||
cancel_delayed_work_sync(&lb_priv->ex->stats.refresh_dw);
|
||||
free_percpu(lb_priv->pcpu_stats);
|
||||
kfree(lb_priv->ex);
|
||||
|
||||
@@ -1714,9 +1714,9 @@ static struct sk_buff *tun_ring_recv(struct tun_file *tfile, int noblock,
|
||||
}
|
||||
|
||||
add_wait_queue(&tfile->wq.wait, &wait);
|
||||
current->state = TASK_INTERRUPTIBLE;
|
||||
|
||||
while (1) {
|
||||
set_current_state(TASK_INTERRUPTIBLE);
|
||||
skb = skb_array_consume(&tfile->tx_array);
|
||||
if (skb)
|
||||
break;
|
||||
@@ -1732,7 +1732,7 @@ static struct sk_buff *tun_ring_recv(struct tun_file *tfile, int noblock,
|
||||
schedule();
|
||||
}
|
||||
|
||||
current->state = TASK_RUNNING;
|
||||
__set_current_state(TASK_RUNNING);
|
||||
remove_wait_queue(&tfile->wq.wait, &wait);
|
||||
|
||||
out:
|
||||
|
||||
@@ -580,15 +580,15 @@ static int ath9k_of_init(struct ath_softc *sc)
|
||||
ret = ath9k_eeprom_request(sc, eeprom_name);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ah->ah_flags &= ~AH_USE_EEPROM;
|
||||
ah->ah_flags |= AH_NO_EEP_SWAP;
|
||||
}
|
||||
|
||||
mac = of_get_mac_address(np);
|
||||
if (mac)
|
||||
ether_addr_copy(common->macaddr, mac);
|
||||
|
||||
ah->ah_flags &= ~AH_USE_EEPROM;
|
||||
ah->ah_flags |= AH_NO_EEP_SWAP;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -435,6 +435,8 @@ void xenvif_init_hash(struct xenvif *vif)
|
||||
if (xenvif_hash_cache_size == 0)
|
||||
return;
|
||||
|
||||
BUG_ON(vif->hash.cache.count);
|
||||
|
||||
spin_lock_init(&vif->hash.cache.lock);
|
||||
INIT_LIST_HEAD(&vif->hash.cache.list);
|
||||
}
|
||||
|
||||
@@ -153,6 +153,13 @@ static u16 xenvif_select_queue(struct net_device *dev, struct sk_buff *skb,
|
||||
{
|
||||
struct xenvif *vif = netdev_priv(dev);
|
||||
unsigned int size = vif->hash.size;
|
||||
unsigned int num_queues;
|
||||
|
||||
/* If queues are not set up internally - always return 0
|
||||
* as the packet going to be dropped anyway */
|
||||
num_queues = READ_ONCE(vif->num_queues);
|
||||
if (num_queues < 1)
|
||||
return 0;
|
||||
|
||||
if (vif->hash.alg == XEN_NETIF_CTRL_HASH_ALGORITHM_NONE)
|
||||
return fallback(dev, skb) % dev->real_num_tx_queues;
|
||||
|
||||
@@ -1074,11 +1074,6 @@ static int xenvif_handle_frag_list(struct xenvif_queue *queue, struct sk_buff *s
|
||||
skb_frag_size_set(&frags[i], len);
|
||||
}
|
||||
|
||||
/* Copied all the bits from the frag list -- free it. */
|
||||
skb_frag_list_init(skb);
|
||||
xenvif_skb_zerocopy_prepare(queue, nskb);
|
||||
kfree_skb(nskb);
|
||||
|
||||
/* Release all the original (foreign) frags. */
|
||||
for (f = 0; f < skb_shinfo(skb)->nr_frags; f++)
|
||||
skb_frag_unref(skb, f);
|
||||
@@ -1147,6 +1142,8 @@ static int xenvif_tx_submit(struct xenvif_queue *queue)
|
||||
xenvif_fill_frags(queue, skb);
|
||||
|
||||
if (unlikely(skb_has_frag_list(skb))) {
|
||||
struct sk_buff *nskb = skb_shinfo(skb)->frag_list;
|
||||
xenvif_skb_zerocopy_prepare(queue, nskb);
|
||||
if (xenvif_handle_frag_list(queue, skb)) {
|
||||
if (net_ratelimit())
|
||||
netdev_err(queue->vif->dev,
|
||||
@@ -1155,6 +1152,9 @@ static int xenvif_tx_submit(struct xenvif_queue *queue)
|
||||
kfree_skb(skb);
|
||||
continue;
|
||||
}
|
||||
/* Copied all the bits from the frag list -- free it. */
|
||||
skb_frag_list_init(skb);
|
||||
kfree_skb(nskb);
|
||||
}
|
||||
|
||||
skb->dev = queue->vif->dev;
|
||||
|
||||
@@ -999,6 +999,7 @@ config INTEL_OAKTRAIL
|
||||
config SAMSUNG_Q10
|
||||
tristate "Samsung Q10 Extras"
|
||||
depends on ACPI
|
||||
depends on BACKLIGHT_LCD_SUPPORT
|
||||
select BACKLIGHT_CLASS_DEVICE
|
||||
---help---
|
||||
This driver provides support for backlight control on Samsung Q10
|
||||
|
||||
@@ -2472,11 +2472,12 @@ out:
|
||||
return rc;
|
||||
}
|
||||
|
||||
static void qeth_free_qdio_out_buf(struct qeth_qdio_out_q *q)
|
||||
static void qeth_free_output_queue(struct qeth_qdio_out_q *q)
|
||||
{
|
||||
if (!q)
|
||||
return;
|
||||
|
||||
qeth_clear_outq_buffers(q, 1);
|
||||
qdio_free_buffers(q->qdio_bufs, QDIO_MAX_BUFFERS_PER_Q);
|
||||
kfree(q);
|
||||
}
|
||||
@@ -2549,10 +2550,8 @@ out_freeoutqbufs:
|
||||
card->qdio.out_qs[i]->bufs[j] = NULL;
|
||||
}
|
||||
out_freeoutq:
|
||||
while (i > 0) {
|
||||
qeth_free_qdio_out_buf(card->qdio.out_qs[--i]);
|
||||
qeth_clear_outq_buffers(card->qdio.out_qs[i], 1);
|
||||
}
|
||||
while (i > 0)
|
||||
qeth_free_output_queue(card->qdio.out_qs[--i]);
|
||||
kfree(card->qdio.out_qs);
|
||||
card->qdio.out_qs = NULL;
|
||||
out_freepool:
|
||||
@@ -2585,10 +2584,8 @@ static void qeth_free_qdio_buffers(struct qeth_card *card)
|
||||
qeth_free_buffer_pool(card);
|
||||
/* free outbound qdio_qs */
|
||||
if (card->qdio.out_qs) {
|
||||
for (i = 0; i < card->qdio.no_out_queues; ++i) {
|
||||
qeth_clear_outq_buffers(card->qdio.out_qs[i], 1);
|
||||
qeth_free_qdio_out_buf(card->qdio.out_qs[i]);
|
||||
}
|
||||
for (i = 0; i < card->qdio.no_out_queues; i++)
|
||||
qeth_free_output_queue(card->qdio.out_qs[i]);
|
||||
kfree(card->qdio.out_qs);
|
||||
card->qdio.out_qs = NULL;
|
||||
}
|
||||
|
||||
@@ -295,7 +295,7 @@ NCR_700_detect(struct scsi_host_template *tpnt,
|
||||
if(tpnt->sdev_attrs == NULL)
|
||||
tpnt->sdev_attrs = NCR_700_dev_attrs;
|
||||
|
||||
memory = dma_alloc_attrs(hostdata->dev, TOTAL_MEM_SIZE, &pScript,
|
||||
memory = dma_alloc_attrs(dev, TOTAL_MEM_SIZE, &pScript,
|
||||
GFP_KERNEL, DMA_ATTR_NON_CONSISTENT);
|
||||
if(memory == NULL) {
|
||||
printk(KERN_ERR "53c700: Failed to allocate memory for driver, detaching\n");
|
||||
|
||||
@@ -1332,8 +1332,9 @@ static void aac_handle_aif(struct aac_dev * dev, struct fib * fibptr)
|
||||
ADD : DELETE;
|
||||
break;
|
||||
}
|
||||
case AifBuManagerEvent:
|
||||
aac_handle_aif_bu(dev, aifcmd);
|
||||
break;
|
||||
case AifBuManagerEvent:
|
||||
aac_handle_aif_bu(dev, aifcmd);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -1739,14 +1739,14 @@ void fc_lport_flogi_resp(struct fc_seq *sp, struct fc_frame *fp,
|
||||
fc_frame_payload_op(fp) != ELS_LS_ACC) {
|
||||
FC_LPORT_DBG(lport, "FLOGI not accepted or bad response\n");
|
||||
fc_lport_error(lport, fp);
|
||||
goto err;
|
||||
goto out;
|
||||
}
|
||||
|
||||
flp = fc_frame_payload_get(fp, sizeof(*flp));
|
||||
if (!flp) {
|
||||
FC_LPORT_DBG(lport, "FLOGI bad response\n");
|
||||
fc_lport_error(lport, fp);
|
||||
goto err;
|
||||
goto out;
|
||||
}
|
||||
|
||||
mfs = ntohs(flp->fl_csp.sp_bb_data) &
|
||||
@@ -1756,7 +1756,7 @@ void fc_lport_flogi_resp(struct fc_seq *sp, struct fc_frame *fp,
|
||||
FC_LPORT_DBG(lport, "FLOGI bad mfs:%hu response, "
|
||||
"lport->mfs:%hu\n", mfs, lport->mfs);
|
||||
fc_lport_error(lport, fp);
|
||||
goto err;
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (mfs <= lport->mfs) {
|
||||
|
||||
@@ -734,6 +734,7 @@ static blk_status_t __scsi_error_from_host_byte(struct scsi_cmnd *cmd,
|
||||
set_host_byte(cmd, DID_OK);
|
||||
return BLK_STS_TARGET;
|
||||
case DID_NEXUS_FAILURE:
|
||||
set_host_byte(cmd, DID_OK);
|
||||
return BLK_STS_NEXUS;
|
||||
case DID_ALLOC_FAILURE:
|
||||
set_host_byte(cmd, DID_OK);
|
||||
|
||||
@@ -1048,18 +1048,19 @@ static void qm_mr_process_task(struct work_struct *work);
|
||||
static irqreturn_t portal_isr(int irq, void *ptr)
|
||||
{
|
||||
struct qman_portal *p = ptr;
|
||||
|
||||
u32 clear = QM_DQAVAIL_MASK | p->irq_sources;
|
||||
u32 is = qm_in(&p->p, QM_REG_ISR) & p->irq_sources;
|
||||
u32 clear = 0;
|
||||
|
||||
if (unlikely(!is))
|
||||
return IRQ_NONE;
|
||||
|
||||
/* DQRR-handling if it's interrupt-driven */
|
||||
if (is & QM_PIRQ_DQRI)
|
||||
if (is & QM_PIRQ_DQRI) {
|
||||
__poll_portal_fast(p, QMAN_POLL_LIMIT);
|
||||
clear = QM_DQAVAIL_MASK | QM_PIRQ_DQRI;
|
||||
}
|
||||
/* Handling of anything else that's interrupt-driven */
|
||||
clear |= __poll_portal_slow(p, is);
|
||||
clear |= __poll_portal_slow(p, is) & QM_PIRQ_SLOW;
|
||||
qm_out(&p->p, QM_REG_ISR, clear);
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
@@ -298,10 +298,10 @@ static int ion_system_heap_create_pools(struct ion_page_pool **pools,
|
||||
bool cached)
|
||||
{
|
||||
int i;
|
||||
gfp_t gfp_flags = low_order_gfp_flags;
|
||||
|
||||
for (i = 0; i < NUM_ORDERS; i++) {
|
||||
struct ion_page_pool *pool;
|
||||
gfp_t gfp_flags = low_order_gfp_flags;
|
||||
|
||||
if (orders[i] > 4)
|
||||
gfp_flags = high_order_gfp_flags;
|
||||
|
||||
@@ -611,6 +611,7 @@ static int ni_660x_set_pfi_routing(struct comedi_device *dev,
|
||||
case NI_660X_PFI_OUTPUT_DIO:
|
||||
if (chan > 31)
|
||||
return -EINVAL;
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@@ -1238,8 +1238,8 @@ int wilc_netdev_init(struct wilc **wilc, struct device *dev, int io_type,
|
||||
vif->wilc = *wilc;
|
||||
vif->ndev = ndev;
|
||||
wl->vif[i] = vif;
|
||||
wl->vif_num = i;
|
||||
vif->idx = wl->vif_num;
|
||||
wl->vif_num = i + 1;
|
||||
vif->idx = i;
|
||||
|
||||
ndev->netdev_ops = &wilc_netdev_ops;
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ config AB8500_USB
|
||||
|
||||
config FSL_USB2_OTG
|
||||
bool "Freescale USB OTG Transceiver Driver"
|
||||
depends on USB_EHCI_FSL && USB_FSL_USB2 && USB_OTG_FSM && PM
|
||||
depends on USB_EHCI_FSL && USB_FSL_USB2 && USB_OTG_FSM=y && PM
|
||||
depends on USB_GADGET || !USB_GADGET # if USB_GADGET=m, this can't be 'y'
|
||||
select USB_PHY
|
||||
help
|
||||
|
||||
@@ -64,6 +64,7 @@ static const struct usb_device_id id_table[] = {
|
||||
{ USB_DEVICE(0x08e6, 0x5501) }, /* Gemalto Prox-PU/CU contactless smartcard reader */
|
||||
{ USB_DEVICE(0x08FD, 0x000A) }, /* Digianswer A/S , ZigBee/802.15.4 MAC Device */
|
||||
{ USB_DEVICE(0x0908, 0x01FF) }, /* Siemens RUGGEDCOM USB Serial Console */
|
||||
{ USB_DEVICE(0x0B00, 0x3070) }, /* Ingenico 3070 */
|
||||
{ USB_DEVICE(0x0BED, 0x1100) }, /* MEI (TM) Cashflow-SC Bill/Voucher Acceptor */
|
||||
{ USB_DEVICE(0x0BED, 0x1101) }, /* MEI series 2000 Combo Acceptor */
|
||||
{ USB_DEVICE(0x0FCF, 0x1003) }, /* Dynastream ANT development board */
|
||||
|
||||
@@ -1020,6 +1020,8 @@ static const struct usb_device_id id_table_combined[] = {
|
||||
{ USB_DEVICE(CYPRESS_VID, CYPRESS_WICED_BT_USB_PID) },
|
||||
{ USB_DEVICE(CYPRESS_VID, CYPRESS_WICED_WL_USB_PID) },
|
||||
{ USB_DEVICE(AIRBUS_DS_VID, AIRBUS_DS_P8GR) },
|
||||
/* EZPrototypes devices */
|
||||
{ USB_DEVICE(EZPROTOTYPES_VID, HJELMSLUND_USB485_ISO_PID) },
|
||||
{ } /* Terminating entry */
|
||||
};
|
||||
|
||||
|
||||
@@ -1308,6 +1308,12 @@
|
||||
#define IONICS_VID 0x1c0c
|
||||
#define IONICS_PLUGCOMPUTER_PID 0x0102
|
||||
|
||||
/*
|
||||
* EZPrototypes (PID reseller)
|
||||
*/
|
||||
#define EZPROTOTYPES_VID 0x1c40
|
||||
#define HJELMSLUND_USB485_ISO_PID 0x0477
|
||||
|
||||
/*
|
||||
* Dresden Elektronik Sensor Terminal Board
|
||||
*/
|
||||
|
||||
@@ -1151,6 +1151,8 @@ static const struct usb_device_id option_ids[] = {
|
||||
.driver_info = NCTRL(0) | RSVD(1) | RSVD(3) },
|
||||
{ USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_ME910_DUAL_MODEM),
|
||||
.driver_info = NCTRL(0) | RSVD(3) },
|
||||
{ USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1102, 0xff), /* Telit ME910 (ECM) */
|
||||
.driver_info = NCTRL(0) },
|
||||
{ USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE910),
|
||||
.driver_info = NCTRL(0) | RSVD(1) | RSVD(2) },
|
||||
{ USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE910_USBCFG4),
|
||||
|
||||
@@ -567,7 +567,6 @@ int autofs4_expire_run(struct super_block *sb,
|
||||
pkt.len = dentry->d_name.len;
|
||||
memcpy(pkt.name, dentry->d_name.name, pkt.len);
|
||||
pkt.name[pkt.len] = '\0';
|
||||
dput(dentry);
|
||||
|
||||
if (copy_to_user(pkt_p, &pkt, sizeof(struct autofs_packet_expire)))
|
||||
ret = -EFAULT;
|
||||
@@ -580,6 +579,8 @@ int autofs4_expire_run(struct super_block *sb,
|
||||
complete_all(&ino->expire_complete);
|
||||
spin_unlock(&sbi->fs_lock);
|
||||
|
||||
dput(dentry);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -259,8 +259,10 @@ int autofs4_fill_super(struct super_block *s, void *data, int silent)
|
||||
}
|
||||
root_inode = autofs4_get_inode(s, S_IFDIR | 0755);
|
||||
root = d_make_root(root_inode);
|
||||
if (!root)
|
||||
if (!root) {
|
||||
ret = -ENOMEM;
|
||||
goto fail_ino;
|
||||
}
|
||||
pipe = NULL;
|
||||
|
||||
root->d_fsdata = ino;
|
||||
|
||||
19
fs/buffer.c
19
fs/buffer.c
@@ -208,6 +208,7 @@ __find_get_block_slow(struct block_device *bdev, sector_t block)
|
||||
struct buffer_head *head;
|
||||
struct page *page;
|
||||
int all_mapped = 1;
|
||||
static DEFINE_RATELIMIT_STATE(last_warned, HZ, 1);
|
||||
|
||||
index = block >> (PAGE_SHIFT - bd_inode->i_blkbits);
|
||||
page = find_get_page_flags(bd_mapping, index, FGP_ACCESSED);
|
||||
@@ -235,15 +236,15 @@ __find_get_block_slow(struct block_device *bdev, sector_t block)
|
||||
* file io on the block device and getblk. It gets dealt with
|
||||
* elsewhere, don't buffer_error if we had some unmapped buffers
|
||||
*/
|
||||
if (all_mapped) {
|
||||
printk("__find_get_block_slow() failed. "
|
||||
"block=%llu, b_blocknr=%llu\n",
|
||||
(unsigned long long)block,
|
||||
(unsigned long long)bh->b_blocknr);
|
||||
printk("b_state=0x%08lx, b_size=%zu\n",
|
||||
bh->b_state, bh->b_size);
|
||||
printk("device %pg blocksize: %d\n", bdev,
|
||||
1 << bd_inode->i_blkbits);
|
||||
ratelimit_set_flags(&last_warned, RATELIMIT_MSG_ON_RELEASE);
|
||||
if (all_mapped && __ratelimit(&last_warned)) {
|
||||
printk("__find_get_block_slow() failed. block=%llu, "
|
||||
"b_blocknr=%llu, b_state=0x%08lx, b_size=%zu, "
|
||||
"device %pg blocksize: %d\n",
|
||||
(unsigned long long)block,
|
||||
(unsigned long long)bh->b_blocknr,
|
||||
bh->b_state, bh->b_size, bdev,
|
||||
1 << bd_inode->i_blkbits);
|
||||
}
|
||||
out_unlock:
|
||||
spin_unlock(&bd_mapping->private_lock);
|
||||
|
||||
@@ -84,8 +84,8 @@
|
||||
|
||||
#define NUMBER_OF_SMB2_COMMANDS 0x0013
|
||||
|
||||
/* 4 len + 52 transform hdr + 64 hdr + 56 create rsp */
|
||||
#define MAX_SMB2_HDR_SIZE 0x00b0
|
||||
/* 52 transform hdr + 64 hdr + 88 create rsp */
|
||||
#define MAX_SMB2_HDR_SIZE 204
|
||||
|
||||
#define SMB2_PROTO_NUMBER cpu_to_le32(0x424d53fe)
|
||||
#define SMB2_TRANSFORM_PROTO_NUM cpu_to_le32(0x424d53fd)
|
||||
|
||||
@@ -21,8 +21,13 @@ static void drop_pagecache_sb(struct super_block *sb, void *unused)
|
||||
spin_lock(&sb->s_inode_list_lock);
|
||||
list_for_each_entry(inode, &sb->s_inodes, i_sb_list) {
|
||||
spin_lock(&inode->i_lock);
|
||||
/*
|
||||
* We must skip inodes in unusual state. We may also skip
|
||||
* inodes without pages but we deliberately won't in case
|
||||
* we need to reschedule to avoid softlockups.
|
||||
*/
|
||||
if ((inode->i_state & (I_FREEING|I_WILL_FREE|I_NEW)) ||
|
||||
(inode->i_mapping->nrpages == 0)) {
|
||||
(inode->i_mapping->nrpages == 0 && !need_resched())) {
|
||||
spin_unlock(&inode->i_lock);
|
||||
continue;
|
||||
}
|
||||
@@ -30,6 +35,7 @@ static void drop_pagecache_sb(struct super_block *sb, void *unused)
|
||||
spin_unlock(&inode->i_lock);
|
||||
spin_unlock(&sb->s_inode_list_lock);
|
||||
|
||||
cond_resched();
|
||||
invalidate_mapping_pages(inode->i_mapping, 0, -1);
|
||||
iput(toput_inode);
|
||||
toput_inode = inode;
|
||||
|
||||
@@ -925,7 +925,7 @@ int kernel_read_file(struct file *file, void **buf, loff_t *size,
|
||||
bytes = kernel_read(file, *buf + pos, i_size - pos, &pos);
|
||||
if (bytes < 0) {
|
||||
ret = bytes;
|
||||
goto out;
|
||||
goto out_free;
|
||||
}
|
||||
|
||||
if (bytes == 0)
|
||||
|
||||
@@ -107,7 +107,7 @@ static int glock_wake_function(wait_queue_entry_t *wait, unsigned int mode,
|
||||
|
||||
static wait_queue_head_t *glock_waitqueue(struct lm_lockname *name)
|
||||
{
|
||||
u32 hash = jhash2((u32 *)name, sizeof(*name) / 4, 0);
|
||||
u32 hash = jhash2((u32 *)name, ht_parms.key_len / 4, 0);
|
||||
|
||||
return glock_wait_table + hash_32(hash, GLOCK_WAIT_TABLE_BITS);
|
||||
}
|
||||
|
||||
@@ -845,6 +845,18 @@ static int hugetlbfs_migrate_page(struct address_space *mapping,
|
||||
rc = migrate_huge_page_move_mapping(mapping, newpage, page);
|
||||
if (rc != MIGRATEPAGE_SUCCESS)
|
||||
return rc;
|
||||
|
||||
/*
|
||||
* page_private is subpool pointer in hugetlb pages. Transfer to
|
||||
* new page. PagePrivate is not associated with page_private for
|
||||
* hugetlb pages and can not be set here as only page_huge_active
|
||||
* pages can be migrated.
|
||||
*/
|
||||
if (page_private(page)) {
|
||||
set_page_private(newpage, page_private(page));
|
||||
set_page_private(page, 0);
|
||||
}
|
||||
|
||||
if (mode != MIGRATE_SYNC_NO_COPY)
|
||||
migrate_page_copy(newpage, page);
|
||||
else
|
||||
|
||||
@@ -1901,6 +1901,11 @@ static int nfs_parse_devname(const char *dev_name,
|
||||
size_t len;
|
||||
char *end;
|
||||
|
||||
if (unlikely(!dev_name || !*dev_name)) {
|
||||
dfprintk(MOUNT, "NFS: device name not specified\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* Is the host name protected with square brakcets? */
|
||||
if (*dev_name == '[') {
|
||||
end = strchr(++dev_name, ']');
|
||||
|
||||
@@ -45,6 +45,24 @@ static inline bool drm_arch_can_wc_memory(void)
|
||||
return false;
|
||||
#elif defined(CONFIG_MIPS) && defined(CONFIG_CPU_LOONGSON3)
|
||||
return false;
|
||||
#elif defined(CONFIG_ARM) || defined(CONFIG_ARM64)
|
||||
/*
|
||||
* The DRM driver stack is designed to work with cache coherent devices
|
||||
* only, but permits an optimization to be enabled in some cases, where
|
||||
* for some buffers, both the CPU and the GPU use uncached mappings,
|
||||
* removing the need for DMA snooping and allocation in the CPU caches.
|
||||
*
|
||||
* The use of uncached GPU mappings relies on the correct implementation
|
||||
* of the PCIe NoSnoop TLP attribute by the platform, otherwise the GPU
|
||||
* will use cached mappings nonetheless. On x86 platforms, this does not
|
||||
* seem to matter, as uncached CPU mappings will snoop the caches in any
|
||||
* case. However, on ARM and arm64, enabling this optimization on a
|
||||
* platform where NoSnoop is ignored results in loss of coherency, which
|
||||
* breaks correct operation of the device. Since we have no way of
|
||||
* detecting whether NoSnoop works or not, just disable this
|
||||
* optimization entirely for ARM and arm64.
|
||||
*/
|
||||
return false;
|
||||
#else
|
||||
return true;
|
||||
#endif
|
||||
|
||||
@@ -254,20 +254,12 @@ __ATTR(_name, 0644, show_##_name, store_##_name)
|
||||
static struct freq_attr _name = \
|
||||
__ATTR(_name, 0200, NULL, store_##_name)
|
||||
|
||||
struct global_attr {
|
||||
struct attribute attr;
|
||||
ssize_t (*show)(struct kobject *kobj,
|
||||
struct attribute *attr, char *buf);
|
||||
ssize_t (*store)(struct kobject *a, struct attribute *b,
|
||||
const char *c, size_t count);
|
||||
};
|
||||
|
||||
#define define_one_global_ro(_name) \
|
||||
static struct global_attr _name = \
|
||||
static struct kobj_attribute _name = \
|
||||
__ATTR(_name, 0444, show_##_name, NULL)
|
||||
|
||||
#define define_one_global_rw(_name) \
|
||||
static struct global_attr _name = \
|
||||
static struct kobj_attribute _name = \
|
||||
__ATTR(_name, 0644, show_##_name, store_##_name)
|
||||
|
||||
|
||||
|
||||
@@ -306,7 +306,7 @@
|
||||
#define GITS_TYPER_PLPIS (1UL << 0)
|
||||
#define GITS_TYPER_VLPIS (1UL << 1)
|
||||
#define GITS_TYPER_ITT_ENTRY_SIZE_SHIFT 4
|
||||
#define GITS_TYPER_ITT_ENTRY_SIZE(r) ((((r) >> GITS_TYPER_ITT_ENTRY_SIZE_SHIFT) & 0x1f) + 1)
|
||||
#define GITS_TYPER_ITT_ENTRY_SIZE(r) ((((r) >> GITS_TYPER_ITT_ENTRY_SIZE_SHIFT) & 0xf) + 1)
|
||||
#define GITS_TYPER_IDBITS_SHIFT 8
|
||||
#define GITS_TYPER_DEVBITS_SHIFT 13
|
||||
#define GITS_TYPER_DEVBITS(r) ((((r) >> GITS_TYPER_DEVBITS_SHIFT) & 0x1f) + 1)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user