mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 23:24:22 -04:00
Merge remote-tracking branch 'sm8350/lineage-20' into lineage-22.2
* sm8350/lineage-20: ANDROID: bpf: do not fail to load if log is full ANDROID: fix kernelci compressed kernel linking ANDROID: GKI: Update symbol list for Zebra UPSTREAM: posix-cpu-timers: fix race between handle_posix_cpu_timers() and posix_cpu_timer_del() Linux 5.4.295 scsi: qedf: Use designated initializer for struct qed_fcoe_cb_ops arm64/ptrace: Fix stack-out-of-bounds read in regs_get_kernel_stack_nth() perf: Fix sample vs do_exit() s390/pci: Fix __pcilg_mio_inuser() inline assembly rtc: test: Fix invalid format specifier. jbd2: fix data-race and null-ptr-deref in jbd2_journal_dirty_metadata() mm/huge_memory: fix dereferencing invalid pmd migration entry rtc: Make rtc_time64_to_tm() support dates before 1970 rtc: Improve performance of rtc_time64_to_tm(). Add tests. xprtrdma: fix pointer derefs in error cases of rpcrdma_ep_create posix-cpu-timers: fix race between handle_posix_cpu_timers() and posix_cpu_timer_del() ARM: dts: am335x-bone-common: Increase MDIO reset deassert delay to 50ms ARM: dts: am335x-bone-common: Increase MDIO reset deassert time ARM: dts: am335x-bone-common: Add GPIO PHY reset on revision C3 board net: atm: fix /proc/net/atm/lec handling ... Change-Id: Ibdde607f7a4ae5a74994603f513e7f94a9eb04ad
This commit is contained in:
commit
ee69f5d73d
412 changed files with 5791 additions and 4045 deletions
|
|
@ -10820,6 +10820,15 @@ L: netdev@vger.kernel.org
|
|||
S: Supported
|
||||
F: drivers/net/ethernet/mscc/
|
||||
|
||||
MICROSOFT SURFACE HARDWARE PLATFORM SUPPORT
|
||||
M: Hans de Goede <hdegoede@redhat.com>
|
||||
M: Mark Gross <mgross@linux.intel.com>
|
||||
M: Maximilian Luz <luzmaximilian@gmail.com>
|
||||
L: platform-driver-x86@vger.kernel.org
|
||||
S: Maintained
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git
|
||||
F: drivers/platform/surface/
|
||||
|
||||
MICROSOFT SURFACE PRO 3 BUTTON DRIVER
|
||||
M: Chen Yu <yu.c.chen@intel.com>
|
||||
L: platform-driver-x86@vger.kernel.org
|
||||
|
|
|
|||
14
Makefile
14
Makefile
|
|
@ -1,7 +1,7 @@
|
|||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 5
|
||||
PATCHLEVEL = 4
|
||||
SUBLEVEL = 293
|
||||
SUBLEVEL = 295
|
||||
EXTRAVERSION =
|
||||
NAME = Kleptomaniac Octopus
|
||||
|
||||
|
|
@ -802,6 +802,18 @@ KBUILD_CFLAGS += -Wno-gnu
|
|||
# Quiet clang warning: comparison of unsigned expression < 0 is always false
|
||||
KBUILD_CFLAGS += -Wno-tautological-compare
|
||||
KBUILD_CFLAGS += $(call cc-disable-warning, undefined-optimized)
|
||||
|
||||
# Clang may emit a warning when a const variable, such as the dummy variables
|
||||
# in typecheck(), or const member of an aggregate type are not initialized,
|
||||
# which can result in unexpected behavior. However, in many audited cases of
|
||||
# the "field" variant of the warning, this is intentional because the field is
|
||||
# never used within a particular call path, the field is within a union with
|
||||
# other non-const members, or the containing object is not const so the field
|
||||
# can be modified via memcpy() / memset(). While the variable warning also gets
|
||||
# disabled with this same switch, there should not be too much coverage lost
|
||||
# because -Wuninitialized will still flag when an uninitialized const variable
|
||||
# is used.
|
||||
KBUILD_CFLAGS += $(call cc-disable-warning, default-const-init-unsafe)
|
||||
else
|
||||
|
||||
# Warn about unmarked fall-throughs in switch statement.
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -15,3 +15,6 @@
|
|||
dev_change_flags
|
||||
netdev_master_upper_dev_get
|
||||
prandom_bytes
|
||||
drm_client_dev_hotplug
|
||||
drm_edid_to_sad
|
||||
drm_edid_to_speaker_allocation
|
||||
|
|
|
|||
|
|
@ -145,6 +145,8 @@
|
|||
/* MDIO */
|
||||
AM33XX_PADCONF(AM335X_PIN_MDIO, PIN_INPUT_PULLUP | SLEWCTRL_FAST, MUX_MODE0)
|
||||
AM33XX_PADCONF(AM335X_PIN_MDC, PIN_OUTPUT_PULLUP, MUX_MODE0)
|
||||
/* Added to support GPIO controlled PHY reset */
|
||||
AM33XX_PADCONF(AM335X_PIN_UART0_CTSN, PIN_OUTPUT_PULLUP, MUX_MODE7)
|
||||
>;
|
||||
};
|
||||
|
||||
|
|
@ -153,6 +155,8 @@
|
|||
/* MDIO reset value */
|
||||
AM33XX_PADCONF(AM335X_PIN_MDIO, PIN_INPUT_PULLDOWN, MUX_MODE7)
|
||||
AM33XX_PADCONF(AM335X_PIN_MDC, PIN_INPUT_PULLDOWN, MUX_MODE7)
|
||||
/* Added to support GPIO controlled PHY reset */
|
||||
AM33XX_PADCONF(AM335X_PIN_UART0_CTSN, PIN_INPUT_PULLDOWN, MUX_MODE7)
|
||||
>;
|
||||
};
|
||||
|
||||
|
|
@ -396,6 +400,10 @@
|
|||
|
||||
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>;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -147,7 +147,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;
|
||||
|
|
|
|||
|
|
@ -211,12 +211,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>;
|
||||
|
|
@ -359,9 +353,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";
|
||||
|
|
|
|||
|
|
@ -64,7 +64,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;
|
||||
|
|
|
|||
|
|
@ -58,7 +58,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";
|
||||
|
|
@ -84,7 +84,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;
|
||||
|
|
|
|||
|
|
@ -48,6 +48,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);
|
||||
|
||||
|
|
|
|||
|
|
@ -512,7 +512,5 @@ void __init early_ioremap_init(void)
|
|||
bool arch_memremap_can_ram_remap(resource_size_t offset, size_t size,
|
||||
unsigned long flags)
|
||||
{
|
||||
unsigned long pfn = PHYS_PFN(offset);
|
||||
|
||||
return memblock_is_map_memory(pfn);
|
||||
return memblock_is_map_memory(offset);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -839,7 +839,7 @@
|
|||
interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "vopb_mmu";
|
||||
clocks = <&cru ACLK_VOPB>, <&cru HCLK_VOPB>;
|
||||
clock-names = "aclk", "hclk";
|
||||
clock-names = "aclk", "iface";
|
||||
power-domains = <&power PX30_PD_VO>;
|
||||
#iommu-cells = <0>;
|
||||
status = "disabled";
|
||||
|
|
@ -871,7 +871,7 @@
|
|||
interrupts = <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "vopl_mmu";
|
||||
clocks = <&cru ACLK_VOPL>, <&cru HCLK_VOPL>;
|
||||
clock-names = "aclk", "hclk";
|
||||
clock-names = "aclk", "iface";
|
||||
power-domains = <&power PX30_PD_VO>;
|
||||
#iommu-cells = <0>;
|
||||
status = "disabled";
|
||||
|
|
|
|||
|
|
@ -246,14 +246,6 @@
|
|||
status = "okay";
|
||||
};
|
||||
|
||||
&usb_host0_ehci {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb_host0_ohci {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&vopb {
|
||||
status = "okay";
|
||||
};
|
||||
|
|
|
|||
|
|
@ -140,7 +140,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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -84,7 +84,26 @@ HYPERCALL1(tmem_op);
|
|||
HYPERCALL1(platform_op_raw);
|
||||
HYPERCALL2(multicall);
|
||||
HYPERCALL2(vm_assist);
|
||||
HYPERCALL3(dm_op);
|
||||
|
||||
SYM_FUNC_START(HYPERVISOR_dm_op)
|
||||
mov x16, #__HYPERVISOR_dm_op; \
|
||||
/*
|
||||
* dm_op hypercalls are issued by the userspace. The kernel needs to
|
||||
* enable access to TTBR0_EL1 as the hypervisor would issue stage 1
|
||||
* translations to user memory via AT instructions. Since AT
|
||||
* instructions are not affected by the PAN bit (ARMv8.1), we only
|
||||
* need the explicit uaccess_enable/disable if the TTBR0 PAN emulation
|
||||
* is enabled (it implies that hardware UAO and PAN disabled).
|
||||
*/
|
||||
uaccess_ttbr0_enable x6, x7, x8
|
||||
hvc XEN_IMM
|
||||
|
||||
/*
|
||||
* Disable userspace access from kernel once the hyp call completed.
|
||||
*/
|
||||
uaccess_ttbr0_disable x6, x7
|
||||
ret
|
||||
SYM_FUNC_END(HYPERVISOR_dm_op);
|
||||
|
||||
ENTRY(privcmd_call)
|
||||
mov x16, x0
|
||||
|
|
|
|||
|
|
@ -804,7 +804,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;
|
||||
|
|
|
|||
|
|
@ -107,7 +107,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 */
|
||||
|
|
|
|||
|
|
@ -65,7 +65,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
|
||||
|
|
|
|||
|
|
@ -56,10 +56,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 */
|
||||
|
|
@ -118,9 +115,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;
|
||||
|
||||
|
|
@ -156,7 +154,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);
|
||||
|
|
@ -164,7 +162,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);
|
||||
|
|
@ -635,12 +634,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;
|
||||
|
|
@ -652,16 +653,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;
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ endif
|
|||
# offsets.
|
||||
cflags-vdso := $(ccflags-vdso) \
|
||||
$(filter -W%,$(filter-out -Wa$(comma)%,$(KBUILD_CFLAGS))) \
|
||||
$(filter -std=%,$(KBUILD_CFLAGS)) \
|
||||
-O3 -g -fPIC -fno-strict-aliasing -fno-common -fno-builtin -G 0 \
|
||||
-fno-stack-protector -fno-jump-tables -DDISABLE_BRANCH_PROFILING \
|
||||
$(call cc-option, -fno-asynchronous-unwind-tables) \
|
||||
|
|
|
|||
|
|
@ -297,4 +297,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 */
|
||||
|
|
|
|||
|
|
@ -21,6 +21,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
|
||||
|
||||
|
|
|
|||
|
|
@ -103,9 +103,19 @@ handle_fpe(struct pt_regs *regs)
|
|||
|
||||
memcpy(regs->fr, frcopy, sizeof regs->fr);
|
||||
if (signalcode != 0) {
|
||||
force_sig_fault(signalcode >> 24, signalcode & 0xffffff,
|
||||
(void __user *) regs->iaoq[0]);
|
||||
return -1;
|
||||
int sig = signalcode >> 24;
|
||||
|
||||
if (sig == SIGFPE) {
|
||||
/*
|
||||
* Clear floating point trap bit to avoid trapping
|
||||
* again on the first floating-point instruction in
|
||||
* the userspace signal handler.
|
||||
*/
|
||||
regs->fr[0] &= ~(1ULL << 38);
|
||||
}
|
||||
force_sig_fault(sig, signalcode & 0xffffff,
|
||||
(void __user *) regs->iaoq[0]);
|
||||
return -1;
|
||||
}
|
||||
|
||||
return signalcode ? -1 : 0;
|
||||
|
|
|
|||
|
|
@ -1723,6 +1723,8 @@ int eeh_pe_configure(struct eeh_pe *pe)
|
|||
/* Invalid PE ? */
|
||||
if (!pe)
|
||||
return -ENODEV;
|
||||
else
|
||||
ret = eeh_ops->configure_bridge(pe);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2906,11 +2906,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)
|
||||
|
|
|
|||
|
|
@ -227,7 +227,7 @@ static inline int __pcilg_mio_inuser(
|
|||
:
|
||||
[cc] "+d" (cc), [val] "=d" (val), [len] "+d" (len),
|
||||
[dst] "+a" (dst), [cnt] "+d" (cnt), [tmp] "=d" (tmp),
|
||||
[shift] "+d" (shift)
|
||||
[shift] "+a" (shift)
|
||||
:
|
||||
[ioaddr] "a" (addr)
|
||||
: "cc", "memory");
|
||||
|
|
|
|||
|
|
@ -154,5 +154,6 @@ MRPROPER_DIRS += arch/$(SUBARCH)/include/generated
|
|||
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
|
||||
|
||||
export HEADER_ARCH SUBARCH USER_CFLAGS CFLAGS_NO_HARDENING OS DEV_NULL_PATH
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@ void __init mem_init(void)
|
|||
map_memory(brk_end, __pa(brk_end), uml_reserved - brk_end, 1, 1, 0);
|
||||
memblock_free(__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 */
|
||||
memblock_free_all();
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -61,6 +61,8 @@ ifeq ($(CONFIG_RELOCATABLE), y)
|
|||
KBUILD_LDFLAGS += -z notext
|
||||
endif
|
||||
|
||||
KBUILD_LDFLAGS += -z notext
|
||||
|
||||
KBUILD_LDFLAGS += -z noexecstack
|
||||
KBUILD_LDFLAGS += $(call ld-option,--no-warn-rwx-segments)
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -934,17 +934,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) {
|
||||
|
|
|
|||
|
|
@ -350,7 +350,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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -41,8 +41,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;
|
||||
};
|
||||
|
||||
|
|
@ -124,9 +128,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();
|
||||
|
||||
/*
|
||||
|
|
@ -212,6 +229,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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -875,15 +875,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);
|
||||
|
||||
apic_send_IPI_allbutself(NMI_VECTOR);
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -262,10 +262,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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -431,7 +431,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
|
||||
|
|
|
|||
|
|
@ -668,6 +668,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);
|
||||
|
|
@ -696,6 +698,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];
|
||||
|
|
@ -720,7 +723,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);
|
||||
|
|
|
|||
|
|
@ -639,7 +639,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);
|
||||
|
||||
|
|
@ -653,7 +654,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.
|
||||
|
|
@ -675,49 +676,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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -727,5 +705,5 @@ acpi_ps_complete_final_op(struct acpi_walk_state *walk_state,
|
|||
|
||||
} while (op);
|
||||
|
||||
return_ACPI_STATUS(status);
|
||||
return_ACPI_STATUS(return_status);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -266,10 +266,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:
|
||||
|
|
|
|||
|
|
@ -72,7 +72,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");
|
||||
|
|
|
|||
|
|
@ -42,7 +42,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
|
||||
|
|
|
|||
|
|
@ -218,16 +218,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;
|
||||
}
|
||||
|
|
@ -260,15 +262,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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6377,10 +6377,10 @@ static void print_binder_transaction_ilocked(struct seq_file *m,
|
|||
}
|
||||
|
||||
static void print_binder_work_ilocked(struct seq_file *m,
|
||||
struct binder_proc *proc,
|
||||
const char *prefix,
|
||||
const char *transaction_prefix,
|
||||
struct binder_work *w)
|
||||
struct binder_proc *proc,
|
||||
const char *prefix,
|
||||
const char *transaction_prefix,
|
||||
struct binder_work *w, bool hash_ptrs)
|
||||
{
|
||||
struct binder_node *node;
|
||||
struct binder_transaction *t;
|
||||
|
|
@ -6403,9 +6403,15 @@ static void print_binder_work_ilocked(struct seq_file *m,
|
|||
break;
|
||||
case BINDER_WORK_NODE:
|
||||
node = container_of(w, struct binder_node, work);
|
||||
seq_printf(m, "%snode work %d: u%016llx c%016llx\n",
|
||||
prefix, node->debug_id,
|
||||
(u64)node->ptr, (u64)node->cookie);
|
||||
if (hash_ptrs)
|
||||
seq_printf(m, "%snode work %d: u%p c%p\n",
|
||||
prefix, node->debug_id,
|
||||
(void *)(long)node->ptr,
|
||||
(void *)(long)node->cookie);
|
||||
else
|
||||
seq_printf(m, "%snode work %d: u%016llx c%016llx\n",
|
||||
prefix, node->debug_id,
|
||||
(u64)node->ptr, (u64)node->cookie);
|
||||
break;
|
||||
case BINDER_WORK_DEAD_BINDER:
|
||||
seq_printf(m, "%shas dead binder\n", prefix);
|
||||
|
|
@ -6430,7 +6436,7 @@ static void print_binder_work_ilocked(struct seq_file *m,
|
|||
|
||||
static void print_binder_thread_ilocked(struct seq_file *m,
|
||||
struct binder_thread *thread,
|
||||
int print_always)
|
||||
bool print_always, bool hash_ptrs)
|
||||
{
|
||||
struct binder_transaction *t;
|
||||
struct binder_work *w;
|
||||
|
|
@ -6460,14 +6466,16 @@ static void print_binder_thread_ilocked(struct seq_file *m,
|
|||
}
|
||||
list_for_each_entry(w, &thread->todo, entry) {
|
||||
print_binder_work_ilocked(m, thread->proc, " ",
|
||||
" pending transaction", w);
|
||||
" pending transaction",
|
||||
w, hash_ptrs);
|
||||
}
|
||||
if (!print_always && m->count == header_pos)
|
||||
m->count = start_pos;
|
||||
}
|
||||
|
||||
static void print_binder_node_nilocked(struct seq_file *m,
|
||||
struct binder_node *node)
|
||||
struct binder_node *node,
|
||||
bool hash_ptrs)
|
||||
{
|
||||
struct binder_ref *ref;
|
||||
struct binder_work *w;
|
||||
|
|
@ -6477,8 +6485,13 @@ static void print_binder_node_nilocked(struct seq_file *m,
|
|||
hlist_for_each_entry(ref, &node->refs, node_entry)
|
||||
count++;
|
||||
|
||||
seq_printf(m, " node %d: u%016llx c%016llx pri %d:%d hs %d hw %d ls %d lw %d is %d iw %d tr %d",
|
||||
node->debug_id, (u64)node->ptr, (u64)node->cookie,
|
||||
if (hash_ptrs)
|
||||
seq_printf(m, " node %d: u%p c%p", node->debug_id,
|
||||
(void *)(long)node->ptr, (void *)(long)node->cookie);
|
||||
else
|
||||
seq_printf(m, " node %d: u%016llx c%016llx", node->debug_id,
|
||||
(u64)node->ptr, (u64)node->cookie);
|
||||
seq_printf(m, " pri %d:%d hs %d hw %d ls %d lw %d is %d iw %d tr %d",
|
||||
node->sched_policy, node->min_priority,
|
||||
node->has_strong_ref, node->has_weak_ref,
|
||||
node->local_strong_refs, node->local_weak_refs,
|
||||
|
|
@ -6492,7 +6505,8 @@ static void print_binder_node_nilocked(struct seq_file *m,
|
|||
if (node->proc) {
|
||||
list_for_each_entry(w, &node->async_todo, entry)
|
||||
print_binder_work_ilocked(m, node->proc, " ",
|
||||
" pending async transaction", w);
|
||||
" pending async transaction",
|
||||
w, hash_ptrs);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -6508,8 +6522,54 @@ static void print_binder_ref_olocked(struct seq_file *m,
|
|||
binder_node_unlock(ref->node);
|
||||
}
|
||||
|
||||
static void print_binder_proc(struct seq_file *m,
|
||||
struct binder_proc *proc, int print_all)
|
||||
/**
|
||||
* print_next_binder_node_ilocked() - Print binder_node from a locked list
|
||||
* @m: struct seq_file for output via seq_printf()
|
||||
* @proc: struct binder_proc we hold the inner_proc_lock to (if any)
|
||||
* @node: struct binder_node to print fields of
|
||||
* @prev_node: struct binder_node we hold a temporary reference to (if any)
|
||||
* @hash_ptrs: whether to hash @node's binder_uintptr_t fields
|
||||
*
|
||||
* Helper function to handle synchronization around printing a struct
|
||||
* binder_node while iterating through @proc->nodes or the dead nodes list.
|
||||
* Caller must hold either @proc->inner_lock (for live nodes) or
|
||||
* binder_dead_nodes_lock. This lock will be released during the body of this
|
||||
* function, but it will be reacquired before returning to the caller.
|
||||
*
|
||||
* Return: pointer to the struct binder_node we hold a tmpref on
|
||||
*/
|
||||
static struct binder_node *
|
||||
print_next_binder_node_ilocked(struct seq_file *m, struct binder_proc *proc,
|
||||
struct binder_node *node,
|
||||
struct binder_node *prev_node, bool hash_ptrs)
|
||||
{
|
||||
/*
|
||||
* Take a temporary reference on the node so that isn't freed while
|
||||
* we print it.
|
||||
*/
|
||||
binder_inc_node_tmpref_ilocked(node);
|
||||
/*
|
||||
* Live nodes need to drop the inner proc lock and dead nodes need to
|
||||
* drop the binder_dead_nodes_lock before trying to take the node lock.
|
||||
*/
|
||||
if (proc)
|
||||
binder_inner_proc_unlock(proc);
|
||||
else
|
||||
spin_unlock(&binder_dead_nodes_lock);
|
||||
if (prev_node)
|
||||
binder_put_node(prev_node);
|
||||
binder_node_inner_lock(node);
|
||||
print_binder_node_nilocked(m, node, hash_ptrs);
|
||||
binder_node_inner_unlock(node);
|
||||
if (proc)
|
||||
binder_inner_proc_lock(proc);
|
||||
else
|
||||
spin_lock(&binder_dead_nodes_lock);
|
||||
return node;
|
||||
}
|
||||
|
||||
static void print_binder_proc(struct seq_file *m, struct binder_proc *proc,
|
||||
bool print_all, bool hash_ptrs)
|
||||
{
|
||||
struct binder_work *w;
|
||||
struct rb_node *n;
|
||||
|
|
@ -6522,31 +6582,19 @@ static void print_binder_proc(struct seq_file *m,
|
|||
header_pos = m->count;
|
||||
|
||||
binder_inner_proc_lock(proc);
|
||||
for (n = rb_first(&proc->threads); n != NULL; n = rb_next(n))
|
||||
for (n = rb_first(&proc->threads); n; n = rb_next(n))
|
||||
print_binder_thread_ilocked(m, rb_entry(n, struct binder_thread,
|
||||
rb_node), print_all);
|
||||
rb_node), print_all, hash_ptrs);
|
||||
|
||||
for (n = rb_first(&proc->nodes); n != NULL; n = rb_next(n)) {
|
||||
for (n = rb_first(&proc->nodes); n; n = rb_next(n)) {
|
||||
struct binder_node *node = rb_entry(n, struct binder_node,
|
||||
rb_node);
|
||||
if (!print_all && !node->has_async_transaction)
|
||||
continue;
|
||||
|
||||
/*
|
||||
* take a temporary reference on the node so it
|
||||
* survives and isn't removed from the tree
|
||||
* while we print it.
|
||||
*/
|
||||
binder_inc_node_tmpref_ilocked(node);
|
||||
/* Need to drop inner lock to take node lock */
|
||||
binder_inner_proc_unlock(proc);
|
||||
if (last_node)
|
||||
binder_put_node(last_node);
|
||||
binder_node_inner_lock(node);
|
||||
print_binder_node_nilocked(m, node);
|
||||
binder_node_inner_unlock(node);
|
||||
last_node = node;
|
||||
binder_inner_proc_lock(proc);
|
||||
last_node = print_next_binder_node_ilocked(m, proc, node,
|
||||
last_node,
|
||||
hash_ptrs);
|
||||
}
|
||||
binder_inner_proc_unlock(proc);
|
||||
if (last_node)
|
||||
|
|
@ -6554,19 +6602,18 @@ static void print_binder_proc(struct seq_file *m,
|
|||
|
||||
if (print_all) {
|
||||
binder_proc_lock(proc);
|
||||
for (n = rb_first(&proc->refs_by_desc);
|
||||
n != NULL;
|
||||
n = rb_next(n))
|
||||
for (n = rb_first(&proc->refs_by_desc); n; n = rb_next(n))
|
||||
print_binder_ref_olocked(m, rb_entry(n,
|
||||
struct binder_ref,
|
||||
rb_node_desc));
|
||||
struct binder_ref,
|
||||
rb_node_desc));
|
||||
binder_proc_unlock(proc);
|
||||
}
|
||||
binder_alloc_print_allocated(m, &proc->alloc);
|
||||
binder_inner_proc_lock(proc);
|
||||
list_for_each_entry(w, &proc->todo, entry)
|
||||
print_binder_work_ilocked(m, proc, " ",
|
||||
" pending transaction", w);
|
||||
" pending transaction", w,
|
||||
hash_ptrs);
|
||||
list_for_each_entry(w, &proc->delivered_death, entry) {
|
||||
seq_puts(m, " has delivered dead binder\n");
|
||||
break;
|
||||
|
|
@ -6692,7 +6739,7 @@ static void print_binder_proc_stats(struct seq_file *m,
|
|||
count = 0;
|
||||
ready_threads = 0;
|
||||
binder_inner_proc_lock(proc);
|
||||
for (n = rb_first(&proc->threads); n != NULL; n = rb_next(n))
|
||||
for (n = rb_first(&proc->threads); n; n = rb_next(n))
|
||||
count++;
|
||||
|
||||
list_for_each_entry(thread, &proc->waiting_threads, waiting_thread_node)
|
||||
|
|
@ -6706,7 +6753,7 @@ static void print_binder_proc_stats(struct seq_file *m,
|
|||
ready_threads,
|
||||
free_async_space);
|
||||
count = 0;
|
||||
for (n = rb_first(&proc->nodes); n != NULL; n = rb_next(n))
|
||||
for (n = rb_first(&proc->nodes); n; n = rb_next(n))
|
||||
count++;
|
||||
binder_inner_proc_unlock(proc);
|
||||
seq_printf(m, " nodes: %d\n", count);
|
||||
|
|
@ -6714,7 +6761,7 @@ static void print_binder_proc_stats(struct seq_file *m,
|
|||
strong = 0;
|
||||
weak = 0;
|
||||
binder_proc_lock(proc);
|
||||
for (n = rb_first(&proc->refs_by_desc); n != NULL; n = rb_next(n)) {
|
||||
for (n = rb_first(&proc->refs_by_desc); n; n = rb_next(n)) {
|
||||
struct binder_ref *ref = rb_entry(n, struct binder_ref,
|
||||
rb_node_desc);
|
||||
count++;
|
||||
|
|
@ -6741,8 +6788,7 @@ static void print_binder_proc_stats(struct seq_file *m,
|
|||
print_binder_stats(m, " ", &proc->stats);
|
||||
}
|
||||
|
||||
|
||||
int binder_state_show(struct seq_file *m, void *unused)
|
||||
static void print_binder_state(struct seq_file *m, bool hash_ptrs)
|
||||
{
|
||||
struct binder_proc *proc;
|
||||
struct binder_node *node;
|
||||
|
|
@ -6753,31 +6799,40 @@ int binder_state_show(struct seq_file *m, void *unused)
|
|||
spin_lock(&binder_dead_nodes_lock);
|
||||
if (!hlist_empty(&binder_dead_nodes))
|
||||
seq_puts(m, "dead nodes:\n");
|
||||
hlist_for_each_entry(node, &binder_dead_nodes, dead_node) {
|
||||
/*
|
||||
* take a temporary reference on the node so it
|
||||
* survives and isn't removed from the list
|
||||
* while we print it.
|
||||
*/
|
||||
node->tmp_refs++;
|
||||
spin_unlock(&binder_dead_nodes_lock);
|
||||
if (last_node)
|
||||
binder_put_node(last_node);
|
||||
binder_node_lock(node);
|
||||
print_binder_node_nilocked(m, node);
|
||||
binder_node_unlock(node);
|
||||
last_node = node;
|
||||
spin_lock(&binder_dead_nodes_lock);
|
||||
}
|
||||
hlist_for_each_entry(node, &binder_dead_nodes, dead_node)
|
||||
last_node = print_next_binder_node_ilocked(m, NULL, node,
|
||||
last_node,
|
||||
hash_ptrs);
|
||||
spin_unlock(&binder_dead_nodes_lock);
|
||||
if (last_node)
|
||||
binder_put_node(last_node);
|
||||
|
||||
mutex_lock(&binder_procs_lock);
|
||||
hlist_for_each_entry(proc, &binder_procs, proc_node)
|
||||
print_binder_proc(m, proc, 1);
|
||||
print_binder_proc(m, proc, true, hash_ptrs);
|
||||
mutex_unlock(&binder_procs_lock);
|
||||
}
|
||||
|
||||
static void print_binder_transactions(struct seq_file *m, bool hash_ptrs)
|
||||
{
|
||||
struct binder_proc *proc;
|
||||
|
||||
seq_puts(m, "binder transactions:\n");
|
||||
mutex_lock(&binder_procs_lock);
|
||||
hlist_for_each_entry(proc, &binder_procs, proc_node)
|
||||
print_binder_proc(m, proc, false, hash_ptrs);
|
||||
mutex_unlock(&binder_procs_lock);
|
||||
}
|
||||
|
||||
int binder_state_show(struct seq_file *m, void *unused)
|
||||
{
|
||||
print_binder_state(m, false);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int binder_state_hashed_show(struct seq_file *m, void *unused)
|
||||
{
|
||||
print_binder_state(m, true);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -6799,14 +6854,13 @@ int binder_stats_show(struct seq_file *m, void *unused)
|
|||
|
||||
int binder_transactions_show(struct seq_file *m, void *unused)
|
||||
{
|
||||
struct binder_proc *proc;
|
||||
|
||||
seq_puts(m, "binder transactions:\n");
|
||||
mutex_lock(&binder_procs_lock);
|
||||
hlist_for_each_entry(proc, &binder_procs, proc_node)
|
||||
print_binder_proc(m, proc, 0);
|
||||
mutex_unlock(&binder_procs_lock);
|
||||
print_binder_transactions(m, false);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int binder_transactions_hashed_show(struct seq_file *m, void *unused)
|
||||
{
|
||||
print_binder_transactions(m, true);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -6819,7 +6873,7 @@ static int proc_show(struct seq_file *m, void *unused)
|
|||
hlist_for_each_entry(itr, &binder_procs, proc_node) {
|
||||
if (itr->pid == pid) {
|
||||
seq_puts(m, "binder proc state:\n");
|
||||
print_binder_proc(m, itr, 1);
|
||||
print_binder_proc(m, itr, true, false);
|
||||
}
|
||||
}
|
||||
mutex_unlock(&binder_procs_lock);
|
||||
|
|
@ -6940,6 +6994,11 @@ static int __init binder_init(void)
|
|||
binder_debugfs_dir_entry_root,
|
||||
NULL,
|
||||
&binder_state_fops);
|
||||
debugfs_create_file("state_hashed",
|
||||
0444,
|
||||
binder_debugfs_dir_entry_root,
|
||||
NULL,
|
||||
&binder_state_hashed_fops);
|
||||
debugfs_create_file("stats",
|
||||
0444,
|
||||
binder_debugfs_dir_entry_root,
|
||||
|
|
@ -6950,6 +7009,11 @@ static int __init binder_init(void)
|
|||
binder_debugfs_dir_entry_root,
|
||||
NULL,
|
||||
&binder_transactions_fops);
|
||||
debugfs_create_file("transactions_hashed",
|
||||
0444,
|
||||
binder_debugfs_dir_entry_root,
|
||||
NULL,
|
||||
&binder_transactions_hashed_fops);
|
||||
debugfs_create_file("transaction_log",
|
||||
0444,
|
||||
binder_debugfs_dir_entry_root,
|
||||
|
|
|
|||
|
|
@ -113,9 +113,15 @@ DEFINE_SHOW_ATTRIBUTE(binder_stats);
|
|||
int binder_state_show(struct seq_file *m, void *unused);
|
||||
DEFINE_SHOW_ATTRIBUTE(binder_state);
|
||||
|
||||
int binder_state_hashed_show(struct seq_file *m, void *unused);
|
||||
DEFINE_SHOW_ATTRIBUTE(binder_state_hashed);
|
||||
|
||||
int binder_transactions_show(struct seq_file *m, void *unused);
|
||||
DEFINE_SHOW_ATTRIBUTE(binder_transactions);
|
||||
|
||||
int binder_transactions_hashed_show(struct seq_file *m, void *unused);
|
||||
DEFINE_SHOW_ATTRIBUTE(binder_transactions_hashed);
|
||||
|
||||
int binder_transaction_log_show(struct seq_file *m, void *unused);
|
||||
DEFINE_SHOW_ATTRIBUTE(binder_transaction_log);
|
||||
|
||||
|
|
|
|||
|
|
@ -659,6 +659,13 @@ static int init_binder_logs(struct super_block *sb)
|
|||
goto out;
|
||||
}
|
||||
|
||||
dentry = binderfs_create_file(binder_logs_root_dir, "state_hashed",
|
||||
&binder_state_hashed_fops, NULL);
|
||||
if (IS_ERR(dentry)) {
|
||||
ret = PTR_ERR(dentry);
|
||||
goto out;
|
||||
}
|
||||
|
||||
dentry = binderfs_create_file(binder_logs_root_dir, "transactions",
|
||||
&binder_transactions_fops, NULL);
|
||||
if (IS_ERR(dentry)) {
|
||||
|
|
@ -666,6 +673,13 @@ static int init_binder_logs(struct super_block *sb)
|
|||
goto out;
|
||||
}
|
||||
|
||||
dentry = binderfs_create_file(binder_logs_root_dir, "transactions_hashed",
|
||||
&binder_transactions_hashed_fops, NULL);
|
||||
if (IS_ERR(dentry)) {
|
||||
ret = PTR_ERR(dentry);
|
||||
goto out;
|
||||
}
|
||||
|
||||
dentry = binderfs_create_file(binder_logs_root_dir,
|
||||
"transaction_log",
|
||||
&binder_transaction_log_fops,
|
||||
|
|
|
|||
|
|
@ -368,7 +368,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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -288,7 +288,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) {
|
||||
|
|
|
|||
|
|
@ -2509,7 +2509,7 @@ struct device *genpd_dev_pm_attach_by_id(struct device *dev,
|
|||
/* Verify that the index is within a valid range. */
|
||||
num_domains = of_count_phandle_with_args(dev->of_node, "power-domains",
|
||||
"#power-domain-cells");
|
||||
if (index >= num_domains)
|
||||
if (num_domains < 0 || index >= num_domains)
|
||||
return NULL;
|
||||
|
||||
/* Allocate and register device on the genpd bus. */
|
||||
|
|
|
|||
|
|
@ -972,6 +972,8 @@ static int device_resume(struct device *dev, pm_message_t state, bool async)
|
|||
if (!dev->power.is_suspended)
|
||||
goto Complete;
|
||||
|
||||
dev->power.is_suspended = false;
|
||||
|
||||
if (dev->power.direct_complete) {
|
||||
/* Match the pm_runtime_disable() in __device_suspend(). */
|
||||
pm_runtime_enable(dev);
|
||||
|
|
@ -1027,7 +1029,6 @@ static int device_resume(struct device *dev, pm_message_t state, bool async)
|
|||
|
||||
End:
|
||||
error = dpm_run_callback(callback, dev, state, info);
|
||||
dev->power.is_suspended = false;
|
||||
|
||||
device_unlock(dev);
|
||||
dpm_watchdog_clear(&wd);
|
||||
|
|
|
|||
|
|
@ -982,7 +982,7 @@ static enum hrtimer_restart pm_suspend_timer_fn(struct hrtimer *timer)
|
|||
* If 'expires' is after the current time, we've been called
|
||||
* too early.
|
||||
*/
|
||||
if (expires > 0 && expires < ktime_get_mono_fast_ns()) {
|
||||
if (expires > 0 && expires <= ktime_get_mono_fast_ns()) {
|
||||
dev->power.timer_expires = 0;
|
||||
rpm_suspend(dev, dev->power.timer_autosuspends ?
|
||||
(RPM_ASYNC | RPM_AUTO) : RPM_ASYNC);
|
||||
|
|
|
|||
|
|
@ -198,6 +198,7 @@ aoedev_downdev(struct aoedev *d)
|
|||
{
|
||||
struct aoetgt *t, **tt, **te;
|
||||
struct list_head *head, *pos, *nx;
|
||||
struct request *rq, *rqnext;
|
||||
int i;
|
||||
|
||||
d->flags &= ~DEVFL_UP;
|
||||
|
|
@ -223,6 +224,13 @@ aoedev_downdev(struct aoedev *d)
|
|||
/* clean out the in-process request (if any) */
|
||||
aoe_failip(d);
|
||||
|
||||
/* clean out any queued block requests */
|
||||
list_for_each_entry_safe(rq, rqnext, &d->rq_list, queuelist) {
|
||||
list_del_init(&rq->queuelist);
|
||||
blk_mq_start_request(rq);
|
||||
blk_mq_end_request(rq, BLK_STS_IOERR);
|
||||
}
|
||||
|
||||
/* fast fail all pending I/O */
|
||||
if (d->blkq) {
|
||||
/* UP is cleared, freeze+quiesce to insure all are errored */
|
||||
|
|
|
|||
|
|
@ -679,8 +679,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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -214,12 +214,19 @@ int __must_check fsl_mc_portal_allocate(struct fsl_mc_device *mc_dev,
|
|||
if (error < 0)
|
||||
goto error_cleanup_resource;
|
||||
|
||||
dpmcp_dev->consumer_link = device_link_add(&mc_dev->dev,
|
||||
&dpmcp_dev->dev,
|
||||
DL_FLAG_AUTOREMOVE_CONSUMER);
|
||||
if (!dpmcp_dev->consumer_link) {
|
||||
error = -EINVAL;
|
||||
goto error_cleanup_mc_io;
|
||||
/* If the DPRC device itself tries to allocate a portal (usually for
|
||||
* UAPI interaction), don't add a device link between them since the
|
||||
* DPMCP device is an actual child device of the DPRC and a reverse
|
||||
* dependency is not allowed.
|
||||
*/
|
||||
if (mc_dev != mc_bus_dev) {
|
||||
dpmcp_dev->consumer_link = device_link_add(&mc_dev->dev,
|
||||
&dpmcp_dev->dev,
|
||||
DL_FLAG_AUTOREMOVE_CONSUMER);
|
||||
if (!dpmcp_dev->consumer_link) {
|
||||
error = -EINVAL;
|
||||
goto error_cleanup_mc_io;
|
||||
}
|
||||
}
|
||||
|
||||
*new_mc_io = mc_io;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -602,51 +602,6 @@ static int sysc_parse_and_check_child_range(struct sysc *ddata)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* Interconnect instances to probe before l4_per instances */
|
||||
static struct resource early_bus_ranges[] = {
|
||||
/* am3/4 l4_wkup */
|
||||
{ .start = 0x44c00000, .end = 0x44c00000 + 0x300000, },
|
||||
/* omap4/5 and dra7 l4_cfg */
|
||||
{ .start = 0x4a000000, .end = 0x4a000000 + 0x300000, },
|
||||
/* omap4 l4_wkup */
|
||||
{ .start = 0x4a300000, .end = 0x4a300000 + 0x30000, },
|
||||
/* omap5 and dra7 l4_wkup without dra7 dcan segment */
|
||||
{ .start = 0x4ae00000, .end = 0x4ae00000 + 0x30000, },
|
||||
};
|
||||
|
||||
static atomic_t sysc_defer = ATOMIC_INIT(10);
|
||||
|
||||
/**
|
||||
* sysc_defer_non_critical - defer non_critical interconnect probing
|
||||
* @ddata: device driver data
|
||||
*
|
||||
* We want to probe l4_cfg and l4_wkup interconnect instances before any
|
||||
* l4_per instances as l4_per instances depend on resources on l4_cfg and
|
||||
* l4_wkup interconnects.
|
||||
*/
|
||||
static int sysc_defer_non_critical(struct sysc *ddata)
|
||||
{
|
||||
struct resource *res;
|
||||
int i;
|
||||
|
||||
if (!atomic_read(&sysc_defer))
|
||||
return 0;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(early_bus_ranges); i++) {
|
||||
res = &early_bus_ranges[i];
|
||||
if (ddata->module_pa >= res->start &&
|
||||
ddata->module_pa <= res->end) {
|
||||
atomic_set(&sysc_defer, 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
atomic_dec_if_positive(&sysc_defer);
|
||||
|
||||
return -EPROBE_DEFER;
|
||||
}
|
||||
|
||||
static struct device_node *stdout_path;
|
||||
|
||||
static void sysc_init_stdout_path(struct sysc *ddata)
|
||||
|
|
@ -871,10 +826,6 @@ static int sysc_map_and_check_registers(struct sysc *ddata)
|
|||
if (error)
|
||||
return error;
|
||||
|
||||
error = sysc_defer_non_critical(ddata);
|
||||
if (error)
|
||||
return error;
|
||||
|
||||
sysc_check_children(ddata);
|
||||
|
||||
error = sysc_parse_registers(ddata);
|
||||
|
|
|
|||
|
|
@ -429,6 +429,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)
|
||||
|
|
|
|||
|
|
@ -103,7 +103,9 @@ int __init clocksource_i8253_init(void)
|
|||
#ifdef CONFIG_CLKEVT_I8253
|
||||
void clockevent_i8253_disable(void)
|
||||
{
|
||||
raw_spin_lock(&i8253_lock);
|
||||
unsigned long flags;
|
||||
|
||||
raw_spin_lock_irqsave(&i8253_lock, flags);
|
||||
|
||||
/*
|
||||
* Writing the MODE register should stop the counter, according to
|
||||
|
|
@ -133,7 +135,7 @@ void clockevent_i8253_disable(void)
|
|||
|
||||
outb_p(0x30, PIT_MODE);
|
||||
|
||||
raw_spin_unlock(&i8253_lock);
|
||||
raw_spin_unlock_irqrestore(&i8253_lock, flags);
|
||||
}
|
||||
|
||||
static int pit_shutdown(struct clock_event_device *evt)
|
||||
|
|
|
|||
|
|
@ -2617,8 +2617,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;
|
||||
|
|
|
|||
|
|
@ -262,8 +262,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;
|
||||
|
|
|
|||
|
|
@ -447,6 +447,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;
|
||||
|
|
|
|||
|
|
@ -630,7 +630,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
|
||||
|
|
|
|||
|
|
@ -809,9 +809,9 @@ static int dmatest_func(void *data)
|
|||
} else {
|
||||
dma_async_issue_pending(chan);
|
||||
|
||||
wait_event_timeout(thread->done_wait,
|
||||
done->done,
|
||||
msecs_to_jiffies(params->timeout));
|
||||
wait_event_freezable_timeout(thread->done_wait,
|
||||
done->done,
|
||||
msecs_to_jiffies(params->timeout));
|
||||
|
||||
status = dma_async_is_tx_complete(chan, cookie, NULL,
|
||||
NULL);
|
||||
|
|
|
|||
|
|
@ -96,7 +96,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,
|
||||
|
|
@ -1103,9 +1103,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));
|
||||
|
|
@ -1807,9 +1804,9 @@ static ssize_t altr_edac_a10_device_trig(struct file *file,
|
|||
|
||||
local_irq_save(flags);
|
||||
if (trig_type == ALTR_UE_TRIGGER_CHAR)
|
||||
writel(priv->ue_set_mask, set_addr);
|
||||
writew(priv->ue_set_mask, set_addr);
|
||||
else
|
||||
writel(priv->ce_set_mask, set_addr);
|
||||
writew(priv->ce_set_mask, set_addr);
|
||||
|
||||
/* Ensure the interrupt test bits are set */
|
||||
wmb();
|
||||
|
|
@ -1839,7 +1836,7 @@ static ssize_t altr_edac_a10_device_trig2(struct file *file,
|
|||
|
||||
local_irq_save(flags);
|
||||
if (trig_type == ALTR_UE_TRIGGER_CHAR) {
|
||||
writel(priv->ue_set_mask, set_addr);
|
||||
writew(priv->ue_set_mask, set_addr);
|
||||
} else {
|
||||
/* Setup read/write of 4 bytes */
|
||||
writel(ECC_WORD_WRITE, drvdata->base + ECC_BLK_DBYTECTRL_OFST);
|
||||
|
|
@ -2213,6 +2210,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;
|
||||
|
|
|
|||
|
|
@ -249,6 +249,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
|
||||
|
|
|
|||
|
|
@ -398,10 +398,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, Coffee Lake seem to work like Skylake. Please re-visit
|
||||
|
|
@ -459,19 +458,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]);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -482,14 +472,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,
|
||||
|
|
|
|||
|
|
@ -112,6 +112,7 @@ EXPORT_SYMBOL_GPL(skx_adxl_get);
|
|||
|
||||
void skx_adxl_put(void)
|
||||
{
|
||||
adxl_component_count = 0;
|
||||
kfree(adxl_values);
|
||||
kfree(adxl_msg);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -610,8 +610,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;
|
||||
ret = init_fn(np);
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@
|
|||
/* V2 Defines */
|
||||
#define VSE_CVP_TX_CREDITS 0x49 /* 8bit */
|
||||
|
||||
#define V2_CREDIT_TIMEOUT_US 20000
|
||||
#define V2_CREDIT_TIMEOUT_US 40000
|
||||
#define V2_CHECK_CREDIT_US 10
|
||||
#define V2_POLL_TIMEOUT_US 1000000
|
||||
#define V2_USER_TIMEOUT_US 500000
|
||||
|
|
|
|||
|
|
@ -944,8 +944,6 @@ static void gfx_v10_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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2901,8 +2901,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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3992,8 +3992,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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1267,8 +1267,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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1472,8 +1472,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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -387,6 +387,10 @@ static void 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 = QUEUE_IS_ACTIVE(*q);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -277,6 +277,14 @@ struct kfd_process *kfd_create_process(struct file *filep)
|
|||
if (thread->group_leader->mm != thread->mm)
|
||||
return ERR_PTR(-EINVAL);
|
||||
|
||||
/* If the process just called exec(3), it is possible that the
|
||||
* cleanup of the kfd_process (following the release of the mm
|
||||
* of the old process image) is still in the cleanup work queue.
|
||||
* Make sure to drain any job before trying to recreate any
|
||||
* resource for this process.
|
||||
*/
|
||||
flush_workqueue(kfd_process_wq);
|
||||
|
||||
/*
|
||||
* take kfd processes mutex before starting of process creation
|
||||
* so there won't be a case where two threads of the same process
|
||||
|
|
@ -289,14 +297,6 @@ struct kfd_process *kfd_create_process(struct file *filep)
|
|||
if (process) {
|
||||
pr_debug("Process already found\n");
|
||||
} else {
|
||||
/* If the process just called exec(3), it is possible that the
|
||||
* cleanup of the kfd_process (following the release of the mm
|
||||
* of the old process image) is still in the cleanup work queue.
|
||||
* Make sure to drain any job before trying to recreate any
|
||||
* resource for this process.
|
||||
*/
|
||||
flush_workqueue(kfd_process_wq);
|
||||
|
||||
process = create_process(thread);
|
||||
if (IS_ERR(process))
|
||||
goto out;
|
||||
|
|
|
|||
|
|
@ -6505,16 +6505,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;
|
||||
|
|
@ -6522,9 +6526,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);
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ ifdef CONFIG_DRM_AMD_DC_DSC_SUPPORT
|
|||
DCN20 += dcn20_dsc.o
|
||||
endif
|
||||
|
||||
CFLAGS_$(AMDDALPATH)/dc/dcn20/dcn20_resource.o := -mhard-float -msse
|
||||
CFLAGS_$(AMDDALPATH)/dc/dcn20/dcn20_resource.o := $(if $(CONFIG_CC_IS_GCC), -mhard-float) -msse
|
||||
|
||||
ifdef CONFIG_CC_IS_GCC
|
||||
ifeq ($(call cc-ifversion, -lt, 0701, y), y)
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
DCN21 = dcn21_hubp.o dcn21_hubbub.o dcn21_resource.o
|
||||
|
||||
CFLAGS_$(AMDDALPATH)/dc/dcn21/dcn21_resource.o := -mhard-float -msse
|
||||
CFLAGS_$(AMDDALPATH)/dc/dcn21/dcn21_resource.o := $(if $(CONFIG_CC_IS_GCC), -mhard-float) -msse
|
||||
|
||||
ifdef CONFIG_CC_IS_GCC
|
||||
ifeq ($(call cc-ifversion, -lt, 0701, y), y)
|
||||
|
|
|
|||
|
|
@ -24,7 +24,8 @@
|
|||
# It provides the general basic services required by other DAL
|
||||
# subcomponents.
|
||||
|
||||
dml_ccflags := -mhard-float -msse
|
||||
dml_ccflags-$(CONFIG_CC_IS_GCC) := -mhard-float
|
||||
dml_ccflags := $(dml_ccflags-y) -msse
|
||||
|
||||
ifdef CONFIG_CC_IS_GCC
|
||||
ifeq ($(call cc-ifversion, -lt, 0701, y), y)
|
||||
|
|
|
|||
|
|
@ -1735,10 +1735,10 @@ analogix_dp_probe(struct device *dev, struct analogix_dp_plat_data *plat_data)
|
|||
* that we can get the current state of the GPIO.
|
||||
*/
|
||||
dp->irq = gpiod_to_irq(dp->hpd_gpiod);
|
||||
irq_flags = IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING;
|
||||
irq_flags = IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING | IRQF_NO_AUTOEN;
|
||||
} else {
|
||||
dp->irq = platform_get_irq(pdev, 0);
|
||||
irq_flags = 0;
|
||||
irq_flags = IRQF_NO_AUTOEN;
|
||||
}
|
||||
|
||||
if (dp->irq == -ENXIO) {
|
||||
|
|
@ -1755,7 +1755,6 @@ analogix_dp_probe(struct device *dev, struct analogix_dp_plat_data *plat_data)
|
|||
dev_err(&pdev->dev, "failed to request irq\n");
|
||||
goto err_disable_clk;
|
||||
}
|
||||
disable_irq(dp->irq);
|
||||
|
||||
return dp;
|
||||
|
||||
|
|
|
|||
|
|
@ -560,6 +560,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
|
||||
|
|
@ -717,6 +741,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;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -4645,6 +4645,7 @@ drm_reset_display_info(struct drm_connector *connector)
|
|||
info->has_hdmi_infoframe = false;
|
||||
info->rgb_quant_range_selectable = false;
|
||||
memset(&info->hdmi, 0, sizeof(info->hdmi));
|
||||
memset(&connector->hdr_sink_metadata, 0, sizeof(connector->hdr_sink_metadata));
|
||||
|
||||
info->non_desktop = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -223,7 +223,8 @@ 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;
|
||||
|
||||
static_assert(sizeof(header->signature) == sizeof(OPREGION_SIGNATURE) - 1);
|
||||
|
||||
gvt_dbg_core("init vgpu%d opregion\n", vgpu->id);
|
||||
vgpu_opregion(vgpu)->va = (void *)__get_free_pages(GFP_KERNEL |
|
||||
|
|
@ -237,8 +238,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;
|
||||
|
|
|
|||
|
|
@ -337,12 +337,13 @@ static void mtk_dpi_config_swap_input(struct mtk_dpi *dpi, bool enable)
|
|||
|
||||
static void mtk_dpi_config_2n_h_fre(struct mtk_dpi *dpi)
|
||||
{
|
||||
mtk_dpi_mask(dpi, dpi->conf->reg_h_fre_con, H_FRE_2N, H_FRE_2N);
|
||||
if (dpi->conf->reg_h_fre_con)
|
||||
mtk_dpi_mask(dpi, dpi->conf->reg_h_fre_con, H_FRE_2N, H_FRE_2N);
|
||||
}
|
||||
|
||||
static void mtk_dpi_config_disable_edge(struct mtk_dpi *dpi)
|
||||
{
|
||||
if (dpi->conf->edge_sel_en)
|
||||
if (dpi->conf->edge_sel_en && dpi->conf->reg_h_fre_con)
|
||||
mtk_dpi_mask(dpi, dpi->conf->reg_h_fre_con, 0, EDGE_SEL_EN);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ static int a6xx_hfi_wait_for_ack(struct a6xx_gmu *gmu, u32 id, u32 seqnum,
|
|||
|
||||
/* Wait for a response */
|
||||
ret = gmu_poll_timeout(gmu, REG_A6XX_GMU_GMU2HOST_INTR_INFO, val,
|
||||
val & A6XX_GMU_GMU2HOST_INTR_INFO_MSGQ, 100, 5000);
|
||||
val & A6XX_GMU_GMU2HOST_INTR_INFO_MSGQ, 100, 1000000);
|
||||
|
||||
if (ret) {
|
||||
DRM_DEV_ERROR(gmu->dev,
|
||||
|
|
|
|||
|
|
@ -107,11 +107,15 @@ static int msm_hdmi_i2c_xfer(struct i2c_adapter *i2c,
|
|||
if (num == 0)
|
||||
return num;
|
||||
|
||||
ret = pm_runtime_resume_and_get(&hdmi->pdev->dev);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
init_ddc(hdmi_i2c);
|
||||
|
||||
ret = ddc_clear_irq(hdmi_i2c);
|
||||
if (ret)
|
||||
return ret;
|
||||
goto fail;
|
||||
|
||||
for (i = 0; i < num; i++) {
|
||||
struct i2c_msg *p = &msgs[i];
|
||||
|
|
@ -169,7 +173,7 @@ static int msm_hdmi_i2c_xfer(struct i2c_adapter *i2c,
|
|||
hdmi_read(hdmi, REG_HDMI_DDC_SW_STATUS),
|
||||
hdmi_read(hdmi, REG_HDMI_DDC_HW_STATUS),
|
||||
hdmi_read(hdmi, REG_HDMI_DDC_INT_CTRL));
|
||||
return ret;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
ddc_status = hdmi_read(hdmi, REG_HDMI_DDC_SW_STATUS);
|
||||
|
|
@ -202,7 +206,13 @@ static int msm_hdmi_i2c_xfer(struct i2c_adapter *i2c,
|
|||
}
|
||||
}
|
||||
|
||||
pm_runtime_put(&hdmi->pdev->dev);
|
||||
|
||||
return i;
|
||||
|
||||
fail:
|
||||
pm_runtime_put(&hdmi->pdev->dev);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static u32 msm_hdmi_i2c_func(struct i2c_adapter *adapter)
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@
|
|||
#include "nouveau_connector.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 nouveau_backlight {
|
||||
struct backlight_device *dev;
|
||||
|
|
|
|||
|
|
@ -567,7 +567,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
|
||||
|
|
@ -601,13 +601,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);
|
||||
|
||||
|
|
|
|||
|
|
@ -211,6 +211,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;
|
||||
|
|
@ -218,7 +223,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);
|
||||
|
|
|
|||
|
|
@ -187,7 +187,7 @@ static int vkms_crtc_atomic_check(struct drm_crtc *crtc,
|
|||
i++;
|
||||
}
|
||||
|
||||
vkms_state->active_planes = kcalloc(i, sizeof(plane), GFP_KERNEL);
|
||||
vkms_state->active_planes = kcalloc(i, sizeof(*vkms_state->active_planes), GFP_KERNEL);
|
||||
if (!vkms_state->active_planes)
|
||||
return -ENOMEM;
|
||||
vkms_state->num_active_planes = i;
|
||||
|
|
|
|||
|
|
@ -3621,6 +3621,23 @@ static int vmw_execbuf_tie_context(struct vmw_private *dev_priv,
|
|||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* 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, void *kernel_commands,
|
||||
|
|
@ -3814,6 +3831,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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -197,7 +197,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;
|
||||
|
|
@ -213,7 +214,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));
|
||||
|
|
|
|||
|
|
@ -40,6 +40,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
|
||||
|
||||
|
|
|
|||
|
|
@ -27,6 +27,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 },
|
||||
|
|
|
|||
|
|
@ -984,12 +984,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);
|
||||
|
||||
|
|
@ -1011,20 +1010,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);
|
||||
|
|
@ -1052,6 +1050,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;
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue