Merge branch 'linux-4.19.y-st' into linux-4.19.y-cip
Brings the tree up-to-date with 5.4.295. Signed-off-by: Ulrich Hecht <uli@kernel.org>
This commit is contained in:
@@ -148,6 +148,8 @@
|
||||
/* MDIO */
|
||||
AM33XX_IOPAD(0x948, PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0) /* mdio_data.mdio_data */
|
||||
AM33XX_IOPAD(0x94c, PIN_OUTPUT_PULLUP | MUX_MODE0) /* mdio_clk.mdio_clk */
|
||||
/* Added to support GPIO controlled PHY reset */
|
||||
AM33XX_IOPAD(0x968, PIN_OUTPUT_PULLUP | MUX_MODE7)
|
||||
>;
|
||||
};
|
||||
|
||||
@@ -156,6 +158,8 @@
|
||||
/* MDIO reset value */
|
||||
AM33XX_IOPAD(0x948, PIN_INPUT_PULLDOWN | MUX_MODE7)
|
||||
AM33XX_IOPAD(0x94c, PIN_INPUT_PULLDOWN | MUX_MODE7)
|
||||
/* Added to support GPIO controlled PHY reset */
|
||||
AM33XX_IOPAD(0x968, PIN_INPUT_PULLDOWN | MUX_MODE7)
|
||||
>;
|
||||
};
|
||||
|
||||
@@ -379,7 +383,7 @@
|
||||
};
|
||||
|
||||
&cpsw_emac0 {
|
||||
phy_id = <&davinci_mdio>, <0>;
|
||||
phy-handle = <ðphy0>;
|
||||
phy-mode = "mii";
|
||||
};
|
||||
|
||||
@@ -396,6 +400,14 @@
|
||||
pinctrl-0 = <&davinci_mdio_default>;
|
||||
pinctrl-1 = <&davinci_mdio_sleep>;
|
||||
status = "okay";
|
||||
|
||||
ethphy0: ethernet-phy@0 {
|
||||
reg = <0>;
|
||||
/* Support GPIO reset on revision C3 boards */
|
||||
reset-gpios = <&gpio1 8 GPIO_ACTIVE_LOW>;
|
||||
reset-assert-us = <300>;
|
||||
reset-deassert-us = <50000>;
|
||||
};
|
||||
};
|
||||
|
||||
&mmc1 {
|
||||
|
||||
@@ -148,7 +148,7 @@
|
||||
nand@3 {
|
||||
reg = <0x3 0x0 0x800000>;
|
||||
rb-gpios = <&pioA 22 GPIO_ACTIVE_HIGH>;
|
||||
cs-gpios = <&pioA 15 GPIO_ACTIVE_HIGH>;
|
||||
cs-gpios = <&pioD 15 GPIO_ACTIVE_HIGH>;
|
||||
nand-bus-width = <8>;
|
||||
nand-ecc-mode = "soft";
|
||||
nand-on-flash-bbt;
|
||||
|
||||
@@ -205,12 +205,6 @@
|
||||
};
|
||||
};
|
||||
|
||||
sfpb_mutex: hwmutex {
|
||||
compatible = "qcom,sfpb-mutex";
|
||||
syscon = <&sfpb_wrapper_mutex 0x604 0x4>;
|
||||
#hwlock-cells = <1>;
|
||||
};
|
||||
|
||||
smem {
|
||||
compatible = "qcom,smem";
|
||||
memory-region = <&smem_region>;
|
||||
@@ -353,9 +347,10 @@
|
||||
pinctrl-0 = <&ps_hold>;
|
||||
};
|
||||
|
||||
sfpb_wrapper_mutex: syscon@1200000 {
|
||||
compatible = "syscon";
|
||||
reg = <0x01200000 0x8000>;
|
||||
sfpb_mutex: hwmutex@1200600 {
|
||||
compatible = "qcom,sfpb-mutex";
|
||||
reg = <0x01200600 0x100>;
|
||||
#hwlock-cells = <1>;
|
||||
};
|
||||
|
||||
intc: interrupt-controller@2000000 {
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
reg = <0x54400000 0x00040000>;
|
||||
clocks = <&tegra_car TEGRA114_CLK_DSIB>,
|
||||
<&tegra_car TEGRA114_CLK_DSIBLP>,
|
||||
<&tegra_car TEGRA114_CLK_PLL_D2_OUT0>;
|
||||
<&tegra_car TEGRA114_CLK_PLL_D_OUT0>;
|
||||
clock-names = "dsi", "lp", "parent";
|
||||
resets = <&tegra_car 82>;
|
||||
reset-names = "dsi";
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
nand@3 {
|
||||
reg = <0x3 0x0 0x800000>;
|
||||
rb-gpios = <&pioA 22 GPIO_ACTIVE_HIGH>;
|
||||
cs-gpios = <&pioA 15 GPIO_ACTIVE_HIGH>;
|
||||
cs-gpios = <&pioD 15 GPIO_ACTIVE_HIGH>;
|
||||
nand-bus-width = <8>;
|
||||
nand-ecc-mode = "soft";
|
||||
nand-on-flash-bbt;
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
};
|
||||
|
||||
spi0: spi@fffa4000 {
|
||||
cs-gpios = <&pioB 15 GPIO_ACTIVE_HIGH>;
|
||||
cs-gpios = <&pioA 5 GPIO_ACTIVE_LOW>;
|
||||
status = "okay";
|
||||
mtd_dataflash@0 {
|
||||
compatible = "atmel,at45", "atmel,dataflash";
|
||||
@@ -85,7 +85,7 @@
|
||||
nand@3 {
|
||||
reg = <0x3 0x0 0x800000>;
|
||||
rb-gpios = <&pioA 22 GPIO_ACTIVE_HIGH>;
|
||||
cs-gpios = <&pioA 15 GPIO_ACTIVE_HIGH>;
|
||||
cs-gpios = <&pioD 15 GPIO_ACTIVE_HIGH>;
|
||||
nand-bus-width = <8>;
|
||||
nand-ecc-mode = "soft";
|
||||
nand-on-flash-bbt;
|
||||
|
||||
@@ -51,6 +51,7 @@
|
||||
#define CLKDM_NO_AUTODEPS (1 << 4)
|
||||
#define CLKDM_ACTIVE_WITH_MPU (1 << 5)
|
||||
#define CLKDM_MISSING_IDLE_REPORTING (1 << 6)
|
||||
#define CLKDM_STANDBY_FORCE_WAKEUP BIT(7)
|
||||
|
||||
#define CLKDM_CAN_HWSUP (CLKDM_CAN_ENABLE_AUTO | CLKDM_CAN_DISABLE_AUTO)
|
||||
#define CLKDM_CAN_SWSUP (CLKDM_CAN_FORCE_SLEEP | CLKDM_CAN_FORCE_WAKEUP)
|
||||
|
||||
@@ -27,7 +27,7 @@ static struct clockdomain l4ls_am33xx_clkdm = {
|
||||
.pwrdm = { .name = "per_pwrdm" },
|
||||
.cm_inst = AM33XX_CM_PER_MOD,
|
||||
.clkdm_offs = AM33XX_CM_PER_L4LS_CLKSTCTRL_OFFSET,
|
||||
.flags = CLKDM_CAN_SWSUP,
|
||||
.flags = CLKDM_CAN_SWSUP | CLKDM_STANDBY_FORCE_WAKEUP,
|
||||
};
|
||||
|
||||
static struct clockdomain l3s_am33xx_clkdm = {
|
||||
|
||||
@@ -28,6 +28,9 @@
|
||||
#include "cm-regbits-34xx.h"
|
||||
#include "cm-regbits-33xx.h"
|
||||
#include "prm33xx.h"
|
||||
#if IS_ENABLED(CONFIG_SUSPEND)
|
||||
#include <linux/suspend.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* CLKCTRL_IDLEST_*: possible values for the CM_*_CLKCTRL.IDLEST bitfield:
|
||||
@@ -336,8 +339,17 @@ static int am33xx_clkdm_clk_disable(struct clockdomain *clkdm)
|
||||
{
|
||||
bool hwsup = false;
|
||||
|
||||
#if IS_ENABLED(CONFIG_SUSPEND)
|
||||
/*
|
||||
* In case of standby, Don't put the l4ls clk domain to sleep.
|
||||
* Since CM3 PM FW doesn't wake-up/enable the l4ls clk domain
|
||||
* upon wake-up, CM3 PM FW fails to wake-up th MPU.
|
||||
*/
|
||||
if (pm_suspend_target_state == PM_SUSPEND_STANDBY &&
|
||||
(clkdm->flags & CLKDM_STANDBY_FORCE_WAKEUP))
|
||||
return 0;
|
||||
#endif
|
||||
hwsup = am33xx_cm_is_clkdm_in_hwsup(clkdm->cm_inst, clkdm->clkdm_offs);
|
||||
|
||||
if (!hwsup && (clkdm->flags & CLKDM_CAN_FORCE_SLEEP))
|
||||
am33xx_clkdm_sleep(clkdm);
|
||||
|
||||
|
||||
@@ -246,14 +246,6 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb_host0_ehci {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb_host0_ohci {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&vopb {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -150,7 +150,7 @@ unsigned long regs_get_kernel_stack_nth(struct pt_regs *regs, unsigned int n)
|
||||
|
||||
addr += n;
|
||||
if (regs_within_kernel_stack(regs, (unsigned long)addr))
|
||||
return *addr;
|
||||
return READ_ONCE_NOCHECK(*addr);
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -502,7 +502,8 @@ in_ea:
|
||||
.section .fixup,"ax"
|
||||
.even
|
||||
1:
|
||||
jbra fpsp040_die
|
||||
jbsr fpsp040_die
|
||||
jbra .Lnotkern
|
||||
|
||||
.section __ex_table,"a"
|
||||
.align 4
|
||||
|
||||
@@ -1155,7 +1155,7 @@ asmlinkage void set_esp0(unsigned long ssp)
|
||||
*/
|
||||
asmlinkage void fpsp040_die(void)
|
||||
{
|
||||
do_exit(SIGSEGV);
|
||||
force_sigsegv(SIGSEGV, current);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_M68KFPU_EMU
|
||||
|
||||
@@ -807,7 +807,7 @@ static void __init mac_identify(void)
|
||||
}
|
||||
|
||||
macintosh_config = mac_data_table;
|
||||
for (m = macintosh_config; m->ident != -1; m++) {
|
||||
for (m = &mac_data_table[1]; m->ident != -1; m++) {
|
||||
if (m->ident == model) {
|
||||
macintosh_config = m;
|
||||
break;
|
||||
|
||||
@@ -106,7 +106,7 @@ endif
|
||||
# (specifically newer than 2.24.51.20140728) we then also need to explicitly
|
||||
# set ".set hardfloat" in all files which manipulate floating point registers.
|
||||
#
|
||||
ifneq ($(call as-option,-Wa$(comma)-msoft-float,),)
|
||||
ifneq ($(call cc-option,$(cflags-y) -Wa$(comma)-msoft-float,),)
|
||||
cflags-y += -DGAS_HAS_SET_HARDFLOAT -Wa,-msoft-float
|
||||
endif
|
||||
|
||||
|
||||
@@ -87,4 +87,20 @@ struct dyn_arch_ftrace {
|
||||
#endif /* CONFIG_DYNAMIC_FTRACE */
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* CONFIG_FUNCTION_TRACER */
|
||||
|
||||
#ifdef CONFIG_FTRACE_SYSCALLS
|
||||
#ifndef __ASSEMBLY__
|
||||
/*
|
||||
* Some syscall entry functions on mips start with "__sys_" (fork and clone,
|
||||
* for instance). We should also match the sys_ variant with those.
|
||||
*/
|
||||
#define ARCH_HAS_SYSCALL_MATCH_SYM_NAME
|
||||
static inline bool arch_syscall_match_sym_name(const char *sym,
|
||||
const char *name)
|
||||
{
|
||||
return !strcmp(sym, name) ||
|
||||
(!strncmp(sym, "__sys_", 6) && !strcmp(sym + 6, name + 4));
|
||||
}
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* CONFIG_FTRACE_SYSCALLS */
|
||||
#endif /* _ASM_MIPS_FTRACE_H */
|
||||
|
||||
@@ -70,7 +70,8 @@ static inline void instruction_pointer_set(struct pt_regs *regs,
|
||||
|
||||
/* Query offset/name of register from its name/offset */
|
||||
extern int regs_query_register_offset(const char *name);
|
||||
#define MAX_REG_OFFSET (offsetof(struct pt_regs, __last))
|
||||
#define MAX_REG_OFFSET \
|
||||
(offsetof(struct pt_regs, __last) - sizeof(unsigned long))
|
||||
|
||||
/**
|
||||
* regs_get_register() - get register value from its offset
|
||||
|
||||
@@ -60,10 +60,7 @@ static DEFINE_PER_CPU_ALIGNED(u32*, ready_count);
|
||||
/* Indicates online CPUs coupled with the current CPU */
|
||||
static DEFINE_PER_CPU_ALIGNED(cpumask_t, online_coupled);
|
||||
|
||||
/*
|
||||
* Used to synchronize entry to deep idle states. Actually per-core rather
|
||||
* than per-CPU.
|
||||
*/
|
||||
/* Used to synchronize entry to deep idle states */
|
||||
static DEFINE_PER_CPU_ALIGNED(atomic_t, pm_barrier);
|
||||
|
||||
/* Saved CPU state across the CPS_PM_POWER_GATED state */
|
||||
@@ -122,9 +119,10 @@ int cps_pm_enter_state(enum cps_pm_state state)
|
||||
cps_nc_entry_fn entry;
|
||||
struct core_boot_config *core_cfg;
|
||||
struct vpe_boot_config *vpe_cfg;
|
||||
atomic_t *barrier;
|
||||
|
||||
/* Check that there is an entry function for this state */
|
||||
entry = per_cpu(nc_asm_enter, core)[state];
|
||||
entry = per_cpu(nc_asm_enter, cpu)[state];
|
||||
if (!entry)
|
||||
return -EINVAL;
|
||||
|
||||
@@ -160,7 +158,7 @@ int cps_pm_enter_state(enum cps_pm_state state)
|
||||
smp_mb__after_atomic();
|
||||
|
||||
/* Create a non-coherent mapping of the core ready_count */
|
||||
core_ready_count = per_cpu(ready_count, core);
|
||||
core_ready_count = per_cpu(ready_count, cpu);
|
||||
nc_addr = kmap_noncoherent(virt_to_page(core_ready_count),
|
||||
(unsigned long)core_ready_count);
|
||||
nc_addr += ((unsigned long)core_ready_count & ~PAGE_MASK);
|
||||
@@ -168,7 +166,8 @@ int cps_pm_enter_state(enum cps_pm_state state)
|
||||
|
||||
/* Ensure ready_count is zero-initialised before the assembly runs */
|
||||
WRITE_ONCE(*nc_core_ready_count, 0);
|
||||
coupled_barrier(&per_cpu(pm_barrier, core), online);
|
||||
barrier = &per_cpu(pm_barrier, cpumask_first(&cpu_sibling_map[cpu]));
|
||||
coupled_barrier(barrier, online);
|
||||
|
||||
/* Run the generated entry code */
|
||||
left = entry(online, nc_core_ready_count);
|
||||
@@ -639,12 +638,14 @@ out_err:
|
||||
|
||||
static int cps_pm_online_cpu(unsigned int cpu)
|
||||
{
|
||||
enum cps_pm_state state;
|
||||
unsigned core = cpu_core(&cpu_data[cpu]);
|
||||
unsigned int sibling, core;
|
||||
void *entry_fn, *core_rc;
|
||||
enum cps_pm_state state;
|
||||
|
||||
core = cpu_core(&cpu_data[cpu]);
|
||||
|
||||
for (state = CPS_PM_NC_WAIT; state < CPS_PM_STATE_COUNT; state++) {
|
||||
if (per_cpu(nc_asm_enter, core)[state])
|
||||
if (per_cpu(nc_asm_enter, cpu)[state])
|
||||
continue;
|
||||
if (!test_bit(state, state_support))
|
||||
continue;
|
||||
@@ -656,16 +657,19 @@ static int cps_pm_online_cpu(unsigned int cpu)
|
||||
clear_bit(state, state_support);
|
||||
}
|
||||
|
||||
per_cpu(nc_asm_enter, core)[state] = entry_fn;
|
||||
for_each_cpu(sibling, &cpu_sibling_map[cpu])
|
||||
per_cpu(nc_asm_enter, sibling)[state] = entry_fn;
|
||||
}
|
||||
|
||||
if (!per_cpu(ready_count, core)) {
|
||||
if (!per_cpu(ready_count, cpu)) {
|
||||
core_rc = kmalloc(sizeof(u32), GFP_KERNEL);
|
||||
if (!core_rc) {
|
||||
pr_err("Failed allocate core %u ready_count\n", core);
|
||||
return -ENOMEM;
|
||||
}
|
||||
per_cpu(ready_count, core) = core_rc;
|
||||
|
||||
for_each_cpu(sibling, &cpu_sibling_map[cpu])
|
||||
per_cpu(ready_count, sibling) = core_rc;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -300,4 +300,20 @@ extern void __init mmu_init(void);
|
||||
extern void update_mmu_cache(struct vm_area_struct *vma,
|
||||
unsigned long address, pte_t *pte);
|
||||
|
||||
static inline int pte_same(pte_t pte_a, pte_t pte_b);
|
||||
|
||||
#define __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS
|
||||
static inline int ptep_set_access_flags(struct vm_area_struct *vma,
|
||||
unsigned long address, pte_t *ptep,
|
||||
pte_t entry, int dirty)
|
||||
{
|
||||
if (!pte_same(*ptep, entry))
|
||||
set_ptes(vma->vm_mm, address, ptep, entry, 1);
|
||||
/*
|
||||
* update_mmu_cache will unconditionally execute, handling both
|
||||
* the case that the PTE changed and the spurious fault case.
|
||||
*/
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif /* _ASM_NIOS2_PGTABLE_H */
|
||||
|
||||
@@ -19,6 +19,7 @@ KBUILD_CFLAGS += -fno-PIE -mno-space-regs -mdisable-fpregs -Os
|
||||
ifndef CONFIG_64BIT
|
||||
KBUILD_CFLAGS += -mfast-indirect-calls
|
||||
endif
|
||||
KBUILD_CFLAGS += -std=gnu11
|
||||
|
||||
OBJECTS += $(obj)/head.o $(obj)/real2.o $(obj)/firmware.o $(obj)/misc.o $(obj)/piggy.o
|
||||
|
||||
|
||||
@@ -1720,6 +1720,8 @@ int eeh_pe_configure(struct eeh_pe *pe)
|
||||
/* Invalid PE ? */
|
||||
if (!pe)
|
||||
return -ENODEV;
|
||||
else
|
||||
ret = eeh_ops->configure_bridge(pe);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -2792,11 +2792,11 @@ static void __init fixup_device_tree_pmac(void)
|
||||
char type[8];
|
||||
phandle node;
|
||||
|
||||
// Some pmacs are missing #size-cells on escc nodes
|
||||
// Some pmacs are missing #size-cells on escc or i2s nodes
|
||||
for (node = 0; prom_next_node(&node); ) {
|
||||
type[0] = '\0';
|
||||
prom_getprop(node, "device_type", type, sizeof(type));
|
||||
if (prom_strcmp(type, "escc"))
|
||||
if (prom_strcmp(type, "escc") && prom_strcmp(type, "i2s"))
|
||||
continue;
|
||||
|
||||
if (prom_getproplen(node, "#size-cells") != PROM_ERROR)
|
||||
|
||||
@@ -146,6 +146,7 @@ CLEAN_FILES += linux x.i gmon.out
|
||||
archclean:
|
||||
@find . \( -name '*.bb' -o -name '*.bbg' -o -name '*.da' \
|
||||
-o -name '*.gcov' \) -type f -print | xargs rm -f
|
||||
$(Q)$(MAKE) -f $(srctree)/Makefile ARCH=$(HEADER_ARCH) clean
|
||||
|
||||
# Generated files
|
||||
|
||||
|
||||
@@ -48,6 +48,7 @@ void __init mem_init(void)
|
||||
map_memory(brk_end, __pa(brk_end), uml_reserved - brk_end, 1, 1, 0);
|
||||
free_bootmem(__pa(brk_end), uml_reserved - brk_end);
|
||||
uml_reserved = brk_end;
|
||||
min_low_pfn = PFN_UP(__pa(uml_reserved));
|
||||
|
||||
/* this will put all low memory onto the freelists */
|
||||
free_all_bootmem();
|
||||
|
||||
@@ -39,7 +39,7 @@ KBUILD_CFLAGS += $(call cc-disable-warning, address-of-packed-member)
|
||||
KBUILD_CFLAGS += $(call cc-disable-warning, gnu)
|
||||
KBUILD_CFLAGS += -Wno-pointer-sign
|
||||
# Disable relocation relaxation in case the link is not PIE.
|
||||
KBUILD_CFLAGS += $(call as-option,-Wa$(comma)-mrelax-relocations=no)
|
||||
KBUILD_CFLAGS += $(call cc-option,-Wa$(comma)-mrelax-relocations=no)
|
||||
|
||||
KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__
|
||||
GCOV_PROFILE := n
|
||||
|
||||
@@ -59,6 +59,8 @@ int __register_nmi_handler(unsigned int, struct nmiaction *);
|
||||
|
||||
void unregister_nmi_handler(unsigned int, const char *);
|
||||
|
||||
void set_emergency_nmi_handler(unsigned int type, nmi_handler_t handler);
|
||||
|
||||
void stop_nmi(void);
|
||||
void restart_nmi(void);
|
||||
void local_touch_nmi(void);
|
||||
|
||||
@@ -870,17 +870,18 @@ void get_cpu_cap(struct cpuinfo_x86 *c)
|
||||
c->x86_capability[CPUID_D_1_EAX] = eax;
|
||||
}
|
||||
|
||||
/* AMD-defined flags: level 0x80000001 */
|
||||
/*
|
||||
* Check if extended CPUID leaves are implemented: Max extended
|
||||
* CPUID leaf must be in the 0x80000001-0x8000ffff range.
|
||||
*/
|
||||
eax = cpuid_eax(0x80000000);
|
||||
c->extended_cpuid_level = eax;
|
||||
c->extended_cpuid_level = ((eax & 0xffff0000) == 0x80000000) ? eax : 0;
|
||||
|
||||
if ((eax & 0xffff0000) == 0x80000000) {
|
||||
if (eax >= 0x80000001) {
|
||||
cpuid(0x80000001, &eax, &ebx, &ecx, &edx);
|
||||
if (c->extended_cpuid_level >= 0x80000001) {
|
||||
cpuid(0x80000001, &eax, &ebx, &ecx, &edx);
|
||||
|
||||
c->x86_capability[CPUID_8000_0001_ECX] = ecx;
|
||||
c->x86_capability[CPUID_8000_0001_EDX] = edx;
|
||||
}
|
||||
c->x86_capability[CPUID_8000_0001_ECX] = ecx;
|
||||
c->x86_capability[CPUID_8000_0001_EDX] = edx;
|
||||
}
|
||||
|
||||
if (c->extended_cpuid_level >= 0x80000007) {
|
||||
|
||||
@@ -349,7 +349,7 @@ static void get_fixed_ranges(mtrr_type *frs)
|
||||
|
||||
void mtrr_save_fixed_ranges(void *info)
|
||||
{
|
||||
if (boot_cpu_has(X86_FEATURE_MTRR))
|
||||
if (mtrr_state.have_fixed)
|
||||
get_fixed_ranges(mtrr_state.fixed_ranges);
|
||||
}
|
||||
|
||||
|
||||
@@ -39,8 +39,12 @@
|
||||
#define CREATE_TRACE_POINTS
|
||||
#include <trace/events/nmi.h>
|
||||
|
||||
/*
|
||||
* An emergency handler can be set in any context including NMI
|
||||
*/
|
||||
struct nmi_desc {
|
||||
raw_spinlock_t lock;
|
||||
nmi_handler_t emerg_handler;
|
||||
struct list_head head;
|
||||
};
|
||||
|
||||
@@ -122,9 +126,22 @@ static void nmi_check_duration(struct nmiaction *action, u64 duration)
|
||||
static int nmi_handle(unsigned int type, struct pt_regs *regs)
|
||||
{
|
||||
struct nmi_desc *desc = nmi_to_desc(type);
|
||||
nmi_handler_t ehandler;
|
||||
struct nmiaction *a;
|
||||
int handled=0;
|
||||
|
||||
/*
|
||||
* Call the emergency handler, if set
|
||||
*
|
||||
* In the case of crash_nmi_callback() emergency handler, it will
|
||||
* return in the case of the crashing CPU to enable it to complete
|
||||
* other necessary crashing actions ASAP. Other handlers in the
|
||||
* linked list won't need to be run.
|
||||
*/
|
||||
ehandler = desc->emerg_handler;
|
||||
if (ehandler)
|
||||
return ehandler(type, regs);
|
||||
|
||||
rcu_read_lock();
|
||||
|
||||
/*
|
||||
@@ -210,6 +227,31 @@ void unregister_nmi_handler(unsigned int type, const char *name)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(unregister_nmi_handler);
|
||||
|
||||
/**
|
||||
* set_emergency_nmi_handler - Set emergency handler
|
||||
* @type: NMI type
|
||||
* @handler: the emergency handler to be stored
|
||||
*
|
||||
* Set an emergency NMI handler which, if set, will preempt all the other
|
||||
* handlers in the linked list. If a NULL handler is passed in, it will clear
|
||||
* it. It is expected that concurrent calls to this function will not happen
|
||||
* or the system is screwed beyond repair.
|
||||
*/
|
||||
void set_emergency_nmi_handler(unsigned int type, nmi_handler_t handler)
|
||||
{
|
||||
struct nmi_desc *desc = nmi_to_desc(type);
|
||||
|
||||
if (WARN_ON_ONCE(desc->emerg_handler == handler))
|
||||
return;
|
||||
desc->emerg_handler = handler;
|
||||
|
||||
/*
|
||||
* Ensure the emergency handler is visible to other CPUs before
|
||||
* function return
|
||||
*/
|
||||
smp_wmb();
|
||||
}
|
||||
|
||||
static void
|
||||
pci_serr_error(unsigned char reason, struct pt_regs *regs)
|
||||
{
|
||||
|
||||
@@ -888,15 +888,11 @@ void nmi_shootdown_cpus(nmi_shootdown_cb callback)
|
||||
shootdown_callback = callback;
|
||||
|
||||
atomic_set(&waiting_for_crash_ipi, num_online_cpus() - 1);
|
||||
/* Would it be better to replace the trap vector here? */
|
||||
if (register_nmi_handler(NMI_LOCAL, crash_nmi_callback,
|
||||
NMI_FLAG_FIRST, "crash"))
|
||||
return; /* Return what? */
|
||||
|
||||
/*
|
||||
* Ensure the new callback function is set before sending
|
||||
* out the NMI
|
||||
* Set emergency handler to preempt other handlers.
|
||||
*/
|
||||
wmb();
|
||||
set_emergency_nmi_handler(NMI_LOCAL, crash_nmi_callback);
|
||||
|
||||
smp_send_nmi_allbutself();
|
||||
|
||||
|
||||
@@ -26,7 +26,6 @@ void get_regs_from_mc(struct uml_pt_regs *regs, mcontext_t *mc)
|
||||
COPY(RIP);
|
||||
COPY2(EFLAGS, EFL);
|
||||
COPY2(CS, CSGSFS);
|
||||
regs->gp[CS / sizeof(unsigned long)] &= 0xffff;
|
||||
regs->gp[CS / sizeof(unsigned long)] |= 3;
|
||||
regs->gp[SS / sizeof(unsigned long)] = mc->gregs[REG_CSGSFS] >> 48;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -267,10 +267,6 @@ static int hash_accept(struct socket *sock, struct socket *newsock, int flags,
|
||||
return err;
|
||||
|
||||
err = crypto_ahash_import(&ctx2->req, state);
|
||||
if (err) {
|
||||
sock_orphan(sk2);
|
||||
sock_put(sk2);
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -427,7 +427,7 @@ config ACPI_SBS
|
||||
the modules will be called sbs and sbshc.
|
||||
|
||||
config ACPI_HED
|
||||
tristate "Hardware Error Device"
|
||||
bool "Hardware Error Device"
|
||||
help
|
||||
This driver supports the Hardware Error Device (PNP0C33),
|
||||
which is used to report some hardware errors notified via
|
||||
|
||||
@@ -670,6 +670,8 @@ acpi_ds_create_operands(struct acpi_walk_state *walk_state,
|
||||
union acpi_parse_object *arguments[ACPI_OBJ_NUM_OPERANDS];
|
||||
u32 arg_count = 0;
|
||||
u32 index = walk_state->num_operands;
|
||||
u32 prev_num_operands = walk_state->num_operands;
|
||||
u32 new_num_operands;
|
||||
u32 i;
|
||||
|
||||
ACPI_FUNCTION_TRACE_PTR(ds_create_operands, first_arg);
|
||||
@@ -698,6 +700,7 @@ acpi_ds_create_operands(struct acpi_walk_state *walk_state,
|
||||
|
||||
/* Create the interpreter arguments, in reverse order */
|
||||
|
||||
new_num_operands = index;
|
||||
index--;
|
||||
for (i = 0; i < arg_count; i++) {
|
||||
arg = arguments[index];
|
||||
@@ -722,7 +725,11 @@ cleanup:
|
||||
* pop everything off of the operand stack and delete those
|
||||
* objects
|
||||
*/
|
||||
acpi_ds_obj_stack_pop_and_delete(arg_count, walk_state);
|
||||
walk_state->num_operands = i;
|
||||
acpi_ds_obj_stack_pop_and_delete(new_num_operands, walk_state);
|
||||
|
||||
/* Restore operand count */
|
||||
walk_state->num_operands = prev_num_operands;
|
||||
|
||||
ACPI_EXCEPTION((AE_INFO, status, "While creating Arg %u", index));
|
||||
return_ACPI_STATUS(status);
|
||||
|
||||
@@ -640,7 +640,8 @@ acpi_status
|
||||
acpi_ps_complete_final_op(struct acpi_walk_state *walk_state,
|
||||
union acpi_parse_object *op, acpi_status status)
|
||||
{
|
||||
acpi_status status2;
|
||||
acpi_status return_status = status;
|
||||
u8 ascending = TRUE;
|
||||
|
||||
ACPI_FUNCTION_TRACE_PTR(ps_complete_final_op, walk_state);
|
||||
|
||||
@@ -654,7 +655,7 @@ acpi_ps_complete_final_op(struct acpi_walk_state *walk_state,
|
||||
op));
|
||||
do {
|
||||
if (op) {
|
||||
if (walk_state->ascending_callback != NULL) {
|
||||
if (ascending && walk_state->ascending_callback != NULL) {
|
||||
walk_state->op = op;
|
||||
walk_state->op_info =
|
||||
acpi_ps_get_opcode_info(op->common.
|
||||
@@ -676,49 +677,26 @@ acpi_ps_complete_final_op(struct acpi_walk_state *walk_state,
|
||||
}
|
||||
|
||||
if (status == AE_CTRL_TERMINATE) {
|
||||
status = AE_OK;
|
||||
|
||||
/* Clean up */
|
||||
do {
|
||||
if (op) {
|
||||
status2 =
|
||||
acpi_ps_complete_this_op
|
||||
(walk_state, op);
|
||||
if (ACPI_FAILURE
|
||||
(status2)) {
|
||||
return_ACPI_STATUS
|
||||
(status2);
|
||||
}
|
||||
}
|
||||
|
||||
acpi_ps_pop_scope(&
|
||||
(walk_state->
|
||||
parser_state),
|
||||
&op,
|
||||
&walk_state->
|
||||
arg_types,
|
||||
&walk_state->
|
||||
arg_count);
|
||||
|
||||
} while (op);
|
||||
|
||||
return_ACPI_STATUS(status);
|
||||
ascending = FALSE;
|
||||
return_status = AE_CTRL_TERMINATE;
|
||||
}
|
||||
|
||||
else if (ACPI_FAILURE(status)) {
|
||||
|
||||
/* First error is most important */
|
||||
|
||||
(void)
|
||||
acpi_ps_complete_this_op(walk_state,
|
||||
op);
|
||||
return_ACPI_STATUS(status);
|
||||
ascending = FALSE;
|
||||
return_status = status;
|
||||
}
|
||||
}
|
||||
|
||||
status2 = acpi_ps_complete_this_op(walk_state, op);
|
||||
if (ACPI_FAILURE(status2)) {
|
||||
return_ACPI_STATUS(status2);
|
||||
status = acpi_ps_complete_this_op(walk_state, op);
|
||||
if (ACPI_FAILURE(status)) {
|
||||
ascending = FALSE;
|
||||
if (ACPI_SUCCESS(return_status) ||
|
||||
return_status == AE_CTRL_TERMINATE) {
|
||||
return_status = status;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -728,5 +706,5 @@ acpi_ps_complete_final_op(struct acpi_walk_state *walk_state,
|
||||
|
||||
} while (op);
|
||||
|
||||
return_ACPI_STATUS(status);
|
||||
return_ACPI_STATUS(return_status);
|
||||
}
|
||||
|
||||
@@ -279,10 +279,23 @@ static int acpi_battery_get_property(struct power_supply *psy,
|
||||
break;
|
||||
case POWER_SUPPLY_PROP_CURRENT_NOW:
|
||||
case POWER_SUPPLY_PROP_POWER_NOW:
|
||||
if (battery->rate_now == ACPI_BATTERY_VALUE_UNKNOWN)
|
||||
if (battery->rate_now == ACPI_BATTERY_VALUE_UNKNOWN) {
|
||||
ret = -ENODEV;
|
||||
else
|
||||
val->intval = battery->rate_now * 1000;
|
||||
break;
|
||||
}
|
||||
|
||||
val->intval = battery->rate_now * 1000;
|
||||
/*
|
||||
* When discharging, the current should be reported as a
|
||||
* negative number as per the power supply class interface
|
||||
* definition.
|
||||
*/
|
||||
if (psp == POWER_SUPPLY_PROP_CURRENT_NOW &&
|
||||
(battery->state & ACPI_BATTERY_STATE_DISCHARGING) &&
|
||||
acpi_battery_handle_discharging(battery)
|
||||
== POWER_SUPPLY_STATUS_DISCHARGING)
|
||||
val->intval = -val->intval;
|
||||
|
||||
break;
|
||||
case POWER_SUPPLY_PROP_CHARGE_FULL_DESIGN:
|
||||
case POWER_SUPPLY_PROP_ENERGY_FULL_DESIGN:
|
||||
|
||||
@@ -80,7 +80,12 @@ static struct acpi_driver acpi_hed_driver = {
|
||||
.notify = acpi_hed_notify,
|
||||
},
|
||||
};
|
||||
module_acpi_driver(acpi_hed_driver);
|
||||
|
||||
static int __init acpi_hed_driver_init(void)
|
||||
{
|
||||
return acpi_bus_register_driver(&acpi_hed_driver);
|
||||
}
|
||||
subsys_initcall(acpi_hed_driver_init);
|
||||
|
||||
ACPI_MODULE_NAME("hed");
|
||||
MODULE_AUTHOR("Huang Ying");
|
||||
|
||||
@@ -55,7 +55,6 @@ static struct acpi_osi_entry
|
||||
osi_setup_entries[OSI_STRING_ENTRIES_MAX] __initdata = {
|
||||
{"Module Device", true},
|
||||
{"Processor Device", true},
|
||||
{"3.0 _SCP Extensions", true},
|
||||
{"Processor Aggregator Device", true},
|
||||
/*
|
||||
* Linux-Dell-Video is used by BIOS to disable RTD3 for NVidia graphics
|
||||
|
||||
@@ -215,16 +215,18 @@ static int acpi_pptt_leaf_node(struct acpi_table_header *table_hdr,
|
||||
sizeof(struct acpi_table_pptt));
|
||||
proc_sz = sizeof(struct acpi_pptt_processor);
|
||||
|
||||
while ((unsigned long)entry + proc_sz < table_end) {
|
||||
/* ignore subtable types that are smaller than a processor node */
|
||||
while ((unsigned long)entry + proc_sz <= table_end) {
|
||||
cpu_node = (struct acpi_pptt_processor *)entry;
|
||||
|
||||
if (entry->type == ACPI_PPTT_TYPE_PROCESSOR &&
|
||||
cpu_node->parent == node_entry)
|
||||
return 0;
|
||||
if (entry->length == 0)
|
||||
return 0;
|
||||
|
||||
entry = ACPI_ADD_PTR(struct acpi_subtable_header, entry,
|
||||
entry->length);
|
||||
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
@@ -257,15 +259,18 @@ static struct acpi_pptt_processor *acpi_find_processor_node(struct acpi_table_he
|
||||
proc_sz = sizeof(struct acpi_pptt_processor);
|
||||
|
||||
/* find the processor structure associated with this cpuid */
|
||||
while ((unsigned long)entry + proc_sz < table_end) {
|
||||
while ((unsigned long)entry + proc_sz <= table_end) {
|
||||
cpu_node = (struct acpi_pptt_processor *)entry;
|
||||
|
||||
if (entry->length == 0) {
|
||||
pr_warn("Invalid zero length subtable\n");
|
||||
break;
|
||||
}
|
||||
/* entry->length may not equal proc_sz, revalidate the processor structure length */
|
||||
if (entry->type == ACPI_PPTT_TYPE_PROCESSOR &&
|
||||
acpi_cpu_id == cpu_node->acpi_processor_id &&
|
||||
(unsigned long)entry + entry->length <= table_end &&
|
||||
entry->length == proc_sz + cpu_node->number_of_priv_resources * sizeof(u32) &&
|
||||
acpi_pptt_leaf_node(table_hdr, cpu_node)) {
|
||||
return (struct acpi_pptt_processor *)entry;
|
||||
}
|
||||
|
||||
@@ -367,7 +367,8 @@ static unsigned long via_mode_filter(struct ata_device *dev, unsigned long mask)
|
||||
}
|
||||
|
||||
if (dev->class == ATA_DEV_ATAPI &&
|
||||
dmi_check_system(no_atapi_dma_dmi_table)) {
|
||||
(dmi_check_system(no_atapi_dma_dmi_table) ||
|
||||
config->id == PCI_DEVICE_ID_VIA_6415)) {
|
||||
ata_dev_warn(dev, "controller locks up on ATAPI DMA, forcing PIO\n");
|
||||
mask &= ATA_MASK_PIO;
|
||||
}
|
||||
|
||||
@@ -287,7 +287,9 @@ static int atmtcp_c_send(struct atm_vcc *vcc,struct sk_buff *skb)
|
||||
struct sk_buff *new_skb;
|
||||
int result = 0;
|
||||
|
||||
if (!skb->len) return 0;
|
||||
if (skb->len < sizeof(struct atmtcp_hdr))
|
||||
goto done;
|
||||
|
||||
dev = vcc->dev_data;
|
||||
hdr = (struct atmtcp_hdr *) skb->data;
|
||||
if (hdr->length == ATMTCP_HDR_MAGIC) {
|
||||
|
||||
@@ -655,8 +655,10 @@ int fsl_mc_device_add(struct fsl_mc_obj_desc *obj_desc,
|
||||
|
||||
error_cleanup_dev:
|
||||
kfree(mc_dev->regions);
|
||||
kfree(mc_bus);
|
||||
kfree(mc_dev);
|
||||
if (mc_bus)
|
||||
kfree(mc_bus);
|
||||
else
|
||||
kfree(mc_dev);
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
/**
|
||||
* Timeout in milliseconds to wait for the completion of an MC command
|
||||
*/
|
||||
#define MC_CMD_COMPLETION_TIMEOUT_MS 500
|
||||
#define MC_CMD_COMPLETION_TIMEOUT_MS 15000
|
||||
|
||||
/*
|
||||
* usleep_range() min and max values used to throttle down polling
|
||||
|
||||
@@ -437,6 +437,7 @@ static const char *const rk3036_critical_clocks[] __initconst = {
|
||||
"hclk_peri",
|
||||
"pclk_peri",
|
||||
"pclk_ddrupctl",
|
||||
"ddrphy",
|
||||
};
|
||||
|
||||
static void __init rk3036_clk_init(struct device_node *np)
|
||||
|
||||
@@ -2379,8 +2379,10 @@ int cpufreq_boost_trigger_state(int state)
|
||||
unsigned long flags;
|
||||
int ret = 0;
|
||||
|
||||
if (cpufreq_driver->boost_enabled == state)
|
||||
return 0;
|
||||
/*
|
||||
* Don't compare 'cpufreq_driver->boost_enabled' with 'state' here to
|
||||
* make sure all policies are in sync with global boost flag.
|
||||
*/
|
||||
|
||||
write_lock_irqsave(&cpufreq_driver_lock, flags);
|
||||
cpufreq_driver->boost_enabled = state;
|
||||
|
||||
@@ -267,8 +267,19 @@ again:
|
||||
* This can deal with workloads that have long pauses interspersed
|
||||
* with sporadic activity with a bunch of short pauses.
|
||||
*/
|
||||
if ((divisor * 4) <= INTERVALS * 3)
|
||||
if (divisor * 4 <= INTERVALS * 3) {
|
||||
/*
|
||||
* If there are sufficiently many data points still under
|
||||
* consideration after the outliers have been eliminated,
|
||||
* returning without a prediction would be a mistake because it
|
||||
* is likely that the next interval will not exceed the current
|
||||
* maximum, so return the latter in that case.
|
||||
*/
|
||||
if (divisor >= INTERVALS / 2)
|
||||
return max;
|
||||
|
||||
return UINT_MAX;
|
||||
}
|
||||
|
||||
thresh = max - 1;
|
||||
goto again;
|
||||
|
||||
@@ -462,6 +462,9 @@ static int mv_cesa_skcipher_queue_req(struct skcipher_request *req,
|
||||
struct mv_cesa_skcipher_req *creq = skcipher_request_ctx(req);
|
||||
struct mv_cesa_engine *engine;
|
||||
|
||||
if (!req->cryptlen)
|
||||
return 0;
|
||||
|
||||
ret = mv_cesa_skcipher_req_init(req, tmpl);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
@@ -634,7 +634,7 @@ static int mv_cesa_ahash_dma_req_init(struct ahash_request *req)
|
||||
if (ret)
|
||||
goto err_free_tdma;
|
||||
|
||||
if (iter.src.sg) {
|
||||
if (iter.base.len > iter.src.op_offset) {
|
||||
/*
|
||||
* Add all the new data, inserting an operation block and
|
||||
* launch command between each full SRAM block-worth of
|
||||
|
||||
@@ -113,7 +113,7 @@ static irqreturn_t altr_sdram_mc_err_handler(int irq, void *dev_id)
|
||||
if (status & priv->ecc_stat_ce_mask) {
|
||||
regmap_read(drvdata->mc_vbase, priv->ecc_saddr_offset,
|
||||
&err_addr);
|
||||
if (priv->ecc_uecnt_offset)
|
||||
if (priv->ecc_cecnt_offset)
|
||||
regmap_read(drvdata->mc_vbase, priv->ecc_cecnt_offset,
|
||||
&err_count);
|
||||
edac_mc_handle_error(HW_EVENT_ERR_CORRECTED, mci, err_count,
|
||||
@@ -1309,9 +1309,6 @@ altr_init_a10_ecc_block(struct device_node *np, u32 irq_mask,
|
||||
}
|
||||
}
|
||||
|
||||
/* Interrupt mode set to every SBERR */
|
||||
regmap_write(ecc_mgr_map, ALTR_A10_ECC_INTMODE_OFST,
|
||||
ALTR_A10_ECC_INTMODE);
|
||||
/* Enable ECC */
|
||||
ecc_set_bits(ecc_ctrl_en_mask, (ecc_block_base +
|
||||
ALTR_A10_ECC_CTRL_OFST));
|
||||
@@ -2169,6 +2166,10 @@ static int altr_edac_a10_probe(struct platform_device *pdev)
|
||||
return PTR_ERR(edac->ecc_mgr_map);
|
||||
}
|
||||
|
||||
/* Set irq mask for DDR SBE to avoid any pending irq before registration */
|
||||
regmap_write(edac->ecc_mgr_map, A10_SYSMGR_ECC_INTMASK_SET_OFST,
|
||||
(A10_SYSMGR_ECC_INTMASK_SDMMCB | A10_SYSMGR_ECC_INTMASK_DDR0));
|
||||
|
||||
edac->irq_chip.name = pdev->dev.of_node->name;
|
||||
edac->irq_chip.irq_mask = a10_eccmgr_irq_mask;
|
||||
edac->irq_chip.irq_unmask = a10_eccmgr_irq_unmask;
|
||||
|
||||
@@ -277,6 +277,8 @@ struct altr_sdram_mc_data {
|
||||
#define A10_SYSMGR_ECC_INTMASK_SET_OFST 0x94
|
||||
#define A10_SYSMGR_ECC_INTMASK_CLR_OFST 0x98
|
||||
#define A10_SYSMGR_ECC_INTMASK_OCRAM BIT(1)
|
||||
#define A10_SYSMGR_ECC_INTMASK_SDMMCB BIT(16)
|
||||
#define A10_SYSMGR_ECC_INTMASK_DDR0 BIT(17)
|
||||
|
||||
#define A10_SYSMGR_ECC_INTSTAT_SERR_OFST 0x9C
|
||||
#define A10_SYSMGR_ECC_INTSTAT_DERR_OFST 0xA0
|
||||
|
||||
@@ -377,10 +377,9 @@ static int ie31200_probe1(struct pci_dev *pdev, int dev_idx)
|
||||
int i, j, ret;
|
||||
struct mem_ctl_info *mci = NULL;
|
||||
struct edac_mc_layer layers[2];
|
||||
struct dimm_data dimm_info[IE31200_CHANNELS][IE31200_DIMMS_PER_CHANNEL];
|
||||
void __iomem *window;
|
||||
struct ie31200_priv *priv;
|
||||
u32 addr_decode, mad_offset;
|
||||
u32 addr_decode[IE31200_CHANNELS], mad_offset;
|
||||
|
||||
/*
|
||||
* Kaby Lake seems to work like Skylake. Please re-visit this logic
|
||||
@@ -438,19 +437,10 @@ static int ie31200_probe1(struct pci_dev *pdev, int dev_idx)
|
||||
mad_offset = IE31200_MAD_DIMM_0_OFFSET;
|
||||
}
|
||||
|
||||
/* populate DIMM info */
|
||||
for (i = 0; i < IE31200_CHANNELS; i++) {
|
||||
addr_decode = readl(window + mad_offset +
|
||||
addr_decode[i] = readl(window + mad_offset +
|
||||
(i * 4));
|
||||
edac_dbg(0, "addr_decode: 0x%x\n", addr_decode);
|
||||
for (j = 0; j < IE31200_DIMMS_PER_CHANNEL; j++) {
|
||||
populate_dimm_info(&dimm_info[i][j], addr_decode, j,
|
||||
skl);
|
||||
edac_dbg(0, "size: 0x%x, rank: %d, width: %d\n",
|
||||
dimm_info[i][j].size,
|
||||
dimm_info[i][j].dual_rank,
|
||||
dimm_info[i][j].x16_width);
|
||||
}
|
||||
edac_dbg(0, "addr_decode: 0x%x\n", addr_decode[i]);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -461,14 +451,22 @@ static int ie31200_probe1(struct pci_dev *pdev, int dev_idx)
|
||||
*/
|
||||
for (i = 0; i < IE31200_DIMMS_PER_CHANNEL; i++) {
|
||||
for (j = 0; j < IE31200_CHANNELS; j++) {
|
||||
struct dimm_data dimm_info;
|
||||
struct dimm_info *dimm;
|
||||
unsigned long nr_pages;
|
||||
|
||||
nr_pages = IE31200_PAGES(dimm_info[j][i].size, skl);
|
||||
populate_dimm_info(&dimm_info, addr_decode[j], i,
|
||||
skl);
|
||||
edac_dbg(0, "size: 0x%x, rank: %d, width: %d\n",
|
||||
dimm_info.size,
|
||||
dimm_info.dual_rank,
|
||||
dimm_info.x16_width);
|
||||
|
||||
nr_pages = IE31200_PAGES(dimm_info.size, skl);
|
||||
if (nr_pages == 0)
|
||||
continue;
|
||||
|
||||
if (dimm_info[j][i].dual_rank) {
|
||||
if (dimm_info.dual_rank) {
|
||||
nr_pages = nr_pages / 2;
|
||||
dimm = EDAC_DIMM_PTR(mci->layers, mci->dimms,
|
||||
mci->n_layers, (i * 2) + 1,
|
||||
|
||||
@@ -354,7 +354,7 @@ static void packet_empty_list(void)
|
||||
* zero out the RBU packet memory before freeing
|
||||
* to make sure there are no stale RBU packets left in memory
|
||||
*/
|
||||
memset(newpacket->data, 0, rbu_data.packetsize);
|
||||
memset(newpacket->data, 0, newpacket->length);
|
||||
set_memory_wb((unsigned long)newpacket->data,
|
||||
1 << newpacket->ordernum);
|
||||
free_pages((unsigned long) newpacket->data,
|
||||
|
||||
@@ -692,8 +692,10 @@ int __init psci_dt_init(void)
|
||||
|
||||
np = of_find_matching_node_and_match(NULL, psci_of_match, &matched_np);
|
||||
|
||||
if (!np || !of_device_is_available(np))
|
||||
if (!np || !of_device_is_available(np)) {
|
||||
of_node_put(np);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
init_fn = (psci_initcall_t)matched_np->data;
|
||||
return init_fn(np);
|
||||
|
||||
@@ -2920,8 +2920,6 @@ static void gfx_v6_0_get_csb_buffer(struct amdgpu_device *adev,
|
||||
buffer[count++] = cpu_to_le32(ext->reg_index - 0xa000);
|
||||
for (i = 0; i < ext->reg_count; i++)
|
||||
buffer[count++] = cpu_to_le32(ext->extent[i]);
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4069,8 +4069,6 @@ static void gfx_v7_0_get_csb_buffer(struct amdgpu_device *adev,
|
||||
buffer[count++] = cpu_to_le32(ext->reg_index - PACKET3_SET_CONTEXT_REG_START);
|
||||
for (i = 0; i < ext->reg_count; i++)
|
||||
buffer[count++] = cpu_to_le32(ext->extent[i]);
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1282,8 +1282,6 @@ static void gfx_v8_0_get_csb_buffer(struct amdgpu_device *adev,
|
||||
PACKET3_SET_CONTEXT_REG_START);
|
||||
for (i = 0; i < ext->reg_count; i++)
|
||||
buffer[count++] = cpu_to_le32(ext->extent[i]);
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -793,8 +793,6 @@ static void gfx_v9_0_get_csb_buffer(struct amdgpu_device *adev,
|
||||
PACKET3_SET_CONTEXT_REG_START);
|
||||
for (i = 0; i < ext->reg_count; i++)
|
||||
buffer[count++] = cpu_to_le32(ext->extent[i]);
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -369,6 +369,10 @@ static int update_mqd_sdma(struct mqd_manager *mm, void *mqd,
|
||||
m->sdma_engine_id = q->sdma_engine_id;
|
||||
m->sdma_queue_id = q->sdma_queue_id;
|
||||
m->sdmax_rlcx_dummy_reg = SDMA_RLC_DUMMY_DEFAULT;
|
||||
/* Allow context switch so we don't cross-process starve with a massive
|
||||
* command buffer of long-running SDMA commands
|
||||
*/
|
||||
m->sdmax_rlcx_ib_cntl |= SDMA0_GFX_IB_CNTL__SWITCH_INSIDE_IB_MASK;
|
||||
|
||||
q->is_active = (q->queue_size > 0 &&
|
||||
q->queue_address != 0 &&
|
||||
|
||||
@@ -4738,16 +4738,20 @@ static int dm_force_atomic_commit(struct drm_connector *connector)
|
||||
*/
|
||||
conn_state = drm_atomic_get_connector_state(state, connector);
|
||||
|
||||
ret = PTR_ERR_OR_ZERO(conn_state);
|
||||
if (ret)
|
||||
/* Check for error in getting connector state */
|
||||
if (IS_ERR(conn_state)) {
|
||||
ret = PTR_ERR(conn_state);
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* Attach crtc to drm_atomic_state*/
|
||||
crtc_state = drm_atomic_get_crtc_state(state, &disconnected_acrtc->base);
|
||||
|
||||
ret = PTR_ERR_OR_ZERO(crtc_state);
|
||||
if (ret)
|
||||
/* Check for error in getting crtc state */
|
||||
if (IS_ERR(crtc_state)) {
|
||||
ret = PTR_ERR(crtc_state);
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* force a restore */
|
||||
crtc_state->mode_changed = true;
|
||||
@@ -4755,9 +4759,11 @@ static int dm_force_atomic_commit(struct drm_connector *connector)
|
||||
/* Attach plane to drm_atomic_state */
|
||||
plane_state = drm_atomic_get_plane_state(state, plane);
|
||||
|
||||
ret = PTR_ERR_OR_ZERO(plane_state);
|
||||
if (ret)
|
||||
/* Check for error in getting plane state */
|
||||
if (IS_ERR(plane_state)) {
|
||||
ret = PTR_ERR(plane_state);
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* Call commit internally with the state we just constructed */
|
||||
ret = drm_atomic_commit(state);
|
||||
|
||||
@@ -536,6 +536,30 @@ mode_valid(struct drm_atomic_state *state)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int drm_atomic_check_valid_clones(struct drm_atomic_state *state,
|
||||
struct drm_crtc *crtc)
|
||||
{
|
||||
struct drm_encoder *drm_enc;
|
||||
struct drm_crtc_state *crtc_state = drm_atomic_get_new_crtc_state(state,
|
||||
crtc);
|
||||
|
||||
drm_for_each_encoder_mask(drm_enc, crtc->dev, crtc_state->encoder_mask) {
|
||||
if (!drm_enc->possible_clones) {
|
||||
DRM_DEBUG("enc%d possible_clones is 0\n", drm_enc->base.id);
|
||||
continue;
|
||||
}
|
||||
|
||||
if ((crtc_state->encoder_mask & drm_enc->possible_clones) !=
|
||||
crtc_state->encoder_mask) {
|
||||
DRM_DEBUG("crtc%d failed valid clone check for mask 0x%x\n",
|
||||
crtc->base.id, crtc_state->encoder_mask);
|
||||
return -EINVAL;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* drm_atomic_helper_check_modeset - validate state object for modeset changes
|
||||
* @dev: DRM device
|
||||
@@ -689,6 +713,10 @@ drm_atomic_helper_check_modeset(struct drm_device *dev,
|
||||
ret = drm_atomic_add_affected_planes(state, crtc);
|
||||
if (ret != 0)
|
||||
return ret;
|
||||
|
||||
ret = drm_atomic_check_valid_clones(state, crtc);
|
||||
if (ret != 0)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -224,7 +224,6 @@ int intel_vgpu_init_opregion(struct intel_vgpu *vgpu)
|
||||
u8 *buf;
|
||||
struct opregion_header *header;
|
||||
struct vbt v;
|
||||
const char opregion_signature[16] = OPREGION_SIGNATURE;
|
||||
|
||||
gvt_dbg_core("init vgpu%d opregion\n", vgpu->id);
|
||||
vgpu_opregion(vgpu)->va = (void *)__get_free_pages(GFP_KERNEL |
|
||||
@@ -238,8 +237,9 @@ int intel_vgpu_init_opregion(struct intel_vgpu *vgpu)
|
||||
/* emulated opregion with VBT mailbox only */
|
||||
buf = (u8 *)vgpu_opregion(vgpu)->va;
|
||||
header = (struct opregion_header *)buf;
|
||||
memcpy(header->signature, opregion_signature,
|
||||
sizeof(opregion_signature));
|
||||
|
||||
memcpy(header->signature, OPREGION_SIGNATURE, sizeof(header->signature));
|
||||
|
||||
header->size = 0x8;
|
||||
header->opregion_ver = 0x02000000;
|
||||
header->mboxes = MBOX_VBT;
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
#include "nouveau_encoder.h"
|
||||
|
||||
static struct ida bl_ida;
|
||||
#define BL_NAME_SIZE 15 // 12 for name + 2 for digits + 1 for '\0'
|
||||
#define BL_NAME_SIZE 24 // 12 for name + 11 for digits + 1 for '\0'
|
||||
|
||||
struct backlight_connector {
|
||||
struct list_head head;
|
||||
|
||||
@@ -489,7 +489,7 @@ static int rcar_du_vsps_init(struct rcar_du_device *rcdu)
|
||||
ret = of_parse_phandle_with_fixed_args(np, "vsps", cells, i,
|
||||
&args);
|
||||
if (ret < 0)
|
||||
goto error;
|
||||
goto done;
|
||||
|
||||
/*
|
||||
* Add the VSP to the list or update the corresponding existing
|
||||
@@ -523,13 +523,11 @@ static int rcar_du_vsps_init(struct rcar_du_device *rcdu)
|
||||
vsp->dev = rcdu;
|
||||
|
||||
ret = rcar_du_vsp_init(vsp, vsps[i].np, vsps[i].crtcs_mask);
|
||||
if (ret < 0)
|
||||
goto error;
|
||||
if (ret)
|
||||
goto done;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
error:
|
||||
done:
|
||||
for (i = 0; i < ARRAY_SIZE(vsps); ++i)
|
||||
of_node_put(vsps[i].np);
|
||||
|
||||
|
||||
@@ -214,6 +214,11 @@ static const struct drm_encoder_helper_funcs tegra_rgb_encoder_helper_funcs = {
|
||||
.atomic_check = tegra_rgb_encoder_atomic_check,
|
||||
};
|
||||
|
||||
static void tegra_dc_of_node_put(void *data)
|
||||
{
|
||||
of_node_put(data);
|
||||
}
|
||||
|
||||
int tegra_dc_rgb_probe(struct tegra_dc *dc)
|
||||
{
|
||||
struct device_node *np;
|
||||
@@ -221,7 +226,14 @@ int tegra_dc_rgb_probe(struct tegra_dc *dc)
|
||||
int err;
|
||||
|
||||
np = of_get_child_by_name(dc->dev->of_node, "rgb");
|
||||
if (!np || !of_device_is_available(np))
|
||||
if (!np)
|
||||
return -ENODEV;
|
||||
|
||||
err = devm_add_action_or_reset(dc->dev, tegra_dc_of_node_put, np);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
if (!of_device_is_available(np))
|
||||
return -ENODEV;
|
||||
|
||||
rgb = devm_kzalloc(dc->dev, sizeof(*rgb), GFP_KERNEL);
|
||||
|
||||
@@ -4082,6 +4082,23 @@ out_err:
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* DMA fence callback to remove a seqno_waiter
|
||||
*/
|
||||
struct seqno_waiter_rm_context {
|
||||
struct dma_fence_cb base;
|
||||
struct vmw_private *dev_priv;
|
||||
};
|
||||
|
||||
static void seqno_waiter_rm_cb(struct dma_fence *f, struct dma_fence_cb *cb)
|
||||
{
|
||||
struct seqno_waiter_rm_context *ctx =
|
||||
container_of(cb, struct seqno_waiter_rm_context, base);
|
||||
|
||||
vmw_seqno_waiter_remove(ctx->dev_priv);
|
||||
kfree(ctx);
|
||||
}
|
||||
|
||||
int vmw_execbuf_process(struct drm_file *file_priv,
|
||||
struct vmw_private *dev_priv,
|
||||
void __user *user_commands,
|
||||
@@ -4294,6 +4311,15 @@ int vmw_execbuf_process(struct drm_file *file_priv,
|
||||
} else {
|
||||
/* Link the fence with the FD created earlier */
|
||||
fd_install(out_fence_fd, sync_file->file);
|
||||
struct seqno_waiter_rm_context *ctx =
|
||||
kmalloc(sizeof(*ctx), GFP_KERNEL);
|
||||
ctx->dev_priv = dev_priv;
|
||||
vmw_seqno_waiter_add(dev_priv);
|
||||
if (dma_fence_add_callback(&fence->base, &ctx->base,
|
||||
seqno_waiter_rm_cb) < 0) {
|
||||
vmw_seqno_waiter_remove(dev_priv);
|
||||
kfree(ctx);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -205,7 +205,8 @@ static void mousevsc_on_receive_device_info(struct mousevsc_dev *input_device,
|
||||
if (!input_device->hid_desc)
|
||||
goto cleanup;
|
||||
|
||||
input_device->report_desc_size = desc->desc[0].wDescriptorLength;
|
||||
input_device->report_desc_size = le16_to_cpu(
|
||||
desc->rpt_desc.wDescriptorLength);
|
||||
if (input_device->report_desc_size == 0) {
|
||||
input_device->dev_info_status = -EINVAL;
|
||||
goto cleanup;
|
||||
@@ -221,7 +222,7 @@ static void mousevsc_on_receive_device_info(struct mousevsc_dev *input_device,
|
||||
|
||||
memcpy(input_device->report_desc,
|
||||
((unsigned char *)desc) + desc->bLength,
|
||||
desc->desc[0].wDescriptorLength);
|
||||
le16_to_cpu(desc->rpt_desc.wDescriptorLength));
|
||||
|
||||
/* Send the ack */
|
||||
memset(&ack, 0, sizeof(struct mousevsc_prt_msg));
|
||||
|
||||
@@ -43,6 +43,10 @@
|
||||
#define USB_VENDOR_ID_ACTIONSTAR 0x2101
|
||||
#define USB_DEVICE_ID_ACTIONSTAR_1011 0x1011
|
||||
|
||||
#define USB_VENDOR_ID_ADATA_XPG 0x125f
|
||||
#define USB_VENDOR_ID_ADATA_XPG_WL_GAMING_MOUSE 0x7505
|
||||
#define USB_VENDOR_ID_ADATA_XPG_WL_GAMING_MOUSE_DONGLE 0x7506
|
||||
|
||||
#define USB_VENDOR_ID_ADS_TECH 0x06e1
|
||||
#define USB_DEVICE_ID_ADS_TECH_RADIO_SI470X 0xa155
|
||||
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
static const struct hid_device_id hid_quirks[] = {
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_AASHIMA, USB_DEVICE_ID_AASHIMA_GAMEPAD), HID_QUIRK_BADPAD },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_AASHIMA, USB_DEVICE_ID_AASHIMA_PREDATOR), HID_QUIRK_BADPAD },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_ADATA_XPG, USB_VENDOR_ID_ADATA_XPG_WL_GAMING_MOUSE), HID_QUIRK_ALWAYS_POLL },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_ADATA_XPG, USB_VENDOR_ID_ADATA_XPG_WL_GAMING_MOUSE_DONGLE), HID_QUIRK_ALWAYS_POLL },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_AFATECH, USB_DEVICE_ID_AFATECH_AF9016), HID_QUIRK_FULLSPEED_INTERVAL },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_AIREN, USB_DEVICE_ID_AIREN_SLIMPLUS), HID_QUIRK_NOGET },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_AKAI_09E8, USB_DEVICE_ID_AKAI_09E8_MIDIMIX), HID_QUIRK_NO_INIT_REPORTS },
|
||||
|
||||
@@ -987,12 +987,11 @@ static int usbhid_parse(struct hid_device *hid)
|
||||
struct usb_host_interface *interface = intf->cur_altsetting;
|
||||
struct usb_device *dev = interface_to_usbdev (intf);
|
||||
struct hid_descriptor *hdesc;
|
||||
struct hid_class_descriptor *hcdesc;
|
||||
u32 quirks = 0;
|
||||
unsigned int rsize = 0;
|
||||
char *rdesc;
|
||||
int ret, n;
|
||||
int num_descriptors;
|
||||
size_t offset = offsetof(struct hid_descriptor, desc);
|
||||
int ret;
|
||||
|
||||
quirks = hid_lookup_quirk(hid);
|
||||
|
||||
@@ -1014,20 +1013,19 @@ static int usbhid_parse(struct hid_device *hid)
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
if (hdesc->bLength < sizeof(struct hid_descriptor)) {
|
||||
dbg_hid("hid descriptor is too short\n");
|
||||
if (!hdesc->bNumDescriptors ||
|
||||
hdesc->bLength != sizeof(*hdesc) +
|
||||
(hdesc->bNumDescriptors - 1) * sizeof(*hcdesc)) {
|
||||
dbg_hid("hid descriptor invalid, bLen=%hhu bNum=%hhu\n",
|
||||
hdesc->bLength, hdesc->bNumDescriptors);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
hid->version = le16_to_cpu(hdesc->bcdHID);
|
||||
hid->country = hdesc->bCountryCode;
|
||||
|
||||
num_descriptors = min_t(int, hdesc->bNumDescriptors,
|
||||
(hdesc->bLength - offset) / sizeof(struct hid_class_descriptor));
|
||||
|
||||
for (n = 0; n < num_descriptors; n++)
|
||||
if (hdesc->desc[n].bDescriptorType == HID_DT_REPORT)
|
||||
rsize = le16_to_cpu(hdesc->desc[n].wDescriptorLength);
|
||||
if (hdesc->rpt_desc.bDescriptorType == HID_DT_REPORT)
|
||||
rsize = le16_to_cpu(hdesc->rpt_desc.wDescriptorLength);
|
||||
|
||||
if (!rsize || rsize > HID_MAX_DESCRIPTOR_SIZE) {
|
||||
dbg_hid("weird size of report descriptor (%u)\n", rsize);
|
||||
@@ -1055,6 +1053,11 @@ static int usbhid_parse(struct hid_device *hid)
|
||||
goto err;
|
||||
}
|
||||
|
||||
if (hdesc->bNumDescriptors > 1)
|
||||
hid_warn(intf,
|
||||
"%u unsupported optional hid class descriptors\n",
|
||||
(int)(hdesc->bNumDescriptors - 1));
|
||||
|
||||
hid->quirks |= quirks;
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -172,7 +172,7 @@ static int usb_kbd_event(struct input_dev *dev, unsigned int type,
|
||||
return -1;
|
||||
|
||||
spin_lock_irqsave(&kbd->leds_lock, flags);
|
||||
kbd->newleds = (!!test_bit(LED_KANA, dev->led) << 3) | (!!test_bit(LED_COMPOSE, dev->led) << 3) |
|
||||
kbd->newleds = (!!test_bit(LED_KANA, dev->led) << 4) | (!!test_bit(LED_COMPOSE, dev->led) << 3) |
|
||||
(!!test_bit(LED_SCROLLL, dev->led) << 2) | (!!test_bit(LED_CAPSL, dev->led) << 1) |
|
||||
(!!test_bit(LED_NUML, dev->led));
|
||||
|
||||
|
||||
@@ -407,7 +407,12 @@ static int gpio_fan_set_cur_state(struct thermal_cooling_device *cdev,
|
||||
if (state >= fan_data->num_speed)
|
||||
return -EINVAL;
|
||||
|
||||
mutex_lock(&fan_data->lock);
|
||||
|
||||
set_fan_speed(fan_data, state);
|
||||
|
||||
mutex_unlock(&fan_data->lock);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -563,8 +568,11 @@ static int gpio_fan_remove(struct platform_device *pdev)
|
||||
if (!IS_ERR(fan_data->cdev))
|
||||
thermal_cooling_device_unregister(fan_data->cdev);
|
||||
|
||||
if (fan_data->gpios)
|
||||
if (fan_data->gpios) {
|
||||
mutex_lock(&fan_data->lock);
|
||||
set_fan_speed(fan_data, 0);
|
||||
mutex_unlock(&fan_data->lock);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -581,7 +589,9 @@ static int gpio_fan_suspend(struct device *dev)
|
||||
|
||||
if (fan_data->gpios) {
|
||||
fan_data->resume_speed = fan_data->speed_index;
|
||||
mutex_lock(&fan_data->lock);
|
||||
set_fan_speed(fan_data, 0);
|
||||
mutex_unlock(&fan_data->lock);
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -591,8 +601,11 @@ static int gpio_fan_resume(struct device *dev)
|
||||
{
|
||||
struct gpio_fan_data *fan_data = dev_get_drvdata(dev);
|
||||
|
||||
if (fan_data->gpios)
|
||||
if (fan_data->gpios) {
|
||||
mutex_lock(&fan_data->lock);
|
||||
set_fan_speed(fan_data, fan_data->resume_speed);
|
||||
mutex_unlock(&fan_data->lock);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -122,7 +122,7 @@ struct xgene_hwmon_dev {
|
||||
|
||||
phys_addr_t comm_base_addr;
|
||||
void *pcc_comm_addr;
|
||||
u64 usecs_lat;
|
||||
unsigned int usecs_lat;
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
@@ -96,7 +96,7 @@ static int i2c_dw_unreg_slave(struct i2c_client *slave)
|
||||
dev->disable(dev);
|
||||
synchronize_irq(dev->irq);
|
||||
dev->slave = NULL;
|
||||
pm_runtime_put(dev->dev);
|
||||
pm_runtime_put_sync_suspend(dev->dev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -626,9 +626,9 @@ static int lpi2c_imx_probe(struct platform_device *pdev)
|
||||
return 0;
|
||||
|
||||
rpm_disable:
|
||||
pm_runtime_put(&pdev->dev);
|
||||
pm_runtime_disable(&pdev->dev);
|
||||
pm_runtime_dont_use_autosuspend(&pdev->dev);
|
||||
pm_runtime_put_sync(&pdev->dev);
|
||||
pm_runtime_disable(&pdev->dev);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -1287,7 +1287,10 @@ static int i2c_pxa_probe(struct platform_device *dev)
|
||||
i2c->adap.name);
|
||||
}
|
||||
|
||||
clk_prepare_enable(i2c->clk);
|
||||
ret = clk_prepare_enable(i2c->clk);
|
||||
if (ret)
|
||||
return dev_err_probe(&dev->dev, ret,
|
||||
"failed to enable clock\n");
|
||||
|
||||
if (i2c->use_pio) {
|
||||
i2c->adap.algo = &i2c_pxa_pio_algorithm;
|
||||
|
||||
@@ -215,9 +215,9 @@ static const struct iio_chan_spec adis16201_channels[] = {
|
||||
BIT(IIO_CHAN_INFO_CALIBBIAS), 0, 14),
|
||||
ADIS_AUX_ADC_CHAN(ADIS16201_AUX_ADC_REG, ADIS16201_SCAN_AUX_ADC, 0, 12),
|
||||
ADIS_INCLI_CHAN(X, ADIS16201_XINCL_OUT_REG, ADIS16201_SCAN_INCLI_X,
|
||||
BIT(IIO_CHAN_INFO_CALIBBIAS), 0, 14),
|
||||
BIT(IIO_CHAN_INFO_CALIBBIAS), 0, 12),
|
||||
ADIS_INCLI_CHAN(Y, ADIS16201_YINCL_OUT_REG, ADIS16201_SCAN_INCLI_Y,
|
||||
BIT(IIO_CHAN_INFO_CALIBBIAS), 0, 14),
|
||||
BIT(IIO_CHAN_INFO_CALIBBIAS), 0, 12),
|
||||
IIO_CHAN_SOFT_TIMESTAMP(7)
|
||||
};
|
||||
|
||||
|
||||
@@ -486,7 +486,7 @@ static irqreturn_t dln2_adc_trigger_h(int irq, void *p)
|
||||
struct iio_dev *indio_dev = pf->indio_dev;
|
||||
struct {
|
||||
__le16 values[DLN2_ADC_MAX_CHANNELS];
|
||||
int64_t timestamp_space;
|
||||
aligned_s64 timestamp_space;
|
||||
} data;
|
||||
struct dln2_adc_get_all_vals dev_data;
|
||||
struct dln2_adc *dln2 = iio_priv(indio_dev);
|
||||
|
||||
@@ -306,6 +306,9 @@ static int st_lsm6dsx_read_fifo(struct st_lsm6dsx_hw *hw)
|
||||
if (fifo_status & cpu_to_le16(ST_LSM6DSX_FIFO_EMPTY_MASK))
|
||||
return 0;
|
||||
|
||||
if (!pattern_len)
|
||||
pattern_len = ST_LSM6DSX_SAMPLE_SIZE;
|
||||
|
||||
fifo_len = (le16_to_cpu(fifo_status) & fifo_diff_mask) *
|
||||
ST_LSM6DSX_CHAN_SIZE;
|
||||
fifo_len = (fifo_len / pattern_len) * pattern_len;
|
||||
|
||||
@@ -96,11 +96,8 @@ int rxe_cq_from_init(struct rxe_dev *rxe, struct rxe_cq *cq, int cqe,
|
||||
|
||||
err = do_mmap_info(rxe, uresp ? &uresp->mi : NULL, context,
|
||||
cq->queue->buf, cq->queue->buf_size, &cq->queue->ip);
|
||||
if (err) {
|
||||
vfree(cq->queue->buf);
|
||||
kfree(cq->queue);
|
||||
if (err)
|
||||
return err;
|
||||
}
|
||||
|
||||
if (uresp)
|
||||
cq->is_user = 1;
|
||||
|
||||
@@ -850,6 +850,12 @@ static int ims_pcu_flash_firmware(struct ims_pcu *pcu,
|
||||
addr = be32_to_cpu(rec->addr) / 2;
|
||||
len = be16_to_cpu(rec->len);
|
||||
|
||||
if (len > sizeof(pcu->cmd_buf) - 1 - sizeof(*fragment)) {
|
||||
dev_err(pcu->dev,
|
||||
"Invalid record length in firmware: %d\n", len);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
fragment = (void *)&pcu->cmd_buf[1];
|
||||
put_unaligned_le32(addr, &fragment->addr);
|
||||
fragment->len = len;
|
||||
|
||||
@@ -73,9 +73,14 @@ static int bbc_spkr_event(struct input_dev *dev, unsigned int type, unsigned int
|
||||
return -1;
|
||||
|
||||
switch (code) {
|
||||
case SND_BELL: if (value) value = 1000;
|
||||
case SND_TONE: break;
|
||||
default: return -1;
|
||||
case SND_BELL:
|
||||
if (value)
|
||||
value = 1000;
|
||||
break;
|
||||
case SND_TONE:
|
||||
break;
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (value > 20 && value < 32767)
|
||||
@@ -111,9 +116,14 @@ static int grover_spkr_event(struct input_dev *dev, unsigned int type, unsigned
|
||||
return -1;
|
||||
|
||||
switch (code) {
|
||||
case SND_BELL: if (value) value = 1000;
|
||||
case SND_TONE: break;
|
||||
default: return -1;
|
||||
case SND_BELL:
|
||||
if (value)
|
||||
value = 1000;
|
||||
break;
|
||||
case SND_TONE:
|
||||
break;
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (value > 20 && value < 32767)
|
||||
|
||||
@@ -166,6 +166,7 @@ static const char * const topbuttonpad_pnp_ids[] = {
|
||||
|
||||
static const char * const smbus_pnp_ids[] = {
|
||||
/* all of the topbuttonpad_pnp_ids are valid, we just add some extras */
|
||||
"DLL060d", /* Dell Precision M3800 */
|
||||
"LEN0048", /* X1 Carbon 3 */
|
||||
"LEN0046", /* X250 */
|
||||
"LEN0049", /* Yoga 11e */
|
||||
@@ -188,10 +189,14 @@ static const char * const smbus_pnp_ids[] = {
|
||||
"LEN2044", /* L470 */
|
||||
"LEN2054", /* E480 */
|
||||
"LEN2055", /* E580 */
|
||||
"SYN1221", /* TUXEDO InfinityBook Pro 14 v5 */
|
||||
"SYN3003", /* HP EliteBook 850 G1 */
|
||||
"SYN3052", /* HP EliteBook 840 G4 */
|
||||
"SYN3221", /* HP 15-ay000 */
|
||||
"SYN323d", /* HP Spectre X360 13-w013dx */
|
||||
"SYN3257", /* HP Envy 13-ad105ng */
|
||||
"TOS01f6", /* Dynabook Portege X30L-G */
|
||||
"TOS0213", /* Dynabook Portege X30-D */
|
||||
NULL
|
||||
};
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
* the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#include "linux/device.h"
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/rmi.h>
|
||||
#include <linux/firmware.h>
|
||||
@@ -301,39 +302,30 @@ out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int rmi_f34_status(struct rmi_function *fn)
|
||||
{
|
||||
struct f34_data *f34 = dev_get_drvdata(&fn->dev);
|
||||
|
||||
/*
|
||||
* The status is the percentage complete, or once complete,
|
||||
* zero for success or a negative return code.
|
||||
*/
|
||||
return f34->update_status;
|
||||
}
|
||||
|
||||
static ssize_t rmi_driver_bootloader_id_show(struct device *dev,
|
||||
struct device_attribute *dattr,
|
||||
char *buf)
|
||||
{
|
||||
struct rmi_driver_data *data = dev_get_drvdata(dev);
|
||||
struct rmi_function *fn = data->f34_container;
|
||||
struct rmi_function *fn;
|
||||
struct f34_data *f34;
|
||||
|
||||
if (fn) {
|
||||
f34 = dev_get_drvdata(&fn->dev);
|
||||
fn = data->f34_container;
|
||||
if (!fn)
|
||||
return -ENODEV;
|
||||
|
||||
if (f34->bl_version == 5)
|
||||
return scnprintf(buf, PAGE_SIZE, "%c%c\n",
|
||||
f34->bootloader_id[0],
|
||||
f34->bootloader_id[1]);
|
||||
else
|
||||
return scnprintf(buf, PAGE_SIZE, "V%d.%d\n",
|
||||
f34->bootloader_id[1],
|
||||
f34->bootloader_id[0]);
|
||||
}
|
||||
f34 = dev_get_drvdata(&fn->dev);
|
||||
if (!f34)
|
||||
return -ENODEV;
|
||||
|
||||
return 0;
|
||||
if (f34->bl_version == 5)
|
||||
return sysfs_emit(buf, "%c%c\n",
|
||||
f34->bootloader_id[0],
|
||||
f34->bootloader_id[1]);
|
||||
else
|
||||
return sysfs_emit(buf, "V%d.%d\n",
|
||||
f34->bootloader_id[1],
|
||||
f34->bootloader_id[0]);
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(bootloader_id, 0444, rmi_driver_bootloader_id_show, NULL);
|
||||
@@ -346,13 +338,16 @@ static ssize_t rmi_driver_configuration_id_show(struct device *dev,
|
||||
struct rmi_function *fn = data->f34_container;
|
||||
struct f34_data *f34;
|
||||
|
||||
if (fn) {
|
||||
f34 = dev_get_drvdata(&fn->dev);
|
||||
fn = data->f34_container;
|
||||
if (!fn)
|
||||
return -ENODEV;
|
||||
|
||||
return scnprintf(buf, PAGE_SIZE, "%s\n", f34->configuration_id);
|
||||
}
|
||||
f34 = dev_get_drvdata(&fn->dev);
|
||||
if (!f34)
|
||||
return -ENODEV;
|
||||
|
||||
return 0;
|
||||
|
||||
return sysfs_emit(buf, "%s\n", f34->configuration_id);
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(configuration_id, 0444,
|
||||
@@ -368,10 +363,14 @@ static int rmi_firmware_update(struct rmi_driver_data *data,
|
||||
|
||||
if (!data->f34_container) {
|
||||
dev_warn(dev, "%s: No F34 present!\n", __func__);
|
||||
return -EINVAL;
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
f34 = dev_get_drvdata(&data->f34_container->dev);
|
||||
if (!f34) {
|
||||
dev_warn(dev, "%s: No valid F34 present!\n", __func__);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
if (f34->bl_version == 7) {
|
||||
if (data->pdt_props & HAS_BSR) {
|
||||
@@ -497,12 +496,20 @@ static ssize_t rmi_driver_update_fw_status_show(struct device *dev,
|
||||
char *buf)
|
||||
{
|
||||
struct rmi_driver_data *data = dev_get_drvdata(dev);
|
||||
int update_status = 0;
|
||||
struct f34_data *f34;
|
||||
int update_status = -ENODEV;
|
||||
|
||||
if (data->f34_container)
|
||||
update_status = rmi_f34_status(data->f34_container);
|
||||
/*
|
||||
* The status is the percentage complete, or once complete,
|
||||
* zero for success or a negative return code.
|
||||
*/
|
||||
if (data->f34_container) {
|
||||
f34 = dev_get_drvdata(&data->f34_container->dev);
|
||||
if (f34)
|
||||
update_status = f34->update_status;
|
||||
}
|
||||
|
||||
return scnprintf(buf, PAGE_SIZE, "%d\n", update_status);
|
||||
return sysfs_emit(buf, "%d\n", update_status);
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(update_fw_status, 0444,
|
||||
@@ -520,33 +527,21 @@ static const struct attribute_group rmi_firmware_attr_group = {
|
||||
.attrs = rmi_firmware_attrs,
|
||||
};
|
||||
|
||||
static int rmi_f34_probe(struct rmi_function *fn)
|
||||
static int rmi_f34v5_probe(struct f34_data *f34)
|
||||
{
|
||||
struct f34_data *f34;
|
||||
unsigned char f34_queries[9];
|
||||
struct rmi_function *fn = f34->fn;
|
||||
u8 f34_queries[9];
|
||||
bool has_config_id;
|
||||
u8 version = fn->fd.function_version;
|
||||
int ret;
|
||||
|
||||
f34 = devm_kzalloc(&fn->dev, sizeof(struct f34_data), GFP_KERNEL);
|
||||
if (!f34)
|
||||
return -ENOMEM;
|
||||
|
||||
f34->fn = fn;
|
||||
dev_set_drvdata(&fn->dev, f34);
|
||||
|
||||
/* v5 code only supported version 0, try V7 probe */
|
||||
if (version > 0)
|
||||
return rmi_f34v7_probe(f34);
|
||||
int error;
|
||||
|
||||
f34->bl_version = 5;
|
||||
|
||||
ret = rmi_read_block(fn->rmi_dev, fn->fd.query_base_addr,
|
||||
f34_queries, sizeof(f34_queries));
|
||||
if (ret) {
|
||||
error = rmi_read_block(fn->rmi_dev, fn->fd.query_base_addr,
|
||||
f34_queries, sizeof(f34_queries));
|
||||
if (error) {
|
||||
dev_err(&fn->dev, "%s: Failed to query properties\n",
|
||||
__func__);
|
||||
return ret;
|
||||
return error;
|
||||
}
|
||||
|
||||
snprintf(f34->bootloader_id, sizeof(f34->bootloader_id),
|
||||
@@ -572,11 +567,11 @@ static int rmi_f34_probe(struct rmi_function *fn)
|
||||
f34->v5.config_blocks);
|
||||
|
||||
if (has_config_id) {
|
||||
ret = rmi_read_block(fn->rmi_dev, fn->fd.control_base_addr,
|
||||
f34_queries, sizeof(f34_queries));
|
||||
if (ret) {
|
||||
error = rmi_read_block(fn->rmi_dev, fn->fd.control_base_addr,
|
||||
f34_queries, sizeof(f34_queries));
|
||||
if (error) {
|
||||
dev_err(&fn->dev, "Failed to read F34 config ID\n");
|
||||
return ret;
|
||||
return error;
|
||||
}
|
||||
|
||||
snprintf(f34->configuration_id, sizeof(f34->configuration_id),
|
||||
@@ -585,12 +580,34 @@ static int rmi_f34_probe(struct rmi_function *fn)
|
||||
f34_queries[2], f34_queries[3]);
|
||||
|
||||
rmi_dbg(RMI_DEBUG_FN, &fn->dev, "Configuration ID: %s\n",
|
||||
f34->configuration_id);
|
||||
f34->configuration_id);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int rmi_f34_probe(struct rmi_function *fn)
|
||||
{
|
||||
struct f34_data *f34;
|
||||
u8 version = fn->fd.function_version;
|
||||
int error;
|
||||
|
||||
f34 = devm_kzalloc(&fn->dev, sizeof(struct f34_data), GFP_KERNEL);
|
||||
if (!f34)
|
||||
return -ENOMEM;
|
||||
|
||||
f34->fn = fn;
|
||||
|
||||
/* v5 code only supported version 0 */
|
||||
error = version == 0 ? rmi_f34v5_probe(f34) : rmi_f34v7_probe(f34);
|
||||
if (error)
|
||||
return error;
|
||||
|
||||
dev_set_drvdata(&fn->dev, f34);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int rmi_f34_create_sysfs(struct rmi_device *rmi_dev)
|
||||
{
|
||||
return sysfs_create_group(&rmi_dev->dev.kobj, &rmi_firmware_attr_group);
|
||||
|
||||
@@ -2965,6 +2965,14 @@ static int __init parse_ivrs_acpihid(char *str)
|
||||
while (*uid == '0' && *(uid + 1))
|
||||
uid++;
|
||||
|
||||
if (strlen(hid) >= ACPIHID_HID_LEN) {
|
||||
pr_err("Invalid command line: hid is too long\n");
|
||||
return 1;
|
||||
} else if (strlen(uid) >= ACPIHID_UID_LEN) {
|
||||
pr_err("Invalid command line: uid is too long\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
i = early_acpihid_map_size++;
|
||||
memcpy(early_acpihid_map[i].hid, hid, strlen(hid));
|
||||
memcpy(early_acpihid_map[i].uid, uid, strlen(uid));
|
||||
|
||||
@@ -381,7 +381,7 @@ err_free_v2m:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static struct of_device_id gicv2m_device_id[] = {
|
||||
static const struct of_device_id gicv2m_device_id[] = {
|
||||
{ .compatible = "arm,gic-v2m-frame", },
|
||||
{},
|
||||
};
|
||||
|
||||
@@ -324,11 +324,12 @@ struct mbox_chan *mbox_request_channel(struct mbox_client *cl, int index)
|
||||
|
||||
mutex_lock(&con_mutex);
|
||||
|
||||
if (of_parse_phandle_with_args(dev->of_node, "mboxes",
|
||||
"#mbox-cells", index, &spec)) {
|
||||
ret = of_parse_phandle_with_args(dev->of_node, "mboxes", "#mbox-cells",
|
||||
index, &spec);
|
||||
if (ret) {
|
||||
dev_dbg(dev, "%s: can't parse \"mboxes\" property\n", __func__);
|
||||
mutex_unlock(&con_mutex);
|
||||
return ERR_PTR(-ENODEV);
|
||||
return ERR_PTR(ret);
|
||||
}
|
||||
|
||||
chan = ERR_PTR(-EPROBE_DEFER);
|
||||
|
||||
@@ -2988,6 +2988,27 @@ static dm_cblock_t get_cache_dev_size(struct cache *cache)
|
||||
return to_cblock(size);
|
||||
}
|
||||
|
||||
static bool can_resume(struct cache *cache)
|
||||
{
|
||||
/*
|
||||
* Disallow retrying the resume operation for devices that failed the
|
||||
* first resume attempt, as the failure leaves the policy object partially
|
||||
* initialized. Retrying could trigger BUG_ON when loading cache mappings
|
||||
* into the incomplete policy object.
|
||||
*/
|
||||
if (cache->sized && !cache->loaded_mappings) {
|
||||
if (get_cache_mode(cache) != CM_WRITE)
|
||||
DMERR("%s: unable to resume a failed-loaded cache, please check metadata.",
|
||||
cache_device_name(cache));
|
||||
else
|
||||
DMERR("%s: unable to resume cache due to missing proper cache table reload",
|
||||
cache_device_name(cache));
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool can_resize(struct cache *cache, dm_cblock_t new_size)
|
||||
{
|
||||
if (from_cblock(new_size) > from_cblock(cache->cache_size)) {
|
||||
@@ -3036,6 +3057,9 @@ static int cache_preresume(struct dm_target *ti)
|
||||
struct cache *cache = ti->private;
|
||||
dm_cblock_t csize = get_cache_dev_size(cache);
|
||||
|
||||
if (!can_resume(cache))
|
||||
return -EINVAL;
|
||||
|
||||
/*
|
||||
* Check to see if the cache has resized.
|
||||
*/
|
||||
|
||||
@@ -128,10 +128,9 @@ static void queue_bio(struct mirror_set *ms, struct bio *bio, int rw)
|
||||
spin_lock_irqsave(&ms->lock, flags);
|
||||
should_wake = !(bl->head);
|
||||
bio_list_add(bl, bio);
|
||||
spin_unlock_irqrestore(&ms->lock, flags);
|
||||
|
||||
if (should_wake)
|
||||
wakeup_mirrord(ms);
|
||||
spin_unlock_irqrestore(&ms->lock, flags);
|
||||
}
|
||||
|
||||
static void dispatch_bios(void *context, struct bio_list *bio_list)
|
||||
@@ -638,9 +637,9 @@ static void write_callback(unsigned long error, void *context)
|
||||
if (!ms->failures.head)
|
||||
should_wake = 1;
|
||||
bio_list_add(&ms->failures, bio);
|
||||
spin_unlock_irqrestore(&ms->lock, flags);
|
||||
if (should_wake)
|
||||
wakeup_mirrord(ms);
|
||||
spin_unlock_irqrestore(&ms->lock, flags);
|
||||
}
|
||||
|
||||
static void do_write(struct mirror_set *ms, struct bio *bio)
|
||||
|
||||
@@ -576,8 +576,9 @@ static char **realloc_argv(unsigned *size, char **old_argv)
|
||||
gfp = GFP_NOIO;
|
||||
}
|
||||
argv = kmalloc_array(new_size, sizeof(*argv), gfp);
|
||||
if (argv && old_argv) {
|
||||
memcpy(argv, old_argv, *size * sizeof(*argv));
|
||||
if (argv) {
|
||||
if (old_argv)
|
||||
memcpy(argv, old_argv, *size * sizeof(*argv));
|
||||
*size = new_size;
|
||||
}
|
||||
|
||||
@@ -744,6 +745,10 @@ int dm_table_add_target(struct dm_table *t, const char *type,
|
||||
DMERR("%s: zero-length target", dm_device_name(t->md));
|
||||
return -EINVAL;
|
||||
}
|
||||
if (start + len < start || start + len > LLONG_MAX >> SECTOR_SHIFT) {
|
||||
DMERR("%s: too large device", dm_device_name(t->md));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
tgt->type = dm_get_target_type(type);
|
||||
if (!tgt->type) {
|
||||
|
||||
@@ -309,6 +309,10 @@ static int tc358743_get_detected_timings(struct v4l2_subdev *sd,
|
||||
|
||||
memset(timings, 0, sizeof(struct v4l2_dv_timings));
|
||||
|
||||
/* if HPD is low, ignore any video */
|
||||
if (!(i2c_rd8(sd, HPD_CTL) & MASK_HPD_OUT0))
|
||||
return -ENOLINK;
|
||||
|
||||
if (no_signal(sd)) {
|
||||
v4l2_dbg(1, debug, sd, "%s: no valid signal\n", __func__);
|
||||
return -ENOLINK;
|
||||
|
||||
@@ -167,6 +167,7 @@ int fimc_is_hw_change_mode(struct fimc_is *is)
|
||||
if (WARN_ON(is->config_index >= ARRAY_SIZE(cmd)))
|
||||
return -EINVAL;
|
||||
|
||||
fimc_is_hw_wait_intmsr0_intmsd0(is);
|
||||
mcuctl_write(cmd[is->config_index], is, MCUCTL_REG_ISSR(0));
|
||||
mcuctl_write(is->sensor_index, is, MCUCTL_REG_ISSR(1));
|
||||
mcuctl_write(is->setfile.sub_index, is, MCUCTL_REG_ISSR(2));
|
||||
|
||||
@@ -817,13 +817,12 @@ static int c8sectpfe_probe(struct platform_device *pdev)
|
||||
}
|
||||
tsin->i2c_adapter =
|
||||
of_find_i2c_adapter_by_node(i2c_bus);
|
||||
of_node_put(i2c_bus);
|
||||
if (!tsin->i2c_adapter) {
|
||||
dev_err(&pdev->dev, "No i2c adapter found\n");
|
||||
of_node_put(i2c_bus);
|
||||
ret = -ENODEV;
|
||||
goto err_clk_disable;
|
||||
}
|
||||
of_node_put(i2c_bus);
|
||||
|
||||
tsin->rst_gpio = of_get_named_gpio(child, "reset-gpios", 0);
|
||||
|
||||
|
||||
@@ -1956,6 +1956,8 @@ static void cx231xx_video_dev_init(
|
||||
vfd->lock = &dev->lock;
|
||||
vfd->release = video_device_release_empty;
|
||||
vfd->ctrl_handler = &dev->mpeg_ctrl_handler.hdl;
|
||||
vfd->device_caps = V4L2_CAP_READWRITE | V4L2_CAP_STREAMING |
|
||||
V4L2_CAP_VIDEO_CAPTURE;
|
||||
video_set_drvdata(vfd, dev);
|
||||
if (dev->tuner_type == TUNER_ABSENT) {
|
||||
v4l2_disable_ioctl(vfd, VIDIOC_G_FREQUENCY);
|
||||
|
||||
@@ -529,12 +529,13 @@ static int hdcs_init(struct sd *sd)
|
||||
static int hdcs_dump(struct sd *sd)
|
||||
{
|
||||
u16 reg, val;
|
||||
int err = 0;
|
||||
|
||||
pr_info("Dumping sensor registers:\n");
|
||||
|
||||
for (reg = HDCS_IDENT; reg <= HDCS_ROWEXPH; reg++) {
|
||||
stv06xx_read_sensor(sd, reg, &val);
|
||||
for (reg = HDCS_IDENT; reg <= HDCS_ROWEXPH && !err; reg++) {
|
||||
err = stv06xx_read_sensor(sd, reg, &val);
|
||||
pr_info("reg 0x%02x = 0x%02x\n", reg, val);
|
||||
}
|
||||
return 0;
|
||||
return (err < 0) ? err : 0;
|
||||
}
|
||||
|
||||
@@ -979,25 +979,25 @@ int __video_register_device(struct video_device *vdev,
|
||||
vdev->dev.class = &video_class;
|
||||
vdev->dev.devt = MKDEV(VIDEO_MAJOR, vdev->minor);
|
||||
vdev->dev.parent = vdev->dev_parent;
|
||||
vdev->dev.release = v4l2_device_release;
|
||||
dev_set_name(&vdev->dev, "%s%d", name_base, vdev->num);
|
||||
|
||||
/* Increase v4l2_device refcount */
|
||||
v4l2_device_get(vdev->v4l2_dev);
|
||||
|
||||
mutex_lock(&videodev_lock);
|
||||
ret = device_register(&vdev->dev);
|
||||
if (ret < 0) {
|
||||
mutex_unlock(&videodev_lock);
|
||||
pr_err("%s: device_register failed\n", __func__);
|
||||
goto cleanup;
|
||||
put_device(&vdev->dev);
|
||||
return ret;
|
||||
}
|
||||
/* Register the release callback that will be called when the last
|
||||
reference to the device goes away. */
|
||||
vdev->dev.release = v4l2_device_release;
|
||||
|
||||
if (nr != -1 && nr != vdev->num && warn_if_nr_in_use)
|
||||
pr_warn("%s: requested %s%d, got %s\n", __func__,
|
||||
name_base, nr, video_device_node_name(vdev));
|
||||
|
||||
/* Increase v4l2_device refcount */
|
||||
v4l2_device_get(vdev->v4l2_dev);
|
||||
|
||||
/* Part 5: Register the entity. */
|
||||
ret = video_register_media_controller(vdev);
|
||||
|
||||
|
||||
@@ -145,7 +145,6 @@ static int exynos_lpass_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct exynos_lpass *lpass = platform_get_drvdata(pdev);
|
||||
|
||||
exynos_lpass_disable(lpass);
|
||||
pm_runtime_disable(&pdev->dev);
|
||||
if (!pm_runtime_status_suspended(&pdev->dev))
|
||||
exynos_lpass_disable(lpass);
|
||||
|
||||
@@ -129,7 +129,7 @@ static const struct spi_device_id stmpe_spi_id[] = {
|
||||
{ "stmpe2403", STMPE2403 },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(spi, stmpe_id);
|
||||
MODULE_DEVICE_TABLE(spi, stmpe_spi_id);
|
||||
|
||||
static struct spi_driver stmpe_spi_driver = {
|
||||
.driver = {
|
||||
|
||||
@@ -172,7 +172,7 @@ static int aspeed_lpc_snoop_config_irq(struct aspeed_lpc_snoop *lpc_snoop,
|
||||
int rc;
|
||||
|
||||
lpc_snoop->irq = platform_get_irq(pdev, 0);
|
||||
if (!lpc_snoop->irq)
|
||||
if (lpc_snoop->irq < 0)
|
||||
return -ENODEV;
|
||||
|
||||
rc = devm_request_irq(dev, lpc_snoop->irq,
|
||||
@@ -206,11 +206,15 @@ static int aspeed_lpc_enable_snoop(struct aspeed_lpc_snoop *lpc_snoop,
|
||||
lpc_snoop->chan[channel].miscdev.minor = MISC_DYNAMIC_MINOR;
|
||||
lpc_snoop->chan[channel].miscdev.name =
|
||||
devm_kasprintf(dev, GFP_KERNEL, "%s%d", DEVICE_NAME, channel);
|
||||
if (!lpc_snoop->chan[channel].miscdev.name) {
|
||||
rc = -ENOMEM;
|
||||
goto err_free_fifo;
|
||||
}
|
||||
lpc_snoop->chan[channel].miscdev.fops = &snoop_fops;
|
||||
lpc_snoop->chan[channel].miscdev.parent = dev;
|
||||
rc = misc_register(&lpc_snoop->chan[channel].miscdev);
|
||||
if (rc)
|
||||
return rc;
|
||||
goto err_free_fifo;
|
||||
|
||||
/* Enable LPC snoop channel at requested port */
|
||||
switch (channel) {
|
||||
@@ -227,7 +231,8 @@ static int aspeed_lpc_enable_snoop(struct aspeed_lpc_snoop *lpc_snoop,
|
||||
hicrb_en = HICRB_ENSNP1D;
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
rc = -EINVAL;
|
||||
goto err_misc_deregister;
|
||||
}
|
||||
|
||||
regmap_update_bits(lpc_snoop->regmap, HICR5, hicr5_en, hicr5_en);
|
||||
@@ -237,6 +242,12 @@ static int aspeed_lpc_enable_snoop(struct aspeed_lpc_snoop *lpc_snoop,
|
||||
regmap_update_bits(lpc_snoop->regmap, HICRB,
|
||||
hicrb_en, hicrb_en);
|
||||
|
||||
return 0;
|
||||
|
||||
err_misc_deregister:
|
||||
misc_deregister(&lpc_snoop->chan[channel].miscdev);
|
||||
err_free_fifo:
|
||||
kfifo_free(&lpc_snoop->chan[channel].fifo);
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
@@ -612,8 +612,12 @@ static void sdhci_intel_set_power(struct sdhci_host *host, unsigned char mode,
|
||||
|
||||
sdhci_set_power(host, mode, vdd);
|
||||
|
||||
if (mode == MMC_POWER_OFF)
|
||||
if (mode == MMC_POWER_OFF) {
|
||||
if (slot->chip->pdev->device == PCI_DEVICE_ID_INTEL_APL_SD ||
|
||||
slot->chip->pdev->device == PCI_DEVICE_ID_INTEL_BYT_SD)
|
||||
usleep_range(15000, 17500);
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Bus power might not enable after D3 -> D0 transition due to the
|
||||
|
||||
@@ -1533,10 +1533,15 @@ void sdhci_set_clock(struct sdhci_host *host, unsigned int clock)
|
||||
|
||||
host->mmc->actual_clock = 0;
|
||||
|
||||
sdhci_writew(host, 0, SDHCI_CLOCK_CONTROL);
|
||||
clk = sdhci_readw(host, SDHCI_CLOCK_CONTROL);
|
||||
if (clk & SDHCI_CLOCK_CARD_EN)
|
||||
sdhci_writew(host, clk & ~SDHCI_CLOCK_CARD_EN,
|
||||
SDHCI_CLOCK_CONTROL);
|
||||
|
||||
if (clock == 0)
|
||||
if (clock == 0) {
|
||||
sdhci_writew(host, 0, SDHCI_CLOCK_CONTROL);
|
||||
return;
|
||||
}
|
||||
|
||||
clk = sdhci_calc_clk(host, clock, &host->mmc->actual_clock);
|
||||
sdhci_enable_clk(host, clk);
|
||||
@@ -1968,11 +1973,8 @@ static int sdhci_get_cd(struct mmc_host *mmc)
|
||||
|
||||
static int sdhci_check_ro(struct sdhci_host *host)
|
||||
{
|
||||
unsigned long flags;
|
||||
int is_readonly;
|
||||
|
||||
spin_lock_irqsave(&host->lock, flags);
|
||||
|
||||
if (host->flags & SDHCI_DEVICE_DEAD)
|
||||
is_readonly = 0;
|
||||
else if (host->ops->get_ro)
|
||||
@@ -1981,8 +1983,6 @@ static int sdhci_check_ro(struct sdhci_host *host)
|
||||
is_readonly = !(sdhci_readl(host, SDHCI_PRESENT_STATE)
|
||||
& SDHCI_WRITE_PROTECT);
|
||||
|
||||
spin_unlock_irqrestore(&host->lock, flags);
|
||||
|
||||
/* This quirk needs to be replaced by a callback-function later */
|
||||
return host->quirks & SDHCI_QUIRK_INVERTED_WRITE_PROTECT ?
|
||||
!is_readonly : is_readonly;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user