mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
This is the 4.14.122 stable release
-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAlzpbIIACgkQONu9yGCS aT7bGhAAs0CR9GnL3sgl9AlMJ3SHGMnWA+KVt3KCPnIJMMz7QNJrhAUxpg/vBN3l UqOGey7+T4l8KYXzVZyO1Fd9qyQ+qZSr25V/U9FmqboKLxtaG44/R9S8UfhwaWXg RHlWdWc8gwrIcIsXlN+DmDfC3xGvCSC8M2Fh3xXtBR8agK4B06cuCKIFkwBKuOxI zR9WLvGb1Ytletr4ev8yISzEPS8EKPra0Reh6k3cKB8SvVPB5mKfwu7t/7Vqf8/3 HcXvwEXeiz8JTEciWB6ThSNRZ9oWd41jfVAvQb1zLGXaQmAFVve5Q0IOqLkMXIzw RA6p2nsRIGKsZw6LdBz3lmNqOIBgBLS5rmwIUju7BdoVHqVYzBTIz7oEBI0V4xXe XdNexC7IIWGwKcYcWxCIqzSE5JU4dwbYLktZFvqibE7IyslhN2d54Zz/dFycG5YM 6RM1HdEUmJ6lwxXWUCcpCJnObOvhQwCaP5QpCjak/XZvaIJubGhunePOnNbnzUz/ JfWXWEJ+64dv3ZxzqvpZYEb8iBPUMqcavmrIF8lWoKlwcOtnGpWnYzh+kgANw5jF XDij9Riq+9b79fQa0CXKaDik75pNkYucPLTkATBX/mROEHb1mIoxR1Z7Bil6PPiR yUNOfhPBZJ5FcM4eCfTRO3yFuJedfBEyFLnlNtNedM/W8dqu4/0= =3Yy7 -----END PGP SIGNATURE----- Merge 4.14.122 into android-4.14 Changes in 4.14.122 net: avoid weird emergency message net/mlx4_core: Change the error print to info print net: test nouarg before dereferencing zerocopy pointers net: usb: qmi_wwan: add Telit 0x1260 and 0x1261 compositions ppp: deflate: Fix possible crash in deflate_init tipc: switch order of device registration to fix a crash vsock/virtio: free packets during the socket release tipc: fix modprobe tipc failed after switch order of device registration vsock/virtio: Initialize core virtio vsock before registering the driver net: Always descend into dsa/ parisc: Export running_on_qemu symbol for modules parisc: Skip registering LED when running in QEMU parisc: Use PA_ASM_LEVEL in boot code parisc: Rename LEVEL to PA_ASM_LEVEL to avoid name clash with DRBD code stm class: Fix channel free in stm output free path md: add mddev->pers to avoid potential NULL pointer dereference intel_th: msu: Fix single mode with IOMMU p54: drop device reference count if fails to enable device of: fix clang -Wunsequenced for be32_to_cpu() cifs: fix strcat buffer overflow and reduce raciness in smb21_set_oplock_level() media: ov6650: Fix sensor possibly not detected on probe Revert "cifs: fix memory leak in SMB2_read" NFS4: Fix v4.0 client state corruption when mount PNFS fallback to MDS if no deviceid found clk: hi3660: Mark clk_gate_ufs_subsys as critical clk: tegra: Fix PLLM programming on Tegra124+ when PMC overrides divider clk: rockchip: fix wrong clock definitions for rk3328 fuse: fix writepages on 32bit fuse: honor RLIMIT_FSIZE in fuse_file_fallocate iommu/tegra-smmu: Fix invalid ASID bits on Tegra30/114 ceph: flush dirty inodes before proceeding with remount x86_64: Add gap to int3 to allow for call emulation x86_64: Allow breakpoints to emulate call instructions ftrace/x86_64: Emulate call function while updating in breakpoint handler tracing: Fix partial reading of trace event's id file memory: tegra: Fix integer overflow on tick value calculation perf intel-pt: Fix instructions sampling rate perf intel-pt: Fix improved sample timestamp perf intel-pt: Fix sample timestamp wrt non-taken branches objtool: Allow AR to be overridden with HOSTAR fbdev: sm712fb: fix brightness control on reboot, don't set SR30 fbdev: sm712fb: fix VRAM detection, don't set SR70/71/74/75 fbdev: sm712fb: fix white screen of death on reboot, don't set CR3B-CR3F fbdev: sm712fb: fix boot screen glitch when sm712fb replaces VGA fbdev: sm712fb: fix crashes during framebuffer writes by correctly mapping VRAM fbdev: sm712fb: fix support for 1024x768-16 mode fbdev: sm712fb: use 1024x768 by default on non-MIPS, fix garbled display fbdev: sm712fb: fix crashes and garbled display during DPMS modesetting PCI: Mark AMD Stoney Radeon R7 GPU ATS as broken PCI: Mark Atheros AR9462 to avoid bus reset PCI: Factor out pcie_retrain_link() function PCI: Work around Pericom PCIe-to-PCI bridge Retrain Link erratum dm cache metadata: Fix loading discard bitset dm zoned: Fix zone report handling dm delay: fix a crash when invalid device is specified xfrm: policy: Fix out-of-bound array accesses in __xfrm_policy_unlink xfrm6_tunnel: Fix potential panic when unloading xfrm6_tunnel module vti4: ipip tunnel deregistration fixes. esp4: add length check for UDP encapsulation xfrm4: Fix uninitialized memory read in _decode_session4 power: supply: cpcap-battery: Fix division by zero securityfs: fix use-after-free on symlink traversal apparmorfs: fix use-after-free on symlink traversal mac80211: Fix kernel panic due to use of txq after free KVM: arm/arm64: Ensure vcpu target is unset on reset failure power: supply: sysfs: prevent endless uevent loop with CONFIG_POWER_SUPPLY_DEBUG iwlwifi: mvm: check for length correctness in iwl_mvm_create_skb() sched/cpufreq: Fix kobject memleak x86/mm/mem_encrypt: Disable all instrumentation for early SME setup ufs: fix braino in ufs_get_inode_gid() for solaris UFS flavour perf bench numa: Add define for RUSAGE_THREAD if not present Revert "Don't jump to compute_result state from check_result state" md/raid: raid5 preserve the writeback action after the parity check driver core: Postpone DMA tear-down until after devres release for probe failure bpf: add map_lookup_elem_sys_only for lookups from syscall side bpf, lru: avoid messing with eviction heuristics upon syscall lookup btrfs: Honour FITRIM range constraints during free space trim fbdev: sm712fb: fix memory frequency by avoiding a switch/case fallthrough Linux 4.14.122 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
commit
fd9e32a025
2
Makefile
2
Makefile
@ -1,7 +1,7 @@
|
|||||||
# SPDX-License-Identifier: GPL-2.0
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
VERSION = 4
|
VERSION = 4
|
||||||
PATCHLEVEL = 14
|
PATCHLEVEL = 14
|
||||||
SUBLEVEL = 121
|
SUBLEVEL = 122
|
||||||
EXTRAVERSION =
|
EXTRAVERSION =
|
||||||
NAME = Petit Gorille
|
NAME = Petit Gorille
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
__HEAD
|
__HEAD
|
||||||
|
|
||||||
ENTRY(startup)
|
ENTRY(startup)
|
||||||
.level LEVEL
|
.level PA_ASM_LEVEL
|
||||||
|
|
||||||
#define PSW_W_SM 0x200
|
#define PSW_W_SM 0x200
|
||||||
#define PSW_W_BIT 36
|
#define PSW_W_BIT 36
|
||||||
@ -63,7 +63,7 @@ $bss_loop:
|
|||||||
load32 BOOTADDR(decompress_kernel),%r3
|
load32 BOOTADDR(decompress_kernel),%r3
|
||||||
|
|
||||||
#ifdef CONFIG_64BIT
|
#ifdef CONFIG_64BIT
|
||||||
.level LEVEL
|
.level PA_ASM_LEVEL
|
||||||
ssm PSW_W_SM, %r0 /* set W-bit */
|
ssm PSW_W_SM, %r0 /* set W-bit */
|
||||||
depdi 0, 31, 32, %r3
|
depdi 0, 31, 32, %r3
|
||||||
#endif
|
#endif
|
||||||
@ -72,7 +72,7 @@ $bss_loop:
|
|||||||
|
|
||||||
startup_continue:
|
startup_continue:
|
||||||
#ifdef CONFIG_64BIT
|
#ifdef CONFIG_64BIT
|
||||||
.level LEVEL
|
.level PA_ASM_LEVEL
|
||||||
rsm PSW_W_SM, %r0 /* clear W-bit */
|
rsm PSW_W_SM, %r0 /* clear W-bit */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -59,14 +59,14 @@
|
|||||||
#define LDCW ldcw,co
|
#define LDCW ldcw,co
|
||||||
#define BL b,l
|
#define BL b,l
|
||||||
# ifdef CONFIG_64BIT
|
# ifdef CONFIG_64BIT
|
||||||
# define LEVEL 2.0w
|
# define PA_ASM_LEVEL 2.0w
|
||||||
# else
|
# else
|
||||||
# define LEVEL 2.0
|
# define PA_ASM_LEVEL 2.0
|
||||||
# endif
|
# endif
|
||||||
#else
|
#else
|
||||||
#define LDCW ldcw
|
#define LDCW ldcw
|
||||||
#define BL bl
|
#define BL bl
|
||||||
#define LEVEL 1.1
|
#define PA_ASM_LEVEL 1.1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __ASSEMBLY__
|
#ifdef __ASSEMBLY__
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
#include <linux/linkage.h>
|
#include <linux/linkage.h>
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
|
|
||||||
.level LEVEL
|
.level PA_ASM_LEVEL
|
||||||
|
|
||||||
__INITDATA
|
__INITDATA
|
||||||
ENTRY(boot_args)
|
ENTRY(boot_args)
|
||||||
@ -254,7 +254,7 @@ stext_pdc_ret:
|
|||||||
ldo R%PA(fault_vector_11)(%r10),%r10
|
ldo R%PA(fault_vector_11)(%r10),%r10
|
||||||
|
|
||||||
$is_pa20:
|
$is_pa20:
|
||||||
.level LEVEL /* restore 1.1 || 2.0w */
|
.level PA_ASM_LEVEL /* restore 1.1 || 2.0w */
|
||||||
#endif /*!CONFIG_64BIT*/
|
#endif /*!CONFIG_64BIT*/
|
||||||
load32 PA(fault_vector_20),%r10
|
load32 PA(fault_vector_20),%r10
|
||||||
|
|
||||||
|
@ -192,6 +192,7 @@ int dump_task_fpu (struct task_struct *tsk, elf_fpregset_t *r)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
int running_on_qemu __read_mostly;
|
int running_on_qemu __read_mostly;
|
||||||
|
EXPORT_SYMBOL(running_on_qemu);
|
||||||
|
|
||||||
void __cpuidle arch_cpu_idle_dead(void)
|
void __cpuidle arch_cpu_idle_dead(void)
|
||||||
{
|
{
|
||||||
|
@ -48,7 +48,7 @@ registers).
|
|||||||
*/
|
*/
|
||||||
#define KILL_INSN break 0,0
|
#define KILL_INSN break 0,0
|
||||||
|
|
||||||
.level LEVEL
|
.level PA_ASM_LEVEL
|
||||||
|
|
||||||
.text
|
.text
|
||||||
|
|
||||||
|
@ -853,7 +853,7 @@ ENTRY(switch_to_thread_stack)
|
|||||||
ret
|
ret
|
||||||
END(switch_to_thread_stack)
|
END(switch_to_thread_stack)
|
||||||
|
|
||||||
.macro idtentry sym do_sym has_error_code:req paranoid=0 shift_ist=-1
|
.macro idtentry sym do_sym has_error_code:req paranoid=0 shift_ist=-1 create_gap=0
|
||||||
ENTRY(\sym)
|
ENTRY(\sym)
|
||||||
UNWIND_HINT_IRET_REGS offset=\has_error_code*8
|
UNWIND_HINT_IRET_REGS offset=\has_error_code*8
|
||||||
|
|
||||||
@ -873,6 +873,20 @@ ENTRY(\sym)
|
|||||||
jnz .Lfrom_usermode_switch_stack_\@
|
jnz .Lfrom_usermode_switch_stack_\@
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
|
.if \create_gap == 1
|
||||||
|
/*
|
||||||
|
* If coming from kernel space, create a 6-word gap to allow the
|
||||||
|
* int3 handler to emulate a call instruction.
|
||||||
|
*/
|
||||||
|
testb $3, CS-ORIG_RAX(%rsp)
|
||||||
|
jnz .Lfrom_usermode_no_gap_\@
|
||||||
|
.rept 6
|
||||||
|
pushq 5*8(%rsp)
|
||||||
|
.endr
|
||||||
|
UNWIND_HINT_IRET_REGS offset=8
|
||||||
|
.Lfrom_usermode_no_gap_\@:
|
||||||
|
.endif
|
||||||
|
|
||||||
.if \paranoid
|
.if \paranoid
|
||||||
call paranoid_entry
|
call paranoid_entry
|
||||||
.else
|
.else
|
||||||
@ -1093,7 +1107,7 @@ apicinterrupt3 HYPERVISOR_CALLBACK_VECTOR \
|
|||||||
#endif /* CONFIG_HYPERV */
|
#endif /* CONFIG_HYPERV */
|
||||||
|
|
||||||
idtentry debug do_debug has_error_code=0 paranoid=1 shift_ist=DEBUG_STACK
|
idtentry debug do_debug has_error_code=0 paranoid=1 shift_ist=DEBUG_STACK
|
||||||
idtentry int3 do_int3 has_error_code=0
|
idtentry int3 do_int3 has_error_code=0 create_gap=1
|
||||||
idtentry stack_segment do_stack_segment has_error_code=1
|
idtentry stack_segment do_stack_segment has_error_code=1
|
||||||
|
|
||||||
#ifdef CONFIG_XEN
|
#ifdef CONFIG_XEN
|
||||||
|
@ -38,4 +38,32 @@ extern void *text_poke(void *addr, const void *opcode, size_t len);
|
|||||||
extern int poke_int3_handler(struct pt_regs *regs);
|
extern int poke_int3_handler(struct pt_regs *regs);
|
||||||
extern void *text_poke_bp(void *addr, const void *opcode, size_t len, void *handler);
|
extern void *text_poke_bp(void *addr, const void *opcode, size_t len, void *handler);
|
||||||
|
|
||||||
|
static inline void int3_emulate_jmp(struct pt_regs *regs, unsigned long ip)
|
||||||
|
{
|
||||||
|
regs->ip = ip;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define INT3_INSN_SIZE 1
|
||||||
|
#define CALL_INSN_SIZE 5
|
||||||
|
|
||||||
|
#ifdef CONFIG_X86_64
|
||||||
|
static inline void int3_emulate_push(struct pt_regs *regs, unsigned long val)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* The int3 handler in entry_64.S adds a gap between the
|
||||||
|
* stack where the break point happened, and the saving of
|
||||||
|
* pt_regs. We can extend the original stack because of
|
||||||
|
* this gap. See the idtentry macro's create_gap option.
|
||||||
|
*/
|
||||||
|
regs->sp -= sizeof(unsigned long);
|
||||||
|
*(unsigned long *)regs->sp = val;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void int3_emulate_call(struct pt_regs *regs, unsigned long func)
|
||||||
|
{
|
||||||
|
int3_emulate_push(regs, regs->ip - INT3_INSN_SIZE + CALL_INSN_SIZE);
|
||||||
|
int3_emulate_jmp(regs, func);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* _ASM_X86_TEXT_PATCHING_H */
|
#endif /* _ASM_X86_TEXT_PATCHING_H */
|
||||||
|
@ -30,6 +30,7 @@
|
|||||||
#include <asm/sections.h>
|
#include <asm/sections.h>
|
||||||
#include <asm/ftrace.h>
|
#include <asm/ftrace.h>
|
||||||
#include <asm/nops.h>
|
#include <asm/nops.h>
|
||||||
|
#include <asm/text-patching.h>
|
||||||
|
|
||||||
#ifdef CONFIG_DYNAMIC_FTRACE
|
#ifdef CONFIG_DYNAMIC_FTRACE
|
||||||
|
|
||||||
@ -229,6 +230,7 @@ int ftrace_modify_call(struct dyn_ftrace *rec, unsigned long old_addr,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static unsigned long ftrace_update_func;
|
static unsigned long ftrace_update_func;
|
||||||
|
static unsigned long ftrace_update_func_call;
|
||||||
|
|
||||||
static int update_ftrace_func(unsigned long ip, void *new)
|
static int update_ftrace_func(unsigned long ip, void *new)
|
||||||
{
|
{
|
||||||
@ -257,6 +259,8 @@ int ftrace_update_ftrace_func(ftrace_func_t func)
|
|||||||
unsigned char *new;
|
unsigned char *new;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
ftrace_update_func_call = (unsigned long)func;
|
||||||
|
|
||||||
new = ftrace_call_replace(ip, (unsigned long)func);
|
new = ftrace_call_replace(ip, (unsigned long)func);
|
||||||
ret = update_ftrace_func(ip, new);
|
ret = update_ftrace_func(ip, new);
|
||||||
|
|
||||||
@ -292,13 +296,28 @@ int ftrace_int3_handler(struct pt_regs *regs)
|
|||||||
if (WARN_ON_ONCE(!regs))
|
if (WARN_ON_ONCE(!regs))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
ip = regs->ip - 1;
|
ip = regs->ip - INT3_INSN_SIZE;
|
||||||
if (!ftrace_location(ip) && !is_ftrace_caller(ip))
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
regs->ip += MCOUNT_INSN_SIZE - 1;
|
#ifdef CONFIG_X86_64
|
||||||
|
if (ftrace_location(ip)) {
|
||||||
|
int3_emulate_call(regs, (unsigned long)ftrace_regs_caller);
|
||||||
|
return 1;
|
||||||
|
} else if (is_ftrace_caller(ip)) {
|
||||||
|
if (!ftrace_update_func_call) {
|
||||||
|
int3_emulate_jmp(regs, ip + CALL_INSN_SIZE);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
int3_emulate_call(regs, ftrace_update_func_call);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
if (ftrace_location(ip) || is_ftrace_caller(ip)) {
|
||||||
|
int3_emulate_jmp(regs, ip + CALL_INSN_SIZE);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
return 1;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int ftrace_write(unsigned long ip, const char *val, int size)
|
static int ftrace_write(unsigned long ip, const char *val, int size)
|
||||||
@ -869,6 +888,8 @@ void arch_ftrace_update_trampoline(struct ftrace_ops *ops)
|
|||||||
|
|
||||||
func = ftrace_ops_get_func(ops);
|
func = ftrace_ops_get_func(ops);
|
||||||
|
|
||||||
|
ftrace_update_func_call = (unsigned long)func;
|
||||||
|
|
||||||
/* Do a safe modify in case the trampoline is executing */
|
/* Do a safe modify in case the trampoline is executing */
|
||||||
new = ftrace_call_replace(ip, (unsigned long)func);
|
new = ftrace_call_replace(ip, (unsigned long)func);
|
||||||
ret = update_ftrace_func(ip, new);
|
ret = update_ftrace_func(ip, new);
|
||||||
@ -965,6 +986,7 @@ static int ftrace_mod_jmp(unsigned long ip, void *func)
|
|||||||
{
|
{
|
||||||
unsigned char *new;
|
unsigned char *new;
|
||||||
|
|
||||||
|
ftrace_update_func_call = 0UL;
|
||||||
new = ftrace_jmp_replace(ip, (unsigned long)func);
|
new = ftrace_jmp_replace(ip, (unsigned long)func);
|
||||||
|
|
||||||
return update_ftrace_func(ip, new);
|
return update_ftrace_func(ip, new);
|
||||||
|
@ -6,6 +6,18 @@
|
|||||||
# Produces uninteresting flaky coverage.
|
# Produces uninteresting flaky coverage.
|
||||||
KCOV_INSTRUMENT_delay.o := n
|
KCOV_INSTRUMENT_delay.o := n
|
||||||
|
|
||||||
|
# Early boot use of cmdline; don't instrument it
|
||||||
|
ifdef CONFIG_AMD_MEM_ENCRYPT
|
||||||
|
KCOV_INSTRUMENT_cmdline.o := n
|
||||||
|
KASAN_SANITIZE_cmdline.o := n
|
||||||
|
|
||||||
|
ifdef CONFIG_FUNCTION_TRACER
|
||||||
|
CFLAGS_REMOVE_cmdline.o = -pg
|
||||||
|
endif
|
||||||
|
|
||||||
|
CFLAGS_cmdline.o := $(call cc-option, -fno-stack-protector)
|
||||||
|
endif
|
||||||
|
|
||||||
inat_tables_script = $(srctree)/arch/x86/tools/gen-insn-attr-x86.awk
|
inat_tables_script = $(srctree)/arch/x86/tools/gen-insn-attr-x86.awk
|
||||||
inat_tables_maps = $(srctree)/arch/x86/lib/x86-opcode-map.txt
|
inat_tables_maps = $(srctree)/arch/x86/lib/x86-opcode-map.txt
|
||||||
quiet_cmd_inat_tables = GEN $@
|
quiet_cmd_inat_tables = GEN $@
|
||||||
|
@ -387,7 +387,7 @@ re_probe:
|
|||||||
|
|
||||||
ret = dma_configure(dev);
|
ret = dma_configure(dev);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto dma_failed;
|
goto probe_failed;
|
||||||
|
|
||||||
if (driver_sysfs_add(dev)) {
|
if (driver_sysfs_add(dev)) {
|
||||||
printk(KERN_ERR "%s: driver_sysfs_add(%s) failed\n",
|
printk(KERN_ERR "%s: driver_sysfs_add(%s) failed\n",
|
||||||
@ -442,14 +442,13 @@ re_probe:
|
|||||||
goto done;
|
goto done;
|
||||||
|
|
||||||
probe_failed:
|
probe_failed:
|
||||||
dma_deconfigure(dev);
|
|
||||||
dma_failed:
|
|
||||||
if (dev->bus)
|
if (dev->bus)
|
||||||
blocking_notifier_call_chain(&dev->bus->p->bus_notifier,
|
blocking_notifier_call_chain(&dev->bus->p->bus_notifier,
|
||||||
BUS_NOTIFY_DRIVER_NOT_BOUND, dev);
|
BUS_NOTIFY_DRIVER_NOT_BOUND, dev);
|
||||||
pinctrl_bind_failed:
|
pinctrl_bind_failed:
|
||||||
device_links_no_driver(dev);
|
device_links_no_driver(dev);
|
||||||
devres_release_all(dev);
|
devres_release_all(dev);
|
||||||
|
dma_deconfigure(dev);
|
||||||
driver_sysfs_remove(dev);
|
driver_sysfs_remove(dev);
|
||||||
dev->driver = NULL;
|
dev->driver = NULL;
|
||||||
dev_set_drvdata(dev, NULL);
|
dev_set_drvdata(dev, NULL);
|
||||||
|
@ -163,8 +163,12 @@ static const struct hisi_gate_clock hi3660_crgctrl_gate_sep_clks[] = {
|
|||||||
"clk_isp_snclk_mux", CLK_SET_RATE_PARENT, 0x50, 17, 0, },
|
"clk_isp_snclk_mux", CLK_SET_RATE_PARENT, 0x50, 17, 0, },
|
||||||
{ HI3660_CLK_GATE_ISP_SNCLK2, "clk_gate_isp_snclk2",
|
{ HI3660_CLK_GATE_ISP_SNCLK2, "clk_gate_isp_snclk2",
|
||||||
"clk_isp_snclk_mux", CLK_SET_RATE_PARENT, 0x50, 18, 0, },
|
"clk_isp_snclk_mux", CLK_SET_RATE_PARENT, 0x50, 18, 0, },
|
||||||
|
/*
|
||||||
|
* clk_gate_ufs_subsys is a system bus clock, mark it as critical
|
||||||
|
* clock and keep it on for system suspend and resume.
|
||||||
|
*/
|
||||||
{ HI3660_CLK_GATE_UFS_SUBSYS, "clk_gate_ufs_subsys", "clk_div_sysbus",
|
{ HI3660_CLK_GATE_UFS_SUBSYS, "clk_gate_ufs_subsys", "clk_div_sysbus",
|
||||||
CLK_SET_RATE_PARENT, 0x50, 21, 0, },
|
CLK_SET_RATE_PARENT | CLK_IS_CRITICAL, 0x50, 21, 0, },
|
||||||
{ HI3660_PCLK_GATE_DSI0, "pclk_gate_dsi0", "clk_div_cfgbus",
|
{ HI3660_PCLK_GATE_DSI0, "pclk_gate_dsi0", "clk_div_cfgbus",
|
||||||
CLK_SET_RATE_PARENT, 0x50, 28, 0, },
|
CLK_SET_RATE_PARENT, 0x50, 28, 0, },
|
||||||
{ HI3660_PCLK_GATE_DSI1, "pclk_gate_dsi1", "clk_div_cfgbus",
|
{ HI3660_PCLK_GATE_DSI1, "pclk_gate_dsi1", "clk_div_cfgbus",
|
||||||
|
@ -458,7 +458,7 @@ static struct rockchip_clk_branch rk3328_clk_branches[] __initdata = {
|
|||||||
RK3328_CLKSEL_CON(35), 15, 1, MFLAGS, 8, 7, DFLAGS,
|
RK3328_CLKSEL_CON(35), 15, 1, MFLAGS, 8, 7, DFLAGS,
|
||||||
RK3328_CLKGATE_CON(2), 12, GFLAGS),
|
RK3328_CLKGATE_CON(2), 12, GFLAGS),
|
||||||
COMPOSITE(SCLK_CRYPTO, "clk_crypto", mux_2plls_p, 0,
|
COMPOSITE(SCLK_CRYPTO, "clk_crypto", mux_2plls_p, 0,
|
||||||
RK3328_CLKSEL_CON(20), 7, 1, MFLAGS, 0, 7, DFLAGS,
|
RK3328_CLKSEL_CON(20), 7, 1, MFLAGS, 0, 5, DFLAGS,
|
||||||
RK3328_CLKGATE_CON(2), 4, GFLAGS),
|
RK3328_CLKGATE_CON(2), 4, GFLAGS),
|
||||||
COMPOSITE_NOMUX(SCLK_TSADC, "clk_tsadc", "clk_24m", 0,
|
COMPOSITE_NOMUX(SCLK_TSADC, "clk_tsadc", "clk_24m", 0,
|
||||||
RK3328_CLKSEL_CON(22), 0, 10, DFLAGS,
|
RK3328_CLKSEL_CON(22), 0, 10, DFLAGS,
|
||||||
@ -550,15 +550,15 @@ static struct rockchip_clk_branch rk3328_clk_branches[] __initdata = {
|
|||||||
GATE(0, "hclk_rkvenc_niu", "hclk_rkvenc", CLK_IGNORE_UNUSED,
|
GATE(0, "hclk_rkvenc_niu", "hclk_rkvenc", CLK_IGNORE_UNUSED,
|
||||||
RK3328_CLKGATE_CON(25), 1, GFLAGS),
|
RK3328_CLKGATE_CON(25), 1, GFLAGS),
|
||||||
GATE(ACLK_H265, "aclk_h265", "aclk_rkvenc", 0,
|
GATE(ACLK_H265, "aclk_h265", "aclk_rkvenc", 0,
|
||||||
RK3328_CLKGATE_CON(25), 0, GFLAGS),
|
RK3328_CLKGATE_CON(25), 2, GFLAGS),
|
||||||
GATE(PCLK_H265, "pclk_h265", "hclk_rkvenc", 0,
|
GATE(PCLK_H265, "pclk_h265", "hclk_rkvenc", 0,
|
||||||
RK3328_CLKGATE_CON(25), 1, GFLAGS),
|
RK3328_CLKGATE_CON(25), 3, GFLAGS),
|
||||||
GATE(ACLK_H264, "aclk_h264", "aclk_rkvenc", 0,
|
GATE(ACLK_H264, "aclk_h264", "aclk_rkvenc", 0,
|
||||||
RK3328_CLKGATE_CON(25), 0, GFLAGS),
|
RK3328_CLKGATE_CON(25), 4, GFLAGS),
|
||||||
GATE(HCLK_H264, "hclk_h264", "hclk_rkvenc", 0,
|
GATE(HCLK_H264, "hclk_h264", "hclk_rkvenc", 0,
|
||||||
RK3328_CLKGATE_CON(25), 1, GFLAGS),
|
RK3328_CLKGATE_CON(25), 5, GFLAGS),
|
||||||
GATE(ACLK_AXISRAM, "aclk_axisram", "aclk_rkvenc", CLK_IGNORE_UNUSED,
|
GATE(ACLK_AXISRAM, "aclk_axisram", "aclk_rkvenc", CLK_IGNORE_UNUSED,
|
||||||
RK3328_CLKGATE_CON(25), 0, GFLAGS),
|
RK3328_CLKGATE_CON(25), 6, GFLAGS),
|
||||||
|
|
||||||
COMPOSITE(SCLK_VENC_CORE, "sclk_venc_core", mux_4plls_p, 0,
|
COMPOSITE(SCLK_VENC_CORE, "sclk_venc_core", mux_4plls_p, 0,
|
||||||
RK3328_CLKSEL_CON(51), 14, 2, MFLAGS, 8, 5, DFLAGS,
|
RK3328_CLKSEL_CON(51), 14, 2, MFLAGS, 8, 5, DFLAGS,
|
||||||
@ -663,7 +663,7 @@ static struct rockchip_clk_branch rk3328_clk_branches[] __initdata = {
|
|||||||
|
|
||||||
/* PD_GMAC */
|
/* PD_GMAC */
|
||||||
COMPOSITE(ACLK_GMAC, "aclk_gmac", mux_2plls_hdmiphy_p, 0,
|
COMPOSITE(ACLK_GMAC, "aclk_gmac", mux_2plls_hdmiphy_p, 0,
|
||||||
RK3328_CLKSEL_CON(35), 6, 2, MFLAGS, 0, 5, DFLAGS,
|
RK3328_CLKSEL_CON(25), 6, 2, MFLAGS, 0, 5, DFLAGS,
|
||||||
RK3328_CLKGATE_CON(3), 2, GFLAGS),
|
RK3328_CLKGATE_CON(3), 2, GFLAGS),
|
||||||
COMPOSITE_NOMUX(PCLK_GMAC, "pclk_gmac", "aclk_gmac", 0,
|
COMPOSITE_NOMUX(PCLK_GMAC, "pclk_gmac", "aclk_gmac", 0,
|
||||||
RK3328_CLKSEL_CON(25), 8, 3, DFLAGS,
|
RK3328_CLKSEL_CON(25), 8, 3, DFLAGS,
|
||||||
@ -733,7 +733,7 @@ static struct rockchip_clk_branch rk3328_clk_branches[] __initdata = {
|
|||||||
|
|
||||||
/* PD_PERI */
|
/* PD_PERI */
|
||||||
GATE(0, "aclk_peri_noc", "aclk_peri", CLK_IGNORE_UNUSED, RK3328_CLKGATE_CON(19), 11, GFLAGS),
|
GATE(0, "aclk_peri_noc", "aclk_peri", CLK_IGNORE_UNUSED, RK3328_CLKGATE_CON(19), 11, GFLAGS),
|
||||||
GATE(ACLK_USB3OTG, "aclk_usb3otg", "aclk_peri", 0, RK3328_CLKGATE_CON(19), 4, GFLAGS),
|
GATE(ACLK_USB3OTG, "aclk_usb3otg", "aclk_peri", 0, RK3328_CLKGATE_CON(19), 14, GFLAGS),
|
||||||
|
|
||||||
GATE(HCLK_SDMMC, "hclk_sdmmc", "hclk_peri", 0, RK3328_CLKGATE_CON(19), 0, GFLAGS),
|
GATE(HCLK_SDMMC, "hclk_sdmmc", "hclk_peri", 0, RK3328_CLKGATE_CON(19), 0, GFLAGS),
|
||||||
GATE(HCLK_SDIO, "hclk_sdio", "hclk_peri", 0, RK3328_CLKGATE_CON(19), 1, GFLAGS),
|
GATE(HCLK_SDIO, "hclk_sdio", "hclk_peri", 0, RK3328_CLKGATE_CON(19), 1, GFLAGS),
|
||||||
@ -894,7 +894,7 @@ static void __init rk3328_clk_init(struct device_node *np)
|
|||||||
&rk3328_cpuclk_data, rk3328_cpuclk_rates,
|
&rk3328_cpuclk_data, rk3328_cpuclk_rates,
|
||||||
ARRAY_SIZE(rk3328_cpuclk_rates));
|
ARRAY_SIZE(rk3328_cpuclk_rates));
|
||||||
|
|
||||||
rockchip_register_softrst(np, 11, reg_base + RK3328_SOFTRST_CON(0),
|
rockchip_register_softrst(np, 12, reg_base + RK3328_SOFTRST_CON(0),
|
||||||
ROCKCHIP_SOFTRST_HIWORD_MASK);
|
ROCKCHIP_SOFTRST_HIWORD_MASK);
|
||||||
|
|
||||||
rockchip_register_restart_notifier(ctx, RK3328_GLB_SRST_FST, NULL);
|
rockchip_register_restart_notifier(ctx, RK3328_GLB_SRST_FST, NULL);
|
||||||
|
@ -662,8 +662,8 @@ static void _update_pll_mnp(struct tegra_clk_pll *pll,
|
|||||||
pll_override_writel(val, params->pmc_divp_reg, pll);
|
pll_override_writel(val, params->pmc_divp_reg, pll);
|
||||||
|
|
||||||
val = pll_override_readl(params->pmc_divnm_reg, pll);
|
val = pll_override_readl(params->pmc_divnm_reg, pll);
|
||||||
val &= ~(divm_mask(pll) << div_nmp->override_divm_shift) |
|
val &= ~((divm_mask(pll) << div_nmp->override_divm_shift) |
|
||||||
~(divn_mask(pll) << div_nmp->override_divn_shift);
|
(divn_mask(pll) << div_nmp->override_divn_shift));
|
||||||
val |= (cfg->m << div_nmp->override_divm_shift) |
|
val |= (cfg->m << div_nmp->override_divm_shift) |
|
||||||
(cfg->n << div_nmp->override_divn_shift);
|
(cfg->n << div_nmp->override_divn_shift);
|
||||||
pll_override_writel(val, params->pmc_divnm_reg, pll);
|
pll_override_writel(val, params->pmc_divnm_reg, pll);
|
||||||
|
@ -92,6 +92,7 @@ struct msc_iter {
|
|||||||
* @reg_base: register window base address
|
* @reg_base: register window base address
|
||||||
* @thdev: intel_th_device pointer
|
* @thdev: intel_th_device pointer
|
||||||
* @win_list: list of windows in multiblock mode
|
* @win_list: list of windows in multiblock mode
|
||||||
|
* @single_sgt: single mode buffer
|
||||||
* @nr_pages: total number of pages allocated for this buffer
|
* @nr_pages: total number of pages allocated for this buffer
|
||||||
* @single_sz: amount of data in single mode
|
* @single_sz: amount of data in single mode
|
||||||
* @single_wrap: single mode wrap occurred
|
* @single_wrap: single mode wrap occurred
|
||||||
@ -112,6 +113,7 @@ struct msc {
|
|||||||
struct intel_th_device *thdev;
|
struct intel_th_device *thdev;
|
||||||
|
|
||||||
struct list_head win_list;
|
struct list_head win_list;
|
||||||
|
struct sg_table single_sgt;
|
||||||
unsigned long nr_pages;
|
unsigned long nr_pages;
|
||||||
unsigned long single_sz;
|
unsigned long single_sz;
|
||||||
unsigned int single_wrap : 1;
|
unsigned int single_wrap : 1;
|
||||||
@ -625,22 +627,45 @@ static void intel_th_msc_deactivate(struct intel_th_device *thdev)
|
|||||||
*/
|
*/
|
||||||
static int msc_buffer_contig_alloc(struct msc *msc, unsigned long size)
|
static int msc_buffer_contig_alloc(struct msc *msc, unsigned long size)
|
||||||
{
|
{
|
||||||
|
unsigned long nr_pages = size >> PAGE_SHIFT;
|
||||||
unsigned int order = get_order(size);
|
unsigned int order = get_order(size);
|
||||||
struct page *page;
|
struct page *page;
|
||||||
|
int ret;
|
||||||
|
|
||||||
if (!size)
|
if (!size)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
ret = sg_alloc_table(&msc->single_sgt, 1, GFP_KERNEL);
|
||||||
|
if (ret)
|
||||||
|
goto err_out;
|
||||||
|
|
||||||
|
ret = -ENOMEM;
|
||||||
page = alloc_pages(GFP_KERNEL | __GFP_ZERO, order);
|
page = alloc_pages(GFP_KERNEL | __GFP_ZERO, order);
|
||||||
if (!page)
|
if (!page)
|
||||||
return -ENOMEM;
|
goto err_free_sgt;
|
||||||
|
|
||||||
split_page(page, order);
|
split_page(page, order);
|
||||||
msc->nr_pages = size >> PAGE_SHIFT;
|
sg_set_buf(msc->single_sgt.sgl, page_address(page), size);
|
||||||
|
|
||||||
|
ret = dma_map_sg(msc_dev(msc)->parent->parent, msc->single_sgt.sgl, 1,
|
||||||
|
DMA_FROM_DEVICE);
|
||||||
|
if (ret < 0)
|
||||||
|
goto err_free_pages;
|
||||||
|
|
||||||
|
msc->nr_pages = nr_pages;
|
||||||
msc->base = page_address(page);
|
msc->base = page_address(page);
|
||||||
msc->base_addr = page_to_phys(page);
|
msc->base_addr = sg_dma_address(msc->single_sgt.sgl);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
err_free_pages:
|
||||||
|
__free_pages(page, order);
|
||||||
|
|
||||||
|
err_free_sgt:
|
||||||
|
sg_free_table(&msc->single_sgt);
|
||||||
|
|
||||||
|
err_out:
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -651,6 +676,10 @@ static void msc_buffer_contig_free(struct msc *msc)
|
|||||||
{
|
{
|
||||||
unsigned long off;
|
unsigned long off;
|
||||||
|
|
||||||
|
dma_unmap_sg(msc_dev(msc)->parent->parent, msc->single_sgt.sgl,
|
||||||
|
1, DMA_FROM_DEVICE);
|
||||||
|
sg_free_table(&msc->single_sgt);
|
||||||
|
|
||||||
for (off = 0; off < msc->nr_pages << PAGE_SHIFT; off += PAGE_SIZE) {
|
for (off = 0; off < msc->nr_pages << PAGE_SHIFT; off += PAGE_SIZE) {
|
||||||
struct page *page = virt_to_page(msc->base + off);
|
struct page *page = virt_to_page(msc->base + off);
|
||||||
|
|
||||||
|
@ -226,8 +226,8 @@ stm_output_disclaim(struct stm_device *stm, struct stm_output *output)
|
|||||||
bitmap_release_region(&master->chan_map[0], output->channel,
|
bitmap_release_region(&master->chan_map[0], output->channel,
|
||||||
ilog2(output->nr_chans));
|
ilog2(output->nr_chans));
|
||||||
|
|
||||||
output->nr_chans = 0;
|
|
||||||
master->nr_free += output->nr_chans;
|
master->nr_free += output->nr_chans;
|
||||||
|
output->nr_chans = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -94,7 +94,6 @@ static inline u32 smmu_readl(struct tegra_smmu *smmu, unsigned long offset)
|
|||||||
#define SMMU_TLB_FLUSH_VA_MATCH_ALL (0 << 0)
|
#define SMMU_TLB_FLUSH_VA_MATCH_ALL (0 << 0)
|
||||||
#define SMMU_TLB_FLUSH_VA_MATCH_SECTION (2 << 0)
|
#define SMMU_TLB_FLUSH_VA_MATCH_SECTION (2 << 0)
|
||||||
#define SMMU_TLB_FLUSH_VA_MATCH_GROUP (3 << 0)
|
#define SMMU_TLB_FLUSH_VA_MATCH_GROUP (3 << 0)
|
||||||
#define SMMU_TLB_FLUSH_ASID(x) (((x) & 0x7f) << 24)
|
|
||||||
#define SMMU_TLB_FLUSH_VA_SECTION(addr) ((((addr) & 0xffc00000) >> 12) | \
|
#define SMMU_TLB_FLUSH_VA_SECTION(addr) ((((addr) & 0xffc00000) >> 12) | \
|
||||||
SMMU_TLB_FLUSH_VA_MATCH_SECTION)
|
SMMU_TLB_FLUSH_VA_MATCH_SECTION)
|
||||||
#define SMMU_TLB_FLUSH_VA_GROUP(addr) ((((addr) & 0xffffc000) >> 12) | \
|
#define SMMU_TLB_FLUSH_VA_GROUP(addr) ((((addr) & 0xffffc000) >> 12) | \
|
||||||
@ -197,8 +196,12 @@ static inline void smmu_flush_tlb_asid(struct tegra_smmu *smmu,
|
|||||||
{
|
{
|
||||||
u32 value;
|
u32 value;
|
||||||
|
|
||||||
value = SMMU_TLB_FLUSH_ASID_MATCH | SMMU_TLB_FLUSH_ASID(asid) |
|
if (smmu->soc->num_asids == 4)
|
||||||
SMMU_TLB_FLUSH_VA_MATCH_ALL;
|
value = (asid & 0x3) << 29;
|
||||||
|
else
|
||||||
|
value = (asid & 0x7f) << 24;
|
||||||
|
|
||||||
|
value |= SMMU_TLB_FLUSH_ASID_MATCH | SMMU_TLB_FLUSH_VA_MATCH_ALL;
|
||||||
smmu_writel(smmu, value, SMMU_TLB_FLUSH);
|
smmu_writel(smmu, value, SMMU_TLB_FLUSH);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -208,8 +211,12 @@ static inline void smmu_flush_tlb_section(struct tegra_smmu *smmu,
|
|||||||
{
|
{
|
||||||
u32 value;
|
u32 value;
|
||||||
|
|
||||||
value = SMMU_TLB_FLUSH_ASID_MATCH | SMMU_TLB_FLUSH_ASID(asid) |
|
if (smmu->soc->num_asids == 4)
|
||||||
SMMU_TLB_FLUSH_VA_SECTION(iova);
|
value = (asid & 0x3) << 29;
|
||||||
|
else
|
||||||
|
value = (asid & 0x7f) << 24;
|
||||||
|
|
||||||
|
value |= SMMU_TLB_FLUSH_ASID_MATCH | SMMU_TLB_FLUSH_VA_SECTION(iova);
|
||||||
smmu_writel(smmu, value, SMMU_TLB_FLUSH);
|
smmu_writel(smmu, value, SMMU_TLB_FLUSH);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -219,8 +226,12 @@ static inline void smmu_flush_tlb_group(struct tegra_smmu *smmu,
|
|||||||
{
|
{
|
||||||
u32 value;
|
u32 value;
|
||||||
|
|
||||||
value = SMMU_TLB_FLUSH_ASID_MATCH | SMMU_TLB_FLUSH_ASID(asid) |
|
if (smmu->soc->num_asids == 4)
|
||||||
SMMU_TLB_FLUSH_VA_GROUP(iova);
|
value = (asid & 0x3) << 29;
|
||||||
|
else
|
||||||
|
value = (asid & 0x7f) << 24;
|
||||||
|
|
||||||
|
value |= SMMU_TLB_FLUSH_ASID_MATCH | SMMU_TLB_FLUSH_VA_GROUP(iova);
|
||||||
smmu_writel(smmu, value, SMMU_TLB_FLUSH);
|
smmu_writel(smmu, value, SMMU_TLB_FLUSH);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1166,11 +1166,18 @@ static int __load_discards(struct dm_cache_metadata *cmd,
|
|||||||
if (r)
|
if (r)
|
||||||
return r;
|
return r;
|
||||||
|
|
||||||
for (b = 0; b < from_dblock(cmd->discard_nr_blocks); b++) {
|
for (b = 0; ; b++) {
|
||||||
r = fn(context, cmd->discard_block_size, to_dblock(b),
|
r = fn(context, cmd->discard_block_size, to_dblock(b),
|
||||||
dm_bitset_cursor_get_value(&c));
|
dm_bitset_cursor_get_value(&c));
|
||||||
if (r)
|
if (r)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
if (b >= (from_dblock(cmd->discard_nr_blocks) - 1))
|
||||||
|
break;
|
||||||
|
|
||||||
|
r = dm_bitset_cursor_next(&c);
|
||||||
|
if (r)
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
dm_bitset_cursor_end(&c);
|
dm_bitset_cursor_end(&c);
|
||||||
|
@ -222,7 +222,8 @@ static void delay_dtr(struct dm_target *ti)
|
|||||||
{
|
{
|
||||||
struct delay_c *dc = ti->private;
|
struct delay_c *dc = ti->private;
|
||||||
|
|
||||||
destroy_workqueue(dc->kdelayd_wq);
|
if (dc->kdelayd_wq)
|
||||||
|
destroy_workqueue(dc->kdelayd_wq);
|
||||||
|
|
||||||
dm_put_device(ti, dc->dev_read);
|
dm_put_device(ti, dc->dev_read);
|
||||||
|
|
||||||
|
@ -1169,6 +1169,9 @@ static int dmz_init_zones(struct dmz_metadata *zmd)
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!nr_blkz)
|
||||||
|
break;
|
||||||
|
|
||||||
/* Process report */
|
/* Process report */
|
||||||
for (i = 0; i < nr_blkz; i++) {
|
for (i = 0; i < nr_blkz; i++) {
|
||||||
ret = dmz_init_zone(zmd, zone, &blkz[i]);
|
ret = dmz_init_zone(zmd, zone, &blkz[i]);
|
||||||
@ -1204,6 +1207,8 @@ static int dmz_update_zone(struct dmz_metadata *zmd, struct dm_zone *zone)
|
|||||||
/* Get zone information from disk */
|
/* Get zone information from disk */
|
||||||
ret = blkdev_report_zones(zmd->dev->bdev, dmz_start_sect(zmd, zone),
|
ret = blkdev_report_zones(zmd->dev->bdev, dmz_start_sect(zmd, zone),
|
||||||
&blkz, &nr_blkz, GFP_NOIO);
|
&blkz, &nr_blkz, GFP_NOIO);
|
||||||
|
if (!nr_blkz)
|
||||||
|
ret = -EIO;
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dmz_dev_err(zmd->dev, "Get zone %u report failed",
|
dmz_dev_err(zmd->dev, "Get zone %u report failed",
|
||||||
dmz_id(zmd, zone));
|
dmz_id(zmd, zone));
|
||||||
|
@ -2845,8 +2845,10 @@ state_store(struct md_rdev *rdev, const char *buf, size_t len)
|
|||||||
err = 0;
|
err = 0;
|
||||||
}
|
}
|
||||||
} else if (cmd_match(buf, "re-add")) {
|
} else if (cmd_match(buf, "re-add")) {
|
||||||
if (test_bit(Faulty, &rdev->flags) && (rdev->raid_disk == -1) &&
|
if (!rdev->mddev->pers)
|
||||||
rdev->saved_raid_disk >= 0) {
|
err = -EINVAL;
|
||||||
|
else if (test_bit(Faulty, &rdev->flags) && (rdev->raid_disk == -1) &&
|
||||||
|
rdev->saved_raid_disk >= 0) {
|
||||||
/* clear_bit is performed _after_ all the devices
|
/* clear_bit is performed _after_ all the devices
|
||||||
* have their local Faulty bit cleared. If any writes
|
* have their local Faulty bit cleared. If any writes
|
||||||
* happen in the meantime in the local node, they
|
* happen in the meantime in the local node, they
|
||||||
|
@ -4182,7 +4182,7 @@ static void handle_parity_checks6(struct r5conf *conf, struct stripe_head *sh,
|
|||||||
/* now write out any block on a failed drive,
|
/* now write out any block on a failed drive,
|
||||||
* or P or Q if they were recomputed
|
* or P or Q if they were recomputed
|
||||||
*/
|
*/
|
||||||
BUG_ON(s->uptodate < disks - 1); /* We don't need Q to recover */
|
dev = NULL;
|
||||||
if (s->failed == 2) {
|
if (s->failed == 2) {
|
||||||
dev = &sh->dev[s->failed_num[1]];
|
dev = &sh->dev[s->failed_num[1]];
|
||||||
s->locked++;
|
s->locked++;
|
||||||
@ -4207,6 +4207,14 @@ static void handle_parity_checks6(struct r5conf *conf, struct stripe_head *sh,
|
|||||||
set_bit(R5_LOCKED, &dev->flags);
|
set_bit(R5_LOCKED, &dev->flags);
|
||||||
set_bit(R5_Wantwrite, &dev->flags);
|
set_bit(R5_Wantwrite, &dev->flags);
|
||||||
}
|
}
|
||||||
|
if (WARN_ONCE(dev && !test_bit(R5_UPTODATE, &dev->flags),
|
||||||
|
"%s: disk%td not up to date\n",
|
||||||
|
mdname(conf->mddev),
|
||||||
|
dev - (struct r5dev *) &sh->dev)) {
|
||||||
|
clear_bit(R5_LOCKED, &dev->flags);
|
||||||
|
clear_bit(R5_Wantwrite, &dev->flags);
|
||||||
|
s->locked--;
|
||||||
|
}
|
||||||
clear_bit(STRIPE_DEGRADED, &sh->state);
|
clear_bit(STRIPE_DEGRADED, &sh->state);
|
||||||
|
|
||||||
set_bit(STRIPE_INSYNC, &sh->state);
|
set_bit(STRIPE_INSYNC, &sh->state);
|
||||||
@ -4218,15 +4226,26 @@ static void handle_parity_checks6(struct r5conf *conf, struct stripe_head *sh,
|
|||||||
case check_state_check_result:
|
case check_state_check_result:
|
||||||
sh->check_state = check_state_idle;
|
sh->check_state = check_state_idle;
|
||||||
|
|
||||||
if (s->failed > 1)
|
|
||||||
break;
|
|
||||||
/* handle a successful check operation, if parity is correct
|
/* handle a successful check operation, if parity is correct
|
||||||
* we are done. Otherwise update the mismatch count and repair
|
* we are done. Otherwise update the mismatch count and repair
|
||||||
* parity if !MD_RECOVERY_CHECK
|
* parity if !MD_RECOVERY_CHECK
|
||||||
*/
|
*/
|
||||||
if (sh->ops.zero_sum_result == 0) {
|
if (sh->ops.zero_sum_result == 0) {
|
||||||
/* Any parity checked was correct */
|
/* both parities are correct */
|
||||||
set_bit(STRIPE_INSYNC, &sh->state);
|
if (!s->failed)
|
||||||
|
set_bit(STRIPE_INSYNC, &sh->state);
|
||||||
|
else {
|
||||||
|
/* in contrast to the raid5 case we can validate
|
||||||
|
* parity, but still have a failure to write
|
||||||
|
* back
|
||||||
|
*/
|
||||||
|
sh->check_state = check_state_compute_result;
|
||||||
|
/* Returning at this point means that we may go
|
||||||
|
* off and bring p and/or q uptodate again so
|
||||||
|
* we make sure to check zero_sum_result again
|
||||||
|
* to verify if p or q need writeback
|
||||||
|
*/
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
atomic64_add(STRIPE_SECTORS, &conf->mddev->resync_mismatches);
|
atomic64_add(STRIPE_SECTORS, &conf->mddev->resync_mismatches);
|
||||||
if (test_bit(MD_RECOVERY_CHECK, &conf->mddev->recovery)) {
|
if (test_bit(MD_RECOVERY_CHECK, &conf->mddev->recovery)) {
|
||||||
|
@ -826,6 +826,8 @@ static int ov6650_video_probe(struct i2c_client *client)
|
|||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
msleep(20);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* check and show product ID and manufacturer ID
|
* check and show product ID and manufacturer ID
|
||||||
*/
|
*/
|
||||||
|
@ -72,7 +72,7 @@ static int tegra_mc_setup_latency_allowance(struct tegra_mc *mc)
|
|||||||
u32 value;
|
u32 value;
|
||||||
|
|
||||||
/* compute the number of MC clock cycles per tick */
|
/* compute the number of MC clock cycles per tick */
|
||||||
tick = mc->tick * clk_get_rate(mc->clk);
|
tick = (unsigned long long)mc->tick * clk_get_rate(mc->clk);
|
||||||
do_div(tick, NSEC_PER_SEC);
|
do_div(tick, NSEC_PER_SEC);
|
||||||
|
|
||||||
value = readl(mc->regs + MC_EMEM_ARB_CFG);
|
value = readl(mc->regs + MC_EMEM_ARB_CFG);
|
||||||
|
@ -41,7 +41,7 @@ obj-$(CONFIG_DEV_APPLETALK) += appletalk/
|
|||||||
obj-$(CONFIG_CAIF) += caif/
|
obj-$(CONFIG_CAIF) += caif/
|
||||||
obj-$(CONFIG_CAN) += can/
|
obj-$(CONFIG_CAN) += can/
|
||||||
obj-$(CONFIG_ETRAX_ETHERNET) += cris/
|
obj-$(CONFIG_ETRAX_ETHERNET) += cris/
|
||||||
obj-$(CONFIG_NET_DSA) += dsa/
|
obj-y += dsa/
|
||||||
obj-$(CONFIG_ETHERNET) += ethernet/
|
obj-$(CONFIG_ETHERNET) += ethernet/
|
||||||
obj-$(CONFIG_FDDI) += fddi/
|
obj-$(CONFIG_FDDI) += fddi/
|
||||||
obj-$(CONFIG_HIPPI) += hippi/
|
obj-$(CONFIG_HIPPI) += hippi/
|
||||||
|
@ -1490,7 +1490,7 @@ int mlx4_flow_steer_promisc_add(struct mlx4_dev *dev, u8 port,
|
|||||||
rule.port = port;
|
rule.port = port;
|
||||||
rule.qpn = qpn;
|
rule.qpn = qpn;
|
||||||
INIT_LIST_HEAD(&rule.list);
|
INIT_LIST_HEAD(&rule.list);
|
||||||
mlx4_err(dev, "going promisc on %x\n", port);
|
mlx4_info(dev, "going promisc on %x\n", port);
|
||||||
|
|
||||||
return mlx4_flow_attach(dev, &rule, regid_p);
|
return mlx4_flow_attach(dev, &rule, regid_p);
|
||||||
}
|
}
|
||||||
|
@ -610,12 +610,20 @@ static struct compressor ppp_deflate_draft = {
|
|||||||
|
|
||||||
static int __init deflate_init(void)
|
static int __init deflate_init(void)
|
||||||
{
|
{
|
||||||
int answer = ppp_register_compressor(&ppp_deflate);
|
int rc;
|
||||||
if (answer == 0)
|
|
||||||
printk(KERN_INFO
|
rc = ppp_register_compressor(&ppp_deflate);
|
||||||
"PPP Deflate Compression module registered\n");
|
if (rc)
|
||||||
ppp_register_compressor(&ppp_deflate_draft);
|
return rc;
|
||||||
return answer;
|
|
||||||
|
rc = ppp_register_compressor(&ppp_deflate_draft);
|
||||||
|
if (rc) {
|
||||||
|
ppp_unregister_compressor(&ppp_deflate);
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
|
pr_info("PPP Deflate Compression module registered\n");
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void __exit deflate_cleanup(void)
|
static void __exit deflate_cleanup(void)
|
||||||
|
@ -1225,6 +1225,8 @@ static const struct usb_device_id products[] = {
|
|||||||
{QMI_FIXED_INTF(0x1bc7, 0x1101, 3)}, /* Telit ME910 dual modem */
|
{QMI_FIXED_INTF(0x1bc7, 0x1101, 3)}, /* Telit ME910 dual modem */
|
||||||
{QMI_FIXED_INTF(0x1bc7, 0x1200, 5)}, /* Telit LE920 */
|
{QMI_FIXED_INTF(0x1bc7, 0x1200, 5)}, /* Telit LE920 */
|
||||||
{QMI_QUIRK_SET_DTR(0x1bc7, 0x1201, 2)}, /* Telit LE920, LE920A4 */
|
{QMI_QUIRK_SET_DTR(0x1bc7, 0x1201, 2)}, /* Telit LE920, LE920A4 */
|
||||||
|
{QMI_QUIRK_SET_DTR(0x1bc7, 0x1260, 2)}, /* Telit LE910Cx */
|
||||||
|
{QMI_QUIRK_SET_DTR(0x1bc7, 0x1261, 2)}, /* Telit LE910Cx */
|
||||||
{QMI_QUIRK_SET_DTR(0x1bc7, 0x1900, 1)}, /* Telit LN940 series */
|
{QMI_QUIRK_SET_DTR(0x1bc7, 0x1900, 1)}, /* Telit LN940 series */
|
||||||
{QMI_FIXED_INTF(0x1c9e, 0x9801, 3)}, /* Telewell TW-3G HSPA+ */
|
{QMI_FIXED_INTF(0x1c9e, 0x9801, 3)}, /* Telewell TW-3G HSPA+ */
|
||||||
{QMI_FIXED_INTF(0x1c9e, 0x9803, 4)}, /* Telewell TW-3G HSPA+ */
|
{QMI_FIXED_INTF(0x1c9e, 0x9803, 4)}, /* Telewell TW-3G HSPA+ */
|
||||||
|
@ -141,9 +141,9 @@ static inline int iwl_mvm_check_pn(struct iwl_mvm *mvm, struct sk_buff *skb,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* iwl_mvm_create_skb Adds the rxb to a new skb */
|
/* iwl_mvm_create_skb Adds the rxb to a new skb */
|
||||||
static void iwl_mvm_create_skb(struct sk_buff *skb, struct ieee80211_hdr *hdr,
|
static int iwl_mvm_create_skb(struct iwl_mvm *mvm, struct sk_buff *skb,
|
||||||
u16 len, u8 crypt_len,
|
struct ieee80211_hdr *hdr, u16 len, u8 crypt_len,
|
||||||
struct iwl_rx_cmd_buffer *rxb)
|
struct iwl_rx_cmd_buffer *rxb)
|
||||||
{
|
{
|
||||||
struct iwl_rx_packet *pkt = rxb_addr(rxb);
|
struct iwl_rx_packet *pkt = rxb_addr(rxb);
|
||||||
struct iwl_rx_mpdu_desc *desc = (void *)pkt->data;
|
struct iwl_rx_mpdu_desc *desc = (void *)pkt->data;
|
||||||
@ -184,6 +184,20 @@ static void iwl_mvm_create_skb(struct sk_buff *skb, struct ieee80211_hdr *hdr,
|
|||||||
* present before copying packet data.
|
* present before copying packet data.
|
||||||
*/
|
*/
|
||||||
hdrlen += crypt_len;
|
hdrlen += crypt_len;
|
||||||
|
|
||||||
|
if (WARN_ONCE(headlen < hdrlen,
|
||||||
|
"invalid packet lengths (hdrlen=%d, len=%d, crypt_len=%d)\n",
|
||||||
|
hdrlen, len, crypt_len)) {
|
||||||
|
/*
|
||||||
|
* We warn and trace because we want to be able to see
|
||||||
|
* it in trace-cmd as well.
|
||||||
|
*/
|
||||||
|
IWL_DEBUG_RX(mvm,
|
||||||
|
"invalid packet lengths (hdrlen=%d, len=%d, crypt_len=%d)\n",
|
||||||
|
hdrlen, len, crypt_len);
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
skb_put_data(skb, hdr, hdrlen);
|
skb_put_data(skb, hdr, hdrlen);
|
||||||
skb_put_data(skb, (u8 *)hdr + hdrlen + pad_len, headlen - hdrlen);
|
skb_put_data(skb, (u8 *)hdr + hdrlen + pad_len, headlen - hdrlen);
|
||||||
|
|
||||||
@ -196,6 +210,8 @@ static void iwl_mvm_create_skb(struct sk_buff *skb, struct ieee80211_hdr *hdr,
|
|||||||
skb_add_rx_frag(skb, 0, rxb_steal_page(rxb), offset,
|
skb_add_rx_frag(skb, 0, rxb_steal_page(rxb), offset,
|
||||||
fraglen, rxb->truesize);
|
fraglen, rxb->truesize);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* iwl_mvm_pass_packet_to_mac80211 - passes the packet for mac80211 */
|
/* iwl_mvm_pass_packet_to_mac80211 - passes the packet for mac80211 */
|
||||||
@ -1033,7 +1049,11 @@ void iwl_mvm_rx_mpdu_mq(struct iwl_mvm *mvm, struct napi_struct *napi,
|
|||||||
rx_status->boottime_ns = ktime_get_boot_ns();
|
rx_status->boottime_ns = ktime_get_boot_ns();
|
||||||
}
|
}
|
||||||
|
|
||||||
iwl_mvm_create_skb(skb, hdr, len, crypt_len, rxb);
|
if (iwl_mvm_create_skb(mvm, skb, hdr, len, crypt_len, rxb)) {
|
||||||
|
kfree_skb(skb);
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
if (!iwl_mvm_reorder(mvm, napi, queue, sta, skb, desc))
|
if (!iwl_mvm_reorder(mvm, napi, queue, sta, skb, desc))
|
||||||
iwl_mvm_pass_packet_to_mac80211(mvm, napi, skb, queue, sta);
|
iwl_mvm_pass_packet_to_mac80211(mvm, napi, skb, queue, sta);
|
||||||
out:
|
out:
|
||||||
|
@ -554,7 +554,7 @@ static int p54p_probe(struct pci_dev *pdev,
|
|||||||
err = pci_enable_device(pdev);
|
err = pci_enable_device(pdev);
|
||||||
if (err) {
|
if (err) {
|
||||||
dev_err(&pdev->dev, "Cannot enable new PCI device\n");
|
dev_err(&pdev->dev, "Cannot enable new PCI device\n");
|
||||||
return err;
|
goto err_put;
|
||||||
}
|
}
|
||||||
|
|
||||||
mem_addr = pci_resource_start(pdev, 0);
|
mem_addr = pci_resource_start(pdev, 0);
|
||||||
@ -639,6 +639,7 @@ static int p54p_probe(struct pci_dev *pdev,
|
|||||||
pci_release_regions(pdev);
|
pci_release_regions(pdev);
|
||||||
err_disable_dev:
|
err_disable_dev:
|
||||||
pci_disable_device(pdev);
|
pci_disable_device(pdev);
|
||||||
|
err_put:
|
||||||
pci_dev_put(pdev);
|
pci_dev_put(pdev);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
@ -568,6 +568,9 @@ int __init register_led_driver(int model, unsigned long cmd_reg, unsigned long d
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case DISPLAY_MODEL_LASI:
|
case DISPLAY_MODEL_LASI:
|
||||||
|
/* Skip to register LED in QEMU */
|
||||||
|
if (running_on_qemu)
|
||||||
|
return 1;
|
||||||
LED_DATA_REG = data_reg;
|
LED_DATA_REG = data_reg;
|
||||||
led_func_ptr = led_LASI_driver;
|
led_func_ptr = led_LASI_driver;
|
||||||
printk(KERN_INFO "LED display at %lx registered\n", LED_DATA_REG);
|
printk(KERN_INFO "LED display at %lx registered\n", LED_DATA_REG);
|
||||||
|
@ -211,6 +211,38 @@ static void pcie_clkpm_cap_init(struct pcie_link_state *link, int blacklist)
|
|||||||
link->clkpm_capable = (blacklist) ? 0 : capable;
|
link->clkpm_capable = (blacklist) ? 0 : capable;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool pcie_retrain_link(struct pcie_link_state *link)
|
||||||
|
{
|
||||||
|
struct pci_dev *parent = link->pdev;
|
||||||
|
unsigned long start_jiffies;
|
||||||
|
u16 reg16;
|
||||||
|
|
||||||
|
pcie_capability_read_word(parent, PCI_EXP_LNKCTL, ®16);
|
||||||
|
reg16 |= PCI_EXP_LNKCTL_RL;
|
||||||
|
pcie_capability_write_word(parent, PCI_EXP_LNKCTL, reg16);
|
||||||
|
if (parent->clear_retrain_link) {
|
||||||
|
/*
|
||||||
|
* Due to an erratum in some devices the Retrain Link bit
|
||||||
|
* needs to be cleared again manually to allow the link
|
||||||
|
* training to succeed.
|
||||||
|
*/
|
||||||
|
reg16 &= ~PCI_EXP_LNKCTL_RL;
|
||||||
|
pcie_capability_write_word(parent, PCI_EXP_LNKCTL, reg16);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Wait for link training end. Break out after waiting for timeout */
|
||||||
|
start_jiffies = jiffies;
|
||||||
|
for (;;) {
|
||||||
|
pcie_capability_read_word(parent, PCI_EXP_LNKSTA, ®16);
|
||||||
|
if (!(reg16 & PCI_EXP_LNKSTA_LT))
|
||||||
|
break;
|
||||||
|
if (time_after(jiffies, start_jiffies + LINK_RETRAIN_TIMEOUT))
|
||||||
|
break;
|
||||||
|
msleep(1);
|
||||||
|
}
|
||||||
|
return !(reg16 & PCI_EXP_LNKSTA_LT);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* pcie_aspm_configure_common_clock: check if the 2 ends of a link
|
* pcie_aspm_configure_common_clock: check if the 2 ends of a link
|
||||||
* could use common clock. If they are, configure them to use the
|
* could use common clock. If they are, configure them to use the
|
||||||
@ -220,7 +252,6 @@ static void pcie_aspm_configure_common_clock(struct pcie_link_state *link)
|
|||||||
{
|
{
|
||||||
int same_clock = 1;
|
int same_clock = 1;
|
||||||
u16 reg16, parent_reg, child_reg[8];
|
u16 reg16, parent_reg, child_reg[8];
|
||||||
unsigned long start_jiffies;
|
|
||||||
struct pci_dev *child, *parent = link->pdev;
|
struct pci_dev *child, *parent = link->pdev;
|
||||||
struct pci_bus *linkbus = parent->subordinate;
|
struct pci_bus *linkbus = parent->subordinate;
|
||||||
/*
|
/*
|
||||||
@ -260,21 +291,7 @@ static void pcie_aspm_configure_common_clock(struct pcie_link_state *link)
|
|||||||
reg16 &= ~PCI_EXP_LNKCTL_CCC;
|
reg16 &= ~PCI_EXP_LNKCTL_CCC;
|
||||||
pcie_capability_write_word(parent, PCI_EXP_LNKCTL, reg16);
|
pcie_capability_write_word(parent, PCI_EXP_LNKCTL, reg16);
|
||||||
|
|
||||||
/* Retrain link */
|
if (pcie_retrain_link(link))
|
||||||
reg16 |= PCI_EXP_LNKCTL_RL;
|
|
||||||
pcie_capability_write_word(parent, PCI_EXP_LNKCTL, reg16);
|
|
||||||
|
|
||||||
/* Wait for link training end. Break out after waiting for timeout */
|
|
||||||
start_jiffies = jiffies;
|
|
||||||
for (;;) {
|
|
||||||
pcie_capability_read_word(parent, PCI_EXP_LNKSTA, ®16);
|
|
||||||
if (!(reg16 & PCI_EXP_LNKSTA_LT))
|
|
||||||
break;
|
|
||||||
if (time_after(jiffies, start_jiffies + LINK_RETRAIN_TIMEOUT))
|
|
||||||
break;
|
|
||||||
msleep(1);
|
|
||||||
}
|
|
||||||
if (!(reg16 & PCI_EXP_LNKSTA_LT))
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* Training failed. Restore common clock configurations */
|
/* Training failed. Restore common clock configurations */
|
||||||
|
@ -2085,6 +2085,23 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x10f1, quirk_disable_aspm_l0s);
|
|||||||
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x10f4, quirk_disable_aspm_l0s);
|
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x10f4, quirk_disable_aspm_l0s);
|
||||||
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x1508, quirk_disable_aspm_l0s);
|
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x1508, quirk_disable_aspm_l0s);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Some Pericom PCIe-to-PCI bridges in reverse mode need the PCIe Retrain
|
||||||
|
* Link bit cleared after starting the link retrain process to allow this
|
||||||
|
* process to finish.
|
||||||
|
*
|
||||||
|
* Affected devices: PI7C9X110, PI7C9X111SL, PI7C9X130. See also the
|
||||||
|
* Pericom Errata Sheet PI7C9X111SLB_errata_rev1.2_102711.pdf.
|
||||||
|
*/
|
||||||
|
static void quirk_enable_clear_retrain_link(struct pci_dev *dev)
|
||||||
|
{
|
||||||
|
dev->clear_retrain_link = 1;
|
||||||
|
pci_info(dev, "Enable PCIe Retrain Link quirk\n");
|
||||||
|
}
|
||||||
|
DECLARE_PCI_FIXUP_HEADER(0x12d8, 0xe110, quirk_enable_clear_retrain_link);
|
||||||
|
DECLARE_PCI_FIXUP_HEADER(0x12d8, 0xe111, quirk_enable_clear_retrain_link);
|
||||||
|
DECLARE_PCI_FIXUP_HEADER(0x12d8, 0xe130, quirk_enable_clear_retrain_link);
|
||||||
|
|
||||||
static void fixup_rev1_53c810(struct pci_dev *dev)
|
static void fixup_rev1_53c810(struct pci_dev *dev)
|
||||||
{
|
{
|
||||||
u32 class = dev->class;
|
u32 class = dev->class;
|
||||||
@ -3369,6 +3386,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATHEROS, 0x0030, quirk_no_bus_reset);
|
|||||||
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATHEROS, 0x0032, quirk_no_bus_reset);
|
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATHEROS, 0x0032, quirk_no_bus_reset);
|
||||||
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATHEROS, 0x003c, quirk_no_bus_reset);
|
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATHEROS, 0x003c, quirk_no_bus_reset);
|
||||||
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATHEROS, 0x0033, quirk_no_bus_reset);
|
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATHEROS, 0x0033, quirk_no_bus_reset);
|
||||||
|
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATHEROS, 0x0034, quirk_no_bus_reset);
|
||||||
|
|
||||||
static void quirk_no_pm_reset(struct pci_dev *dev)
|
static void quirk_no_pm_reset(struct pci_dev *dev)
|
||||||
{
|
{
|
||||||
@ -4852,4 +4870,5 @@ static void quirk_no_ats(struct pci_dev *pdev)
|
|||||||
|
|
||||||
/* AMD Stoney platform GPU */
|
/* AMD Stoney platform GPU */
|
||||||
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x98e4, quirk_no_ats);
|
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x98e4, quirk_no_ats);
|
||||||
|
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x6900, quirk_no_ats);
|
||||||
#endif /* CONFIG_PCI_ATS */
|
#endif /* CONFIG_PCI_ATS */
|
||||||
|
@ -221,6 +221,9 @@ static int cpcap_battery_cc_raw_div(struct cpcap_battery_ddata *ddata,
|
|||||||
int avg_current;
|
int avg_current;
|
||||||
u32 cc_lsb;
|
u32 cc_lsb;
|
||||||
|
|
||||||
|
if (!divider)
|
||||||
|
return 0;
|
||||||
|
|
||||||
sample &= 0xffffff; /* 24-bits, unsigned */
|
sample &= 0xffffff; /* 24-bits, unsigned */
|
||||||
offset &= 0x7ff; /* 10-bits, signed */
|
offset &= 0x7ff; /* 10-bits, signed */
|
||||||
|
|
||||||
|
@ -334,15 +334,11 @@ int power_supply_uevent(struct device *dev, struct kobj_uevent_env *env)
|
|||||||
char *prop_buf;
|
char *prop_buf;
|
||||||
char *attrname;
|
char *attrname;
|
||||||
|
|
||||||
dev_dbg(dev, "uevent\n");
|
|
||||||
|
|
||||||
if (!psy || !psy->desc) {
|
if (!psy || !psy->desc) {
|
||||||
dev_dbg(dev, "No power supply yet\n");
|
dev_dbg(dev, "No power supply yet\n");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
dev_dbg(dev, "POWER_SUPPLY_NAME=%s\n", psy->desc->name);
|
|
||||||
|
|
||||||
ret = add_uevent_var(env, "POWER_SUPPLY_NAME=%s", psy->desc->name);
|
ret = add_uevent_var(env, "POWER_SUPPLY_NAME=%s", psy->desc->name);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
@ -378,8 +374,6 @@ int power_supply_uevent(struct device *dev, struct kobj_uevent_env *env)
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
dev_dbg(dev, "prop %s=%s\n", attrname, prop_buf);
|
|
||||||
|
|
||||||
ret = add_uevent_var(env, "POWER_SUPPLY_%s=%s", attrname, prop_buf);
|
ret = add_uevent_var(env, "POWER_SUPPLY_%s=%s", attrname, prop_buf);
|
||||||
kfree(attrname);
|
kfree(attrname);
|
||||||
if (ret)
|
if (ret)
|
||||||
|
@ -15,14 +15,10 @@
|
|||||||
|
|
||||||
#define FB_ACCEL_SMI_LYNX 88
|
#define FB_ACCEL_SMI_LYNX 88
|
||||||
|
|
||||||
#define SCREEN_X_RES 1024
|
#define SCREEN_X_RES 1024
|
||||||
#define SCREEN_Y_RES 600
|
#define SCREEN_Y_RES_PC 768
|
||||||
#define SCREEN_BPP 16
|
#define SCREEN_Y_RES_NETBOOK 600
|
||||||
|
#define SCREEN_BPP 16
|
||||||
/*Assume SM712 graphics chip has 4MB VRAM */
|
|
||||||
#define SM712_VIDEOMEMORYSIZE 0x00400000
|
|
||||||
/*Assume SM722 graphics chip has 8MB VRAM */
|
|
||||||
#define SM722_VIDEOMEMORYSIZE 0x00800000
|
|
||||||
|
|
||||||
#define dac_reg (0x3c8)
|
#define dac_reg (0x3c8)
|
||||||
#define dac_val (0x3c9)
|
#define dac_val (0x3c9)
|
||||||
|
@ -530,6 +530,65 @@ static const struct modeinit vgamode[] = {
|
|||||||
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x15, 0x03,
|
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x15, 0x03,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{ /* 1024 x 768 16Bpp 60Hz */
|
||||||
|
1024, 768, 16, 60,
|
||||||
|
/* Init_MISC */
|
||||||
|
0xEB,
|
||||||
|
{ /* Init_SR0_SR4 */
|
||||||
|
0x03, 0x01, 0x0F, 0x03, 0x0E,
|
||||||
|
},
|
||||||
|
{ /* Init_SR10_SR24 */
|
||||||
|
0xF3, 0xB6, 0xC0, 0xDD, 0x00, 0x0E, 0x17, 0x2C,
|
||||||
|
0x99, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0xC4, 0x30, 0x02, 0x01, 0x01,
|
||||||
|
},
|
||||||
|
{ /* Init_SR30_SR75 */
|
||||||
|
0x38, 0x03, 0x20, 0x09, 0xC0, 0x3A, 0x3A, 0x3A,
|
||||||
|
0x3A, 0x3A, 0x3A, 0x3A, 0x00, 0x00, 0x03, 0xFF,
|
||||||
|
0x00, 0xFC, 0x00, 0x00, 0x20, 0x18, 0x00, 0xFC,
|
||||||
|
0x20, 0x0C, 0x44, 0x20, 0x00, 0x00, 0x00, 0x3A,
|
||||||
|
0x06, 0x68, 0xA7, 0x7F, 0x83, 0x24, 0xFF, 0x03,
|
||||||
|
0x0F, 0x60, 0x59, 0x3A, 0x3A, 0x00, 0x00, 0x3A,
|
||||||
|
0x01, 0x80, 0x7E, 0x1A, 0x1A, 0x00, 0x00, 0x00,
|
||||||
|
0x50, 0x03, 0x74, 0x14, 0x3B, 0x0D, 0x09, 0x02,
|
||||||
|
0x04, 0x45, 0x30, 0x30, 0x40, 0x20,
|
||||||
|
},
|
||||||
|
{ /* Init_SR80_SR93 */
|
||||||
|
0xFF, 0x07, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x3A,
|
||||||
|
0xF7, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x3A, 0x3A,
|
||||||
|
0x00, 0x00, 0x00, 0x00,
|
||||||
|
},
|
||||||
|
{ /* Init_SRA0_SRAF */
|
||||||
|
0x00, 0xFB, 0x9F, 0x01, 0x00, 0xED, 0xED, 0xED,
|
||||||
|
0x7B, 0xFB, 0xFF, 0xFF, 0x97, 0xEF, 0xBF, 0xDF,
|
||||||
|
},
|
||||||
|
{ /* Init_GR00_GR08 */
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x05, 0x0F,
|
||||||
|
0xFF,
|
||||||
|
},
|
||||||
|
{ /* Init_AR00_AR14 */
|
||||||
|
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
|
||||||
|
0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
|
||||||
|
0x41, 0x00, 0x0F, 0x00, 0x00,
|
||||||
|
},
|
||||||
|
{ /* Init_CR00_CR18 */
|
||||||
|
0xA3, 0x7F, 0x7F, 0x00, 0x85, 0x16, 0x24, 0xF5,
|
||||||
|
0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x03, 0x09, 0xFF, 0x80, 0x40, 0xFF, 0x00, 0xE3,
|
||||||
|
0xFF,
|
||||||
|
},
|
||||||
|
{ /* Init_CR30_CR4D */
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x02, 0x20,
|
||||||
|
0x00, 0x00, 0x00, 0x40, 0x00, 0xFF, 0xBF, 0xFF,
|
||||||
|
0xA3, 0x7F, 0x00, 0x86, 0x15, 0x24, 0xFF, 0x00,
|
||||||
|
0x01, 0x07, 0xE5, 0x20, 0x7F, 0xFF,
|
||||||
|
},
|
||||||
|
{ /* Init_CR90_CRA7 */
|
||||||
|
0x55, 0xD9, 0x5D, 0xE1, 0x86, 0x1B, 0x8E, 0x26,
|
||||||
|
0xDA, 0x8D, 0xDE, 0x94, 0x00, 0x00, 0x18, 0x00,
|
||||||
|
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x15, 0x03,
|
||||||
|
},
|
||||||
|
},
|
||||||
{ /* mode#5: 1024 x 768 24Bpp 60Hz */
|
{ /* mode#5: 1024 x 768 24Bpp 60Hz */
|
||||||
1024, 768, 24, 60,
|
1024, 768, 24, 60,
|
||||||
/* Init_MISC */
|
/* Init_MISC */
|
||||||
@ -827,67 +886,80 @@ static inline unsigned int chan_to_field(unsigned int chan,
|
|||||||
|
|
||||||
static int smtc_blank(int blank_mode, struct fb_info *info)
|
static int smtc_blank(int blank_mode, struct fb_info *info)
|
||||||
{
|
{
|
||||||
|
struct smtcfb_info *sfb = info->par;
|
||||||
|
|
||||||
/* clear DPMS setting */
|
/* clear DPMS setting */
|
||||||
switch (blank_mode) {
|
switch (blank_mode) {
|
||||||
case FB_BLANK_UNBLANK:
|
case FB_BLANK_UNBLANK:
|
||||||
/* Screen On: HSync: On, VSync : On */
|
/* Screen On: HSync: On, VSync : On */
|
||||||
|
|
||||||
|
switch (sfb->chip_id) {
|
||||||
|
case 0x710:
|
||||||
|
case 0x712:
|
||||||
|
smtc_seqw(0x6a, 0x16);
|
||||||
|
smtc_seqw(0x6b, 0x02);
|
||||||
|
break;
|
||||||
|
case 0x720:
|
||||||
|
smtc_seqw(0x6a, 0x0d);
|
||||||
|
smtc_seqw(0x6b, 0x02);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
smtc_seqw(0x23, (smtc_seqr(0x23) & (~0xc0)));
|
||||||
smtc_seqw(0x01, (smtc_seqr(0x01) & (~0x20)));
|
smtc_seqw(0x01, (smtc_seqr(0x01) & (~0x20)));
|
||||||
smtc_seqw(0x6a, 0x16);
|
|
||||||
smtc_seqw(0x6b, 0x02);
|
|
||||||
smtc_seqw(0x21, (smtc_seqr(0x21) & 0x77));
|
smtc_seqw(0x21, (smtc_seqr(0x21) & 0x77));
|
||||||
smtc_seqw(0x22, (smtc_seqr(0x22) & (~0x30)));
|
smtc_seqw(0x22, (smtc_seqr(0x22) & (~0x30)));
|
||||||
smtc_seqw(0x23, (smtc_seqr(0x23) & (~0xc0)));
|
|
||||||
smtc_seqw(0x24, (smtc_seqr(0x24) | 0x01));
|
|
||||||
smtc_seqw(0x31, (smtc_seqr(0x31) | 0x03));
|
smtc_seqw(0x31, (smtc_seqr(0x31) | 0x03));
|
||||||
|
smtc_seqw(0x24, (smtc_seqr(0x24) | 0x01));
|
||||||
break;
|
break;
|
||||||
case FB_BLANK_NORMAL:
|
case FB_BLANK_NORMAL:
|
||||||
/* Screen Off: HSync: On, VSync : On Soft blank */
|
/* Screen Off: HSync: On, VSync : On Soft blank */
|
||||||
smtc_seqw(0x01, (smtc_seqr(0x01) & (~0x20)));
|
|
||||||
smtc_seqw(0x6a, 0x16);
|
|
||||||
smtc_seqw(0x6b, 0x02);
|
|
||||||
smtc_seqw(0x22, (smtc_seqr(0x22) & (~0x30)));
|
|
||||||
smtc_seqw(0x23, (smtc_seqr(0x23) & (~0xc0)));
|
|
||||||
smtc_seqw(0x24, (smtc_seqr(0x24) | 0x01));
|
smtc_seqw(0x24, (smtc_seqr(0x24) | 0x01));
|
||||||
smtc_seqw(0x31, ((smtc_seqr(0x31) & (~0x07)) | 0x00));
|
smtc_seqw(0x31, ((smtc_seqr(0x31) & (~0x07)) | 0x00));
|
||||||
|
smtc_seqw(0x23, (smtc_seqr(0x23) & (~0xc0)));
|
||||||
|
smtc_seqw(0x01, (smtc_seqr(0x01) & (~0x20)));
|
||||||
|
smtc_seqw(0x22, (smtc_seqr(0x22) & (~0x30)));
|
||||||
|
smtc_seqw(0x6a, 0x16);
|
||||||
|
smtc_seqw(0x6b, 0x02);
|
||||||
break;
|
break;
|
||||||
case FB_BLANK_VSYNC_SUSPEND:
|
case FB_BLANK_VSYNC_SUSPEND:
|
||||||
/* Screen On: HSync: On, VSync : Off */
|
/* Screen On: HSync: On, VSync : Off */
|
||||||
smtc_seqw(0x01, (smtc_seqr(0x01) | 0x20));
|
|
||||||
smtc_seqw(0x20, (smtc_seqr(0x20) & (~0xB0)));
|
|
||||||
smtc_seqw(0x6a, 0x0c);
|
|
||||||
smtc_seqw(0x6b, 0x02);
|
|
||||||
smtc_seqw(0x21, (smtc_seqr(0x21) | 0x88));
|
|
||||||
smtc_seqw(0x22, ((smtc_seqr(0x22) & (~0x30)) | 0x20));
|
|
||||||
smtc_seqw(0x23, ((smtc_seqr(0x23) & (~0xc0)) | 0x20));
|
|
||||||
smtc_seqw(0x24, (smtc_seqr(0x24) & (~0x01)));
|
smtc_seqw(0x24, (smtc_seqr(0x24) & (~0x01)));
|
||||||
smtc_seqw(0x31, ((smtc_seqr(0x31) & (~0x07)) | 0x00));
|
smtc_seqw(0x31, ((smtc_seqr(0x31) & (~0x07)) | 0x00));
|
||||||
|
smtc_seqw(0x23, ((smtc_seqr(0x23) & (~0xc0)) | 0x20));
|
||||||
|
smtc_seqw(0x01, (smtc_seqr(0x01) | 0x20));
|
||||||
|
smtc_seqw(0x21, (smtc_seqr(0x21) | 0x88));
|
||||||
|
smtc_seqw(0x20, (smtc_seqr(0x20) & (~0xB0)));
|
||||||
|
smtc_seqw(0x22, ((smtc_seqr(0x22) & (~0x30)) | 0x20));
|
||||||
smtc_seqw(0x34, (smtc_seqr(0x34) | 0x80));
|
smtc_seqw(0x34, (smtc_seqr(0x34) | 0x80));
|
||||||
|
smtc_seqw(0x6a, 0x0c);
|
||||||
|
smtc_seqw(0x6b, 0x02);
|
||||||
break;
|
break;
|
||||||
case FB_BLANK_HSYNC_SUSPEND:
|
case FB_BLANK_HSYNC_SUSPEND:
|
||||||
/* Screen On: HSync: Off, VSync : On */
|
/* Screen On: HSync: Off, VSync : On */
|
||||||
smtc_seqw(0x01, (smtc_seqr(0x01) | 0x20));
|
|
||||||
smtc_seqw(0x20, (smtc_seqr(0x20) & (~0xB0)));
|
|
||||||
smtc_seqw(0x6a, 0x0c);
|
|
||||||
smtc_seqw(0x6b, 0x02);
|
|
||||||
smtc_seqw(0x21, (smtc_seqr(0x21) | 0x88));
|
|
||||||
smtc_seqw(0x22, ((smtc_seqr(0x22) & (~0x30)) | 0x10));
|
|
||||||
smtc_seqw(0x23, ((smtc_seqr(0x23) & (~0xc0)) | 0xD8));
|
|
||||||
smtc_seqw(0x24, (smtc_seqr(0x24) & (~0x01)));
|
smtc_seqw(0x24, (smtc_seqr(0x24) & (~0x01)));
|
||||||
smtc_seqw(0x31, ((smtc_seqr(0x31) & (~0x07)) | 0x00));
|
smtc_seqw(0x31, ((smtc_seqr(0x31) & (~0x07)) | 0x00));
|
||||||
|
smtc_seqw(0x23, ((smtc_seqr(0x23) & (~0xc0)) | 0xD8));
|
||||||
|
smtc_seqw(0x01, (smtc_seqr(0x01) | 0x20));
|
||||||
|
smtc_seqw(0x21, (smtc_seqr(0x21) | 0x88));
|
||||||
|
smtc_seqw(0x20, (smtc_seqr(0x20) & (~0xB0)));
|
||||||
|
smtc_seqw(0x22, ((smtc_seqr(0x22) & (~0x30)) | 0x10));
|
||||||
smtc_seqw(0x34, (smtc_seqr(0x34) | 0x80));
|
smtc_seqw(0x34, (smtc_seqr(0x34) | 0x80));
|
||||||
|
smtc_seqw(0x6a, 0x0c);
|
||||||
|
smtc_seqw(0x6b, 0x02);
|
||||||
break;
|
break;
|
||||||
case FB_BLANK_POWERDOWN:
|
case FB_BLANK_POWERDOWN:
|
||||||
/* Screen On: HSync: Off, VSync : Off */
|
/* Screen On: HSync: Off, VSync : Off */
|
||||||
smtc_seqw(0x01, (smtc_seqr(0x01) | 0x20));
|
|
||||||
smtc_seqw(0x20, (smtc_seqr(0x20) & (~0xB0)));
|
|
||||||
smtc_seqw(0x6a, 0x0c);
|
|
||||||
smtc_seqw(0x6b, 0x02);
|
|
||||||
smtc_seqw(0x21, (smtc_seqr(0x21) | 0x88));
|
|
||||||
smtc_seqw(0x22, ((smtc_seqr(0x22) & (~0x30)) | 0x30));
|
|
||||||
smtc_seqw(0x23, ((smtc_seqr(0x23) & (~0xc0)) | 0xD8));
|
|
||||||
smtc_seqw(0x24, (smtc_seqr(0x24) & (~0x01)));
|
smtc_seqw(0x24, (smtc_seqr(0x24) & (~0x01)));
|
||||||
smtc_seqw(0x31, ((smtc_seqr(0x31) & (~0x07)) | 0x00));
|
smtc_seqw(0x31, ((smtc_seqr(0x31) & (~0x07)) | 0x00));
|
||||||
|
smtc_seqw(0x23, ((smtc_seqr(0x23) & (~0xc0)) | 0xD8));
|
||||||
|
smtc_seqw(0x01, (smtc_seqr(0x01) | 0x20));
|
||||||
|
smtc_seqw(0x21, (smtc_seqr(0x21) | 0x88));
|
||||||
|
smtc_seqw(0x20, (smtc_seqr(0x20) & (~0xB0)));
|
||||||
|
smtc_seqw(0x22, ((smtc_seqr(0x22) & (~0x30)) | 0x30));
|
||||||
smtc_seqw(0x34, (smtc_seqr(0x34) | 0x80));
|
smtc_seqw(0x34, (smtc_seqr(0x34) | 0x80));
|
||||||
|
smtc_seqw(0x6a, 0x0c);
|
||||||
|
smtc_seqw(0x6b, 0x02);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
@ -1145,8 +1217,10 @@ static void sm7xx_set_timing(struct smtcfb_info *sfb)
|
|||||||
|
|
||||||
/* init SEQ register SR30 - SR75 */
|
/* init SEQ register SR30 - SR75 */
|
||||||
for (i = 0; i < SIZE_SR30_SR75; i++)
|
for (i = 0; i < SIZE_SR30_SR75; i++)
|
||||||
if ((i + 0x30) != 0x62 && (i + 0x30) != 0x6a &&
|
if ((i + 0x30) != 0x30 && (i + 0x30) != 0x62 &&
|
||||||
(i + 0x30) != 0x6b)
|
(i + 0x30) != 0x6a && (i + 0x30) != 0x6b &&
|
||||||
|
(i + 0x30) != 0x70 && (i + 0x30) != 0x71 &&
|
||||||
|
(i + 0x30) != 0x74 && (i + 0x30) != 0x75)
|
||||||
smtc_seqw(i + 0x30,
|
smtc_seqw(i + 0x30,
|
||||||
vgamode[j].init_sr30_sr75[i]);
|
vgamode[j].init_sr30_sr75[i]);
|
||||||
|
|
||||||
@ -1171,8 +1245,12 @@ static void sm7xx_set_timing(struct smtcfb_info *sfb)
|
|||||||
smtc_crtcw(i, vgamode[j].init_cr00_cr18[i]);
|
smtc_crtcw(i, vgamode[j].init_cr00_cr18[i]);
|
||||||
|
|
||||||
/* init CRTC register CR30 - CR4D */
|
/* init CRTC register CR30 - CR4D */
|
||||||
for (i = 0; i < SIZE_CR30_CR4D; i++)
|
for (i = 0; i < SIZE_CR30_CR4D; i++) {
|
||||||
|
if ((i + 0x30) >= 0x3B && (i + 0x30) <= 0x3F)
|
||||||
|
/* side-effect, don't write to CR3B-CR3F */
|
||||||
|
continue;
|
||||||
smtc_crtcw(i + 0x30, vgamode[j].init_cr30_cr4d[i]);
|
smtc_crtcw(i + 0x30, vgamode[j].init_cr30_cr4d[i]);
|
||||||
|
}
|
||||||
|
|
||||||
/* init CRTC register CR90 - CRA7 */
|
/* init CRTC register CR90 - CRA7 */
|
||||||
for (i = 0; i < SIZE_CR90_CRA7; i++)
|
for (i = 0; i < SIZE_CR90_CRA7; i++)
|
||||||
@ -1323,6 +1401,11 @@ static int smtc_map_smem(struct smtcfb_info *sfb,
|
|||||||
{
|
{
|
||||||
sfb->fb->fix.smem_start = pci_resource_start(pdev, 0);
|
sfb->fb->fix.smem_start = pci_resource_start(pdev, 0);
|
||||||
|
|
||||||
|
if (sfb->chip_id == 0x720)
|
||||||
|
/* on SM720, the framebuffer starts at the 1 MB offset */
|
||||||
|
sfb->fb->fix.smem_start += 0x00200000;
|
||||||
|
|
||||||
|
/* XXX: is it safe for SM720 on Big-Endian? */
|
||||||
if (sfb->fb->var.bits_per_pixel == 32)
|
if (sfb->fb->var.bits_per_pixel == 32)
|
||||||
sfb->fb->fix.smem_start += big_addr;
|
sfb->fb->fix.smem_start += big_addr;
|
||||||
|
|
||||||
@ -1360,12 +1443,82 @@ static inline void sm7xx_init_hw(void)
|
|||||||
outb_p(0x11, 0x3c5);
|
outb_p(0x11, 0x3c5);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static u_long sm7xx_vram_probe(struct smtcfb_info *sfb)
|
||||||
|
{
|
||||||
|
u8 vram;
|
||||||
|
|
||||||
|
switch (sfb->chip_id) {
|
||||||
|
case 0x710:
|
||||||
|
case 0x712:
|
||||||
|
/*
|
||||||
|
* Assume SM712 graphics chip has 4MB VRAM.
|
||||||
|
*
|
||||||
|
* FIXME: SM712 can have 2MB VRAM, which is used on earlier
|
||||||
|
* laptops, such as IBM Thinkpad 240X. This driver would
|
||||||
|
* probably crash on those machines. If anyone gets one of
|
||||||
|
* those and is willing to help, run "git blame" and send me
|
||||||
|
* an E-mail.
|
||||||
|
*/
|
||||||
|
return 0x00400000;
|
||||||
|
case 0x720:
|
||||||
|
outb_p(0x76, 0x3c4);
|
||||||
|
vram = inb_p(0x3c5) >> 6;
|
||||||
|
|
||||||
|
if (vram == 0x00)
|
||||||
|
return 0x00800000; /* 8 MB */
|
||||||
|
else if (vram == 0x01)
|
||||||
|
return 0x01000000; /* 16 MB */
|
||||||
|
else if (vram == 0x02)
|
||||||
|
return 0x00400000; /* illegal, fallback to 4 MB */
|
||||||
|
else if (vram == 0x03)
|
||||||
|
return 0x00400000; /* 4 MB */
|
||||||
|
}
|
||||||
|
return 0; /* unknown hardware */
|
||||||
|
}
|
||||||
|
|
||||||
|
static void sm7xx_resolution_probe(struct smtcfb_info *sfb)
|
||||||
|
{
|
||||||
|
/* get mode parameter from smtc_scr_info */
|
||||||
|
if (smtc_scr_info.lfb_width != 0) {
|
||||||
|
sfb->fb->var.xres = smtc_scr_info.lfb_width;
|
||||||
|
sfb->fb->var.yres = smtc_scr_info.lfb_height;
|
||||||
|
sfb->fb->var.bits_per_pixel = smtc_scr_info.lfb_depth;
|
||||||
|
goto final;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* No parameter, default resolution is 1024x768-16.
|
||||||
|
*
|
||||||
|
* FIXME: earlier laptops, such as IBM Thinkpad 240X, has a 800x600
|
||||||
|
* panel, also see the comments about Thinkpad 240X above.
|
||||||
|
*/
|
||||||
|
sfb->fb->var.xres = SCREEN_X_RES;
|
||||||
|
sfb->fb->var.yres = SCREEN_Y_RES_PC;
|
||||||
|
sfb->fb->var.bits_per_pixel = SCREEN_BPP;
|
||||||
|
|
||||||
|
#ifdef CONFIG_MIPS
|
||||||
|
/*
|
||||||
|
* Loongson MIPS netbooks use 1024x600 LCD panels, which is the original
|
||||||
|
* target platform of this driver, but nearly all old x86 laptops have
|
||||||
|
* 1024x768. Lighting 768 panels using 600's timings would partially
|
||||||
|
* garble the display, so we don't want that. But it's not possible to
|
||||||
|
* distinguish them reliably.
|
||||||
|
*
|
||||||
|
* So we change the default to 768, but keep 600 as-is on MIPS.
|
||||||
|
*/
|
||||||
|
sfb->fb->var.yres = SCREEN_Y_RES_NETBOOK;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
final:
|
||||||
|
big_pixel_depth(sfb->fb->var.bits_per_pixel, smtc_scr_info.lfb_depth);
|
||||||
|
}
|
||||||
|
|
||||||
static int smtcfb_pci_probe(struct pci_dev *pdev,
|
static int smtcfb_pci_probe(struct pci_dev *pdev,
|
||||||
const struct pci_device_id *ent)
|
const struct pci_device_id *ent)
|
||||||
{
|
{
|
||||||
struct smtcfb_info *sfb;
|
struct smtcfb_info *sfb;
|
||||||
struct fb_info *info;
|
struct fb_info *info;
|
||||||
u_long smem_size = 0x00800000; /* default 8MB */
|
u_long smem_size;
|
||||||
int err;
|
int err;
|
||||||
unsigned long mmio_base;
|
unsigned long mmio_base;
|
||||||
|
|
||||||
@ -1405,29 +1558,19 @@ static int smtcfb_pci_probe(struct pci_dev *pdev,
|
|||||||
|
|
||||||
sm7xx_init_hw();
|
sm7xx_init_hw();
|
||||||
|
|
||||||
/* get mode parameter from smtc_scr_info */
|
|
||||||
if (smtc_scr_info.lfb_width != 0) {
|
|
||||||
sfb->fb->var.xres = smtc_scr_info.lfb_width;
|
|
||||||
sfb->fb->var.yres = smtc_scr_info.lfb_height;
|
|
||||||
sfb->fb->var.bits_per_pixel = smtc_scr_info.lfb_depth;
|
|
||||||
} else {
|
|
||||||
/* default resolution 1024x600 16bit mode */
|
|
||||||
sfb->fb->var.xres = SCREEN_X_RES;
|
|
||||||
sfb->fb->var.yres = SCREEN_Y_RES;
|
|
||||||
sfb->fb->var.bits_per_pixel = SCREEN_BPP;
|
|
||||||
}
|
|
||||||
|
|
||||||
big_pixel_depth(sfb->fb->var.bits_per_pixel, smtc_scr_info.lfb_depth);
|
|
||||||
/* Map address and memory detection */
|
/* Map address and memory detection */
|
||||||
mmio_base = pci_resource_start(pdev, 0);
|
mmio_base = pci_resource_start(pdev, 0);
|
||||||
pci_read_config_byte(pdev, PCI_REVISION_ID, &sfb->chip_rev_id);
|
pci_read_config_byte(pdev, PCI_REVISION_ID, &sfb->chip_rev_id);
|
||||||
|
|
||||||
|
smem_size = sm7xx_vram_probe(sfb);
|
||||||
|
dev_info(&pdev->dev, "%lu MiB of VRAM detected.\n",
|
||||||
|
smem_size / 1048576);
|
||||||
|
|
||||||
switch (sfb->chip_id) {
|
switch (sfb->chip_id) {
|
||||||
case 0x710:
|
case 0x710:
|
||||||
case 0x712:
|
case 0x712:
|
||||||
sfb->fb->fix.mmio_start = mmio_base + 0x00400000;
|
sfb->fb->fix.mmio_start = mmio_base + 0x00400000;
|
||||||
sfb->fb->fix.mmio_len = 0x00400000;
|
sfb->fb->fix.mmio_len = 0x00400000;
|
||||||
smem_size = SM712_VIDEOMEMORYSIZE;
|
|
||||||
sfb->lfb = ioremap(mmio_base, mmio_addr);
|
sfb->lfb = ioremap(mmio_base, mmio_addr);
|
||||||
if (!sfb->lfb) {
|
if (!sfb->lfb) {
|
||||||
dev_err(&pdev->dev,
|
dev_err(&pdev->dev,
|
||||||
@ -1459,8 +1602,7 @@ static int smtcfb_pci_probe(struct pci_dev *pdev,
|
|||||||
case 0x720:
|
case 0x720:
|
||||||
sfb->fb->fix.mmio_start = mmio_base;
|
sfb->fb->fix.mmio_start = mmio_base;
|
||||||
sfb->fb->fix.mmio_len = 0x00200000;
|
sfb->fb->fix.mmio_len = 0x00200000;
|
||||||
smem_size = SM722_VIDEOMEMORYSIZE;
|
sfb->dp_regs = ioremap(mmio_base, 0x00200000 + smem_size);
|
||||||
sfb->dp_regs = ioremap(mmio_base, 0x00a00000);
|
|
||||||
sfb->lfb = sfb->dp_regs + 0x00200000;
|
sfb->lfb = sfb->dp_regs + 0x00200000;
|
||||||
sfb->mmio = (smtc_regbaseaddress =
|
sfb->mmio = (smtc_regbaseaddress =
|
||||||
sfb->dp_regs + 0x000c0000);
|
sfb->dp_regs + 0x000c0000);
|
||||||
@ -1477,6 +1619,9 @@ static int smtcfb_pci_probe(struct pci_dev *pdev,
|
|||||||
goto failed_fb;
|
goto failed_fb;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* probe and decide resolution */
|
||||||
|
sm7xx_resolution_probe(sfb);
|
||||||
|
|
||||||
/* can support 32 bpp */
|
/* can support 32 bpp */
|
||||||
if (sfb->fb->var.bits_per_pixel == 15)
|
if (sfb->fb->var.bits_per_pixel == 15)
|
||||||
sfb->fb->var.bits_per_pixel = 16;
|
sfb->fb->var.bits_per_pixel = 16;
|
||||||
@ -1487,7 +1632,11 @@ static int smtcfb_pci_probe(struct pci_dev *pdev,
|
|||||||
if (err)
|
if (err)
|
||||||
goto failed;
|
goto failed;
|
||||||
|
|
||||||
smtcfb_setmode(sfb);
|
/*
|
||||||
|
* The screen would be temporarily garbled when sm712fb takes over
|
||||||
|
* vesafb or VGA text mode. Zero the framebuffer.
|
||||||
|
*/
|
||||||
|
memset_io(sfb->lfb, 0, sfb->fb->fix.smem_len);
|
||||||
|
|
||||||
err = register_framebuffer(info);
|
err = register_framebuffer(info);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
|
@ -11058,9 +11058,9 @@ int btrfs_error_unpin_extent_range(struct btrfs_fs_info *fs_info,
|
|||||||
* transaction.
|
* transaction.
|
||||||
*/
|
*/
|
||||||
static int btrfs_trim_free_extents(struct btrfs_device *device,
|
static int btrfs_trim_free_extents(struct btrfs_device *device,
|
||||||
u64 minlen, u64 *trimmed)
|
struct fstrim_range *range, u64 *trimmed)
|
||||||
{
|
{
|
||||||
u64 start = 0, len = 0;
|
u64 start = range->start, len = 0;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
*trimmed = 0;
|
*trimmed = 0;
|
||||||
@ -11096,8 +11096,8 @@ static int btrfs_trim_free_extents(struct btrfs_device *device,
|
|||||||
refcount_inc(&trans->use_count);
|
refcount_inc(&trans->use_count);
|
||||||
spin_unlock(&fs_info->trans_lock);
|
spin_unlock(&fs_info->trans_lock);
|
||||||
|
|
||||||
ret = find_free_dev_extent_start(trans, device, minlen, start,
|
ret = find_free_dev_extent_start(trans, device, range->minlen,
|
||||||
&start, &len);
|
start, &start, &len);
|
||||||
if (trans)
|
if (trans)
|
||||||
btrfs_put_transaction(trans);
|
btrfs_put_transaction(trans);
|
||||||
|
|
||||||
@ -11109,6 +11109,16 @@ static int btrfs_trim_free_extents(struct btrfs_device *device,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* If we are out of the passed range break */
|
||||||
|
if (start > range->start + range->len - 1) {
|
||||||
|
mutex_unlock(&fs_info->chunk_mutex);
|
||||||
|
ret = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
start = max(range->start, start);
|
||||||
|
len = min(range->len, len);
|
||||||
|
|
||||||
ret = btrfs_issue_discard(device->bdev, start, len, &bytes);
|
ret = btrfs_issue_discard(device->bdev, start, len, &bytes);
|
||||||
up_read(&fs_info->commit_root_sem);
|
up_read(&fs_info->commit_root_sem);
|
||||||
mutex_unlock(&fs_info->chunk_mutex);
|
mutex_unlock(&fs_info->chunk_mutex);
|
||||||
@ -11119,6 +11129,10 @@ static int btrfs_trim_free_extents(struct btrfs_device *device,
|
|||||||
start += len;
|
start += len;
|
||||||
*trimmed += bytes;
|
*trimmed += bytes;
|
||||||
|
|
||||||
|
/* We've trimmed enough */
|
||||||
|
if (*trimmed >= range->len)
|
||||||
|
break;
|
||||||
|
|
||||||
if (fatal_signal_pending(current)) {
|
if (fatal_signal_pending(current)) {
|
||||||
ret = -ERESTARTSYS;
|
ret = -ERESTARTSYS;
|
||||||
break;
|
break;
|
||||||
@ -11202,8 +11216,7 @@ int btrfs_trim_fs(struct btrfs_fs_info *fs_info, struct fstrim_range *range)
|
|||||||
mutex_lock(&fs_info->fs_devices->device_list_mutex);
|
mutex_lock(&fs_info->fs_devices->device_list_mutex);
|
||||||
devices = &fs_info->fs_devices->devices;
|
devices = &fs_info->fs_devices->devices;
|
||||||
list_for_each_entry(device, devices, dev_list) {
|
list_for_each_entry(device, devices, dev_list) {
|
||||||
ret = btrfs_trim_free_extents(device, range->minlen,
|
ret = btrfs_trim_free_extents(device, range, &group_trimmed);
|
||||||
&group_trimmed);
|
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_failed++;
|
dev_failed++;
|
||||||
dev_ret = ret;
|
dev_ret = ret;
|
||||||
|
@ -768,6 +768,12 @@ static void ceph_umount_begin(struct super_block *sb)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int ceph_remount(struct super_block *sb, int *flags, char *data)
|
||||||
|
{
|
||||||
|
sync_filesystem(sb);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static const struct super_operations ceph_super_ops = {
|
static const struct super_operations ceph_super_ops = {
|
||||||
.alloc_inode = ceph_alloc_inode,
|
.alloc_inode = ceph_alloc_inode,
|
||||||
.destroy_inode = ceph_destroy_inode,
|
.destroy_inode = ceph_destroy_inode,
|
||||||
@ -775,6 +781,7 @@ static const struct super_operations ceph_super_ops = {
|
|||||||
.drop_inode = ceph_drop_inode,
|
.drop_inode = ceph_drop_inode,
|
||||||
.sync_fs = ceph_sync_fs,
|
.sync_fs = ceph_sync_fs,
|
||||||
.put_super = ceph_put_super,
|
.put_super = ceph_put_super,
|
||||||
|
.remount_fs = ceph_remount,
|
||||||
.show_options = ceph_show_options,
|
.show_options = ceph_show_options,
|
||||||
.statfs = ceph_statfs,
|
.statfs = ceph_statfs,
|
||||||
.umount_begin = ceph_umount_begin,
|
.umount_begin = ceph_umount_begin,
|
||||||
|
@ -1969,26 +1969,28 @@ smb21_set_oplock_level(struct cifsInodeInfo *cinode, __u32 oplock,
|
|||||||
unsigned int epoch, bool *purge_cache)
|
unsigned int epoch, bool *purge_cache)
|
||||||
{
|
{
|
||||||
char message[5] = {0};
|
char message[5] = {0};
|
||||||
|
unsigned int new_oplock = 0;
|
||||||
|
|
||||||
oplock &= 0xFF;
|
oplock &= 0xFF;
|
||||||
if (oplock == SMB2_OPLOCK_LEVEL_NOCHANGE)
|
if (oplock == SMB2_OPLOCK_LEVEL_NOCHANGE)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
cinode->oplock = 0;
|
|
||||||
if (oplock & SMB2_LEASE_READ_CACHING_HE) {
|
if (oplock & SMB2_LEASE_READ_CACHING_HE) {
|
||||||
cinode->oplock |= CIFS_CACHE_READ_FLG;
|
new_oplock |= CIFS_CACHE_READ_FLG;
|
||||||
strcat(message, "R");
|
strcat(message, "R");
|
||||||
}
|
}
|
||||||
if (oplock & SMB2_LEASE_HANDLE_CACHING_HE) {
|
if (oplock & SMB2_LEASE_HANDLE_CACHING_HE) {
|
||||||
cinode->oplock |= CIFS_CACHE_HANDLE_FLG;
|
new_oplock |= CIFS_CACHE_HANDLE_FLG;
|
||||||
strcat(message, "H");
|
strcat(message, "H");
|
||||||
}
|
}
|
||||||
if (oplock & SMB2_LEASE_WRITE_CACHING_HE) {
|
if (oplock & SMB2_LEASE_WRITE_CACHING_HE) {
|
||||||
cinode->oplock |= CIFS_CACHE_WRITE_FLG;
|
new_oplock |= CIFS_CACHE_WRITE_FLG;
|
||||||
strcat(message, "W");
|
strcat(message, "W");
|
||||||
}
|
}
|
||||||
if (!cinode->oplock)
|
if (!new_oplock)
|
||||||
strcat(message, "None");
|
strncpy(message, "None", sizeof(message));
|
||||||
|
|
||||||
|
cinode->oplock = new_oplock;
|
||||||
cifs_dbg(FYI, "%s Lease granted on inode %p\n", message,
|
cifs_dbg(FYI, "%s Lease granted on inode %p\n", message,
|
||||||
&cinode->vfs_inode);
|
&cinode->vfs_inode);
|
||||||
}
|
}
|
||||||
|
@ -2699,7 +2699,6 @@ SMB2_read(const unsigned int xid, struct cifs_io_parms *io_parms,
|
|||||||
cifs_dbg(VFS, "Send error in read = %d\n", rc);
|
cifs_dbg(VFS, "Send error in read = %d\n", rc);
|
||||||
}
|
}
|
||||||
free_rsp_buf(resp_buftype, rsp_iov.iov_base);
|
free_rsp_buf(resp_buftype, rsp_iov.iov_base);
|
||||||
cifs_small_buf_release(req);
|
|
||||||
return rc == -ENODATA ? 0 : rc;
|
return rc == -ENODATA ? 0 : rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1525,7 +1525,7 @@ __acquires(fc->lock)
|
|||||||
{
|
{
|
||||||
struct fuse_conn *fc = get_fuse_conn(inode);
|
struct fuse_conn *fc = get_fuse_conn(inode);
|
||||||
struct fuse_inode *fi = get_fuse_inode(inode);
|
struct fuse_inode *fi = get_fuse_inode(inode);
|
||||||
size_t crop = i_size_read(inode);
|
loff_t crop = i_size_read(inode);
|
||||||
struct fuse_req *req;
|
struct fuse_req *req;
|
||||||
|
|
||||||
while (fi->writectr >= 0 && !list_empty(&fi->queued_writes)) {
|
while (fi->writectr >= 0 && !list_empty(&fi->queued_writes)) {
|
||||||
@ -2974,6 +2974,13 @@ static long fuse_file_fallocate(struct file *file, int mode, loff_t offset,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!(mode & FALLOC_FL_KEEP_SIZE) &&
|
||||||
|
offset + length > i_size_read(inode)) {
|
||||||
|
err = inode_newsize_ok(inode, offset + length);
|
||||||
|
if (err)
|
||||||
|
return err;
|
||||||
|
}
|
||||||
|
|
||||||
if (!(mode & FALLOC_FL_KEEP_SIZE))
|
if (!(mode & FALLOC_FL_KEEP_SIZE))
|
||||||
set_bit(FUSE_I_SIZE_UNSTABLE, &fi->state);
|
set_bit(FUSE_I_SIZE_UNSTABLE, &fi->state);
|
||||||
|
|
||||||
|
@ -904,7 +904,7 @@ fl_pnfs_update_layout(struct inode *ino,
|
|||||||
status = filelayout_check_deviceid(lo, fl, gfp_flags);
|
status = filelayout_check_deviceid(lo, fl, gfp_flags);
|
||||||
if (status) {
|
if (status) {
|
||||||
pnfs_put_lseg(lseg);
|
pnfs_put_lseg(lseg);
|
||||||
lseg = ERR_PTR(status);
|
lseg = NULL;
|
||||||
}
|
}
|
||||||
out:
|
out:
|
||||||
return lseg;
|
return lseg;
|
||||||
|
@ -143,6 +143,10 @@ int nfs40_discover_server_trunking(struct nfs_client *clp,
|
|||||||
/* Sustain the lease, even if it's empty. If the clientid4
|
/* Sustain the lease, even if it's empty. If the clientid4
|
||||||
* goes stale it's of no use for trunking discovery. */
|
* goes stale it's of no use for trunking discovery. */
|
||||||
nfs4_schedule_state_renewal(*result);
|
nfs4_schedule_state_renewal(*result);
|
||||||
|
|
||||||
|
/* If the client state need to recover, do it. */
|
||||||
|
if (clp->cl_state)
|
||||||
|
nfs4_schedule_state_manager(clp);
|
||||||
}
|
}
|
||||||
out:
|
out:
|
||||||
return status;
|
return status;
|
||||||
|
@ -229,7 +229,7 @@ ufs_get_inode_gid(struct super_block *sb, struct ufs_inode *inode)
|
|||||||
case UFS_UID_44BSD:
|
case UFS_UID_44BSD:
|
||||||
return fs32_to_cpu(sb, inode->ui_u3.ui_44.ui_gid);
|
return fs32_to_cpu(sb, inode->ui_u3.ui_44.ui_gid);
|
||||||
case UFS_UID_EFT:
|
case UFS_UID_EFT:
|
||||||
if (inode->ui_u1.oldids.ui_suid == 0xFFFF)
|
if (inode->ui_u1.oldids.ui_sgid == 0xFFFF)
|
||||||
return fs32_to_cpu(sb, inode->ui_u3.ui_sun.ui_gid);
|
return fs32_to_cpu(sb, inode->ui_u3.ui_sun.ui_gid);
|
||||||
/* Fall through */
|
/* Fall through */
|
||||||
default:
|
default:
|
||||||
|
@ -28,6 +28,7 @@ struct bpf_map_ops {
|
|||||||
void (*map_free)(struct bpf_map *map);
|
void (*map_free)(struct bpf_map *map);
|
||||||
int (*map_get_next_key)(struct bpf_map *map, void *key, void *next_key);
|
int (*map_get_next_key)(struct bpf_map *map, void *key, void *next_key);
|
||||||
void (*map_release_uref)(struct bpf_map *map);
|
void (*map_release_uref)(struct bpf_map *map);
|
||||||
|
void *(*map_lookup_elem_sys_only)(struct bpf_map *map, void *key);
|
||||||
|
|
||||||
/* funcs callable from userspace and from eBPF programs */
|
/* funcs callable from userspace and from eBPF programs */
|
||||||
void *(*map_lookup_elem)(struct bpf_map *map, void *key);
|
void *(*map_lookup_elem)(struct bpf_map *map, void *key);
|
||||||
|
@ -229,8 +229,8 @@ extern struct device_node *of_find_all_nodes(struct device_node *prev);
|
|||||||
static inline u64 of_read_number(const __be32 *cell, int size)
|
static inline u64 of_read_number(const __be32 *cell, int size)
|
||||||
{
|
{
|
||||||
u64 r = 0;
|
u64 r = 0;
|
||||||
while (size--)
|
for (; size--; cell++)
|
||||||
r = (r << 32) | be32_to_cpu(*(cell++));
|
r = (r << 32) | be32_to_cpu(*cell);
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -350,6 +350,8 @@ struct pci_dev {
|
|||||||
unsigned int hotplug_user_indicators:1; /* SlotCtl indicators
|
unsigned int hotplug_user_indicators:1; /* SlotCtl indicators
|
||||||
controlled exclusively by
|
controlled exclusively by
|
||||||
user sysfs */
|
user sysfs */
|
||||||
|
unsigned int clear_retrain_link:1; /* Need to clear Retrain Link
|
||||||
|
bit manually */
|
||||||
unsigned int d3_delay; /* D3->D0 transition time in ms */
|
unsigned int d3_delay; /* D3->D0 transition time in ms */
|
||||||
unsigned int d3cold_delay; /* D3cold->D0 transition time in ms */
|
unsigned int d3cold_delay; /* D3cold->D0 transition time in ms */
|
||||||
|
|
||||||
|
@ -1310,10 +1310,12 @@ static inline void skb_zcopy_clear(struct sk_buff *skb, bool zerocopy)
|
|||||||
struct ubuf_info *uarg = skb_zcopy(skb);
|
struct ubuf_info *uarg = skb_zcopy(skb);
|
||||||
|
|
||||||
if (uarg) {
|
if (uarg) {
|
||||||
if (uarg->callback == sock_zerocopy_callback) {
|
if (skb_zcopy_is_nouarg(skb)) {
|
||||||
|
/* no notification callback */
|
||||||
|
} else if (uarg->callback == sock_zerocopy_callback) {
|
||||||
uarg->zerocopy = uarg->zerocopy && zerocopy;
|
uarg->zerocopy = uarg->zerocopy && zerocopy;
|
||||||
sock_zerocopy_put(uarg);
|
sock_zerocopy_put(uarg);
|
||||||
} else if (!skb_zcopy_is_nouarg(skb)) {
|
} else {
|
||||||
uarg->callback(uarg, zerocopy);
|
uarg->callback(uarg, zerocopy);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2572,7 +2574,8 @@ static inline int skb_orphan_frags(struct sk_buff *skb, gfp_t gfp_mask)
|
|||||||
{
|
{
|
||||||
if (likely(!skb_zcopy(skb)))
|
if (likely(!skb_zcopy(skb)))
|
||||||
return 0;
|
return 0;
|
||||||
if (skb_uarg(skb)->callback == sock_zerocopy_callback)
|
if (!skb_zcopy_is_nouarg(skb) &&
|
||||||
|
skb_uarg(skb)->callback == sock_zerocopy_callback)
|
||||||
return 0;
|
return 0;
|
||||||
return skb_copy_ubufs(skb, gfp_mask);
|
return skb_copy_ubufs(skb, gfp_mask);
|
||||||
}
|
}
|
||||||
|
@ -499,18 +499,30 @@ static u32 htab_map_gen_lookup(struct bpf_map *map, struct bpf_insn *insn_buf)
|
|||||||
return insn - insn_buf;
|
return insn - insn_buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *htab_lru_map_lookup_elem(struct bpf_map *map, void *key)
|
static __always_inline void *__htab_lru_map_lookup_elem(struct bpf_map *map,
|
||||||
|
void *key, const bool mark)
|
||||||
{
|
{
|
||||||
struct htab_elem *l = __htab_map_lookup_elem(map, key);
|
struct htab_elem *l = __htab_map_lookup_elem(map, key);
|
||||||
|
|
||||||
if (l) {
|
if (l) {
|
||||||
bpf_lru_node_set_ref(&l->lru_node);
|
if (mark)
|
||||||
|
bpf_lru_node_set_ref(&l->lru_node);
|
||||||
return l->key + round_up(map->key_size, 8);
|
return l->key + round_up(map->key_size, 8);
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void *htab_lru_map_lookup_elem(struct bpf_map *map, void *key)
|
||||||
|
{
|
||||||
|
return __htab_lru_map_lookup_elem(map, key, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void *htab_lru_map_lookup_elem_sys(struct bpf_map *map, void *key)
|
||||||
|
{
|
||||||
|
return __htab_lru_map_lookup_elem(map, key, false);
|
||||||
|
}
|
||||||
|
|
||||||
static u32 htab_lru_map_gen_lookup(struct bpf_map *map,
|
static u32 htab_lru_map_gen_lookup(struct bpf_map *map,
|
||||||
struct bpf_insn *insn_buf)
|
struct bpf_insn *insn_buf)
|
||||||
{
|
{
|
||||||
@ -1161,6 +1173,7 @@ const struct bpf_map_ops htab_lru_map_ops = {
|
|||||||
.map_free = htab_map_free,
|
.map_free = htab_map_free,
|
||||||
.map_get_next_key = htab_map_get_next_key,
|
.map_get_next_key = htab_map_get_next_key,
|
||||||
.map_lookup_elem = htab_lru_map_lookup_elem,
|
.map_lookup_elem = htab_lru_map_lookup_elem,
|
||||||
|
.map_lookup_elem_sys_only = htab_lru_map_lookup_elem_sys,
|
||||||
.map_update_elem = htab_lru_map_update_elem,
|
.map_update_elem = htab_lru_map_update_elem,
|
||||||
.map_delete_elem = htab_lru_map_delete_elem,
|
.map_delete_elem = htab_lru_map_delete_elem,
|
||||||
.map_gen_lookup = htab_lru_map_gen_lookup,
|
.map_gen_lookup = htab_lru_map_gen_lookup,
|
||||||
@ -1191,7 +1204,6 @@ static void *htab_lru_percpu_map_lookup_elem(struct bpf_map *map, void *key)
|
|||||||
|
|
||||||
int bpf_percpu_hash_copy(struct bpf_map *map, void *key, void *value)
|
int bpf_percpu_hash_copy(struct bpf_map *map, void *key, void *value)
|
||||||
{
|
{
|
||||||
struct bpf_htab *htab = container_of(map, struct bpf_htab, map);
|
|
||||||
struct htab_elem *l;
|
struct htab_elem *l;
|
||||||
void __percpu *pptr;
|
void __percpu *pptr;
|
||||||
int ret = -ENOENT;
|
int ret = -ENOENT;
|
||||||
@ -1207,8 +1219,9 @@ int bpf_percpu_hash_copy(struct bpf_map *map, void *key, void *value)
|
|||||||
l = __htab_map_lookup_elem(map, key);
|
l = __htab_map_lookup_elem(map, key);
|
||||||
if (!l)
|
if (!l)
|
||||||
goto out;
|
goto out;
|
||||||
if (htab_is_lru(htab))
|
/* We do not mark LRU map element here in order to not mess up
|
||||||
bpf_lru_node_set_ref(&l->lru_node);
|
* eviction heuristics when user space does a map walk.
|
||||||
|
*/
|
||||||
pptr = htab_elem_get_ptr(l, map->key_size);
|
pptr = htab_elem_get_ptr(l, map->key_size);
|
||||||
for_each_possible_cpu(cpu) {
|
for_each_possible_cpu(cpu) {
|
||||||
bpf_long_memcpy(value + off,
|
bpf_long_memcpy(value + off,
|
||||||
|
@ -549,7 +549,10 @@ static int map_lookup_elem(union bpf_attr *attr)
|
|||||||
err = bpf_fd_htab_map_lookup_elem(map, key, value);
|
err = bpf_fd_htab_map_lookup_elem(map, key, value);
|
||||||
} else {
|
} else {
|
||||||
rcu_read_lock();
|
rcu_read_lock();
|
||||||
ptr = map->ops->map_lookup_elem(map, key);
|
if (map->ops->map_lookup_elem_sys_only)
|
||||||
|
ptr = map->ops->map_lookup_elem_sys_only(map, key);
|
||||||
|
else
|
||||||
|
ptr = map->ops->map_lookup_elem(map, key);
|
||||||
if (ptr)
|
if (ptr)
|
||||||
memcpy(value, ptr, value_size);
|
memcpy(value, ptr, value_size);
|
||||||
rcu_read_unlock();
|
rcu_read_unlock();
|
||||||
|
@ -675,6 +675,7 @@ out:
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
fail:
|
fail:
|
||||||
|
kobject_put(&tunables->attr_set.kobj);
|
||||||
policy->governor_data = NULL;
|
policy->governor_data = NULL;
|
||||||
sugov_tunables_free(tunables);
|
sugov_tunables_free(tunables);
|
||||||
|
|
||||||
|
@ -1319,9 +1319,6 @@ event_id_read(struct file *filp, char __user *ubuf, size_t cnt, loff_t *ppos)
|
|||||||
char buf[32];
|
char buf[32];
|
||||||
int len;
|
int len;
|
||||||
|
|
||||||
if (*ppos)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
if (unlikely(!id))
|
if (unlikely(!id))
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
|
11
lib/Makefile
11
lib/Makefile
@ -17,6 +17,17 @@ KCOV_INSTRUMENT_list_debug.o := n
|
|||||||
KCOV_INSTRUMENT_debugobjects.o := n
|
KCOV_INSTRUMENT_debugobjects.o := n
|
||||||
KCOV_INSTRUMENT_dynamic_debug.o := n
|
KCOV_INSTRUMENT_dynamic_debug.o := n
|
||||||
|
|
||||||
|
# Early boot use of cmdline, don't instrument it
|
||||||
|
ifdef CONFIG_AMD_MEM_ENCRYPT
|
||||||
|
KASAN_SANITIZE_string.o := n
|
||||||
|
|
||||||
|
ifdef CONFIG_FUNCTION_TRACER
|
||||||
|
CFLAGS_REMOVE_string.o = -pg
|
||||||
|
endif
|
||||||
|
|
||||||
|
CFLAGS_string.o := $(call cc-option, -fno-stack-protector)
|
||||||
|
endif
|
||||||
|
|
||||||
lib-y := ctype.o string.o vsprintf.o cmdline.o \
|
lib-y := ctype.o string.o vsprintf.o cmdline.o \
|
||||||
rbtree.o radix-tree.o dump_stack.o timerqueue.o\
|
rbtree.o radix-tree.o dump_stack.o timerqueue.o\
|
||||||
idr.o int_sqrt.o extable.o \
|
idr.o int_sqrt.o extable.o \
|
||||||
|
@ -7852,7 +7852,7 @@ static void netdev_wait_allrefs(struct net_device *dev)
|
|||||||
|
|
||||||
refcnt = netdev_refcnt_read(dev);
|
refcnt = netdev_refcnt_read(dev);
|
||||||
|
|
||||||
if (time_after(jiffies, warning_time + 10 * HZ)) {
|
if (refcnt && time_after(jiffies, warning_time + 10 * HZ)) {
|
||||||
pr_emerg("unregister_netdevice: waiting for %s to become free. Usage count = %d\n",
|
pr_emerg("unregister_netdevice: waiting for %s to become free. Usage count = %d\n",
|
||||||
dev->name, refcnt);
|
dev->name, refcnt);
|
||||||
warning_time = jiffies;
|
warning_time = jiffies;
|
||||||
|
@ -205,7 +205,7 @@ static void esp_output_fill_trailer(u8 *tail, int tfclen, int plen, __u8 proto)
|
|||||||
tail[plen - 1] = proto;
|
tail[plen - 1] = proto;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void esp_output_udp_encap(struct xfrm_state *x, struct sk_buff *skb, struct esp_info *esp)
|
static int esp_output_udp_encap(struct xfrm_state *x, struct sk_buff *skb, struct esp_info *esp)
|
||||||
{
|
{
|
||||||
int encap_type;
|
int encap_type;
|
||||||
struct udphdr *uh;
|
struct udphdr *uh;
|
||||||
@ -213,6 +213,7 @@ static void esp_output_udp_encap(struct xfrm_state *x, struct sk_buff *skb, stru
|
|||||||
__be16 sport, dport;
|
__be16 sport, dport;
|
||||||
struct xfrm_encap_tmpl *encap = x->encap;
|
struct xfrm_encap_tmpl *encap = x->encap;
|
||||||
struct ip_esp_hdr *esph = esp->esph;
|
struct ip_esp_hdr *esph = esp->esph;
|
||||||
|
unsigned int len;
|
||||||
|
|
||||||
spin_lock_bh(&x->lock);
|
spin_lock_bh(&x->lock);
|
||||||
sport = encap->encap_sport;
|
sport = encap->encap_sport;
|
||||||
@ -220,11 +221,14 @@ static void esp_output_udp_encap(struct xfrm_state *x, struct sk_buff *skb, stru
|
|||||||
encap_type = encap->encap_type;
|
encap_type = encap->encap_type;
|
||||||
spin_unlock_bh(&x->lock);
|
spin_unlock_bh(&x->lock);
|
||||||
|
|
||||||
|
len = skb->len + esp->tailen - skb_transport_offset(skb);
|
||||||
|
if (len + sizeof(struct iphdr) >= IP_MAX_MTU)
|
||||||
|
return -EMSGSIZE;
|
||||||
|
|
||||||
uh = (struct udphdr *)esph;
|
uh = (struct udphdr *)esph;
|
||||||
uh->source = sport;
|
uh->source = sport;
|
||||||
uh->dest = dport;
|
uh->dest = dport;
|
||||||
uh->len = htons(skb->len + esp->tailen
|
uh->len = htons(len);
|
||||||
- skb_transport_offset(skb));
|
|
||||||
uh->check = 0;
|
uh->check = 0;
|
||||||
|
|
||||||
switch (encap_type) {
|
switch (encap_type) {
|
||||||
@ -241,6 +245,8 @@ static void esp_output_udp_encap(struct xfrm_state *x, struct sk_buff *skb, stru
|
|||||||
|
|
||||||
*skb_mac_header(skb) = IPPROTO_UDP;
|
*skb_mac_header(skb) = IPPROTO_UDP;
|
||||||
esp->esph = esph;
|
esp->esph = esph;
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int esp_output_head(struct xfrm_state *x, struct sk_buff *skb, struct esp_info *esp)
|
int esp_output_head(struct xfrm_state *x, struct sk_buff *skb, struct esp_info *esp)
|
||||||
@ -254,8 +260,12 @@ int esp_output_head(struct xfrm_state *x, struct sk_buff *skb, struct esp_info *
|
|||||||
int tailen = esp->tailen;
|
int tailen = esp->tailen;
|
||||||
|
|
||||||
/* this is non-NULL only with UDP Encapsulation */
|
/* this is non-NULL only with UDP Encapsulation */
|
||||||
if (x->encap)
|
if (x->encap) {
|
||||||
esp_output_udp_encap(x, skb, esp);
|
int err = esp_output_udp_encap(x, skb, esp);
|
||||||
|
|
||||||
|
if (err < 0)
|
||||||
|
return err;
|
||||||
|
}
|
||||||
|
|
||||||
if (!skb_cloned(skb)) {
|
if (!skb_cloned(skb)) {
|
||||||
if (tailen <= skb_tailroom(skb)) {
|
if (tailen <= skb_tailroom(skb)) {
|
||||||
|
@ -663,9 +663,9 @@ static int __init vti_init(void)
|
|||||||
return err;
|
return err;
|
||||||
|
|
||||||
rtnl_link_failed:
|
rtnl_link_failed:
|
||||||
xfrm4_protocol_deregister(&vti_ipcomp4_protocol, IPPROTO_COMP);
|
|
||||||
xfrm_tunnel_failed:
|
|
||||||
xfrm4_tunnel_deregister(&ipip_handler, AF_INET);
|
xfrm4_tunnel_deregister(&ipip_handler, AF_INET);
|
||||||
|
xfrm_tunnel_failed:
|
||||||
|
xfrm4_protocol_deregister(&vti_ipcomp4_protocol, IPPROTO_COMP);
|
||||||
xfrm_proto_comp_failed:
|
xfrm_proto_comp_failed:
|
||||||
xfrm4_protocol_deregister(&vti_ah4_protocol, IPPROTO_AH);
|
xfrm4_protocol_deregister(&vti_ah4_protocol, IPPROTO_AH);
|
||||||
xfrm_proto_ah_failed:
|
xfrm_proto_ah_failed:
|
||||||
@ -680,6 +680,7 @@ pernet_dev_failed:
|
|||||||
static void __exit vti_fini(void)
|
static void __exit vti_fini(void)
|
||||||
{
|
{
|
||||||
rtnl_link_unregister(&vti_link_ops);
|
rtnl_link_unregister(&vti_link_ops);
|
||||||
|
xfrm4_tunnel_deregister(&ipip_handler, AF_INET);
|
||||||
xfrm4_protocol_deregister(&vti_ipcomp4_protocol, IPPROTO_COMP);
|
xfrm4_protocol_deregister(&vti_ipcomp4_protocol, IPPROTO_COMP);
|
||||||
xfrm4_protocol_deregister(&vti_ah4_protocol, IPPROTO_AH);
|
xfrm4_protocol_deregister(&vti_ah4_protocol, IPPROTO_AH);
|
||||||
xfrm4_protocol_deregister(&vti_esp4_protocol, IPPROTO_ESP);
|
xfrm4_protocol_deregister(&vti_esp4_protocol, IPPROTO_ESP);
|
||||||
|
@ -111,7 +111,8 @@ static void
|
|||||||
_decode_session4(struct sk_buff *skb, struct flowi *fl, int reverse)
|
_decode_session4(struct sk_buff *skb, struct flowi *fl, int reverse)
|
||||||
{
|
{
|
||||||
const struct iphdr *iph = ip_hdr(skb);
|
const struct iphdr *iph = ip_hdr(skb);
|
||||||
u8 *xprth = skb_network_header(skb) + iph->ihl * 4;
|
int ihl = iph->ihl;
|
||||||
|
u8 *xprth = skb_network_header(skb) + ihl * 4;
|
||||||
struct flowi4 *fl4 = &fl->u.ip4;
|
struct flowi4 *fl4 = &fl->u.ip4;
|
||||||
int oif = 0;
|
int oif = 0;
|
||||||
|
|
||||||
@ -122,6 +123,11 @@ _decode_session4(struct sk_buff *skb, struct flowi *fl, int reverse)
|
|||||||
fl4->flowi4_mark = skb->mark;
|
fl4->flowi4_mark = skb->mark;
|
||||||
fl4->flowi4_oif = reverse ? skb->skb_iif : oif;
|
fl4->flowi4_oif = reverse ? skb->skb_iif : oif;
|
||||||
|
|
||||||
|
fl4->flowi4_proto = iph->protocol;
|
||||||
|
fl4->daddr = reverse ? iph->saddr : iph->daddr;
|
||||||
|
fl4->saddr = reverse ? iph->daddr : iph->saddr;
|
||||||
|
fl4->flowi4_tos = iph->tos;
|
||||||
|
|
||||||
if (!ip_is_fragment(iph)) {
|
if (!ip_is_fragment(iph)) {
|
||||||
switch (iph->protocol) {
|
switch (iph->protocol) {
|
||||||
case IPPROTO_UDP:
|
case IPPROTO_UDP:
|
||||||
@ -133,7 +139,7 @@ _decode_session4(struct sk_buff *skb, struct flowi *fl, int reverse)
|
|||||||
pskb_may_pull(skb, xprth + 4 - skb->data)) {
|
pskb_may_pull(skb, xprth + 4 - skb->data)) {
|
||||||
__be16 *ports;
|
__be16 *ports;
|
||||||
|
|
||||||
xprth = skb_network_header(skb) + iph->ihl * 4;
|
xprth = skb_network_header(skb) + ihl * 4;
|
||||||
ports = (__be16 *)xprth;
|
ports = (__be16 *)xprth;
|
||||||
|
|
||||||
fl4->fl4_sport = ports[!!reverse];
|
fl4->fl4_sport = ports[!!reverse];
|
||||||
@ -146,7 +152,7 @@ _decode_session4(struct sk_buff *skb, struct flowi *fl, int reverse)
|
|||||||
pskb_may_pull(skb, xprth + 2 - skb->data)) {
|
pskb_may_pull(skb, xprth + 2 - skb->data)) {
|
||||||
u8 *icmp;
|
u8 *icmp;
|
||||||
|
|
||||||
xprth = skb_network_header(skb) + iph->ihl * 4;
|
xprth = skb_network_header(skb) + ihl * 4;
|
||||||
icmp = xprth;
|
icmp = xprth;
|
||||||
|
|
||||||
fl4->fl4_icmp_type = icmp[0];
|
fl4->fl4_icmp_type = icmp[0];
|
||||||
@ -159,7 +165,7 @@ _decode_session4(struct sk_buff *skb, struct flowi *fl, int reverse)
|
|||||||
pskb_may_pull(skb, xprth + 4 - skb->data)) {
|
pskb_may_pull(skb, xprth + 4 - skb->data)) {
|
||||||
__be32 *ehdr;
|
__be32 *ehdr;
|
||||||
|
|
||||||
xprth = skb_network_header(skb) + iph->ihl * 4;
|
xprth = skb_network_header(skb) + ihl * 4;
|
||||||
ehdr = (__be32 *)xprth;
|
ehdr = (__be32 *)xprth;
|
||||||
|
|
||||||
fl4->fl4_ipsec_spi = ehdr[0];
|
fl4->fl4_ipsec_spi = ehdr[0];
|
||||||
@ -171,7 +177,7 @@ _decode_session4(struct sk_buff *skb, struct flowi *fl, int reverse)
|
|||||||
pskb_may_pull(skb, xprth + 8 - skb->data)) {
|
pskb_may_pull(skb, xprth + 8 - skb->data)) {
|
||||||
__be32 *ah_hdr;
|
__be32 *ah_hdr;
|
||||||
|
|
||||||
xprth = skb_network_header(skb) + iph->ihl * 4;
|
xprth = skb_network_header(skb) + ihl * 4;
|
||||||
ah_hdr = (__be32 *)xprth;
|
ah_hdr = (__be32 *)xprth;
|
||||||
|
|
||||||
fl4->fl4_ipsec_spi = ah_hdr[1];
|
fl4->fl4_ipsec_spi = ah_hdr[1];
|
||||||
@ -183,7 +189,7 @@ _decode_session4(struct sk_buff *skb, struct flowi *fl, int reverse)
|
|||||||
pskb_may_pull(skb, xprth + 4 - skb->data)) {
|
pskb_may_pull(skb, xprth + 4 - skb->data)) {
|
||||||
__be16 *ipcomp_hdr;
|
__be16 *ipcomp_hdr;
|
||||||
|
|
||||||
xprth = skb_network_header(skb) + iph->ihl * 4;
|
xprth = skb_network_header(skb) + ihl * 4;
|
||||||
ipcomp_hdr = (__be16 *)xprth;
|
ipcomp_hdr = (__be16 *)xprth;
|
||||||
|
|
||||||
fl4->fl4_ipsec_spi = htonl(ntohs(ipcomp_hdr[1]));
|
fl4->fl4_ipsec_spi = htonl(ntohs(ipcomp_hdr[1]));
|
||||||
@ -196,7 +202,7 @@ _decode_session4(struct sk_buff *skb, struct flowi *fl, int reverse)
|
|||||||
__be16 *greflags;
|
__be16 *greflags;
|
||||||
__be32 *gre_hdr;
|
__be32 *gre_hdr;
|
||||||
|
|
||||||
xprth = skb_network_header(skb) + iph->ihl * 4;
|
xprth = skb_network_header(skb) + ihl * 4;
|
||||||
greflags = (__be16 *)xprth;
|
greflags = (__be16 *)xprth;
|
||||||
gre_hdr = (__be32 *)xprth;
|
gre_hdr = (__be32 *)xprth;
|
||||||
|
|
||||||
@ -213,10 +219,6 @@ _decode_session4(struct sk_buff *skb, struct flowi *fl, int reverse)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fl4->flowi4_proto = iph->protocol;
|
|
||||||
fl4->daddr = reverse ? iph->saddr : iph->daddr;
|
|
||||||
fl4->saddr = reverse ? iph->daddr : iph->saddr;
|
|
||||||
fl4->flowi4_tos = iph->tos;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void xfrm4_update_pmtu(struct dst_entry *dst, struct sock *sk,
|
static void xfrm4_update_pmtu(struct dst_entry *dst, struct sock *sk,
|
||||||
|
@ -391,6 +391,10 @@ static void __exit xfrm6_tunnel_fini(void)
|
|||||||
xfrm6_tunnel_deregister(&xfrm6_tunnel_handler, AF_INET6);
|
xfrm6_tunnel_deregister(&xfrm6_tunnel_handler, AF_INET6);
|
||||||
xfrm_unregister_type(&xfrm6_tunnel_type, AF_INET6);
|
xfrm_unregister_type(&xfrm6_tunnel_type, AF_INET6);
|
||||||
unregister_pernet_subsys(&xfrm6_tunnel_net_ops);
|
unregister_pernet_subsys(&xfrm6_tunnel_net_ops);
|
||||||
|
/* Someone maybe has gotten the xfrm6_tunnel_spi.
|
||||||
|
* So need to wait it.
|
||||||
|
*/
|
||||||
|
rcu_barrier();
|
||||||
kmem_cache_destroy(xfrm6_tunnel_spi_kmem);
|
kmem_cache_destroy(xfrm6_tunnel_spi_kmem);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1924,6 +1924,9 @@ void ieee80211_if_remove(struct ieee80211_sub_if_data *sdata)
|
|||||||
list_del_rcu(&sdata->list);
|
list_del_rcu(&sdata->list);
|
||||||
mutex_unlock(&sdata->local->iflist_mtx);
|
mutex_unlock(&sdata->local->iflist_mtx);
|
||||||
|
|
||||||
|
if (sdata->vif.txq)
|
||||||
|
ieee80211_txq_purge(sdata->local, to_txq_info(sdata->vif.txq));
|
||||||
|
|
||||||
synchronize_rcu();
|
synchronize_rcu();
|
||||||
|
|
||||||
if (sdata->dev) {
|
if (sdata->dev) {
|
||||||
|
@ -62,6 +62,10 @@ static int __net_init tipc_init_net(struct net *net)
|
|||||||
INIT_LIST_HEAD(&tn->node_list);
|
INIT_LIST_HEAD(&tn->node_list);
|
||||||
spin_lock_init(&tn->node_list_lock);
|
spin_lock_init(&tn->node_list_lock);
|
||||||
|
|
||||||
|
err = tipc_socket_init();
|
||||||
|
if (err)
|
||||||
|
goto out_socket;
|
||||||
|
|
||||||
err = tipc_sk_rht_init(net);
|
err = tipc_sk_rht_init(net);
|
||||||
if (err)
|
if (err)
|
||||||
goto out_sk_rht;
|
goto out_sk_rht;
|
||||||
@ -88,6 +92,8 @@ out_subscr:
|
|||||||
out_nametbl:
|
out_nametbl:
|
||||||
tipc_sk_rht_destroy(net);
|
tipc_sk_rht_destroy(net);
|
||||||
out_sk_rht:
|
out_sk_rht:
|
||||||
|
tipc_socket_stop();
|
||||||
|
out_socket:
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -98,6 +104,7 @@ static void __net_exit tipc_exit_net(struct net *net)
|
|||||||
tipc_bcast_stop(net);
|
tipc_bcast_stop(net);
|
||||||
tipc_nametbl_stop(net);
|
tipc_nametbl_stop(net);
|
||||||
tipc_sk_rht_destroy(net);
|
tipc_sk_rht_destroy(net);
|
||||||
|
tipc_socket_stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct pernet_operations tipc_net_ops = {
|
static struct pernet_operations tipc_net_ops = {
|
||||||
@ -125,10 +132,6 @@ static int __init tipc_init(void)
|
|||||||
if (err)
|
if (err)
|
||||||
goto out_netlink_compat;
|
goto out_netlink_compat;
|
||||||
|
|
||||||
err = tipc_socket_init();
|
|
||||||
if (err)
|
|
||||||
goto out_socket;
|
|
||||||
|
|
||||||
err = tipc_register_sysctl();
|
err = tipc_register_sysctl();
|
||||||
if (err)
|
if (err)
|
||||||
goto out_sysctl;
|
goto out_sysctl;
|
||||||
@ -148,8 +151,6 @@ out_bearer:
|
|||||||
out_pernet:
|
out_pernet:
|
||||||
tipc_unregister_sysctl();
|
tipc_unregister_sysctl();
|
||||||
out_sysctl:
|
out_sysctl:
|
||||||
tipc_socket_stop();
|
|
||||||
out_socket:
|
|
||||||
tipc_netlink_compat_stop();
|
tipc_netlink_compat_stop();
|
||||||
out_netlink_compat:
|
out_netlink_compat:
|
||||||
tipc_netlink_stop();
|
tipc_netlink_stop();
|
||||||
@ -164,7 +165,6 @@ static void __exit tipc_exit(void)
|
|||||||
unregister_pernet_subsys(&tipc_net_ops);
|
unregister_pernet_subsys(&tipc_net_ops);
|
||||||
tipc_netlink_stop();
|
tipc_netlink_stop();
|
||||||
tipc_netlink_compat_stop();
|
tipc_netlink_compat_stop();
|
||||||
tipc_socket_stop();
|
|
||||||
tipc_unregister_sysctl();
|
tipc_unregister_sysctl();
|
||||||
|
|
||||||
pr_info("Deactivated\n");
|
pr_info("Deactivated\n");
|
||||||
|
@ -702,28 +702,27 @@ static int __init virtio_vsock_init(void)
|
|||||||
if (!virtio_vsock_workqueue)
|
if (!virtio_vsock_workqueue)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
ret = register_virtio_driver(&virtio_vsock_driver);
|
ret = vsock_core_init(&virtio_transport.transport);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto out_wq;
|
goto out_wq;
|
||||||
|
|
||||||
ret = vsock_core_init(&virtio_transport.transport);
|
ret = register_virtio_driver(&virtio_vsock_driver);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto out_vdr;
|
goto out_vci;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
out_vdr:
|
out_vci:
|
||||||
unregister_virtio_driver(&virtio_vsock_driver);
|
vsock_core_exit();
|
||||||
out_wq:
|
out_wq:
|
||||||
destroy_workqueue(virtio_vsock_workqueue);
|
destroy_workqueue(virtio_vsock_workqueue);
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void __exit virtio_vsock_exit(void)
|
static void __exit virtio_vsock_exit(void)
|
||||||
{
|
{
|
||||||
vsock_core_exit();
|
|
||||||
unregister_virtio_driver(&virtio_vsock_driver);
|
unregister_virtio_driver(&virtio_vsock_driver);
|
||||||
|
vsock_core_exit();
|
||||||
destroy_workqueue(virtio_vsock_workqueue);
|
destroy_workqueue(virtio_vsock_workqueue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -786,12 +786,19 @@ static bool virtio_transport_close(struct vsock_sock *vsk)
|
|||||||
|
|
||||||
void virtio_transport_release(struct vsock_sock *vsk)
|
void virtio_transport_release(struct vsock_sock *vsk)
|
||||||
{
|
{
|
||||||
|
struct virtio_vsock_sock *vvs = vsk->trans;
|
||||||
|
struct virtio_vsock_pkt *pkt, *tmp;
|
||||||
struct sock *sk = &vsk->sk;
|
struct sock *sk = &vsk->sk;
|
||||||
bool remove_sock = true;
|
bool remove_sock = true;
|
||||||
|
|
||||||
lock_sock(sk);
|
lock_sock(sk);
|
||||||
if (sk->sk_type == SOCK_STREAM)
|
if (sk->sk_type == SOCK_STREAM)
|
||||||
remove_sock = virtio_transport_close(vsk);
|
remove_sock = virtio_transport_close(vsk);
|
||||||
|
|
||||||
|
list_for_each_entry_safe(pkt, tmp, &vvs->rx_queue, list) {
|
||||||
|
list_del(&pkt->list);
|
||||||
|
virtio_transport_free_pkt(pkt);
|
||||||
|
}
|
||||||
release_sock(sk);
|
release_sock(sk);
|
||||||
|
|
||||||
if (remove_sock)
|
if (remove_sock)
|
||||||
|
@ -1418,7 +1418,7 @@ static int verify_newpolicy_info(struct xfrm_userpolicy_info *p)
|
|||||||
ret = verify_policy_dir(p->dir);
|
ret = verify_policy_dir(p->dir);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
if (p->index && ((p->index & XFRM_POLICY_MAX) != p->dir))
|
if (p->index && (xfrm_policy_id2dir(p->index) != p->dir))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -126,17 +126,22 @@ static int aafs_show_path(struct seq_file *seq, struct dentry *dentry)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void aafs_evict_inode(struct inode *inode)
|
static void aafs_i_callback(struct rcu_head *head)
|
||||||
{
|
{
|
||||||
truncate_inode_pages_final(&inode->i_data);
|
struct inode *inode = container_of(head, struct inode, i_rcu);
|
||||||
clear_inode(inode);
|
|
||||||
if (S_ISLNK(inode->i_mode))
|
if (S_ISLNK(inode->i_mode))
|
||||||
kfree(inode->i_link);
|
kfree(inode->i_link);
|
||||||
|
free_inode_nonrcu(inode);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void aafs_destroy_inode(struct inode *inode)
|
||||||
|
{
|
||||||
|
call_rcu(&inode->i_rcu, aafs_i_callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct super_operations aafs_super_ops = {
|
static const struct super_operations aafs_super_ops = {
|
||||||
.statfs = simple_statfs,
|
.statfs = simple_statfs,
|
||||||
.evict_inode = aafs_evict_inode,
|
.destroy_inode = aafs_destroy_inode,
|
||||||
.show_path = aafs_show_path,
|
.show_path = aafs_show_path,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -26,17 +26,22 @@
|
|||||||
static struct vfsmount *mount;
|
static struct vfsmount *mount;
|
||||||
static int mount_count;
|
static int mount_count;
|
||||||
|
|
||||||
static void securityfs_evict_inode(struct inode *inode)
|
static void securityfs_i_callback(struct rcu_head *head)
|
||||||
{
|
{
|
||||||
truncate_inode_pages_final(&inode->i_data);
|
struct inode *inode = container_of(head, struct inode, i_rcu);
|
||||||
clear_inode(inode);
|
|
||||||
if (S_ISLNK(inode->i_mode))
|
if (S_ISLNK(inode->i_mode))
|
||||||
kfree(inode->i_link);
|
kfree(inode->i_link);
|
||||||
|
free_inode_nonrcu(inode);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void securityfs_destroy_inode(struct inode *inode)
|
||||||
|
{
|
||||||
|
call_rcu(&inode->i_rcu, securityfs_i_callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct super_operations securityfs_super_operations = {
|
static const struct super_operations securityfs_super_operations = {
|
||||||
.statfs = simple_statfs,
|
.statfs = simple_statfs,
|
||||||
.evict_inode = securityfs_evict_inode,
|
.destroy_inode = securityfs_destroy_inode,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int fill_super(struct super_block *sb, void *data, int silent)
|
static int fill_super(struct super_block *sb, void *data, int silent)
|
||||||
|
@ -7,11 +7,12 @@ ARCH := x86
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
# always use the host compiler
|
# always use the host compiler
|
||||||
|
HOSTAR ?= ar
|
||||||
HOSTCC ?= gcc
|
HOSTCC ?= gcc
|
||||||
HOSTLD ?= ld
|
HOSTLD ?= ld
|
||||||
|
AR = $(HOSTAR)
|
||||||
CC = $(HOSTCC)
|
CC = $(HOSTCC)
|
||||||
LD = $(HOSTLD)
|
LD = $(HOSTLD)
|
||||||
AR = ar
|
|
||||||
|
|
||||||
ifeq ($(srctree),)
|
ifeq ($(srctree),)
|
||||||
srctree := $(patsubst %/,%,$(dir $(CURDIR)))
|
srctree := $(patsubst %/,%,$(dir $(CURDIR)))
|
||||||
|
@ -38,6 +38,10 @@
|
|||||||
#include <numa.h>
|
#include <numa.h>
|
||||||
#include <numaif.h>
|
#include <numaif.h>
|
||||||
|
|
||||||
|
#ifndef RUSAGE_THREAD
|
||||||
|
# define RUSAGE_THREAD 1
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Regular printout to the terminal, supressed if -q is specified:
|
* Regular printout to the terminal, supressed if -q is specified:
|
||||||
*/
|
*/
|
||||||
|
@ -58,6 +58,7 @@ enum intel_pt_pkt_state {
|
|||||||
INTEL_PT_STATE_NO_IP,
|
INTEL_PT_STATE_NO_IP,
|
||||||
INTEL_PT_STATE_ERR_RESYNC,
|
INTEL_PT_STATE_ERR_RESYNC,
|
||||||
INTEL_PT_STATE_IN_SYNC,
|
INTEL_PT_STATE_IN_SYNC,
|
||||||
|
INTEL_PT_STATE_TNT_CONT,
|
||||||
INTEL_PT_STATE_TNT,
|
INTEL_PT_STATE_TNT,
|
||||||
INTEL_PT_STATE_TIP,
|
INTEL_PT_STATE_TIP,
|
||||||
INTEL_PT_STATE_TIP_PGD,
|
INTEL_PT_STATE_TIP_PGD,
|
||||||
@ -72,8 +73,9 @@ static inline bool intel_pt_sample_time(enum intel_pt_pkt_state pkt_state)
|
|||||||
case INTEL_PT_STATE_NO_IP:
|
case INTEL_PT_STATE_NO_IP:
|
||||||
case INTEL_PT_STATE_ERR_RESYNC:
|
case INTEL_PT_STATE_ERR_RESYNC:
|
||||||
case INTEL_PT_STATE_IN_SYNC:
|
case INTEL_PT_STATE_IN_SYNC:
|
||||||
case INTEL_PT_STATE_TNT:
|
case INTEL_PT_STATE_TNT_CONT:
|
||||||
return true;
|
return true;
|
||||||
|
case INTEL_PT_STATE_TNT:
|
||||||
case INTEL_PT_STATE_TIP:
|
case INTEL_PT_STATE_TIP:
|
||||||
case INTEL_PT_STATE_TIP_PGD:
|
case INTEL_PT_STATE_TIP_PGD:
|
||||||
case INTEL_PT_STATE_FUP:
|
case INTEL_PT_STATE_FUP:
|
||||||
@ -888,16 +890,20 @@ static uint64_t intel_pt_next_period(struct intel_pt_decoder *decoder)
|
|||||||
timestamp = decoder->timestamp + decoder->timestamp_insn_cnt;
|
timestamp = decoder->timestamp + decoder->timestamp_insn_cnt;
|
||||||
masked_timestamp = timestamp & decoder->period_mask;
|
masked_timestamp = timestamp & decoder->period_mask;
|
||||||
if (decoder->continuous_period) {
|
if (decoder->continuous_period) {
|
||||||
if (masked_timestamp != decoder->last_masked_timestamp)
|
if (masked_timestamp > decoder->last_masked_timestamp)
|
||||||
return 1;
|
return 1;
|
||||||
} else {
|
} else {
|
||||||
timestamp += 1;
|
timestamp += 1;
|
||||||
masked_timestamp = timestamp & decoder->period_mask;
|
masked_timestamp = timestamp & decoder->period_mask;
|
||||||
if (masked_timestamp != decoder->last_masked_timestamp) {
|
if (masked_timestamp > decoder->last_masked_timestamp) {
|
||||||
decoder->last_masked_timestamp = masked_timestamp;
|
decoder->last_masked_timestamp = masked_timestamp;
|
||||||
decoder->continuous_period = true;
|
decoder->continuous_period = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (masked_timestamp < decoder->last_masked_timestamp)
|
||||||
|
return decoder->period_ticks;
|
||||||
|
|
||||||
return decoder->period_ticks - (timestamp - masked_timestamp);
|
return decoder->period_ticks - (timestamp - masked_timestamp);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -926,7 +932,10 @@ static void intel_pt_sample_insn(struct intel_pt_decoder *decoder)
|
|||||||
case INTEL_PT_PERIOD_TICKS:
|
case INTEL_PT_PERIOD_TICKS:
|
||||||
timestamp = decoder->timestamp + decoder->timestamp_insn_cnt;
|
timestamp = decoder->timestamp + decoder->timestamp_insn_cnt;
|
||||||
masked_timestamp = timestamp & decoder->period_mask;
|
masked_timestamp = timestamp & decoder->period_mask;
|
||||||
decoder->last_masked_timestamp = masked_timestamp;
|
if (masked_timestamp > decoder->last_masked_timestamp)
|
||||||
|
decoder->last_masked_timestamp = masked_timestamp;
|
||||||
|
else
|
||||||
|
decoder->last_masked_timestamp += decoder->period_ticks;
|
||||||
break;
|
break;
|
||||||
case INTEL_PT_PERIOD_NONE:
|
case INTEL_PT_PERIOD_NONE:
|
||||||
case INTEL_PT_PERIOD_MTC:
|
case INTEL_PT_PERIOD_MTC:
|
||||||
@ -1249,7 +1258,9 @@ static int intel_pt_walk_tnt(struct intel_pt_decoder *decoder)
|
|||||||
return -ENOENT;
|
return -ENOENT;
|
||||||
}
|
}
|
||||||
decoder->tnt.count -= 1;
|
decoder->tnt.count -= 1;
|
||||||
if (!decoder->tnt.count)
|
if (decoder->tnt.count)
|
||||||
|
decoder->pkt_state = INTEL_PT_STATE_TNT_CONT;
|
||||||
|
else
|
||||||
decoder->pkt_state = INTEL_PT_STATE_IN_SYNC;
|
decoder->pkt_state = INTEL_PT_STATE_IN_SYNC;
|
||||||
decoder->tnt.payload <<= 1;
|
decoder->tnt.payload <<= 1;
|
||||||
decoder->state.from_ip = decoder->ip;
|
decoder->state.from_ip = decoder->ip;
|
||||||
@ -1280,7 +1291,9 @@ static int intel_pt_walk_tnt(struct intel_pt_decoder *decoder)
|
|||||||
|
|
||||||
if (intel_pt_insn.branch == INTEL_PT_BR_CONDITIONAL) {
|
if (intel_pt_insn.branch == INTEL_PT_BR_CONDITIONAL) {
|
||||||
decoder->tnt.count -= 1;
|
decoder->tnt.count -= 1;
|
||||||
if (!decoder->tnt.count)
|
if (decoder->tnt.count)
|
||||||
|
decoder->pkt_state = INTEL_PT_STATE_TNT_CONT;
|
||||||
|
else
|
||||||
decoder->pkt_state = INTEL_PT_STATE_IN_SYNC;
|
decoder->pkt_state = INTEL_PT_STATE_IN_SYNC;
|
||||||
if (decoder->tnt.payload & BIT63) {
|
if (decoder->tnt.payload & BIT63) {
|
||||||
decoder->tnt.payload <<= 1;
|
decoder->tnt.payload <<= 1;
|
||||||
@ -1300,8 +1313,11 @@ static int intel_pt_walk_tnt(struct intel_pt_decoder *decoder)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
decoder->ip += intel_pt_insn.length;
|
decoder->ip += intel_pt_insn.length;
|
||||||
if (!decoder->tnt.count)
|
if (!decoder->tnt.count) {
|
||||||
|
decoder->sample_timestamp = decoder->timestamp;
|
||||||
|
decoder->sample_insn_cnt = decoder->timestamp_insn_cnt;
|
||||||
return -EAGAIN;
|
return -EAGAIN;
|
||||||
|
}
|
||||||
decoder->tnt.payload <<= 1;
|
decoder->tnt.payload <<= 1;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -2349,6 +2365,7 @@ const struct intel_pt_state *intel_pt_decode(struct intel_pt_decoder *decoder)
|
|||||||
err = intel_pt_walk_trace(decoder);
|
err = intel_pt_walk_trace(decoder);
|
||||||
break;
|
break;
|
||||||
case INTEL_PT_STATE_TNT:
|
case INTEL_PT_STATE_TNT:
|
||||||
|
case INTEL_PT_STATE_TNT_CONT:
|
||||||
err = intel_pt_walk_tnt(decoder);
|
err = intel_pt_walk_tnt(decoder);
|
||||||
if (err == -EAGAIN)
|
if (err == -EAGAIN)
|
||||||
err = intel_pt_walk_trace(decoder);
|
err = intel_pt_walk_trace(decoder);
|
||||||
|
@ -856,7 +856,7 @@ int kvm_vm_ioctl_irq_line(struct kvm *kvm, struct kvm_irq_level *irq_level,
|
|||||||
static int kvm_vcpu_set_target(struct kvm_vcpu *vcpu,
|
static int kvm_vcpu_set_target(struct kvm_vcpu *vcpu,
|
||||||
const struct kvm_vcpu_init *init)
|
const struct kvm_vcpu_init *init)
|
||||||
{
|
{
|
||||||
unsigned int i;
|
unsigned int i, ret;
|
||||||
int phys_target = kvm_target_cpu();
|
int phys_target = kvm_target_cpu();
|
||||||
|
|
||||||
if (init->target != phys_target)
|
if (init->target != phys_target)
|
||||||
@ -891,9 +891,14 @@ static int kvm_vcpu_set_target(struct kvm_vcpu *vcpu,
|
|||||||
vcpu->arch.target = phys_target;
|
vcpu->arch.target = phys_target;
|
||||||
|
|
||||||
/* Now we know what it is, we can reset it. */
|
/* Now we know what it is, we can reset it. */
|
||||||
return kvm_reset_vcpu(vcpu);
|
ret = kvm_reset_vcpu(vcpu);
|
||||||
}
|
if (ret) {
|
||||||
|
vcpu->arch.target = -1;
|
||||||
|
bitmap_zero(vcpu->arch.features, KVM_VCPU_MAX_FEATURES);
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
static int kvm_arch_vcpu_ioctl_vcpu_init(struct kvm_vcpu *vcpu,
|
static int kvm_arch_vcpu_ioctl_vcpu_init(struct kvm_vcpu *vcpu,
|
||||||
struct kvm_vcpu_init *init)
|
struct kvm_vcpu_init *init)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user