Merge "Merge android-4.14-p.85 (e48b7f2) into msm-4.14"
This commit is contained in:
committed by
Gerrit - the friendly Code Review server
commit
be9a6fdb2f
@@ -1020,7 +1020,7 @@
|
||||
earlyprintk=serial[,0x...[,baudrate]]
|
||||
earlyprintk=ttySn[,baudrate]
|
||||
earlyprintk=dbgp[debugController#]
|
||||
earlyprintk=pciserial,bus:device.function[,baudrate]
|
||||
earlyprintk=pciserial[,force],bus:device.function[,baudrate]
|
||||
earlyprintk=xdbc[xhciController#]
|
||||
|
||||
earlyprintk is useful when the kernel crashes before
|
||||
@@ -1052,6 +1052,10 @@
|
||||
|
||||
The sclp output can only be used on s390.
|
||||
|
||||
The optional "force" to "pciserial" enables use of a
|
||||
PCI device even when its classcode is not of the
|
||||
UART class.
|
||||
|
||||
edac_report= [HW,EDAC] Control how to report EDAC event
|
||||
Format: {"on" | "off" | "force"}
|
||||
on: enable EDAC to report H/W event. May be overridden
|
||||
|
||||
@@ -18,7 +18,7 @@ Example:
|
||||
reg = <1>;
|
||||
clocks = <&clk32m>;
|
||||
interrupt-parent = <&gpio4>;
|
||||
interrupts = <13 IRQ_TYPE_EDGE_RISING>;
|
||||
interrupts = <13 IRQ_TYPE_LEVEL_HIGH>;
|
||||
vdd-supply = <®5v0>;
|
||||
xceiver-supply = <®5v0>;
|
||||
};
|
||||
|
||||
@@ -34,7 +34,9 @@ Currently, these files are in /proc/sys/fs:
|
||||
- overflowgid
|
||||
- pipe-user-pages-hard
|
||||
- pipe-user-pages-soft
|
||||
- protected_fifos
|
||||
- protected_hardlinks
|
||||
- protected_regular
|
||||
- protected_symlinks
|
||||
- suid_dumpable
|
||||
- super-max
|
||||
@@ -182,6 +184,24 @@ applied.
|
||||
|
||||
==============================================================
|
||||
|
||||
protected_fifos:
|
||||
|
||||
The intent of this protection is to avoid unintentional writes to
|
||||
an attacker-controlled FIFO, where a program expected to create a regular
|
||||
file.
|
||||
|
||||
When set to "0", writing to FIFOs is unrestricted.
|
||||
|
||||
When set to "1" don't allow O_CREAT open on FIFOs that we don't own
|
||||
in world writable sticky directories, unless they are owned by the
|
||||
owner of the directory.
|
||||
|
||||
When set to "2" it also applies to group writable sticky directories.
|
||||
|
||||
This protection is based on the restrictions in Openwall.
|
||||
|
||||
==============================================================
|
||||
|
||||
protected_hardlinks:
|
||||
|
||||
A long-standing class of security issues is the hardlink-based
|
||||
@@ -202,6 +222,22 @@ This protection is based on the restrictions in Openwall and grsecurity.
|
||||
|
||||
==============================================================
|
||||
|
||||
protected_regular:
|
||||
|
||||
This protection is similar to protected_fifos, but it
|
||||
avoids writes to an attacker-controlled regular file, where a program
|
||||
expected to create one.
|
||||
|
||||
When set to "0", writing to regular files is unrestricted.
|
||||
|
||||
When set to "1" don't allow O_CREAT open on regular files that we
|
||||
don't own in world writable sticky directories, unless they are
|
||||
owned by the owner of the directory.
|
||||
|
||||
When set to "2" it also applies to group writable sticky directories.
|
||||
|
||||
==============================================================
|
||||
|
||||
protected_symlinks:
|
||||
|
||||
A long-standing class of security issues is the symlink-based
|
||||
|
||||
@@ -4,8 +4,9 @@ Virtual memory map with 4 level page tables:
|
||||
0000000000000000 - 00007fffffffffff (=47 bits) user space, different per mm
|
||||
hole caused by [47:63] sign extension
|
||||
ffff800000000000 - ffff87ffffffffff (=43 bits) guard hole, reserved for hypervisor
|
||||
ffff880000000000 - ffffc7ffffffffff (=64 TB) direct mapping of all phys. memory
|
||||
ffffc80000000000 - ffffc8ffffffffff (=40 bits) hole
|
||||
ffff880000000000 - ffff887fffffffff (=39 bits) LDT remap for PTI
|
||||
ffff888000000000 - ffffc87fffffffff (=64 TB) direct mapping of all phys. memory
|
||||
ffffc88000000000 - ffffc8ffffffffff (=39 bits) hole
|
||||
ffffc90000000000 - ffffe8ffffffffff (=45 bits) vmalloc/ioremap space
|
||||
ffffe90000000000 - ffffe9ffffffffff (=40 bits) hole
|
||||
ffffea0000000000 - ffffeaffffffffff (=40 bits) virtual memory map (1TB)
|
||||
@@ -30,8 +31,9 @@ Virtual memory map with 5 level page tables:
|
||||
0000000000000000 - 00ffffffffffffff (=56 bits) user space, different per mm
|
||||
hole caused by [56:63] sign extension
|
||||
ff00000000000000 - ff0fffffffffffff (=52 bits) guard hole, reserved for hypervisor
|
||||
ff10000000000000 - ff8fffffffffffff (=55 bits) direct mapping of all phys. memory
|
||||
ff90000000000000 - ff9fffffffffffff (=52 bits) LDT remap for PTI
|
||||
ff10000000000000 - ff10ffffffffffff (=48 bits) LDT remap for PTI
|
||||
ff11000000000000 - ff90ffffffffffff (=55 bits) direct mapping of all phys. memory
|
||||
ff91000000000000 - ff9fffffffffffff (=3840 TB) hole
|
||||
ffa0000000000000 - ffd1ffffffffffff (=54 bits) vmalloc/ioremap space (12800 TB)
|
||||
ffd2000000000000 - ffd3ffffffffffff (=49 bits) hole
|
||||
ffd4000000000000 - ffd5ffffffffffff (=49 bits) virtual memory map (512TB)
|
||||
|
||||
@@ -12662,6 +12662,7 @@ F: arch/alpha/kernel/srm_env.c
|
||||
|
||||
STABLE BRANCH
|
||||
M: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
M: Sasha Levin <sashal@kernel.org>
|
||||
L: stable@vger.kernel.org
|
||||
S: Supported
|
||||
F: Documentation/process/stable-kernel-rules.rst
|
||||
|
||||
6
Makefile
6
Makefile
@@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 4
|
||||
PATCHLEVEL = 14
|
||||
SUBLEVEL = 83
|
||||
SUBLEVEL = 85
|
||||
EXTRAVERSION =
|
||||
NAME = Petit Gorille
|
||||
|
||||
@@ -496,8 +496,8 @@ endif
|
||||
ifneq ($(GCC_TOOLCHAIN),)
|
||||
CLANG_GCC_TC := --gcc-toolchain=$(GCC_TOOLCHAIN)
|
||||
endif
|
||||
KBUILD_CFLAGS += $(CLANG_TARGET) $(CLANG_GCC_TC)
|
||||
KBUILD_AFLAGS += $(CLANG_TARGET) $(CLANG_GCC_TC)
|
||||
KBUILD_CFLAGS += $(CLANG_TARGET) $(CLANG_GCC_TC) $(CLANG_PREFIX)
|
||||
KBUILD_AFLAGS += $(CLANG_TARGET) $(CLANG_GCC_TC) $(CLANG_PREFIX)
|
||||
KBUILD_CFLAGS += $(call cc-option, -no-integrated-as)
|
||||
KBUILD_AFLAGS += $(call cc-option, -no-integrated-as)
|
||||
endif
|
||||
|
||||
@@ -109,7 +109,7 @@ tune-$(CONFIG_CPU_V6K) =$(call cc-option,-mtune=arm1136j-s,-mtune=strongarm)
|
||||
tune-y := $(tune-y)
|
||||
|
||||
ifeq ($(CONFIG_AEABI),y)
|
||||
CFLAGS_ABI :=-mabi=aapcs-linux $(call cc-option,-mno-thumb-interwork,) -mfpu=vfp
|
||||
CFLAGS_ABI :=-mabi=aapcs-linux -mfpu=vfp
|
||||
else
|
||||
CFLAGS_ABI :=$(call cc-option,-mapcs-32,-mabi=apcs-gnu) $(call cc-option,-mno-thumb-interwork,)
|
||||
endif
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
aliases {
|
||||
/* Assign 20 so we don't get confused w/ builtin ones */
|
||||
i2c20 = "/spi@12d40000/cros-ec@0/i2c-tunnel";
|
||||
i2c20 = &i2c_tunnel;
|
||||
};
|
||||
|
||||
backlight: backlight {
|
||||
@@ -952,7 +952,7 @@
|
||||
samsung,spi-feedback-delay = <1>;
|
||||
};
|
||||
|
||||
i2c-tunnel {
|
||||
i2c_tunnel: i2c-tunnel {
|
||||
compatible = "google,cros-ec-i2c-tunnel";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
aliases {
|
||||
/* Assign 20 so we don't get confused w/ builtin ones */
|
||||
i2c20 = "/spi@12d40000/cros-ec@0/i2c-tunnel";
|
||||
i2c20 = &i2c_tunnel;
|
||||
};
|
||||
|
||||
backlight: backlight {
|
||||
@@ -921,7 +921,7 @@
|
||||
samsung,spi-feedback-delay = <1>;
|
||||
};
|
||||
|
||||
i2c-tunnel {
|
||||
i2c_tunnel: i2c-tunnel {
|
||||
compatible = "google,cros-ec-i2c-tunnel";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
@@ -31,21 +31,25 @@
|
||||
|
||||
static unsigned long cpu_boot_addr;
|
||||
|
||||
static void __naked tf_generic_smc(u32 type, u32 arg1, u32 arg2)
|
||||
static void tf_generic_smc(u32 type, u32 arg1, u32 arg2)
|
||||
{
|
||||
register u32 r0 asm("r0") = type;
|
||||
register u32 r1 asm("r1") = arg1;
|
||||
register u32 r2 asm("r2") = arg2;
|
||||
|
||||
asm volatile(
|
||||
".arch_extension sec\n\t"
|
||||
"stmfd sp!, {r4 - r11, lr}\n\t"
|
||||
"stmfd sp!, {r4 - r11}\n\t"
|
||||
__asmeq("%0", "r0")
|
||||
__asmeq("%1", "r1")
|
||||
__asmeq("%2", "r2")
|
||||
"mov r3, #0\n\t"
|
||||
"mov r4, #0\n\t"
|
||||
"smc #0\n\t"
|
||||
"ldmfd sp!, {r4 - r11, pc}"
|
||||
"ldmfd sp!, {r4 - r11}\n\t"
|
||||
:
|
||||
: "r" (type), "r" (arg1), "r" (arg2)
|
||||
: "memory");
|
||||
: "r" (r0), "r" (r1), "r" (r2)
|
||||
: "memory", "r3", "r12", "lr");
|
||||
}
|
||||
|
||||
static int tf_set_cpu_boot_addr(int cpu, unsigned long boot_addr)
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#
|
||||
# Copyright (C) 1995-2001 by Russell King
|
||||
|
||||
LDFLAGS_vmlinux :=-p --no-undefined -X
|
||||
LDFLAGS_vmlinux :=--no-undefined -X
|
||||
CPPFLAGS_vmlinux.lds = -DTEXT_OFFSET=$(TEXT_OFFSET)
|
||||
GZFLAGS :=-9
|
||||
|
||||
|
||||
@@ -93,6 +93,7 @@ static inline unsigned long __percpu_##op(void *ptr, \
|
||||
: [val] "Ir" (val)); \
|
||||
break; \
|
||||
default: \
|
||||
ret = 0; \
|
||||
BUILD_BUG(); \
|
||||
} \
|
||||
\
|
||||
@@ -122,6 +123,7 @@ static inline unsigned long __percpu_read(void *ptr, int size)
|
||||
ret = READ_ONCE(*(u64 *)ptr);
|
||||
break;
|
||||
default:
|
||||
ret = 0;
|
||||
BUILD_BUG();
|
||||
}
|
||||
|
||||
@@ -191,6 +193,7 @@ static inline unsigned long __percpu_xchg(void *ptr, unsigned long val,
|
||||
: [val] "r" (val));
|
||||
break;
|
||||
default:
|
||||
ret = 0;
|
||||
BUILD_BUG();
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,9 @@
|
||||
#include <linux/slab.h>
|
||||
#include <linux/stop_machine.h>
|
||||
#include <linux/sched/debug.h>
|
||||
#include <linux/set_memory.h>
|
||||
#include <linux/stringify.h>
|
||||
#include <linux/vmalloc.h>
|
||||
#include <asm/traps.h>
|
||||
#include <asm/ptrace.h>
|
||||
#include <asm/cacheflush.h>
|
||||
@@ -42,10 +44,21 @@ DEFINE_PER_CPU(struct kprobe_ctlblk, kprobe_ctlblk);
|
||||
static void __kprobes
|
||||
post_kprobe_handler(struct kprobe_ctlblk *, struct pt_regs *);
|
||||
|
||||
static int __kprobes patch_text(kprobe_opcode_t *addr, u32 opcode)
|
||||
{
|
||||
void *addrs[1];
|
||||
u32 insns[1];
|
||||
|
||||
addrs[0] = addr;
|
||||
insns[0] = opcode;
|
||||
|
||||
return aarch64_insn_patch_text(addrs, insns, 1);
|
||||
}
|
||||
|
||||
static void __kprobes arch_prepare_ss_slot(struct kprobe *p)
|
||||
{
|
||||
/* prepare insn slot */
|
||||
p->ainsn.api.insn[0] = cpu_to_le32(p->opcode);
|
||||
patch_text(p->ainsn.api.insn, p->opcode);
|
||||
|
||||
flush_icache_range((uintptr_t) (p->ainsn.api.insn),
|
||||
(uintptr_t) (p->ainsn.api.insn) +
|
||||
@@ -118,15 +131,15 @@ int __kprobes arch_prepare_kprobe(struct kprobe *p)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int __kprobes patch_text(kprobe_opcode_t *addr, u32 opcode)
|
||||
void *alloc_insn_page(void)
|
||||
{
|
||||
void *addrs[1];
|
||||
u32 insns[1];
|
||||
void *page;
|
||||
|
||||
addrs[0] = (void *)addr;
|
||||
insns[0] = (u32)opcode;
|
||||
page = vmalloc_exec(PAGE_SIZE);
|
||||
if (page)
|
||||
set_memory_ro((unsigned long)page, 1);
|
||||
|
||||
return aarch64_insn_patch_text(addrs, insns, 1);
|
||||
return page;
|
||||
}
|
||||
|
||||
/* arm kprobe: install breakpoint in text */
|
||||
|
||||
@@ -140,6 +140,7 @@ CONFIG_RTC_CLASS=y
|
||||
CONFIG_RTC_DRV_DS1307=y
|
||||
CONFIG_STAGING=y
|
||||
CONFIG_OCTEON_ETHERNET=y
|
||||
CONFIG_OCTEON_USB=y
|
||||
# CONFIG_IOMMU_SUPPORT is not set
|
||||
CONFIG_RAS=y
|
||||
CONFIG_EXT4_FS=y
|
||||
|
||||
@@ -287,19 +287,13 @@ extern void _memcpy_toio(volatile void __iomem *dest, const void *src,
|
||||
* their hooks, a bitfield is reserved for use by the platform near the
|
||||
* top of MMIO addresses (not PIO, those have to cope the hard way).
|
||||
*
|
||||
* This bit field is 12 bits and is at the top of the IO virtual
|
||||
* addresses PCI_IO_INDIRECT_TOKEN_MASK.
|
||||
* The highest address in the kernel virtual space are:
|
||||
*
|
||||
* The kernel virtual space is thus:
|
||||
* d0003fffffffffff # with Hash MMU
|
||||
* c00fffffffffffff # with Radix MMU
|
||||
*
|
||||
* 0xD000000000000000 : vmalloc
|
||||
* 0xD000080000000000 : PCI PHB IO space
|
||||
* 0xD000080080000000 : ioremap
|
||||
* 0xD0000fffffffffff : end of ioremap region
|
||||
*
|
||||
* Since the top 4 bits are reserved as the region ID, we use thus
|
||||
* the next 12 bits and keep 4 bits available for the future if the
|
||||
* virtual address space is ever to be extended.
|
||||
* The top 4 bits are reserved as the region ID on hash, leaving us 8 bits
|
||||
* that can be used for the field.
|
||||
*
|
||||
* The direct IO mapping operations will then mask off those bits
|
||||
* before doing the actual access, though that only happen when
|
||||
@@ -311,8 +305,8 @@ extern void _memcpy_toio(volatile void __iomem *dest, const void *src,
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_PPC_INDIRECT_MMIO
|
||||
#define PCI_IO_IND_TOKEN_MASK 0x0fff000000000000ul
|
||||
#define PCI_IO_IND_TOKEN_SHIFT 48
|
||||
#define PCI_IO_IND_TOKEN_SHIFT 52
|
||||
#define PCI_IO_IND_TOKEN_MASK (0xfful << PCI_IO_IND_TOKEN_SHIFT)
|
||||
#define PCI_FIX_ADDR(addr) \
|
||||
((PCI_IO_ADDR)(((unsigned long)(addr)) & ~PCI_IO_IND_TOKEN_MASK))
|
||||
#define PCI_GET_ADDR_TOKEN(addr) \
|
||||
|
||||
@@ -6,8 +6,6 @@
|
||||
|
||||
#undef TRACE_SYSTEM
|
||||
#define TRACE_SYSTEM kvm
|
||||
#define TRACE_INCLUDE_PATH .
|
||||
#define TRACE_INCLUDE_FILE trace
|
||||
|
||||
/*
|
||||
* Tracepoint for guest mode entry.
|
||||
@@ -120,4 +118,10 @@ TRACE_EVENT(kvm_check_requests,
|
||||
#endif /* _TRACE_KVM_H */
|
||||
|
||||
/* This part must be outside protection */
|
||||
#undef TRACE_INCLUDE_PATH
|
||||
#undef TRACE_INCLUDE_FILE
|
||||
|
||||
#define TRACE_INCLUDE_PATH .
|
||||
#define TRACE_INCLUDE_FILE trace
|
||||
|
||||
#include <trace/define_trace.h>
|
||||
|
||||
@@ -6,8 +6,6 @@
|
||||
|
||||
#undef TRACE_SYSTEM
|
||||
#define TRACE_SYSTEM kvm_booke
|
||||
#define TRACE_INCLUDE_PATH .
|
||||
#define TRACE_INCLUDE_FILE trace_booke
|
||||
|
||||
#define kvm_trace_symbol_exit \
|
||||
{0, "CRITICAL"}, \
|
||||
@@ -218,4 +216,11 @@ TRACE_EVENT(kvm_booke_queue_irqprio,
|
||||
#endif
|
||||
|
||||
/* This part must be outside protection */
|
||||
|
||||
#undef TRACE_INCLUDE_PATH
|
||||
#undef TRACE_INCLUDE_FILE
|
||||
|
||||
#define TRACE_INCLUDE_PATH .
|
||||
#define TRACE_INCLUDE_FILE trace_booke
|
||||
|
||||
#include <trace/define_trace.h>
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
|
||||
#undef TRACE_SYSTEM
|
||||
#define TRACE_SYSTEM kvm_hv
|
||||
#define TRACE_INCLUDE_PATH .
|
||||
#define TRACE_INCLUDE_FILE trace_hv
|
||||
|
||||
#define kvm_trace_symbol_hcall \
|
||||
{H_REMOVE, "H_REMOVE"}, \
|
||||
@@ -497,4 +495,11 @@ TRACE_EVENT(kvmppc_run_vcpu_exit,
|
||||
#endif /* _TRACE_KVM_HV_H */
|
||||
|
||||
/* This part must be outside protection */
|
||||
|
||||
#undef TRACE_INCLUDE_PATH
|
||||
#undef TRACE_INCLUDE_FILE
|
||||
|
||||
#define TRACE_INCLUDE_PATH .
|
||||
#define TRACE_INCLUDE_FILE trace_hv
|
||||
|
||||
#include <trace/define_trace.h>
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
|
||||
#undef TRACE_SYSTEM
|
||||
#define TRACE_SYSTEM kvm_pr
|
||||
#define TRACE_INCLUDE_PATH .
|
||||
#define TRACE_INCLUDE_FILE trace_pr
|
||||
|
||||
TRACE_EVENT(kvm_book3s_reenter,
|
||||
TP_PROTO(int r, struct kvm_vcpu *vcpu),
|
||||
@@ -272,4 +270,11 @@ TRACE_EVENT(kvm_unmap_hva,
|
||||
#endif /* _TRACE_KVM_H */
|
||||
|
||||
/* This part must be outside protection */
|
||||
|
||||
#undef TRACE_INCLUDE_PATH
|
||||
#undef TRACE_INCLUDE_FILE
|
||||
|
||||
#define TRACE_INCLUDE_PATH .
|
||||
#define TRACE_INCLUDE_FILE trace_pr
|
||||
|
||||
#include <trace/define_trace.h>
|
||||
|
||||
@@ -1261,7 +1261,7 @@ static long vphn_get_associativity(unsigned long cpu,
|
||||
|
||||
switch (rc) {
|
||||
case H_FUNCTION:
|
||||
printk(KERN_INFO
|
||||
printk_once(KERN_INFO
|
||||
"VPHN is not supported. Disabling polling...\n");
|
||||
stop_topology_update();
|
||||
break;
|
||||
|
||||
@@ -376,7 +376,7 @@ static int __hw_perf_event_init(struct perf_event *event)
|
||||
return -ENOENT;
|
||||
|
||||
if (ev > PERF_CPUM_CF_MAX_CTR)
|
||||
return -EINVAL;
|
||||
return -ENOENT;
|
||||
|
||||
/* Obtain the counter set to which the specified counter belongs */
|
||||
set = get_counter_set(ev);
|
||||
|
||||
@@ -33,7 +33,7 @@ UBSAN_SANITIZE := n
|
||||
$(obj)/vdso32_wrapper.o : $(obj)/vdso32.so
|
||||
|
||||
# link rule for the .so file, .lds has to be first
|
||||
$(obj)/vdso32.so.dbg: $(src)/vdso32.lds $(obj-vdso32)
|
||||
$(obj)/vdso32.so.dbg: $(src)/vdso32.lds $(obj-vdso32) FORCE
|
||||
$(call if_changed,vdso32ld)
|
||||
|
||||
# strip rule for the .so file
|
||||
@@ -42,12 +42,12 @@ $(obj)/%.so: $(obj)/%.so.dbg FORCE
|
||||
$(call if_changed,objcopy)
|
||||
|
||||
# assembly rules for the .S files
|
||||
$(obj-vdso32): %.o: %.S
|
||||
$(obj-vdso32): %.o: %.S FORCE
|
||||
$(call if_changed_dep,vdso32as)
|
||||
|
||||
# actual build commands
|
||||
quiet_cmd_vdso32ld = VDSO32L $@
|
||||
cmd_vdso32ld = $(CC) $(c_flags) -Wl,-T $^ -o $@
|
||||
cmd_vdso32ld = $(CC) $(c_flags) -Wl,-T $(filter %.lds %.o,$^) -o $@
|
||||
quiet_cmd_vdso32as = VDSO32A $@
|
||||
cmd_vdso32as = $(CC) $(a_flags) -c -o $@ $<
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ UBSAN_SANITIZE := n
|
||||
$(obj)/vdso64_wrapper.o : $(obj)/vdso64.so
|
||||
|
||||
# link rule for the .so file, .lds has to be first
|
||||
$(obj)/vdso64.so.dbg: $(src)/vdso64.lds $(obj-vdso64)
|
||||
$(obj)/vdso64.so.dbg: $(src)/vdso64.lds $(obj-vdso64) FORCE
|
||||
$(call if_changed,vdso64ld)
|
||||
|
||||
# strip rule for the .so file
|
||||
@@ -42,12 +42,12 @@ $(obj)/%.so: $(obj)/%.so.dbg FORCE
|
||||
$(call if_changed,objcopy)
|
||||
|
||||
# assembly rules for the .S files
|
||||
$(obj-vdso64): %.o: %.S
|
||||
$(obj-vdso64): %.o: %.S FORCE
|
||||
$(call if_changed_dep,vdso64as)
|
||||
|
||||
# actual build commands
|
||||
quiet_cmd_vdso64ld = VDSO64L $@
|
||||
cmd_vdso64ld = $(CC) $(c_flags) -Wl,-T $^ -o $@
|
||||
cmd_vdso64ld = $(CC) $(c_flags) -Wl,-T $(filter %.lds %.o,$^) -o $@
|
||||
quiet_cmd_vdso64as = VDSO64A $@
|
||||
cmd_vdso64as = $(CC) $(a_flags) -c -o $@ $<
|
||||
|
||||
|
||||
@@ -689,6 +689,8 @@ void gmap_discard(struct gmap *gmap, unsigned long from, unsigned long to)
|
||||
vmaddr |= gaddr & ~PMD_MASK;
|
||||
/* Find vma in the parent mm */
|
||||
vma = find_vma(gmap->mm, vmaddr);
|
||||
if (!vma)
|
||||
continue;
|
||||
size = min(to - gaddr, PMD_SIZE - (gaddr & ~PMD_MASK));
|
||||
zap_page_range(vma, vmaddr, size);
|
||||
}
|
||||
|
||||
@@ -54,6 +54,7 @@ int __node_distance(int a, int b)
|
||||
{
|
||||
return mode->distance ? mode->distance(a, b) : 0;
|
||||
}
|
||||
EXPORT_SYMBOL(__node_distance);
|
||||
|
||||
int numa_debug_enabled;
|
||||
|
||||
|
||||
@@ -611,6 +611,9 @@ int start_idle_thread(void *stack, jmp_buf *switch_buf)
|
||||
}
|
||||
longjmp(*switch_buf, 1);
|
||||
|
||||
/* unreachable */
|
||||
printk(UM_KERN_ERR "impossible long jump!");
|
||||
fatal_sigsegv();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,25 @@
|
||||
#define PCI_DEVICE_ID_INTEL_SKL_HQ_IMC 0x1910
|
||||
#define PCI_DEVICE_ID_INTEL_SKL_SD_IMC 0x190f
|
||||
#define PCI_DEVICE_ID_INTEL_SKL_SQ_IMC 0x191f
|
||||
#define PCI_DEVICE_ID_INTEL_KBL_Y_IMC 0x590c
|
||||
#define PCI_DEVICE_ID_INTEL_KBL_U_IMC 0x5904
|
||||
#define PCI_DEVICE_ID_INTEL_KBL_UQ_IMC 0x5914
|
||||
#define PCI_DEVICE_ID_INTEL_KBL_SD_IMC 0x590f
|
||||
#define PCI_DEVICE_ID_INTEL_KBL_SQ_IMC 0x591f
|
||||
#define PCI_DEVICE_ID_INTEL_CFL_2U_IMC 0x3ecc
|
||||
#define PCI_DEVICE_ID_INTEL_CFL_4U_IMC 0x3ed0
|
||||
#define PCI_DEVICE_ID_INTEL_CFL_4H_IMC 0x3e10
|
||||
#define PCI_DEVICE_ID_INTEL_CFL_6H_IMC 0x3ec4
|
||||
#define PCI_DEVICE_ID_INTEL_CFL_2S_D_IMC 0x3e0f
|
||||
#define PCI_DEVICE_ID_INTEL_CFL_4S_D_IMC 0x3e1f
|
||||
#define PCI_DEVICE_ID_INTEL_CFL_6S_D_IMC 0x3ec2
|
||||
#define PCI_DEVICE_ID_INTEL_CFL_8S_D_IMC 0x3e30
|
||||
#define PCI_DEVICE_ID_INTEL_CFL_4S_W_IMC 0x3e18
|
||||
#define PCI_DEVICE_ID_INTEL_CFL_6S_W_IMC 0x3ec6
|
||||
#define PCI_DEVICE_ID_INTEL_CFL_8S_W_IMC 0x3e31
|
||||
#define PCI_DEVICE_ID_INTEL_CFL_4S_S_IMC 0x3e33
|
||||
#define PCI_DEVICE_ID_INTEL_CFL_6S_S_IMC 0x3eca
|
||||
#define PCI_DEVICE_ID_INTEL_CFL_8S_S_IMC 0x3e32
|
||||
|
||||
/* SNB event control */
|
||||
#define SNB_UNC_CTL_EV_SEL_MASK 0x000000ff
|
||||
@@ -632,7 +651,82 @@ static const struct pci_device_id skl_uncore_pci_ids[] = {
|
||||
PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_SKL_SQ_IMC),
|
||||
.driver_data = UNCORE_PCI_DEV_DATA(SNB_PCI_UNCORE_IMC, 0),
|
||||
},
|
||||
|
||||
{ /* IMC */
|
||||
PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_KBL_Y_IMC),
|
||||
.driver_data = UNCORE_PCI_DEV_DATA(SNB_PCI_UNCORE_IMC, 0),
|
||||
},
|
||||
{ /* IMC */
|
||||
PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_KBL_U_IMC),
|
||||
.driver_data = UNCORE_PCI_DEV_DATA(SNB_PCI_UNCORE_IMC, 0),
|
||||
},
|
||||
{ /* IMC */
|
||||
PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_KBL_UQ_IMC),
|
||||
.driver_data = UNCORE_PCI_DEV_DATA(SNB_PCI_UNCORE_IMC, 0),
|
||||
},
|
||||
{ /* IMC */
|
||||
PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_KBL_SD_IMC),
|
||||
.driver_data = UNCORE_PCI_DEV_DATA(SNB_PCI_UNCORE_IMC, 0),
|
||||
},
|
||||
{ /* IMC */
|
||||
PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_KBL_SQ_IMC),
|
||||
.driver_data = UNCORE_PCI_DEV_DATA(SNB_PCI_UNCORE_IMC, 0),
|
||||
},
|
||||
{ /* IMC */
|
||||
PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CFL_2U_IMC),
|
||||
.driver_data = UNCORE_PCI_DEV_DATA(SNB_PCI_UNCORE_IMC, 0),
|
||||
},
|
||||
{ /* IMC */
|
||||
PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CFL_4U_IMC),
|
||||
.driver_data = UNCORE_PCI_DEV_DATA(SNB_PCI_UNCORE_IMC, 0),
|
||||
},
|
||||
{ /* IMC */
|
||||
PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CFL_4H_IMC),
|
||||
.driver_data = UNCORE_PCI_DEV_DATA(SNB_PCI_UNCORE_IMC, 0),
|
||||
},
|
||||
{ /* IMC */
|
||||
PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CFL_6H_IMC),
|
||||
.driver_data = UNCORE_PCI_DEV_DATA(SNB_PCI_UNCORE_IMC, 0),
|
||||
},
|
||||
{ /* IMC */
|
||||
PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CFL_2S_D_IMC),
|
||||
.driver_data = UNCORE_PCI_DEV_DATA(SNB_PCI_UNCORE_IMC, 0),
|
||||
},
|
||||
{ /* IMC */
|
||||
PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CFL_4S_D_IMC),
|
||||
.driver_data = UNCORE_PCI_DEV_DATA(SNB_PCI_UNCORE_IMC, 0),
|
||||
},
|
||||
{ /* IMC */
|
||||
PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CFL_6S_D_IMC),
|
||||
.driver_data = UNCORE_PCI_DEV_DATA(SNB_PCI_UNCORE_IMC, 0),
|
||||
},
|
||||
{ /* IMC */
|
||||
PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CFL_8S_D_IMC),
|
||||
.driver_data = UNCORE_PCI_DEV_DATA(SNB_PCI_UNCORE_IMC, 0),
|
||||
},
|
||||
{ /* IMC */
|
||||
PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CFL_4S_W_IMC),
|
||||
.driver_data = UNCORE_PCI_DEV_DATA(SNB_PCI_UNCORE_IMC, 0),
|
||||
},
|
||||
{ /* IMC */
|
||||
PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CFL_6S_W_IMC),
|
||||
.driver_data = UNCORE_PCI_DEV_DATA(SNB_PCI_UNCORE_IMC, 0),
|
||||
},
|
||||
{ /* IMC */
|
||||
PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CFL_8S_W_IMC),
|
||||
.driver_data = UNCORE_PCI_DEV_DATA(SNB_PCI_UNCORE_IMC, 0),
|
||||
},
|
||||
{ /* IMC */
|
||||
PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CFL_4S_S_IMC),
|
||||
.driver_data = UNCORE_PCI_DEV_DATA(SNB_PCI_UNCORE_IMC, 0),
|
||||
},
|
||||
{ /* IMC */
|
||||
PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CFL_6S_S_IMC),
|
||||
.driver_data = UNCORE_PCI_DEV_DATA(SNB_PCI_UNCORE_IMC, 0),
|
||||
},
|
||||
{ /* IMC */
|
||||
PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CFL_8S_S_IMC),
|
||||
.driver_data = UNCORE_PCI_DEV_DATA(SNB_PCI_UNCORE_IMC, 0),
|
||||
},
|
||||
{ /* end: all zeroes */ },
|
||||
};
|
||||
|
||||
@@ -681,6 +775,25 @@ static const struct imc_uncore_pci_dev desktop_imc_pci_ids[] = {
|
||||
IMC_DEV(SKL_HQ_IMC, &skl_uncore_pci_driver), /* 6th Gen Core H Quad Core */
|
||||
IMC_DEV(SKL_SD_IMC, &skl_uncore_pci_driver), /* 6th Gen Core S Dual Core */
|
||||
IMC_DEV(SKL_SQ_IMC, &skl_uncore_pci_driver), /* 6th Gen Core S Quad Core */
|
||||
IMC_DEV(KBL_Y_IMC, &skl_uncore_pci_driver), /* 7th Gen Core Y */
|
||||
IMC_DEV(KBL_U_IMC, &skl_uncore_pci_driver), /* 7th Gen Core U */
|
||||
IMC_DEV(KBL_UQ_IMC, &skl_uncore_pci_driver), /* 7th Gen Core U Quad Core */
|
||||
IMC_DEV(KBL_SD_IMC, &skl_uncore_pci_driver), /* 7th Gen Core S Dual Core */
|
||||
IMC_DEV(KBL_SQ_IMC, &skl_uncore_pci_driver), /* 7th Gen Core S Quad Core */
|
||||
IMC_DEV(CFL_2U_IMC, &skl_uncore_pci_driver), /* 8th Gen Core U 2 Cores */
|
||||
IMC_DEV(CFL_4U_IMC, &skl_uncore_pci_driver), /* 8th Gen Core U 4 Cores */
|
||||
IMC_DEV(CFL_4H_IMC, &skl_uncore_pci_driver), /* 8th Gen Core H 4 Cores */
|
||||
IMC_DEV(CFL_6H_IMC, &skl_uncore_pci_driver), /* 8th Gen Core H 6 Cores */
|
||||
IMC_DEV(CFL_2S_D_IMC, &skl_uncore_pci_driver), /* 8th Gen Core S 2 Cores Desktop */
|
||||
IMC_DEV(CFL_4S_D_IMC, &skl_uncore_pci_driver), /* 8th Gen Core S 4 Cores Desktop */
|
||||
IMC_DEV(CFL_6S_D_IMC, &skl_uncore_pci_driver), /* 8th Gen Core S 6 Cores Desktop */
|
||||
IMC_DEV(CFL_8S_D_IMC, &skl_uncore_pci_driver), /* 8th Gen Core S 8 Cores Desktop */
|
||||
IMC_DEV(CFL_4S_W_IMC, &skl_uncore_pci_driver), /* 8th Gen Core S 4 Cores Work Station */
|
||||
IMC_DEV(CFL_6S_W_IMC, &skl_uncore_pci_driver), /* 8th Gen Core S 6 Cores Work Station */
|
||||
IMC_DEV(CFL_8S_W_IMC, &skl_uncore_pci_driver), /* 8th Gen Core S 8 Cores Work Station */
|
||||
IMC_DEV(CFL_4S_S_IMC, &skl_uncore_pci_driver), /* 8th Gen Core S 4 Cores Server */
|
||||
IMC_DEV(CFL_6S_S_IMC, &skl_uncore_pci_driver), /* 8th Gen Core S 6 Cores Server */
|
||||
IMC_DEV(CFL_8S_S_IMC, &skl_uncore_pci_driver), /* 8th Gen Core S 8 Cores Server */
|
||||
{ /* end marker */ }
|
||||
};
|
||||
|
||||
|
||||
@@ -33,14 +33,16 @@
|
||||
|
||||
/*
|
||||
* Set __PAGE_OFFSET to the most negative possible address +
|
||||
* PGDIR_SIZE*16 (pgd slot 272). The gap is to allow a space for a
|
||||
* hypervisor to fit. Choosing 16 slots here is arbitrary, but it's
|
||||
* what Xen requires.
|
||||
* PGDIR_SIZE*17 (pgd slot 273).
|
||||
*
|
||||
* The gap is to allow a space for LDT remap for PTI (1 pgd slot) and space for
|
||||
* a hypervisor (16 slots). Choosing 16 slots for a hypervisor is arbitrary,
|
||||
* but it's what Xen requires.
|
||||
*/
|
||||
#ifdef CONFIG_X86_5LEVEL
|
||||
#define __PAGE_OFFSET_BASE _AC(0xff10000000000000, UL)
|
||||
#define __PAGE_OFFSET_BASE _AC(0xff11000000000000, UL)
|
||||
#else
|
||||
#define __PAGE_OFFSET_BASE _AC(0xffff880000000000, UL)
|
||||
#define __PAGE_OFFSET_BASE _AC(0xffff888000000000, UL)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_RANDOMIZE_MEMORY
|
||||
|
||||
@@ -88,16 +88,15 @@ typedef struct { pteval_t pte; } pte_t;
|
||||
# define VMALLOC_SIZE_TB _AC(12800, UL)
|
||||
# define __VMALLOC_BASE _AC(0xffa0000000000000, UL)
|
||||
# define __VMEMMAP_BASE _AC(0xffd4000000000000, UL)
|
||||
# define LDT_PGD_ENTRY _AC(-112, UL)
|
||||
# define LDT_BASE_ADDR (LDT_PGD_ENTRY << PGDIR_SHIFT)
|
||||
#else
|
||||
# define VMALLOC_SIZE_TB _AC(32, UL)
|
||||
# define __VMALLOC_BASE _AC(0xffffc90000000000, UL)
|
||||
# define __VMEMMAP_BASE _AC(0xffffea0000000000, UL)
|
||||
# define LDT_PGD_ENTRY _AC(-3, UL)
|
||||
# define LDT_BASE_ADDR (LDT_PGD_ENTRY << PGDIR_SHIFT)
|
||||
#endif
|
||||
|
||||
#define LDT_PGD_ENTRY -240UL
|
||||
#define LDT_BASE_ADDR (LDT_PGD_ENTRY << PGDIR_SHIFT)
|
||||
|
||||
#ifdef CONFIG_RANDOMIZE_MEMORY
|
||||
# define VMALLOC_START vmalloc_base
|
||||
# define VMEMMAP_START vmemmap_base
|
||||
|
||||
@@ -213,8 +213,9 @@ static unsigned int mem32_serial_in(unsigned long addr, int offset)
|
||||
* early_pci_serial_init()
|
||||
*
|
||||
* This function is invoked when the early_printk param starts with "pciserial"
|
||||
* The rest of the param should be ",B:D.F,baud" where B, D & F describe the
|
||||
* location of a PCI device that must be a UART device.
|
||||
* The rest of the param should be "[force],B:D.F,baud", where B, D & F describe
|
||||
* the location of a PCI device that must be a UART device. "force" is optional
|
||||
* and overrides the use of an UART device with a wrong PCI class code.
|
||||
*/
|
||||
static __init void early_pci_serial_init(char *s)
|
||||
{
|
||||
@@ -224,17 +225,23 @@ static __init void early_pci_serial_init(char *s)
|
||||
u32 classcode, bar0;
|
||||
u16 cmdreg;
|
||||
char *e;
|
||||
int force = 0;
|
||||
|
||||
|
||||
/*
|
||||
* First, part the param to get the BDF values
|
||||
*/
|
||||
if (*s == ',')
|
||||
++s;
|
||||
|
||||
if (*s == 0)
|
||||
return;
|
||||
|
||||
/* Force the use of an UART device with wrong class code */
|
||||
if (!strncmp(s, "force,", 6)) {
|
||||
force = 1;
|
||||
s += 6;
|
||||
}
|
||||
|
||||
/*
|
||||
* Part the param to get the BDF values
|
||||
*/
|
||||
bus = (u8)simple_strtoul(s, &e, 16);
|
||||
s = e;
|
||||
if (*s != ':')
|
||||
@@ -253,7 +260,7 @@ static __init void early_pci_serial_init(char *s)
|
||||
s++;
|
||||
|
||||
/*
|
||||
* Second, find the device from the BDF
|
||||
* Find the device from the BDF
|
||||
*/
|
||||
cmdreg = read_pci_config(bus, slot, func, PCI_COMMAND);
|
||||
classcode = read_pci_config(bus, slot, func, PCI_CLASS_REVISION);
|
||||
@@ -264,8 +271,10 @@ static __init void early_pci_serial_init(char *s)
|
||||
*/
|
||||
if (((classcode >> 16 != PCI_CLASS_COMMUNICATION_MODEM) &&
|
||||
(classcode >> 16 != PCI_CLASS_COMMUNICATION_SERIAL)) ||
|
||||
(((classcode >> 8) & 0xff) != 0x02)) /* 16550 I/F at BAR0 */
|
||||
return;
|
||||
(((classcode >> 8) & 0xff) != 0x02)) /* 16550 I/F at BAR0 */ {
|
||||
if (!force)
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Determine if it is IO or memory mapped
|
||||
@@ -289,7 +298,7 @@ static __init void early_pci_serial_init(char *s)
|
||||
}
|
||||
|
||||
/*
|
||||
* Lastly, initialize the hardware
|
||||
* Initialize the hardware
|
||||
*/
|
||||
if (*s) {
|
||||
if (strcmp(s, "nocfg") == 0)
|
||||
|
||||
@@ -103,14 +103,6 @@ static struct ldt_struct *alloc_ldt_struct(unsigned int num_entries)
|
||||
/*
|
||||
* If PTI is enabled, this maps the LDT into the kernelmode and
|
||||
* usermode tables for the given mm.
|
||||
*
|
||||
* There is no corresponding unmap function. Even if the LDT is freed, we
|
||||
* leave the PTEs around until the slot is reused or the mm is destroyed.
|
||||
* This is harmless: the LDT is always in ordinary memory, and no one will
|
||||
* access the freed slot.
|
||||
*
|
||||
* If we wanted to unmap freed LDTs, we'd also need to do a flush to make
|
||||
* it useful, and the flush would slow down modify_ldt().
|
||||
*/
|
||||
static int
|
||||
map_ldt_struct(struct mm_struct *mm, struct ldt_struct *ldt, int slot)
|
||||
@@ -119,8 +111,8 @@ map_ldt_struct(struct mm_struct *mm, struct ldt_struct *ldt, int slot)
|
||||
bool is_vmalloc, had_top_level_entry;
|
||||
unsigned long va;
|
||||
spinlock_t *ptl;
|
||||
int i, nr_pages;
|
||||
pgd_t *pgd;
|
||||
int i;
|
||||
|
||||
if (!static_cpu_has(X86_FEATURE_PTI))
|
||||
return 0;
|
||||
@@ -141,7 +133,9 @@ map_ldt_struct(struct mm_struct *mm, struct ldt_struct *ldt, int slot)
|
||||
|
||||
is_vmalloc = is_vmalloc_addr(ldt->entries);
|
||||
|
||||
for (i = 0; i * PAGE_SIZE < ldt->nr_entries * LDT_ENTRY_SIZE; i++) {
|
||||
nr_pages = DIV_ROUND_UP(ldt->nr_entries * LDT_ENTRY_SIZE, PAGE_SIZE);
|
||||
|
||||
for (i = 0; i < nr_pages; i++) {
|
||||
unsigned long offset = i << PAGE_SHIFT;
|
||||
const void *src = (char *)ldt->entries + offset;
|
||||
unsigned long pfn;
|
||||
@@ -189,14 +183,42 @@ map_ldt_struct(struct mm_struct *mm, struct ldt_struct *ldt, int slot)
|
||||
}
|
||||
}
|
||||
|
||||
va = (unsigned long)ldt_slot_va(slot);
|
||||
flush_tlb_mm_range(mm, va, va + LDT_SLOT_STRIDE, 0);
|
||||
|
||||
ldt->slot = slot;
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void unmap_ldt_struct(struct mm_struct *mm, struct ldt_struct *ldt)
|
||||
{
|
||||
#ifdef CONFIG_PAGE_TABLE_ISOLATION
|
||||
unsigned long va;
|
||||
int i, nr_pages;
|
||||
|
||||
if (!ldt)
|
||||
return;
|
||||
|
||||
/* LDT map/unmap is only required for PTI */
|
||||
if (!static_cpu_has(X86_FEATURE_PTI))
|
||||
return;
|
||||
|
||||
nr_pages = DIV_ROUND_UP(ldt->nr_entries * LDT_ENTRY_SIZE, PAGE_SIZE);
|
||||
|
||||
for (i = 0; i < nr_pages; i++) {
|
||||
unsigned long offset = i << PAGE_SHIFT;
|
||||
spinlock_t *ptl;
|
||||
pte_t *ptep;
|
||||
|
||||
va = (unsigned long)ldt_slot_va(ldt->slot) + offset;
|
||||
ptep = get_locked_pte(mm, va, &ptl);
|
||||
pte_clear(mm, va, ptep);
|
||||
pte_unmap_unlock(ptep, ptl);
|
||||
}
|
||||
|
||||
va = (unsigned long)ldt_slot_va(ldt->slot);
|
||||
flush_tlb_mm_range(mm, va, va + nr_pages * PAGE_SIZE, 0);
|
||||
#endif /* CONFIG_PAGE_TABLE_ISOLATION */
|
||||
}
|
||||
|
||||
static void free_ldt_pgtables(struct mm_struct *mm)
|
||||
{
|
||||
#ifdef CONFIG_PAGE_TABLE_ISOLATION
|
||||
@@ -433,6 +455,7 @@ static int write_ldt(void __user *ptr, unsigned long bytecount, int oldmode)
|
||||
}
|
||||
|
||||
install_ldt(mm, new_ldt);
|
||||
unmap_ldt_struct(mm, old_ldt);
|
||||
free_ldt_struct(old_ldt);
|
||||
error = 0;
|
||||
|
||||
|
||||
@@ -1869,7 +1869,7 @@ void __init xen_setup_kernel_pagetable(pgd_t *pgd, unsigned long max_pfn)
|
||||
init_top_pgt[0] = __pgd(0);
|
||||
|
||||
/* Pre-constructed entries are in pfn, so convert to mfn */
|
||||
/* L4[272] -> level3_ident_pgt */
|
||||
/* L4[273] -> level3_ident_pgt */
|
||||
/* L4[511] -> level3_kernel_pgt */
|
||||
convert_pfn_mfn(init_top_pgt);
|
||||
|
||||
@@ -1889,8 +1889,8 @@ void __init xen_setup_kernel_pagetable(pgd_t *pgd, unsigned long max_pfn)
|
||||
addr[0] = (unsigned long)pgd;
|
||||
addr[1] = (unsigned long)l3;
|
||||
addr[2] = (unsigned long)l2;
|
||||
/* Graft it onto L4[272][0]. Note that we creating an aliasing problem:
|
||||
* Both L4[272][0] and L4[511][510] have entries that point to the same
|
||||
/* Graft it onto L4[273][0]. Note that we creating an aliasing problem:
|
||||
* Both L4[273][0] and L4[511][510] have entries that point to the same
|
||||
* L2 (PMD) tables. Meaning that if you modify it in __va space
|
||||
* it will be also modified in the __ka space! (But if you just
|
||||
* modify the PMD table to point to other PTE's or none, then you
|
||||
|
||||
@@ -126,8 +126,9 @@ static int simd_skcipher_init(struct crypto_skcipher *tfm)
|
||||
|
||||
ctx->cryptd_tfm = cryptd_tfm;
|
||||
|
||||
reqsize = sizeof(struct skcipher_request);
|
||||
reqsize += crypto_skcipher_reqsize(&cryptd_tfm->base);
|
||||
reqsize = crypto_skcipher_reqsize(cryptd_skcipher_child(cryptd_tfm));
|
||||
reqsize = max(reqsize, crypto_skcipher_reqsize(&cryptd_tfm->base));
|
||||
reqsize += sizeof(struct skcipher_request);
|
||||
|
||||
crypto_skcipher_set_reqsize(tfm, reqsize);
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@ static const struct acpi_device_id forbidden_id_list[] = {
|
||||
{"PNP0200", 0}, /* AT DMA Controller */
|
||||
{"ACPI0009", 0}, /* IOxAPIC */
|
||||
{"ACPI000A", 0}, /* IOAPIC */
|
||||
{"SMB0001", 0}, /* ACPI SMBUS virtual device */
|
||||
{"", 0},
|
||||
};
|
||||
|
||||
|
||||
@@ -12,35 +12,51 @@
|
||||
#define pr_fmt(fmt) "ACPI: watchdog: " fmt
|
||||
|
||||
#include <linux/acpi.h>
|
||||
#include <linux/dmi.h>
|
||||
#include <linux/ioport.h>
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
#include "internal.h"
|
||||
|
||||
static const struct dmi_system_id acpi_watchdog_skip[] = {
|
||||
{
|
||||
/*
|
||||
* On Lenovo Z50-70 there are two issues with the WDAT
|
||||
* table. First some of the instructions use RTC SRAM
|
||||
* to store persistent information. This does not work well
|
||||
* with Linux RTC driver. Second, more important thing is
|
||||
* that the instructions do not actually reset the system.
|
||||
*
|
||||
* On this particular system iTCO_wdt seems to work just
|
||||
* fine so we prefer that over WDAT for now.
|
||||
*
|
||||
* See also https://bugzilla.kernel.org/show_bug.cgi?id=199033.
|
||||
*/
|
||||
.ident = "Lenovo Z50-70",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "20354"),
|
||||
DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo Z50-70"),
|
||||
},
|
||||
},
|
||||
{}
|
||||
};
|
||||
#ifdef CONFIG_RTC_MC146818_LIB
|
||||
#include <linux/mc146818rtc.h>
|
||||
|
||||
/*
|
||||
* There are several systems where the WDAT table is accessing RTC SRAM to
|
||||
* store persistent information. This does not work well with the Linux RTC
|
||||
* driver so on those systems we skip WDAT driver and prefer iTCO_wdt
|
||||
* instead.
|
||||
*
|
||||
* See also https://bugzilla.kernel.org/show_bug.cgi?id=199033.
|
||||
*/
|
||||
static bool acpi_watchdog_uses_rtc(const struct acpi_table_wdat *wdat)
|
||||
{
|
||||
const struct acpi_wdat_entry *entries;
|
||||
int i;
|
||||
|
||||
entries = (struct acpi_wdat_entry *)(wdat + 1);
|
||||
for (i = 0; i < wdat->entries; i++) {
|
||||
const struct acpi_generic_address *gas;
|
||||
|
||||
gas = &entries[i].register_region;
|
||||
if (gas->space_id == ACPI_ADR_SPACE_SYSTEM_IO) {
|
||||
switch (gas->address) {
|
||||
case RTC_PORT(0):
|
||||
case RTC_PORT(1):
|
||||
case RTC_PORT(2):
|
||||
case RTC_PORT(3):
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
#else
|
||||
static bool acpi_watchdog_uses_rtc(const struct acpi_table_wdat *wdat)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
static const struct acpi_table_wdat *acpi_watchdog_get_wdat(void)
|
||||
{
|
||||
@@ -50,9 +66,6 @@ static const struct acpi_table_wdat *acpi_watchdog_get_wdat(void)
|
||||
if (acpi_disabled)
|
||||
return NULL;
|
||||
|
||||
if (dmi_check_system(acpi_watchdog_skip))
|
||||
return NULL;
|
||||
|
||||
status = acpi_get_table(ACPI_SIG_WDAT, 0,
|
||||
(struct acpi_table_header **)&wdat);
|
||||
if (ACPI_FAILURE(status)) {
|
||||
@@ -60,6 +73,11 @@ static const struct acpi_table_wdat *acpi_watchdog_get_wdat(void)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (acpi_watchdog_uses_rtc(wdat)) {
|
||||
pr_info("Skipping WDAT on this system because it uses RTC SRAM\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return wdat;
|
||||
}
|
||||
|
||||
|
||||
@@ -1978,7 +1978,6 @@ void device_del(struct device *dev)
|
||||
blocking_notifier_call_chain(&dev->bus->p->bus_notifier,
|
||||
BUS_NOTIFY_DEL_DEVICE, dev);
|
||||
|
||||
device_links_purge(dev);
|
||||
dpm_sysfs_remove(dev);
|
||||
if (parent)
|
||||
klist_del(&dev->p->knode_parent);
|
||||
@@ -2006,6 +2005,7 @@ void device_del(struct device *dev)
|
||||
device_pm_remove(dev);
|
||||
driver_deferred_probe_del(dev);
|
||||
device_remove_properties(dev);
|
||||
device_links_purge(dev);
|
||||
|
||||
/* Notify the platform of the removal, in case they
|
||||
* need to do anything...
|
||||
|
||||
@@ -4146,10 +4146,11 @@ static int __floppy_read_block_0(struct block_device *bdev, int drive)
|
||||
bio.bi_end_io = floppy_rb0_cb;
|
||||
bio_set_op_attrs(&bio, REQ_OP_READ, 0);
|
||||
|
||||
init_completion(&cbdata.complete);
|
||||
|
||||
submit_bio(&bio);
|
||||
process_fd_request();
|
||||
|
||||
init_completion(&cbdata.complete);
|
||||
wait_for_completion(&cbdata.complete);
|
||||
|
||||
__free_page(page);
|
||||
|
||||
@@ -1597,6 +1597,11 @@ static const struct attribute_group zram_disk_attr_group = {
|
||||
.attrs = zram_disk_attrs,
|
||||
};
|
||||
|
||||
static const struct attribute_group *zram_disk_attr_groups[] = {
|
||||
&zram_disk_attr_group,
|
||||
NULL,
|
||||
};
|
||||
|
||||
/*
|
||||
* Allocate and initialize new zram device. the function returns
|
||||
* '>= 0' device_id upon success, and negative value otherwise.
|
||||
@@ -1677,23 +1682,14 @@ static int zram_add(void)
|
||||
|
||||
zram->disk->queue->backing_dev_info->capabilities |=
|
||||
(BDI_CAP_STABLE_WRITES | BDI_CAP_SYNCHRONOUS_IO);
|
||||
disk_to_dev(zram->disk)->groups = zram_disk_attr_groups;
|
||||
add_disk(zram->disk);
|
||||
|
||||
ret = sysfs_create_group(&disk_to_dev(zram->disk)->kobj,
|
||||
&zram_disk_attr_group);
|
||||
if (ret < 0) {
|
||||
pr_err("Error creating sysfs group for device %d\n",
|
||||
device_id);
|
||||
goto out_free_disk;
|
||||
}
|
||||
strlcpy(zram->compressor, default_compressor, sizeof(zram->compressor));
|
||||
|
||||
pr_info("Added device: %s\n", zram->disk->disk_name);
|
||||
return device_id;
|
||||
|
||||
out_free_disk:
|
||||
del_gendisk(zram->disk);
|
||||
put_disk(zram->disk);
|
||||
out_free_queue:
|
||||
blk_cleanup_queue(queue);
|
||||
out_free_idr:
|
||||
@@ -1721,16 +1717,6 @@ static int zram_remove(struct zram *zram)
|
||||
zram->claim = true;
|
||||
mutex_unlock(&bdev->bd_mutex);
|
||||
|
||||
/*
|
||||
* Remove sysfs first, so no one will perform a disksize
|
||||
* store while we destroy the devices. This also helps during
|
||||
* hot_remove -- zram_reset_device() is the last holder of
|
||||
* ->init_lock, no later/concurrent disksize_store() or any
|
||||
* other sysfs handlers are possible.
|
||||
*/
|
||||
sysfs_remove_group(&disk_to_dev(zram->disk)->kobj,
|
||||
&zram_disk_attr_group);
|
||||
|
||||
/* Make sure all the pending I/O are finished */
|
||||
fsync_bdev(bdev);
|
||||
zram_reset_device(zram);
|
||||
|
||||
@@ -2103,8 +2103,6 @@ asmlinkage void __naked cci_enable_port_for_self(void)
|
||||
[sizeof_struct_cpu_port] "i" (sizeof(struct cpu_port)),
|
||||
[sizeof_struct_ace_port] "i" (sizeof(struct cci_ace_port)),
|
||||
[offsetof_port_phys] "i" (offsetof(struct cci_ace_port, phys)) );
|
||||
|
||||
unreachable();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -210,6 +210,7 @@ static int of_fixed_factor_clk_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct clk *clk = platform_get_drvdata(pdev);
|
||||
|
||||
of_clk_del_provider(pdev->dev.of_node);
|
||||
clk_unregister_fixed_factor(clk);
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -200,6 +200,7 @@ static int of_fixed_clk_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct clk *clk = platform_get_drvdata(pdev);
|
||||
|
||||
of_clk_del_provider(pdev->dev.of_node);
|
||||
clk_unregister_fixed_rate(clk);
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -560,6 +560,8 @@ static const struct samsung_gate_clock exynos5250_gate_clks[] __initconst = {
|
||||
0),
|
||||
GATE(CLK_GSCL3, "gscl3", "mout_aclk266_gscl_sub", GATE_IP_GSCL, 3, 0,
|
||||
0),
|
||||
GATE(CLK_CAMIF_TOP, "camif_top", "mout_aclk266_gscl_sub",
|
||||
GATE_IP_GSCL, 4, 0, 0),
|
||||
GATE(CLK_GSCL_WA, "gscl_wa", "div_gscl_wa", GATE_IP_GSCL, 5, 0, 0),
|
||||
GATE(CLK_GSCL_WB, "gscl_wb", "div_gscl_wb", GATE_IP_GSCL, 6, 0, 0),
|
||||
GATE(CLK_SMMU_GSCL0, "smmu_gscl0", "mout_aclk266_gscl_sub",
|
||||
@@ -570,6 +572,10 @@ static const struct samsung_gate_clock exynos5250_gate_clks[] __initconst = {
|
||||
GATE_IP_GSCL, 9, 0, 0),
|
||||
GATE(CLK_SMMU_GSCL3, "smmu_gscl3", "mout_aclk266_gscl_sub",
|
||||
GATE_IP_GSCL, 10, 0, 0),
|
||||
GATE(CLK_SMMU_FIMC_LITE0, "smmu_fimc_lite0", "mout_aclk266_gscl_sub",
|
||||
GATE_IP_GSCL, 11, 0, 0),
|
||||
GATE(CLK_SMMU_FIMC_LITE1, "smmu_fimc_lite1", "mout_aclk266_gscl_sub",
|
||||
GATE_IP_GSCL, 12, 0, 0),
|
||||
|
||||
GATE(CLK_FIMD1, "fimd1", "mout_aclk200_disp1_sub", GATE_IP_DISP1, 0, 0,
|
||||
0),
|
||||
|
||||
@@ -280,6 +280,7 @@ static const struct samsung_clk_reg_dump exynos5420_set_clksrc[] = {
|
||||
{ .offset = GATE_BUS_TOP, .value = 0xffffffff, },
|
||||
{ .offset = GATE_BUS_DISP1, .value = 0xffffffff, },
|
||||
{ .offset = GATE_IP_PERIC, .value = 0xffffffff, },
|
||||
{ .offset = GATE_IP_PERIS, .value = 0xffffffff, },
|
||||
};
|
||||
|
||||
static int exynos5420_clk_suspend(void)
|
||||
|
||||
@@ -135,8 +135,13 @@ static int imx6q_set_target(struct cpufreq_policy *policy, unsigned int index)
|
||||
/* Ensure the arm clock divider is what we expect */
|
||||
ret = clk_set_rate(arm_clk, new_freq * 1000);
|
||||
if (ret) {
|
||||
int ret1;
|
||||
|
||||
dev_err(cpu_dev, "failed to set clock rate: %d\n", ret);
|
||||
regulator_set_voltage_tol(arm_reg, volt_old, 0);
|
||||
ret1 = regulator_set_voltage_tol(arm_reg, volt_old, 0);
|
||||
if (ret1)
|
||||
dev_warn(cpu_dev,
|
||||
"failed to restore vddarm voltage: %d\n", ret1);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -265,6 +265,10 @@ void __init efi_init(void)
|
||||
(params.mmap & ~PAGE_MASK)));
|
||||
|
||||
init_screen_info();
|
||||
|
||||
/* ARM does not permit early mappings to persist across paging_init() */
|
||||
if (IS_ENABLED(CONFIG_ARM))
|
||||
efi_memmap_unmap();
|
||||
}
|
||||
|
||||
static int __init register_gop_device(void)
|
||||
|
||||
@@ -122,7 +122,7 @@ static int __init arm_enable_runtime_services(void)
|
||||
{
|
||||
u64 mapsize;
|
||||
|
||||
if (!efi_enabled(EFI_BOOT) || !efi_enabled(EFI_MEMMAP)) {
|
||||
if (!efi_enabled(EFI_BOOT)) {
|
||||
pr_info("EFI services will not be available.\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -16,7 +16,8 @@ ifeq ($(cc-name),clang)
|
||||
cflags-$(CONFIG_ARM64) += -fpic
|
||||
endif
|
||||
cflags-$(CONFIG_ARM) := $(subst -pg,,$(KBUILD_CFLAGS)) \
|
||||
-fno-builtin -fpic -mno-single-pic-base
|
||||
-fno-builtin -fpic \
|
||||
$(call cc-option,-mno-single-pic-base)
|
||||
|
||||
cflags-$(CONFIG_EFI_ARMSTUB) += -I$(srctree)/scripts/dtc/libfdt
|
||||
|
||||
|
||||
@@ -118,6 +118,9 @@ int __init efi_memmap_init_early(struct efi_memory_map_data *data)
|
||||
|
||||
void __init efi_memmap_unmap(void)
|
||||
{
|
||||
if (!efi_enabled(EFI_MEMMAP))
|
||||
return;
|
||||
|
||||
if (!efi.memmap.late) {
|
||||
unsigned long size;
|
||||
|
||||
|
||||
@@ -1166,7 +1166,7 @@ int gpiochip_add_data(struct gpio_chip *chip, void *data)
|
||||
gdev->descs = kcalloc(chip->ngpio, sizeof(gdev->descs[0]), GFP_KERNEL);
|
||||
if (!gdev->descs) {
|
||||
status = -ENOMEM;
|
||||
goto err_free_gdev;
|
||||
goto err_free_ida;
|
||||
}
|
||||
|
||||
if (chip->ngpio == 0) {
|
||||
@@ -1281,8 +1281,9 @@ err_free_label:
|
||||
kfree(gdev->label);
|
||||
err_free_descs:
|
||||
kfree(gdev->descs);
|
||||
err_free_gdev:
|
||||
err_free_ida:
|
||||
ida_simple_remove(&gpio_ida, gdev->id);
|
||||
err_free_gdev:
|
||||
/* failures here can mean systems won't boot... */
|
||||
pr_err("%s: GPIOs %d..%d (%s) failed to register\n", __func__,
|
||||
gdev->base, gdev->base + gdev->ngpio - 1,
|
||||
|
||||
@@ -60,8 +60,29 @@ static const struct pci_device_id pciidlist[] = {
|
||||
|
||||
MODULE_DEVICE_TABLE(pci, pciidlist);
|
||||
|
||||
static void ast_kick_out_firmware_fb(struct pci_dev *pdev)
|
||||
{
|
||||
struct apertures_struct *ap;
|
||||
bool primary = false;
|
||||
|
||||
ap = alloc_apertures(1);
|
||||
if (!ap)
|
||||
return;
|
||||
|
||||
ap->ranges[0].base = pci_resource_start(pdev, 0);
|
||||
ap->ranges[0].size = pci_resource_len(pdev, 0);
|
||||
|
||||
#ifdef CONFIG_X86
|
||||
primary = pdev->resource[PCI_ROM_RESOURCE].flags & IORESOURCE_ROM_SHADOW;
|
||||
#endif
|
||||
drm_fb_helper_remove_conflicting_framebuffers(ap, "astdrmfb", primary);
|
||||
kfree(ap);
|
||||
}
|
||||
|
||||
static int ast_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
{
|
||||
ast_kick_out_firmware_fb(pdev);
|
||||
|
||||
return drm_get_pci_dev(pdev, ent, &driver);
|
||||
}
|
||||
|
||||
|
||||
@@ -568,6 +568,7 @@ static int ast_crtc_do_set_base(struct drm_crtc *crtc,
|
||||
}
|
||||
ast_bo_unreserve(bo);
|
||||
|
||||
ast_set_offset_reg(crtc);
|
||||
ast_set_start_address_crt1(crtc, (u32)gpu_addr);
|
||||
|
||||
return 0;
|
||||
@@ -1254,7 +1255,7 @@ static int ast_cursor_move(struct drm_crtc *crtc,
|
||||
ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0xc7, ((y >> 8) & 0x07));
|
||||
|
||||
/* dummy write to fire HWC */
|
||||
ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xCB, 0xFF, 0x00);
|
||||
ast_show_cursor(crtc);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -128,6 +128,9 @@ static const struct edid_quirk {
|
||||
/* SDC panel of Lenovo B50-80 reports 8 bpc, but is a 6 bpc panel */
|
||||
{ "SDC", 0x3652, EDID_QUIRK_FORCE_6BPC },
|
||||
|
||||
/* BOE model 0x0771 reports 8 bpc, but is a 6 bpc panel */
|
||||
{ "BOE", 0x0771, EDID_QUIRK_FORCE_6BPC },
|
||||
|
||||
/* Belinea 10 15 55 */
|
||||
{ "MAX", 1516, EDID_QUIRK_PREFER_LARGE_60 },
|
||||
{ "MAX", 0x77e, EDID_QUIRK_PREFER_LARGE_60 },
|
||||
|
||||
@@ -160,13 +160,6 @@ static u32 decon_get_frame_count(struct decon_context *ctx, bool end)
|
||||
return frm;
|
||||
}
|
||||
|
||||
static u32 decon_get_vblank_counter(struct exynos_drm_crtc *crtc)
|
||||
{
|
||||
struct decon_context *ctx = crtc->ctx;
|
||||
|
||||
return decon_get_frame_count(ctx, false);
|
||||
}
|
||||
|
||||
static void decon_setup_trigger(struct decon_context *ctx)
|
||||
{
|
||||
if (!ctx->crtc->i80_mode && !(ctx->out_type & I80_HW_TRG))
|
||||
@@ -532,7 +525,6 @@ static const struct exynos_drm_crtc_ops decon_crtc_ops = {
|
||||
.disable = decon_disable,
|
||||
.enable_vblank = decon_enable_vblank,
|
||||
.disable_vblank = decon_disable_vblank,
|
||||
.get_vblank_counter = decon_get_vblank_counter,
|
||||
.atomic_begin = decon_atomic_begin,
|
||||
.update_plane = decon_update_plane,
|
||||
.disable_plane = decon_disable_plane,
|
||||
@@ -550,7 +542,6 @@ static int decon_bind(struct device *dev, struct device *master, void *data)
|
||||
int ret;
|
||||
|
||||
ctx->drm_dev = drm_dev;
|
||||
drm_dev->max_vblank_count = 0xffffffff;
|
||||
|
||||
for (win = ctx->first_win; win < WINDOWS_NR; win++) {
|
||||
int tmp = (win == ctx->first_win) ? 0 : win;
|
||||
|
||||
@@ -147,16 +147,6 @@ static void exynos_drm_crtc_disable_vblank(struct drm_crtc *crtc)
|
||||
exynos_crtc->ops->disable_vblank(exynos_crtc);
|
||||
}
|
||||
|
||||
static u32 exynos_drm_crtc_get_vblank_counter(struct drm_crtc *crtc)
|
||||
{
|
||||
struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc);
|
||||
|
||||
if (exynos_crtc->ops->get_vblank_counter)
|
||||
return exynos_crtc->ops->get_vblank_counter(exynos_crtc);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct drm_crtc_funcs exynos_crtc_funcs = {
|
||||
.set_config = drm_atomic_helper_set_config,
|
||||
.page_flip = drm_atomic_helper_page_flip,
|
||||
@@ -166,7 +156,6 @@ static const struct drm_crtc_funcs exynos_crtc_funcs = {
|
||||
.atomic_destroy_state = drm_atomic_helper_crtc_destroy_state,
|
||||
.enable_vblank = exynos_drm_crtc_enable_vblank,
|
||||
.disable_vblank = exynos_drm_crtc_disable_vblank,
|
||||
.get_vblank_counter = exynos_drm_crtc_get_vblank_counter,
|
||||
};
|
||||
|
||||
struct exynos_drm_crtc *exynos_drm_crtc_create(struct drm_device *drm_dev,
|
||||
|
||||
@@ -133,7 +133,6 @@ struct exynos_drm_crtc_ops {
|
||||
void (*disable)(struct exynos_drm_crtc *crtc);
|
||||
int (*enable_vblank)(struct exynos_drm_crtc *crtc);
|
||||
void (*disable_vblank)(struct exynos_drm_crtc *crtc);
|
||||
u32 (*get_vblank_counter)(struct exynos_drm_crtc *crtc);
|
||||
enum drm_mode_status (*mode_valid)(struct exynos_drm_crtc *crtc,
|
||||
const struct drm_display_mode *mode);
|
||||
int (*atomic_check)(struct exynos_drm_crtc *crtc,
|
||||
|
||||
@@ -1446,8 +1446,7 @@ static int mtk_hdmi_dt_parse_pdata(struct mtk_hdmi *hdmi,
|
||||
}
|
||||
|
||||
/* The CEC module handles HDMI hotplug detection */
|
||||
cec_np = of_find_compatible_node(np->parent, NULL,
|
||||
"mediatek,mt8173-cec");
|
||||
cec_np = of_get_compatible_child(np->parent, "mediatek,mt8173-cec");
|
||||
if (!cec_np) {
|
||||
dev_err(dev, "Failed to find CEC node\n");
|
||||
return -EINVAL;
|
||||
@@ -1457,8 +1456,10 @@ static int mtk_hdmi_dt_parse_pdata(struct mtk_hdmi *hdmi,
|
||||
if (!cec_pdev) {
|
||||
dev_err(hdmi->dev, "Waiting for CEC device %pOF\n",
|
||||
cec_np);
|
||||
of_node_put(cec_np);
|
||||
return -EPROBE_DEFER;
|
||||
}
|
||||
of_node_put(cec_np);
|
||||
hdmi->cec_dev = &cec_pdev->dev;
|
||||
|
||||
/*
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
|
||||
#include <linux/atomic.h>
|
||||
#include <linux/compat.h>
|
||||
#include <linux/cred.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/fs.h>
|
||||
#include <linux/hid.h>
|
||||
@@ -722,6 +723,17 @@ static ssize_t uhid_char_write(struct file *file, const char __user *buffer,
|
||||
|
||||
switch (uhid->input_buf.type) {
|
||||
case UHID_CREATE:
|
||||
/*
|
||||
* 'struct uhid_create_req' contains a __user pointer which is
|
||||
* copied from, so it's unsafe to allow this with elevated
|
||||
* privileges (e.g. from a setuid binary) or via kernel_write().
|
||||
*/
|
||||
if (file->f_cred != current_cred() || uaccess_kernel()) {
|
||||
pr_err_once("UHID_CREATE from different security context by process %d (%s), this is not allowed.\n",
|
||||
task_tgid_vnr(current), current->comm);
|
||||
ret = -EACCES;
|
||||
goto unlock;
|
||||
}
|
||||
ret = uhid_dev_create(uhid, &uhid->input_buf);
|
||||
break;
|
||||
case UHID_CREATE2:
|
||||
|
||||
@@ -126,7 +126,7 @@ static ssize_t show_label(struct device *dev, struct device_attribute *devattr,
|
||||
return sprintf(buf, "%s\n", sdata->label);
|
||||
}
|
||||
|
||||
static int __init get_logical_cpu(int hwcpu)
|
||||
static int get_logical_cpu(int hwcpu)
|
||||
{
|
||||
int cpu;
|
||||
|
||||
@@ -137,9 +137,8 @@ static int __init get_logical_cpu(int hwcpu)
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
static void __init make_sensor_label(struct device_node *np,
|
||||
struct sensor_data *sdata,
|
||||
const char *label)
|
||||
static void make_sensor_label(struct device_node *np,
|
||||
struct sensor_data *sdata, const char *label)
|
||||
{
|
||||
u32 id;
|
||||
size_t n;
|
||||
|
||||
@@ -1285,7 +1285,7 @@ EXPORT_SYMBOL(ib_resolve_eth_dmac);
|
||||
|
||||
/**
|
||||
* ib_modify_qp_with_udata - Modifies the attributes for the specified QP.
|
||||
* @qp: The QP to modify.
|
||||
* @ib_qp: The QP to modify.
|
||||
* @attr: On input, specifies the QP attributes to modify. On output,
|
||||
* the current values of selected QP attributes are returned.
|
||||
* @attr_mask: A bit-mask used to specify which attributes of the QP
|
||||
@@ -1294,9 +1294,10 @@ EXPORT_SYMBOL(ib_resolve_eth_dmac);
|
||||
* are being modified.
|
||||
* It returns 0 on success and returns appropriate error code on error.
|
||||
*/
|
||||
int ib_modify_qp_with_udata(struct ib_qp *qp, struct ib_qp_attr *attr,
|
||||
int ib_modify_qp_with_udata(struct ib_qp *ib_qp, struct ib_qp_attr *attr,
|
||||
int attr_mask, struct ib_udata *udata)
|
||||
{
|
||||
struct ib_qp *qp = ib_qp->real_qp;
|
||||
int ret;
|
||||
|
||||
if (attr_mask & IB_QP_AV) {
|
||||
|
||||
@@ -328,7 +328,6 @@ int hfi1_user_sdma_process_request(struct hfi1_filedata *fd,
|
||||
u8 opcode, sc, vl;
|
||||
u16 pkey;
|
||||
u32 slid;
|
||||
int req_queued = 0;
|
||||
u16 dlid;
|
||||
u32 selector;
|
||||
|
||||
@@ -392,7 +391,6 @@ int hfi1_user_sdma_process_request(struct hfi1_filedata *fd,
|
||||
req->data_len = 0;
|
||||
req->pq = pq;
|
||||
req->cq = cq;
|
||||
req->status = -1;
|
||||
req->ahg_idx = -1;
|
||||
req->iov_idx = 0;
|
||||
req->sent = 0;
|
||||
@@ -400,12 +398,14 @@ int hfi1_user_sdma_process_request(struct hfi1_filedata *fd,
|
||||
req->seqcomp = 0;
|
||||
req->seqsubmitted = 0;
|
||||
req->tids = NULL;
|
||||
req->done = 0;
|
||||
req->has_error = 0;
|
||||
INIT_LIST_HEAD(&req->txps);
|
||||
|
||||
memcpy(&req->info, &info, sizeof(info));
|
||||
|
||||
/* The request is initialized, count it */
|
||||
atomic_inc(&pq->n_reqs);
|
||||
|
||||
if (req_opcode(info.ctrl) == EXPECTED) {
|
||||
/* expected must have a TID info and at least one data vector */
|
||||
if (req->data_iovs < 2) {
|
||||
@@ -500,7 +500,6 @@ int hfi1_user_sdma_process_request(struct hfi1_filedata *fd,
|
||||
ret = pin_vector_pages(req, &req->iovs[i]);
|
||||
if (ret) {
|
||||
req->data_iovs = i;
|
||||
req->status = ret;
|
||||
goto free_req;
|
||||
}
|
||||
req->data_len += req->iovs[i].iov.iov_len;
|
||||
@@ -561,14 +560,10 @@ int hfi1_user_sdma_process_request(struct hfi1_filedata *fd,
|
||||
req->ahg_idx = sdma_ahg_alloc(req->sde);
|
||||
|
||||
set_comp_state(pq, cq, info.comp_idx, QUEUED, 0);
|
||||
atomic_inc(&pq->n_reqs);
|
||||
req_queued = 1;
|
||||
/* Send the first N packets in the request to buy us some time */
|
||||
ret = user_sdma_send_pkts(req, pcount);
|
||||
if (unlikely(ret < 0 && ret != -EBUSY)) {
|
||||
req->status = ret;
|
||||
if (unlikely(ret < 0 && ret != -EBUSY))
|
||||
goto free_req;
|
||||
}
|
||||
|
||||
/*
|
||||
* It is possible that the SDMA engine would have processed all the
|
||||
@@ -588,14 +583,8 @@ int hfi1_user_sdma_process_request(struct hfi1_filedata *fd,
|
||||
while (req->seqsubmitted != req->info.npkts) {
|
||||
ret = user_sdma_send_pkts(req, pcount);
|
||||
if (ret < 0) {
|
||||
if (ret != -EBUSY) {
|
||||
req->status = ret;
|
||||
WRITE_ONCE(req->has_error, 1);
|
||||
if (ACCESS_ONCE(req->seqcomp) ==
|
||||
req->seqsubmitted - 1)
|
||||
goto free_req;
|
||||
return ret;
|
||||
}
|
||||
if (ret != -EBUSY)
|
||||
goto free_req;
|
||||
wait_event_interruptible_timeout(
|
||||
pq->busy.wait_dma,
|
||||
(pq->state == SDMA_PKT_Q_ACTIVE),
|
||||
@@ -606,10 +595,19 @@ int hfi1_user_sdma_process_request(struct hfi1_filedata *fd,
|
||||
*count += idx;
|
||||
return 0;
|
||||
free_req:
|
||||
user_sdma_free_request(req, true);
|
||||
if (req_queued)
|
||||
/*
|
||||
* If the submitted seqsubmitted == npkts, the completion routine
|
||||
* controls the final state. If sequbmitted < npkts, wait for any
|
||||
* outstanding packets to finish before cleaning up.
|
||||
*/
|
||||
if (req->seqsubmitted < req->info.npkts) {
|
||||
if (req->seqsubmitted)
|
||||
wait_event(pq->busy.wait_dma,
|
||||
(req->seqcomp == req->seqsubmitted - 1));
|
||||
user_sdma_free_request(req, true);
|
||||
pq_update(pq);
|
||||
set_comp_state(pq, cq, info.comp_idx, ERROR, req->status);
|
||||
set_comp_state(pq, cq, info.comp_idx, ERROR, ret);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -917,7 +915,6 @@ dosend:
|
||||
ret = sdma_send_txlist(req->sde, &pq->busy, &req->txps, &count);
|
||||
req->seqsubmitted += count;
|
||||
if (req->seqsubmitted == req->info.npkts) {
|
||||
WRITE_ONCE(req->done, 1);
|
||||
/*
|
||||
* The txreq has already been submitted to the HW queue
|
||||
* so we can free the AHG entry now. Corruption will not
|
||||
@@ -1347,11 +1344,15 @@ static int set_txreq_header_ahg(struct user_sdma_request *req,
|
||||
return diff;
|
||||
}
|
||||
|
||||
/*
|
||||
* SDMA tx request completion callback. Called when the SDMA progress
|
||||
* state machine gets notification that the SDMA descriptors for this
|
||||
* tx request have been processed by the DMA engine. Called in
|
||||
* interrupt context.
|
||||
/**
|
||||
* user_sdma_txreq_cb() - SDMA tx request completion callback.
|
||||
* @txreq: valid sdma tx request
|
||||
* @status: success/failure of request
|
||||
*
|
||||
* Called when the SDMA progress state machine gets notification that
|
||||
* the SDMA descriptors for this tx request have been processed by the
|
||||
* DMA engine. Called in interrupt context.
|
||||
* Only do work on completed sequences.
|
||||
*/
|
||||
static void user_sdma_txreq_cb(struct sdma_txreq *txreq, int status)
|
||||
{
|
||||
@@ -1360,7 +1361,7 @@ static void user_sdma_txreq_cb(struct sdma_txreq *txreq, int status)
|
||||
struct user_sdma_request *req;
|
||||
struct hfi1_user_sdma_pkt_q *pq;
|
||||
struct hfi1_user_sdma_comp_q *cq;
|
||||
u16 idx;
|
||||
enum hfi1_sdma_comp_state state = COMPLETE;
|
||||
|
||||
if (!tx->req)
|
||||
return;
|
||||
@@ -1373,31 +1374,19 @@ static void user_sdma_txreq_cb(struct sdma_txreq *txreq, int status)
|
||||
SDMA_DBG(req, "SDMA completion with error %d",
|
||||
status);
|
||||
WRITE_ONCE(req->has_error, 1);
|
||||
state = ERROR;
|
||||
}
|
||||
|
||||
req->seqcomp = tx->seqnum;
|
||||
kmem_cache_free(pq->txreq_cache, tx);
|
||||
tx = NULL;
|
||||
|
||||
idx = req->info.comp_idx;
|
||||
if (req->status == -1 && status == SDMA_TXREQ_S_OK) {
|
||||
if (req->seqcomp == req->info.npkts - 1) {
|
||||
req->status = 0;
|
||||
user_sdma_free_request(req, false);
|
||||
pq_update(pq);
|
||||
set_comp_state(pq, cq, idx, COMPLETE, 0);
|
||||
}
|
||||
} else {
|
||||
if (status != SDMA_TXREQ_S_OK)
|
||||
req->status = status;
|
||||
if (req->seqcomp == (ACCESS_ONCE(req->seqsubmitted) - 1) &&
|
||||
(READ_ONCE(req->done) ||
|
||||
READ_ONCE(req->has_error))) {
|
||||
user_sdma_free_request(req, false);
|
||||
pq_update(pq);
|
||||
set_comp_state(pq, cq, idx, ERROR, req->status);
|
||||
}
|
||||
}
|
||||
/* sequence isn't complete? We are done */
|
||||
if (req->seqcomp != req->info.npkts - 1)
|
||||
return;
|
||||
|
||||
user_sdma_free_request(req, false);
|
||||
set_comp_state(pq, cq, req->info.comp_idx, state, status);
|
||||
pq_update(pq);
|
||||
}
|
||||
|
||||
static inline void pq_update(struct hfi1_user_sdma_pkt_q *pq)
|
||||
@@ -1430,6 +1419,8 @@ static void user_sdma_free_request(struct user_sdma_request *req, bool unpin)
|
||||
if (!node)
|
||||
continue;
|
||||
|
||||
req->iovs[i].node = NULL;
|
||||
|
||||
if (unpin)
|
||||
hfi1_mmu_rb_remove(req->pq->handler,
|
||||
&node->rb);
|
||||
|
||||
@@ -196,8 +196,6 @@ struct user_sdma_request {
|
||||
/* Writeable fields shared with interrupt */
|
||||
u64 seqcomp ____cacheline_aligned_in_smp;
|
||||
u64 seqsubmitted;
|
||||
/* status of the last txreq completed */
|
||||
int status;
|
||||
|
||||
/* Send side fields */
|
||||
struct list_head txps ____cacheline_aligned_in_smp;
|
||||
@@ -219,7 +217,6 @@ struct user_sdma_request {
|
||||
u16 tididx;
|
||||
/* progress index moving along the iovs array */
|
||||
u8 iov_idx;
|
||||
u8 done;
|
||||
u8 has_error;
|
||||
|
||||
struct user_sdma_iovec iovs[MAX_VECTORS_PER_REQ];
|
||||
|
||||
@@ -631,6 +631,7 @@ static struct ib_qp *i40iw_create_qp(struct ib_pd *ibpd,
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
iwqp = (struct i40iw_qp *)mem;
|
||||
iwqp->allocated_buffer = mem;
|
||||
qp = &iwqp->sc_qp;
|
||||
qp->back_qp = (void *)iwqp;
|
||||
qp->push_idx = I40IW_INVALID_PUSH_PAGE_INDEX;
|
||||
@@ -659,7 +660,6 @@ static struct ib_qp *i40iw_create_qp(struct ib_pd *ibpd,
|
||||
goto error;
|
||||
}
|
||||
|
||||
iwqp->allocated_buffer = mem;
|
||||
iwqp->iwdev = iwdev;
|
||||
iwqp->iwpd = iwpd;
|
||||
iwqp->ibqp.qp_num = qp_num;
|
||||
|
||||
@@ -89,8 +89,10 @@
|
||||
|
||||
#define XPAD_PKT_LEN 64
|
||||
|
||||
/* xbox d-pads should map to buttons, as is required for DDR pads
|
||||
but we map them to axes when possible to simplify things */
|
||||
/*
|
||||
* xbox d-pads should map to buttons, as is required for DDR pads
|
||||
* but we map them to axes when possible to simplify things
|
||||
*/
|
||||
#define MAP_DPAD_TO_BUTTONS (1 << 0)
|
||||
#define MAP_TRIGGERS_TO_BUTTONS (1 << 1)
|
||||
#define MAP_STICKS_TO_NULL (1 << 2)
|
||||
@@ -231,6 +233,8 @@ static const struct xpad_device {
|
||||
{ 0x0e6f, 0x021f, "Rock Candy Gamepad for Xbox 360", 0, XTYPE_XBOX360 },
|
||||
{ 0x0e6f, 0x0246, "Rock Candy Gamepad for Xbox One 2015", 0, XTYPE_XBOXONE },
|
||||
{ 0x0e6f, 0x02ab, "PDP Controller for Xbox One", 0, XTYPE_XBOXONE },
|
||||
{ 0x0e6f, 0x02a4, "PDP Wired Controller for Xbox One - Stealth Series", 0, XTYPE_XBOXONE },
|
||||
{ 0x0e6f, 0x02a6, "PDP Wired Controller for Xbox One - Camo Series", 0, XTYPE_XBOXONE },
|
||||
{ 0x0e6f, 0x0301, "Logic3 Controller", 0, XTYPE_XBOX360 },
|
||||
{ 0x0e6f, 0x0346, "Rock Candy Gamepad for Xbox One 2016", 0, XTYPE_XBOXONE },
|
||||
{ 0x0e6f, 0x0401, "Logic3 Controller", 0, XTYPE_XBOX360 },
|
||||
@@ -390,15 +394,15 @@ static const signed short xpad_abs_triggers[] = {
|
||||
* match against vendor id as well. Wired Xbox 360 devices have protocol 1,
|
||||
* wireless controllers have protocol 129.
|
||||
*/
|
||||
#define XPAD_XBOX360_VENDOR_PROTOCOL(vend,pr) \
|
||||
#define XPAD_XBOX360_VENDOR_PROTOCOL(vend, pr) \
|
||||
.match_flags = USB_DEVICE_ID_MATCH_VENDOR | USB_DEVICE_ID_MATCH_INT_INFO, \
|
||||
.idVendor = (vend), \
|
||||
.bInterfaceClass = USB_CLASS_VENDOR_SPEC, \
|
||||
.bInterfaceSubClass = 93, \
|
||||
.bInterfaceProtocol = (pr)
|
||||
#define XPAD_XBOX360_VENDOR(vend) \
|
||||
{ XPAD_XBOX360_VENDOR_PROTOCOL(vend,1) }, \
|
||||
{ XPAD_XBOX360_VENDOR_PROTOCOL(vend,129) }
|
||||
{ XPAD_XBOX360_VENDOR_PROTOCOL((vend), 1) }, \
|
||||
{ XPAD_XBOX360_VENDOR_PROTOCOL((vend), 129) }
|
||||
|
||||
/* The Xbox One controller uses subclass 71 and protocol 208. */
|
||||
#define XPAD_XBOXONE_VENDOR_PROTOCOL(vend, pr) \
|
||||
@@ -408,7 +412,7 @@ static const signed short xpad_abs_triggers[] = {
|
||||
.bInterfaceSubClass = 71, \
|
||||
.bInterfaceProtocol = (pr)
|
||||
#define XPAD_XBOXONE_VENDOR(vend) \
|
||||
{ XPAD_XBOXONE_VENDOR_PROTOCOL(vend, 208) }
|
||||
{ XPAD_XBOXONE_VENDOR_PROTOCOL((vend), 208) }
|
||||
|
||||
static const struct usb_device_id xpad_table[] = {
|
||||
{ USB_INTERFACE_INFO('X', 'B', 0) }, /* X-Box USB-IF not approved class */
|
||||
@@ -480,7 +484,8 @@ static const u8 xboxone_hori_init[] = {
|
||||
|
||||
/*
|
||||
* This packet is required for some of the PDP pads to start
|
||||
* sending input reports. One of those pads is (0x0e6f:0x02ab).
|
||||
* sending input reports. These pads include: (0x0e6f:0x02ab),
|
||||
* (0x0e6f:0x02a4).
|
||||
*/
|
||||
static const u8 xboxone_pdp_init1[] = {
|
||||
0x0a, 0x20, 0x00, 0x03, 0x00, 0x01, 0x14
|
||||
@@ -488,7 +493,8 @@ static const u8 xboxone_pdp_init1[] = {
|
||||
|
||||
/*
|
||||
* This packet is required for some of the PDP pads to start
|
||||
* sending input reports. One of those pads is (0x0e6f:0x02ab).
|
||||
* sending input reports. These pads include: (0x0e6f:0x02ab),
|
||||
* (0x0e6f:0x02a4).
|
||||
*/
|
||||
static const u8 xboxone_pdp_init2[] = {
|
||||
0x06, 0x20, 0x00, 0x02, 0x01, 0x00
|
||||
@@ -526,6 +532,10 @@ static const struct xboxone_init_packet xboxone_init_packets[] = {
|
||||
XBOXONE_INIT_PKT(0x0000, 0x0000, xboxone_fw2015_init),
|
||||
XBOXONE_INIT_PKT(0x0e6f, 0x02ab, xboxone_pdp_init1),
|
||||
XBOXONE_INIT_PKT(0x0e6f, 0x02ab, xboxone_pdp_init2),
|
||||
XBOXONE_INIT_PKT(0x0e6f, 0x02a4, xboxone_pdp_init1),
|
||||
XBOXONE_INIT_PKT(0x0e6f, 0x02a4, xboxone_pdp_init2),
|
||||
XBOXONE_INIT_PKT(0x0e6f, 0x02a6, xboxone_pdp_init1),
|
||||
XBOXONE_INIT_PKT(0x0e6f, 0x02a6, xboxone_pdp_init2),
|
||||
XBOXONE_INIT_PKT(0x24c6, 0x541a, xboxone_rumblebegin_init),
|
||||
XBOXONE_INIT_PKT(0x24c6, 0x542a, xboxone_rumblebegin_init),
|
||||
XBOXONE_INIT_PKT(0x24c6, 0x543a, xboxone_rumblebegin_init),
|
||||
@@ -1573,7 +1583,6 @@ static void xpad_close(struct input_dev *dev)
|
||||
static void xpad_set_up_abs(struct input_dev *input_dev, signed short abs)
|
||||
{
|
||||
struct usb_xpad *xpad = input_get_drvdata(input_dev);
|
||||
set_bit(abs, input_dev->absbit);
|
||||
|
||||
switch (abs) {
|
||||
case ABS_X:
|
||||
@@ -1593,6 +1602,9 @@ static void xpad_set_up_abs(struct input_dev *input_dev, signed short abs)
|
||||
case ABS_HAT0Y: /* the d-pad (only if dpad is mapped to axes */
|
||||
input_set_abs_params(input_dev, abs, -1, 1, 0, 0);
|
||||
break;
|
||||
default:
|
||||
input_set_abs_params(input_dev, abs, 0, 0, 0, 0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1633,10 +1645,7 @@ static int xpad_init_input(struct usb_xpad *xpad)
|
||||
input_dev->close = xpad_close;
|
||||
}
|
||||
|
||||
__set_bit(EV_KEY, input_dev->evbit);
|
||||
|
||||
if (!(xpad->mapping & MAP_STICKS_TO_NULL)) {
|
||||
__set_bit(EV_ABS, input_dev->evbit);
|
||||
/* set up axes */
|
||||
for (i = 0; xpad_abs[i] >= 0; i++)
|
||||
xpad_set_up_abs(input_dev, xpad_abs[i]);
|
||||
@@ -1644,21 +1653,22 @@ static int xpad_init_input(struct usb_xpad *xpad)
|
||||
|
||||
/* set up standard buttons */
|
||||
for (i = 0; xpad_common_btn[i] >= 0; i++)
|
||||
__set_bit(xpad_common_btn[i], input_dev->keybit);
|
||||
input_set_capability(input_dev, EV_KEY, xpad_common_btn[i]);
|
||||
|
||||
/* set up model-specific ones */
|
||||
if (xpad->xtype == XTYPE_XBOX360 || xpad->xtype == XTYPE_XBOX360W ||
|
||||
xpad->xtype == XTYPE_XBOXONE) {
|
||||
for (i = 0; xpad360_btn[i] >= 0; i++)
|
||||
__set_bit(xpad360_btn[i], input_dev->keybit);
|
||||
input_set_capability(input_dev, EV_KEY, xpad360_btn[i]);
|
||||
} else {
|
||||
for (i = 0; xpad_btn[i] >= 0; i++)
|
||||
__set_bit(xpad_btn[i], input_dev->keybit);
|
||||
input_set_capability(input_dev, EV_KEY, xpad_btn[i]);
|
||||
}
|
||||
|
||||
if (xpad->mapping & MAP_DPAD_TO_BUTTONS) {
|
||||
for (i = 0; xpad_btn_pad[i] >= 0; i++)
|
||||
__set_bit(xpad_btn_pad[i], input_dev->keybit);
|
||||
input_set_capability(input_dev, EV_KEY,
|
||||
xpad_btn_pad[i]);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1675,7 +1685,8 @@ static int xpad_init_input(struct usb_xpad *xpad)
|
||||
|
||||
if (xpad->mapping & MAP_TRIGGERS_TO_BUTTONS) {
|
||||
for (i = 0; xpad_btn_triggers[i] >= 0; i++)
|
||||
__set_bit(xpad_btn_triggers[i], input_dev->keybit);
|
||||
input_set_capability(input_dev, EV_KEY,
|
||||
xpad_btn_triggers[i]);
|
||||
} else {
|
||||
for (i = 0; xpad_abs_triggers[i] >= 0; i++)
|
||||
xpad_set_up_abs(input_dev, xpad_abs_triggers[i]);
|
||||
|
||||
@@ -99,9 +99,7 @@ static int synaptics_mode_cmd(struct psmouse *psmouse, u8 mode)
|
||||
int synaptics_detect(struct psmouse *psmouse, bool set_properties)
|
||||
{
|
||||
struct ps2dev *ps2dev = &psmouse->ps2dev;
|
||||
u8 param[4];
|
||||
|
||||
param[0] = 0;
|
||||
u8 param[4] = { 0 };
|
||||
|
||||
ps2_command(ps2dev, param, PSMOUSE_CMD_SETRES);
|
||||
ps2_command(ps2dev, param, PSMOUSE_CMD_SETRES);
|
||||
|
||||
@@ -193,6 +193,22 @@ int v4l2_event_pending(struct v4l2_fh *fh)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(v4l2_event_pending);
|
||||
|
||||
static void __v4l2_event_unsubscribe(struct v4l2_subscribed_event *sev)
|
||||
{
|
||||
struct v4l2_fh *fh = sev->fh;
|
||||
unsigned int i;
|
||||
|
||||
lockdep_assert_held(&fh->subscribe_lock);
|
||||
assert_spin_locked(&fh->vdev->fh_lock);
|
||||
|
||||
/* Remove any pending events for this subscription */
|
||||
for (i = 0; i < sev->in_use; i++) {
|
||||
list_del(&sev->events[sev_pos(sev, i)].list);
|
||||
fh->navailable--;
|
||||
}
|
||||
list_del(&sev->list);
|
||||
}
|
||||
|
||||
int v4l2_event_subscribe(struct v4l2_fh *fh,
|
||||
const struct v4l2_event_subscription *sub, unsigned elems,
|
||||
const struct v4l2_subscribed_event_ops *ops)
|
||||
@@ -225,27 +241,23 @@ int v4l2_event_subscribe(struct v4l2_fh *fh,
|
||||
|
||||
spin_lock_irqsave(&fh->vdev->fh_lock, flags);
|
||||
found_ev = v4l2_event_subscribed(fh, sub->type, sub->id);
|
||||
if (!found_ev)
|
||||
list_add(&sev->list, &fh->subscribed);
|
||||
spin_unlock_irqrestore(&fh->vdev->fh_lock, flags);
|
||||
|
||||
if (found_ev) {
|
||||
/* Already listening */
|
||||
kvfree(sev);
|
||||
goto out_unlock;
|
||||
}
|
||||
|
||||
if (sev->ops && sev->ops->add) {
|
||||
} else if (sev->ops && sev->ops->add) {
|
||||
ret = sev->ops->add(sev, elems);
|
||||
if (ret) {
|
||||
spin_lock_irqsave(&fh->vdev->fh_lock, flags);
|
||||
__v4l2_event_unsubscribe(sev);
|
||||
spin_unlock_irqrestore(&fh->vdev->fh_lock, flags);
|
||||
kvfree(sev);
|
||||
goto out_unlock;
|
||||
}
|
||||
}
|
||||
|
||||
spin_lock_irqsave(&fh->vdev->fh_lock, flags);
|
||||
list_add(&sev->list, &fh->subscribed);
|
||||
spin_unlock_irqrestore(&fh->vdev->fh_lock, flags);
|
||||
|
||||
out_unlock:
|
||||
mutex_unlock(&fh->subscribe_lock);
|
||||
|
||||
return ret;
|
||||
@@ -280,7 +292,6 @@ int v4l2_event_unsubscribe(struct v4l2_fh *fh,
|
||||
{
|
||||
struct v4l2_subscribed_event *sev;
|
||||
unsigned long flags;
|
||||
int i;
|
||||
|
||||
if (sub->type == V4L2_EVENT_ALL) {
|
||||
v4l2_event_unsubscribe_all(fh);
|
||||
@@ -292,14 +303,8 @@ int v4l2_event_unsubscribe(struct v4l2_fh *fh,
|
||||
spin_lock_irqsave(&fh->vdev->fh_lock, flags);
|
||||
|
||||
sev = v4l2_event_subscribed(fh, sub->type, sub->id);
|
||||
if (sev != NULL) {
|
||||
/* Remove any pending events for this subscription */
|
||||
for (i = 0; i < sev->in_use; i++) {
|
||||
list_del(&sev->events[sev_pos(sev, i)].list);
|
||||
fh->navailable--;
|
||||
}
|
||||
list_del(&sev->list);
|
||||
}
|
||||
if (sev != NULL)
|
||||
__v4l2_event_unsubscribe(sev);
|
||||
|
||||
spin_unlock_irqrestore(&fh->vdev->fh_lock, flags);
|
||||
|
||||
|
||||
@@ -132,7 +132,7 @@ static const struct of_device_id atmel_ssc_dt_ids[] = {
|
||||
MODULE_DEVICE_TABLE(of, atmel_ssc_dt_ids);
|
||||
#endif
|
||||
|
||||
static inline const struct atmel_ssc_platform_data * __init
|
||||
static inline const struct atmel_ssc_platform_data *
|
||||
atmel_ssc_get_driver_data(struct platform_device *pdev)
|
||||
{
|
||||
if (pdev->dev.of_node) {
|
||||
|
||||
@@ -27,6 +27,9 @@
|
||||
#include <linux/delay.h>
|
||||
#include <linux/bitops.h>
|
||||
#include <asm/uv/uv_hub.h>
|
||||
|
||||
#include <linux/nospec.h>
|
||||
|
||||
#include "gru.h"
|
||||
#include "grutables.h"
|
||||
#include "gruhandles.h"
|
||||
@@ -196,6 +199,7 @@ int gru_dump_chiplet_request(unsigned long arg)
|
||||
/* Currently, only dump by gid is implemented */
|
||||
if (req.gid >= gru_max_gids)
|
||||
return -EINVAL;
|
||||
req.gid = array_index_nospec(req.gid, gru_max_gids);
|
||||
|
||||
gru = GID_TO_GRU(req.gid);
|
||||
ubuf = req.buf;
|
||||
|
||||
@@ -1607,8 +1607,13 @@ static struct sdhci_pci_slot *sdhci_pci_probe_slot(
|
||||
host->mmc->caps2 |= MMC_CAP2_NO_PRESCAN_POWERUP;
|
||||
|
||||
if (slot->cd_idx >= 0) {
|
||||
ret = mmc_gpiod_request_cd(host->mmc, NULL, slot->cd_idx,
|
||||
ret = mmc_gpiod_request_cd(host->mmc, "cd", slot->cd_idx,
|
||||
slot->cd_override_level, 0, NULL);
|
||||
if (ret && ret != -EPROBE_DEFER)
|
||||
ret = mmc_gpiod_request_cd(host->mmc, NULL,
|
||||
slot->cd_idx,
|
||||
slot->cd_override_level,
|
||||
0, NULL);
|
||||
if (ret == -EPROBE_DEFER)
|
||||
goto remove;
|
||||
|
||||
|
||||
@@ -2077,8 +2077,7 @@ atmel_hsmc_nand_controller_legacy_init(struct atmel_hsmc_nand_controller *nc)
|
||||
int ret;
|
||||
|
||||
nand_np = dev->of_node;
|
||||
nfc_np = of_find_compatible_node(dev->of_node, NULL,
|
||||
"atmel,sama5d3-nfc");
|
||||
nfc_np = of_get_compatible_child(dev->of_node, "atmel,sama5d3-nfc");
|
||||
if (!nfc_np) {
|
||||
dev_err(dev, "Could not find device node for sama5d3-nfc\n");
|
||||
return -ENODEV;
|
||||
@@ -2492,15 +2491,19 @@ static int atmel_nand_controller_probe(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
if (caps->legacy_of_bindings) {
|
||||
struct device_node *nfc_node;
|
||||
u32 ale_offs = 21;
|
||||
|
||||
/*
|
||||
* If we are parsing legacy DT props and the DT contains a
|
||||
* valid NFC node, forward the request to the sama5 logic.
|
||||
*/
|
||||
if (of_find_compatible_node(pdev->dev.of_node, NULL,
|
||||
"atmel,sama5d3-nfc"))
|
||||
nfc_node = of_get_compatible_child(pdev->dev.of_node,
|
||||
"atmel,sama5d3-nfc");
|
||||
if (nfc_node) {
|
||||
caps = &atmel_sama5_nand_caps;
|
||||
of_node_put(nfc_node);
|
||||
}
|
||||
|
||||
/*
|
||||
* Even if the compatible says we are dealing with an
|
||||
|
||||
@@ -526,6 +526,7 @@ void ubi_free_internal_volumes(struct ubi_device *ubi)
|
||||
for (i = ubi->vtbl_slots;
|
||||
i < ubi->vtbl_slots + UBI_INT_VOL_COUNT; i++) {
|
||||
ubi_eba_replace_table(ubi->volumes[i], NULL);
|
||||
ubi_fastmap_destroy_checkmap(ubi->volumes[i]);
|
||||
kfree(ubi->volumes[i]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -517,6 +517,9 @@ static int check_mapping(struct ubi_device *ubi, struct ubi_volume *vol, int lnu
|
||||
if (!ubi->fast_attach)
|
||||
return 0;
|
||||
|
||||
if (!vol->checkmap || test_bit(lnum, vol->checkmap))
|
||||
return 0;
|
||||
|
||||
vidb = ubi_alloc_vid_buf(ubi, GFP_NOFS);
|
||||
if (!vidb)
|
||||
return -ENOMEM;
|
||||
@@ -551,6 +554,7 @@ static int check_mapping(struct ubi_device *ubi, struct ubi_volume *vol, int lnu
|
||||
goto out_free;
|
||||
}
|
||||
|
||||
set_bit(lnum, vol->checkmap);
|
||||
err = 0;
|
||||
|
||||
out_free:
|
||||
|
||||
@@ -1101,6 +1101,26 @@ free_fm_sb:
|
||||
goto out;
|
||||
}
|
||||
|
||||
int ubi_fastmap_init_checkmap(struct ubi_volume *vol, int leb_count)
|
||||
{
|
||||
struct ubi_device *ubi = vol->ubi;
|
||||
|
||||
if (!ubi->fast_attach)
|
||||
return 0;
|
||||
|
||||
vol->checkmap = kcalloc(BITS_TO_LONGS(leb_count), sizeof(unsigned long),
|
||||
GFP_KERNEL);
|
||||
if (!vol->checkmap)
|
||||
return -ENOMEM;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void ubi_fastmap_destroy_checkmap(struct ubi_volume *vol)
|
||||
{
|
||||
kfree(vol->checkmap);
|
||||
}
|
||||
|
||||
/**
|
||||
* ubi_write_fastmap - writes a fastmap.
|
||||
* @ubi: UBI device object
|
||||
|
||||
@@ -334,6 +334,9 @@ struct ubi_eba_leb_desc {
|
||||
* @changing_leb: %1 if the atomic LEB change ioctl command is in progress
|
||||
* @direct_writes: %1 if direct writes are enabled for this volume
|
||||
*
|
||||
* @checkmap: bitmap to remember which PEB->LEB mappings got checked,
|
||||
* protected by UBI LEB lock tree.
|
||||
*
|
||||
* The @corrupted field indicates that the volume's contents is corrupted.
|
||||
* Since UBI protects only static volumes, this field is not relevant to
|
||||
* dynamic volumes - it is user's responsibility to assure their data
|
||||
@@ -377,6 +380,10 @@ struct ubi_volume {
|
||||
unsigned int updating:1;
|
||||
unsigned int changing_leb:1;
|
||||
unsigned int direct_writes:1;
|
||||
|
||||
#ifdef CONFIG_MTD_UBI_FASTMAP
|
||||
unsigned long *checkmap;
|
||||
#endif
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -965,8 +972,12 @@ size_t ubi_calc_fm_size(struct ubi_device *ubi);
|
||||
int ubi_update_fastmap(struct ubi_device *ubi);
|
||||
int ubi_scan_fastmap(struct ubi_device *ubi, struct ubi_attach_info *ai,
|
||||
struct ubi_attach_info *scan_ai);
|
||||
int ubi_fastmap_init_checkmap(struct ubi_volume *vol, int leb_count);
|
||||
void ubi_fastmap_destroy_checkmap(struct ubi_volume *vol);
|
||||
#else
|
||||
static inline int ubi_update_fastmap(struct ubi_device *ubi) { return 0; }
|
||||
int static inline ubi_fastmap_init_checkmap(struct ubi_volume *vol, int leb_count) { return 0; }
|
||||
static inline void ubi_fastmap_destroy_checkmap(struct ubi_volume *vol) {}
|
||||
#endif
|
||||
|
||||
/* block.c */
|
||||
|
||||
@@ -139,6 +139,7 @@ static void vol_release(struct device *dev)
|
||||
struct ubi_volume *vol = container_of(dev, struct ubi_volume, dev);
|
||||
|
||||
ubi_eba_replace_table(vol, NULL);
|
||||
ubi_fastmap_destroy_checkmap(vol);
|
||||
kfree(vol);
|
||||
}
|
||||
|
||||
|
||||
@@ -534,7 +534,7 @@ static int init_volumes(struct ubi_device *ubi,
|
||||
const struct ubi_attach_info *ai,
|
||||
const struct ubi_vtbl_record *vtbl)
|
||||
{
|
||||
int i, reserved_pebs = 0;
|
||||
int i, err, reserved_pebs = 0;
|
||||
struct ubi_ainf_volume *av;
|
||||
struct ubi_volume *vol;
|
||||
|
||||
@@ -620,6 +620,16 @@ static int init_volumes(struct ubi_device *ubi,
|
||||
(long long)(vol->used_ebs - 1) * vol->usable_leb_size;
|
||||
vol->used_bytes += av->last_data_size;
|
||||
vol->last_eb_bytes = av->last_data_size;
|
||||
|
||||
/*
|
||||
* We use ubi->peb_count and not vol->reserved_pebs because
|
||||
* we want to keep the code simple. Otherwise we'd have to
|
||||
* resize/check the bitmap upon volume resize too.
|
||||
* Allocating a few bytes more does not hurt.
|
||||
*/
|
||||
err = ubi_fastmap_init_checkmap(vol, ubi->peb_count);
|
||||
if (err)
|
||||
return err;
|
||||
}
|
||||
|
||||
/* And add the layout volume */
|
||||
@@ -645,6 +655,9 @@ static int init_volumes(struct ubi_device *ubi,
|
||||
reserved_pebs += vol->reserved_pebs;
|
||||
ubi->vol_count += 1;
|
||||
vol->ubi = ubi;
|
||||
err = ubi_fastmap_init_checkmap(vol, UBI_LAYOUT_VOLUME_EBS);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
if (reserved_pebs > ubi->avail_pebs) {
|
||||
ubi_err(ubi, "not enough PEBs, required %d, available %d",
|
||||
@@ -849,6 +862,7 @@ int ubi_read_volume_table(struct ubi_device *ubi, struct ubi_attach_info *ai)
|
||||
out_free:
|
||||
vfree(ubi->vtbl);
|
||||
for (i = 0; i < ubi->vtbl_slots + UBI_INT_VOL_COUNT; i++) {
|
||||
ubi_fastmap_destroy_checkmap(ubi->volumes[i]);
|
||||
kfree(ubi->volumes[i]);
|
||||
ubi->volumes[i] = NULL;
|
||||
}
|
||||
|
||||
@@ -476,6 +476,34 @@ void can_put_echo_skb(struct sk_buff *skb, struct net_device *dev,
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(can_put_echo_skb);
|
||||
|
||||
struct sk_buff *__can_get_echo_skb(struct net_device *dev, unsigned int idx, u8 *len_ptr)
|
||||
{
|
||||
struct can_priv *priv = netdev_priv(dev);
|
||||
struct sk_buff *skb = priv->echo_skb[idx];
|
||||
struct canfd_frame *cf;
|
||||
|
||||
if (idx >= priv->echo_skb_max) {
|
||||
netdev_err(dev, "%s: BUG! Trying to access can_priv::echo_skb out of bounds (%u/max %u)\n",
|
||||
__func__, idx, priv->echo_skb_max);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (!skb) {
|
||||
netdev_err(dev, "%s: BUG! Trying to echo non existing skb: can_priv::echo_skb[%u]\n",
|
||||
__func__, idx);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Using "struct canfd_frame::len" for the frame
|
||||
* length is supported on both CAN and CANFD frames.
|
||||
*/
|
||||
cf = (struct canfd_frame *)skb->data;
|
||||
*len_ptr = cf->len;
|
||||
priv->echo_skb[idx] = NULL;
|
||||
|
||||
return skb;
|
||||
}
|
||||
|
||||
/*
|
||||
* Get the skb from the stack and loop it back locally
|
||||
*
|
||||
@@ -485,22 +513,16 @@ EXPORT_SYMBOL_GPL(can_put_echo_skb);
|
||||
*/
|
||||
unsigned int can_get_echo_skb(struct net_device *dev, unsigned int idx)
|
||||
{
|
||||
struct can_priv *priv = netdev_priv(dev);
|
||||
struct sk_buff *skb;
|
||||
u8 len;
|
||||
|
||||
BUG_ON(idx >= priv->echo_skb_max);
|
||||
skb = __can_get_echo_skb(dev, idx, &len);
|
||||
if (!skb)
|
||||
return 0;
|
||||
|
||||
if (priv->echo_skb[idx]) {
|
||||
struct sk_buff *skb = priv->echo_skb[idx];
|
||||
struct can_frame *cf = (struct can_frame *)skb->data;
|
||||
u8 dlc = cf->can_dlc;
|
||||
netif_rx(skb);
|
||||
|
||||
netif_rx(priv->echo_skb[idx]);
|
||||
priv->echo_skb[idx] = NULL;
|
||||
|
||||
return dlc;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return len;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(can_get_echo_skb);
|
||||
|
||||
|
||||
@@ -599,7 +599,7 @@ static void flexcan_irq_bus_err(struct net_device *dev, u32 reg_esr)
|
||||
if (tx_errors)
|
||||
dev->stats.tx_errors++;
|
||||
|
||||
can_rx_offload_irq_queue_err_skb(&priv->offload, skb);
|
||||
can_rx_offload_queue_tail(&priv->offload, skb);
|
||||
}
|
||||
|
||||
static void flexcan_irq_state(struct net_device *dev, u32 reg_esr)
|
||||
@@ -639,7 +639,7 @@ static void flexcan_irq_state(struct net_device *dev, u32 reg_esr)
|
||||
if (unlikely(new_state == CAN_STATE_BUS_OFF))
|
||||
can_bus_off(dev);
|
||||
|
||||
can_rx_offload_irq_queue_err_skb(&priv->offload, skb);
|
||||
can_rx_offload_queue_tail(&priv->offload, skb);
|
||||
}
|
||||
|
||||
static inline struct flexcan_priv *rx_offload_to_priv(struct can_rx_offload *offload)
|
||||
|
||||
@@ -209,7 +209,54 @@ int can_rx_offload_irq_offload_fifo(struct can_rx_offload *offload)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(can_rx_offload_irq_offload_fifo);
|
||||
|
||||
int can_rx_offload_irq_queue_err_skb(struct can_rx_offload *offload, struct sk_buff *skb)
|
||||
int can_rx_offload_queue_sorted(struct can_rx_offload *offload,
|
||||
struct sk_buff *skb, u32 timestamp)
|
||||
{
|
||||
struct can_rx_offload_cb *cb;
|
||||
unsigned long flags;
|
||||
|
||||
if (skb_queue_len(&offload->skb_queue) >
|
||||
offload->skb_queue_len_max)
|
||||
return -ENOMEM;
|
||||
|
||||
cb = can_rx_offload_get_cb(skb);
|
||||
cb->timestamp = timestamp;
|
||||
|
||||
spin_lock_irqsave(&offload->skb_queue.lock, flags);
|
||||
__skb_queue_add_sort(&offload->skb_queue, skb, can_rx_offload_compare);
|
||||
spin_unlock_irqrestore(&offload->skb_queue.lock, flags);
|
||||
|
||||
can_rx_offload_schedule(offload);
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(can_rx_offload_queue_sorted);
|
||||
|
||||
unsigned int can_rx_offload_get_echo_skb(struct can_rx_offload *offload,
|
||||
unsigned int idx, u32 timestamp)
|
||||
{
|
||||
struct net_device *dev = offload->dev;
|
||||
struct net_device_stats *stats = &dev->stats;
|
||||
struct sk_buff *skb;
|
||||
u8 len;
|
||||
int err;
|
||||
|
||||
skb = __can_get_echo_skb(dev, idx, &len);
|
||||
if (!skb)
|
||||
return 0;
|
||||
|
||||
err = can_rx_offload_queue_sorted(offload, skb, timestamp);
|
||||
if (err) {
|
||||
stats->rx_errors++;
|
||||
stats->tx_fifo_errors++;
|
||||
}
|
||||
|
||||
return len;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(can_rx_offload_get_echo_skb);
|
||||
|
||||
int can_rx_offload_queue_tail(struct can_rx_offload *offload,
|
||||
struct sk_buff *skb)
|
||||
{
|
||||
if (skb_queue_len(&offload->skb_queue) >
|
||||
offload->skb_queue_len_max)
|
||||
@@ -220,7 +267,7 @@ int can_rx_offload_irq_queue_err_skb(struct can_rx_offload *offload, struct sk_b
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(can_rx_offload_irq_queue_err_skb);
|
||||
EXPORT_SYMBOL_GPL(can_rx_offload_queue_tail);
|
||||
|
||||
static int can_rx_offload_init_queue(struct net_device *dev, struct can_rx_offload *offload, unsigned int weight)
|
||||
{
|
||||
|
||||
@@ -760,7 +760,7 @@ static int hi3110_open(struct net_device *net)
|
||||
{
|
||||
struct hi3110_priv *priv = netdev_priv(net);
|
||||
struct spi_device *spi = priv->spi;
|
||||
unsigned long flags = IRQF_ONESHOT | IRQF_TRIGGER_RISING;
|
||||
unsigned long flags = IRQF_ONESHOT | IRQF_TRIGGER_HIGH;
|
||||
int ret;
|
||||
|
||||
ret = open_candev(net);
|
||||
|
||||
@@ -360,7 +360,7 @@ static struct device_node *bcmgenet_mii_of_find_mdio(struct bcmgenet_priv *priv)
|
||||
if (!compat)
|
||||
return NULL;
|
||||
|
||||
priv->mdio_dn = of_find_compatible_node(dn, NULL, compat);
|
||||
priv->mdio_dn = of_get_compatible_child(dn, compat);
|
||||
kfree(compat);
|
||||
if (!priv->mdio_dn) {
|
||||
dev_err(kdev, "unable to find MDIO bus node\n");
|
||||
|
||||
@@ -9688,6 +9688,8 @@ static int i40e_config_netdev(struct i40e_vsi *vsi)
|
||||
NETIF_F_GSO_GRE |
|
||||
NETIF_F_GSO_GRE_CSUM |
|
||||
NETIF_F_GSO_PARTIAL |
|
||||
NETIF_F_GSO_IPXIP4 |
|
||||
NETIF_F_GSO_IPXIP6 |
|
||||
NETIF_F_GSO_UDP_TUNNEL |
|
||||
NETIF_F_GSO_UDP_TUNNEL_CSUM |
|
||||
NETIF_F_SCTP_CRC |
|
||||
|
||||
@@ -760,8 +760,10 @@ static inline void ixgbe_vf_reset_event(struct ixgbe_adapter *adapter, u32 vf)
|
||||
ixgbe_set_vmvir(adapter, vfinfo->pf_vlan,
|
||||
adapter->default_up, vf);
|
||||
|
||||
if (vfinfo->spoofchk_enabled)
|
||||
if (vfinfo->spoofchk_enabled) {
|
||||
hw->mac.ops.set_vlan_anti_spoofing(hw, true, vf);
|
||||
hw->mac.ops.set_mac_anti_spoofing(hw, true, vf);
|
||||
}
|
||||
}
|
||||
|
||||
/* reset multicast table array for vf */
|
||||
|
||||
@@ -611,7 +611,6 @@ int mlx4_init_resource_tracker(struct mlx4_dev *dev)
|
||||
MLX4_MAX_PORTS;
|
||||
else
|
||||
res_alloc->guaranteed[t] = 0;
|
||||
res_alloc->res_free -= res_alloc->guaranteed[t];
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -167,6 +167,9 @@ struct qed_spq_entry {
|
||||
enum spq_mode comp_mode;
|
||||
struct qed_spq_comp_cb comp_cb;
|
||||
struct qed_spq_comp_done comp_done; /* SPQ_MODE_EBLOCK */
|
||||
|
||||
/* Posted entry for unlimited list entry in EBLOCK mode */
|
||||
struct qed_spq_entry *post_ent;
|
||||
};
|
||||
|
||||
struct qed_eq {
|
||||
|
||||
@@ -80,7 +80,7 @@ int qed_sp_init_request(struct qed_hwfn *p_hwfn,
|
||||
|
||||
case QED_SPQ_MODE_BLOCK:
|
||||
if (!p_data->p_comp_data)
|
||||
return -EINVAL;
|
||||
goto err;
|
||||
|
||||
p_ent->comp_cb.cookie = p_data->p_comp_data->cookie;
|
||||
break;
|
||||
@@ -95,7 +95,7 @@ int qed_sp_init_request(struct qed_hwfn *p_hwfn,
|
||||
default:
|
||||
DP_NOTICE(p_hwfn, "Unknown SPQE completion mode %d\n",
|
||||
p_ent->comp_mode);
|
||||
return -EINVAL;
|
||||
goto err;
|
||||
}
|
||||
|
||||
DP_VERBOSE(p_hwfn, QED_MSG_SPQ,
|
||||
@@ -109,6 +109,18 @@ int qed_sp_init_request(struct qed_hwfn *p_hwfn,
|
||||
memset(&p_ent->ramrod, 0, sizeof(p_ent->ramrod));
|
||||
|
||||
return 0;
|
||||
|
||||
err:
|
||||
/* qed_spq_get_entry() can either get an entry from the free_pool,
|
||||
* or, if no entries are left, allocate a new entry and add it to
|
||||
* the unlimited_pending list.
|
||||
*/
|
||||
if (p_ent->queue == &p_hwfn->p_spq->unlimited_pending)
|
||||
kfree(p_ent);
|
||||
else
|
||||
qed_spq_return_entry(p_hwfn, p_ent);
|
||||
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static enum tunnel_clss qed_tunn_clss_to_fw_clss(u8 type)
|
||||
|
||||
@@ -144,6 +144,7 @@ static int qed_spq_block(struct qed_hwfn *p_hwfn,
|
||||
|
||||
DP_INFO(p_hwfn, "Ramrod is stuck, requesting MCP drain\n");
|
||||
rc = qed_mcp_drain(p_hwfn, p_ptt);
|
||||
qed_ptt_release(p_hwfn, p_ptt);
|
||||
if (rc) {
|
||||
DP_NOTICE(p_hwfn, "MCP drain failed\n");
|
||||
goto err;
|
||||
@@ -152,18 +153,15 @@ static int qed_spq_block(struct qed_hwfn *p_hwfn,
|
||||
/* Retry after drain */
|
||||
rc = __qed_spq_block(p_hwfn, p_ent, p_fw_ret, true);
|
||||
if (!rc)
|
||||
goto out;
|
||||
return 0;
|
||||
|
||||
comp_done = (struct qed_spq_comp_done *)p_ent->comp_cb.cookie;
|
||||
if (comp_done->done == 1)
|
||||
if (comp_done->done == 1) {
|
||||
if (p_fw_ret)
|
||||
*p_fw_ret = comp_done->fw_return_code;
|
||||
out:
|
||||
qed_ptt_release(p_hwfn, p_ptt);
|
||||
return 0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
err:
|
||||
qed_ptt_release(p_hwfn, p_ptt);
|
||||
DP_NOTICE(p_hwfn,
|
||||
"Ramrod is stuck [CID %08x cmd %02x protocol %02x echo %04x]\n",
|
||||
le32_to_cpu(p_ent->elem.hdr.cid),
|
||||
@@ -687,6 +685,8 @@ static int qed_spq_add_entry(struct qed_hwfn *p_hwfn,
|
||||
/* EBLOCK responsible to free the allocated p_ent */
|
||||
if (p_ent->comp_mode != QED_SPQ_MODE_EBLOCK)
|
||||
kfree(p_ent);
|
||||
else
|
||||
p_ent->post_ent = p_en2;
|
||||
|
||||
p_ent = p_en2;
|
||||
}
|
||||
@@ -770,6 +770,25 @@ static int qed_spq_pend_post(struct qed_hwfn *p_hwfn)
|
||||
SPQ_HIGH_PRI_RESERVE_DEFAULT);
|
||||
}
|
||||
|
||||
/* Avoid overriding of SPQ entries when getting out-of-order completions, by
|
||||
* marking the completions in a bitmap and increasing the chain consumer only
|
||||
* for the first successive completed entries.
|
||||
*/
|
||||
static void qed_spq_comp_bmap_update(struct qed_hwfn *p_hwfn, __le16 echo)
|
||||
{
|
||||
u16 pos = le16_to_cpu(echo) % SPQ_RING_SIZE;
|
||||
struct qed_spq *p_spq = p_hwfn->p_spq;
|
||||
|
||||
__set_bit(pos, p_spq->p_comp_bitmap);
|
||||
while (test_bit(p_spq->comp_bitmap_idx,
|
||||
p_spq->p_comp_bitmap)) {
|
||||
__clear_bit(p_spq->comp_bitmap_idx,
|
||||
p_spq->p_comp_bitmap);
|
||||
p_spq->comp_bitmap_idx++;
|
||||
qed_chain_return_produced(&p_spq->chain);
|
||||
}
|
||||
}
|
||||
|
||||
int qed_spq_post(struct qed_hwfn *p_hwfn,
|
||||
struct qed_spq_entry *p_ent, u8 *fw_return_code)
|
||||
{
|
||||
@@ -821,11 +840,12 @@ int qed_spq_post(struct qed_hwfn *p_hwfn,
|
||||
p_ent->queue == &p_spq->unlimited_pending);
|
||||
|
||||
if (p_ent->queue == &p_spq->unlimited_pending) {
|
||||
/* This is an allocated p_ent which does not need to
|
||||
* return to pool.
|
||||
*/
|
||||
struct qed_spq_entry *p_post_ent = p_ent->post_ent;
|
||||
|
||||
kfree(p_ent);
|
||||
return rc;
|
||||
|
||||
/* Return the entry which was actually posted */
|
||||
p_ent = p_post_ent;
|
||||
}
|
||||
|
||||
if (rc)
|
||||
@@ -839,7 +859,7 @@ int qed_spq_post(struct qed_hwfn *p_hwfn,
|
||||
spq_post_fail2:
|
||||
spin_lock_bh(&p_spq->lock);
|
||||
list_del(&p_ent->list);
|
||||
qed_chain_return_produced(&p_spq->chain);
|
||||
qed_spq_comp_bmap_update(p_hwfn, p_ent->elem.hdr.echo);
|
||||
|
||||
spq_post_fail:
|
||||
/* return to the free pool */
|
||||
@@ -871,25 +891,8 @@ int qed_spq_completion(struct qed_hwfn *p_hwfn,
|
||||
spin_lock_bh(&p_spq->lock);
|
||||
list_for_each_entry_safe(p_ent, tmp, &p_spq->completion_pending, list) {
|
||||
if (p_ent->elem.hdr.echo == echo) {
|
||||
u16 pos = le16_to_cpu(echo) % SPQ_RING_SIZE;
|
||||
|
||||
list_del(&p_ent->list);
|
||||
|
||||
/* Avoid overriding of SPQ entries when getting
|
||||
* out-of-order completions, by marking the completions
|
||||
* in a bitmap and increasing the chain consumer only
|
||||
* for the first successive completed entries.
|
||||
*/
|
||||
__set_bit(pos, p_spq->p_comp_bitmap);
|
||||
|
||||
while (test_bit(p_spq->comp_bitmap_idx,
|
||||
p_spq->p_comp_bitmap)) {
|
||||
__clear_bit(p_spq->comp_bitmap_idx,
|
||||
p_spq->p_comp_bitmap);
|
||||
p_spq->comp_bitmap_idx++;
|
||||
qed_chain_return_produced(&p_spq->chain);
|
||||
}
|
||||
|
||||
qed_spq_comp_bmap_update(p_hwfn, echo);
|
||||
p_spq->comp_count++;
|
||||
found = p_ent;
|
||||
break;
|
||||
@@ -928,11 +931,9 @@ int qed_spq_completion(struct qed_hwfn *p_hwfn,
|
||||
QED_MSG_SPQ,
|
||||
"Got a completion without a callback function\n");
|
||||
|
||||
if ((found->comp_mode != QED_SPQ_MODE_EBLOCK) ||
|
||||
(found->queue == &p_spq->unlimited_pending))
|
||||
if (found->comp_mode != QED_SPQ_MODE_EBLOCK)
|
||||
/* EBLOCK is responsible for returning its own entry into the
|
||||
* free list, unless it originally added the entry into the
|
||||
* unlimited pending list.
|
||||
* free list.
|
||||
*/
|
||||
qed_spq_return_entry(p_hwfn, found);
|
||||
|
||||
|
||||
@@ -340,7 +340,8 @@ struct dma_features {
|
||||
|
||||
/* GMAC TX FIFO is 8K, Rx FIFO is 16K */
|
||||
#define BUF_SIZE_16KiB 16384
|
||||
#define BUF_SIZE_8KiB 8192
|
||||
/* RX Buffer size must be < 8191 and multiple of 4/8/16 bytes */
|
||||
#define BUF_SIZE_8KiB 8188
|
||||
#define BUF_SIZE_4KiB 4096
|
||||
#define BUF_SIZE_2KiB 2048
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
/* Enhanced descriptors */
|
||||
static inline void ehn_desc_rx_set_on_ring(struct dma_desc *p, int end)
|
||||
{
|
||||
p->des1 |= cpu_to_le32(((BUF_SIZE_8KiB - 1)
|
||||
p->des1 |= cpu_to_le32((BUF_SIZE_8KiB
|
||||
<< ERDES1_BUFFER2_SIZE_SHIFT)
|
||||
& ERDES1_BUFFER2_SIZE_MASK);
|
||||
|
||||
|
||||
@@ -262,7 +262,7 @@ static void enh_desc_init_rx_desc(struct dma_desc *p, int disable_rx_ic,
|
||||
int mode, int end)
|
||||
{
|
||||
p->des0 |= cpu_to_le32(RDES0_OWN);
|
||||
p->des1 |= cpu_to_le32((BUF_SIZE_8KiB - 1) & ERDES1_BUFFER1_SIZE_MASK);
|
||||
p->des1 |= cpu_to_le32(BUF_SIZE_8KiB & ERDES1_BUFFER1_SIZE_MASK);
|
||||
|
||||
if (mode == STMMAC_CHAIN_MODE)
|
||||
ehn_desc_rx_set_on_chain(p);
|
||||
|
||||
@@ -143,7 +143,7 @@ static void stmmac_clean_desc3(void *priv_ptr, struct dma_desc *p)
|
||||
static int stmmac_set_16kib_bfsize(int mtu)
|
||||
{
|
||||
int ret = 0;
|
||||
if (unlikely(mtu >= BUF_SIZE_8KiB))
|
||||
if (unlikely(mtu > BUF_SIZE_8KiB))
|
||||
ret = BUF_SIZE_16KiB;
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
#include <linux/irqchip/chained_irq.h>
|
||||
#include <linux/microchipphy.h>
|
||||
#include <linux/phy.h>
|
||||
#include <linux/of_net.h>
|
||||
#include "lan78xx.h"
|
||||
|
||||
#define DRIVER_AUTHOR "WOOJUNG HUH <woojung.huh@microchip.com>"
|
||||
@@ -1645,34 +1646,31 @@ static void lan78xx_init_mac_address(struct lan78xx_net *dev)
|
||||
addr[5] = (addr_hi >> 8) & 0xFF;
|
||||
|
||||
if (!is_valid_ether_addr(addr)) {
|
||||
/* reading mac address from EEPROM or OTP */
|
||||
if ((lan78xx_read_eeprom(dev, EEPROM_MAC_OFFSET, ETH_ALEN,
|
||||
addr) == 0) ||
|
||||
(lan78xx_read_otp(dev, EEPROM_MAC_OFFSET, ETH_ALEN,
|
||||
addr) == 0)) {
|
||||
if (is_valid_ether_addr(addr)) {
|
||||
/* eeprom values are valid so use them */
|
||||
netif_dbg(dev, ifup, dev->net,
|
||||
"MAC address read from EEPROM");
|
||||
} else {
|
||||
/* generate random MAC */
|
||||
random_ether_addr(addr);
|
||||
netif_dbg(dev, ifup, dev->net,
|
||||
"MAC address set to random addr");
|
||||
}
|
||||
|
||||
addr_lo = addr[0] | (addr[1] << 8) |
|
||||
(addr[2] << 16) | (addr[3] << 24);
|
||||
addr_hi = addr[4] | (addr[5] << 8);
|
||||
|
||||
ret = lan78xx_write_reg(dev, RX_ADDRL, addr_lo);
|
||||
ret = lan78xx_write_reg(dev, RX_ADDRH, addr_hi);
|
||||
if (!eth_platform_get_mac_address(&dev->udev->dev, addr)) {
|
||||
/* valid address present in Device Tree */
|
||||
netif_dbg(dev, ifup, dev->net,
|
||||
"MAC address read from Device Tree");
|
||||
} else if (((lan78xx_read_eeprom(dev, EEPROM_MAC_OFFSET,
|
||||
ETH_ALEN, addr) == 0) ||
|
||||
(lan78xx_read_otp(dev, EEPROM_MAC_OFFSET,
|
||||
ETH_ALEN, addr) == 0)) &&
|
||||
is_valid_ether_addr(addr)) {
|
||||
/* eeprom values are valid so use them */
|
||||
netif_dbg(dev, ifup, dev->net,
|
||||
"MAC address read from EEPROM");
|
||||
} else {
|
||||
/* generate random MAC */
|
||||
random_ether_addr(addr);
|
||||
netif_dbg(dev, ifup, dev->net,
|
||||
"MAC address set to random addr");
|
||||
}
|
||||
|
||||
addr_lo = addr[0] | (addr[1] << 8) |
|
||||
(addr[2] << 16) | (addr[3] << 24);
|
||||
addr_hi = addr[4] | (addr[5] << 8);
|
||||
|
||||
ret = lan78xx_write_reg(dev, RX_ADDRL, addr_lo);
|
||||
ret = lan78xx_write_reg(dev, RX_ADDRH, addr_hi);
|
||||
}
|
||||
|
||||
ret = lan78xx_write_reg(dev, MAF_LO(0), addr_lo);
|
||||
|
||||
@@ -6098,7 +6098,8 @@ static int brcmf_construct_chaninfo(struct brcmf_cfg80211_info *cfg,
|
||||
* for subsequent chanspecs.
|
||||
*/
|
||||
channel->flags = IEEE80211_CHAN_NO_HT40 |
|
||||
IEEE80211_CHAN_NO_80MHZ;
|
||||
IEEE80211_CHAN_NO_80MHZ |
|
||||
IEEE80211_CHAN_NO_160MHZ;
|
||||
ch.bw = BRCMU_CHAN_BW_20;
|
||||
cfg->d11inf.encchspec(&ch);
|
||||
chaninfo = ch.chspec;
|
||||
|
||||
@@ -590,7 +590,7 @@ static int iwl_mvm_config_ltr(struct iwl_mvm *mvm)
|
||||
#define ACPI_WRDS_WIFI_DATA_SIZE (IWL_MVM_SAR_TABLE_SIZE + 2)
|
||||
#define ACPI_EWRD_WIFI_DATA_SIZE ((IWL_MVM_SAR_PROFILE_NUM - 1) * \
|
||||
IWL_MVM_SAR_TABLE_SIZE + 3)
|
||||
#define ACPI_WGDS_WIFI_DATA_SIZE 18
|
||||
#define ACPI_WGDS_WIFI_DATA_SIZE 19
|
||||
#define ACPI_WGDS_NUM_BANDS 2
|
||||
#define ACPI_WGDS_TABLE_SIZE 3
|
||||
|
||||
@@ -964,7 +964,7 @@ static int iwl_mvm_sar_geo_init(struct iwl_mvm *mvm)
|
||||
IWL_DEBUG_RADIO(mvm, "Sending GEO_TX_POWER_LIMIT\n");
|
||||
|
||||
BUILD_BUG_ON(IWL_NUM_GEO_PROFILES * ACPI_WGDS_NUM_BANDS *
|
||||
ACPI_WGDS_TABLE_SIZE != ACPI_WGDS_WIFI_DATA_SIZE);
|
||||
ACPI_WGDS_TABLE_SIZE + 1 != ACPI_WGDS_WIFI_DATA_SIZE);
|
||||
|
||||
for (i = 0; i < IWL_NUM_GEO_PROFILES; i++) {
|
||||
struct iwl_per_chain_offset *chain =
|
||||
@@ -997,6 +997,11 @@ static int iwl_mvm_sar_get_ewrd_table(struct iwl_mvm *mvm)
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
static int iwl_mvm_sar_get_wgds_table(struct iwl_mvm *mvm)
|
||||
{
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
static int iwl_mvm_sar_geo_init(struct iwl_mvm *mvm)
|
||||
{
|
||||
return 0;
|
||||
@@ -1023,8 +1028,11 @@ static int iwl_mvm_sar_init(struct iwl_mvm *mvm)
|
||||
IWL_DEBUG_RADIO(mvm,
|
||||
"WRDS SAR BIOS table invalid or unavailable. (%d)\n",
|
||||
ret);
|
||||
/* if not available, don't fail and don't bother with EWRD */
|
||||
return 0;
|
||||
/*
|
||||
* If not available, don't fail and don't bother with EWRD.
|
||||
* Return 1 to tell that we can't use WGDS either.
|
||||
*/
|
||||
return 1;
|
||||
}
|
||||
|
||||
ret = iwl_mvm_sar_get_ewrd_table(mvm);
|
||||
@@ -1037,9 +1045,13 @@ static int iwl_mvm_sar_init(struct iwl_mvm *mvm)
|
||||
/* choose profile 1 (WRDS) as default for both chains */
|
||||
ret = iwl_mvm_sar_select_profile(mvm, 1, 1);
|
||||
|
||||
/* if we don't have profile 0 from BIOS, just skip it */
|
||||
/*
|
||||
* If we don't have profile 0 from BIOS, just skip it. This
|
||||
* means that SAR Geo will not be enabled either, even if we
|
||||
* have other valid profiles.
|
||||
*/
|
||||
if (ret == -ENOENT)
|
||||
return 0;
|
||||
return 1;
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -1229,11 +1241,19 @@ int iwl_mvm_up(struct iwl_mvm *mvm)
|
||||
iwl_mvm_unref(mvm, IWL_MVM_REF_UCODE_DOWN);
|
||||
|
||||
ret = iwl_mvm_sar_init(mvm);
|
||||
if (ret)
|
||||
goto error;
|
||||
if (ret == 0) {
|
||||
ret = iwl_mvm_sar_geo_init(mvm);
|
||||
} else if (ret > 0 && !iwl_mvm_sar_get_wgds_table(mvm)) {
|
||||
/*
|
||||
* If basic SAR is not available, we check for WGDS,
|
||||
* which should *not* be available either. If it is
|
||||
* available, issue an error, because we can't use SAR
|
||||
* Geo without basic SAR.
|
||||
*/
|
||||
IWL_ERR(mvm, "BIOS contains WGDS but no WRDS\n");
|
||||
}
|
||||
|
||||
ret = iwl_mvm_sar_geo_init(mvm);
|
||||
if (ret)
|
||||
if (ret < 0)
|
||||
goto error;
|
||||
|
||||
iwl_mvm_leds_sync(mvm);
|
||||
|
||||
@@ -328,8 +328,12 @@ struct ieee80211_regdomain *iwl_mvm_get_regdomain(struct wiphy *wiphy,
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (changed)
|
||||
*changed = (resp->status == MCC_RESP_NEW_CHAN_PROFILE);
|
||||
if (changed) {
|
||||
u32 status = le32_to_cpu(resp->status);
|
||||
|
||||
*changed = (status == MCC_RESP_NEW_CHAN_PROFILE ||
|
||||
status == MCC_RESP_ILLEGAL);
|
||||
}
|
||||
|
||||
regd = iwl_parse_nvm_mcc_info(mvm->trans->dev, mvm->cfg,
|
||||
__le32_to_cpu(resp->n_channels),
|
||||
@@ -4189,10 +4193,6 @@ static void iwl_mvm_mac_sta_statistics(struct ieee80211_hw *hw,
|
||||
sinfo->filled |= BIT(NL80211_STA_INFO_SIGNAL_AVG);
|
||||
}
|
||||
|
||||
if (!fw_has_capa(&mvm->fw->ucode_capa,
|
||||
IWL_UCODE_TLV_CAPA_RADIO_BEACON_STATS))
|
||||
return;
|
||||
|
||||
/* if beacon filtering isn't on mac80211 does it anyway */
|
||||
if (!(vif->driver_flags & IEEE80211_VIF_BEACON_FILTER))
|
||||
return;
|
||||
|
||||
@@ -732,9 +732,8 @@ iwl_mvm_update_mcc(struct iwl_mvm *mvm, const char *alpha2,
|
||||
}
|
||||
|
||||
IWL_DEBUG_LAR(mvm,
|
||||
"MCC response status: 0x%x. new MCC: 0x%x ('%c%c') change: %d n_chans: %d\n",
|
||||
status, mcc, mcc >> 8, mcc & 0xff,
|
||||
!!(status == MCC_RESP_NEW_CHAN_PROFILE), n_channels);
|
||||
"MCC response status: 0x%x. new MCC: 0x%x ('%c%c') n_chans: %d\n",
|
||||
status, mcc, mcc >> 8, mcc & 0xff, n_channels);
|
||||
|
||||
exit:
|
||||
iwl_free_resp(&cmd);
|
||||
|
||||
@@ -73,10 +73,9 @@ static int nfcmrvl_uart_parse_dt(struct device_node *node,
|
||||
struct device_node *matched_node;
|
||||
int ret;
|
||||
|
||||
matched_node = of_find_compatible_node(node, NULL, "marvell,nfc-uart");
|
||||
matched_node = of_get_compatible_child(node, "marvell,nfc-uart");
|
||||
if (!matched_node) {
|
||||
matched_node = of_find_compatible_node(node, NULL,
|
||||
"mrvl,nfc-uart");
|
||||
matched_node = of_get_compatible_child(node, "mrvl,nfc-uart");
|
||||
if (!matched_node)
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
@@ -723,6 +723,31 @@ struct device_node *of_get_next_available_child(const struct device_node *node,
|
||||
}
|
||||
EXPORT_SYMBOL(of_get_next_available_child);
|
||||
|
||||
/**
|
||||
* of_get_compatible_child - Find compatible child node
|
||||
* @parent: parent node
|
||||
* @compatible: compatible string
|
||||
*
|
||||
* Lookup child node whose compatible property contains the given compatible
|
||||
* string.
|
||||
*
|
||||
* Returns a node pointer with refcount incremented, use of_node_put() on it
|
||||
* when done; or NULL if not found.
|
||||
*/
|
||||
struct device_node *of_get_compatible_child(const struct device_node *parent,
|
||||
const char *compatible)
|
||||
{
|
||||
struct device_node *child;
|
||||
|
||||
for_each_child_of_node(parent, child) {
|
||||
if (of_device_is_compatible(child, compatible))
|
||||
break;
|
||||
}
|
||||
|
||||
return child;
|
||||
}
|
||||
EXPORT_SYMBOL(of_get_compatible_child);
|
||||
|
||||
/**
|
||||
* of_get_child_by_name - Find the child node by name for a given parent
|
||||
* @node: parent node
|
||||
|
||||
@@ -97,16 +97,10 @@ static int pci_epc_epf_link(struct config_item *epc_item,
|
||||
{
|
||||
int ret;
|
||||
u32 func_no = 0;
|
||||
struct pci_epc *epc;
|
||||
struct pci_epf *epf;
|
||||
struct pci_epf_group *epf_group = to_pci_epf_group(epf_item);
|
||||
struct pci_epc_group *epc_group = to_pci_epc_group(epc_item);
|
||||
|
||||
epc = epc_group->epc;
|
||||
epf = epf_group->epf;
|
||||
ret = pci_epc_add_epf(epc, epf);
|
||||
if (ret)
|
||||
goto err_add_epf;
|
||||
struct pci_epc *epc = epc_group->epc;
|
||||
struct pci_epf *epf = epf_group->epf;
|
||||
|
||||
func_no = find_first_zero_bit(&epc_group->function_num_map,
|
||||
BITS_PER_LONG);
|
||||
@@ -116,6 +110,10 @@ static int pci_epc_epf_link(struct config_item *epc_item,
|
||||
set_bit(func_no, &epc_group->function_num_map);
|
||||
epf->func_no = func_no;
|
||||
|
||||
ret = pci_epc_add_epf(epc, epf);
|
||||
if (ret)
|
||||
goto err_add_epf;
|
||||
|
||||
ret = pci_epf_bind(epf);
|
||||
if (ret)
|
||||
goto err_epf_bind;
|
||||
|
||||
@@ -273,7 +273,7 @@ static int meson_pinconf_set(struct pinctrl_dev *pcdev, unsigned int pin,
|
||||
dev_dbg(pc->dev, "pin %u: disable bias\n", pin);
|
||||
|
||||
meson_calc_reg_and_bit(bank, pin, REG_PULL, ®, &bit);
|
||||
ret = regmap_update_bits(pc->reg_pull, reg,
|
||||
ret = regmap_update_bits(pc->reg_pullen, reg,
|
||||
BIT(bit), 0);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
@@ -233,6 +233,7 @@ static const struct bios_settings bios_tbl[] = {
|
||||
{"Gateway", "LT31", "v1.3201", 0x55, 0x58, {0x9e, 0x00}, 0},
|
||||
{"Gateway", "LT31", "v1.3302", 0x55, 0x58, {0x9e, 0x00}, 0},
|
||||
{"Gateway", "LT31", "v1.3303t", 0x55, 0x58, {0x9e, 0x00}, 0},
|
||||
{"Gateway", "LT31", "v1.3307", 0x55, 0x58, {0x9e, 0x00}, 0},
|
||||
/* Packard Bell */
|
||||
{"Packard Bell", "DOA150", "v0.3104", 0x55, 0x58, {0x21, 0x00}, 0},
|
||||
{"Packard Bell", "DOA150", "v0.3105", 0x55, 0x58, {0x20, 0x00}, 0},
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user