Merge android-4.19-stable.152 (13abe23) into msm-4.19
* refs/heads/tmp-13abe23: Linux 4.19.152 crypto: qat - check cipher length for aead AES-CBC-HMAC-SHA crypto: bcm - Verify GCM/CCM key length in setkey drivers/net/ethernet/marvell/mvmdio.c: Fix non OF case reiserfs: Fix oops during mount reiserfs: Initialize inode keys properly USB: serial: ftdi_sio: add support for FreeCalypso JTAG+UART adapters USB: serial: pl2303: add device-id for HP GC device staging: comedi: check validity of wMaxPacketSize of usb endpoints found USB: serial: option: Add Telit FT980-KS composition USB: serial: option: add Cellient MPL200 card media: usbtv: Fix refcounting mixup Bluetooth: Disconnect if E0 is used for Level 4 Bluetooth: Fix update of connection state in `hci_encrypt_cfm` Bluetooth: Consolidate encryption handling in hci_encrypt_cfm Bluetooth: MGMT: Fix not checking if BT_HS is enabled Bluetooth: L2CAP: Fix calling sk_filter on non-socket based channel Bluetooth: A2MP: Fix not initializing all members ARM: 8867/1: vdso: pass --be8 to linker if necessary ARM: 8939/1: kbuild: use correct nm executable ARM: 8858/1: vdso: use $(LD) instead of $(CC) to link VDSO perf cs-etm: Move definition of 'traceid_list' global variable from header file FROMLIST: arm64: vdso32: Allow ld.lld to properly link the VDSO Linux 4.19.151 net: usb: rtl8150: set random MAC address when set_ethernet_addr() fails mm: khugepaged: recalculate min_free_kbytes after memory hotplug as expected by khugepaged mmc: core: don't set limits.discard_granularity as 0 perf: Fix task_function_call() error handling rxrpc: Fix server keyring leak rxrpc: Fix some missing _bh annotations on locking conn->state_lock rxrpc: Downgrade the BUG() for unsupported token type in rxrpc_read() rxrpc: Fix rxkad token xdr encoding net/mlx5e: Fix VLAN create flow net/mlx5e: Fix VLAN cleanup flow net: usb: ax88179_178a: fix missing stop entry in driver_info mdio: fix mdio-thunder.c dependency & build error bonding: set dev->needed_headroom in bond_setup_by_slave() xfrm: Use correct address family in xfrm_state_find platform/x86: fix kconfig dependency warning for FUJITSU_LAPTOP net: stmmac: removed enabling eee in EEE set callback xfrm: clone whole liftime_cur structure in xfrm_do_migrate xfrm: clone XFRMA_SEC_CTX in xfrm_do_migrate xfrm: clone XFRMA_REPLAY_ESN_VAL in xfrm_do_migrate xfrm: clone XFRMA_SET_MARK in xfrm_do_migrate drm/amdgpu: prevent double kfree ttm->sg openvswitch: handle DNAT tuple collision net: team: fix memory leak in __team_options_register team: set dev->needed_headroom in team_setup_by_port() sctp: fix sctp_auth_init_hmacs() error path i2c: owl: Clear NACK and BUS error bits i2c: meson: fixup rate calculation with filter delay i2c: meson: fix clock setting overwrite cifs: Fix incomplete memory allocation on setxattr path xfrmi: drop ignore_df check before updating pmtu mm/khugepaged: fix filemap page_to_pgoff(page) != offset macsec: avoid use-after-free in macsec_handle_frame() nvme-core: put ctrl ref when module ref get fail arm64: dts: stratix10: add status to qspi dts node mtd: rawnand: sunxi: Fix the probe error path i2c: i801: Exclude device from suspend direct complete optimization perf top: Fix stdio interface input handling with glibc 2.28+ driver core: Fix probe_count imbalance in really_probe() platform/x86: thinkpad_acpi: re-initialize ACPI buffer size when reuse platform/x86: intel-vbtn: Switch to an allow-list for SW_TABLET_MODE reporting platform/x86: thinkpad_acpi: initialize tp_nvram_state variable platform/x86: intel-vbtn: Fix SW_TABLET_MODE always reporting 1 on the HP Pavilion 11 x360 usermodehelper: reset umask to default before executing user process drm/nouveau/mem: guard against NULL pointer access in mem_del net: wireless: nl80211: fix out-of-bounds access in nl80211_del_key() Revert "ravb: Fixed to be able to unload modules" fbcon: Fix global-out-of-bounds read in fbcon_get_font() Fonts: Support FONT_EXTRA_WORDS macros for built-in fonts fbdev, newport_con: Move FONT_EXTRA_WORDS macros into linux/font.h Linux 4.19.150 netfilter: ctnetlink: add a range check for l3/l4 protonum ep_create_wakeup_source(): dentry name can change under you... epoll: EPOLL_CTL_ADD: close the race in decision to take fast path epoll: replace ->visited/visited_list with generation count epoll: do not insert into poll queues until all sanity checks are done net/packet: fix overflow in tpacket_rcv mm: don't rely on system state to detect hot-plug operations mm: replace memmap_context by meminit_context random32: Restore __latent_entropy attribute on net_rand_state Input: trackpoint - enable Synaptics trackpoints i2c: cpm: Fix i2c_ram structure iommu/exynos: add missing put_device() call in exynos_iommu_of_xlate() clk: samsung: exynos4: mark 'chipid' clock as CLK_IGNORE_UNUSED nfs: Fix security label length not being reset pinctrl: mvebu: Fix i2c sda definition for 98DX3236 gpio: sprd: Clear interrupt when setting the type as edge nvme-fc: fail new connections to a deleted host or remote port spi: fsl-espi: Only process interrupts for expected events mac80211: do not allow bigger VHT MPDUs than the hardware supports drivers/net/wan/hdlc: Set skb->protocol before transmitting drivers/net/wan/lapbether: Make skb->protocol consistent with the header nvme-core: get/put ctrl and transport module in nvme_dev_open/release() rndis_host: increase sleep time in the query-response loop net: dec: de2104x: Increase receive ring size for Tulip drm/sun4i: mixer: Extend regmap max_register drivers/net/wan/hdlc_fr: Add needed_headroom for PVC devices drm/amdgpu: restore proper ref count in amdgpu_display_crtc_set_config ftrace: Move RCU is watching check after recursion check Input: i8042 - add nopnp quirk for Acer Aspire 5 A515 net: virtio_vsock: Enhance connection semantics vsock/virtio: add transport parameter to the virtio_transport_reset_no_sock() vsock/virtio: stop workers during the .remove() vsock/virtio: use RCU to avoid use-after-free on the_virtio_vsock clk: socfpga: stratix10: fix the divider for the emac_ptp_free_clk gpio: tc35894: fix up tc35894 interrupt configuration gpio: mockup: fix resource leak in error path USB: gadget: f_ncm: Fix NDP16 datagram validation mmc: sdhci: Workaround broken command queuing on Intel GLK based IRBIS models ANDROID: use arm-linux-androidkernel- for CROSS_COMPILE_COMPAT ANDROID: build.config.common: enable LLVM=1 Change-Id: I6e694123520bede70e7216a0c909560f0cd2ba59 Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
This commit is contained in:
2
Makefile
2
Makefile
@@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 4
|
||||
PATCHLEVEL = 19
|
||||
SUBLEVEL = 149
|
||||
SUBLEVEL = 152
|
||||
EXTRAVERSION =
|
||||
NAME = "People's Front"
|
||||
|
||||
|
||||
@@ -120,7 +120,7 @@ ccflags-y := -fpic $(call cc-option,-mno-single-pic-base,) -fno-builtin -I$(obj)
|
||||
asflags-y := -DZIMAGE
|
||||
|
||||
# Supply kernel BSS size to the decompressor via a linker symbol.
|
||||
KBSS_SZ = $(shell echo $$(($$($(CROSS_COMPILE)nm $(obj)/../../../../vmlinux | \
|
||||
KBSS_SZ = $(shell echo $$(($$($(NM) $(obj)/../../../../vmlinux | \
|
||||
sed -n -e 's/^\([^ ]*\) [AB] __bss_start$$/-0x\1/p' \
|
||||
-e 's/^\([^ ]*\) [AB] __bss_stop$$/+0x\1/p') )) )
|
||||
LDFLAGS_vmlinux = --defsym _kernel_bss_size=$(KBSS_SZ)
|
||||
@@ -166,7 +166,7 @@ $(obj)/bswapsdi2.S: $(srctree)/arch/$(SRCARCH)/lib/bswapsdi2.S
|
||||
# The .data section is already discarded by the linker script so no need
|
||||
# to bother about it here.
|
||||
check_for_bad_syms = \
|
||||
bad_syms=$$($(CROSS_COMPILE)nm $@ | sed -n 's/^.\{8\} [bc] \(.*\)/\1/p') && \
|
||||
bad_syms=$$($(NM) $@ | sed -n 's/^.\{8\} [bc] \(.*\)/\1/p') && \
|
||||
[ -z "$$bad_syms" ] || \
|
||||
( echo "following symbols must have non local/private scope:" >&2; \
|
||||
echo "$$bad_syms" >&2; rm -f $@; false )
|
||||
|
||||
@@ -10,12 +10,13 @@ obj-vdso := $(addprefix $(obj)/, $(obj-vdso))
|
||||
ccflags-y := -fPIC -fno-common -fno-builtin -fno-stack-protector
|
||||
ccflags-y += -DDISABLE_BRANCH_PROFILING
|
||||
|
||||
VDSO_LDFLAGS := -Wl,-Bsymbolic -Wl,--no-undefined -Wl,-soname=linux-vdso.so.1
|
||||
VDSO_LDFLAGS += -Wl,-z,max-page-size=4096 -Wl,-z,common-page-size=4096
|
||||
VDSO_LDFLAGS += -nostdlib -shared
|
||||
VDSO_LDFLAGS += $(call cc-ldoption, -Wl$(comma)--hash-style=sysv)
|
||||
VDSO_LDFLAGS += $(call cc-ldoption, -Wl$(comma)--build-id)
|
||||
VDSO_LDFLAGS += $(call cc-ldoption, -fuse-ld=bfd)
|
||||
ldflags-$(CONFIG_CPU_ENDIAN_BE8) := --be8
|
||||
ldflags-y := -Bsymbolic --no-undefined -soname=linux-vdso.so.1 \
|
||||
-z max-page-size=4096 -z common-page-size=4096 \
|
||||
-nostdlib -shared $(ldflags-y) \
|
||||
$(call ld-option, --hash-style=sysv) \
|
||||
$(call ld-option, --build-id) \
|
||||
-T
|
||||
|
||||
obj-$(CONFIG_VDSO) += vdso.o
|
||||
extra-$(CONFIG_VDSO) += vdso.lds
|
||||
@@ -37,8 +38,8 @@ KCOV_INSTRUMENT := n
|
||||
$(obj)/vdso.o : $(obj)/vdso.so
|
||||
|
||||
# Link rule for the .so file
|
||||
$(obj)/vdso.so.raw: $(src)/vdso.lds $(obj-vdso) FORCE
|
||||
$(call if_changed,vdsold)
|
||||
$(obj)/vdso.so.raw: $(obj)/vdso.lds $(obj-vdso) FORCE
|
||||
$(call if_changed,ld)
|
||||
|
||||
$(obj)/vdso.so.dbg: $(obj)/vdso.so.raw $(obj)/vdsomunge FORCE
|
||||
$(call if_changed,vdsomunge)
|
||||
@@ -48,11 +49,6 @@ $(obj)/%.so: OBJCOPYFLAGS := -S
|
||||
$(obj)/%.so: $(obj)/%.so.dbg FORCE
|
||||
$(call if_changed,objcopy)
|
||||
|
||||
# Actual build commands
|
||||
quiet_cmd_vdsold = VDSO $@
|
||||
cmd_vdsold = $(CC) $(c_flags) $(VDSO_LDFLAGS) \
|
||||
-Wl,-T $(filter %.lds,$^) $(filter %.o,$^) -o $@
|
||||
|
||||
quiet_cmd_vdsomunge = MUNGE $@
|
||||
cmd_vdsomunge = $(objtree)/$(obj)/vdsomunge $< $@
|
||||
|
||||
|
||||
@@ -151,6 +151,7 @@
|
||||
};
|
||||
|
||||
&qspi {
|
||||
status = "okay";
|
||||
flash@0 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
@@ -22,16 +22,21 @@ endif
|
||||
|
||||
CC_COMPAT ?= $(CC)
|
||||
CC_COMPAT += $(CC_COMPAT_CLANG_FLAGS)
|
||||
|
||||
ifeq ($(LLVM),1)
|
||||
LD_COMPAT ?= $(LD)
|
||||
else
|
||||
LD_COMPAT ?= $(CROSS_COMPILE_COMPAT)ld
|
||||
endif
|
||||
else
|
||||
CC_COMPAT ?= $(CROSS_COMPILE_COMPAT)gcc
|
||||
LD_COMPAT ?= $(CROSS_COMPILE_COMPAT)ld
|
||||
endif
|
||||
|
||||
cc32-option = $(call try-run,\
|
||||
$(CC_COMPAT) $(1) -c -x c /dev/null -o "$$TMP",$(1),$(2))
|
||||
cc32-disable-warning = $(call try-run,\
|
||||
$(CC_COMPAT) -W$(strip $(1)) -c -x c /dev/null -o "$$TMP",-Wno-$(strip $(1)))
|
||||
cc32-ldoption = $(call try-run,\
|
||||
$(CC_COMPAT) $(1) -nostdlib -x c /dev/null -o "$$TMP",$(1),$(2))
|
||||
cc32-as-instr = $(call try-run,\
|
||||
printf "%b\n" "$(1)" | $(CC_COMPAT) $(VDSO_AFLAGS) -c -x assembler -o "$$TMP" -,$(2),$(3))
|
||||
|
||||
@@ -114,14 +119,10 @@ dmbinstr := $(call cc32-as-instr,dmb ishld,-DCONFIG_AS_DMB_ISHLD=1)
|
||||
VDSO_CFLAGS += $(dmbinstr)
|
||||
VDSO_AFLAGS += $(dmbinstr)
|
||||
|
||||
VDSO_LDFLAGS := $(VDSO_CPPFLAGS)
|
||||
# From arm vDSO Makefile
|
||||
VDSO_LDFLAGS += -Wl,-Bsymbolic -Wl,--no-undefined -Wl,-soname=linux-vdso.so.1
|
||||
VDSO_LDFLAGS += -Wl,-z,max-page-size=4096 -Wl,-z,common-page-size=4096
|
||||
VDSO_LDFLAGS += -nostdlib -shared -mfloat-abi=soft
|
||||
VDSO_LDFLAGS += $(call cc32-ldoption,-Wl$(comma)--hash-style=sysv)
|
||||
VDSO_LDFLAGS += $(call cc32-ldoption,-Wl$(comma)--build-id)
|
||||
VDSO_LDFLAGS += $(call cc32-ldoption,-fuse-ld=bfd)
|
||||
VDSO_LDFLAGS += -Bsymbolic --no-undefined -soname=linux-vdso.so.1
|
||||
VDSO_LDFLAGS += -z max-page-size=4096 -z common-page-size=4096
|
||||
VDSO_LDFLAGS += -nostdlib -shared --hash-style=sysv --build-id
|
||||
|
||||
|
||||
# Borrow vdsomunge.c from the arm vDSO
|
||||
@@ -182,8 +183,8 @@ quiet_cmd_vdsold_and_vdso_check = LD32 $@
|
||||
cmd_vdsold_and_vdso_check = $(cmd_vdsold); $(cmd_vdso_check)
|
||||
|
||||
quiet_cmd_vdsold = LD32 $@
|
||||
cmd_vdsold = $(CC_COMPAT) -Wp,-MD,$(depfile) $(VDSO_LDFLAGS) \
|
||||
-Wl,-T $(filter %.lds,$^) $(filter %.o,$^) -o $@
|
||||
cmd_vdsold = $(LD_COMPAT) $(VDSO_LDFLAGS) \
|
||||
-T $(filter %.lds,$^) $(filter %.o,$^) -o $@
|
||||
quiet_cmd_vdsocc = CC32 $@
|
||||
cmd_vdsocc = $(CC_COMPAT) -Wp,-MD,$(depfile) $(VDSO_CFLAGS) -c -o $@ $<
|
||||
quiet_cmd_vdsocc_gettimeofday = CC32 $@
|
||||
|
||||
@@ -499,7 +499,7 @@ virtual_memmap_init(u64 start, u64 end, void *arg)
|
||||
if (map_start < map_end)
|
||||
memmap_init_zone((unsigned long)(map_end - map_start),
|
||||
args->nid, args->zone, page_to_pfn(map_start),
|
||||
MEMMAP_EARLY, NULL);
|
||||
MEMINIT_EARLY, NULL);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -508,8 +508,8 @@ memmap_init (unsigned long size, int nid, unsigned long zone,
|
||||
unsigned long start_pfn)
|
||||
{
|
||||
if (!vmem_map) {
|
||||
memmap_init_zone(size, nid, zone, start_pfn, MEMMAP_EARLY,
|
||||
NULL);
|
||||
memmap_init_zone(size, nid, zone, start_pfn,
|
||||
MEMINIT_EARLY, NULL);
|
||||
} else {
|
||||
struct page *start;
|
||||
struct memmap_init_callback_data args;
|
||||
|
||||
@@ -2,7 +2,7 @@ ARCH=arm64
|
||||
|
||||
CLANG_TRIPLE=aarch64-linux-gnu-
|
||||
CROSS_COMPILE=aarch64-linux-androidkernel-
|
||||
CROSS_COMPILE_COMPAT=arm-linux-androideabi-
|
||||
CROSS_COMPILE_COMPAT=arm-linux-androidkernel-
|
||||
LINUX_GCC_CROSS_COMPILE_PREBUILTS_BIN=prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin
|
||||
LINUX_GCC_CROSS_COMPILE_COMPAT_PREBUILTS_BIN=prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin/
|
||||
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
BRANCH=android-4.19-stable
|
||||
KMI_GENERATION=0
|
||||
|
||||
CC=clang
|
||||
LD=ld.lld
|
||||
NM=llvm-nm
|
||||
OBJCOPY=llvm-objcopy
|
||||
LLVM=1
|
||||
DEPMOD=depmod
|
||||
CLANG_PREBUILT_BIN=prebuilts-master/clang/host/linux-x86/clang-r383902/bin
|
||||
BUILDTOOLS_PREBUILT_BIN=build/build-tools/path/linux-x86
|
||||
|
||||
@@ -493,7 +493,8 @@ static int really_probe(struct device *dev, struct device_driver *drv)
|
||||
drv->bus->name, __func__, drv->name, dev_name(dev));
|
||||
if (!list_empty(&dev->devres_head)) {
|
||||
dev_crit(dev, "Resources present before probing\n");
|
||||
return -EBUSY;
|
||||
ret = -EBUSY;
|
||||
goto done;
|
||||
}
|
||||
|
||||
re_probe:
|
||||
@@ -600,7 +601,7 @@ static int really_probe(struct device *dev, struct device_driver *drv)
|
||||
ret = 0;
|
||||
done:
|
||||
atomic_dec(&probe_count);
|
||||
wake_up(&probe_waitqueue);
|
||||
wake_up_all(&probe_waitqueue);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -414,10 +414,32 @@ static int __ref get_nid_for_pfn(unsigned long pfn)
|
||||
return pfn_to_nid(pfn);
|
||||
}
|
||||
|
||||
/* register memory section under specified node if it spans that node */
|
||||
int register_mem_sect_under_node(struct memory_block *mem_blk, void *arg)
|
||||
static int do_register_memory_block_under_node(int nid,
|
||||
struct memory_block *mem_blk)
|
||||
{
|
||||
int ret, nid = *(int *)arg;
|
||||
int ret;
|
||||
|
||||
/*
|
||||
* If this memory block spans multiple nodes, we only indicate
|
||||
* the last processed node.
|
||||
*/
|
||||
mem_blk->nid = nid;
|
||||
|
||||
ret = sysfs_create_link_nowarn(&node_devices[nid]->dev.kobj,
|
||||
&mem_blk->dev.kobj,
|
||||
kobject_name(&mem_blk->dev.kobj));
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
return sysfs_create_link_nowarn(&mem_blk->dev.kobj,
|
||||
&node_devices[nid]->dev.kobj,
|
||||
kobject_name(&node_devices[nid]->dev.kobj));
|
||||
}
|
||||
|
||||
/* register memory section under specified node if it spans that node */
|
||||
int register_mem_block_under_node_early(struct memory_block *mem_blk, void *arg)
|
||||
{
|
||||
int nid = *(int *)arg;
|
||||
unsigned long pfn, sect_start_pfn, sect_end_pfn;
|
||||
|
||||
sect_start_pfn = section_nr_to_pfn(mem_blk->start_section_nr);
|
||||
@@ -437,38 +459,33 @@ int register_mem_sect_under_node(struct memory_block *mem_blk, void *arg)
|
||||
}
|
||||
|
||||
/*
|
||||
* We need to check if page belongs to nid only for the boot
|
||||
* case, during hotplug we know that all pages in the memory
|
||||
* block belong to the same node.
|
||||
* We need to check if page belongs to nid only at the boot
|
||||
* case because node's ranges can be interleaved.
|
||||
*/
|
||||
if (system_state == SYSTEM_BOOTING) {
|
||||
page_nid = get_nid_for_pfn(pfn);
|
||||
if (page_nid < 0)
|
||||
continue;
|
||||
if (page_nid != nid)
|
||||
continue;
|
||||
}
|
||||
page_nid = get_nid_for_pfn(pfn);
|
||||
if (page_nid < 0)
|
||||
continue;
|
||||
if (page_nid != nid)
|
||||
continue;
|
||||
|
||||
/*
|
||||
* If this memory block spans multiple nodes, we only indicate
|
||||
* the last processed node.
|
||||
*/
|
||||
mem_blk->nid = nid;
|
||||
|
||||
ret = sysfs_create_link_nowarn(&node_devices[nid]->dev.kobj,
|
||||
&mem_blk->dev.kobj,
|
||||
kobject_name(&mem_blk->dev.kobj));
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
return sysfs_create_link_nowarn(&mem_blk->dev.kobj,
|
||||
&node_devices[nid]->dev.kobj,
|
||||
kobject_name(&node_devices[nid]->dev.kobj));
|
||||
return do_register_memory_block_under_node(nid, mem_blk);
|
||||
}
|
||||
/* mem section does not span the specified node */
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* During hotplug we know that all pages in the memory block belong to the same
|
||||
* node.
|
||||
*/
|
||||
static int register_mem_block_under_node_hotplug(struct memory_block *mem_blk,
|
||||
void *arg)
|
||||
{
|
||||
int nid = *(int *)arg;
|
||||
|
||||
return do_register_memory_block_under_node(nid, mem_blk);
|
||||
}
|
||||
|
||||
/*
|
||||
* Unregister a memory block device under the node it spans. Memory blocks
|
||||
* with multiple nodes cannot be offlined and therefore also never be removed.
|
||||
@@ -484,10 +501,17 @@ void unregister_memory_block_under_nodes(struct memory_block *mem_blk)
|
||||
kobject_name(&node_devices[mem_blk->nid]->dev.kobj));
|
||||
}
|
||||
|
||||
int link_mem_sections(int nid, unsigned long start_pfn, unsigned long end_pfn)
|
||||
int link_mem_sections(int nid, unsigned long start_pfn, unsigned long end_pfn,
|
||||
enum meminit_context context)
|
||||
{
|
||||
return walk_memory_range(start_pfn, end_pfn, (void *)&nid,
|
||||
register_mem_sect_under_node);
|
||||
walk_memory_blocks_func_t func;
|
||||
|
||||
if (context == MEMINIT_HOTPLUG)
|
||||
func = register_mem_block_under_node_hotplug;
|
||||
else
|
||||
func = register_mem_block_under_node_early;
|
||||
|
||||
return walk_memory_range(start_pfn, end_pfn, (void *)&nid, func);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_HUGETLBFS
|
||||
|
||||
@@ -1072,7 +1072,7 @@ static const struct samsung_gate_clock exynos4210_gate_clks[] __initconst = {
|
||||
GATE(CLK_PCIE, "pcie", "aclk133", GATE_IP_FSYS, 14, 0, 0),
|
||||
GATE(CLK_SMMU_PCIE, "smmu_pcie", "aclk133", GATE_IP_FSYS, 18, 0, 0),
|
||||
GATE(CLK_MODEMIF, "modemif", "aclk100", GATE_IP_PERIL, 28, 0, 0),
|
||||
GATE(CLK_CHIPID, "chipid", "aclk100", E4210_GATE_IP_PERIR, 0, 0, 0),
|
||||
GATE(CLK_CHIPID, "chipid", "aclk100", E4210_GATE_IP_PERIR, 0, CLK_IGNORE_UNUSED, 0),
|
||||
GATE(CLK_SYSREG, "sysreg", "aclk100", E4210_GATE_IP_PERIR, 0,
|
||||
CLK_IGNORE_UNUSED, 0),
|
||||
GATE(CLK_HDMI_CEC, "hdmi_cec", "aclk100", E4210_GATE_IP_PERIR, 11, 0,
|
||||
@@ -1113,7 +1113,7 @@ static const struct samsung_gate_clock exynos4x12_gate_clks[] __initconst = {
|
||||
0),
|
||||
GATE(CLK_TSADC, "tsadc", "aclk133", E4X12_GATE_BUS_FSYS1, 16, 0, 0),
|
||||
GATE(CLK_MIPI_HSI, "mipi_hsi", "aclk133", GATE_IP_FSYS, 10, 0, 0),
|
||||
GATE(CLK_CHIPID, "chipid", "aclk100", E4X12_GATE_IP_PERIR, 0, 0, 0),
|
||||
GATE(CLK_CHIPID, "chipid", "aclk100", E4X12_GATE_IP_PERIR, 0, CLK_IGNORE_UNUSED, 0),
|
||||
GATE(CLK_SYSREG, "sysreg", "aclk100", E4X12_GATE_IP_PERIR, 1,
|
||||
CLK_IGNORE_UNUSED, 0),
|
||||
GATE(CLK_HDMI_CEC, "hdmi_cec", "aclk100", E4X12_GATE_IP_PERIR, 11, 0,
|
||||
|
||||
@@ -107,7 +107,7 @@ static const struct stratix10_perip_cnt_clock s10_main_perip_cnt_clks[] = {
|
||||
{ STRATIX10_EMAC_B_FREE_CLK, "emacb_free_clk", NULL, emacb_free_mux, ARRAY_SIZE(emacb_free_mux),
|
||||
0, 0, 2, 0xB0, 1},
|
||||
{ STRATIX10_EMAC_PTP_FREE_CLK, "emac_ptp_free_clk", NULL, emac_ptp_free_mux,
|
||||
ARRAY_SIZE(emac_ptp_free_mux), 0, 0, 4, 0xB0, 2},
|
||||
ARRAY_SIZE(emac_ptp_free_mux), 0, 0, 2, 0xB0, 2},
|
||||
{ STRATIX10_GPIO_DB_FREE_CLK, "gpio_db_free_clk", NULL, gpio_db_free_mux,
|
||||
ARRAY_SIZE(gpio_db_free_mux), 0, 0, 0, 0xB0, 3},
|
||||
{ STRATIX10_SDMMC_FREE_CLK, "sdmmc_free_clk", NULL, sdmmc_free_mux,
|
||||
|
||||
@@ -2980,7 +2980,6 @@ static int aead_gcm_ccm_setkey(struct crypto_aead *cipher,
|
||||
|
||||
ctx->enckeylen = keylen;
|
||||
ctx->authkeylen = 0;
|
||||
memcpy(ctx->enckey, key, ctx->enckeylen);
|
||||
|
||||
switch (ctx->enckeylen) {
|
||||
case AES_KEYSIZE_128:
|
||||
@@ -2996,6 +2995,8 @@ static int aead_gcm_ccm_setkey(struct crypto_aead *cipher,
|
||||
goto badkey;
|
||||
}
|
||||
|
||||
memcpy(ctx->enckey, key, ctx->enckeylen);
|
||||
|
||||
flow_log(" enckeylen:%u authkeylen:%u\n", ctx->enckeylen,
|
||||
ctx->authkeylen);
|
||||
flow_dump(" enc: ", ctx->enckey, ctx->enckeylen);
|
||||
@@ -3056,6 +3057,10 @@ static int aead_gcm_esp_setkey(struct crypto_aead *cipher,
|
||||
struct iproc_ctx_s *ctx = crypto_aead_ctx(cipher);
|
||||
|
||||
flow_log("%s\n", __func__);
|
||||
|
||||
if (keylen < GCM_ESP_SALT_SIZE)
|
||||
return -EINVAL;
|
||||
|
||||
ctx->salt_len = GCM_ESP_SALT_SIZE;
|
||||
ctx->salt_offset = GCM_ESP_SALT_OFFSET;
|
||||
memcpy(ctx->salt, key + keylen - GCM_ESP_SALT_SIZE, GCM_ESP_SALT_SIZE);
|
||||
@@ -3084,6 +3089,10 @@ static int rfc4543_gcm_esp_setkey(struct crypto_aead *cipher,
|
||||
struct iproc_ctx_s *ctx = crypto_aead_ctx(cipher);
|
||||
|
||||
flow_log("%s\n", __func__);
|
||||
|
||||
if (keylen < GCM_ESP_SALT_SIZE)
|
||||
return -EINVAL;
|
||||
|
||||
ctx->salt_len = GCM_ESP_SALT_SIZE;
|
||||
ctx->salt_offset = GCM_ESP_SALT_OFFSET;
|
||||
memcpy(ctx->salt, key + keylen - GCM_ESP_SALT_SIZE, GCM_ESP_SALT_SIZE);
|
||||
@@ -3113,6 +3122,10 @@ static int aead_ccm_esp_setkey(struct crypto_aead *cipher,
|
||||
struct iproc_ctx_s *ctx = crypto_aead_ctx(cipher);
|
||||
|
||||
flow_log("%s\n", __func__);
|
||||
|
||||
if (keylen < CCM_ESP_SALT_SIZE)
|
||||
return -EINVAL;
|
||||
|
||||
ctx->salt_len = CCM_ESP_SALT_SIZE;
|
||||
ctx->salt_offset = CCM_ESP_SALT_OFFSET;
|
||||
memcpy(ctx->salt, key + keylen - CCM_ESP_SALT_SIZE, CCM_ESP_SALT_SIZE);
|
||||
|
||||
@@ -828,6 +828,11 @@ static int qat_alg_aead_dec(struct aead_request *areq)
|
||||
struct icp_qat_fw_la_bulk_req *msg;
|
||||
int digst_size = crypto_aead_authsize(aead_tfm);
|
||||
int ret, ctr = 0;
|
||||
u32 cipher_len;
|
||||
|
||||
cipher_len = areq->cryptlen - digst_size;
|
||||
if (cipher_len % AES_BLOCK_SIZE != 0)
|
||||
return -EINVAL;
|
||||
|
||||
ret = qat_alg_sgl_to_bufl(ctx->inst, areq->src, areq->dst, qat_req);
|
||||
if (unlikely(ret))
|
||||
@@ -842,7 +847,7 @@ static int qat_alg_aead_dec(struct aead_request *areq)
|
||||
qat_req->req.comn_mid.src_data_addr = qat_req->buf.blp;
|
||||
qat_req->req.comn_mid.dest_data_addr = qat_req->buf.bloutp;
|
||||
cipher_param = (void *)&qat_req->req.serv_specif_rqpars;
|
||||
cipher_param->cipher_length = areq->cryptlen - digst_size;
|
||||
cipher_param->cipher_length = cipher_len;
|
||||
cipher_param->cipher_offset = areq->assoclen;
|
||||
memcpy(cipher_param->u.cipher_IV_array, areq->iv, AES_BLOCK_SIZE);
|
||||
auth_param = (void *)((uint8_t *)cipher_param + sizeof(*cipher_param));
|
||||
@@ -871,6 +876,9 @@ static int qat_alg_aead_enc(struct aead_request *areq)
|
||||
uint8_t *iv = areq->iv;
|
||||
int ret, ctr = 0;
|
||||
|
||||
if (areq->cryptlen % AES_BLOCK_SIZE != 0)
|
||||
return -EINVAL;
|
||||
|
||||
ret = qat_alg_sgl_to_bufl(ctx->inst, areq->src, areq->dst, qat_req);
|
||||
if (unlikely(ret))
|
||||
return ret;
|
||||
|
||||
@@ -367,6 +367,7 @@ static int __init gpio_mockup_init(void)
|
||||
err = platform_driver_register(&gpio_mockup_driver);
|
||||
if (err) {
|
||||
gpio_mockup_err("error registering platform driver\n");
|
||||
debugfs_remove_recursive(gpio_mockup_dbg_dir);
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -386,6 +387,7 @@ static int __init gpio_mockup_init(void)
|
||||
gpio_mockup_err("error registering device");
|
||||
platform_driver_unregister(&gpio_mockup_driver);
|
||||
gpio_mockup_unregister_pdevs();
|
||||
debugfs_remove_recursive(gpio_mockup_dbg_dir);
|
||||
return PTR_ERR(pdev);
|
||||
}
|
||||
|
||||
|
||||
@@ -149,17 +149,20 @@ static int sprd_gpio_irq_set_type(struct irq_data *data,
|
||||
sprd_gpio_update(chip, offset, SPRD_GPIO_IS, 0);
|
||||
sprd_gpio_update(chip, offset, SPRD_GPIO_IBE, 0);
|
||||
sprd_gpio_update(chip, offset, SPRD_GPIO_IEV, 1);
|
||||
sprd_gpio_update(chip, offset, SPRD_GPIO_IC, 1);
|
||||
irq_set_handler_locked(data, handle_edge_irq);
|
||||
break;
|
||||
case IRQ_TYPE_EDGE_FALLING:
|
||||
sprd_gpio_update(chip, offset, SPRD_GPIO_IS, 0);
|
||||
sprd_gpio_update(chip, offset, SPRD_GPIO_IBE, 0);
|
||||
sprd_gpio_update(chip, offset, SPRD_GPIO_IEV, 0);
|
||||
sprd_gpio_update(chip, offset, SPRD_GPIO_IC, 1);
|
||||
irq_set_handler_locked(data, handle_edge_irq);
|
||||
break;
|
||||
case IRQ_TYPE_EDGE_BOTH:
|
||||
sprd_gpio_update(chip, offset, SPRD_GPIO_IS, 0);
|
||||
sprd_gpio_update(chip, offset, SPRD_GPIO_IBE, 1);
|
||||
sprd_gpio_update(chip, offset, SPRD_GPIO_IC, 1);
|
||||
irq_set_handler_locked(data, handle_edge_irq);
|
||||
break;
|
||||
case IRQ_TYPE_LEVEL_HIGH:
|
||||
|
||||
@@ -209,7 +209,7 @@ static void tc3589x_gpio_irq_sync_unlock(struct irq_data *d)
|
||||
continue;
|
||||
|
||||
tc3589x_gpio->oldregs[i][j] = new;
|
||||
tc3589x_reg_write(tc3589x, regmap[i] + j * 8, new);
|
||||
tc3589x_reg_write(tc3589x, regmap[i] + j, new);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -290,7 +290,7 @@ int amdgpu_display_crtc_set_config(struct drm_mode_set *set,
|
||||
take the current one */
|
||||
if (active && !adev->have_disp_power_ref) {
|
||||
adev->have_disp_power_ref = true;
|
||||
goto out;
|
||||
return ret;
|
||||
}
|
||||
/* if we have no active crtcs, then drop the power ref
|
||||
we got before */
|
||||
|
||||
@@ -954,6 +954,7 @@ static int amdgpu_ttm_tt_pin_userptr(struct ttm_tt *ttm)
|
||||
|
||||
release_sg:
|
||||
kfree(ttm->sg);
|
||||
ttm->sg = NULL;
|
||||
return r;
|
||||
}
|
||||
|
||||
|
||||
@@ -176,6 +176,8 @@ void
|
||||
nouveau_mem_del(struct ttm_mem_reg *reg)
|
||||
{
|
||||
struct nouveau_mem *mem = nouveau_mem(reg);
|
||||
if (!mem)
|
||||
return;
|
||||
nouveau_mem_fini(mem);
|
||||
kfree(reg->mm_node);
|
||||
reg->mm_node = NULL;
|
||||
|
||||
@@ -364,7 +364,7 @@ static struct regmap_config sun8i_mixer_regmap_config = {
|
||||
.reg_bits = 32,
|
||||
.val_bits = 32,
|
||||
.reg_stride = 4,
|
||||
.max_register = 0xbfffc, /* guessed */
|
||||
.max_register = 0xffffc, /* guessed */
|
||||
};
|
||||
|
||||
static int sun8i_mixer_of_get_id(struct device_node *node)
|
||||
|
||||
@@ -74,6 +74,9 @@ struct i2c_ram {
|
||||
char res1[4]; /* Reserved */
|
||||
ushort rpbase; /* Relocation pointer */
|
||||
char res2[2]; /* Reserved */
|
||||
/* The following elements are only for CPM2 */
|
||||
char res3[4]; /* Reserved */
|
||||
uint sdmatmp; /* Internal */
|
||||
};
|
||||
|
||||
#define I2COM_START 0x80
|
||||
|
||||
@@ -1698,6 +1698,7 @@ static int i801_probe(struct pci_dev *dev, const struct pci_device_id *id)
|
||||
|
||||
pci_set_drvdata(dev, priv);
|
||||
|
||||
dev_pm_set_driver_flags(&dev->dev, DPM_FLAG_NEVER_SKIP);
|
||||
pm_runtime_set_autosuspend_delay(&dev->dev, 1000);
|
||||
pm_runtime_use_autosuspend(&dev->dev);
|
||||
pm_runtime_put_autosuspend(&dev->dev);
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#include <linux/bitfield.h>
|
||||
#include <linux/clk.h>
|
||||
#include <linux/completion.h>
|
||||
#include <linux/i2c.h>
|
||||
@@ -35,12 +36,17 @@
|
||||
#define REG_CTRL_ACK_IGNORE BIT(1)
|
||||
#define REG_CTRL_STATUS BIT(2)
|
||||
#define REG_CTRL_ERROR BIT(3)
|
||||
#define REG_CTRL_CLKDIV_SHIFT 12
|
||||
#define REG_CTRL_CLKDIV_MASK GENMASK(21, 12)
|
||||
#define REG_CTRL_CLKDIVEXT_SHIFT 28
|
||||
#define REG_CTRL_CLKDIVEXT_MASK GENMASK(29, 28)
|
||||
#define REG_CTRL_CLKDIV GENMASK(21, 12)
|
||||
#define REG_CTRL_CLKDIVEXT GENMASK(29, 28)
|
||||
|
||||
#define REG_SLV_ADDR GENMASK(7, 0)
|
||||
#define REG_SLV_SDA_FILTER GENMASK(10, 8)
|
||||
#define REG_SLV_SCL_FILTER GENMASK(13, 11)
|
||||
#define REG_SLV_SCL_LOW GENMASK(27, 16)
|
||||
#define REG_SLV_SCL_LOW_EN BIT(28)
|
||||
|
||||
#define I2C_TIMEOUT_MS 500
|
||||
#define FILTER_DELAY 15
|
||||
|
||||
enum {
|
||||
TOKEN_END = 0,
|
||||
@@ -135,19 +141,24 @@ static void meson_i2c_set_clk_div(struct meson_i2c *i2c, unsigned int freq)
|
||||
unsigned long clk_rate = clk_get_rate(i2c->clk);
|
||||
unsigned int div;
|
||||
|
||||
div = DIV_ROUND_UP(clk_rate, freq * i2c->data->div_factor);
|
||||
div = DIV_ROUND_UP(clk_rate, freq);
|
||||
div -= FILTER_DELAY;
|
||||
div = DIV_ROUND_UP(div, i2c->data->div_factor);
|
||||
|
||||
/* clock divider has 12 bits */
|
||||
if (div >= (1 << 12)) {
|
||||
if (div > GENMASK(11, 0)) {
|
||||
dev_err(i2c->dev, "requested bus frequency too low\n");
|
||||
div = (1 << 12) - 1;
|
||||
div = GENMASK(11, 0);
|
||||
}
|
||||
|
||||
meson_i2c_set_mask(i2c, REG_CTRL, REG_CTRL_CLKDIV_MASK,
|
||||
(div & GENMASK(9, 0)) << REG_CTRL_CLKDIV_SHIFT);
|
||||
meson_i2c_set_mask(i2c, REG_CTRL, REG_CTRL_CLKDIV,
|
||||
FIELD_PREP(REG_CTRL_CLKDIV, div & GENMASK(9, 0)));
|
||||
|
||||
meson_i2c_set_mask(i2c, REG_CTRL, REG_CTRL_CLKDIVEXT_MASK,
|
||||
(div >> 10) << REG_CTRL_CLKDIVEXT_SHIFT);
|
||||
meson_i2c_set_mask(i2c, REG_CTRL, REG_CTRL_CLKDIVEXT,
|
||||
FIELD_PREP(REG_CTRL_CLKDIVEXT, div >> 10));
|
||||
|
||||
/* Disable HIGH/LOW mode */
|
||||
meson_i2c_set_mask(i2c, REG_SLAVE_ADDR, REG_SLV_SCL_LOW_EN, 0);
|
||||
|
||||
dev_dbg(i2c->dev, "%s: clk %lu, freq %u, div %u\n", __func__,
|
||||
clk_rate, freq, div);
|
||||
@@ -276,7 +287,10 @@ static void meson_i2c_do_start(struct meson_i2c *i2c, struct i2c_msg *msg)
|
||||
token = (msg->flags & I2C_M_RD) ? TOKEN_SLAVE_ADDR_READ :
|
||||
TOKEN_SLAVE_ADDR_WRITE;
|
||||
|
||||
writel(msg->addr << 1, i2c->regs + REG_SLAVE_ADDR);
|
||||
|
||||
meson_i2c_set_mask(i2c, REG_SLAVE_ADDR, REG_SLV_ADDR,
|
||||
FIELD_PREP(REG_SLV_ADDR, msg->addr << 1));
|
||||
|
||||
meson_i2c_add_token(i2c, TOKEN_START);
|
||||
meson_i2c_add_token(i2c, token);
|
||||
}
|
||||
@@ -435,6 +449,10 @@ static int meson_i2c_probe(struct platform_device *pdev)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Disable filtering */
|
||||
meson_i2c_set_mask(i2c, REG_SLAVE_ADDR,
|
||||
REG_SLV_SDA_FILTER | REG_SLV_SCL_FILTER, 0);
|
||||
|
||||
meson_i2c_set_clk_div(i2c, timings.bus_freq_hz);
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -179,6 +179,9 @@ static irqreturn_t owl_i2c_interrupt(int irq, void *_dev)
|
||||
fifostat = readl(i2c_dev->base + OWL_I2C_REG_FIFOSTAT);
|
||||
if (fifostat & OWL_I2C_FIFOSTAT_RNB) {
|
||||
i2c_dev->err = -ENXIO;
|
||||
/* Clear NACK error bit by writing "1" */
|
||||
owl_i2c_update_reg(i2c_dev->base + OWL_I2C_REG_FIFOSTAT,
|
||||
OWL_I2C_FIFOSTAT_RNB, true);
|
||||
goto stop;
|
||||
}
|
||||
|
||||
@@ -186,6 +189,9 @@ static irqreturn_t owl_i2c_interrupt(int irq, void *_dev)
|
||||
stat = readl(i2c_dev->base + OWL_I2C_REG_STAT);
|
||||
if (stat & OWL_I2C_STAT_BEB) {
|
||||
i2c_dev->err = -EIO;
|
||||
/* Clear BUS error bit by writing "1" */
|
||||
owl_i2c_update_reg(i2c_dev->base + OWL_I2C_REG_STAT,
|
||||
OWL_I2C_STAT_BEB, true);
|
||||
goto stop;
|
||||
}
|
||||
|
||||
|
||||
@@ -285,6 +285,8 @@ static int trackpoint_start_protocol(struct psmouse *psmouse,
|
||||
case TP_VARIANT_ALPS:
|
||||
case TP_VARIANT_ELAN:
|
||||
case TP_VARIANT_NXP:
|
||||
case TP_VARIANT_JYT_SYNAPTICS:
|
||||
case TP_VARIANT_SYNAPTICS:
|
||||
if (variant_id)
|
||||
*variant_id = param[0];
|
||||
if (firmware_id)
|
||||
|
||||
@@ -725,6 +725,13 @@ static const struct dmi_system_id __initconst i8042_dmi_nopnp_table[] = {
|
||||
DMI_MATCH(DMI_BOARD_VENDOR, "MICRO-STAR INTERNATIONAL CO., LTD"),
|
||||
},
|
||||
},
|
||||
{
|
||||
/* Acer Aspire 5 A515 */
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_NAME, "Grumpy_PK"),
|
||||
DMI_MATCH(DMI_BOARD_VENDOR, "PK"),
|
||||
},
|
||||
},
|
||||
{ }
|
||||
};
|
||||
|
||||
|
||||
@@ -1302,13 +1302,17 @@ static int exynos_iommu_of_xlate(struct device *dev,
|
||||
return -ENODEV;
|
||||
|
||||
data = platform_get_drvdata(sysmmu);
|
||||
if (!data)
|
||||
if (!data) {
|
||||
put_device(&sysmmu->dev);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
if (!owner) {
|
||||
owner = kzalloc(sizeof(*owner), GFP_KERNEL);
|
||||
if (!owner)
|
||||
if (!owner) {
|
||||
put_device(&sysmmu->dev);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
INIT_LIST_HEAD(&owner->controllers);
|
||||
mutex_init(&owner->rpm_lock);
|
||||
|
||||
@@ -113,7 +113,8 @@ static int usbtv_probe(struct usb_interface *intf,
|
||||
|
||||
usbtv_audio_fail:
|
||||
/* we must not free at this point */
|
||||
usb_get_dev(usbtv->udev);
|
||||
v4l2_device_get(&usbtv->v4l2_dev);
|
||||
/* this will undo the v4l2_device_get() */
|
||||
usbtv_video_free(usbtv);
|
||||
|
||||
usbtv_video_fail:
|
||||
|
||||
@@ -196,7 +196,7 @@ static void mmc_queue_setup_discard(struct request_queue *q,
|
||||
q->limits.discard_granularity = card->pref_erase << 9;
|
||||
/* granularity must not be greater than max. discard */
|
||||
if (card->pref_erase > max_discard)
|
||||
q->limits.discard_granularity = 0;
|
||||
q->limits.discard_granularity = SECTOR_SIZE;
|
||||
if (mmc_can_secure_erase_trim(card))
|
||||
blk_queue_flag_set(QUEUE_FLAG_SECERASE, q);
|
||||
}
|
||||
|
||||
@@ -739,7 +739,8 @@ static int byt_emmc_probe_slot(struct sdhci_pci_slot *slot)
|
||||
static bool glk_broken_cqhci(struct sdhci_pci_slot *slot)
|
||||
{
|
||||
return slot->chip->pdev->device == PCI_DEVICE_ID_INTEL_GLK_EMMC &&
|
||||
dmi_match(DMI_BIOS_VENDOR, "LENOVO");
|
||||
(dmi_match(DMI_BIOS_VENDOR, "LENOVO") ||
|
||||
dmi_match(DMI_SYS_VENDOR, "IRBIS"));
|
||||
}
|
||||
|
||||
static int glk_emmc_probe_slot(struct sdhci_pci_slot *slot)
|
||||
|
||||
@@ -1947,7 +1947,7 @@ static int sunxi_nand_chip_init(struct device *dev, struct sunxi_nfc *nfc,
|
||||
ret = mtd_device_register(mtd, NULL, 0);
|
||||
if (ret) {
|
||||
dev_err(dev, "failed to register mtd device: %d\n", ret);
|
||||
nand_release(nand);
|
||||
nand_cleanup(nand);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -1123,6 +1123,7 @@ static void bond_setup_by_slave(struct net_device *bond_dev,
|
||||
|
||||
bond_dev->type = slave_dev->type;
|
||||
bond_dev->hard_header_len = slave_dev->hard_header_len;
|
||||
bond_dev->needed_headroom = slave_dev->needed_headroom;
|
||||
bond_dev->addr_len = slave_dev->addr_len;
|
||||
|
||||
memcpy(bond_dev->broadcast, slave_dev->broadcast,
|
||||
|
||||
@@ -91,7 +91,7 @@ MODULE_PARM_DESC (rx_copybreak, "de2104x Breakpoint at which Rx packets are copi
|
||||
#define DSL CONFIG_DE2104X_DSL
|
||||
#endif
|
||||
|
||||
#define DE_RX_RING_SIZE 64
|
||||
#define DE_RX_RING_SIZE 128
|
||||
#define DE_TX_RING_SIZE 64
|
||||
#define DE_RING_BYTES \
|
||||
((sizeof(struct de_desc) * DE_RX_RING_SIZE) + \
|
||||
|
||||
@@ -319,15 +319,25 @@ static int orion_mdio_probe(struct platform_device *pdev)
|
||||
|
||||
init_waitqueue_head(&dev->smi_busy_wait);
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(dev->clk); i++) {
|
||||
dev->clk[i] = of_clk_get(pdev->dev.of_node, i);
|
||||
if (PTR_ERR(dev->clk[i]) == -EPROBE_DEFER) {
|
||||
if (pdev->dev.of_node) {
|
||||
for (i = 0; i < ARRAY_SIZE(dev->clk); i++) {
|
||||
dev->clk[i] = of_clk_get(pdev->dev.of_node, i);
|
||||
if (PTR_ERR(dev->clk[i]) == -EPROBE_DEFER) {
|
||||
ret = -EPROBE_DEFER;
|
||||
goto out_clk;
|
||||
}
|
||||
if (IS_ERR(dev->clk[i]))
|
||||
break;
|
||||
clk_prepare_enable(dev->clk[i]);
|
||||
}
|
||||
} else {
|
||||
dev->clk[0] = clk_get(&pdev->dev, NULL);
|
||||
if (PTR_ERR(dev->clk[0]) == -EPROBE_DEFER) {
|
||||
ret = -EPROBE_DEFER;
|
||||
goto out_clk;
|
||||
}
|
||||
if (IS_ERR(dev->clk[i]))
|
||||
break;
|
||||
clk_prepare_enable(dev->clk[i]);
|
||||
if (!IS_ERR(dev->clk[0]))
|
||||
clk_prepare_enable(dev->clk[0]);
|
||||
}
|
||||
|
||||
dev->err_interrupt = platform_get_irq(pdev, 0);
|
||||
|
||||
@@ -217,6 +217,9 @@ static int __mlx5e_add_vlan_rule(struct mlx5e_priv *priv,
|
||||
break;
|
||||
}
|
||||
|
||||
if (WARN_ONCE(*rule_p, "VLAN rule already exists type %d", rule_type))
|
||||
return 0;
|
||||
|
||||
*rule_p = mlx5_add_flow_rules(ft, spec, &flow_act, &dest, 1);
|
||||
|
||||
if (IS_ERR(*rule_p)) {
|
||||
@@ -397,8 +400,7 @@ static void mlx5e_add_vlan_rules(struct mlx5e_priv *priv)
|
||||
for_each_set_bit(i, priv->fs.vlan.active_svlans, VLAN_N_VID)
|
||||
mlx5e_add_vlan_rule(priv, MLX5E_VLAN_RULE_TYPE_MATCH_STAG_VID, i);
|
||||
|
||||
if (priv->fs.vlan.cvlan_filter_disabled &&
|
||||
!(priv->netdev->flags & IFF_PROMISC))
|
||||
if (priv->fs.vlan.cvlan_filter_disabled)
|
||||
mlx5e_add_any_vid_rules(priv);
|
||||
}
|
||||
|
||||
@@ -415,8 +417,12 @@ static void mlx5e_del_vlan_rules(struct mlx5e_priv *priv)
|
||||
for_each_set_bit(i, priv->fs.vlan.active_svlans, VLAN_N_VID)
|
||||
mlx5e_del_vlan_rule(priv, MLX5E_VLAN_RULE_TYPE_MATCH_STAG_VID, i);
|
||||
|
||||
if (priv->fs.vlan.cvlan_filter_disabled &&
|
||||
!(priv->netdev->flags & IFF_PROMISC))
|
||||
WARN_ON_ONCE(!(test_bit(MLX5E_STATE_DESTROYING, &priv->state)));
|
||||
|
||||
/* must be called after DESTROY bit is set and
|
||||
* set_rx_mode is called and flushed
|
||||
*/
|
||||
if (priv->fs.vlan.cvlan_filter_disabled)
|
||||
mlx5e_del_any_vid_rules(priv);
|
||||
}
|
||||
|
||||
|
||||
@@ -1337,51 +1337,6 @@ static inline int ravb_hook_irq(unsigned int irq, irq_handler_t handler,
|
||||
return error;
|
||||
}
|
||||
|
||||
/* MDIO bus init function */
|
||||
static int ravb_mdio_init(struct ravb_private *priv)
|
||||
{
|
||||
struct platform_device *pdev = priv->pdev;
|
||||
struct device *dev = &pdev->dev;
|
||||
int error;
|
||||
|
||||
/* Bitbang init */
|
||||
priv->mdiobb.ops = &bb_ops;
|
||||
|
||||
/* MII controller setting */
|
||||
priv->mii_bus = alloc_mdio_bitbang(&priv->mdiobb);
|
||||
if (!priv->mii_bus)
|
||||
return -ENOMEM;
|
||||
|
||||
/* Hook up MII support for ethtool */
|
||||
priv->mii_bus->name = "ravb_mii";
|
||||
priv->mii_bus->parent = dev;
|
||||
snprintf(priv->mii_bus->id, MII_BUS_ID_SIZE, "%s-%x",
|
||||
pdev->name, pdev->id);
|
||||
|
||||
/* Register MDIO bus */
|
||||
error = of_mdiobus_register(priv->mii_bus, dev->of_node);
|
||||
if (error)
|
||||
goto out_free_bus;
|
||||
|
||||
return 0;
|
||||
|
||||
out_free_bus:
|
||||
free_mdio_bitbang(priv->mii_bus);
|
||||
return error;
|
||||
}
|
||||
|
||||
/* MDIO bus release function */
|
||||
static int ravb_mdio_release(struct ravb_private *priv)
|
||||
{
|
||||
/* Unregister mdio bus */
|
||||
mdiobus_unregister(priv->mii_bus);
|
||||
|
||||
/* Free bitbang info */
|
||||
free_mdio_bitbang(priv->mii_bus);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Network device open function for Ethernet AVB */
|
||||
static int ravb_open(struct net_device *ndev)
|
||||
{
|
||||
@@ -1390,13 +1345,6 @@ static int ravb_open(struct net_device *ndev)
|
||||
struct device *dev = &pdev->dev;
|
||||
int error;
|
||||
|
||||
/* MDIO bus init */
|
||||
error = ravb_mdio_init(priv);
|
||||
if (error) {
|
||||
netdev_err(ndev, "failed to initialize MDIO\n");
|
||||
return error;
|
||||
}
|
||||
|
||||
napi_enable(&priv->napi[RAVB_BE]);
|
||||
napi_enable(&priv->napi[RAVB_NC]);
|
||||
|
||||
@@ -1474,7 +1422,6 @@ static int ravb_open(struct net_device *ndev)
|
||||
out_napi_off:
|
||||
napi_disable(&priv->napi[RAVB_NC]);
|
||||
napi_disable(&priv->napi[RAVB_BE]);
|
||||
ravb_mdio_release(priv);
|
||||
return error;
|
||||
}
|
||||
|
||||
@@ -1774,8 +1721,6 @@ static int ravb_close(struct net_device *ndev)
|
||||
ravb_ring_free(ndev, RAVB_BE);
|
||||
ravb_ring_free(ndev, RAVB_NC);
|
||||
|
||||
ravb_mdio_release(priv);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1922,6 +1867,51 @@ static const struct net_device_ops ravb_netdev_ops = {
|
||||
.ndo_set_features = ravb_set_features,
|
||||
};
|
||||
|
||||
/* MDIO bus init function */
|
||||
static int ravb_mdio_init(struct ravb_private *priv)
|
||||
{
|
||||
struct platform_device *pdev = priv->pdev;
|
||||
struct device *dev = &pdev->dev;
|
||||
int error;
|
||||
|
||||
/* Bitbang init */
|
||||
priv->mdiobb.ops = &bb_ops;
|
||||
|
||||
/* MII controller setting */
|
||||
priv->mii_bus = alloc_mdio_bitbang(&priv->mdiobb);
|
||||
if (!priv->mii_bus)
|
||||
return -ENOMEM;
|
||||
|
||||
/* Hook up MII support for ethtool */
|
||||
priv->mii_bus->name = "ravb_mii";
|
||||
priv->mii_bus->parent = dev;
|
||||
snprintf(priv->mii_bus->id, MII_BUS_ID_SIZE, "%s-%x",
|
||||
pdev->name, pdev->id);
|
||||
|
||||
/* Register MDIO bus */
|
||||
error = of_mdiobus_register(priv->mii_bus, dev->of_node);
|
||||
if (error)
|
||||
goto out_free_bus;
|
||||
|
||||
return 0;
|
||||
|
||||
out_free_bus:
|
||||
free_mdio_bitbang(priv->mii_bus);
|
||||
return error;
|
||||
}
|
||||
|
||||
/* MDIO bus release function */
|
||||
static int ravb_mdio_release(struct ravb_private *priv)
|
||||
{
|
||||
/* Unregister mdio bus */
|
||||
mdiobus_unregister(priv->mii_bus);
|
||||
|
||||
/* Free bitbang info */
|
||||
free_mdio_bitbang(priv->mii_bus);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct of_device_id ravb_match_table[] = {
|
||||
{ .compatible = "renesas,etheravb-r8a7790", .data = (void *)RCAR_GEN2 },
|
||||
{ .compatible = "renesas,etheravb-r8a7794", .data = (void *)RCAR_GEN2 },
|
||||
@@ -2148,6 +2138,13 @@ static int ravb_probe(struct platform_device *pdev)
|
||||
eth_hw_addr_random(ndev);
|
||||
}
|
||||
|
||||
/* MDIO bus init */
|
||||
error = ravb_mdio_init(priv);
|
||||
if (error) {
|
||||
dev_err(&pdev->dev, "failed to initialize MDIO\n");
|
||||
goto out_dma_free;
|
||||
}
|
||||
|
||||
netif_napi_add(ndev, &priv->napi[RAVB_BE], ravb_poll, 64);
|
||||
netif_napi_add(ndev, &priv->napi[RAVB_NC], ravb_poll, 64);
|
||||
|
||||
@@ -2169,6 +2166,8 @@ static int ravb_probe(struct platform_device *pdev)
|
||||
out_napi_del:
|
||||
netif_napi_del(&priv->napi[RAVB_NC]);
|
||||
netif_napi_del(&priv->napi[RAVB_BE]);
|
||||
ravb_mdio_release(priv);
|
||||
out_dma_free:
|
||||
dma_free_coherent(ndev->dev.parent, priv->desc_bat_size, priv->desc_bat,
|
||||
priv->desc_bat_dma);
|
||||
|
||||
@@ -2200,6 +2199,7 @@ static int ravb_remove(struct platform_device *pdev)
|
||||
unregister_netdev(ndev);
|
||||
netif_napi_del(&priv->napi[RAVB_NC]);
|
||||
netif_napi_del(&priv->napi[RAVB_BE]);
|
||||
ravb_mdio_release(priv);
|
||||
pm_runtime_disable(&pdev->dev);
|
||||
free_netdev(ndev);
|
||||
platform_set_drvdata(pdev, NULL);
|
||||
|
||||
@@ -694,23 +694,16 @@ static int stmmac_ethtool_op_set_eee(struct net_device *dev,
|
||||
struct stmmac_priv *priv = netdev_priv(dev);
|
||||
int ret;
|
||||
|
||||
if (!edata->eee_enabled) {
|
||||
if (!priv->dma_cap.eee)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
if (!edata->eee_enabled)
|
||||
stmmac_disable_eee_mode(priv);
|
||||
} else {
|
||||
/* We are asking for enabling the EEE but it is safe
|
||||
* to verify all by invoking the eee_init function.
|
||||
* In case of failure it will return an error.
|
||||
*/
|
||||
edata->eee_enabled = stmmac_eee_init(priv);
|
||||
if (!edata->eee_enabled)
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
ret = phy_ethtool_set_eee(dev->phydev, edata);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
priv->eee_enabled = edata->eee_enabled;
|
||||
priv->tx_lpi_timer = edata->tx_lpi_timer;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1085,6 +1085,7 @@ static rx_handler_result_t macsec_handle_frame(struct sk_buff **pskb)
|
||||
struct macsec_rx_sa *rx_sa;
|
||||
struct macsec_rxh_data *rxd;
|
||||
struct macsec_dev *macsec;
|
||||
unsigned int len;
|
||||
sci_t sci;
|
||||
u32 pn;
|
||||
bool cbit;
|
||||
@@ -1240,9 +1241,10 @@ static rx_handler_result_t macsec_handle_frame(struct sk_buff **pskb)
|
||||
macsec_rxsc_put(rx_sc);
|
||||
|
||||
skb_orphan(skb);
|
||||
len = skb->len;
|
||||
ret = gro_cells_receive(&macsec->gro_cells, skb);
|
||||
if (ret == NET_RX_SUCCESS)
|
||||
count_rx(dev, skb->len);
|
||||
count_rx(dev, len);
|
||||
else
|
||||
macsec->secy.netdev->stats.rx_dropped++;
|
||||
|
||||
|
||||
@@ -154,6 +154,7 @@ config MDIO_THUNDER
|
||||
depends on 64BIT
|
||||
depends on PCI
|
||||
select MDIO_CAVIUM
|
||||
select MDIO_DEVRES
|
||||
help
|
||||
This driver supports the MDIO interfaces found on Cavium
|
||||
ThunderX SoCs when the MDIO bus device appears as a PCI
|
||||
|
||||
@@ -294,7 +294,7 @@ static int __team_options_register(struct team *team,
|
||||
for (i--; i >= 0; i--)
|
||||
__team_option_inst_del_option(team, dst_opts[i]);
|
||||
|
||||
i = option_count - 1;
|
||||
i = option_count;
|
||||
alloc_rollback:
|
||||
for (i--; i >= 0; i--)
|
||||
kfree(dst_opts[i]);
|
||||
@@ -2086,6 +2086,7 @@ static void team_setup_by_port(struct net_device *dev,
|
||||
dev->header_ops = port_dev->header_ops;
|
||||
dev->type = port_dev->type;
|
||||
dev->hard_header_len = port_dev->hard_header_len;
|
||||
dev->needed_headroom = port_dev->needed_headroom;
|
||||
dev->addr_len = port_dev->addr_len;
|
||||
dev->mtu = port_dev->mtu;
|
||||
memcpy(dev->broadcast, port_dev->broadcast, port_dev->addr_len);
|
||||
|
||||
@@ -1735,6 +1735,7 @@ static const struct driver_info belkin_info = {
|
||||
.status = ax88179_status,
|
||||
.link_reset = ax88179_link_reset,
|
||||
.reset = ax88179_reset,
|
||||
.stop = ax88179_stop,
|
||||
.flags = FLAG_ETHER | FLAG_FRAMING_AX,
|
||||
.rx_fixup = ax88179_rx_fixup,
|
||||
.tx_fixup = ax88179_tx_fixup,
|
||||
|
||||
@@ -213,7 +213,7 @@ int rndis_command(struct usbnet *dev, struct rndis_msg_hdr *buf, int buflen)
|
||||
dev_dbg(&info->control->dev,
|
||||
"rndis response error, code %d\n", retval);
|
||||
}
|
||||
msleep(20);
|
||||
msleep(40);
|
||||
}
|
||||
dev_dbg(&info->control->dev, "rndis response timeout\n");
|
||||
return -ETIMEDOUT;
|
||||
|
||||
@@ -277,12 +277,20 @@ static int write_mii_word(rtl8150_t * dev, u8 phy, __u8 indx, u16 reg)
|
||||
return 1;
|
||||
}
|
||||
|
||||
static inline void set_ethernet_addr(rtl8150_t * dev)
|
||||
static void set_ethernet_addr(rtl8150_t *dev)
|
||||
{
|
||||
u8 node_id[6];
|
||||
u8 node_id[ETH_ALEN];
|
||||
int ret;
|
||||
|
||||
get_registers(dev, IDR, sizeof(node_id), node_id);
|
||||
memcpy(dev->netdev->dev_addr, node_id, sizeof(node_id));
|
||||
ret = get_registers(dev, IDR, sizeof(node_id), node_id);
|
||||
|
||||
if (ret == sizeof(node_id)) {
|
||||
ether_addr_copy(dev->netdev->dev_addr, node_id);
|
||||
} else {
|
||||
eth_hw_addr_random(dev->netdev);
|
||||
netdev_notice(dev->netdev, "Assigned a random MAC address: %pM\n",
|
||||
dev->netdev->dev_addr);
|
||||
}
|
||||
}
|
||||
|
||||
static int rtl8150_set_mac_address(struct net_device *netdev, void *p)
|
||||
|
||||
@@ -121,6 +121,7 @@ static void cisco_keepalive_send(struct net_device *dev, u32 type,
|
||||
skb_put(skb, sizeof(struct cisco_packet));
|
||||
skb->priority = TC_PRIO_CONTROL;
|
||||
skb->dev = dev;
|
||||
skb->protocol = htons(ETH_P_HDLC);
|
||||
skb_reset_network_header(skb);
|
||||
|
||||
dev_queue_xmit(skb);
|
||||
|
||||
@@ -436,6 +436,8 @@ static netdev_tx_t pvc_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
if (pvc->state.fecn) /* TX Congestion counter */
|
||||
dev->stats.tx_compressed++;
|
||||
skb->dev = pvc->frad;
|
||||
skb->protocol = htons(ETH_P_HDLC);
|
||||
skb_reset_network_header(skb);
|
||||
dev_queue_xmit(skb);
|
||||
return NETDEV_TX_OK;
|
||||
}
|
||||
@@ -558,6 +560,7 @@ static void fr_lmi_send(struct net_device *dev, int fullrep)
|
||||
skb_put(skb, i);
|
||||
skb->priority = TC_PRIO_CONTROL;
|
||||
skb->dev = dev;
|
||||
skb->protocol = htons(ETH_P_HDLC);
|
||||
skb_reset_network_header(skb);
|
||||
|
||||
dev_queue_xmit(skb);
|
||||
@@ -1044,7 +1047,7 @@ static void pvc_setup(struct net_device *dev)
|
||||
{
|
||||
dev->type = ARPHRD_DLCI;
|
||||
dev->flags = IFF_POINTOPOINT;
|
||||
dev->hard_header_len = 10;
|
||||
dev->hard_header_len = 0;
|
||||
dev->addr_len = 2;
|
||||
netif_keep_dst(dev);
|
||||
}
|
||||
@@ -1096,6 +1099,7 @@ static int fr_add_pvc(struct net_device *frad, unsigned int dlci, int type)
|
||||
dev->mtu = HDLC_MAX_MTU;
|
||||
dev->min_mtu = 68;
|
||||
dev->max_mtu = HDLC_MAX_MTU;
|
||||
dev->needed_headroom = 10;
|
||||
dev->priv_flags |= IFF_NO_QUEUE;
|
||||
dev->ml_priv = pvc;
|
||||
|
||||
|
||||
@@ -254,6 +254,7 @@ static void ppp_tx_cp(struct net_device *dev, u16 pid, u8 code,
|
||||
|
||||
skb->priority = TC_PRIO_CONTROL;
|
||||
skb->dev = dev;
|
||||
skb->protocol = htons(ETH_P_HDLC);
|
||||
skb_reset_network_header(skb);
|
||||
skb_queue_tail(&tx_queue, skb);
|
||||
}
|
||||
|
||||
@@ -201,8 +201,6 @@ static void lapbeth_data_transmit(struct net_device *ndev, struct sk_buff *skb)
|
||||
struct net_device *dev;
|
||||
int size = skb->len;
|
||||
|
||||
skb->protocol = htons(ETH_P_X25);
|
||||
|
||||
ptr = skb_push(skb, 2);
|
||||
|
||||
*ptr++ = size % 256;
|
||||
@@ -213,6 +211,8 @@ static void lapbeth_data_transmit(struct net_device *ndev, struct sk_buff *skb)
|
||||
|
||||
skb->dev = dev = lapbeth->ethdev;
|
||||
|
||||
skb->protocol = htons(ETH_P_DEC);
|
||||
|
||||
skb_reset_network_header(skb);
|
||||
|
||||
dev_hard_header(skb, dev, ETH_P_DEC, bcast_addr, NULL, 0);
|
||||
|
||||
@@ -2605,10 +2605,26 @@ static int nvme_dev_open(struct inode *inode, struct file *file)
|
||||
return -EWOULDBLOCK;
|
||||
}
|
||||
|
||||
nvme_get_ctrl(ctrl);
|
||||
if (!try_module_get(ctrl->ops->module)) {
|
||||
nvme_put_ctrl(ctrl);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
file->private_data = ctrl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int nvme_dev_release(struct inode *inode, struct file *file)
|
||||
{
|
||||
struct nvme_ctrl *ctrl =
|
||||
container_of(inode->i_cdev, struct nvme_ctrl, cdev);
|
||||
|
||||
module_put(ctrl->ops->module);
|
||||
nvme_put_ctrl(ctrl);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int nvme_dev_user_cmd(struct nvme_ctrl *ctrl, void __user *argp)
|
||||
{
|
||||
struct nvme_ns *ns;
|
||||
@@ -2669,6 +2685,7 @@ static long nvme_dev_ioctl(struct file *file, unsigned int cmd,
|
||||
static const struct file_operations nvme_dev_fops = {
|
||||
.owner = THIS_MODULE,
|
||||
.open = nvme_dev_open,
|
||||
.release = nvme_dev_release,
|
||||
.unlocked_ioctl = nvme_dev_ioctl,
|
||||
.compat_ioctl = nvme_dev_ioctl,
|
||||
};
|
||||
|
||||
@@ -3294,12 +3294,14 @@ nvme_fc_create_ctrl(struct device *dev, struct nvmf_ctrl_options *opts)
|
||||
spin_lock_irqsave(&nvme_fc_lock, flags);
|
||||
list_for_each_entry(lport, &nvme_fc_lport_list, port_list) {
|
||||
if (lport->localport.node_name != laddr.nn ||
|
||||
lport->localport.port_name != laddr.pn)
|
||||
lport->localport.port_name != laddr.pn ||
|
||||
lport->localport.port_state != FC_OBJSTATE_ONLINE)
|
||||
continue;
|
||||
|
||||
list_for_each_entry(rport, &lport->endp_list, endp_list) {
|
||||
if (rport->remoteport.node_name != raddr.nn ||
|
||||
rport->remoteport.port_name != raddr.pn)
|
||||
rport->remoteport.port_name != raddr.pn ||
|
||||
rport->remoteport.port_state != FC_OBJSTATE_ONLINE)
|
||||
continue;
|
||||
|
||||
/* if fail to get reference fall through. Will error */
|
||||
|
||||
@@ -418,7 +418,7 @@ static struct mvebu_mpp_mode mv98dx3236_mpp_modes[] = {
|
||||
MPP_VAR_FUNCTION(0x1, "i2c0", "sck", V_98DX3236_PLUS)),
|
||||
MPP_MODE(15,
|
||||
MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_98DX3236_PLUS),
|
||||
MPP_VAR_FUNCTION(0x4, "i2c0", "sda", V_98DX3236_PLUS)),
|
||||
MPP_VAR_FUNCTION(0x1, "i2c0", "sda", V_98DX3236_PLUS)),
|
||||
MPP_MODE(16,
|
||||
MPP_VAR_FUNCTION(0x0, "gpo", NULL, V_98DX3236_PLUS),
|
||||
MPP_VAR_FUNCTION(0x4, "dev", "oe", V_98DX3236_PLUS)),
|
||||
|
||||
@@ -235,6 +235,7 @@ config FUJITSU_LAPTOP
|
||||
depends on BACKLIGHT_CLASS_DEVICE
|
||||
depends on ACPI_VIDEO || ACPI_VIDEO = n
|
||||
select INPUT_SPARSEKMAP
|
||||
select NEW_LEDS
|
||||
select LEDS_CLASS
|
||||
---help---
|
||||
This is a driver for laptops built by Fujitsu:
|
||||
|
||||
@@ -15,9 +15,13 @@
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/suspend.h>
|
||||
|
||||
/* Returned when NOT in tablet mode on some HP Stream x360 11 models */
|
||||
#define VGBS_TABLET_MODE_FLAG_ALT 0x10
|
||||
/* When NOT in tablet mode, VGBS returns with the flag 0x40 */
|
||||
#define TABLET_MODE_FLAG 0x40
|
||||
#define DOCK_MODE_FLAG 0x80
|
||||
#define VGBS_TABLET_MODE_FLAG 0x40
|
||||
#define VGBS_DOCK_MODE_FLAG 0x80
|
||||
|
||||
#define VGBS_TABLET_MODE_FLAGS (VGBS_TABLET_MODE_FLAG | VGBS_TABLET_MODE_FLAG_ALT)
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("AceLan Kao");
|
||||
@@ -148,26 +152,60 @@ static void detect_tablet_mode(struct platform_device *device)
|
||||
if (ACPI_FAILURE(status))
|
||||
return;
|
||||
|
||||
m = !(vgbs & TABLET_MODE_FLAG);
|
||||
m = !(vgbs & VGBS_TABLET_MODE_FLAGS);
|
||||
input_report_switch(priv->input_dev, SW_TABLET_MODE, m);
|
||||
m = (vgbs & DOCK_MODE_FLAG) ? 1 : 0;
|
||||
m = (vgbs & VGBS_DOCK_MODE_FLAG) ? 1 : 0;
|
||||
input_report_switch(priv->input_dev, SW_DOCK, m);
|
||||
}
|
||||
|
||||
/*
|
||||
* There are several laptops (non 2-in-1) models out there which support VGBS,
|
||||
* but simply always return 0, which we translate to SW_TABLET_MODE=1. This in
|
||||
* turn causes userspace (libinput) to suppress events from the builtin
|
||||
* keyboard and touchpad, making the laptop essentially unusable.
|
||||
*
|
||||
* Since the problem of wrongly reporting SW_TABLET_MODE=1 in combination
|
||||
* with libinput, leads to a non-usable system. Where as OTOH many people will
|
||||
* not even notice when SW_TABLET_MODE is not being reported, a DMI based allow
|
||||
* list is used here. This list mainly matches on the chassis-type of 2-in-1s.
|
||||
*
|
||||
* There are also some 2-in-1s which use the intel-vbtn ACPI interface to report
|
||||
* SW_TABLET_MODE with a chassis-type of 8 ("Portable") or 10 ("Notebook"),
|
||||
* these are matched on a per model basis, since many normal laptops with a
|
||||
* possible broken VGBS ACPI-method also use these chassis-types.
|
||||
*/
|
||||
static const struct dmi_system_id dmi_switches_allow_list[] = {
|
||||
{
|
||||
.matches = {
|
||||
DMI_EXACT_MATCH(DMI_CHASSIS_TYPE, "31" /* Convertible */),
|
||||
},
|
||||
},
|
||||
{
|
||||
.matches = {
|
||||
DMI_EXACT_MATCH(DMI_CHASSIS_TYPE, "32" /* Detachable */),
|
||||
},
|
||||
},
|
||||
{
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "Venue 11 Pro 7130"),
|
||||
},
|
||||
},
|
||||
{
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "HP Stream x360 Convertible PC 11"),
|
||||
},
|
||||
},
|
||||
{} /* Array terminator */
|
||||
};
|
||||
|
||||
static bool intel_vbtn_has_switches(acpi_handle handle)
|
||||
{
|
||||
const char *chassis_type = dmi_get_system_info(DMI_CHASSIS_TYPE);
|
||||
unsigned long long vgbs;
|
||||
acpi_status status;
|
||||
|
||||
/*
|
||||
* Some normal laptops have a VGBS method despite being non-convertible
|
||||
* and their VGBS method always returns 0, causing detect_tablet_mode()
|
||||
* to report SW_TABLET_MODE=1 to userspace, which causes issues.
|
||||
* These laptops have a DMI chassis_type of 9 ("Laptop"), do not report
|
||||
* switches on any devices with a DMI chassis_type of 9.
|
||||
*/
|
||||
if (chassis_type && strcmp(chassis_type, "9") == 0)
|
||||
if (!dmi_check_system(dmi_switches_allow_list))
|
||||
return false;
|
||||
|
||||
status = acpi_evaluate_integer(handle, "VGBS", NULL, &vgbs);
|
||||
|
||||
@@ -2597,7 +2597,7 @@ static void hotkey_compare_and_issue_event(struct tp_nvram_state *oldn,
|
||||
*/
|
||||
static int hotkey_kthread(void *data)
|
||||
{
|
||||
struct tp_nvram_state s[2];
|
||||
struct tp_nvram_state s[2] = { 0 };
|
||||
u32 poll_mask, event_mask;
|
||||
unsigned int si, so;
|
||||
unsigned long t;
|
||||
@@ -6879,8 +6879,10 @@ static int __init tpacpi_query_bcl_levels(acpi_handle handle)
|
||||
list_for_each_entry(child, &device->children, node) {
|
||||
acpi_status status = acpi_evaluate_object(child->handle, "_BCL",
|
||||
NULL, &buffer);
|
||||
if (ACPI_FAILURE(status))
|
||||
if (ACPI_FAILURE(status)) {
|
||||
buffer.length = ACPI_ALLOCATE_BUFFER;
|
||||
continue;
|
||||
}
|
||||
|
||||
obj = (union acpi_object *)buffer.pointer;
|
||||
if (!obj || (obj->type != ACPI_TYPE_PACKAGE)) {
|
||||
|
||||
@@ -559,13 +559,14 @@ static void fsl_espi_cpu_irq(struct fsl_espi *espi, u32 events)
|
||||
static irqreturn_t fsl_espi_irq(s32 irq, void *context_data)
|
||||
{
|
||||
struct fsl_espi *espi = context_data;
|
||||
u32 events;
|
||||
u32 events, mask;
|
||||
|
||||
spin_lock(&espi->lock);
|
||||
|
||||
/* Get interrupt events(tx/rx) */
|
||||
events = fsl_espi_read_reg(espi, ESPI_SPIE);
|
||||
if (!events) {
|
||||
mask = fsl_espi_read_reg(espi, ESPI_SPIM);
|
||||
if (!(events & mask)) {
|
||||
spin_unlock(&espi->lock);
|
||||
return IRQ_NONE;
|
||||
}
|
||||
|
||||
@@ -667,6 +667,9 @@ static int vmk80xx_find_usb_endpoints(struct comedi_device *dev)
|
||||
if (!devpriv->ep_rx || !devpriv->ep_tx)
|
||||
return -ENODEV;
|
||||
|
||||
if (!usb_endpoint_maxp(devpriv->ep_rx) || !usb_endpoint_maxp(devpriv->ep_tx))
|
||||
return -EINVAL;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -1192,7 +1192,6 @@ static int ncm_unwrap_ntb(struct gether *port,
|
||||
const struct ndp_parser_opts *opts = ncm->parser_opts;
|
||||
unsigned crc_len = ncm->is_crc ? sizeof(uint32_t) : 0;
|
||||
int dgram_counter;
|
||||
bool ndp_after_header;
|
||||
|
||||
/* dwSignature */
|
||||
if (get_unaligned_le32(tmp) != opts->nth_sign) {
|
||||
@@ -1219,7 +1218,6 @@ static int ncm_unwrap_ntb(struct gether *port,
|
||||
}
|
||||
|
||||
ndp_index = get_ncm(&tmp, opts->ndp_index);
|
||||
ndp_after_header = false;
|
||||
|
||||
/* Run through all the NDP's in the NTB */
|
||||
do {
|
||||
@@ -1235,8 +1233,6 @@ static int ncm_unwrap_ntb(struct gether *port,
|
||||
ndp_index);
|
||||
goto err;
|
||||
}
|
||||
if (ndp_index == opts->nth_size)
|
||||
ndp_after_header = true;
|
||||
|
||||
/*
|
||||
* walk through NDP
|
||||
@@ -1315,37 +1311,13 @@ static int ncm_unwrap_ntb(struct gether *port,
|
||||
index2 = get_ncm(&tmp, opts->dgram_item_len);
|
||||
dg_len2 = get_ncm(&tmp, opts->dgram_item_len);
|
||||
|
||||
if (index2 == 0 || dg_len2 == 0)
|
||||
break;
|
||||
|
||||
/* wDatagramIndex[1] */
|
||||
if (ndp_after_header) {
|
||||
if (index2 < opts->nth_size + opts->ndp_size) {
|
||||
INFO(port->func.config->cdev,
|
||||
"Bad index: %#X\n", index2);
|
||||
goto err;
|
||||
}
|
||||
} else {
|
||||
if (index2 < opts->nth_size + opts->dpe_size) {
|
||||
INFO(port->func.config->cdev,
|
||||
"Bad index: %#X\n", index2);
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
if (index2 > block_len - opts->dpe_size) {
|
||||
INFO(port->func.config->cdev,
|
||||
"Bad index: %#X\n", index2);
|
||||
goto err;
|
||||
}
|
||||
|
||||
/* wDatagramLength[1] */
|
||||
if ((dg_len2 < 14 + crc_len) ||
|
||||
(dg_len2 > frame_max)) {
|
||||
INFO(port->func.config->cdev,
|
||||
"Bad dgram length: %#X\n", dg_len);
|
||||
goto err;
|
||||
}
|
||||
|
||||
/*
|
||||
* Copy the data into a new skb.
|
||||
* This ensures the truesize is correct
|
||||
@@ -1362,6 +1334,8 @@ static int ncm_unwrap_ntb(struct gether *port,
|
||||
ndp_len -= 2 * (opts->dgram_item_len * 2);
|
||||
|
||||
dgram_counter++;
|
||||
if (index2 == 0 || dg_len2 == 0)
|
||||
break;
|
||||
} while (ndp_len > 2 * (opts->dgram_item_len * 2));
|
||||
} while (ndp_index);
|
||||
|
||||
|
||||
@@ -1027,6 +1027,11 @@ static const struct usb_device_id id_table_combined[] = {
|
||||
/* U-Blox devices */
|
||||
{ USB_DEVICE(UBLOX_VID, UBLOX_C099F9P_ZED_PID) },
|
||||
{ USB_DEVICE(UBLOX_VID, UBLOX_C099F9P_ODIN_PID) },
|
||||
/* FreeCalypso USB adapters */
|
||||
{ USB_DEVICE(FTDI_VID, FTDI_FALCONIA_JTAG_BUF_PID),
|
||||
.driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
|
||||
{ USB_DEVICE(FTDI_VID, FTDI_FALCONIA_JTAG_UNBUF_PID),
|
||||
.driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
|
||||
{ } /* Terminating entry */
|
||||
};
|
||||
|
||||
|
||||
@@ -39,6 +39,13 @@
|
||||
|
||||
#define FTDI_LUMEL_PD12_PID 0x6002
|
||||
|
||||
/*
|
||||
* Custom USB adapters made by Falconia Partners LLC
|
||||
* for FreeCalypso project, ID codes allocated to Falconia by FTDI.
|
||||
*/
|
||||
#define FTDI_FALCONIA_JTAG_BUF_PID 0x7150
|
||||
#define FTDI_FALCONIA_JTAG_UNBUF_PID 0x7151
|
||||
|
||||
/* Sienna Serial Interface by Secyourit GmbH */
|
||||
#define FTDI_SIENNA_PID 0x8348
|
||||
|
||||
|
||||
@@ -528,6 +528,7 @@ static void option_instat_callback(struct urb *urb);
|
||||
/* Cellient products */
|
||||
#define CELLIENT_VENDOR_ID 0x2692
|
||||
#define CELLIENT_PRODUCT_MEN200 0x9005
|
||||
#define CELLIENT_PRODUCT_MPL200 0x9025
|
||||
|
||||
/* Hyundai Petatel Inc. products */
|
||||
#define PETATEL_VENDOR_ID 0x1ff4
|
||||
@@ -1186,6 +1187,8 @@ static const struct usb_device_id option_ids[] = {
|
||||
.driver_info = NCTRL(2) | RSVD(3) },
|
||||
{ USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1053, 0xff), /* Telit FN980 (ECM) */
|
||||
.driver_info = NCTRL(0) | RSVD(1) },
|
||||
{ USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1054, 0xff), /* Telit FT980-KS */
|
||||
.driver_info = NCTRL(2) | RSVD(3) },
|
||||
{ USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_ME910),
|
||||
.driver_info = NCTRL(0) | RSVD(1) | RSVD(3) },
|
||||
{ USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_ME910_DUAL_MODEM),
|
||||
@@ -1982,6 +1985,8 @@ static const struct usb_device_id option_ids[] = {
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_DC_4COM2, 0xff, 0x02, 0x01) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_DC_4COM2, 0xff, 0x00, 0x00) },
|
||||
{ USB_DEVICE(CELLIENT_VENDOR_ID, CELLIENT_PRODUCT_MEN200) },
|
||||
{ USB_DEVICE(CELLIENT_VENDOR_ID, CELLIENT_PRODUCT_MPL200),
|
||||
.driver_info = RSVD(1) | RSVD(4) },
|
||||
{ USB_DEVICE(PETATEL_VENDOR_ID, PETATEL_PRODUCT_NP10T_600A) },
|
||||
{ USB_DEVICE(PETATEL_VENDOR_ID, PETATEL_PRODUCT_NP10T_600E) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(TPLINK_VENDOR_ID, TPLINK_PRODUCT_LTE, 0xff, 0x00, 0x00) }, /* TP-Link LTE Module */
|
||||
|
||||
@@ -94,6 +94,7 @@ static const struct usb_device_id id_table[] = {
|
||||
{ USB_DEVICE(HP_VENDOR_ID, HP_LD220_PRODUCT_ID) },
|
||||
{ USB_DEVICE(HP_VENDOR_ID, HP_LD220TA_PRODUCT_ID) },
|
||||
{ USB_DEVICE(HP_VENDOR_ID, HP_LD381_PRODUCT_ID) },
|
||||
{ USB_DEVICE(HP_VENDOR_ID, HP_LD381GC_PRODUCT_ID) },
|
||||
{ USB_DEVICE(HP_VENDOR_ID, HP_LD960_PRODUCT_ID) },
|
||||
{ USB_DEVICE(HP_VENDOR_ID, HP_LD960TA_PRODUCT_ID) },
|
||||
{ USB_DEVICE(HP_VENDOR_ID, HP_LCM220_PRODUCT_ID) },
|
||||
|
||||
@@ -121,6 +121,7 @@
|
||||
|
||||
/* Hewlett-Packard POS Pole Displays */
|
||||
#define HP_VENDOR_ID 0x03f0
|
||||
#define HP_LD381GC_PRODUCT_ID 0x0183
|
||||
#define HP_LM920_PRODUCT_ID 0x026b
|
||||
#define HP_TD620_PRODUCT_ID 0x0956
|
||||
#define HP_LD960_PRODUCT_ID 0x0b39
|
||||
|
||||
@@ -383,6 +383,52 @@ static bool vhost_vsock_more_replies(struct vhost_vsock *vsock)
|
||||
return val < vq->num;
|
||||
}
|
||||
|
||||
static struct virtio_transport vhost_transport = {
|
||||
.transport = {
|
||||
.get_local_cid = vhost_transport_get_local_cid,
|
||||
|
||||
.init = virtio_transport_do_socket_init,
|
||||
.destruct = virtio_transport_destruct,
|
||||
.release = virtio_transport_release,
|
||||
.connect = virtio_transport_connect,
|
||||
.shutdown = virtio_transport_shutdown,
|
||||
.cancel_pkt = vhost_transport_cancel_pkt,
|
||||
|
||||
.dgram_enqueue = virtio_transport_dgram_enqueue,
|
||||
.dgram_dequeue = virtio_transport_dgram_dequeue,
|
||||
.dgram_bind = virtio_transport_dgram_bind,
|
||||
.dgram_allow = virtio_transport_dgram_allow,
|
||||
|
||||
.stream_enqueue = virtio_transport_stream_enqueue,
|
||||
.stream_dequeue = virtio_transport_stream_dequeue,
|
||||
.stream_has_data = virtio_transport_stream_has_data,
|
||||
.stream_has_space = virtio_transport_stream_has_space,
|
||||
.stream_rcvhiwat = virtio_transport_stream_rcvhiwat,
|
||||
.stream_is_active = virtio_transport_stream_is_active,
|
||||
.stream_allow = virtio_transport_stream_allow,
|
||||
|
||||
.notify_poll_in = virtio_transport_notify_poll_in,
|
||||
.notify_poll_out = virtio_transport_notify_poll_out,
|
||||
.notify_recv_init = virtio_transport_notify_recv_init,
|
||||
.notify_recv_pre_block = virtio_transport_notify_recv_pre_block,
|
||||
.notify_recv_pre_dequeue = virtio_transport_notify_recv_pre_dequeue,
|
||||
.notify_recv_post_dequeue = virtio_transport_notify_recv_post_dequeue,
|
||||
.notify_send_init = virtio_transport_notify_send_init,
|
||||
.notify_send_pre_block = virtio_transport_notify_send_pre_block,
|
||||
.notify_send_pre_enqueue = virtio_transport_notify_send_pre_enqueue,
|
||||
.notify_send_post_enqueue = virtio_transport_notify_send_post_enqueue,
|
||||
|
||||
.set_buffer_size = virtio_transport_set_buffer_size,
|
||||
.set_min_buffer_size = virtio_transport_set_min_buffer_size,
|
||||
.set_max_buffer_size = virtio_transport_set_max_buffer_size,
|
||||
.get_buffer_size = virtio_transport_get_buffer_size,
|
||||
.get_min_buffer_size = virtio_transport_get_min_buffer_size,
|
||||
.get_max_buffer_size = virtio_transport_get_max_buffer_size,
|
||||
},
|
||||
|
||||
.send_pkt = vhost_transport_send_pkt,
|
||||
};
|
||||
|
||||
static void vhost_vsock_handle_tx_kick(struct vhost_work *work)
|
||||
{
|
||||
struct vhost_virtqueue *vq = container_of(work, struct vhost_virtqueue,
|
||||
@@ -439,7 +485,7 @@ static void vhost_vsock_handle_tx_kick(struct vhost_work *work)
|
||||
if (le64_to_cpu(pkt->hdr.src_cid) == vsock->guest_cid &&
|
||||
le64_to_cpu(pkt->hdr.dst_cid) ==
|
||||
vhost_transport_get_local_cid())
|
||||
virtio_transport_recv_pkt(pkt);
|
||||
virtio_transport_recv_pkt(&vhost_transport, pkt);
|
||||
else
|
||||
virtio_transport_free_pkt(pkt);
|
||||
|
||||
@@ -792,52 +838,6 @@ static struct miscdevice vhost_vsock_misc = {
|
||||
.fops = &vhost_vsock_fops,
|
||||
};
|
||||
|
||||
static struct virtio_transport vhost_transport = {
|
||||
.transport = {
|
||||
.get_local_cid = vhost_transport_get_local_cid,
|
||||
|
||||
.init = virtio_transport_do_socket_init,
|
||||
.destruct = virtio_transport_destruct,
|
||||
.release = virtio_transport_release,
|
||||
.connect = virtio_transport_connect,
|
||||
.shutdown = virtio_transport_shutdown,
|
||||
.cancel_pkt = vhost_transport_cancel_pkt,
|
||||
|
||||
.dgram_enqueue = virtio_transport_dgram_enqueue,
|
||||
.dgram_dequeue = virtio_transport_dgram_dequeue,
|
||||
.dgram_bind = virtio_transport_dgram_bind,
|
||||
.dgram_allow = virtio_transport_dgram_allow,
|
||||
|
||||
.stream_enqueue = virtio_transport_stream_enqueue,
|
||||
.stream_dequeue = virtio_transport_stream_dequeue,
|
||||
.stream_has_data = virtio_transport_stream_has_data,
|
||||
.stream_has_space = virtio_transport_stream_has_space,
|
||||
.stream_rcvhiwat = virtio_transport_stream_rcvhiwat,
|
||||
.stream_is_active = virtio_transport_stream_is_active,
|
||||
.stream_allow = virtio_transport_stream_allow,
|
||||
|
||||
.notify_poll_in = virtio_transport_notify_poll_in,
|
||||
.notify_poll_out = virtio_transport_notify_poll_out,
|
||||
.notify_recv_init = virtio_transport_notify_recv_init,
|
||||
.notify_recv_pre_block = virtio_transport_notify_recv_pre_block,
|
||||
.notify_recv_pre_dequeue = virtio_transport_notify_recv_pre_dequeue,
|
||||
.notify_recv_post_dequeue = virtio_transport_notify_recv_post_dequeue,
|
||||
.notify_send_init = virtio_transport_notify_send_init,
|
||||
.notify_send_pre_block = virtio_transport_notify_send_pre_block,
|
||||
.notify_send_pre_enqueue = virtio_transport_notify_send_pre_enqueue,
|
||||
.notify_send_post_enqueue = virtio_transport_notify_send_post_enqueue,
|
||||
|
||||
.set_buffer_size = virtio_transport_set_buffer_size,
|
||||
.set_min_buffer_size = virtio_transport_set_min_buffer_size,
|
||||
.set_max_buffer_size = virtio_transport_set_max_buffer_size,
|
||||
.get_buffer_size = virtio_transport_get_buffer_size,
|
||||
.get_min_buffer_size = virtio_transport_get_min_buffer_size,
|
||||
.get_max_buffer_size = virtio_transport_get_max_buffer_size,
|
||||
},
|
||||
|
||||
.send_pkt = vhost_transport_send_pkt,
|
||||
};
|
||||
|
||||
static int __init vhost_vsock_init(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
@@ -35,12 +35,6 @@
|
||||
|
||||
#define FONT_DATA ((unsigned char *)font_vga_8x16.data)
|
||||
|
||||
/* borrowed from fbcon.c */
|
||||
#define REFCOUNT(fd) (((int *)(fd))[-1])
|
||||
#define FNTSIZE(fd) (((int *)(fd))[-2])
|
||||
#define FNTCHARCNT(fd) (((int *)(fd))[-3])
|
||||
#define FONT_EXTRA_WORDS 3
|
||||
|
||||
static unsigned char *font_data[MAX_NR_CONSOLES];
|
||||
|
||||
static struct newport_regs *npregs;
|
||||
@@ -522,6 +516,7 @@ static int newport_set_font(int unit, struct console_font *op)
|
||||
FNTSIZE(new_data) = size;
|
||||
FNTCHARCNT(new_data) = op->charcount;
|
||||
REFCOUNT(new_data) = 0; /* usage counter */
|
||||
FNTSUM(new_data) = 0;
|
||||
|
||||
p = new_data;
|
||||
for (i = 0; i < op->charcount; i++) {
|
||||
|
||||
@@ -2270,6 +2270,9 @@ static int fbcon_get_font(struct vc_data *vc, struct console_font *font)
|
||||
|
||||
if (font->width <= 8) {
|
||||
j = vc->vc_font.height;
|
||||
if (font->charcount * j > FNTSIZE(fontdata))
|
||||
return -EINVAL;
|
||||
|
||||
for (i = 0; i < font->charcount; i++) {
|
||||
memcpy(data, fontdata, j);
|
||||
memset(data + j, 0, 32 - j);
|
||||
@@ -2278,6 +2281,9 @@ static int fbcon_get_font(struct vc_data *vc, struct console_font *font)
|
||||
}
|
||||
} else if (font->width <= 16) {
|
||||
j = vc->vc_font.height * 2;
|
||||
if (font->charcount * j > FNTSIZE(fontdata))
|
||||
return -EINVAL;
|
||||
|
||||
for (i = 0; i < font->charcount; i++) {
|
||||
memcpy(data, fontdata, j);
|
||||
memset(data + j, 0, 64 - j);
|
||||
@@ -2285,6 +2291,9 @@ static int fbcon_get_font(struct vc_data *vc, struct console_font *font)
|
||||
fontdata += j;
|
||||
}
|
||||
} else if (font->width <= 24) {
|
||||
if (font->charcount * (vc->vc_font.height * sizeof(u32)) > FNTSIZE(fontdata))
|
||||
return -EINVAL;
|
||||
|
||||
for (i = 0; i < font->charcount; i++) {
|
||||
for (j = 0; j < vc->vc_font.height; j++) {
|
||||
*data++ = fontdata[0];
|
||||
@@ -2297,6 +2306,9 @@ static int fbcon_get_font(struct vc_data *vc, struct console_font *font)
|
||||
}
|
||||
} else {
|
||||
j = vc->vc_font.height * 4;
|
||||
if (font->charcount * j > FNTSIZE(fontdata))
|
||||
return -EINVAL;
|
||||
|
||||
for (i = 0; i < font->charcount; i++) {
|
||||
memcpy(data, fontdata, j);
|
||||
memset(data + j, 0, 128 - j);
|
||||
|
||||
@@ -152,13 +152,6 @@ static inline int attr_col_ec(int shift, struct vc_data *vc,
|
||||
#define attr_bgcol_ec(bgshift, vc, info) attr_col_ec(bgshift, vc, info, 0)
|
||||
#define attr_fgcol_ec(fgshift, vc, info) attr_col_ec(fgshift, vc, info, 1)
|
||||
|
||||
/* Font */
|
||||
#define REFCOUNT(fd) (((int *)(fd))[-1])
|
||||
#define FNTSIZE(fd) (((int *)(fd))[-2])
|
||||
#define FNTCHARCNT(fd) (((int *)(fd))[-3])
|
||||
#define FNTSUM(fd) (((int *)(fd))[-4])
|
||||
#define FONT_EXTRA_WORDS 4
|
||||
|
||||
/*
|
||||
* Scroll Method
|
||||
*/
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include <linux/fb.h>
|
||||
#include <linux/vt_kern.h>
|
||||
#include <linux/console.h>
|
||||
#include <linux/font.h>
|
||||
#include <asm/types.h>
|
||||
#include "fbcon.h"
|
||||
#include "fbcon_rotate.h"
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include <linux/fb.h>
|
||||
#include <linux/vt_kern.h>
|
||||
#include <linux/console.h>
|
||||
#include <linux/font.h>
|
||||
#include <asm/types.h>
|
||||
#include "fbcon.h"
|
||||
|
||||
|
||||
@@ -950,7 +950,7 @@ smb2_set_ea(const unsigned int xid, struct cifs_tcon *tcon,
|
||||
return rc;
|
||||
}
|
||||
|
||||
len = sizeof(ea) + ea_name_len + ea_value_len + 1;
|
||||
len = sizeof(*ea) + ea_name_len + ea_value_len + 1;
|
||||
ea = kzalloc(len, GFP_KERNEL);
|
||||
if (ea == NULL) {
|
||||
SMB2_close(xid, tcon, fid.persistent_fid, fid.volatile_fid);
|
||||
|
||||
@@ -223,8 +223,7 @@ struct eventpoll {
|
||||
struct file *file;
|
||||
|
||||
/* used to optimize loop detection check */
|
||||
int visited;
|
||||
struct list_head visited_list_link;
|
||||
u64 gen;
|
||||
|
||||
#ifdef CONFIG_NET_RX_BUSY_POLL
|
||||
/* used to track busy poll napi_id */
|
||||
@@ -274,6 +273,8 @@ static long max_user_watches __read_mostly;
|
||||
*/
|
||||
static DEFINE_MUTEX(epmutex);
|
||||
|
||||
static u64 loop_check_gen = 0;
|
||||
|
||||
/* Used to check for epoll file descriptor inclusion loops */
|
||||
static struct nested_calls poll_loop_ncalls;
|
||||
|
||||
@@ -283,9 +284,6 @@ static struct kmem_cache *epi_cache __read_mostly;
|
||||
/* Slab cache used to allocate "struct eppoll_entry" */
|
||||
static struct kmem_cache *pwq_cache __read_mostly;
|
||||
|
||||
/* Visited nodes during ep_loop_check(), so we can unset them when we finish */
|
||||
static LIST_HEAD(visited_list);
|
||||
|
||||
/*
|
||||
* List of files with newly added links, where we may need to limit the number
|
||||
* of emanating paths. Protected by the epmutex.
|
||||
@@ -1379,7 +1377,7 @@ static int reverse_path_check(void)
|
||||
|
||||
static int ep_create_wakeup_source(struct epitem *epi)
|
||||
{
|
||||
const char *name;
|
||||
struct name_snapshot n;
|
||||
struct wakeup_source *ws;
|
||||
|
||||
if (!epi->ep->ws) {
|
||||
@@ -1388,8 +1386,9 @@ static int ep_create_wakeup_source(struct epitem *epi)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
name = epi->ffd.file->f_path.dentry->d_name.name;
|
||||
ws = wakeup_source_register(NULL, name);
|
||||
take_dentry_name_snapshot(&n, epi->ffd.file->f_path.dentry);
|
||||
ws = wakeup_source_register(NULL, n.name);
|
||||
release_dentry_name_snapshot(&n);
|
||||
|
||||
if (!ws)
|
||||
return -ENOMEM;
|
||||
@@ -1451,6 +1450,22 @@ static int ep_insert(struct eventpoll *ep, const struct epoll_event *event,
|
||||
RCU_INIT_POINTER(epi->ws, NULL);
|
||||
}
|
||||
|
||||
/* Add the current item to the list of active epoll hook for this file */
|
||||
spin_lock(&tfile->f_lock);
|
||||
list_add_tail_rcu(&epi->fllink, &tfile->f_ep_links);
|
||||
spin_unlock(&tfile->f_lock);
|
||||
|
||||
/*
|
||||
* Add the current item to the RB tree. All RB tree operations are
|
||||
* protected by "mtx", and ep_insert() is called with "mtx" held.
|
||||
*/
|
||||
ep_rbtree_insert(ep, epi);
|
||||
|
||||
/* now check if we've created too many backpaths */
|
||||
error = -EINVAL;
|
||||
if (full_check && reverse_path_check())
|
||||
goto error_remove_epi;
|
||||
|
||||
/* Initialize the poll table using the queue callback */
|
||||
epq.epi = epi;
|
||||
init_poll_funcptr(&epq.pt, ep_ptable_queue_proc);
|
||||
@@ -1473,22 +1488,6 @@ static int ep_insert(struct eventpoll *ep, const struct epoll_event *event,
|
||||
if (epi->nwait < 0)
|
||||
goto error_unregister;
|
||||
|
||||
/* Add the current item to the list of active epoll hook for this file */
|
||||
spin_lock(&tfile->f_lock);
|
||||
list_add_tail_rcu(&epi->fllink, &tfile->f_ep_links);
|
||||
spin_unlock(&tfile->f_lock);
|
||||
|
||||
/*
|
||||
* Add the current item to the RB tree. All RB tree operations are
|
||||
* protected by "mtx", and ep_insert() is called with "mtx" held.
|
||||
*/
|
||||
ep_rbtree_insert(ep, epi);
|
||||
|
||||
/* now check if we've created too many backpaths */
|
||||
error = -EINVAL;
|
||||
if (full_check && reverse_path_check())
|
||||
goto error_remove_epi;
|
||||
|
||||
/* We have to drop the new item inside our item list to keep track of it */
|
||||
spin_lock_irq(&ep->wq.lock);
|
||||
|
||||
@@ -1517,6 +1516,8 @@ static int ep_insert(struct eventpoll *ep, const struct epoll_event *event,
|
||||
|
||||
return 0;
|
||||
|
||||
error_unregister:
|
||||
ep_unregister_pollwait(ep, epi);
|
||||
error_remove_epi:
|
||||
spin_lock(&tfile->f_lock);
|
||||
list_del_rcu(&epi->fllink);
|
||||
@@ -1524,9 +1525,6 @@ static int ep_insert(struct eventpoll *ep, const struct epoll_event *event,
|
||||
|
||||
rb_erase_cached(&epi->rbn, &ep->rbr);
|
||||
|
||||
error_unregister:
|
||||
ep_unregister_pollwait(ep, epi);
|
||||
|
||||
/*
|
||||
* We need to do this because an event could have been arrived on some
|
||||
* allocated wait queue. Note that we don't care about the ep->ovflist
|
||||
@@ -1870,13 +1868,12 @@ static int ep_loop_check_proc(void *priv, void *cookie, int call_nests)
|
||||
struct epitem *epi;
|
||||
|
||||
mutex_lock_nested(&ep->mtx, call_nests + 1);
|
||||
ep->visited = 1;
|
||||
list_add(&ep->visited_list_link, &visited_list);
|
||||
ep->gen = loop_check_gen;
|
||||
for (rbp = rb_first_cached(&ep->rbr); rbp; rbp = rb_next(rbp)) {
|
||||
epi = rb_entry(rbp, struct epitem, rbn);
|
||||
if (unlikely(is_file_epoll(epi->ffd.file))) {
|
||||
ep_tovisit = epi->ffd.file->private_data;
|
||||
if (ep_tovisit->visited)
|
||||
if (ep_tovisit->gen == loop_check_gen)
|
||||
continue;
|
||||
error = ep_call_nested(&poll_loop_ncalls, EP_MAX_NESTS,
|
||||
ep_loop_check_proc, epi->ffd.file,
|
||||
@@ -1917,18 +1914,8 @@ static int ep_loop_check_proc(void *priv, void *cookie, int call_nests)
|
||||
*/
|
||||
static int ep_loop_check(struct eventpoll *ep, struct file *file)
|
||||
{
|
||||
int ret;
|
||||
struct eventpoll *ep_cur, *ep_next;
|
||||
|
||||
ret = ep_call_nested(&poll_loop_ncalls, EP_MAX_NESTS,
|
||||
return ep_call_nested(&poll_loop_ncalls, EP_MAX_NESTS,
|
||||
ep_loop_check_proc, file, ep, current);
|
||||
/* clear visited list */
|
||||
list_for_each_entry_safe(ep_cur, ep_next, &visited_list,
|
||||
visited_list_link) {
|
||||
ep_cur->visited = 0;
|
||||
list_del(&ep_cur->visited_list_link);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void clear_tfile_check_list(void)
|
||||
@@ -2090,6 +2077,7 @@ SYSCALL_DEFINE4(epoll_ctl, int, epfd, int, op, int, fd,
|
||||
mutex_lock_nested(&ep->mtx, 0);
|
||||
if (op == EPOLL_CTL_ADD) {
|
||||
if (!list_empty(&f.file->f_ep_links) ||
|
||||
ep->gen == loop_check_gen ||
|
||||
is_file_epoll(tf.file)) {
|
||||
full_check = 1;
|
||||
mutex_unlock(&ep->mtx);
|
||||
@@ -2150,6 +2138,7 @@ SYSCALL_DEFINE4(epoll_ctl, int, epfd, int, op, int, fd,
|
||||
error_tgt_fput:
|
||||
if (full_check) {
|
||||
clear_tfile_check_list();
|
||||
loop_check_gen++;
|
||||
mutex_unlock(&epmutex);
|
||||
}
|
||||
|
||||
|
||||
@@ -553,6 +553,9 @@ int nfs_readdir_page_filler(nfs_readdir_descriptor_t *desc, struct nfs_entry *en
|
||||
xdr_set_scratch_buffer(&stream, page_address(scratch), PAGE_SIZE);
|
||||
|
||||
do {
|
||||
if (entry->label)
|
||||
entry->label->len = NFS4_MAXLABELLEN;
|
||||
|
||||
status = xdr_decode(desc, entry, &stream);
|
||||
if (status != 0) {
|
||||
if (status == -EAGAIN)
|
||||
|
||||
@@ -1553,11 +1553,7 @@ void reiserfs_read_locked_inode(struct inode *inode,
|
||||
* set version 1, version 2 could be used too, because stat data
|
||||
* key is the same in both versions
|
||||
*/
|
||||
key.version = KEY_FORMAT_3_5;
|
||||
key.on_disk_key.k_dir_id = dirino;
|
||||
key.on_disk_key.k_objectid = inode->i_ino;
|
||||
key.on_disk_key.k_offset = 0;
|
||||
key.on_disk_key.k_type = 0;
|
||||
_make_cpu_key(&key, KEY_FORMAT_3_5, dirino, inode->i_ino, 0, 0, 3);
|
||||
|
||||
/* look for the object's stat data */
|
||||
retval = search_item(inode->i_sb, &key, &path_to_sd);
|
||||
|
||||
@@ -665,6 +665,13 @@ reiserfs_xattr_get(struct inode *inode, const char *name, void *buffer,
|
||||
if (get_inode_sd_version(inode) == STAT_DATA_V1)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
/*
|
||||
* priv_root needn't be initialized during mount so allow initial
|
||||
* lookups to succeed.
|
||||
*/
|
||||
if (!REISERFS_SB(inode->i_sb)->priv_root)
|
||||
return 0;
|
||||
|
||||
dentry = xattr_lookup(inode, name, XATTR_REPLACE);
|
||||
if (IS_ERR(dentry)) {
|
||||
err = PTR_ERR(dentry);
|
||||
|
||||
@@ -57,4 +57,17 @@ extern const struct font_desc *get_default_font(int xres, int yres,
|
||||
/* Max. length for the name of a predefined font */
|
||||
#define MAX_FONT_NAME 32
|
||||
|
||||
/* Extra word getters */
|
||||
#define REFCOUNT(fd) (((int *)(fd))[-1])
|
||||
#define FNTSIZE(fd) (((int *)(fd))[-2])
|
||||
#define FNTCHARCNT(fd) (((int *)(fd))[-3])
|
||||
#define FNTSUM(fd) (((int *)(fd))[-4])
|
||||
|
||||
#define FONT_EXTRA_WORDS 4
|
||||
|
||||
struct font_data {
|
||||
unsigned int extra[FONT_EXTRA_WORDS];
|
||||
const unsigned char data[];
|
||||
} __packed;
|
||||
|
||||
#endif /* _VIDEO_FONT_H */
|
||||
|
||||
@@ -15,6 +15,7 @@ extern int __khugepaged_enter(struct mm_struct *mm);
|
||||
extern void __khugepaged_exit(struct mm_struct *mm);
|
||||
extern int khugepaged_enter_vma_merge(struct vm_area_struct *vma,
|
||||
unsigned long vm_flags);
|
||||
extern void khugepaged_min_free_kbytes_update(void);
|
||||
|
||||
#define khugepaged_enabled() \
|
||||
(transparent_hugepage_flags & \
|
||||
@@ -73,6 +74,10 @@ static inline int khugepaged_enter_vma_merge(struct vm_area_struct *vma,
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void khugepaged_min_free_kbytes_update(void)
|
||||
{
|
||||
}
|
||||
#endif /* CONFIG_TRANSPARENT_HUGEPAGE */
|
||||
|
||||
#endif /* _LINUX_KHUGEPAGED_H */
|
||||
|
||||
@@ -2347,7 +2347,7 @@ static inline void zero_resv_unavail(void) {}
|
||||
|
||||
extern void set_dma_reserve(unsigned long new_dma_reserve);
|
||||
extern void memmap_init_zone(unsigned long, int, unsigned long, unsigned long,
|
||||
enum memmap_context, struct vmem_altmap *);
|
||||
enum meminit_context, struct vmem_altmap *);
|
||||
extern void setup_per_zone_wmarks(void);
|
||||
extern void update_kswapd_threads(void);
|
||||
extern int __meminit init_per_zone_wmark_min(void);
|
||||
|
||||
@@ -793,10 +793,15 @@ bool zone_watermark_ok(struct zone *z, unsigned int order,
|
||||
unsigned int alloc_flags);
|
||||
bool zone_watermark_ok_safe(struct zone *z, unsigned int order,
|
||||
unsigned long mark, int classzone_idx);
|
||||
enum memmap_context {
|
||||
MEMMAP_EARLY,
|
||||
MEMMAP_HOTPLUG,
|
||||
/*
|
||||
* Memory initialization context, use to differentiate memory added by
|
||||
* the platform statically or via memory hotplug interface.
|
||||
*/
|
||||
enum meminit_context {
|
||||
MEMINIT_EARLY,
|
||||
MEMINIT_HOTPLUG,
|
||||
};
|
||||
|
||||
extern void init_currently_empty_zone(struct zone *zone, unsigned long start_pfn,
|
||||
unsigned long size);
|
||||
|
||||
|
||||
@@ -32,11 +32,13 @@ extern struct node *node_devices[];
|
||||
typedef void (*node_registration_func_t)(struct node *);
|
||||
|
||||
#if defined(CONFIG_MEMORY_HOTPLUG_SPARSE) && defined(CONFIG_NUMA)
|
||||
extern int link_mem_sections(int nid, unsigned long start_pfn,
|
||||
unsigned long end_pfn);
|
||||
int link_mem_sections(int nid, unsigned long start_pfn,
|
||||
unsigned long end_pfn,
|
||||
enum meminit_context context);
|
||||
#else
|
||||
static inline int link_mem_sections(int nid, unsigned long start_pfn,
|
||||
unsigned long end_pfn)
|
||||
unsigned long end_pfn,
|
||||
enum meminit_context context)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@@ -61,7 +63,8 @@ static inline int register_one_node(int nid)
|
||||
if (error)
|
||||
return error;
|
||||
/* link memory sections under this node */
|
||||
error = link_mem_sections(nid, start_pfn, end_pfn);
|
||||
error = link_mem_sections(nid, start_pfn, end_pfn,
|
||||
MEMINIT_EARLY);
|
||||
}
|
||||
|
||||
return error;
|
||||
|
||||
@@ -149,7 +149,8 @@ virtio_transport_dgram_enqueue(struct vsock_sock *vsk,
|
||||
|
||||
void virtio_transport_destruct(struct vsock_sock *vsk);
|
||||
|
||||
void virtio_transport_recv_pkt(struct virtio_vsock_pkt *pkt);
|
||||
void virtio_transport_recv_pkt(struct virtio_transport *t,
|
||||
struct virtio_vsock_pkt *pkt);
|
||||
void virtio_transport_free_pkt(struct virtio_vsock_pkt *pkt);
|
||||
void virtio_transport_inc_tx_pkt(struct virtio_vsock_sock *vvs, struct virtio_vsock_pkt *pkt);
|
||||
u32 virtio_transport_get_credit(struct virtio_vsock_sock *vvs, u32 wanted);
|
||||
|
||||
@@ -1287,16 +1287,34 @@ static inline void hci_auth_cfm(struct hci_conn *conn, __u8 status)
|
||||
conn->security_cfm_cb(conn, status);
|
||||
}
|
||||
|
||||
static inline void hci_encrypt_cfm(struct hci_conn *conn, __u8 status,
|
||||
__u8 encrypt)
|
||||
static inline void hci_encrypt_cfm(struct hci_conn *conn, __u8 status)
|
||||
{
|
||||
struct hci_cb *cb;
|
||||
__u8 encrypt;
|
||||
|
||||
if (conn->sec_level == BT_SECURITY_SDP)
|
||||
conn->sec_level = BT_SECURITY_LOW;
|
||||
if (conn->state == BT_CONFIG) {
|
||||
if (!status)
|
||||
conn->state = BT_CONNECTED;
|
||||
|
||||
if (conn->pending_sec_level > conn->sec_level)
|
||||
conn->sec_level = conn->pending_sec_level;
|
||||
hci_connect_cfm(conn, status);
|
||||
hci_conn_drop(conn);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!test_bit(HCI_CONN_ENCRYPT, &conn->flags))
|
||||
encrypt = 0x00;
|
||||
else if (test_bit(HCI_CONN_AES_CCM, &conn->flags))
|
||||
encrypt = 0x02;
|
||||
else
|
||||
encrypt = 0x01;
|
||||
|
||||
if (!status) {
|
||||
if (conn->sec_level == BT_SECURITY_SDP)
|
||||
conn->sec_level = BT_SECURITY_LOW;
|
||||
|
||||
if (conn->pending_sec_level > conn->sec_level)
|
||||
conn->sec_level = conn->pending_sec_level;
|
||||
}
|
||||
|
||||
mutex_lock(&hci_cb_list_lock);
|
||||
list_for_each_entry(cb, &hci_cb_list, list) {
|
||||
|
||||
@@ -619,6 +619,8 @@ struct l2cap_ops {
|
||||
struct sk_buff *(*alloc_skb) (struct l2cap_chan *chan,
|
||||
unsigned long hdr_len,
|
||||
unsigned long len, int nb);
|
||||
int (*filter) (struct l2cap_chan * chan,
|
||||
struct sk_buff *skb);
|
||||
};
|
||||
|
||||
struct l2cap_conn {
|
||||
|
||||
@@ -1873,21 +1873,17 @@ static inline unsigned int xfrm_replay_state_esn_len(struct xfrm_replay_state_es
|
||||
static inline int xfrm_replay_clone(struct xfrm_state *x,
|
||||
struct xfrm_state *orig)
|
||||
{
|
||||
x->replay_esn = kzalloc(xfrm_replay_state_esn_len(orig->replay_esn),
|
||||
|
||||
x->replay_esn = kmemdup(orig->replay_esn,
|
||||
xfrm_replay_state_esn_len(orig->replay_esn),
|
||||
GFP_KERNEL);
|
||||
if (!x->replay_esn)
|
||||
return -ENOMEM;
|
||||
|
||||
x->replay_esn->bmp_len = orig->replay_esn->bmp_len;
|
||||
x->replay_esn->replay_window = orig->replay_esn->replay_window;
|
||||
|
||||
x->preplay_esn = kmemdup(x->replay_esn,
|
||||
xfrm_replay_state_esn_len(x->replay_esn),
|
||||
x->preplay_esn = kmemdup(orig->preplay_esn,
|
||||
xfrm_replay_state_esn_len(orig->preplay_esn),
|
||||
GFP_KERNEL);
|
||||
if (!x->preplay_esn) {
|
||||
kfree(x->replay_esn);
|
||||
if (!x->preplay_esn)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ static void remote_function(void *data)
|
||||
* retry due to any failures in smp_call_function_single(), such as if the
|
||||
* task_cpu() goes offline concurrently.
|
||||
*
|
||||
* returns @func return value or -ESRCH when the process isn't running
|
||||
* returns @func return value or -ESRCH or -ENXIO when the process isn't running
|
||||
*/
|
||||
static int
|
||||
task_function_call(struct task_struct *p, remote_function_f func, void *info)
|
||||
@@ -114,7 +114,8 @@ task_function_call(struct task_struct *p, remote_function_f func, void *info)
|
||||
for (;;) {
|
||||
ret = smp_call_function_single(task_cpu(p), remote_function,
|
||||
&data, 1);
|
||||
ret = !ret ? data.ret : -EAGAIN;
|
||||
if (!ret)
|
||||
ret = data.ret;
|
||||
|
||||
if (ret != -EAGAIN)
|
||||
break;
|
||||
|
||||
@@ -6372,16 +6372,14 @@ static void ftrace_ops_assist_func(unsigned long ip, unsigned long parent_ip,
|
||||
{
|
||||
int bit;
|
||||
|
||||
if ((op->flags & FTRACE_OPS_FL_RCU) && !rcu_is_watching())
|
||||
return;
|
||||
|
||||
bit = trace_test_and_set_recursion(TRACE_LIST_START, TRACE_LIST_MAX);
|
||||
if (bit < 0)
|
||||
return;
|
||||
|
||||
preempt_disable_notrace();
|
||||
|
||||
op->func(ip, parent_ip, op, regs);
|
||||
if (!(op->flags & FTRACE_OPS_FL_RCU) || rcu_is_watching())
|
||||
op->func(ip, parent_ip, op, regs);
|
||||
|
||||
preempt_enable_notrace();
|
||||
trace_clear_recursion(bit);
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include <linux/cred.h>
|
||||
#include <linux/file.h>
|
||||
#include <linux/fdtable.h>
|
||||
#include <linux/fs_struct.h>
|
||||
#include <linux/workqueue.h>
|
||||
#include <linux/security.h>
|
||||
#include <linux/mount.h>
|
||||
@@ -72,6 +73,14 @@ static int call_usermodehelper_exec_async(void *data)
|
||||
flush_signal_handlers(current, 1);
|
||||
spin_unlock_irq(¤t->sighand->siglock);
|
||||
|
||||
/*
|
||||
* Initial kernel threads share ther FS with init, in order to
|
||||
* get the init root directory. But we've now created a new
|
||||
* thread that is going to execve a user process and has its own
|
||||
* 'struct fs_struct'. Reset umask to the default.
|
||||
*/
|
||||
current->fs->umask = 0022;
|
||||
|
||||
/*
|
||||
* Our parent (unbound workqueue) runs with elevated scheduling
|
||||
* priority. Avoid propagating that into the userspace child.
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
|
||||
#define FONTDATAMAX 9216
|
||||
|
||||
static const unsigned char fontdata_10x18[FONTDATAMAX] = {
|
||||
|
||||
static struct font_data fontdata_10x18 = {
|
||||
{ 0, 0, FONTDATAMAX, 0 }, {
|
||||
/* 0 0x00 '^@' */
|
||||
0x00, 0x00, /* 0000000000 */
|
||||
0x00, 0x00, /* 0000000000 */
|
||||
@@ -5129,8 +5129,7 @@ static const unsigned char fontdata_10x18[FONTDATAMAX] = {
|
||||
0x00, 0x00, /* 0000000000 */
|
||||
0x00, 0x00, /* 0000000000 */
|
||||
0x00, 0x00, /* 0000000000 */
|
||||
|
||||
};
|
||||
} };
|
||||
|
||||
|
||||
const struct font_desc font_10x18 = {
|
||||
@@ -5138,7 +5137,7 @@ const struct font_desc font_10x18 = {
|
||||
.name = "10x18",
|
||||
.width = 10,
|
||||
.height = 18,
|
||||
.data = fontdata_10x18,
|
||||
.data = fontdata_10x18.data,
|
||||
#ifdef __sparc__
|
||||
.pref = 5,
|
||||
#else
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
#include <linux/font.h>
|
||||
|
||||
static const unsigned char fontdata_6x10[] = {
|
||||
#define FONTDATAMAX 2560
|
||||
|
||||
static struct font_data fontdata_6x10 = {
|
||||
{ 0, 0, FONTDATAMAX, 0 }, {
|
||||
/* 0 0x00 '^@' */
|
||||
0x00, /* 00000000 */
|
||||
0x00, /* 00000000 */
|
||||
@@ -3074,14 +3076,13 @@ static const unsigned char fontdata_6x10[] = {
|
||||
0x00, /* 00000000 */
|
||||
0x00, /* 00000000 */
|
||||
0x00, /* 00000000 */
|
||||
|
||||
};
|
||||
} };
|
||||
|
||||
const struct font_desc font_6x10 = {
|
||||
.idx = FONT6x10_IDX,
|
||||
.name = "6x10",
|
||||
.width = 6,
|
||||
.height = 10,
|
||||
.data = fontdata_6x10,
|
||||
.data = fontdata_6x10.data,
|
||||
.pref = 0,
|
||||
};
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
|
||||
#define FONTDATAMAX (11*256)
|
||||
|
||||
static const unsigned char fontdata_6x11[FONTDATAMAX] = {
|
||||
|
||||
static struct font_data fontdata_6x11 = {
|
||||
{ 0, 0, FONTDATAMAX, 0 }, {
|
||||
/* 0 0x00 '^@' */
|
||||
0x00, /* 00000000 */
|
||||
0x00, /* 00000000 */
|
||||
@@ -3338,8 +3338,7 @@ static const unsigned char fontdata_6x11[FONTDATAMAX] = {
|
||||
0x00, /* 00000000 */
|
||||
0x00, /* 00000000 */
|
||||
0x00, /* 00000000 */
|
||||
|
||||
};
|
||||
} };
|
||||
|
||||
|
||||
const struct font_desc font_vga_6x11 = {
|
||||
@@ -3347,7 +3346,7 @@ const struct font_desc font_vga_6x11 = {
|
||||
.name = "ProFont6x11",
|
||||
.width = 6,
|
||||
.height = 11,
|
||||
.data = fontdata_6x11,
|
||||
.data = fontdata_6x11.data,
|
||||
/* Try avoiding this font if possible unless on MAC */
|
||||
.pref = -2000,
|
||||
};
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
|
||||
#define FONTDATAMAX 3584
|
||||
|
||||
static const unsigned char fontdata_7x14[FONTDATAMAX] = {
|
||||
|
||||
static struct font_data fontdata_7x14 = {
|
||||
{ 0, 0, FONTDATAMAX, 0 }, {
|
||||
/* 0 0x00 '^@' */
|
||||
0x00, /* 0000000 */
|
||||
0x00, /* 0000000 */
|
||||
@@ -4105,8 +4105,7 @@ static const unsigned char fontdata_7x14[FONTDATAMAX] = {
|
||||
0x00, /* 0000000 */
|
||||
0x00, /* 0000000 */
|
||||
0x00, /* 0000000 */
|
||||
|
||||
};
|
||||
} };
|
||||
|
||||
|
||||
const struct font_desc font_7x14 = {
|
||||
@@ -4114,6 +4113,6 @@ const struct font_desc font_7x14 = {
|
||||
.name = "7x14",
|
||||
.width = 7,
|
||||
.height = 14,
|
||||
.data = fontdata_7x14,
|
||||
.data = fontdata_7x14.data,
|
||||
.pref = 0,
|
||||
};
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
|
||||
#define FONTDATAMAX 4096
|
||||
|
||||
static const unsigned char fontdata_8x16[FONTDATAMAX] = {
|
||||
|
||||
static struct font_data fontdata_8x16 = {
|
||||
{ 0, 0, FONTDATAMAX, 0 }, {
|
||||
/* 0 0x00 '^@' */
|
||||
0x00, /* 00000000 */
|
||||
0x00, /* 00000000 */
|
||||
@@ -4619,8 +4619,7 @@ static const unsigned char fontdata_8x16[FONTDATAMAX] = {
|
||||
0x00, /* 00000000 */
|
||||
0x00, /* 00000000 */
|
||||
0x00, /* 00000000 */
|
||||
|
||||
};
|
||||
} };
|
||||
|
||||
|
||||
const struct font_desc font_vga_8x16 = {
|
||||
@@ -4628,7 +4627,7 @@ const struct font_desc font_vga_8x16 = {
|
||||
.name = "VGA8x16",
|
||||
.width = 8,
|
||||
.height = 16,
|
||||
.data = fontdata_8x16,
|
||||
.data = fontdata_8x16.data,
|
||||
.pref = 0,
|
||||
};
|
||||
EXPORT_SYMBOL(font_vga_8x16);
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
|
||||
#define FONTDATAMAX 2048
|
||||
|
||||
static const unsigned char fontdata_8x8[FONTDATAMAX] = {
|
||||
|
||||
static struct font_data fontdata_8x8 = {
|
||||
{ 0, 0, FONTDATAMAX, 0 }, {
|
||||
/* 0 0x00 '^@' */
|
||||
0x00, /* 00000000 */
|
||||
0x00, /* 00000000 */
|
||||
@@ -2570,8 +2570,7 @@ static const unsigned char fontdata_8x8[FONTDATAMAX] = {
|
||||
0x00, /* 00000000 */
|
||||
0x00, /* 00000000 */
|
||||
0x00, /* 00000000 */
|
||||
|
||||
};
|
||||
} };
|
||||
|
||||
|
||||
const struct font_desc font_vga_8x8 = {
|
||||
@@ -2579,6 +2578,6 @@ const struct font_desc font_vga_8x8 = {
|
||||
.name = "VGA8x8",
|
||||
.width = 8,
|
||||
.height = 8,
|
||||
.data = fontdata_8x8,
|
||||
.data = fontdata_8x8.data,
|
||||
.pref = 0,
|
||||
};
|
||||
|
||||
@@ -3,7 +3,10 @@
|
||||
|
||||
#include <linux/font.h>
|
||||
|
||||
static const unsigned char acorndata_8x8[] = {
|
||||
#define FONTDATAMAX 2048
|
||||
|
||||
static struct font_data acorndata_8x8 = {
|
||||
{ 0, 0, FONTDATAMAX, 0 }, {
|
||||
/* 00 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* ^@ */
|
||||
/* 01 */ 0x7e, 0x81, 0xa5, 0x81, 0xbd, 0x99, 0x81, 0x7e, /* ^A */
|
||||
/* 02 */ 0x7e, 0xff, 0xbd, 0xff, 0xc3, 0xe7, 0xff, 0x7e, /* ^B */
|
||||
@@ -260,14 +263,14 @@ static const unsigned char acorndata_8x8[] = {
|
||||
/* FD */ 0x38, 0x04, 0x18, 0x20, 0x3c, 0x00, 0x00, 0x00,
|
||||
/* FE */ 0x00, 0x00, 0x3c, 0x3c, 0x3c, 0x3c, 0x00, 0x00,
|
||||
/* FF */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
};
|
||||
} };
|
||||
|
||||
const struct font_desc font_acorn_8x8 = {
|
||||
.idx = ACORN8x8_IDX,
|
||||
.name = "Acorn8x8",
|
||||
.width = 8,
|
||||
.height = 8,
|
||||
.data = acorndata_8x8,
|
||||
.data = acorndata_8x8.data,
|
||||
#ifdef CONFIG_ARCH_ACORN
|
||||
.pref = 20,
|
||||
#else
|
||||
|
||||
@@ -43,8 +43,8 @@ __END__;
|
||||
|
||||
#define FONTDATAMAX 1536
|
||||
|
||||
static const unsigned char fontdata_mini_4x6[FONTDATAMAX] = {
|
||||
|
||||
static struct font_data fontdata_mini_4x6 = {
|
||||
{ 0, 0, FONTDATAMAX, 0 }, {
|
||||
/*{*/
|
||||
/* Char 0: ' ' */
|
||||
0xee, /*= [*** ] */
|
||||
@@ -2145,14 +2145,14 @@ static const unsigned char fontdata_mini_4x6[FONTDATAMAX] = {
|
||||
0xee, /*= [*** ] */
|
||||
0x00, /*= [ ] */
|
||||
/*}*/
|
||||
};
|
||||
} };
|
||||
|
||||
const struct font_desc font_mini_4x6 = {
|
||||
.idx = MINI4x6_IDX,
|
||||
.name = "MINI4x6",
|
||||
.width = 4,
|
||||
.height = 6,
|
||||
.data = fontdata_mini_4x6,
|
||||
.data = fontdata_mini_4x6.data,
|
||||
.pref = 3,
|
||||
};
|
||||
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
|
||||
#define FONTDATAMAX 2048
|
||||
|
||||
static const unsigned char fontdata_pearl8x8[FONTDATAMAX] = {
|
||||
|
||||
static struct font_data fontdata_pearl8x8 = {
|
||||
{ 0, 0, FONTDATAMAX, 0 }, {
|
||||
/* 0 0x00 '^@' */
|
||||
0x00, /* 00000000 */
|
||||
0x00, /* 00000000 */
|
||||
@@ -2575,14 +2575,13 @@ static const unsigned char fontdata_pearl8x8[FONTDATAMAX] = {
|
||||
0x00, /* 00000000 */
|
||||
0x00, /* 00000000 */
|
||||
0x00, /* 00000000 */
|
||||
|
||||
};
|
||||
} };
|
||||
|
||||
const struct font_desc font_pearl_8x8 = {
|
||||
.idx = PEARL8x8_IDX,
|
||||
.name = "PEARL8x8",
|
||||
.width = 8,
|
||||
.height = 8,
|
||||
.data = fontdata_pearl8x8,
|
||||
.data = fontdata_pearl8x8.data,
|
||||
.pref = 2,
|
||||
};
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
|
||||
#define FONTDATAMAX 11264
|
||||
|
||||
static const unsigned char fontdata_sun12x22[FONTDATAMAX] = {
|
||||
|
||||
static struct font_data fontdata_sun12x22 = {
|
||||
{ 0, 0, FONTDATAMAX, 0 }, {
|
||||
/* 0 0x00 '^@' */
|
||||
0x00, 0x00, /* 000000000000 */
|
||||
0x00, 0x00, /* 000000000000 */
|
||||
@@ -6148,8 +6148,7 @@ static const unsigned char fontdata_sun12x22[FONTDATAMAX] = {
|
||||
0x00, 0x00, /* 000000000000 */
|
||||
0x00, 0x00, /* 000000000000 */
|
||||
0x00, 0x00, /* 000000000000 */
|
||||
|
||||
};
|
||||
} };
|
||||
|
||||
|
||||
const struct font_desc font_sun_12x22 = {
|
||||
@@ -6157,7 +6156,7 @@ const struct font_desc font_sun_12x22 = {
|
||||
.name = "SUN12x22",
|
||||
.width = 12,
|
||||
.height = 22,
|
||||
.data = fontdata_sun12x22,
|
||||
.data = fontdata_sun12x22.data,
|
||||
#ifdef __sparc__
|
||||
.pref = 5,
|
||||
#else
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
|
||||
#define FONTDATAMAX 4096
|
||||
|
||||
static const unsigned char fontdata_sun8x16[FONTDATAMAX] = {
|
||||
static struct font_data fontdata_sun8x16 = {
|
||||
{ 0, 0, FONTDATAMAX, 0 }, {
|
||||
/* */ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
/* */ 0x00,0x00,0x7e,0x81,0xa5,0x81,0x81,0xbd,0x99,0x81,0x81,0x7e,0x00,0x00,0x00,0x00,
|
||||
/* */ 0x00,0x00,0x7e,0xff,0xdb,0xff,0xff,0xc3,0xe7,0xff,0xff,0x7e,0x00,0x00,0x00,0x00,
|
||||
@@ -260,14 +261,14 @@ static const unsigned char fontdata_sun8x16[FONTDATAMAX] = {
|
||||
/* */ 0x00,0x70,0xd8,0x30,0x60,0xc8,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
/* */ 0x00,0x00,0x00,0x00,0x7c,0x7c,0x7c,0x7c,0x7c,0x7c,0x7c,0x00,0x00,0x00,0x00,0x00,
|
||||
/* */ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
};
|
||||
} };
|
||||
|
||||
const struct font_desc font_sun_8x16 = {
|
||||
.idx = SUN8x16_IDX,
|
||||
.name = "SUN8x16",
|
||||
.width = 8,
|
||||
.height = 16,
|
||||
.data = fontdata_sun8x16,
|
||||
.data = fontdata_sun8x16.data,
|
||||
#ifdef __sparc__
|
||||
.pref = 10,
|
||||
#else
|
||||
|
||||
@@ -48,7 +48,7 @@ static inline void prandom_state_selftest(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
DEFINE_PER_CPU(struct rnd_state, net_rand_state);
|
||||
DEFINE_PER_CPU(struct rnd_state, net_rand_state) __latent_entropy;
|
||||
|
||||
/**
|
||||
* prandom_u32_state - seeded pseudo-random number generator.
|
||||
|
||||
@@ -53,6 +53,9 @@ enum scan_result {
|
||||
#define CREATE_TRACE_POINTS
|
||||
#include <trace/events/huge_memory.h>
|
||||
|
||||
static struct task_struct *khugepaged_thread __read_mostly;
|
||||
static DEFINE_MUTEX(khugepaged_mutex);
|
||||
|
||||
/* default scan 8*512 pte (or vmas) every 30 second */
|
||||
static unsigned int khugepaged_pages_to_scan __read_mostly;
|
||||
static unsigned int khugepaged_pages_collapsed;
|
||||
@@ -820,6 +823,18 @@ static struct page *khugepaged_alloc_hugepage(bool *wait)
|
||||
|
||||
static bool khugepaged_prealloc_page(struct page **hpage, bool *wait)
|
||||
{
|
||||
/*
|
||||
* If the hpage allocated earlier was briefly exposed in page cache
|
||||
* before collapse_file() failed, it is possible that racing lookups
|
||||
* have not yet completed, and would then be unpleasantly surprised by
|
||||
* finding the hpage reused for the same mapping at a different offset.
|
||||
* Just release the previous allocation if there is any danger of that.
|
||||
*/
|
||||
if (*hpage && page_count(*hpage) > 1) {
|
||||
put_page(*hpage);
|
||||
*hpage = NULL;
|
||||
}
|
||||
|
||||
if (!*hpage)
|
||||
*hpage = khugepaged_alloc_hugepage(wait);
|
||||
|
||||
@@ -1945,8 +1960,6 @@ static void set_recommended_min_free_kbytes(void)
|
||||
|
||||
int start_stop_khugepaged(void)
|
||||
{
|
||||
static struct task_struct *khugepaged_thread __read_mostly;
|
||||
static DEFINE_MUTEX(khugepaged_mutex);
|
||||
int err = 0;
|
||||
|
||||
mutex_lock(&khugepaged_mutex);
|
||||
@@ -1973,3 +1986,11 @@ int start_stop_khugepaged(void)
|
||||
mutex_unlock(&khugepaged_mutex);
|
||||
return err;
|
||||
}
|
||||
|
||||
void khugepaged_min_free_kbytes_update(void)
|
||||
{
|
||||
mutex_lock(&khugepaged_mutex);
|
||||
if (khugepaged_enabled() && khugepaged_thread)
|
||||
set_recommended_min_free_kbytes();
|
||||
mutex_unlock(&khugepaged_mutex);
|
||||
}
|
||||
|
||||
@@ -777,7 +777,7 @@ void __ref move_pfn_range_to_zone(struct zone *zone, unsigned long start_pfn,
|
||||
* are reserved so nobody should be touching them so we should be safe
|
||||
*/
|
||||
memmap_init_zone(nr_pages, nid, zone_idx(zone), start_pfn,
|
||||
MEMMAP_HOTPLUG, altmap);
|
||||
MEMINIT_HOTPLUG, altmap);
|
||||
|
||||
set_zone_contiguous(zone);
|
||||
}
|
||||
@@ -1174,7 +1174,8 @@ int __ref add_memory_resource(int nid, struct resource *res, bool online)
|
||||
}
|
||||
|
||||
/* link memory sections under this node.*/
|
||||
ret = link_mem_sections(nid, PFN_DOWN(start), PFN_UP(start + size - 1));
|
||||
ret = link_mem_sections(nid, PFN_DOWN(start), PFN_UP(start + size - 1),
|
||||
MEMINIT_HOTPLUG);
|
||||
BUG_ON(ret);
|
||||
|
||||
/* create new memmap entry */
|
||||
|
||||
@@ -67,6 +67,7 @@
|
||||
#include <linux/ftrace.h>
|
||||
#include <linux/lockdep.h>
|
||||
#include <linux/nmi.h>
|
||||
#include <linux/khugepaged.h>
|
||||
#include <linux/psi.h>
|
||||
|
||||
#include <asm/sections.h>
|
||||
@@ -5937,7 +5938,7 @@ void __ref build_all_zonelists(pg_data_t *pgdat)
|
||||
* done. Non-atomic initialization, single-pass.
|
||||
*/
|
||||
void __meminit memmap_init_zone(unsigned long size, int nid, unsigned long zone,
|
||||
unsigned long start_pfn, enum memmap_context context,
|
||||
unsigned long start_pfn, enum meminit_context context,
|
||||
struct vmem_altmap *altmap)
|
||||
{
|
||||
unsigned long end_pfn = start_pfn + size;
|
||||
@@ -5964,7 +5965,7 @@ void __meminit memmap_init_zone(unsigned long size, int nid, unsigned long zone,
|
||||
* There can be holes in boot-time mem_map[]s handed to this
|
||||
* function. They do not exist on hotplugged memory.
|
||||
*/
|
||||
if (context != MEMMAP_EARLY)
|
||||
if (context != MEMINIT_EARLY)
|
||||
goto not_early;
|
||||
|
||||
if (!early_pfn_valid(pfn))
|
||||
@@ -5999,7 +6000,7 @@ void __meminit memmap_init_zone(unsigned long size, int nid, unsigned long zone,
|
||||
not_early:
|
||||
page = pfn_to_page(pfn);
|
||||
__init_single_page(page, pfn, zone, nid);
|
||||
if (context == MEMMAP_HOTPLUG)
|
||||
if (context == MEMINIT_HOTPLUG)
|
||||
SetPageReserved(page);
|
||||
|
||||
/*
|
||||
@@ -6014,7 +6015,7 @@ void __meminit memmap_init_zone(unsigned long size, int nid, unsigned long zone,
|
||||
* check here not to call set_pageblock_migratetype() against
|
||||
* pfn out of zone.
|
||||
*
|
||||
* Please note that MEMMAP_HOTPLUG path doesn't clear memmap
|
||||
* Please note that MEMINIT_HOTPLUG path doesn't clear memmap
|
||||
* because this is done early in sparse_add_one_section
|
||||
*/
|
||||
if (!(pfn & (pageblock_nr_pages - 1))) {
|
||||
@@ -6035,7 +6036,8 @@ static void __meminit zone_init_free_lists(struct zone *zone)
|
||||
|
||||
#ifndef __HAVE_ARCH_MEMMAP_INIT
|
||||
#define memmap_init(size, nid, zone, start_pfn) \
|
||||
memmap_init_zone((size), (nid), (zone), (start_pfn), MEMMAP_EARLY, NULL)
|
||||
memmap_init_zone((size), (nid), (zone), (start_pfn), \
|
||||
MEMINIT_EARLY, NULL)
|
||||
#endif
|
||||
|
||||
static int zone_batchsize(struct zone *zone)
|
||||
@@ -7867,6 +7869,8 @@ int __meminit init_per_zone_wmark_min(void)
|
||||
setup_min_slab_ratio();
|
||||
#endif
|
||||
|
||||
khugepaged_min_free_kbytes_update();
|
||||
|
||||
return 0;
|
||||
}
|
||||
postcore_initcall(init_per_zone_wmark_min)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user