Merge 4.14.51 into android-4.14
Changes in 4.14.51 clocksource/drivers/imx-tpm: Correct some registers operation flow Input: synaptics-rmi4 - fix an unchecked out of memory error path KVM: X86: fix incorrect reference of trace_kvm_pi_irte_update x86: Add check for APIC access address for vmentry of L2 guests MIPS: io: Prevent compiler reordering writeX() nfp: ignore signals when communicating with management FW perf report: Fix switching to another perf.data file fsnotify: fix ignore mask logic in send_to_group() MIPS: io: Add barrier after register read in readX() s390/smsgiucv: disable SMSG on module unload isofs: fix potential memory leak in mount option parsing MIPS: dts: Boston: Fix PCI bus dtc warnings: spi: sh-msiof: Fix bit field overflow writes to TSCR/RSCR doc: Add vendor prefix for Kieback & Peter GmbH dt-bindings: pinctrl: sunxi: Fix reference to driver dt-bindings: serial: sh-sci: Add support for r8a77965 (H)SCIF dt-bindings: dmaengine: rcar-dmac: document R8A77965 support clk: honor CLK_MUX_ROUND_CLOSEST in generic clk mux ASoC: rt5514: Add the missing register in the readable table eCryptfs: don't pass up plaintext names when using filename encryption soc: bcm: raspberrypi-power: Fix use of __packed soc: bcm2835: Make !RASPBERRYPI_FIRMWARE dummies return failure PCI: kirin: Fix reset gpio name ASoC: topology: Fix bugs of freeing soc topology xen: xenbus_dev_frontend: Really return response string ASoC: topology: Check widget kcontrols before deref. spi: cadence: Add usleep_range() for cdns_spi_fill_tx_fifo() blkcg: don't hold blkcg lock when deactivating policy tipc: fix infinite loop when dumping link monitor summary scsi: iscsi: respond to netlink with unicast when appropriate scsi: megaraid_sas: Do not log an error if FW successfully initializes. scsi: target: fix crash with iscsi target and dvd netfilter: nf_tables: NAT chain and extensions require NF_TABLES netfilter: nf_tables: fix out-of-bounds in nft_chain_commit_update ASoC: msm8916-wcd-analog: use threaded context for mbhc events drm/msm: Fix possible null dereference on failure of get_pages() drm/msm/dsi: use correct enum in dsi_get_cmd_fmt drm/msm: don't deref error pointer in the msm_fbdev_create error path blkcg: init root blkcg_gq under lock net: hns: Avoid action name truncation vfs: Undo an overly zealous MS_RDONLY -> SB_RDONLY conversion parisc: time: Convert read_persistent_clock() to read_persistent_clock64() scsi: storvsc: Set up correct queue depth values for IDE devices scsi: isci: Fix infinite loop in while loop mm, pagemap: fix swap offset value for PMD migration entry proc: revalidate kernel thread inodes to root:root kexec_file: do not add extra alignment to efi memmap mm: memcg: add __GFP_NOWARN in __memcg_schedule_kmem_cache_create() usb: typec: ucsi: fix tracepoint related build error ACPI / PM: Blacklist Low Power S0 Idle _DSM for ThinkPad X1 Tablet(2016) dt-bindings: meson-uart: DT fix s/clocks-names/clock-names/ powerpc/powernv/memtrace: Let the arch hotunplug code flush cache net: phy: marvell: clear wol event before setting it ARM: dts: da850: fix W=1 warnings with pinmux node ACPI / watchdog: Prefer iTCO_wdt on Lenovo Z50-70 drm/amdkfd: fix clock counter retrieval for node without GPU thermal: int3403_thermal: Fix NULL pointer deref on module load / probe net: ethtool: Add missing kernel doc for FEC parameters arm64: ptrace: remove addr_limit manipulation HID: lenovo: Add support for IBM/Lenovo Scrollpoint mice HID: wacom: Release device resource data obtained by devres_alloc() selftests: ftrace: Add a testcase for multiple actions on trigger rds: ib: Fix missing call to rds_ib_dev_put in rds_ib_setup_qp perf/x86/intel: Don't enable freeze-on-smi for PerfMon V1 remoteproc: qcom: Fix potential device node leaks rpmsg: added MODULE_ALIAS for rpmsg_char HID: intel-ish-hid: use put_device() instead of kfree() blk-mq: fix sysfs inflight counter arm64: fix possible spectre-v1 in ptrace_hbp_get_event() KVM: arm/arm64: vgic: fix possible spectre-v1 in vgic_mmio_read_apr() libahci: Allow drivers to override stop_engine ata: ahci: mvebu: override ahci_stop_engine for mvebu AHCI x86/cpu/intel: Add missing TLB cpuid values bpf: fix uninitialized variable in bpf tools i2c: sprd: Prevent i2c accesses after suspend is called i2c: sprd: Fix the i2c count issue tipc: fix bug in function tipc_nl_node_dump_monitor nvme: depend on INFINIBAND_ADDR_TRANS nvmet-rdma: depend on INFINIBAND_ADDR_TRANS ib_srpt: depend on INFINIBAND_ADDR_TRANS ib_srp: depend on INFINIBAND_ADDR_TRANS IB: make INFINIBAND_ADDR_TRANS configurable IB/uverbs: Fix validating mandatory attributes RDMA/cma: Fix use after destroy access to net namespace for IPoIB RDMA/iwpm: fix memory leak on map_info IB/rxe: add RXE_START_MASK for rxe_opcode IB_OPCODE_RC_SEND_ONLY_INV IB/rxe: avoid double kfree_skb <linux/stringhash.h>: fix end_name_hash() for 64bit long IB/core: Make ib_mad_client_id atomic ARM: davinci: board-da830-evm: fix GPIO lookup for MMC/SD ARM: davinci: board-da850-evm: fix GPIO lookup for MMC/SD ARM: davinci: board-omapl138-hawk: fix GPIO numbers for MMC/SD lookup ARM: davinci: board-dm355-evm: fix broken networking dt-bindings: panel: lvds: Fix path to display timing bindings ARM: OMAP2+: powerdomain: use raw_smp_processor_id() for trace ARM: dts: logicpd-som-lv: Fix WL127x Startup Issues ARM: dts: logicpd-som-lv: Fix Audio Mute Input: atmel_mxt_ts - fix the firmware update hexagon: add memset_io() helper hexagon: export csum_partial_copy_nocheck scsi: vmw-pvscsi: return DID_BUS_BUSY for adapter-initated aborts bpf, x64: fix memleak when not converging after image parisc: drivers.c: Fix section mismatches stop_machine, sched: Fix migrate_swap() vs. active_balance() deadlock kthread, sched/wait: Fix kthread_parkme() wait-loop arm64: tegra: Make BCM89610 PHY interrupt as active low iommu/vt-d: fix shift-out-of-bounds in bug checking nvme: fix potential memory leak in option parsing nvme: Set integrity flag for user passthrough commands ARM: OMAP1: ams-delta: fix deferred_fiq handler smc: fix sendpage() call IB/hfi1 Use correct type for num_user_context IB/hfi1: Fix memory leak in exception path in get_irq_affinity() RDMA/cma: Do not query GID during QP state transition to RTR spi: bcm2835aux: ensure interrupts are enabled for shared handler sched/core: Introduce set_special_state() sh: fix build failure for J2 cpu with SMP disabled tee: check shm references are consistent in offset/size mac80211: Adjust SAE authentication timeout drm/omap: silence unititialized variable warning drm/omap: fix uninitialized ret variable drm/omap: fix possible NULL ref issue in tiler_reserve_2d drm/omap: check return value from soc_device_match drm/omap: handle alloc failures in omap_connector driver core: add __printf verification to __ata_ehi_pushv_desc ARM: dts: cygnus: fix irq type for arm global timer mac80211: use timeout from the AddBA response instead of the request x86/xen: Reset VCPU0 info pointer after shared_info remap net: aquantia: driver should correctly declare vlan_features bits can: dev: increase bus-off message severity arm64: Add MIDR encoding for NVIDIA CPUs cifs: smb2ops: Fix listxattr() when there are no EAs agp: uninorth: make two functions static tipc: eliminate KMSAN uninit-value in strcmp complaint qed: Fix l2 initializations over iWARP personality qede: Fix gfp flags sent to rdma event node allocation rxrpc: Fix error reception on AF_INET6 sockets rxrpc: Fix the min security level for kernel calls KVM: Extend MAX_IRQ_ROUTES to 4096 for all archs x86: Delay skip of emulated hypercall instruction ixgbe: return error on unsupported SFP module when resetting net sched actions: fix invalid pointer dereferencing if skbedit flags missing init: fix false positives in W+X checking proc/kcore: don't bounds check against address 0 ocfs2: take inode cluster lock before moving reflinked inode from orphan dir kprobes/x86: Prohibit probing on exception masking instructions uprobes/x86: Prohibit probing on MOV SS instruction objtool, kprobes/x86: Sync the latest <asm/insn.h> header with tools/objtool/arch/x86/include/asm/insn.h x86/pkeys/selftests: Adjust the self-test to fresh distros that export the pkeys ABI x86/mpx/selftests: Adjust the self-test to fresh distros that export the MPX ABI x86/selftests: Add mov_to_ss test x86/pkeys/selftests: Give better unexpected fault error messages x86/pkeys/selftests: Stop using assert() x86/pkeys/selftests: Remove dead debugging code, fix dprint_in_signal x86/pkeys/selftests: Allow faults on unknown keys x86/pkeys/selftests: Factor out "instruction page" x86/pkeys/selftests: Add PROT_EXEC test x86/pkeys/selftests: Fix pkey exhaustion test off-by-one x86/pkeys/selftests: Fix pointer math x86/pkeys/selftests: Save off 'prot' for allocations x86/pkeys/selftests: Add a test for pkey 0 mtd: Fix comparison in map_word_andequal() afs: Fix the non-encryption of calls usb: musb: fix remote wakeup racing with suspend ARM: keystone: fix platform_domain_notifier array overrun i2c: pmcmsp: return message count on master_xfer success i2c: pmcmsp: fix error return from master_xfer i2c: viperboard: return message count on master_xfer success ARM: davinci: dm646x: fix timer interrupt generation ARM: davinci: board-dm646x-evm: pass correct I2C adapter id for VPIF ARM: davinci: board-dm646x-evm: set VPIF capture card name clk: imx6ull: use OSC clock during AXI rate change locking/rwsem: Add a new RWSEM_ANONYMOUSLY_OWNED flag locking/percpu-rwsem: Annotate rwsem ownership transfer by setting RWSEM_OWNER_UNKNOWN drm/dumb-buffers: Integer overflow in drm_mode_create_ioctl() sched/debug: Move the print_rt_rq() and print_dl_rq() declarations to kernel/sched/sched.h sched/deadline: Make the grub_reclaim() function static parisc: Move setup_profiling_timer() out of init section efi/libstub/arm64: Handle randomized TEXT_OFFSET ARM: 8753/1: decompressor: add a missing parameter to the addruart macro ARM: 8758/1: decompressor: restore r1 and r2 just before jumping to the kernel ARM: kexec: fix kdump register saving on panic() Revert "Btrfs: fix scrub to repair raid6 corruption" Btrfs: fix scrub to repair raid6 corruption Btrfs: make raid6 rebuild retry more tcp: do not overshoot window_clamp in tcp_rcv_space_adjust() Linux 4.14.51 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
@@ -38,7 +38,7 @@ Display Timings
|
||||
require specific display timings. The panel-timing subnode expresses those
|
||||
timings as specified in the timing subnode section of the display timing
|
||||
bindings defined in
|
||||
Documentation/devicetree/bindings/display/display-timing.txt.
|
||||
Documentation/devicetree/bindings/display/panel/display-timing.txt.
|
||||
|
||||
|
||||
Connectivity
|
||||
|
||||
@@ -25,6 +25,7 @@ Required Properties:
|
||||
- "renesas,dmac-r8a7794" (R-Car E2)
|
||||
- "renesas,dmac-r8a7795" (R-Car H3)
|
||||
- "renesas,dmac-r8a7796" (R-Car M3-W)
|
||||
- "renesas,dmac-r8a77965" (R-Car M3-N)
|
||||
- "renesas,dmac-r8a77970" (R-Car V3M)
|
||||
|
||||
- reg: base address and length of the registers block for the DMAC
|
||||
|
||||
@@ -55,9 +55,9 @@ pins it needs, and how they should be configured, with regard to muxer
|
||||
configuration, drive strength and pullups. If one of these options is
|
||||
not set, its actual value will be unspecified.
|
||||
|
||||
This driver supports the generic pin multiplexing and configuration
|
||||
bindings. For details on each properties, you can refer to
|
||||
./pinctrl-bindings.txt.
|
||||
Allwinner A1X Pin Controller supports the generic pin multiplexing and
|
||||
configuration bindings. For details on each properties, you can refer to
|
||||
./pinctrl-bindings.txt.
|
||||
|
||||
Required sub-node properties:
|
||||
- pins
|
||||
|
||||
@@ -21,7 +21,7 @@ Required properties:
|
||||
- interrupts : identifier to the device interrupt
|
||||
- clocks : a list of phandle + clock-specifier pairs, one for each
|
||||
entry in clock names.
|
||||
- clocks-names :
|
||||
- clock-names :
|
||||
* "xtal" for external xtal clock identifier
|
||||
* "pclk" for the bus core clock, either the clk81 clock or the gate clock
|
||||
* "baud" for the source of the baudrate generator, can be either the xtal
|
||||
|
||||
@@ -41,6 +41,8 @@ Required properties:
|
||||
- "renesas,hscif-r8a7795" for R8A7795 (R-Car H3) HSCIF compatible UART.
|
||||
- "renesas,scif-r8a7796" for R8A7796 (R-Car M3-W) SCIF compatible UART.
|
||||
- "renesas,hscif-r8a7796" for R8A7796 (R-Car M3-W) HSCIF compatible UART.
|
||||
- "renesas,scif-r8a77965" for R8A77965 (R-Car M3-N) SCIF compatible UART.
|
||||
- "renesas,hscif-r8a77965" for R8A77965 (R-Car M3-N) HSCIF compatible UART.
|
||||
- "renesas,scif-r8a77970" for R8A77970 (R-Car V3M) SCIF compatible UART.
|
||||
- "renesas,hscif-r8a77970" for R8A77970 (R-Car V3M) HSCIF compatible UART.
|
||||
- "renesas,scif-r8a77995" for R8A77995 (R-Car D3) SCIF compatible UART.
|
||||
|
||||
@@ -172,6 +172,7 @@ karo Ka-Ro electronics GmbH
|
||||
keithkoep Keith & Koep GmbH
|
||||
keymile Keymile GmbH
|
||||
khadas Khadas
|
||||
kiebackpeter Kieback & Peter GmbH
|
||||
kinetic Kinetic Technologies
|
||||
kingnovel Kingnovel Technology Co., Ltd.
|
||||
kosagi Sutajio Ko-Usagi PTE Ltd.
|
||||
|
||||
2
Makefile
2
Makefile
@@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 4
|
||||
PATCHLEVEL = 14
|
||||
SUBLEVEL = 50
|
||||
SUBLEVEL = 51
|
||||
EXTRAVERSION =
|
||||
NAME = Petit Gorille
|
||||
|
||||
|
||||
@@ -29,19 +29,19 @@
|
||||
#if defined(CONFIG_DEBUG_ICEDCC)
|
||||
|
||||
#if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_V6K) || defined(CONFIG_CPU_V7)
|
||||
.macro loadsp, rb, tmp
|
||||
.macro loadsp, rb, tmp1, tmp2
|
||||
.endm
|
||||
.macro writeb, ch, rb
|
||||
mcr p14, 0, \ch, c0, c5, 0
|
||||
.endm
|
||||
#elif defined(CONFIG_CPU_XSCALE)
|
||||
.macro loadsp, rb, tmp
|
||||
.macro loadsp, rb, tmp1, tmp2
|
||||
.endm
|
||||
.macro writeb, ch, rb
|
||||
mcr p14, 0, \ch, c8, c0, 0
|
||||
.endm
|
||||
#else
|
||||
.macro loadsp, rb, tmp
|
||||
.macro loadsp, rb, tmp1, tmp2
|
||||
.endm
|
||||
.macro writeb, ch, rb
|
||||
mcr p14, 0, \ch, c1, c0, 0
|
||||
@@ -57,7 +57,7 @@
|
||||
.endm
|
||||
|
||||
#if defined(CONFIG_ARCH_SA1100)
|
||||
.macro loadsp, rb, tmp
|
||||
.macro loadsp, rb, tmp1, tmp2
|
||||
mov \rb, #0x80000000 @ physical base address
|
||||
#ifdef CONFIG_DEBUG_LL_SER3
|
||||
add \rb, \rb, #0x00050000 @ Ser3
|
||||
@@ -66,8 +66,8 @@
|
||||
#endif
|
||||
.endm
|
||||
#else
|
||||
.macro loadsp, rb, tmp
|
||||
addruart \rb, \tmp
|
||||
.macro loadsp, rb, tmp1, tmp2
|
||||
addruart \rb, \tmp1, \tmp2
|
||||
.endm
|
||||
#endif
|
||||
#endif
|
||||
@@ -559,8 +559,6 @@ not_relocated: mov r0, #0
|
||||
bl decompress_kernel
|
||||
bl cache_clean_flush
|
||||
bl cache_off
|
||||
mov r1, r7 @ restore architecture number
|
||||
mov r2, r8 @ restore atags pointer
|
||||
|
||||
#ifdef CONFIG_ARM_VIRT_EXT
|
||||
mrs r0, spsr @ Get saved CPU boot mode
|
||||
@@ -1297,7 +1295,7 @@ phex: adr r3, phexbuf
|
||||
b 1b
|
||||
|
||||
@ puts corrupts {r0, r1, r2, r3}
|
||||
puts: loadsp r3, r1
|
||||
puts: loadsp r3, r2, r1
|
||||
1: ldrb r2, [r0], #1
|
||||
teq r2, #0
|
||||
moveq pc, lr
|
||||
@@ -1314,8 +1312,8 @@ puts: loadsp r3, r1
|
||||
@ putc corrupts {r0, r1, r2, r3}
|
||||
putc:
|
||||
mov r2, r0
|
||||
loadsp r3, r1, r0
|
||||
mov r0, #0
|
||||
loadsp r3, r1
|
||||
b 2b
|
||||
|
||||
@ memdump corrupts {r0, r1, r2, r3, r10, r11, r12, lr}
|
||||
@@ -1365,6 +1363,8 @@ __hyp_reentry_vectors:
|
||||
|
||||
__enter_kernel:
|
||||
mov r0, #0 @ must be 0
|
||||
mov r1, r7 @ restore architecture number
|
||||
mov r2, r8 @ restore atags pointer
|
||||
ARM( mov pc, r4 ) @ call kernel
|
||||
M_CLASS( add r4, r4, #1 ) @ enter in Thumb mode for M class
|
||||
THUMB( bx r4 ) @ entry point is always ARM for A/R classes
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
timer@20200 {
|
||||
compatible = "arm,cortex-a9-global-timer";
|
||||
reg = <0x20200 0x100>;
|
||||
interrupts = <GIC_PPI 11 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupts = <GIC_PPI 11 IRQ_TYPE_EDGE_RISING>;
|
||||
clocks = <&periph_clk>;
|
||||
};
|
||||
|
||||
|
||||
@@ -34,8 +34,6 @@
|
||||
pmx_core: pinmux@14120 {
|
||||
compatible = "pinctrl-single";
|
||||
reg = <0x14120 0x50>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
#pinctrl-cells = <2>;
|
||||
pinctrl-single,bit-per-mux;
|
||||
pinctrl-single,register-width = <32>;
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
gpio = <&gpio1 3 0>; /* gpio_3 */
|
||||
startup-delay-us = <70000>;
|
||||
enable-active-high;
|
||||
vin-supply = <&vmmc2>;
|
||||
vin-supply = <&vaux3>;
|
||||
};
|
||||
|
||||
/* HS USB Host PHY on PORT 1 */
|
||||
@@ -108,6 +108,7 @@
|
||||
twl_audio: audio {
|
||||
compatible = "ti,twl4030-audio";
|
||||
codec {
|
||||
ti,hs_extmute_gpio = <&gpio2 25 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -221,6 +222,7 @@
|
||||
pinctrl-single,pins = <
|
||||
OMAP3_CORE1_IOPAD(0x21ba, PIN_INPUT | MUX_MODE0) /* i2c1_scl.i2c1_scl */
|
||||
OMAP3_CORE1_IOPAD(0x21bc, PIN_INPUT | MUX_MODE0) /* i2c1_sda.i2c1_sda */
|
||||
OMAP3_CORE1_IOPAD(0x20ba, PIN_OUTPUT | MUX_MODE4) /* gpmc_ncs6.gpio_57 */
|
||||
>;
|
||||
};
|
||||
};
|
||||
@@ -235,7 +237,7 @@
|
||||
};
|
||||
wl127x_gpio: pinmux_wl127x_gpio_pin {
|
||||
pinctrl-single,pins = <
|
||||
OMAP3_WKUP_IOPAD(0x2a0c, PIN_INPUT | MUX_MODE4) /* sys_boot0.gpio_2 */
|
||||
OMAP3_WKUP_IOPAD(0x2a0a, PIN_INPUT | MUX_MODE4) /* sys_boot0.gpio_2 */
|
||||
OMAP3_WKUP_IOPAD(0x2a0c, PIN_OUTPUT | MUX_MODE4) /* sys_boot1.gpio_3 */
|
||||
>;
|
||||
};
|
||||
@@ -270,6 +272,11 @@
|
||||
#include "twl4030.dtsi"
|
||||
#include "twl4030_omap3.dtsi"
|
||||
|
||||
&vaux3 {
|
||||
regulator-min-microvolt = <2800000>;
|
||||
regulator-max-microvolt = <2800000>;
|
||||
};
|
||||
|
||||
&twl {
|
||||
twl_power: power {
|
||||
compatible = "ti,twl4030-power-idle-osc-off", "ti,twl4030-power-idle";
|
||||
|
||||
@@ -95,6 +95,27 @@ void machine_crash_nonpanic_core(void *unused)
|
||||
cpu_relax();
|
||||
}
|
||||
|
||||
void crash_smp_send_stop(void)
|
||||
{
|
||||
static int cpus_stopped;
|
||||
unsigned long msecs;
|
||||
|
||||
if (cpus_stopped)
|
||||
return;
|
||||
|
||||
atomic_set(&waiting_for_crash_ipi, num_online_cpus() - 1);
|
||||
smp_call_function(machine_crash_nonpanic_core, NULL, false);
|
||||
msecs = 1000; /* Wait at most a second for the other cpus to stop */
|
||||
while ((atomic_read(&waiting_for_crash_ipi) > 0) && msecs) {
|
||||
mdelay(1);
|
||||
msecs--;
|
||||
}
|
||||
if (atomic_read(&waiting_for_crash_ipi) > 0)
|
||||
pr_warn("Non-crashing CPUs did not react to IPI\n");
|
||||
|
||||
cpus_stopped = 1;
|
||||
}
|
||||
|
||||
static void machine_kexec_mask_interrupts(void)
|
||||
{
|
||||
unsigned int i;
|
||||
@@ -120,19 +141,8 @@ static void machine_kexec_mask_interrupts(void)
|
||||
|
||||
void machine_crash_shutdown(struct pt_regs *regs)
|
||||
{
|
||||
unsigned long msecs;
|
||||
|
||||
local_irq_disable();
|
||||
|
||||
atomic_set(&waiting_for_crash_ipi, num_online_cpus() - 1);
|
||||
smp_call_function(machine_crash_nonpanic_core, NULL, false);
|
||||
msecs = 1000; /* Wait at most a second for the other cpus to stop */
|
||||
while ((atomic_read(&waiting_for_crash_ipi) > 0) && msecs) {
|
||||
mdelay(1);
|
||||
msecs--;
|
||||
}
|
||||
if (atomic_read(&waiting_for_crash_ipi) > 0)
|
||||
pr_warn("Non-crashing CPUs did not react to IPI\n");
|
||||
crash_smp_send_stop();
|
||||
|
||||
crash_save_cpu(regs, smp_processor_id());
|
||||
machine_kexec_mask_interrupts();
|
||||
|
||||
@@ -205,12 +205,17 @@ static const short da830_evm_mmc_sd_pins[] = {
|
||||
-1
|
||||
};
|
||||
|
||||
#define DA830_MMCSD_WP_PIN GPIO_TO_PIN(2, 1)
|
||||
#define DA830_MMCSD_CD_PIN GPIO_TO_PIN(2, 2)
|
||||
|
||||
static struct gpiod_lookup_table mmc_gpios_table = {
|
||||
.dev_id = "da830-mmc.0",
|
||||
.table = {
|
||||
/* gpio chip 1 contains gpio range 32-63 */
|
||||
GPIO_LOOKUP("davinci_gpio.1", 2, "cd", GPIO_ACTIVE_LOW),
|
||||
GPIO_LOOKUP("davinci_gpio.1", 1, "wp", GPIO_ACTIVE_LOW),
|
||||
GPIO_LOOKUP("davinci_gpio.0", DA830_MMCSD_CD_PIN, "cd",
|
||||
GPIO_ACTIVE_LOW),
|
||||
GPIO_LOOKUP("davinci_gpio.0", DA830_MMCSD_WP_PIN, "wp",
|
||||
GPIO_ACTIVE_LOW),
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -763,12 +763,17 @@ static const short da850_evm_mcasp_pins[] __initconst = {
|
||||
-1
|
||||
};
|
||||
|
||||
#define DA850_MMCSD_CD_PIN GPIO_TO_PIN(4, 0)
|
||||
#define DA850_MMCSD_WP_PIN GPIO_TO_PIN(4, 1)
|
||||
|
||||
static struct gpiod_lookup_table mmc_gpios_table = {
|
||||
.dev_id = "da830-mmc.0",
|
||||
.table = {
|
||||
/* gpio chip 2 contains gpio range 64-95 */
|
||||
GPIO_LOOKUP("davinci_gpio.2", 0, "cd", GPIO_ACTIVE_LOW),
|
||||
GPIO_LOOKUP("davinci_gpio.2", 1, "wp", GPIO_ACTIVE_LOW),
|
||||
GPIO_LOOKUP("davinci_gpio.0", DA850_MMCSD_CD_PIN, "cd",
|
||||
GPIO_ACTIVE_LOW),
|
||||
GPIO_LOOKUP("davinci_gpio.0", DA850_MMCSD_WP_PIN, "wp",
|
||||
GPIO_ACTIVE_LOW),
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include <linux/i2c.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/clk.h>
|
||||
#include <linux/dm9000.h>
|
||||
#include <linux/videodev2.h>
|
||||
#include <media/i2c/tvp514x.h>
|
||||
#include <linux/spi/spi.h>
|
||||
@@ -168,11 +169,16 @@ static struct resource dm355evm_dm9000_rsrc[] = {
|
||||
},
|
||||
};
|
||||
|
||||
static struct dm9000_plat_data dm335evm_dm9000_platdata;
|
||||
|
||||
static struct platform_device dm355evm_dm9000 = {
|
||||
.name = "dm9000",
|
||||
.id = -1,
|
||||
.resource = dm355evm_dm9000_rsrc,
|
||||
.num_resources = ARRAY_SIZE(dm355evm_dm9000_rsrc),
|
||||
.dev = {
|
||||
.platform_data = &dm335evm_dm9000_platdata,
|
||||
},
|
||||
};
|
||||
|
||||
static struct tvp514x_platform_data tvp5146_pdata = {
|
||||
|
||||
@@ -534,11 +534,12 @@ static struct vpif_display_config dm646x_vpif_display_config = {
|
||||
.set_clock = set_vpif_clock,
|
||||
.subdevinfo = dm646x_vpif_subdev,
|
||||
.subdev_count = ARRAY_SIZE(dm646x_vpif_subdev),
|
||||
.i2c_adapter_id = 1,
|
||||
.chan_config[0] = {
|
||||
.outputs = dm6467_ch0_outputs,
|
||||
.output_count = ARRAY_SIZE(dm6467_ch0_outputs),
|
||||
},
|
||||
.card_name = "DM646x EVM",
|
||||
.card_name = "DM646x EVM Video Display",
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -676,6 +677,7 @@ static struct vpif_capture_config dm646x_vpif_capture_cfg = {
|
||||
.setup_input_channel_mode = setup_vpif_input_channel_mode,
|
||||
.subdev_info = vpif_capture_sdev_info,
|
||||
.subdev_count = ARRAY_SIZE(vpif_capture_sdev_info),
|
||||
.i2c_adapter_id = 1,
|
||||
.chan_config[0] = {
|
||||
.inputs = dm6467_ch0_inputs,
|
||||
.input_count = ARRAY_SIZE(dm6467_ch0_inputs),
|
||||
@@ -696,6 +698,7 @@ static struct vpif_capture_config dm646x_vpif_capture_cfg = {
|
||||
.fid_pol = 0,
|
||||
},
|
||||
},
|
||||
.card_name = "DM646x EVM Video Capture",
|
||||
};
|
||||
|
||||
static void __init evm_init_video(void)
|
||||
|
||||
@@ -123,12 +123,16 @@ static const short hawk_mmcsd0_pins[] = {
|
||||
-1
|
||||
};
|
||||
|
||||
#define DA850_HAWK_MMCSD_CD_PIN GPIO_TO_PIN(3, 12)
|
||||
#define DA850_HAWK_MMCSD_WP_PIN GPIO_TO_PIN(3, 13)
|
||||
|
||||
static struct gpiod_lookup_table mmc_gpios_table = {
|
||||
.dev_id = "da830-mmc.0",
|
||||
.table = {
|
||||
/* CD: gpio3_12: gpio60: chip 1 contains gpio range 32-63*/
|
||||
GPIO_LOOKUP("davinci_gpio.0", 28, "cd", GPIO_ACTIVE_LOW),
|
||||
GPIO_LOOKUP("davinci_gpio.0", 29, "wp", GPIO_ACTIVE_LOW),
|
||||
GPIO_LOOKUP("davinci_gpio.0", DA850_HAWK_MMCSD_CD_PIN, "cd",
|
||||
GPIO_ACTIVE_LOW),
|
||||
GPIO_LOOKUP("davinci_gpio.0", DA850_HAWK_MMCSD_WP_PIN, "wp",
|
||||
GPIO_ACTIVE_LOW),
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -495,7 +495,8 @@ static u8 dm646x_default_priorities[DAVINCI_N_AINTC_IRQ] = {
|
||||
[IRQ_DM646X_MCASP0TXINT] = 7,
|
||||
[IRQ_DM646X_MCASP0RXINT] = 7,
|
||||
[IRQ_DM646X_RESERVED_3] = 7,
|
||||
[IRQ_DM646X_MCASP1TXINT] = 7, /* clockevent */
|
||||
[IRQ_DM646X_MCASP1TXINT] = 7,
|
||||
[IRQ_TINT0_TINT12] = 7, /* clockevent */
|
||||
[IRQ_TINT0_TINT34] = 7, /* clocksource */
|
||||
[IRQ_TINT1_TINT12] = 7, /* DSP timer */
|
||||
[IRQ_TINT1_TINT34] = 7, /* system tick */
|
||||
|
||||
@@ -29,6 +29,7 @@ static struct dev_pm_domain keystone_pm_domain = {
|
||||
|
||||
static struct pm_clk_notifier_block platform_domain_notifier = {
|
||||
.pm_domain = &keystone_pm_domain,
|
||||
.con_ids = { NULL },
|
||||
};
|
||||
|
||||
static const struct of_device_id of_keystone_table[] = {
|
||||
|
||||
@@ -58,22 +58,24 @@ static irqreturn_t deferred_fiq(int irq, void *dev_id)
|
||||
irq_num = gpio_to_irq(gpio);
|
||||
fiq_count = fiq_buffer[FIQ_CNT_INT_00 + gpio];
|
||||
|
||||
while (irq_counter[gpio] < fiq_count) {
|
||||
if (gpio != AMS_DELTA_GPIO_PIN_KEYBRD_CLK) {
|
||||
struct irq_data *d = irq_get_irq_data(irq_num);
|
||||
if (irq_counter[gpio] < fiq_count &&
|
||||
gpio != AMS_DELTA_GPIO_PIN_KEYBRD_CLK) {
|
||||
struct irq_data *d = irq_get_irq_data(irq_num);
|
||||
|
||||
/*
|
||||
* It looks like handle_edge_irq() that
|
||||
* OMAP GPIO edge interrupts default to,
|
||||
* expects interrupt already unmasked.
|
||||
*/
|
||||
if (irq_chip && irq_chip->irq_unmask)
|
||||
/*
|
||||
* handle_simple_irq() that OMAP GPIO edge
|
||||
* interrupts default to since commit 80ac93c27441
|
||||
* requires interrupt already acked and unmasked.
|
||||
*/
|
||||
if (irq_chip) {
|
||||
if (irq_chip->irq_ack)
|
||||
irq_chip->irq_ack(d);
|
||||
if (irq_chip->irq_unmask)
|
||||
irq_chip->irq_unmask(d);
|
||||
}
|
||||
generic_handle_irq(irq_num);
|
||||
|
||||
irq_counter[gpio]++;
|
||||
}
|
||||
for (; irq_counter[gpio] < fiq_count; irq_counter[gpio]++)
|
||||
generic_handle_irq(irq_num);
|
||||
}
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
@@ -188,7 +188,7 @@ static int _pwrdm_state_switch(struct powerdomain *pwrdm, int flag)
|
||||
((prev & OMAP_POWERSTATE_MASK) << 0));
|
||||
trace_power_domain_target_rcuidle(pwrdm->name,
|
||||
trace_state,
|
||||
smp_processor_id());
|
||||
raw_smp_processor_id());
|
||||
}
|
||||
break;
|
||||
default:
|
||||
@@ -518,7 +518,7 @@ int pwrdm_set_next_pwrst(struct powerdomain *pwrdm, u8 pwrst)
|
||||
if (arch_pwrdm && arch_pwrdm->pwrdm_set_next_pwrst) {
|
||||
/* Trace the pwrdm desired target state */
|
||||
trace_power_domain_target_rcuidle(pwrdm->name, pwrst,
|
||||
smp_processor_id());
|
||||
raw_smp_processor_id());
|
||||
/* Program the pwrdm desired target state */
|
||||
ret = arch_pwrdm->pwrdm_set_next_pwrst(pwrdm, pwrst);
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
compatible = "ethernet-phy-ieee802.3-c22";
|
||||
reg = <0x0>;
|
||||
interrupt-parent = <&gpio>;
|
||||
interrupts = <TEGRA_MAIN_GPIO(M, 5) IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupts = <TEGRA_MAIN_GPIO(M, 5) IRQ_TYPE_LEVEL_LOW>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -75,6 +75,7 @@
|
||||
#define ARM_CPU_IMP_CAVIUM 0x43
|
||||
#define ARM_CPU_IMP_BRCM 0x42
|
||||
#define ARM_CPU_IMP_QCOM 0x51
|
||||
#define ARM_CPU_IMP_NVIDIA 0x4E
|
||||
|
||||
#define ARM_CPU_PART_AEM_V8 0xD0F
|
||||
#define ARM_CPU_PART_FOUNDATION 0xD00
|
||||
@@ -98,6 +99,9 @@
|
||||
#define QCOM_CPU_PART_FALKOR 0xC00
|
||||
#define QCOM_CPU_PART_KRYO 0x200
|
||||
|
||||
#define NVIDIA_CPU_PART_DENVER 0x003
|
||||
#define NVIDIA_CPU_PART_CARMEL 0x004
|
||||
|
||||
#define MIDR_CORTEX_A53 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A53)
|
||||
#define MIDR_CORTEX_A55 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A55)
|
||||
#define MIDR_CORTEX_A57 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A57)
|
||||
@@ -112,6 +116,8 @@
|
||||
#define MIDR_QCOM_FALKOR_V1 MIDR_CPU_MODEL(ARM_CPU_IMP_QCOM, QCOM_CPU_PART_FALKOR_V1)
|
||||
#define MIDR_QCOM_FALKOR MIDR_CPU_MODEL(ARM_CPU_IMP_QCOM, QCOM_CPU_PART_FALKOR)
|
||||
#define MIDR_QCOM_KRYO MIDR_CPU_MODEL(ARM_CPU_IMP_QCOM, QCOM_CPU_PART_KRYO)
|
||||
#define MIDR_NVIDIA_DENVER MIDR_CPU_MODEL(ARM_CPU_IMP_NVIDIA, NVIDIA_CPU_PART_DENVER)
|
||||
#define MIDR_NVIDIA_CARMEL MIDR_CPU_MODEL(ARM_CPU_IMP_NVIDIA, NVIDIA_CPU_PART_CARMEL)
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <linux/sched/signal.h>
|
||||
#include <linux/sched/task_stack.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/nospec.h>
|
||||
#include <linux/smp.h>
|
||||
#include <linux/ptrace.h>
|
||||
#include <linux/user.h>
|
||||
@@ -247,15 +248,20 @@ static struct perf_event *ptrace_hbp_get_event(unsigned int note_type,
|
||||
|
||||
switch (note_type) {
|
||||
case NT_ARM_HW_BREAK:
|
||||
if (idx < ARM_MAX_BRP)
|
||||
bp = tsk->thread.debug.hbp_break[idx];
|
||||
if (idx >= ARM_MAX_BRP)
|
||||
goto out;
|
||||
idx = array_index_nospec(idx, ARM_MAX_BRP);
|
||||
bp = tsk->thread.debug.hbp_break[idx];
|
||||
break;
|
||||
case NT_ARM_HW_WATCH:
|
||||
if (idx < ARM_MAX_WRP)
|
||||
bp = tsk->thread.debug.hbp_watch[idx];
|
||||
if (idx >= ARM_MAX_WRP)
|
||||
goto out;
|
||||
idx = array_index_nospec(idx, ARM_MAX_WRP);
|
||||
bp = tsk->thread.debug.hbp_watch[idx];
|
||||
break;
|
||||
}
|
||||
|
||||
out:
|
||||
return bp;
|
||||
}
|
||||
|
||||
@@ -1194,9 +1200,7 @@ static int compat_ptrace_gethbpregs(struct task_struct *tsk, compat_long_t num,
|
||||
{
|
||||
int ret;
|
||||
u32 kdata;
|
||||
mm_segment_t old_fs = get_fs();
|
||||
|
||||
set_fs(KERNEL_DS);
|
||||
/* Watchpoint */
|
||||
if (num < 0) {
|
||||
ret = compat_ptrace_hbp_get(NT_ARM_HW_WATCH, tsk, num, &kdata);
|
||||
@@ -1207,7 +1211,6 @@ static int compat_ptrace_gethbpregs(struct task_struct *tsk, compat_long_t num,
|
||||
} else {
|
||||
ret = compat_ptrace_hbp_get(NT_ARM_HW_BREAK, tsk, num, &kdata);
|
||||
}
|
||||
set_fs(old_fs);
|
||||
|
||||
if (!ret)
|
||||
ret = put_user(kdata, data);
|
||||
@@ -1220,7 +1223,6 @@ static int compat_ptrace_sethbpregs(struct task_struct *tsk, compat_long_t num,
|
||||
{
|
||||
int ret;
|
||||
u32 kdata = 0;
|
||||
mm_segment_t old_fs = get_fs();
|
||||
|
||||
if (num == 0)
|
||||
return 0;
|
||||
@@ -1229,12 +1231,10 @@ static int compat_ptrace_sethbpregs(struct task_struct *tsk, compat_long_t num,
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
set_fs(KERNEL_DS);
|
||||
if (num < 0)
|
||||
ret = compat_ptrace_hbp_set(NT_ARM_HW_WATCH, tsk, num, &kdata);
|
||||
else
|
||||
ret = compat_ptrace_hbp_set(NT_ARM_HW_BREAK, tsk, num, &kdata);
|
||||
set_fs(old_fs);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -216,6 +216,12 @@ static inline void memcpy_toio(volatile void __iomem *dst, const void *src,
|
||||
memcpy((void *) dst, src, count);
|
||||
}
|
||||
|
||||
static inline void memset_io(volatile void __iomem *addr, int value,
|
||||
size_t size)
|
||||
{
|
||||
memset((void __force *)addr, value, size);
|
||||
}
|
||||
|
||||
#define PCI_IO_ADDR (volatile void __iomem *)
|
||||
|
||||
/*
|
||||
|
||||
@@ -199,3 +199,4 @@ csum_partial_copy_nocheck(const void *src, void *dst, int len, __wsum sum)
|
||||
memcpy(dst, src, len);
|
||||
return csum_partial(dst, len, sum);
|
||||
}
|
||||
EXPORT_SYMBOL(csum_partial_copy_nocheck);
|
||||
|
||||
@@ -51,6 +51,8 @@
|
||||
ranges = <0x02000000 0 0x40000000
|
||||
0x40000000 0 0x40000000>;
|
||||
|
||||
bus-range = <0x00 0xff>;
|
||||
|
||||
interrupt-map-mask = <0 0 0 7>;
|
||||
interrupt-map = <0 0 0 1 &pci0_intc 1>,
|
||||
<0 0 0 2 &pci0_intc 2>,
|
||||
@@ -79,6 +81,8 @@
|
||||
ranges = <0x02000000 0 0x20000000
|
||||
0x20000000 0 0x20000000>;
|
||||
|
||||
bus-range = <0x00 0xff>;
|
||||
|
||||
interrupt-map-mask = <0 0 0 7>;
|
||||
interrupt-map = <0 0 0 1 &pci1_intc 1>,
|
||||
<0 0 0 2 &pci1_intc 2>,
|
||||
@@ -107,6 +111,8 @@
|
||||
ranges = <0x02000000 0 0x16000000
|
||||
0x16000000 0 0x100000>;
|
||||
|
||||
bus-range = <0x00 0xff>;
|
||||
|
||||
interrupt-map-mask = <0 0 0 7>;
|
||||
interrupt-map = <0 0 0 1 &pci2_intc 1>,
|
||||
<0 0 0 2 &pci2_intc 2>,
|
||||
|
||||
@@ -307,7 +307,7 @@ static inline void iounmap(const volatile void __iomem *addr)
|
||||
#if defined(CONFIG_CPU_CAVIUM_OCTEON) || defined(CONFIG_LOONGSON3_ENHANCEMENT)
|
||||
#define war_io_reorder_wmb() wmb()
|
||||
#else
|
||||
#define war_io_reorder_wmb() do { } while (0)
|
||||
#define war_io_reorder_wmb() barrier()
|
||||
#endif
|
||||
|
||||
#define __BUILD_MEMORY_SINGLE(pfx, bwlq, type, irq) \
|
||||
@@ -377,6 +377,8 @@ static inline type pfx##read##bwlq(const volatile void __iomem *mem) \
|
||||
BUG(); \
|
||||
} \
|
||||
\
|
||||
/* prevent prefetching of coherent DMA data prematurely */ \
|
||||
rmb(); \
|
||||
return pfx##ioswab##bwlq(__mem, __val); \
|
||||
}
|
||||
|
||||
|
||||
@@ -448,7 +448,8 @@ static int match_by_id(struct device * dev, void * data)
|
||||
* Checks all the children of @parent for a matching @id. If none
|
||||
* found, it allocates a new device and returns it.
|
||||
*/
|
||||
static struct parisc_device * alloc_tree_node(struct device *parent, char id)
|
||||
static struct parisc_device * __init alloc_tree_node(
|
||||
struct device *parent, char id)
|
||||
{
|
||||
struct match_id_data d = {
|
||||
.id = id,
|
||||
@@ -825,8 +826,8 @@ void walk_lower_bus(struct parisc_device *dev)
|
||||
* devices which are not physically connected (such as extra serial &
|
||||
* keyboard ports). This problem is not yet solved.
|
||||
*/
|
||||
static void walk_native_bus(unsigned long io_io_low, unsigned long io_io_high,
|
||||
struct device *parent)
|
||||
static void __init walk_native_bus(unsigned long io_io_low,
|
||||
unsigned long io_io_high, struct device *parent)
|
||||
{
|
||||
int i, devices_found = 0;
|
||||
unsigned long hpa = io_io_low;
|
||||
|
||||
@@ -418,8 +418,7 @@ int __cpu_up(unsigned int cpu, struct task_struct *tidle)
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PROC_FS
|
||||
int __init
|
||||
setup_profiling_timer(unsigned int multiplier)
|
||||
int setup_profiling_timer(unsigned int multiplier)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@@ -205,7 +205,7 @@ static int __init rtc_init(void)
|
||||
device_initcall(rtc_init);
|
||||
#endif
|
||||
|
||||
void read_persistent_clock(struct timespec *ts)
|
||||
void read_persistent_clock64(struct timespec64 *ts)
|
||||
{
|
||||
static struct pdc_tod tod_data;
|
||||
if (pdc_tod_read(&tod_data) == 0) {
|
||||
|
||||
@@ -82,19 +82,6 @@ static const struct file_operations memtrace_fops = {
|
||||
.open = simple_open,
|
||||
};
|
||||
|
||||
static void flush_memory_region(u64 base, u64 size)
|
||||
{
|
||||
unsigned long line_size = ppc64_caches.l1d.size;
|
||||
u64 end = base + size;
|
||||
u64 addr;
|
||||
|
||||
base = round_down(base, line_size);
|
||||
end = round_up(end, line_size);
|
||||
|
||||
for (addr = base; addr < end; addr += line_size)
|
||||
asm volatile("dcbf 0,%0" : "=r" (addr) :: "memory");
|
||||
}
|
||||
|
||||
static int check_memblock_online(struct memory_block *mem, void *arg)
|
||||
{
|
||||
if (mem->state != MEM_ONLINE)
|
||||
@@ -132,10 +119,6 @@ static bool memtrace_offline_pages(u32 nid, u64 start_pfn, u64 nr_pages)
|
||||
walk_memory_range(start_pfn, end_pfn, (void *)MEM_OFFLINE,
|
||||
change_memblock_state);
|
||||
|
||||
/* RCU grace period? */
|
||||
flush_memory_region((u64)__va(start_pfn << PAGE_SHIFT),
|
||||
nr_pages << PAGE_SHIFT);
|
||||
|
||||
lock_device_hotplug();
|
||||
remove_memory(nid, start_pfn << PAGE_SHIFT, nr_pages << PAGE_SHIFT);
|
||||
unlock_device_hotplug();
|
||||
|
||||
@@ -43,7 +43,11 @@ void __ref cpu_probe(void)
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_CPU_J2)
|
||||
#if defined(CONFIG_SMP)
|
||||
unsigned cpu = hard_smp_processor_id();
|
||||
#else
|
||||
unsigned cpu = 0;
|
||||
#endif
|
||||
if (cpu == 0) of_scan_flat_dt(scan_cache, NULL);
|
||||
if (j2_ccr_base) __raw_writel(0x80000303, j2_ccr_base + 4*cpu);
|
||||
if (cpu != 0) return;
|
||||
|
||||
@@ -3331,7 +3331,8 @@ static void intel_pmu_cpu_starting(int cpu)
|
||||
|
||||
cpuc->lbr_sel = NULL;
|
||||
|
||||
flip_smm_bit(&x86_pmu.attr_freeze_on_smi);
|
||||
if (x86_pmu.version > 1)
|
||||
flip_smm_bit(&x86_pmu.attr_freeze_on_smi);
|
||||
|
||||
if (!cpuc->shared_regs)
|
||||
return;
|
||||
@@ -3494,6 +3495,8 @@ static __initconst const struct x86_pmu core_pmu = {
|
||||
.cpu_dying = intel_pmu_cpu_dying,
|
||||
};
|
||||
|
||||
static struct attribute *intel_pmu_attrs[];
|
||||
|
||||
static __initconst const struct x86_pmu intel_pmu = {
|
||||
.name = "Intel",
|
||||
.handle_irq = intel_pmu_handle_irq,
|
||||
@@ -3524,6 +3527,8 @@ static __initconst const struct x86_pmu intel_pmu = {
|
||||
.format_attrs = intel_arch3_formats_attr,
|
||||
.events_sysfs_show = intel_event_sysfs_show,
|
||||
|
||||
.attrs = intel_pmu_attrs,
|
||||
|
||||
.cpu_prepare = intel_pmu_cpu_prepare,
|
||||
.cpu_starting = intel_pmu_cpu_starting,
|
||||
.cpu_dying = intel_pmu_cpu_dying,
|
||||
@@ -3902,8 +3907,6 @@ __init int intel_pmu_init(void)
|
||||
|
||||
x86_pmu.max_pebs_events = min_t(unsigned, MAX_PEBS_EVENTS, x86_pmu.num_counters);
|
||||
|
||||
|
||||
x86_pmu.attrs = intel_pmu_attrs;
|
||||
/*
|
||||
* Quirk: v2 perfmon does not report fixed-purpose events, so
|
||||
* assume at least 3 events, when not running in a hypervisor:
|
||||
|
||||
@@ -208,4 +208,22 @@ static inline int insn_offset_immediate(struct insn *insn)
|
||||
return insn_offset_displacement(insn) + insn->displacement.nbytes;
|
||||
}
|
||||
|
||||
#define POP_SS_OPCODE 0x1f
|
||||
#define MOV_SREG_OPCODE 0x8e
|
||||
|
||||
/*
|
||||
* Intel SDM Vol.3A 6.8.3 states;
|
||||
* "Any single-step trap that would be delivered following the MOV to SS
|
||||
* instruction or POP to SS instruction (because EFLAGS.TF is 1) is
|
||||
* suppressed."
|
||||
* This function returns true if @insn is MOV SS or POP SS. On these
|
||||
* instructions, single stepping is suppressed.
|
||||
*/
|
||||
static inline int insn_masking_exception(struct insn *insn)
|
||||
{
|
||||
return insn->opcode.bytes[0] == POP_SS_OPCODE ||
|
||||
(insn->opcode.bytes[0] == MOV_SREG_OPCODE &&
|
||||
X86_MODRM_REG(insn->modrm.bytes[0]) == 2);
|
||||
}
|
||||
|
||||
#endif /* _ASM_X86_INSN_H */
|
||||
|
||||
@@ -751,6 +751,9 @@ static const struct _tlb_table intel_tlb_table[] = {
|
||||
{ 0x5d, TLB_DATA_4K_4M, 256, " TLB_DATA 4 KByte and 4 MByte pages" },
|
||||
{ 0x61, TLB_INST_4K, 48, " TLB_INST 4 KByte pages, full associative" },
|
||||
{ 0x63, TLB_DATA_1G, 4, " TLB_DATA 1 GByte pages, 4-way set associative" },
|
||||
{ 0x6b, TLB_DATA_4K, 256, " TLB_DATA 4 KByte pages, 8-way associative" },
|
||||
{ 0x6c, TLB_DATA_2M_4M, 128, " TLB_DATA 2 MByte or 4 MByte pages, 8-way associative" },
|
||||
{ 0x6d, TLB_DATA_1G, 16, " TLB_DATA 1 GByte pages, fully associative" },
|
||||
{ 0x76, TLB_INST_2M_4M, 8, " TLB_INST 2-MByte or 4-MByte pages, fully associative" },
|
||||
{ 0xb0, TLB_INST_4K, 128, " TLB_INST 4 KByte pages, 4-way set associative" },
|
||||
{ 0xb1, TLB_INST_2M_4M, 4, " TLB_INST 2M pages, 4-way, 8 entries or 4M pages, 4-way entries" },
|
||||
|
||||
@@ -398,11 +398,10 @@ static void *bzImage64_load(struct kimage *image, char *kernel,
|
||||
* little bit simple
|
||||
*/
|
||||
efi_map_sz = efi_get_runtime_map_size();
|
||||
efi_map_sz = ALIGN(efi_map_sz, 16);
|
||||
params_cmdline_sz = sizeof(struct boot_params) + cmdline_len +
|
||||
MAX_ELFCOREHDR_STR_LEN;
|
||||
params_cmdline_sz = ALIGN(params_cmdline_sz, 16);
|
||||
kbuf.bufsz = params_cmdline_sz + efi_map_sz +
|
||||
kbuf.bufsz = params_cmdline_sz + ALIGN(efi_map_sz, 16) +
|
||||
sizeof(struct setup_data) +
|
||||
sizeof(struct efi_setup_data);
|
||||
|
||||
@@ -410,7 +409,7 @@ static void *bzImage64_load(struct kimage *image, char *kernel,
|
||||
if (!params)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
efi_map_offset = params_cmdline_sz;
|
||||
efi_setup_data_offset = efi_map_offset + efi_map_sz;
|
||||
efi_setup_data_offset = efi_map_offset + ALIGN(efi_map_sz, 16);
|
||||
|
||||
/* Copy setup header onto bootparams. Documentation/x86/boot.txt */
|
||||
setup_header_size = 0x0202 + kernel[0x0201] - setup_hdr_offset;
|
||||
|
||||
@@ -369,6 +369,10 @@ int __copy_instruction(u8 *dest, u8 *src, struct insn *insn)
|
||||
if (insn->opcode.bytes[0] == BREAKPOINT_INSTRUCTION)
|
||||
return 0;
|
||||
|
||||
/* We should not singlestep on the exception masking instructions */
|
||||
if (insn_masking_exception(insn))
|
||||
return 0;
|
||||
|
||||
#ifdef CONFIG_X86_64
|
||||
/* Only x86_64 has RIP relative instructions */
|
||||
if (insn_rip_relative(insn)) {
|
||||
|
||||
@@ -296,6 +296,10 @@ static int uprobe_init_insn(struct arch_uprobe *auprobe, struct insn *insn, bool
|
||||
if (is_prefix_bad(insn))
|
||||
return -ENOTSUPP;
|
||||
|
||||
/* We should not singlestep on the exception masking instructions */
|
||||
if (insn_masking_exception(insn))
|
||||
return -ENOTSUPP;
|
||||
|
||||
if (x86_64)
|
||||
good_insns = good_insns_64;
|
||||
else
|
||||
|
||||
@@ -1223,7 +1223,7 @@ static int kvm_hv_hypercall_complete_userspace(struct kvm_vcpu *vcpu)
|
||||
struct kvm_run *run = vcpu->run;
|
||||
|
||||
kvm_hv_hypercall_set_result(vcpu, run->hyperv.u.hcall.result);
|
||||
return 1;
|
||||
return kvm_skip_emulated_instruction(vcpu);
|
||||
}
|
||||
|
||||
int kvm_hv_hypercall(struct kvm_vcpu *vcpu)
|
||||
|
||||
@@ -4756,9 +4756,8 @@ static int svm_update_pi_irte(struct kvm *kvm, unsigned int host_irq,
|
||||
}
|
||||
|
||||
if (!ret && svm) {
|
||||
trace_kvm_pi_irte_update(svm->vcpu.vcpu_id,
|
||||
host_irq, e->gsi,
|
||||
vcpu_info.vector,
|
||||
trace_kvm_pi_irte_update(host_irq, svm->vcpu.vcpu_id,
|
||||
e->gsi, vcpu_info.vector,
|
||||
vcpu_info.pi_desc_addr, set);
|
||||
}
|
||||
|
||||
|
||||
@@ -10318,6 +10318,16 @@ static inline bool nested_vmx_merge_msr_bitmap(struct kvm_vcpu *vcpu,
|
||||
return true;
|
||||
}
|
||||
|
||||
static int nested_vmx_check_apic_access_controls(struct kvm_vcpu *vcpu,
|
||||
struct vmcs12 *vmcs12)
|
||||
{
|
||||
if (nested_cpu_has2(vmcs12, SECONDARY_EXEC_VIRTUALIZE_APIC_ACCESSES) &&
|
||||
!page_address_valid(vcpu, vmcs12->apic_access_addr))
|
||||
return -EINVAL;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int nested_vmx_check_apicv_controls(struct kvm_vcpu *vcpu,
|
||||
struct vmcs12 *vmcs12)
|
||||
{
|
||||
@@ -10961,6 +10971,9 @@ static int check_vmentry_prereqs(struct kvm_vcpu *vcpu, struct vmcs12 *vmcs12)
|
||||
if (nested_vmx_check_msr_bitmap_controls(vcpu, vmcs12))
|
||||
return VMXERR_ENTRY_INVALID_CONTROL_FIELD;
|
||||
|
||||
if (nested_vmx_check_apic_access_controls(vcpu, vmcs12))
|
||||
return VMXERR_ENTRY_INVALID_CONTROL_FIELD;
|
||||
|
||||
if (nested_vmx_check_tpr_shadow_controls(vcpu, vmcs12))
|
||||
return VMXERR_ENTRY_INVALID_CONTROL_FIELD;
|
||||
|
||||
@@ -12171,7 +12184,7 @@ static int vmx_update_pi_irte(struct kvm *kvm, unsigned int host_irq,
|
||||
vcpu_info.pi_desc_addr = __pa(vcpu_to_pi_desc(vcpu));
|
||||
vcpu_info.vector = irq.vector;
|
||||
|
||||
trace_kvm_pi_irte_update(vcpu->vcpu_id, host_irq, e->gsi,
|
||||
trace_kvm_pi_irte_update(host_irq, vcpu->vcpu_id, e->gsi,
|
||||
vcpu_info.vector, vcpu_info.pi_desc_addr, set);
|
||||
|
||||
if (set)
|
||||
|
||||
@@ -6297,12 +6297,13 @@ void kvm_vcpu_deactivate_apicv(struct kvm_vcpu *vcpu)
|
||||
int kvm_emulate_hypercall(struct kvm_vcpu *vcpu)
|
||||
{
|
||||
unsigned long nr, a0, a1, a2, a3, ret;
|
||||
int op_64_bit, r;
|
||||
int op_64_bit;
|
||||
|
||||
r = kvm_skip_emulated_instruction(vcpu);
|
||||
|
||||
if (kvm_hv_hypercall_enabled(vcpu->kvm))
|
||||
return kvm_hv_hypercall(vcpu);
|
||||
if (kvm_hv_hypercall_enabled(vcpu->kvm)) {
|
||||
if (!kvm_hv_hypercall(vcpu))
|
||||
return 0;
|
||||
goto out;
|
||||
}
|
||||
|
||||
nr = kvm_register_read(vcpu, VCPU_REGS_RAX);
|
||||
a0 = kvm_register_read(vcpu, VCPU_REGS_RBX);
|
||||
@@ -6323,7 +6324,7 @@ int kvm_emulate_hypercall(struct kvm_vcpu *vcpu)
|
||||
|
||||
if (kvm_x86_ops->get_cpl(vcpu) != 0) {
|
||||
ret = -KVM_EPERM;
|
||||
goto out;
|
||||
goto out_error;
|
||||
}
|
||||
|
||||
switch (nr) {
|
||||
@@ -6343,12 +6344,14 @@ int kvm_emulate_hypercall(struct kvm_vcpu *vcpu)
|
||||
ret = -KVM_ENOSYS;
|
||||
break;
|
||||
}
|
||||
out:
|
||||
out_error:
|
||||
if (!op_64_bit)
|
||||
ret = (u32)ret;
|
||||
kvm_register_write(vcpu, VCPU_REGS_RAX, ret);
|
||||
|
||||
out:
|
||||
++vcpu->stat.hypercalls;
|
||||
return r;
|
||||
return kvm_skip_emulated_instruction(vcpu);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(kvm_emulate_hypercall);
|
||||
|
||||
|
||||
@@ -1159,6 +1159,7 @@ struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *prog)
|
||||
for (pass = 0; pass < 20 || image; pass++) {
|
||||
proglen = do_jit(prog, addrs, image, oldproglen, &ctx);
|
||||
if (proglen <= 0) {
|
||||
out_image:
|
||||
image = NULL;
|
||||
if (header)
|
||||
bpf_jit_binary_free(header);
|
||||
@@ -1169,8 +1170,7 @@ struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *prog)
|
||||
if (proglen != oldproglen) {
|
||||
pr_err("bpf_jit: proglen=%d != oldproglen=%d\n",
|
||||
proglen, oldproglen);
|
||||
prog = orig_prog;
|
||||
goto out_addrs;
|
||||
goto out_image;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -64,6 +64,19 @@ static void __init xen_hvm_init_mem_mapping(void)
|
||||
{
|
||||
early_memunmap(HYPERVISOR_shared_info, PAGE_SIZE);
|
||||
HYPERVISOR_shared_info = __va(PFN_PHYS(shared_info_pfn));
|
||||
|
||||
/*
|
||||
* The virtual address of the shared_info page has changed, so
|
||||
* the vcpu_info pointer for VCPU 0 is now stale.
|
||||
*
|
||||
* The prepare_boot_cpu callback will re-initialize it via
|
||||
* xen_vcpu_setup, but we can't rely on that to be called for
|
||||
* old Xen versions (xen_have_vector_callback == 0).
|
||||
*
|
||||
* It is, in any case, bad to have a stale vcpu_info pointer
|
||||
* so reset it now.
|
||||
*/
|
||||
xen_vcpu_info_reset(0);
|
||||
}
|
||||
|
||||
static void __init init_hvm_pv_info(void)
|
||||
|
||||
@@ -1149,18 +1149,16 @@ int blkcg_init_queue(struct request_queue *q)
|
||||
rcu_read_lock();
|
||||
spin_lock_irq(q->queue_lock);
|
||||
blkg = blkg_create(&blkcg_root, q, new_blkg);
|
||||
if (IS_ERR(blkg))
|
||||
goto err_unlock;
|
||||
q->root_blkg = blkg;
|
||||
q->root_rl.blkg = blkg;
|
||||
spin_unlock_irq(q->queue_lock);
|
||||
rcu_read_unlock();
|
||||
|
||||
if (preloaded)
|
||||
radix_tree_preload_end();
|
||||
|
||||
if (IS_ERR(blkg))
|
||||
return PTR_ERR(blkg);
|
||||
|
||||
q->root_blkg = blkg;
|
||||
q->root_rl.blkg = blkg;
|
||||
|
||||
ret = blk_throtl_init(q);
|
||||
if (ret) {
|
||||
spin_lock_irq(q->queue_lock);
|
||||
@@ -1168,6 +1166,13 @@ int blkcg_init_queue(struct request_queue *q)
|
||||
spin_unlock_irq(q->queue_lock);
|
||||
}
|
||||
return ret;
|
||||
|
||||
err_unlock:
|
||||
spin_unlock_irq(q->queue_lock);
|
||||
rcu_read_unlock();
|
||||
if (preloaded)
|
||||
radix_tree_preload_end();
|
||||
return PTR_ERR(blkg);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1374,17 +1379,12 @@ void blkcg_deactivate_policy(struct request_queue *q,
|
||||
__clear_bit(pol->plid, q->blkcg_pols);
|
||||
|
||||
list_for_each_entry(blkg, &q->blkg_list, q_node) {
|
||||
/* grab blkcg lock too while removing @pd from @blkg */
|
||||
spin_lock(&blkg->blkcg->lock);
|
||||
|
||||
if (blkg->pd[pol->plid]) {
|
||||
if (pol->pd_offline_fn)
|
||||
pol->pd_offline_fn(blkg->pd[pol->plid]);
|
||||
pol->pd_free_fn(blkg->pd[pol->plid]);
|
||||
blkg->pd[pol->plid] = NULL;
|
||||
}
|
||||
|
||||
spin_unlock(&blkg->blkcg->lock);
|
||||
}
|
||||
|
||||
spin_unlock_irq(q->queue_lock);
|
||||
|
||||
@@ -118,6 +118,25 @@ void blk_mq_in_flight(struct request_queue *q, struct hd_struct *part,
|
||||
blk_mq_queue_tag_busy_iter(q, blk_mq_check_inflight, &mi);
|
||||
}
|
||||
|
||||
static void blk_mq_check_inflight_rw(struct blk_mq_hw_ctx *hctx,
|
||||
struct request *rq, void *priv,
|
||||
bool reserved)
|
||||
{
|
||||
struct mq_inflight *mi = priv;
|
||||
|
||||
if (rq->part == mi->part)
|
||||
mi->inflight[rq_data_dir(rq)]++;
|
||||
}
|
||||
|
||||
void blk_mq_in_flight_rw(struct request_queue *q, struct hd_struct *part,
|
||||
unsigned int inflight[2])
|
||||
{
|
||||
struct mq_inflight mi = { .part = part, .inflight = inflight, };
|
||||
|
||||
inflight[0] = inflight[1] = 0;
|
||||
blk_mq_queue_tag_busy_iter(q, blk_mq_check_inflight_rw, &mi);
|
||||
}
|
||||
|
||||
void blk_freeze_queue_start(struct request_queue *q)
|
||||
{
|
||||
int freeze_depth;
|
||||
|
||||
@@ -136,6 +136,8 @@ static inline bool blk_mq_hw_queue_mapped(struct blk_mq_hw_ctx *hctx)
|
||||
}
|
||||
|
||||
void blk_mq_in_flight(struct request_queue *q, struct hd_struct *part,
|
||||
unsigned int inflight[2]);
|
||||
unsigned int inflight[2]);
|
||||
void blk_mq_in_flight_rw(struct request_queue *q, struct hd_struct *part,
|
||||
unsigned int inflight[2]);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -82,6 +82,18 @@ void part_in_flight(struct request_queue *q, struct hd_struct *part,
|
||||
}
|
||||
}
|
||||
|
||||
void part_in_flight_rw(struct request_queue *q, struct hd_struct *part,
|
||||
unsigned int inflight[2])
|
||||
{
|
||||
if (q->mq_ops) {
|
||||
blk_mq_in_flight_rw(q, part, inflight);
|
||||
return;
|
||||
}
|
||||
|
||||
inflight[0] = atomic_read(&part->in_flight[0]);
|
||||
inflight[1] = atomic_read(&part->in_flight[1]);
|
||||
}
|
||||
|
||||
struct hd_struct *__disk_get_part(struct gendisk *disk, int partno)
|
||||
{
|
||||
struct disk_part_tbl *ptbl = rcu_dereference(disk->part_tbl);
|
||||
|
||||
@@ -145,13 +145,15 @@ ssize_t part_stat_show(struct device *dev,
|
||||
jiffies_to_msecs(part_stat_read(p, time_in_queue)));
|
||||
}
|
||||
|
||||
ssize_t part_inflight_show(struct device *dev,
|
||||
struct device_attribute *attr, char *buf)
|
||||
ssize_t part_inflight_show(struct device *dev, struct device_attribute *attr,
|
||||
char *buf)
|
||||
{
|
||||
struct hd_struct *p = dev_to_part(dev);
|
||||
struct request_queue *q = part_to_disk(p)->queue;
|
||||
unsigned int inflight[2];
|
||||
|
||||
return sprintf(buf, "%8u %8u\n", atomic_read(&p->in_flight[0]),
|
||||
atomic_read(&p->in_flight[1]));
|
||||
part_in_flight_rw(q, p, inflight);
|
||||
return sprintf(buf, "%8u %8u\n", inflight[0], inflight[1]);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_FAIL_MAKE_REQUEST
|
||||
|
||||
@@ -12,23 +12,64 @@
|
||||
#define pr_fmt(fmt) "ACPI: watchdog: " fmt
|
||||
|
||||
#include <linux/acpi.h>
|
||||
#include <linux/dmi.h>
|
||||
#include <linux/ioport.h>
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
#include "internal.h"
|
||||
|
||||
static const struct dmi_system_id acpi_watchdog_skip[] = {
|
||||
{
|
||||
/*
|
||||
* On Lenovo Z50-70 there are two issues with the WDAT
|
||||
* table. First some of the instructions use RTC SRAM
|
||||
* to store persistent information. This does not work well
|
||||
* with Linux RTC driver. Second, more important thing is
|
||||
* that the instructions do not actually reset the system.
|
||||
*
|
||||
* On this particular system iTCO_wdt seems to work just
|
||||
* fine so we prefer that over WDAT for now.
|
||||
*
|
||||
* See also https://bugzilla.kernel.org/show_bug.cgi?id=199033.
|
||||
*/
|
||||
.ident = "Lenovo Z50-70",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "20354"),
|
||||
DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo Z50-70"),
|
||||
},
|
||||
},
|
||||
{}
|
||||
};
|
||||
|
||||
static const struct acpi_table_wdat *acpi_watchdog_get_wdat(void)
|
||||
{
|
||||
const struct acpi_table_wdat *wdat = NULL;
|
||||
acpi_status status;
|
||||
|
||||
if (acpi_disabled)
|
||||
return NULL;
|
||||
|
||||
if (dmi_check_system(acpi_watchdog_skip))
|
||||
return NULL;
|
||||
|
||||
status = acpi_get_table(ACPI_SIG_WDAT, 0,
|
||||
(struct acpi_table_header **)&wdat);
|
||||
if (ACPI_FAILURE(status)) {
|
||||
/* It is fine if there is no WDAT */
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return wdat;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if this system should prefer ACPI based watchdog instead of
|
||||
* the native one (which are typically the same hardware).
|
||||
*/
|
||||
bool acpi_has_watchdog(void)
|
||||
{
|
||||
struct acpi_table_header hdr;
|
||||
|
||||
if (acpi_disabled)
|
||||
return false;
|
||||
|
||||
return ACPI_SUCCESS(acpi_get_table_header(ACPI_SIG_WDAT, 0, &hdr));
|
||||
return !!acpi_watchdog_get_wdat();
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(acpi_has_watchdog);
|
||||
|
||||
@@ -41,12 +82,10 @@ void __init acpi_watchdog_init(void)
|
||||
struct platform_device *pdev;
|
||||
struct resource *resources;
|
||||
size_t nresources = 0;
|
||||
acpi_status status;
|
||||
int i;
|
||||
|
||||
status = acpi_get_table(ACPI_SIG_WDAT, 0,
|
||||
(struct acpi_table_header **)&wdat);
|
||||
if (ACPI_FAILURE(status)) {
|
||||
wdat = acpi_watchdog_get_wdat();
|
||||
if (!wdat) {
|
||||
/* It is fine if there is no WDAT */
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -364,6 +364,19 @@ static const struct dmi_system_id acpisleep_dmi_table[] __initconst = {
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "XPS 13 9360"),
|
||||
},
|
||||
},
|
||||
/*
|
||||
* ThinkPad X1 Tablet(2016) cannot do suspend-to-idle using
|
||||
* the Low Power S0 Idle firmware interface (see
|
||||
* https://bugzilla.kernel.org/show_bug.cgi?id=199057).
|
||||
*/
|
||||
{
|
||||
.callback = init_no_lps0,
|
||||
.ident = "ThinkPad X1 Tablet(2016)",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "20GGA00L00"),
|
||||
},
|
||||
},
|
||||
{},
|
||||
};
|
||||
|
||||
|
||||
@@ -686,7 +686,7 @@ static int ahci_vt8251_hardreset(struct ata_link *link, unsigned int *class,
|
||||
|
||||
DPRINTK("ENTER\n");
|
||||
|
||||
ahci_stop_engine(ap);
|
||||
hpriv->stop_engine(ap);
|
||||
|
||||
rc = sata_link_hardreset(link, sata_ehc_deb_timing(&link->eh_context),
|
||||
deadline, &online, NULL);
|
||||
@@ -712,7 +712,7 @@ static int ahci_p5wdh_hardreset(struct ata_link *link, unsigned int *class,
|
||||
bool online;
|
||||
int rc;
|
||||
|
||||
ahci_stop_engine(ap);
|
||||
hpriv->stop_engine(ap);
|
||||
|
||||
/* clear D2H reception area to properly wait for D2H FIS */
|
||||
ata_tf_init(link->device, &tf);
|
||||
@@ -776,7 +776,7 @@ static int ahci_avn_hardreset(struct ata_link *link, unsigned int *class,
|
||||
|
||||
DPRINTK("ENTER\n");
|
||||
|
||||
ahci_stop_engine(ap);
|
||||
hpriv->stop_engine(ap);
|
||||
|
||||
for (i = 0; i < 2; i++) {
|
||||
u16 val;
|
||||
|
||||
@@ -361,6 +361,13 @@ struct ahci_host_priv {
|
||||
* be overridden anytime before the host is activated.
|
||||
*/
|
||||
void (*start_engine)(struct ata_port *ap);
|
||||
/*
|
||||
* Optional ahci_stop_engine override, if not set this gets set to the
|
||||
* default ahci_stop_engine during ahci_save_initial_config, this can
|
||||
* be overridden anytime before the host is activated.
|
||||
*/
|
||||
int (*stop_engine)(struct ata_port *ap);
|
||||
|
||||
irqreturn_t (*irq_handler)(int irq, void *dev_instance);
|
||||
|
||||
/* only required for per-port MSI(-X) support */
|
||||
|
||||
@@ -62,6 +62,60 @@ static void ahci_mvebu_regret_option(struct ahci_host_priv *hpriv)
|
||||
writel(0x80, hpriv->mmio + AHCI_VENDOR_SPECIFIC_0_DATA);
|
||||
}
|
||||
|
||||
/**
|
||||
* ahci_mvebu_stop_engine
|
||||
*
|
||||
* @ap: Target ata port
|
||||
*
|
||||
* Errata Ref#226 - SATA Disk HOT swap issue when connected through
|
||||
* Port Multiplier in FIS-based Switching mode.
|
||||
*
|
||||
* To avoid the issue, according to design, the bits[11:8, 0] of
|
||||
* register PxFBS are cleared when Port Command and Status (0x18) bit[0]
|
||||
* changes its value from 1 to 0, i.e. falling edge of Port
|
||||
* Command and Status bit[0] sends PULSE that resets PxFBS
|
||||
* bits[11:8; 0].
|
||||
*
|
||||
* This function is used to override function of "ahci_stop_engine"
|
||||
* from libahci.c by adding the mvebu work around(WA) to save PxFBS
|
||||
* value before the PxCMD ST write of 0, then restore PxFBS value.
|
||||
*
|
||||
* Return: 0 on success; Error code otherwise.
|
||||
*/
|
||||
int ahci_mvebu_stop_engine(struct ata_port *ap)
|
||||
{
|
||||
void __iomem *port_mmio = ahci_port_base(ap);
|
||||
u32 tmp, port_fbs;
|
||||
|
||||
tmp = readl(port_mmio + PORT_CMD);
|
||||
|
||||
/* check if the HBA is idle */
|
||||
if ((tmp & (PORT_CMD_START | PORT_CMD_LIST_ON)) == 0)
|
||||
return 0;
|
||||
|
||||
/* save the port PxFBS register for later restore */
|
||||
port_fbs = readl(port_mmio + PORT_FBS);
|
||||
|
||||
/* setting HBA to idle */
|
||||
tmp &= ~PORT_CMD_START;
|
||||
writel(tmp, port_mmio + PORT_CMD);
|
||||
|
||||
/*
|
||||
* bit #15 PxCMD signal doesn't clear PxFBS,
|
||||
* restore the PxFBS register right after clearing the PxCMD ST,
|
||||
* no need to wait for the PxCMD bit #15.
|
||||
*/
|
||||
writel(port_fbs, port_mmio + PORT_FBS);
|
||||
|
||||
/* wait for engine to stop. This could be as long as 500 msec */
|
||||
tmp = ata_wait_register(ap, port_mmio + PORT_CMD,
|
||||
PORT_CMD_LIST_ON, PORT_CMD_LIST_ON, 1, 500);
|
||||
if (tmp & PORT_CMD_LIST_ON)
|
||||
return -EIO;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
static int ahci_mvebu_suspend(struct platform_device *pdev, pm_message_t state)
|
||||
{
|
||||
@@ -112,6 +166,8 @@ static int ahci_mvebu_probe(struct platform_device *pdev)
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
hpriv->stop_engine = ahci_mvebu_stop_engine;
|
||||
|
||||
if (of_device_is_compatible(pdev->dev.of_node,
|
||||
"marvell,armada-380-ahci")) {
|
||||
dram = mv_mbus_dram_info();
|
||||
|
||||
@@ -94,7 +94,7 @@ static int ahci_qoriq_hardreset(struct ata_link *link, unsigned int *class,
|
||||
|
||||
DPRINTK("ENTER\n");
|
||||
|
||||
ahci_stop_engine(ap);
|
||||
hpriv->stop_engine(ap);
|
||||
|
||||
/*
|
||||
* There is a errata on ls1021a Rev1.0 and Rev2.0 which is:
|
||||
|
||||
@@ -165,7 +165,7 @@ static int xgene_ahci_restart_engine(struct ata_port *ap)
|
||||
PORT_CMD_ISSUE, 0x0, 1, 100))
|
||||
return -EBUSY;
|
||||
|
||||
ahci_stop_engine(ap);
|
||||
hpriv->stop_engine(ap);
|
||||
ahci_start_fis_rx(ap);
|
||||
|
||||
/*
|
||||
@@ -421,7 +421,7 @@ static int xgene_ahci_hardreset(struct ata_link *link, unsigned int *class,
|
||||
portrxfis_saved = readl(port_mmio + PORT_FIS_ADDR);
|
||||
portrxfishi_saved = readl(port_mmio + PORT_FIS_ADDR_HI);
|
||||
|
||||
ahci_stop_engine(ap);
|
||||
hpriv->stop_engine(ap);
|
||||
|
||||
rc = xgene_ahci_do_hardreset(link, deadline, &online);
|
||||
|
||||
|
||||
@@ -560,6 +560,9 @@ void ahci_save_initial_config(struct device *dev, struct ahci_host_priv *hpriv)
|
||||
if (!hpriv->start_engine)
|
||||
hpriv->start_engine = ahci_start_engine;
|
||||
|
||||
if (!hpriv->stop_engine)
|
||||
hpriv->stop_engine = ahci_stop_engine;
|
||||
|
||||
if (!hpriv->irq_handler)
|
||||
hpriv->irq_handler = ahci_single_level_irq_intr;
|
||||
}
|
||||
@@ -887,9 +890,10 @@ static void ahci_start_port(struct ata_port *ap)
|
||||
static int ahci_deinit_port(struct ata_port *ap, const char **emsg)
|
||||
{
|
||||
int rc;
|
||||
struct ahci_host_priv *hpriv = ap->host->private_data;
|
||||
|
||||
/* disable DMA */
|
||||
rc = ahci_stop_engine(ap);
|
||||
rc = hpriv->stop_engine(ap);
|
||||
if (rc) {
|
||||
*emsg = "failed to stop engine";
|
||||
return rc;
|
||||
@@ -1299,7 +1303,7 @@ int ahci_kick_engine(struct ata_port *ap)
|
||||
int busy, rc;
|
||||
|
||||
/* stop engine */
|
||||
rc = ahci_stop_engine(ap);
|
||||
rc = hpriv->stop_engine(ap);
|
||||
if (rc)
|
||||
goto out_restart;
|
||||
|
||||
@@ -1538,7 +1542,7 @@ int ahci_do_hardreset(struct ata_link *link, unsigned int *class,
|
||||
|
||||
DPRINTK("ENTER\n");
|
||||
|
||||
ahci_stop_engine(ap);
|
||||
hpriv->stop_engine(ap);
|
||||
|
||||
/* clear D2H reception area to properly wait for D2H FIS */
|
||||
ata_tf_init(link->device, &tf);
|
||||
@@ -2064,14 +2068,14 @@ void ahci_error_handler(struct ata_port *ap)
|
||||
|
||||
if (!(ap->pflags & ATA_PFLAG_FROZEN)) {
|
||||
/* restart engine */
|
||||
ahci_stop_engine(ap);
|
||||
hpriv->stop_engine(ap);
|
||||
hpriv->start_engine(ap);
|
||||
}
|
||||
|
||||
sata_pmp_error_handler(ap);
|
||||
|
||||
if (!ata_dev_enabled(ap->link.device))
|
||||
ahci_stop_engine(ap);
|
||||
hpriv->stop_engine(ap);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(ahci_error_handler);
|
||||
|
||||
@@ -2118,7 +2122,7 @@ static void ahci_set_aggressive_devslp(struct ata_port *ap, bool sleep)
|
||||
return;
|
||||
|
||||
/* set DITO, MDAT, DETO and enable DevSlp, need to stop engine first */
|
||||
rc = ahci_stop_engine(ap);
|
||||
rc = hpriv->stop_engine(ap);
|
||||
if (rc)
|
||||
return;
|
||||
|
||||
@@ -2178,7 +2182,7 @@ static void ahci_enable_fbs(struct ata_port *ap)
|
||||
return;
|
||||
}
|
||||
|
||||
rc = ahci_stop_engine(ap);
|
||||
rc = hpriv->stop_engine(ap);
|
||||
if (rc)
|
||||
return;
|
||||
|
||||
@@ -2211,7 +2215,7 @@ static void ahci_disable_fbs(struct ata_port *ap)
|
||||
return;
|
||||
}
|
||||
|
||||
rc = ahci_stop_engine(ap);
|
||||
rc = hpriv->stop_engine(ap);
|
||||
if (rc)
|
||||
return;
|
||||
|
||||
|
||||
@@ -175,8 +175,8 @@ static void ata_eh_handle_port_resume(struct ata_port *ap)
|
||||
{ }
|
||||
#endif /* CONFIG_PM */
|
||||
|
||||
static void __ata_ehi_pushv_desc(struct ata_eh_info *ehi, const char *fmt,
|
||||
va_list args)
|
||||
static __printf(2, 0) void __ata_ehi_pushv_desc(struct ata_eh_info *ehi,
|
||||
const char *fmt, va_list args)
|
||||
{
|
||||
ehi->desc_len += vscnprintf(ehi->desc + ehi->desc_len,
|
||||
ATA_EH_DESC_LEN - ehi->desc_len,
|
||||
|
||||
@@ -410,7 +410,7 @@ static int ahci_highbank_hardreset(struct ata_link *link, unsigned int *class,
|
||||
int rc;
|
||||
int retry = 100;
|
||||
|
||||
ahci_stop_engine(ap);
|
||||
hpriv->stop_engine(ap);
|
||||
|
||||
/* clear D2H reception area to properly wait for D2H FIS */
|
||||
ata_tf_init(link->device, &tf);
|
||||
|
||||
@@ -195,7 +195,7 @@ static int uninorth_insert_memory(struct agp_memory *mem, off_t pg_start, int ty
|
||||
return 0;
|
||||
}
|
||||
|
||||
int uninorth_remove_memory(struct agp_memory *mem, off_t pg_start, int type)
|
||||
static int uninorth_remove_memory(struct agp_memory *mem, off_t pg_start, int type)
|
||||
{
|
||||
size_t i;
|
||||
u32 *gp;
|
||||
@@ -470,7 +470,7 @@ static int uninorth_free_gatt_table(struct agp_bridge_data *bridge)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void null_cache_flush(void)
|
||||
static void null_cache_flush(void)
|
||||
{
|
||||
mb();
|
||||
}
|
||||
|
||||
@@ -101,10 +101,18 @@ static int clk_mux_set_parent(struct clk_hw *hw, u8 index)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int clk_mux_determine_rate(struct clk_hw *hw,
|
||||
struct clk_rate_request *req)
|
||||
{
|
||||
struct clk_mux *mux = to_clk_mux(hw);
|
||||
|
||||
return clk_mux_determine_rate_flags(hw, req, mux->flags);
|
||||
}
|
||||
|
||||
const struct clk_ops clk_mux_ops = {
|
||||
.get_parent = clk_mux_get_parent,
|
||||
.set_parent = clk_mux_set_parent,
|
||||
.determine_rate = __clk_mux_determine_rate,
|
||||
.determine_rate = clk_mux_determine_rate,
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(clk_mux_ops);
|
||||
|
||||
|
||||
@@ -351,9 +351,9 @@ static bool mux_is_better_rate(unsigned long rate, unsigned long now,
|
||||
return now <= rate && now > best;
|
||||
}
|
||||
|
||||
static int
|
||||
clk_mux_determine_rate_flags(struct clk_hw *hw, struct clk_rate_request *req,
|
||||
unsigned long flags)
|
||||
int clk_mux_determine_rate_flags(struct clk_hw *hw,
|
||||
struct clk_rate_request *req,
|
||||
unsigned long flags)
|
||||
{
|
||||
struct clk_core *core = hw->core, *parent, *best_parent = NULL;
|
||||
int i, num_parents, ret;
|
||||
@@ -413,6 +413,7 @@ out:
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(clk_mux_determine_rate_flags);
|
||||
|
||||
struct clk *__clk_lookup(const char *name)
|
||||
{
|
||||
|
||||
@@ -461,7 +461,7 @@ static void __init imx6ul_clocks_init(struct device_node *ccm_node)
|
||||
clk_set_rate(clks[IMX6UL_CLK_AHB], 99000000);
|
||||
|
||||
/* Change periph_pre clock to pll2_bus to adjust AXI rate to 264MHz */
|
||||
clk_set_parent(clks[IMX6UL_CLK_PERIPH_CLK2_SEL], clks[IMX6UL_CLK_PLL3_USB_OTG]);
|
||||
clk_set_parent(clks[IMX6UL_CLK_PERIPH_CLK2_SEL], clks[IMX6UL_CLK_OSC]);
|
||||
clk_set_parent(clks[IMX6UL_CLK_PERIPH], clks[IMX6UL_CLK_PERIPH_CLK2]);
|
||||
clk_set_parent(clks[IMX6UL_CLK_PERIPH_PRE], clks[IMX6UL_CLK_PLL2_BUS]);
|
||||
clk_set_parent(clks[IMX6UL_CLK_PERIPH], clks[IMX6UL_CLK_PERIPH_PRE]);
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#define TPM_SC 0x10
|
||||
#define TPM_SC_CMOD_INC_PER_CNT (0x1 << 3)
|
||||
#define TPM_SC_CMOD_DIV_DEFAULT 0x3
|
||||
#define TPM_SC_TOF_MASK (0x1 << 7)
|
||||
#define TPM_CNT 0x14
|
||||
#define TPM_MOD 0x18
|
||||
#define TPM_STATUS 0x1c
|
||||
@@ -29,6 +30,7 @@
|
||||
#define TPM_C0SC_MODE_SHIFT 2
|
||||
#define TPM_C0SC_MODE_MASK 0x3c
|
||||
#define TPM_C0SC_MODE_SW_COMPARE 0x4
|
||||
#define TPM_C0SC_CHF_MASK (0x1 << 7)
|
||||
#define TPM_C0V 0x24
|
||||
|
||||
static void __iomem *timer_base;
|
||||
@@ -205,9 +207,13 @@ static int __init tpm_timer_init(struct device_node *np)
|
||||
* 4) Channel0 disabled
|
||||
* 5) DMA transfers disabled
|
||||
*/
|
||||
/* make sure counter is disabled */
|
||||
writel(0, timer_base + TPM_SC);
|
||||
/* TOF is W1C */
|
||||
writel(TPM_SC_TOF_MASK, timer_base + TPM_SC);
|
||||
writel(0, timer_base + TPM_CNT);
|
||||
writel(0, timer_base + TPM_C0SC);
|
||||
/* CHF is W1C */
|
||||
writel(TPM_C0SC_CHF_MASK, timer_base + TPM_C0SC);
|
||||
|
||||
/* increase per cnt, div 8 by default */
|
||||
writel(TPM_SC_CMOD_INC_PER_CNT | TPM_SC_CMOD_DIV_DEFAULT,
|
||||
|
||||
@@ -97,6 +97,16 @@ efi_status_t handle_kernel_image(efi_system_table_t *sys_table_arg,
|
||||
u32 offset = !IS_ENABLED(CONFIG_DEBUG_ALIGN_RODATA) ?
|
||||
(phys_seed >> 32) & mask : TEXT_OFFSET;
|
||||
|
||||
/*
|
||||
* With CONFIG_RANDOMIZE_TEXT_OFFSET=y, TEXT_OFFSET may not
|
||||
* be a multiple of EFI_KIMG_ALIGN, and we must ensure that
|
||||
* we preserve the misalignment of 'offset' relative to
|
||||
* EFI_KIMG_ALIGN so that statically allocated objects whose
|
||||
* alignment exceeds PAGE_SIZE appear correctly aligned in
|
||||
* memory.
|
||||
*/
|
||||
offset |= TEXT_OFFSET % EFI_KIMG_ALIGN;
|
||||
|
||||
/*
|
||||
* If KASLR is enabled, and we have some randomness available,
|
||||
* locate the kernel at a randomized offset in physical memory.
|
||||
|
||||
@@ -716,12 +716,13 @@ static int kfd_ioctl_get_clock_counters(struct file *filep,
|
||||
struct timespec64 time;
|
||||
|
||||
dev = kfd_device_by_id(args->gpu_id);
|
||||
if (dev == NULL)
|
||||
return -EINVAL;
|
||||
|
||||
/* Reading GPU clock counter from KGD */
|
||||
args->gpu_clock_counter =
|
||||
dev->kfd2kgd->get_gpu_clock_counter(dev->kgd);
|
||||
if (dev)
|
||||
/* Reading GPU clock counter from KGD */
|
||||
args->gpu_clock_counter =
|
||||
dev->kfd2kgd->get_gpu_clock_counter(dev->kgd);
|
||||
else
|
||||
/* Node without GPU resource */
|
||||
args->gpu_clock_counter = 0;
|
||||
|
||||
/* No access to rdtsc. Using raw monotonic time */
|
||||
getrawmonotonic64(&time);
|
||||
|
||||
@@ -65,12 +65,13 @@ int drm_mode_create_dumb_ioctl(struct drm_device *dev,
|
||||
return -EINVAL;
|
||||
|
||||
/* overflow checks for 32bit size calculations */
|
||||
/* NOTE: DIV_ROUND_UP() can overflow */
|
||||
if (args->bpp > U32_MAX - 8)
|
||||
return -EINVAL;
|
||||
cpp = DIV_ROUND_UP(args->bpp, 8);
|
||||
if (!cpp || cpp > 0xffffffffU / args->width)
|
||||
if (cpp > U32_MAX / args->width)
|
||||
return -EINVAL;
|
||||
stride = cpp * args->width;
|
||||
if (args->height > 0xffffffffU / stride)
|
||||
if (args->height > U32_MAX / stride)
|
||||
return -EINVAL;
|
||||
|
||||
/* test for wrap-around */
|
||||
|
||||
@@ -740,7 +740,7 @@ static inline enum dsi_cmd_dst_format dsi_get_cmd_fmt(
|
||||
switch (mipi_fmt) {
|
||||
case MIPI_DSI_FMT_RGB888: return CMD_DST_FORMAT_RGB888;
|
||||
case MIPI_DSI_FMT_RGB666_PACKED:
|
||||
case MIPI_DSI_FMT_RGB666: return VID_DST_FORMAT_RGB666;
|
||||
case MIPI_DSI_FMT_RGB666: return CMD_DST_FORMAT_RGB666;
|
||||
case MIPI_DSI_FMT_RGB565: return CMD_DST_FORMAT_RGB565;
|
||||
default: return CMD_DST_FORMAT_RGB888;
|
||||
}
|
||||
|
||||
@@ -92,8 +92,7 @@ static int msm_fbdev_create(struct drm_fb_helper *helper,
|
||||
|
||||
if (IS_ERR(fb)) {
|
||||
dev_err(dev->dev, "failed to allocate fb\n");
|
||||
ret = PTR_ERR(fb);
|
||||
goto fail;
|
||||
return PTR_ERR(fb);
|
||||
}
|
||||
|
||||
bo = msm_framebuffer_bo(fb, 0);
|
||||
@@ -151,13 +150,7 @@ static int msm_fbdev_create(struct drm_fb_helper *helper,
|
||||
|
||||
fail_unlock:
|
||||
mutex_unlock(&dev->struct_mutex);
|
||||
fail:
|
||||
|
||||
if (ret) {
|
||||
if (fb)
|
||||
drm_framebuffer_remove(fb);
|
||||
}
|
||||
|
||||
drm_framebuffer_remove(fb);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -132,17 +132,19 @@ static void put_pages(struct drm_gem_object *obj)
|
||||
struct msm_gem_object *msm_obj = to_msm_bo(obj);
|
||||
|
||||
if (msm_obj->pages) {
|
||||
/* For non-cached buffers, ensure the new pages are clean
|
||||
* because display controller, GPU, etc. are not coherent:
|
||||
*/
|
||||
if (msm_obj->flags & (MSM_BO_WC|MSM_BO_UNCACHED))
|
||||
dma_unmap_sg(obj->dev->dev, msm_obj->sgt->sgl,
|
||||
msm_obj->sgt->nents, DMA_BIDIRECTIONAL);
|
||||
if (msm_obj->sgt) {
|
||||
/* For non-cached buffers, ensure the new
|
||||
* pages are clean because display controller,
|
||||
* GPU, etc. are not coherent:
|
||||
*/
|
||||
if (msm_obj->flags & (MSM_BO_WC|MSM_BO_UNCACHED))
|
||||
dma_unmap_sg(obj->dev->dev, msm_obj->sgt->sgl,
|
||||
msm_obj->sgt->nents,
|
||||
DMA_BIDIRECTIONAL);
|
||||
|
||||
if (msm_obj->sgt)
|
||||
sg_free_table(msm_obj->sgt);
|
||||
|
||||
kfree(msm_obj->sgt);
|
||||
kfree(msm_obj->sgt);
|
||||
}
|
||||
|
||||
if (use_pages(obj))
|
||||
drm_gem_put_pages(obj, msm_obj->pages, true, false);
|
||||
|
||||
@@ -634,7 +634,7 @@ static int hdmi_audio_config(struct device *dev,
|
||||
struct omap_dss_audio *dss_audio)
|
||||
{
|
||||
struct omap_hdmi *hd = dev_get_drvdata(dev);
|
||||
int ret;
|
||||
int ret = 0;
|
||||
|
||||
mutex_lock(&hd->lock);
|
||||
|
||||
|
||||
@@ -926,8 +926,13 @@ int hdmi4_core_init(struct platform_device *pdev, struct hdmi_core_data *core)
|
||||
{
|
||||
const struct hdmi4_features *features;
|
||||
struct resource *res;
|
||||
const struct soc_device_attribute *soc;
|
||||
|
||||
features = soc_device_match(hdmi4_soc_devices)->data;
|
||||
soc = soc_device_match(hdmi4_soc_devices);
|
||||
if (!soc)
|
||||
return -ENODEV;
|
||||
|
||||
features = soc->data;
|
||||
core->cts_swmode = features->cts_swmode;
|
||||
core->audio_use_mclk = features->audio_use_mclk;
|
||||
|
||||
|
||||
@@ -660,7 +660,7 @@ static int hdmi_audio_config(struct device *dev,
|
||||
struct omap_dss_audio *dss_audio)
|
||||
{
|
||||
struct omap_hdmi *hd = dev_get_drvdata(dev);
|
||||
int ret;
|
||||
int ret = 0;
|
||||
|
||||
mutex_lock(&hd->lock);
|
||||
|
||||
|
||||
@@ -123,6 +123,9 @@ static int omap_connector_get_modes(struct drm_connector *connector)
|
||||
if (dssdrv->read_edid) {
|
||||
void *edid = kzalloc(MAX_EDID, GFP_KERNEL);
|
||||
|
||||
if (!edid)
|
||||
return 0;
|
||||
|
||||
if ((dssdrv->read_edid(dssdev, edid, MAX_EDID) > 0) &&
|
||||
drm_edid_is_valid(edid)) {
|
||||
drm_mode_connector_update_edid_property(
|
||||
@@ -141,6 +144,9 @@ static int omap_connector_get_modes(struct drm_connector *connector)
|
||||
struct drm_display_mode *mode = drm_mode_create(dev);
|
||||
struct videomode vm = {0};
|
||||
|
||||
if (!mode)
|
||||
return 0;
|
||||
|
||||
dssdrv->get_timings(dssdev, &vm);
|
||||
|
||||
drm_display_mode_from_videomode(&vm, mode);
|
||||
@@ -196,6 +202,10 @@ static int omap_connector_mode_valid(struct drm_connector *connector,
|
||||
if (!r) {
|
||||
/* check if vrefresh is still valid */
|
||||
new_mode = drm_mode_duplicate(dev, mode);
|
||||
|
||||
if (!new_mode)
|
||||
return MODE_BAD;
|
||||
|
||||
new_mode->clock = vm.pixelclock / 1000;
|
||||
new_mode->vrefresh = 0;
|
||||
if (mode->vrefresh == drm_mode_vrefresh(new_mode))
|
||||
|
||||
@@ -389,12 +389,16 @@ int tiler_unpin(struct tiler_block *block)
|
||||
struct tiler_block *tiler_reserve_2d(enum tiler_fmt fmt, uint16_t w,
|
||||
uint16_t h, uint16_t align)
|
||||
{
|
||||
struct tiler_block *block = kzalloc(sizeof(*block), GFP_KERNEL);
|
||||
struct tiler_block *block;
|
||||
u32 min_align = 128;
|
||||
int ret;
|
||||
unsigned long flags;
|
||||
u32 slot_bytes;
|
||||
|
||||
block = kzalloc(sizeof(*block), GFP_KERNEL);
|
||||
if (!block)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
BUG_ON(!validfmt(fmt));
|
||||
|
||||
/* convert width/height to slots */
|
||||
|
||||
@@ -92,7 +92,7 @@ static int l2r_t2b(uint16_t w, uint16_t h, uint16_t a, int16_t offset,
|
||||
{
|
||||
int i;
|
||||
unsigned long index;
|
||||
bool area_free;
|
||||
bool area_free = false;
|
||||
unsigned long slots_per_band = PAGE_SIZE / slot_bytes;
|
||||
unsigned long bit_offset = (offset > 0) ? offset / slot_bytes : 0;
|
||||
unsigned long curr_bit = bit_offset;
|
||||
|
||||
@@ -436,10 +436,11 @@ config HID_LENOVO
|
||||
select NEW_LEDS
|
||||
select LEDS_CLASS
|
||||
---help---
|
||||
Support for Lenovo devices that are not fully compliant with HID standard.
|
||||
Support for IBM/Lenovo devices that are not fully compliant with HID standard.
|
||||
|
||||
Say Y if you want support for the non-compliant features of the Lenovo
|
||||
Thinkpad standalone keyboards, e.g:
|
||||
Say Y if you want support for horizontal scrolling of the IBM/Lenovo
|
||||
Scrollpoint mice or the non-compliant features of the Lenovo Thinkpad
|
||||
standalone keyboards, e.g:
|
||||
- ThinkPad USB Keyboard with TrackPoint (supports extra LEDs and trackpoint
|
||||
configuration)
|
||||
- ThinkPad Compact Bluetooth Keyboard with TrackPoint (supports Fn keys)
|
||||
|
||||
@@ -532,6 +532,13 @@
|
||||
#define USB_VENDOR_ID_HUION 0x256c
|
||||
#define USB_DEVICE_ID_HUION_TABLET 0x006e
|
||||
|
||||
#define USB_VENDOR_ID_IBM 0x04b3
|
||||
#define USB_DEVICE_ID_IBM_SCROLLPOINT_III 0x3100
|
||||
#define USB_DEVICE_ID_IBM_SCROLLPOINT_PRO 0x3103
|
||||
#define USB_DEVICE_ID_IBM_SCROLLPOINT_OPTICAL 0x3105
|
||||
#define USB_DEVICE_ID_IBM_SCROLLPOINT_800DPI_OPTICAL 0x3108
|
||||
#define USB_DEVICE_ID_IBM_SCROLLPOINT_800DPI_OPTICAL_PRO 0x3109
|
||||
|
||||
#define USB_VENDOR_ID_IDEACOM 0x1cb6
|
||||
#define USB_DEVICE_ID_IDEACOM_IDC6650 0x6650
|
||||
#define USB_DEVICE_ID_IDEACOM_IDC6651 0x6651
|
||||
@@ -664,6 +671,7 @@
|
||||
#define USB_DEVICE_ID_LENOVO_TPKBD 0x6009
|
||||
#define USB_DEVICE_ID_LENOVO_CUSBKBD 0x6047
|
||||
#define USB_DEVICE_ID_LENOVO_CBTKBD 0x6048
|
||||
#define USB_DEVICE_ID_LENOVO_SCROLLPOINT_OPTICAL 0x6049
|
||||
#define USB_DEVICE_ID_LENOVO_TPPRODOCK 0x6067
|
||||
#define USB_DEVICE_ID_LENOVO_X1_COVER 0x6085
|
||||
#define USB_DEVICE_ID_LENOVO_X1_TAB 0x60a3
|
||||
|
||||
@@ -6,6 +6,17 @@
|
||||
*
|
||||
* Copyright (c) 2012 Bernhard Seibold
|
||||
* Copyright (c) 2014 Jamie Lentin <jm@lentin.co.uk>
|
||||
*
|
||||
* Linux IBM/Lenovo Scrollpoint mouse driver:
|
||||
* - IBM Scrollpoint III
|
||||
* - IBM Scrollpoint Pro
|
||||
* - IBM Scrollpoint Optical
|
||||
* - IBM Scrollpoint Optical 800dpi
|
||||
* - IBM Scrollpoint Optical 800dpi Pro
|
||||
* - Lenovo Scrollpoint Optical
|
||||
*
|
||||
* Copyright (c) 2012 Peter De Wachter <pdewacht@gmail.com>
|
||||
* Copyright (c) 2018 Peter Ganzhorn <peter.ganzhorn@gmail.com>
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -160,6 +171,17 @@ static int lenovo_input_mapping_cptkbd(struct hid_device *hdev,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int lenovo_input_mapping_scrollpoint(struct hid_device *hdev,
|
||||
struct hid_input *hi, struct hid_field *field,
|
||||
struct hid_usage *usage, unsigned long **bit, int *max)
|
||||
{
|
||||
if (usage->hid == HID_GD_Z) {
|
||||
hid_map_usage(hi, usage, bit, max, EV_REL, REL_HWHEEL);
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int lenovo_input_mapping(struct hid_device *hdev,
|
||||
struct hid_input *hi, struct hid_field *field,
|
||||
struct hid_usage *usage, unsigned long **bit, int *max)
|
||||
@@ -172,6 +194,14 @@ static int lenovo_input_mapping(struct hid_device *hdev,
|
||||
case USB_DEVICE_ID_LENOVO_CBTKBD:
|
||||
return lenovo_input_mapping_cptkbd(hdev, hi, field,
|
||||
usage, bit, max);
|
||||
case USB_DEVICE_ID_IBM_SCROLLPOINT_III:
|
||||
case USB_DEVICE_ID_IBM_SCROLLPOINT_PRO:
|
||||
case USB_DEVICE_ID_IBM_SCROLLPOINT_OPTICAL:
|
||||
case USB_DEVICE_ID_IBM_SCROLLPOINT_800DPI_OPTICAL:
|
||||
case USB_DEVICE_ID_IBM_SCROLLPOINT_800DPI_OPTICAL_PRO:
|
||||
case USB_DEVICE_ID_LENOVO_SCROLLPOINT_OPTICAL:
|
||||
return lenovo_input_mapping_scrollpoint(hdev, hi, field,
|
||||
usage, bit, max);
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
@@ -883,6 +913,12 @@ static const struct hid_device_id lenovo_devices[] = {
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_LENOVO, USB_DEVICE_ID_LENOVO_CUSBKBD) },
|
||||
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_LENOVO, USB_DEVICE_ID_LENOVO_CBTKBD) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_LENOVO, USB_DEVICE_ID_LENOVO_TPPRODOCK) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_IBM, USB_DEVICE_ID_IBM_SCROLLPOINT_III) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_IBM, USB_DEVICE_ID_IBM_SCROLLPOINT_PRO) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_IBM, USB_DEVICE_ID_IBM_SCROLLPOINT_OPTICAL) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_IBM, USB_DEVICE_ID_IBM_SCROLLPOINT_800DPI_OPTICAL) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_IBM, USB_DEVICE_ID_IBM_SCROLLPOINT_800DPI_OPTICAL_PRO) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_LENOVO, USB_DEVICE_ID_LENOVO_SCROLLPOINT_OPTICAL) },
|
||||
{ }
|
||||
};
|
||||
|
||||
|
||||
@@ -418,7 +418,7 @@ static struct ishtp_cl_device *ishtp_bus_add_device(struct ishtp_device *dev,
|
||||
list_del(&device->device_link);
|
||||
spin_unlock_irqrestore(&dev->device_list_lock, flags);
|
||||
dev_err(dev->devc, "Failed to register ISHTP client device\n");
|
||||
kfree(device);
|
||||
put_device(&device->dev);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -1102,8 +1102,10 @@ static int __wacom_devm_sysfs_create_group(struct wacom *wacom,
|
||||
devres->root = root;
|
||||
|
||||
error = sysfs_create_group(devres->root, group);
|
||||
if (error)
|
||||
if (error) {
|
||||
devres_free(devres);
|
||||
return error;
|
||||
}
|
||||
|
||||
devres_add(&wacom->hdev->dev, devres);
|
||||
|
||||
|
||||
@@ -564,10 +564,10 @@ static int pmcmsptwi_master_xfer(struct i2c_adapter *adap,
|
||||
* TODO: We could potentially loop and retry in the case
|
||||
* of MSP_TWI_XFER_TIMEOUT.
|
||||
*/
|
||||
return -1;
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return num;
|
||||
}
|
||||
|
||||
static u32 pmcmsptwi_i2c_func(struct i2c_adapter *adapter)
|
||||
|
||||
@@ -86,6 +86,7 @@ struct sprd_i2c {
|
||||
u32 count;
|
||||
int irq;
|
||||
int err;
|
||||
bool is_suspended;
|
||||
};
|
||||
|
||||
static void sprd_i2c_set_count(struct sprd_i2c *i2c_dev, u32 count)
|
||||
@@ -283,6 +284,9 @@ static int sprd_i2c_master_xfer(struct i2c_adapter *i2c_adap,
|
||||
struct sprd_i2c *i2c_dev = i2c_adap->algo_data;
|
||||
int im, ret;
|
||||
|
||||
if (i2c_dev->is_suspended)
|
||||
return -EBUSY;
|
||||
|
||||
ret = pm_runtime_get_sync(i2c_dev->dev);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
@@ -364,13 +368,12 @@ static irqreturn_t sprd_i2c_isr_thread(int irq, void *dev_id)
|
||||
struct sprd_i2c *i2c_dev = dev_id;
|
||||
struct i2c_msg *msg = i2c_dev->msg;
|
||||
bool ack = !(readl(i2c_dev->base + I2C_STATUS) & I2C_RX_ACK);
|
||||
u32 i2c_count = readl(i2c_dev->base + I2C_COUNT);
|
||||
u32 i2c_tran;
|
||||
|
||||
if (msg->flags & I2C_M_RD)
|
||||
i2c_tran = i2c_dev->count >= I2C_FIFO_FULL_THLD;
|
||||
else
|
||||
i2c_tran = i2c_count;
|
||||
i2c_tran = i2c_dev->count;
|
||||
|
||||
/*
|
||||
* If we got one ACK from slave when writing data, and we did not
|
||||
@@ -408,14 +411,13 @@ static irqreturn_t sprd_i2c_isr(int irq, void *dev_id)
|
||||
{
|
||||
struct sprd_i2c *i2c_dev = dev_id;
|
||||
struct i2c_msg *msg = i2c_dev->msg;
|
||||
u32 i2c_count = readl(i2c_dev->base + I2C_COUNT);
|
||||
bool ack = !(readl(i2c_dev->base + I2C_STATUS) & I2C_RX_ACK);
|
||||
u32 i2c_tran;
|
||||
|
||||
if (msg->flags & I2C_M_RD)
|
||||
i2c_tran = i2c_dev->count >= I2C_FIFO_FULL_THLD;
|
||||
else
|
||||
i2c_tran = i2c_count;
|
||||
i2c_tran = i2c_dev->count;
|
||||
|
||||
/*
|
||||
* If we did not get one ACK from slave when writing data, then we
|
||||
@@ -586,11 +588,23 @@ static int sprd_i2c_remove(struct platform_device *pdev)
|
||||
|
||||
static int __maybe_unused sprd_i2c_suspend_noirq(struct device *pdev)
|
||||
{
|
||||
struct sprd_i2c *i2c_dev = dev_get_drvdata(pdev);
|
||||
|
||||
i2c_lock_adapter(&i2c_dev->adap);
|
||||
i2c_dev->is_suspended = true;
|
||||
i2c_unlock_adapter(&i2c_dev->adap);
|
||||
|
||||
return pm_runtime_force_suspend(pdev);
|
||||
}
|
||||
|
||||
static int __maybe_unused sprd_i2c_resume_noirq(struct device *pdev)
|
||||
{
|
||||
struct sprd_i2c *i2c_dev = dev_get_drvdata(pdev);
|
||||
|
||||
i2c_lock_adapter(&i2c_dev->adap);
|
||||
i2c_dev->is_suspended = false;
|
||||
i2c_unlock_adapter(&i2c_dev->adap);
|
||||
|
||||
return pm_runtime_force_resume(pdev);
|
||||
}
|
||||
|
||||
|
||||
@@ -337,7 +337,7 @@ static int vprbrd_i2c_xfer(struct i2c_adapter *i2c, struct i2c_msg *msgs,
|
||||
}
|
||||
mutex_unlock(&vb->lock);
|
||||
}
|
||||
return 0;
|
||||
return num;
|
||||
error:
|
||||
mutex_unlock(&vb->lock);
|
||||
return error;
|
||||
|
||||
@@ -60,9 +60,12 @@ config INFINIBAND_ON_DEMAND_PAGING
|
||||
pages on demand instead.
|
||||
|
||||
config INFINIBAND_ADDR_TRANS
|
||||
bool
|
||||
bool "RDMA/CM"
|
||||
depends on INFINIBAND
|
||||
default y
|
||||
---help---
|
||||
Support for RDMA communication manager (CM).
|
||||
This allows for a generic connection abstraction over RDMA.
|
||||
|
||||
config INFINIBAND_ADDR_TRANS_CONFIGFS
|
||||
bool
|
||||
|
||||
@@ -420,6 +420,8 @@ struct cma_hdr {
|
||||
#define CMA_VERSION 0x00
|
||||
|
||||
struct cma_req_info {
|
||||
struct sockaddr_storage listen_addr_storage;
|
||||
struct sockaddr_storage src_addr_storage;
|
||||
struct ib_device *device;
|
||||
int port;
|
||||
union ib_gid local_gid;
|
||||
@@ -898,7 +900,6 @@ static int cma_modify_qp_rtr(struct rdma_id_private *id_priv,
|
||||
{
|
||||
struct ib_qp_attr qp_attr;
|
||||
int qp_attr_mask, ret;
|
||||
union ib_gid sgid;
|
||||
|
||||
mutex_lock(&id_priv->qp_mutex);
|
||||
if (!id_priv->id.qp) {
|
||||
@@ -921,12 +922,6 @@ static int cma_modify_qp_rtr(struct rdma_id_private *id_priv,
|
||||
if (ret)
|
||||
goto out;
|
||||
|
||||
ret = ib_query_gid(id_priv->id.device, id_priv->id.port_num,
|
||||
rdma_ah_read_grh(&qp_attr.ah_attr)->sgid_index,
|
||||
&sgid, NULL);
|
||||
if (ret)
|
||||
goto out;
|
||||
|
||||
BUG_ON(id_priv->cma_dev->device != id_priv->id.device);
|
||||
|
||||
if (conn_param)
|
||||
@@ -1372,11 +1367,11 @@ static bool validate_net_dev(struct net_device *net_dev,
|
||||
}
|
||||
|
||||
static struct net_device *cma_get_net_dev(struct ib_cm_event *ib_event,
|
||||
const struct cma_req_info *req)
|
||||
struct cma_req_info *req)
|
||||
{
|
||||
struct sockaddr_storage listen_addr_storage, src_addr_storage;
|
||||
struct sockaddr *listen_addr = (struct sockaddr *)&listen_addr_storage,
|
||||
*src_addr = (struct sockaddr *)&src_addr_storage;
|
||||
struct sockaddr *listen_addr =
|
||||
(struct sockaddr *)&req->listen_addr_storage;
|
||||
struct sockaddr *src_addr = (struct sockaddr *)&req->src_addr_storage;
|
||||
struct net_device *net_dev;
|
||||
const union ib_gid *gid = req->has_gid ? &req->local_gid : NULL;
|
||||
int err;
|
||||
@@ -1391,11 +1386,6 @@ static struct net_device *cma_get_net_dev(struct ib_cm_event *ib_event,
|
||||
if (!net_dev)
|
||||
return ERR_PTR(-ENODEV);
|
||||
|
||||
if (!validate_net_dev(net_dev, listen_addr, src_addr)) {
|
||||
dev_put(net_dev);
|
||||
return ERR_PTR(-EHOSTUNREACH);
|
||||
}
|
||||
|
||||
return net_dev;
|
||||
}
|
||||
|
||||
@@ -1531,15 +1521,51 @@ static struct rdma_id_private *cma_id_from_event(struct ib_cm_id *cm_id,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Net namespace might be getting deleted while route lookup,
|
||||
* cm_id lookup is in progress. Therefore, perform netdevice
|
||||
* validation, cm_id lookup under rcu lock.
|
||||
* RCU lock along with netdevice state check, synchronizes with
|
||||
* netdevice migrating to different net namespace and also avoids
|
||||
* case where net namespace doesn't get deleted while lookup is in
|
||||
* progress.
|
||||
* If the device state is not IFF_UP, its properties such as ifindex
|
||||
* and nd_net cannot be trusted to remain valid without rcu lock.
|
||||
* net/core/dev.c change_net_namespace() ensures to synchronize with
|
||||
* ongoing operations on net device after device is closed using
|
||||
* synchronize_net().
|
||||
*/
|
||||
rcu_read_lock();
|
||||
if (*net_dev) {
|
||||
/*
|
||||
* If netdevice is down, it is likely that it is administratively
|
||||
* down or it might be migrating to different namespace.
|
||||
* In that case avoid further processing, as the net namespace
|
||||
* or ifindex may change.
|
||||
*/
|
||||
if (((*net_dev)->flags & IFF_UP) == 0) {
|
||||
id_priv = ERR_PTR(-EHOSTUNREACH);
|
||||
goto err;
|
||||
}
|
||||
|
||||
if (!validate_net_dev(*net_dev,
|
||||
(struct sockaddr *)&req.listen_addr_storage,
|
||||
(struct sockaddr *)&req.src_addr_storage)) {
|
||||
id_priv = ERR_PTR(-EHOSTUNREACH);
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
|
||||
bind_list = cma_ps_find(*net_dev ? dev_net(*net_dev) : &init_net,
|
||||
rdma_ps_from_service_id(req.service_id),
|
||||
cma_port_from_service_id(req.service_id));
|
||||
id_priv = cma_find_listener(bind_list, cm_id, ib_event, &req, *net_dev);
|
||||
err:
|
||||
rcu_read_unlock();
|
||||
if (IS_ERR(id_priv) && *net_dev) {
|
||||
dev_put(*net_dev);
|
||||
*net_dev = NULL;
|
||||
}
|
||||
|
||||
return id_priv;
|
||||
}
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ int iwpm_create_mapinfo(struct sockaddr_storage *local_sockaddr,
|
||||
struct sockaddr_storage *mapped_sockaddr,
|
||||
u8 nl_client)
|
||||
{
|
||||
struct hlist_head *hash_bucket_head;
|
||||
struct hlist_head *hash_bucket_head = NULL;
|
||||
struct iwpm_mapping_info *map_info;
|
||||
unsigned long flags;
|
||||
int ret = -EINVAL;
|
||||
@@ -142,6 +142,9 @@ int iwpm_create_mapinfo(struct sockaddr_storage *local_sockaddr,
|
||||
}
|
||||
}
|
||||
spin_unlock_irqrestore(&iwpm_mapinfo_lock, flags);
|
||||
|
||||
if (!hash_bucket_head)
|
||||
kfree(map_info);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ module_param_named(recv_queue_size, mad_recvq_size, int, 0444);
|
||||
MODULE_PARM_DESC(recv_queue_size, "Size of receive queue in number of work requests");
|
||||
|
||||
static struct list_head ib_mad_port_list;
|
||||
static u32 ib_mad_client_id = 0;
|
||||
static atomic_t ib_mad_client_id = ATOMIC_INIT(0);
|
||||
|
||||
/* Port list lock */
|
||||
static DEFINE_SPINLOCK(ib_mad_port_list_lock);
|
||||
@@ -378,7 +378,7 @@ struct ib_mad_agent *ib_register_mad_agent(struct ib_device *device,
|
||||
}
|
||||
|
||||
spin_lock_irqsave(&port_priv->reg_lock, flags);
|
||||
mad_agent_priv->agent.hi_tid = ++ib_mad_client_id;
|
||||
mad_agent_priv->agent.hi_tid = atomic_inc_return(&ib_mad_client_id);
|
||||
|
||||
/*
|
||||
* Make sure MAD registration (if supplied)
|
||||
|
||||
@@ -191,6 +191,15 @@ static int uverbs_validate_kernel_mandatory(const struct uverbs_method_spec *met
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
for (; i < method_spec->num_buckets; i++) {
|
||||
struct uverbs_attr_spec_hash *attr_spec_bucket =
|
||||
method_spec->attr_buckets[i];
|
||||
|
||||
if (!bitmap_empty(attr_spec_bucket->mandatory_attrs_bitmask,
|
||||
attr_spec_bucket->num_attrs))
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -412,7 +412,6 @@ static void hfi1_cleanup_sdma_notifier(struct hfi1_msix_entry *msix)
|
||||
static int get_irq_affinity(struct hfi1_devdata *dd,
|
||||
struct hfi1_msix_entry *msix)
|
||||
{
|
||||
int ret;
|
||||
cpumask_var_t diff;
|
||||
struct hfi1_affinity_node *entry;
|
||||
struct cpu_mask_set *set = NULL;
|
||||
@@ -424,10 +423,6 @@ static int get_irq_affinity(struct hfi1_devdata *dd,
|
||||
extra[0] = '\0';
|
||||
cpumask_clear(&msix->mask);
|
||||
|
||||
ret = zalloc_cpumask_var(&diff, GFP_KERNEL);
|
||||
if (!ret)
|
||||
return -ENOMEM;
|
||||
|
||||
entry = node_affinity_lookup(dd->node);
|
||||
|
||||
switch (msix->type) {
|
||||
@@ -458,6 +453,9 @@ static int get_irq_affinity(struct hfi1_devdata *dd,
|
||||
* finds its CPU here.
|
||||
*/
|
||||
if (cpu == -1 && set) {
|
||||
if (!zalloc_cpumask_var(&diff, GFP_KERNEL))
|
||||
return -ENOMEM;
|
||||
|
||||
if (cpumask_equal(&set->mask, &set->used)) {
|
||||
/*
|
||||
* We've used up all the CPUs, bump up the generation
|
||||
@@ -469,6 +467,8 @@ static int get_irq_affinity(struct hfi1_devdata *dd,
|
||||
cpumask_andnot(diff, &set->mask, &set->used);
|
||||
cpu = cpumask_first(diff);
|
||||
cpumask_set_cpu(cpu, &set->used);
|
||||
|
||||
free_cpumask_var(diff);
|
||||
}
|
||||
|
||||
cpumask_set_cpu(cpu, &msix->mask);
|
||||
@@ -482,7 +482,6 @@ static int get_irq_affinity(struct hfi1_devdata *dd,
|
||||
hfi1_setup_sdma_notifier(msix);
|
||||
}
|
||||
|
||||
free_cpumask_var(diff);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -88,9 +88,9 @@
|
||||
* pio buffers per ctxt, etc.) Zero means use one user context per CPU.
|
||||
*/
|
||||
int num_user_contexts = -1;
|
||||
module_param_named(num_user_contexts, num_user_contexts, uint, S_IRUGO);
|
||||
module_param_named(num_user_contexts, num_user_contexts, int, 0444);
|
||||
MODULE_PARM_DESC(
|
||||
num_user_contexts, "Set max number of user contexts to use");
|
||||
num_user_contexts, "Set max number of user contexts to use (default: -1 will use the real (non-HT) CPU count)");
|
||||
|
||||
uint krcvqs[RXE_NUM_DATA_VL];
|
||||
int krcvqsset;
|
||||
|
||||
@@ -390,7 +390,7 @@ struct rxe_opcode_info rxe_opcode[RXE_NUM_OPCODE] = {
|
||||
.name = "IB_OPCODE_RC_SEND_ONLY_INV",
|
||||
.mask = RXE_IETH_MASK | RXE_PAYLOAD_MASK | RXE_REQ_MASK
|
||||
| RXE_COMP_MASK | RXE_RWR_MASK | RXE_SEND_MASK
|
||||
| RXE_END_MASK,
|
||||
| RXE_END_MASK | RXE_START_MASK,
|
||||
.length = RXE_BTH_BYTES + RXE_IETH_BYTES,
|
||||
.offset = {
|
||||
[RXE_BTH] = 0,
|
||||
|
||||
@@ -728,7 +728,6 @@ next_wqe:
|
||||
rollback_state(wqe, qp, &rollback_wqe, rollback_psn);
|
||||
|
||||
if (ret == -EAGAIN) {
|
||||
kfree_skb(skb);
|
||||
rxe_run_task(&qp->req.task, 1);
|
||||
goto exit;
|
||||
}
|
||||
|
||||
@@ -742,7 +742,6 @@ static enum resp_states read_reply(struct rxe_qp *qp,
|
||||
err = rxe_xmit_packet(rxe, qp, &ack_pkt, skb);
|
||||
if (err) {
|
||||
pr_err("Failed sending RDMA reply.\n");
|
||||
kfree_skb(skb);
|
||||
return RESPST_ERR_RNR;
|
||||
}
|
||||
|
||||
@@ -955,10 +954,8 @@ static int send_ack(struct rxe_qp *qp, struct rxe_pkt_info *pkt,
|
||||
}
|
||||
|
||||
err = rxe_xmit_packet(rxe, qp, &ack_pkt, skb);
|
||||
if (err) {
|
||||
if (err)
|
||||
pr_err_ratelimited("Failed sending ack\n");
|
||||
kfree_skb(skb);
|
||||
}
|
||||
|
||||
err1:
|
||||
return err;
|
||||
@@ -1151,7 +1148,6 @@ static enum resp_states duplicate_request(struct rxe_qp *qp,
|
||||
if (rc) {
|
||||
pr_err("Failed resending result. This flow is not handled - skb ignored\n");
|
||||
rxe_drop_ref(qp);
|
||||
kfree_skb(skb_copy);
|
||||
rc = RESPST_CLEANUP;
|
||||
goto out;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
config INFINIBAND_SRP
|
||||
tristate "InfiniBand SCSI RDMA Protocol"
|
||||
depends on SCSI
|
||||
depends on SCSI && INFINIBAND_ADDR_TRANS
|
||||
select SCSI_SRP_ATTRS
|
||||
---help---
|
||||
Support for the SCSI RDMA Protocol over InfiniBand. This
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
config INFINIBAND_SRPT
|
||||
tristate "InfiniBand SCSI RDMA Protocol target support"
|
||||
depends on INFINIBAND && TARGET_CORE
|
||||
depends on INFINIBAND && INFINIBAND_ADDR_TRANS && TARGET_CORE
|
||||
---help---
|
||||
|
||||
Support for the SCSI RDMA Protocol (SRP) Target driver. The
|
||||
|
||||
@@ -147,8 +147,11 @@ static int rmi_spi_xfer(struct rmi_spi_xport *rmi_spi,
|
||||
if (len > RMI_SPI_XFER_SIZE_LIMIT)
|
||||
return -EINVAL;
|
||||
|
||||
if (rmi_spi->xfer_buf_size < len)
|
||||
rmi_spi_manage_pools(rmi_spi, len);
|
||||
if (rmi_spi->xfer_buf_size < len) {
|
||||
ret = rmi_spi_manage_pools(rmi_spi, len);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (addr == 0)
|
||||
/*
|
||||
|
||||
@@ -275,7 +275,8 @@ struct mxt_data {
|
||||
char phys[64]; /* device physical location */
|
||||
const struct mxt_platform_data *pdata;
|
||||
struct mxt_object *object_table;
|
||||
struct mxt_info info;
|
||||
struct mxt_info *info;
|
||||
void *raw_info_block;
|
||||
unsigned int irq;
|
||||
unsigned int max_x;
|
||||
unsigned int max_y;
|
||||
@@ -450,12 +451,13 @@ static int mxt_lookup_bootloader_address(struct mxt_data *data, bool retry)
|
||||
{
|
||||
u8 appmode = data->client->addr;
|
||||
u8 bootloader;
|
||||
u8 family_id = data->info ? data->info->family_id : 0;
|
||||
|
||||
switch (appmode) {
|
||||
case 0x4a:
|
||||
case 0x4b:
|
||||
/* Chips after 1664S use different scheme */
|
||||
if (retry || data->info.family_id >= 0xa2) {
|
||||
if (retry || family_id >= 0xa2) {
|
||||
bootloader = appmode - 0x24;
|
||||
break;
|
||||
}
|
||||
@@ -682,7 +684,7 @@ mxt_get_object(struct mxt_data *data, u8 type)
|
||||
struct mxt_object *object;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < data->info.object_num; i++) {
|
||||
for (i = 0; i < data->info->object_num; i++) {
|
||||
object = data->object_table + i;
|
||||
if (object->type == type)
|
||||
return object;
|
||||
@@ -1453,12 +1455,12 @@ static int mxt_update_cfg(struct mxt_data *data, const struct firmware *cfg)
|
||||
data_pos += offset;
|
||||
}
|
||||
|
||||
if (cfg_info.family_id != data->info.family_id) {
|
||||
if (cfg_info.family_id != data->info->family_id) {
|
||||
dev_err(dev, "Family ID mismatch!\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (cfg_info.variant_id != data->info.variant_id) {
|
||||
if (cfg_info.variant_id != data->info->variant_id) {
|
||||
dev_err(dev, "Variant ID mismatch!\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
@@ -1503,7 +1505,7 @@ static int mxt_update_cfg(struct mxt_data *data, const struct firmware *cfg)
|
||||
|
||||
/* Malloc memory to store configuration */
|
||||
cfg_start_ofs = MXT_OBJECT_START +
|
||||
data->info.object_num * sizeof(struct mxt_object) +
|
||||
data->info->object_num * sizeof(struct mxt_object) +
|
||||
MXT_INFO_CHECKSUM_SIZE;
|
||||
config_mem_size = data->mem_size - cfg_start_ofs;
|
||||
config_mem = kzalloc(config_mem_size, GFP_KERNEL);
|
||||
@@ -1554,20 +1556,6 @@ release_mem:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int mxt_get_info(struct mxt_data *data)
|
||||
{
|
||||
struct i2c_client *client = data->client;
|
||||
struct mxt_info *info = &data->info;
|
||||
int error;
|
||||
|
||||
/* Read 7-byte info block starting at address 0 */
|
||||
error = __mxt_read_reg(client, 0, sizeof(*info), info);
|
||||
if (error)
|
||||
return error;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void mxt_free_input_device(struct mxt_data *data)
|
||||
{
|
||||
if (data->input_dev) {
|
||||
@@ -1582,9 +1570,10 @@ static void mxt_free_object_table(struct mxt_data *data)
|
||||
video_unregister_device(&data->dbg.vdev);
|
||||
v4l2_device_unregister(&data->dbg.v4l2);
|
||||
#endif
|
||||
|
||||
kfree(data->object_table);
|
||||
data->object_table = NULL;
|
||||
data->info = NULL;
|
||||
kfree(data->raw_info_block);
|
||||
data->raw_info_block = NULL;
|
||||
kfree(data->msg_buf);
|
||||
data->msg_buf = NULL;
|
||||
data->T5_address = 0;
|
||||
@@ -1600,34 +1589,18 @@ static void mxt_free_object_table(struct mxt_data *data)
|
||||
data->max_reportid = 0;
|
||||
}
|
||||
|
||||
static int mxt_get_object_table(struct mxt_data *data)
|
||||
static int mxt_parse_object_table(struct mxt_data *data,
|
||||
struct mxt_object *object_table)
|
||||
{
|
||||
struct i2c_client *client = data->client;
|
||||
size_t table_size;
|
||||
struct mxt_object *object_table;
|
||||
int error;
|
||||
int i;
|
||||
u8 reportid;
|
||||
u16 end_address;
|
||||
|
||||
table_size = data->info.object_num * sizeof(struct mxt_object);
|
||||
object_table = kzalloc(table_size, GFP_KERNEL);
|
||||
if (!object_table) {
|
||||
dev_err(&data->client->dev, "Failed to allocate memory\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
error = __mxt_read_reg(client, MXT_OBJECT_START, table_size,
|
||||
object_table);
|
||||
if (error) {
|
||||
kfree(object_table);
|
||||
return error;
|
||||
}
|
||||
|
||||
/* Valid Report IDs start counting from 1 */
|
||||
reportid = 1;
|
||||
data->mem_size = 0;
|
||||
for (i = 0; i < data->info.object_num; i++) {
|
||||
for (i = 0; i < data->info->object_num; i++) {
|
||||
struct mxt_object *object = object_table + i;
|
||||
u8 min_id, max_id;
|
||||
|
||||
@@ -1651,8 +1624,8 @@ static int mxt_get_object_table(struct mxt_data *data)
|
||||
|
||||
switch (object->type) {
|
||||
case MXT_GEN_MESSAGE_T5:
|
||||
if (data->info.family_id == 0x80 &&
|
||||
data->info.version < 0x20) {
|
||||
if (data->info->family_id == 0x80 &&
|
||||
data->info->version < 0x20) {
|
||||
/*
|
||||
* On mXT224 firmware versions prior to V2.0
|
||||
* read and discard unused CRC byte otherwise
|
||||
@@ -1707,24 +1680,102 @@ static int mxt_get_object_table(struct mxt_data *data)
|
||||
/* If T44 exists, T5 position has to be directly after */
|
||||
if (data->T44_address && (data->T5_address != data->T44_address + 1)) {
|
||||
dev_err(&client->dev, "Invalid T44 position\n");
|
||||
error = -EINVAL;
|
||||
goto free_object_table;
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
data->msg_buf = kcalloc(data->max_reportid,
|
||||
data->T5_msg_size, GFP_KERNEL);
|
||||
if (!data->msg_buf) {
|
||||
dev_err(&client->dev, "Failed to allocate message buffer\n");
|
||||
if (!data->msg_buf)
|
||||
return -ENOMEM;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int mxt_read_info_block(struct mxt_data *data)
|
||||
{
|
||||
struct i2c_client *client = data->client;
|
||||
int error;
|
||||
size_t size;
|
||||
void *id_buf, *buf;
|
||||
uint8_t num_objects;
|
||||
u32 calculated_crc;
|
||||
u8 *crc_ptr;
|
||||
|
||||
/* If info block already allocated, free it */
|
||||
if (data->raw_info_block)
|
||||
mxt_free_object_table(data);
|
||||
|
||||
/* Read 7-byte ID information block starting at address 0 */
|
||||
size = sizeof(struct mxt_info);
|
||||
id_buf = kzalloc(size, GFP_KERNEL);
|
||||
if (!id_buf)
|
||||
return -ENOMEM;
|
||||
|
||||
error = __mxt_read_reg(client, 0, size, id_buf);
|
||||
if (error)
|
||||
goto err_free_mem;
|
||||
|
||||
/* Resize buffer to give space for rest of info block */
|
||||
num_objects = ((struct mxt_info *)id_buf)->object_num;
|
||||
size += (num_objects * sizeof(struct mxt_object))
|
||||
+ MXT_INFO_CHECKSUM_SIZE;
|
||||
|
||||
buf = krealloc(id_buf, size, GFP_KERNEL);
|
||||
if (!buf) {
|
||||
error = -ENOMEM;
|
||||
goto free_object_table;
|
||||
goto err_free_mem;
|
||||
}
|
||||
id_buf = buf;
|
||||
|
||||
/* Read rest of info block */
|
||||
error = __mxt_read_reg(client, MXT_OBJECT_START,
|
||||
size - MXT_OBJECT_START,
|
||||
id_buf + MXT_OBJECT_START);
|
||||
if (error)
|
||||
goto err_free_mem;
|
||||
|
||||
/* Extract & calculate checksum */
|
||||
crc_ptr = id_buf + size - MXT_INFO_CHECKSUM_SIZE;
|
||||
data->info_crc = crc_ptr[0] | (crc_ptr[1] << 8) | (crc_ptr[2] << 16);
|
||||
|
||||
calculated_crc = mxt_calculate_crc(id_buf, 0,
|
||||
size - MXT_INFO_CHECKSUM_SIZE);
|
||||
|
||||
/*
|
||||
* CRC mismatch can be caused by data corruption due to I2C comms
|
||||
* issue or else device is not using Object Based Protocol (eg i2c-hid)
|
||||
*/
|
||||
if ((data->info_crc == 0) || (data->info_crc != calculated_crc)) {
|
||||
dev_err(&client->dev,
|
||||
"Info Block CRC error calculated=0x%06X read=0x%06X\n",
|
||||
calculated_crc, data->info_crc);
|
||||
error = -EIO;
|
||||
goto err_free_mem;
|
||||
}
|
||||
|
||||
data->object_table = object_table;
|
||||
data->raw_info_block = id_buf;
|
||||
data->info = (struct mxt_info *)id_buf;
|
||||
|
||||
dev_info(&client->dev,
|
||||
"Family: %u Variant: %u Firmware V%u.%u.%02X Objects: %u\n",
|
||||
data->info->family_id, data->info->variant_id,
|
||||
data->info->version >> 4, data->info->version & 0xf,
|
||||
data->info->build, data->info->object_num);
|
||||
|
||||
/* Parse object table information */
|
||||
error = mxt_parse_object_table(data, id_buf + MXT_OBJECT_START);
|
||||
if (error) {
|
||||
dev_err(&client->dev, "Error %d parsing object table\n", error);
|
||||
mxt_free_object_table(data);
|
||||
goto err_free_mem;
|
||||
}
|
||||
|
||||
data->object_table = (struct mxt_object *)(id_buf + MXT_OBJECT_START);
|
||||
|
||||
return 0;
|
||||
|
||||
free_object_table:
|
||||
mxt_free_object_table(data);
|
||||
err_free_mem:
|
||||
kfree(id_buf);
|
||||
return error;
|
||||
}
|
||||
|
||||
@@ -2039,7 +2090,7 @@ static int mxt_initialize(struct mxt_data *data)
|
||||
int error;
|
||||
|
||||
while (1) {
|
||||
error = mxt_get_info(data);
|
||||
error = mxt_read_info_block(data);
|
||||
if (!error)
|
||||
break;
|
||||
|
||||
@@ -2070,16 +2121,9 @@ static int mxt_initialize(struct mxt_data *data)
|
||||
msleep(MXT_FW_RESET_TIME);
|
||||
}
|
||||
|
||||
/* Get object table information */
|
||||
error = mxt_get_object_table(data);
|
||||
if (error) {
|
||||
dev_err(&client->dev, "Error %d reading object table\n", error);
|
||||
return error;
|
||||
}
|
||||
|
||||
error = mxt_acquire_irq(data);
|
||||
if (error)
|
||||
goto err_free_object_table;
|
||||
return error;
|
||||
|
||||
error = request_firmware_nowait(THIS_MODULE, true, MXT_CFG_NAME,
|
||||
&client->dev, GFP_KERNEL, data,
|
||||
@@ -2087,14 +2131,10 @@ static int mxt_initialize(struct mxt_data *data)
|
||||
if (error) {
|
||||
dev_err(&client->dev, "Failed to invoke firmware loader: %d\n",
|
||||
error);
|
||||
goto err_free_object_table;
|
||||
return error;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
err_free_object_table:
|
||||
mxt_free_object_table(data);
|
||||
return error;
|
||||
}
|
||||
|
||||
static int mxt_set_t7_power_cfg(struct mxt_data *data, u8 sleep)
|
||||
@@ -2155,7 +2195,7 @@ recheck:
|
||||
static u16 mxt_get_debug_value(struct mxt_data *data, unsigned int x,
|
||||
unsigned int y)
|
||||
{
|
||||
struct mxt_info *info = &data->info;
|
||||
struct mxt_info *info = data->info;
|
||||
struct mxt_dbg *dbg = &data->dbg;
|
||||
unsigned int ofs, page;
|
||||
unsigned int col = 0;
|
||||
@@ -2483,7 +2523,7 @@ static const struct video_device mxt_video_device = {
|
||||
|
||||
static void mxt_debug_init(struct mxt_data *data)
|
||||
{
|
||||
struct mxt_info *info = &data->info;
|
||||
struct mxt_info *info = data->info;
|
||||
struct mxt_dbg *dbg = &data->dbg;
|
||||
struct mxt_object *object;
|
||||
int error;
|
||||
@@ -2569,7 +2609,6 @@ static int mxt_configure_objects(struct mxt_data *data,
|
||||
const struct firmware *cfg)
|
||||
{
|
||||
struct device *dev = &data->client->dev;
|
||||
struct mxt_info *info = &data->info;
|
||||
int error;
|
||||
|
||||
error = mxt_init_t7_power_cfg(data);
|
||||
@@ -2594,11 +2633,6 @@ static int mxt_configure_objects(struct mxt_data *data,
|
||||
|
||||
mxt_debug_init(data);
|
||||
|
||||
dev_info(dev,
|
||||
"Family: %u Variant: %u Firmware V%u.%u.%02X Objects: %u\n",
|
||||
info->family_id, info->variant_id, info->version >> 4,
|
||||
info->version & 0xf, info->build, info->object_num);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -2607,7 +2641,7 @@ static ssize_t mxt_fw_version_show(struct device *dev,
|
||||
struct device_attribute *attr, char *buf)
|
||||
{
|
||||
struct mxt_data *data = dev_get_drvdata(dev);
|
||||
struct mxt_info *info = &data->info;
|
||||
struct mxt_info *info = data->info;
|
||||
return scnprintf(buf, PAGE_SIZE, "%u.%u.%02X\n",
|
||||
info->version >> 4, info->version & 0xf, info->build);
|
||||
}
|
||||
@@ -2617,7 +2651,7 @@ static ssize_t mxt_hw_version_show(struct device *dev,
|
||||
struct device_attribute *attr, char *buf)
|
||||
{
|
||||
struct mxt_data *data = dev_get_drvdata(dev);
|
||||
struct mxt_info *info = &data->info;
|
||||
struct mxt_info *info = data->info;
|
||||
return scnprintf(buf, PAGE_SIZE, "%u.%u\n",
|
||||
info->family_id, info->variant_id);
|
||||
}
|
||||
@@ -2656,7 +2690,7 @@ static ssize_t mxt_object_show(struct device *dev,
|
||||
return -ENOMEM;
|
||||
|
||||
error = 0;
|
||||
for (i = 0; i < data->info.object_num; i++) {
|
||||
for (i = 0; i < data->info->object_num; i++) {
|
||||
object = data->object_table + i;
|
||||
|
||||
if (!mxt_object_readable(object->type))
|
||||
|
||||
@@ -1342,7 +1342,7 @@ void qi_flush_dev_iotlb(struct intel_iommu *iommu, u16 sid, u16 qdep,
|
||||
struct qi_desc desc;
|
||||
|
||||
if (mask) {
|
||||
BUG_ON(addr & ((1 << (VTD_PAGE_SHIFT + mask)) - 1));
|
||||
BUG_ON(addr & ((1ULL << (VTD_PAGE_SHIFT + mask)) - 1));
|
||||
addr |= (1ULL << (VTD_PAGE_SHIFT + mask - 1)) - 1;
|
||||
desc.high = QI_DEV_IOTLB_ADDR(addr) | QI_DEV_IOTLB_SIZE;
|
||||
} else
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user