mirror of
https://github.com/commaai/agnos-kernel-sdm845.git
synced 2026-06-08 11:24:51 +08:00
Merge remote-tracking branch '4.9/tmp-05a906d' into msm-4.9
* 4.9/tmp-05a906d:
Linux 4.9.56
Revert "socket, bpf: fix possible use after free"
Linux 4.9.55
KVM: x86: fix singlestepping over syscall
f2fs: don't allow encrypted operations without keys
ext4: don't allow encrypted operations without keys
ext4: Don't clear SGID when inheriting ACLs
ext4: fix data corruption for mmap writes
vfs: deny copy_file_range() for non regular files
sched/cpuset/pm: Fix cpuset vs. suspend-resume bugs
mmc: core: add driver strength selection when selecting hs400es
nvme-pci: Use PCI bus address for data/queues in CMB
drm/i915/bios: ignore HDMI on port A
brcmfmac: setup passive scan if requested by user-space
brcmfmac: add length check in brcmf_cfg80211_escan_handler()
scsi: sd: Do not override max_sectors_kb sysfs setting
iwlwifi: add workaround to disable wide channels in 5GHz
iwlwifi: mvm: use IWL_HCMD_NOCOPY for MCAST_FILTER_CMD
netlink: fix nla_put_{u8,u16,u32} for KASAN
rocker: fix rocker_tlv_put_* functions for KASAN
HID: wacom: bits shifted too much for 9th and 10th buttons
HID: wacom: Always increment hdev refcount within wacom_get_hdev_data
HID: wacom: leds: Don't try to control the EKR's read-only LEDs
HID: i2c-hid: allocate hid buffers for real worst case
ftrace: Fix kmemleak in unregister_ftrace_graph
stm class: Fix a use-after-free
Drivers: hv: fcopy: restore correct transfer length
driver core: platform: Don't read past the end of "driver_override" buffer
percpu: make this_cpu_generic_read() atomic w.r.t. interrupts
powerpc/tm: Fix illegal TM state in signal handler
powerpc/64s: Use emergency stack for kernel TM Bad Thing program checks
socket, bpf: fix possible use after free
net: rtnetlink: fix info leak in RTM_GETSTATS call
tipc: use only positive error codes in messages
ip6_tunnel: update mtu properly for ARPHRD_ETHER tunnel device in tx path
ip6_gre: ip6gre_tap device should keep dst
netlink: do not proceed if dump's start() errs
net: Set sk_prot_creator when cloning sockets to the right proto
packet: only test po->has_vnet_hdr once in packet_snd
packet: in packet_do_bind, test fanout with bind_lock held
net: dsa: Fix network device registration order
tun: bail out from tun_get_user() if the skb is empty
l2tp: fix race condition in l2tp_tunnel_delete
l2tp: Avoid schedule while atomic in exit_net
vti: fix use after free in vti_tunnel_xmit/vti6_tnl_xmit
net: qcom/emac: specify the correct size when mapping a DMA buffer
net_sched: always reset qdisc backlog in qdisc_reset()
isdn/i4l: fetch the ppp_write buffer in one shot
bpf: one perf event close won't free bpf program attached by another perf event
packet: hold bind lock when rebinding to fanout hook
net: emac: Fix napi poll list corruption
tcp: fastopen: fix on syn-data transmit failure
net/sched: cls_matchall: fix crash when used with classful qdisc
ip6_tunnel: do not allow loading ip6_tunnel if ipv6 is disabled in cmdline
net: phy: Fix mask value write on gmii2rgmii converter speed register
ip6_gre: skb_push ipv6hdr before packing the header in ip6gre_header
udpv6: Fix the checksum computation when HW checksum does not apply
tcp: fix data delivery rate
bpf/verifier: reject BPF_ALU64|BPF_END
tcp: update skb->skb_mstamp more carefully
sctp: potential read out of bounds in sctp_ulpevent_type_enabled()
net: sched: fix use-after-free in tcf_action_destroy and tcf_del_walker
mlxsw: spectrum: Prevent mirred-related crash on removal
ALSA: usx2y: Suppress kernel warning at page allocation failures
Revert "ALSA: echoaudio: purge contradictions between dimension matrix members and total number of members"
ALSA: compress: Remove unused variable
lsm: fix smack_inode_removexattr and xattr_getsecurity memleak
lib/ratelimit.c: use deferred printk() version
mm, oom_reaper: skip mm structs with mmu notifiers
staging: vchiq_2835_arm: Fix NULL ptr dereference in free_pagelist
uwb: ensure that endpoint is interrupt
uwb: properly check kthread_run return value
iio: adc: mcp320x: Fix oops on module unload
iio: adc: mcp320x: Fix readout of negative voltages
iio: ad7793: Fix the serial interface reset
IIO: BME280: Updates to Humidity readings need ctrl_reg write!
iio: core: Return error for failed read_reg
staging: iio: ad7192: Fix - use the dedicated reset function avoiding dma from stack.
iio: ad_sigma_delta: Implement a dedicated reset function
iio: adc: twl4030: Disable the vusb3v1 rugulator in the error handling path of 'twl4030_madc_probe()'
iio: adc: twl4030: Fix an error handling path in 'twl4030_madc_probe()'
Revert "xhci: Limit USB2 port wake support for AMD Promontory hosts"
xhci: set missing SuperSpeedPlus Link Protocol bit in roothub descriptor
xhci: Fix sleeping with spin_lock_irq() held in ASmedia 1042A workaround
xhci: fix finding correct bus_state structure for USB 3.1 hosts
USB: fix out-of-bounds in usb_set_configuration
usb: Increase quirk delay for USB devices
USB: core: harden cdc_parse_cdc_header
USB: uas: fix bug in handling of alternate settings
USB: g_mass_storage: Fix deadlock when driver is unbound
usb: gadget: mass_storage: set msg_registered after msg registered
USB: devio: Don't corrupt user memory
USB: dummy-hcd: Fix erroneous synchronization change
USB: dummy-hcd: fix infinite-loop resubmission bug
USB: dummy-hcd: fix connection failures (wrong speed)
USB: cdc-wdm: ignore -EPIPE from GetEncapsulatedResponse
usb: pci-quirks.c: Corrected timeout values used in handshake
ALSA: usb-audio: Check out-of-bounds access by corrupted buffer descriptor
usb: renesas_usbhs: fix usbhsf_fifo_clear() for RX direction
usb: renesas_usbhs: fix the BCLR setting condition for non-DCP pipe
usb-storage: fix bogus hardware error messages for ATA pass-thru devices
usb-storage: unusual_devs entry to fix write-access regression for Seagate external drives
usb: gadget: udc: renesas_usb3: Fix return value of usb3_write_pipe()
usb: gadget: udc: renesas_usb3: fix Pn_RAMMAP.Pn_MPKT value
usb: gadget: udc: renesas_usb3: fix for no-data control transfer
usb: gadget: udc: atmel: set vbus irqflags explicitly
USB: gadgetfs: fix copy_to_user while holding spinlock
USB: gadgetfs: Fix crash caused by inadequate synchronization
Linux 4.9.54
s390/mm: make pmdp_invalidate() do invalidation only
ttpci: address stringop overflow warning
ALSA: au88x0: avoid theoretical uninitialized access
ASoC: rt5660: remove double const
ASoC: rt5659: drop double const
ASoC: rt5514: fix gcc-7 warning
ARM: remove duplicate 'const' annotations'
IB/qib: fix false-postive maybe-uninitialized warning
tools/power turbostat: bugfix: GFXMHz column not changing
ARM: dts: BCM5301X: Fix memory start address
libata: transport: Remove circular dependency at free time
ASoC: wm_adsp: Return an error on write to a disabled volatile control
xfs: remove kmem_zalloc_greedy
i2c: meson: fix wrong variable usage in meson_i2c_put_data
netfilter: nf_tables: set pktinfo->thoff at AH header if found
md/raid10: submit bio directly to replacement disk
rds: ib: add error handle
mm/cgroup: avoid panic when init with low memory
iommu/io-pgtable-arm: Check for leaf entry before dereferencing it
x86/acpi: Restore the order of CPU IDs
cpufreq: intel_pstate: Update pid_params.sample_rate_ns in pid_param_set()
ibmvnic: Free tx/rx scrq pointer array when releasing sub-crqs
nfs: make nfs4_cb_sv_ops static
parisc: perf: Fix potential NULL pointer dereference
netfilter: nfnl_cthelper: fix incorrect helper->expect_class_max
nvme-rdma: handle cpu unplug when re-establishing the controller
MIPS: smp-cps: Fix retrieval of VPE mask on big endian CPUs
exynos-gsc: Do not swap cb/cr for semi planar formats
iommu/exynos: Block SYSMMU while invalidating FLPD cache
MIPS: IRQ Stack: Unwind IRQ stack onto task stack
netfilter: invoke synchronize_rcu after set the _hook_ to NULL
drivers/rapidio/devices/tsi721.c: make module parameter variable name unique
kasan: do not sanitize kexec purgatory
hugetlbfs: initialize shared policy as part of inode allocation
sata_via: Enable hotplug only on VT6421
Btrfs: fix potential use-after-free for cloned bio
Btrfs: fix segmentation fault when doing dio read
bridge: netlink: register netdevice before executing changelink
mmc: sdio: fix alignment issue in struct sdio_func
qed: Fix possible system hang in the dcbnl-getdcbx() path.
net: dsa: b53: Include IMP/CPU port in dumb forwarding mode
udp: disable inner UDP checksum offloads in IPsec case
usb: plusb: Add support for PL-27A1
team: fix memory leaks
net/packet: check length in getsockopt() called with PACKET_HDRLEN
net: core: Prevent from dereferencing null pointer when releasing SKB
lkdtm: Fix Oops when unloading the module
mips: ath79: clock:- Unmap region obtained by of_iomap
MIPS: Lantiq: Fix another request_mem_region() return code check
HID: wacom: release the resources before leaving despite devm
drm: mali-dp: Fix transposed horizontal/vertical flip
drm: mali-dp: Fix destination size handling when rotating
ASoC: dapm: fix some pointer error handling
rtl8xxxu: Add additional USB IDs for rtl8192eu devices
usb: chipidea: vbus event may exist before starting gadget
iommu/arm-smmu: Set privileged attribute to 'default' instead of 'unprivileged'
spi: pxa2xx: Add support for Intel Gemini Lake
ath10k: prevent sta pointer rcu violation
audit: log 32-bit socketcalls
ASoC: dapm: handle probe deferrals
partitions/efi: Fix integer overflow in GPT size calculation
sfc: get PIO buffer size from the NIC
USB: serial: mos7840: fix control-message error handling
USB: serial: mos7720: fix control-message error handling
drm/amdkfd: fix improper return value on error
arm: dts: mt2701: Add subsystem clock controller device nodes
IB/ipoib: Replace list_del of the neigh->list with list_del_init
IB/ipoib: rtnl_unlock can not come after free_netdev
IB/ipoib: Fix deadlock over vlan_mutex
serial: 8250_port: Remove dangerous pr_debug()
tty: goldfish: Fix a parameter of a call to free_irq
serial: 8250: moxa: Store num_ports in brd
drm/i915/psr: disable psr2 for resolution greater than 32X20
ARM: 8635/1: nommu: allow enabling REMAP_VECTORS_TO_RAM
IB/rxe: Fix a MR reference leak in check_rkey()
IB/rxe: Add a runtime check in alloc_index()
iio: adc: hx711: Add DT binding for avia,hx711
iio: adc: axp288: Drop bogus AXP288_ADC_TS_PIN_CTRL register modifications
iio: adc: imx25-gcq: Fix module autoload
hwmon: (gl520sm) Fix overflows and crash seen when writing into limit attributes
usb: make the MTK XHCI driver compile for older MIPS SoCs
clk/axs10x: Clear init field in driver probe
sh_eth: use correct name for ECMR_MPDE bit
reset: ti_syscon: fix a ti_syscon_reset_status issue
extcon: axp288: Use vbus-valid instead of -present to determine cable presence
igb: re-assign hw address pointer on reset after PCI error
ARM: dts: am335x-chilisom: Wakeup from RTC-only state by power on event
scsi: be2iscsi: Add checks to validate CID alloc/free
power: supply: axp288_fuel_gauge: Fix fuel_gauge_reg_readb return on error
MIPS: ralink: Fix incorrect assignment on ralink_soc
MIPS: ralink: Fix a typo in the pinmux setup.
MIPS: Ensure bss section ends on a long-aligned address
ARM: dts: r8a7790: Use R-Car Gen 2 fallback binding for msiof nodes
RDS: RDMA: Fix the composite message user notification
clk: sunxi-ng: fix PLL_CPUX adjusting on H3
ARM: dts: exynos: Add CPU OPPs for Exynos4412 Prime
drm/i915: Fix the overlay frontbuffer tracking
GFS2: Fix reference to ERR_PTR in gfs2_glock_iter_next
drm: bridge: add DT bindings for TI ths8135
drm_fourcc: Fix DRM_FORMAT_MOD_LINEAR #define
FROMLIST: binder: fix use-after-free in binder_transaction()
FROMLIST: binder: fix an ret value override
FROMLIST: binder: fix memory corruption in binder_transaction binder
Conflicts:
mm/oom_kill.c
sound/usb/card.c
Change-Id: I8b32fbdaa2be959a4149cf07d0bda16b75eeacbc
Signed-off-by: Kyle Yan <kyan@codeaurora.org>
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
THS8135 Video DAC
|
||||
-----------------
|
||||
|
||||
This is the binding for Texas Instruments THS8135 Video DAC bridge.
|
||||
|
||||
Required properties:
|
||||
|
||||
- compatible: Must be "ti,ths8135"
|
||||
|
||||
Required nodes:
|
||||
|
||||
This device has two video ports. Their connections are modelled using the OF
|
||||
graph bindings specified in Documentation/devicetree/bindings/graph.txt.
|
||||
|
||||
- Video port 0 for RGB input
|
||||
- Video port 1 for VGA output
|
||||
|
||||
Example
|
||||
-------
|
||||
|
||||
vga-bridge {
|
||||
compatible = "ti,ths8135";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
port@0 {
|
||||
reg = <0>;
|
||||
|
||||
vga_bridge_in: endpoint {
|
||||
remote-endpoint = <&lcdc_out_vga>;
|
||||
};
|
||||
};
|
||||
|
||||
port@1 {
|
||||
reg = <1>;
|
||||
|
||||
vga_bridge_out: endpoint {
|
||||
remote-endpoint = <&vga_con_in>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
18
Documentation/devicetree/bindings/iio/adc/avia-hx711.txt
Normal file
18
Documentation/devicetree/bindings/iio/adc/avia-hx711.txt
Normal file
@@ -0,0 +1,18 @@
|
||||
* AVIA HX711 ADC chip for weight cells
|
||||
Bit-banging driver
|
||||
|
||||
Required properties:
|
||||
- compatible: Should be "avia,hx711"
|
||||
- sck-gpios: Definition of the GPIO for the clock
|
||||
- dout-gpios: Definition of the GPIO for data-out
|
||||
See Documentation/devicetree/bindings/gpio/gpio.txt
|
||||
- avdd-supply: Definition of the regulator used as analog supply
|
||||
|
||||
Example:
|
||||
weight@0 {
|
||||
compatible = "avia,hx711";
|
||||
sck-gpios = <&gpio3 10 GPIO_ACTIVE_HIGH>;
|
||||
dout-gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
|
||||
avdd-suppy = <&avdd>;
|
||||
};
|
||||
|
||||
@@ -38,6 +38,7 @@ atmel Atmel Corporation
|
||||
auo AU Optronics Corporation
|
||||
auvidea Auvidea GmbH
|
||||
avago Avago Technologies
|
||||
avia avia semiconductor
|
||||
avic Shanghai AVIC Optoelectronics Co., Ltd.
|
||||
axis Axis Communications AB
|
||||
boe BOE Technology Group Co., Ltd.
|
||||
|
||||
2
Makefile
2
Makefile
@@ -1,6 +1,6 @@
|
||||
VERSION = 4
|
||||
PATCHLEVEL = 9
|
||||
SUBLEVEL = 53
|
||||
SUBLEVEL = 56
|
||||
EXTRAVERSION =
|
||||
NAME = Roaring Lionus
|
||||
|
||||
|
||||
@@ -34,8 +34,7 @@ config PROCESSOR_ID
|
||||
used instead of the auto-probing which utilizes the register.
|
||||
|
||||
config REMAP_VECTORS_TO_RAM
|
||||
bool 'Install vectors to the beginning of RAM' if DRAM_BASE
|
||||
depends on DRAM_BASE
|
||||
bool 'Install vectors to the beginning of RAM'
|
||||
help
|
||||
The kernel needs to change the hardware exception vectors.
|
||||
In nommu mode, the hardware exception vectors are normally
|
||||
|
||||
@@ -124,6 +124,14 @@
|
||||
|
||||
&rtc {
|
||||
system-power-controller;
|
||||
|
||||
pinctrl-0 = <&ext_wakeup>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
ext_wakeup: ext-wakeup {
|
||||
pins = "ext_wakeup0";
|
||||
input-enable;
|
||||
};
|
||||
};
|
||||
|
||||
/* NAND Flash */
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
};
|
||||
|
||||
memory {
|
||||
reg = <0x00000000 0x10000000>;
|
||||
reg = <0x80000000 0x10000000>;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -97,11 +97,11 @@
|
||||
thermal-zones {
|
||||
cpu_thermal: cpu-thermal {
|
||||
cooling-maps {
|
||||
map0 {
|
||||
cooling_map0: map0 {
|
||||
/* Corresponds to 800MHz at freq_table */
|
||||
cooling-device = <&cpu0 7 7>;
|
||||
};
|
||||
map1 {
|
||||
cooling_map1: map1 {
|
||||
/* Corresponds to 200MHz at freq_table */
|
||||
cooling-device = <&cpu0 13 13>;
|
||||
};
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
/dts-v1/;
|
||||
#include "exynos4412-odroid-common.dtsi"
|
||||
#include "exynos4412-prime.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Hardkernel ODROID-U3 board based on Exynos4412";
|
||||
@@ -47,11 +48,11 @@
|
||||
cooling-maps {
|
||||
map0 {
|
||||
trip = <&cpu_alert1>;
|
||||
cooling-device = <&cpu0 7 7>;
|
||||
cooling-device = <&cpu0 9 9>;
|
||||
};
|
||||
map1 {
|
||||
trip = <&cpu_alert2>;
|
||||
cooling-device = <&cpu0 13 13>;
|
||||
cooling-device = <&cpu0 15 15>;
|
||||
};
|
||||
map2 {
|
||||
trip = <&cpu_alert0>;
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
*/
|
||||
|
||||
#include "exynos4412-odroidx.dts"
|
||||
#include "exynos4412-prime.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Hardkernel ODROID-X2 board based on Exynos4412";
|
||||
|
||||
41
arch/arm/boot/dts/exynos4412-prime.dtsi
Normal file
41
arch/arm/boot/dts/exynos4412-prime.dtsi
Normal file
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* Samsung's Exynos4412 Prime SoC device tree source
|
||||
*
|
||||
* Copyright (c) 2016 Samsung Electronics Co., Ltd.
|
||||
* http://www.samsung.com
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Exynos4412 Prime SoC revision supports higher CPU frequencies than
|
||||
* non-Prime version. Therefore we need to update OPPs table and
|
||||
* thermal maps accordingly.
|
||||
*/
|
||||
|
||||
&cpu0_opp_1500 {
|
||||
/delete-property/turbo-mode;
|
||||
};
|
||||
|
||||
&cpu0_opp_table {
|
||||
opp@1600000000 {
|
||||
opp-hz = /bits/ 64 <1600000000>;
|
||||
opp-microvolt = <1350000>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp@1704000000 {
|
||||
opp-hz = /bits/ 64 <1704000000>;
|
||||
opp-microvolt = <1350000>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
};
|
||||
|
||||
&cooling_map0 {
|
||||
cooling-device = <&cpu0 9 9>;
|
||||
};
|
||||
|
||||
&cooling_map1 {
|
||||
cooling-device = <&cpu0 15 15>;
|
||||
};
|
||||
@@ -130,7 +130,7 @@
|
||||
opp-microvolt = <1287500>;
|
||||
clock-latency-ns = <200000>;
|
||||
};
|
||||
opp@1500000000 {
|
||||
cpu0_opp_1500: opp@1500000000 {
|
||||
opp-hz = /bits/ 64 <1500000000>;
|
||||
opp-microvolt = <1350000>;
|
||||
clock-latency-ns = <200000>;
|
||||
|
||||
@@ -174,4 +174,40 @@
|
||||
clocks = <&uart_clk>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
mmsys: syscon@14000000 {
|
||||
compatible = "mediatek,mt2701-mmsys", "syscon";
|
||||
reg = <0 0x14000000 0 0x1000>;
|
||||
#clock-cells = <1>;
|
||||
};
|
||||
|
||||
imgsys: syscon@15000000 {
|
||||
compatible = "mediatek,mt2701-imgsys", "syscon";
|
||||
reg = <0 0x15000000 0 0x1000>;
|
||||
#clock-cells = <1>;
|
||||
};
|
||||
|
||||
vdecsys: syscon@16000000 {
|
||||
compatible = "mediatek,mt2701-vdecsys", "syscon";
|
||||
reg = <0 0x16000000 0 0x1000>;
|
||||
#clock-cells = <1>;
|
||||
};
|
||||
|
||||
hifsys: syscon@1a000000 {
|
||||
compatible = "mediatek,mt2701-hifsys", "syscon";
|
||||
reg = <0 0x1a000000 0 0x1000>;
|
||||
#clock-cells = <1>;
|
||||
};
|
||||
|
||||
ethsys: syscon@1b000000 {
|
||||
compatible = "mediatek,mt2701-ethsys", "syscon";
|
||||
reg = <0 0x1b000000 0 0x1000>;
|
||||
#clock-cells = <1>;
|
||||
};
|
||||
|
||||
bdpsys: syscon@1c000000 {
|
||||
compatible = "mediatek,mt2701-bdpsys", "syscon";
|
||||
reg = <0 0x1c000000 0 0x1000>;
|
||||
#clock-cells = <1>;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1493,7 +1493,8 @@
|
||||
};
|
||||
|
||||
msiof0: spi@e6e20000 {
|
||||
compatible = "renesas,msiof-r8a7790";
|
||||
compatible = "renesas,msiof-r8a7790",
|
||||
"renesas,rcar-gen2-msiof";
|
||||
reg = <0 0xe6e20000 0 0x0064>;
|
||||
interrupts = <GIC_SPI 156 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&mstp0_clks R8A7790_CLK_MSIOF0>;
|
||||
@@ -1507,7 +1508,8 @@
|
||||
};
|
||||
|
||||
msiof1: spi@e6e10000 {
|
||||
compatible = "renesas,msiof-r8a7790";
|
||||
compatible = "renesas,msiof-r8a7790",
|
||||
"renesas,rcar-gen2-msiof";
|
||||
reg = <0 0xe6e10000 0 0x0064>;
|
||||
interrupts = <GIC_SPI 157 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&mstp2_clks R8A7790_CLK_MSIOF1>;
|
||||
@@ -1521,7 +1523,8 @@
|
||||
};
|
||||
|
||||
msiof2: spi@e6e00000 {
|
||||
compatible = "renesas,msiof-r8a7790";
|
||||
compatible = "renesas,msiof-r8a7790",
|
||||
"renesas,rcar-gen2-msiof";
|
||||
reg = <0 0xe6e00000 0 0x0064>;
|
||||
interrupts = <GIC_SPI 158 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&mstp2_clks R8A7790_CLK_MSIOF2>;
|
||||
@@ -1535,7 +1538,8 @@
|
||||
};
|
||||
|
||||
msiof3: spi@e6c90000 {
|
||||
compatible = "renesas,msiof-r8a7790";
|
||||
compatible = "renesas,msiof-r8a7790",
|
||||
"renesas,rcar-gen2-msiof";
|
||||
reg = <0 0xe6c90000 0 0x0064>;
|
||||
interrupts = <GIC_SPI 159 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&mstp2_clks R8A7790_CLK_MSIOF3>;
|
||||
|
||||
@@ -335,7 +335,7 @@ static void at91sam9_sdram_standby(void)
|
||||
at91_ramc_write(1, AT91_SDRAMC_LPR, saved_lpr1);
|
||||
}
|
||||
|
||||
static const struct of_device_id const ramc_ids[] __initconst = {
|
||||
static const struct of_device_id ramc_ids[] __initconst = {
|
||||
{ .compatible = "atmel,at91rm9200-sdramc", .data = at91rm9200_standby },
|
||||
{ .compatible = "atmel,at91sam9260-sdramc", .data = at91sam9_sdram_standby },
|
||||
{ .compatible = "atmel,at91sam9g45-ddramc", .data = at91_ddr_standby },
|
||||
|
||||
@@ -33,7 +33,7 @@ struct bcm_kona_smc_data {
|
||||
unsigned result;
|
||||
};
|
||||
|
||||
static const struct of_device_id const bcm_kona_smc_ids[] __initconst = {
|
||||
static const struct of_device_id bcm_kona_smc_ids[] __initconst = {
|
||||
{.compatible = "brcm,kona-smc"},
|
||||
{.compatible = "bcm,kona-smc"}, /* deprecated name */
|
||||
{},
|
||||
|
||||
@@ -346,7 +346,7 @@ static struct usb_ohci_pdata cns3xxx_usb_ohci_pdata = {
|
||||
.power_off = csn3xxx_usb_power_off,
|
||||
};
|
||||
|
||||
static const struct of_dev_auxdata const cns3xxx_auxdata[] __initconst = {
|
||||
static const struct of_dev_auxdata cns3xxx_auxdata[] __initconst = {
|
||||
{ "intel,usb-ehci", CNS3XXX_USB_BASE, "ehci-platform", &cns3xxx_usb_ehci_pdata },
|
||||
{ "intel,usb-ohci", CNS3XXX_USB_OHCI_BASE, "ohci-platform", &cns3xxx_usb_ohci_pdata },
|
||||
{ "cavium,cns3420-ahci", CNS3XXX_SATA2_BASE, "ahci", NULL },
|
||||
|
||||
@@ -713,7 +713,7 @@ static struct omap_prcm_init_data scrm_data __initdata = {
|
||||
};
|
||||
#endif
|
||||
|
||||
static const struct of_device_id const omap_prcm_dt_match_table[] __initconst = {
|
||||
static const struct of_device_id omap_prcm_dt_match_table[] __initconst = {
|
||||
#ifdef CONFIG_SOC_AM33XX
|
||||
{ .compatible = "ti,am3-prcm", .data = &am3_prm_data },
|
||||
#endif
|
||||
|
||||
@@ -559,7 +559,7 @@ struct i2c_init_data {
|
||||
u8 hsscll_12;
|
||||
};
|
||||
|
||||
static const struct i2c_init_data const omap4_i2c_timing_data[] __initconst = {
|
||||
static const struct i2c_init_data omap4_i2c_timing_data[] __initconst = {
|
||||
{
|
||||
.load = 50,
|
||||
.loadbits = 0x3,
|
||||
|
||||
@@ -204,7 +204,7 @@ static void __init spear_clockevent_init(int irq)
|
||||
setup_irq(irq, &spear_timer_irq);
|
||||
}
|
||||
|
||||
static const struct of_device_id const timer_of_match[] __initconst = {
|
||||
static const struct of_device_id timer_of_match[] __initconst = {
|
||||
{ .compatible = "st,spear-timer", },
|
||||
{ },
|
||||
};
|
||||
|
||||
@@ -508,16 +508,19 @@ static void __init ath79_clocks_init_dt_ng(struct device_node *np)
|
||||
ar9330_clk_init(ref_clk, pll_base);
|
||||
else {
|
||||
pr_err("%s: could not find any appropriate clk_init()\n", dnfn);
|
||||
goto err_clk;
|
||||
goto err_iounmap;
|
||||
}
|
||||
|
||||
if (of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data)) {
|
||||
pr_err("%s: could not register clk provider\n", dnfn);
|
||||
goto err_clk;
|
||||
goto err_iounmap;
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
err_iounmap:
|
||||
iounmap(pll_base);
|
||||
|
||||
err_clk:
|
||||
clk_put(ref_clk);
|
||||
|
||||
|
||||
@@ -18,9 +18,24 @@
|
||||
#include <irq.h>
|
||||
|
||||
#define IRQ_STACK_SIZE THREAD_SIZE
|
||||
#define IRQ_STACK_START (IRQ_STACK_SIZE - sizeof(unsigned long))
|
||||
|
||||
extern void *irq_stack[NR_CPUS];
|
||||
|
||||
/*
|
||||
* The highest address on the IRQ stack contains a dummy frame put down in
|
||||
* genex.S (handle_int & except_vec_vi_handler) which is structured as follows:
|
||||
*
|
||||
* top ------------
|
||||
* | task sp | <- irq_stack[cpu] + IRQ_STACK_START
|
||||
* ------------
|
||||
* | | <- First frame of IRQ context
|
||||
* ------------
|
||||
*
|
||||
* task sp holds a copy of the task stack pointer where the struct pt_regs
|
||||
* from exception entry can be found.
|
||||
*/
|
||||
|
||||
static inline bool on_irq_stack(int cpu, unsigned long sp)
|
||||
{
|
||||
unsigned long low = (unsigned long)irq_stack[cpu];
|
||||
|
||||
@@ -103,6 +103,7 @@ void output_thread_info_defines(void)
|
||||
DEFINE(_THREAD_SIZE, THREAD_SIZE);
|
||||
DEFINE(_THREAD_MASK, THREAD_MASK);
|
||||
DEFINE(_IRQ_STACK_SIZE, IRQ_STACK_SIZE);
|
||||
DEFINE(_IRQ_STACK_START, IRQ_STACK_START);
|
||||
BLANK();
|
||||
}
|
||||
|
||||
|
||||
@@ -361,7 +361,7 @@ LEAF(mips_cps_get_bootcfg)
|
||||
END(mips_cps_get_bootcfg)
|
||||
|
||||
LEAF(mips_cps_boot_vpes)
|
||||
PTR_L ta2, COREBOOTCFG_VPEMASK(a0)
|
||||
lw ta2, COREBOOTCFG_VPEMASK(a0)
|
||||
PTR_L ta3, COREBOOTCFG_VPECONFIG(a0)
|
||||
|
||||
#if defined(CONFIG_CPU_MIPSR6)
|
||||
|
||||
@@ -215,9 +215,11 @@ NESTED(handle_int, PT_SIZE, sp)
|
||||
beq t0, t1, 2f
|
||||
|
||||
/* Switch to IRQ stack */
|
||||
li t1, _IRQ_STACK_SIZE
|
||||
li t1, _IRQ_STACK_START
|
||||
PTR_ADD sp, t0, t1
|
||||
|
||||
/* Save task's sp on IRQ stack so that unwinding can follow it */
|
||||
LONG_S s1, 0(sp)
|
||||
2:
|
||||
jal plat_irq_dispatch
|
||||
|
||||
@@ -325,9 +327,11 @@ NESTED(except_vec_vi_handler, 0, sp)
|
||||
beq t0, t1, 2f
|
||||
|
||||
/* Switch to IRQ stack */
|
||||
li t1, _IRQ_STACK_SIZE
|
||||
li t1, _IRQ_STACK_START
|
||||
PTR_ADD sp, t0, t1
|
||||
|
||||
/* Save task's sp on IRQ stack so that unwinding can follow it */
|
||||
LONG_S s1, 0(sp)
|
||||
2:
|
||||
jalr v0
|
||||
|
||||
|
||||
@@ -487,31 +487,52 @@ unsigned long notrace unwind_stack_by_address(unsigned long stack_page,
|
||||
unsigned long pc,
|
||||
unsigned long *ra)
|
||||
{
|
||||
unsigned long low, high, irq_stack_high;
|
||||
struct mips_frame_info info;
|
||||
unsigned long size, ofs;
|
||||
struct pt_regs *regs;
|
||||
int leaf;
|
||||
extern void ret_from_irq(void);
|
||||
extern void ret_from_exception(void);
|
||||
|
||||
if (!stack_page)
|
||||
return 0;
|
||||
|
||||
/*
|
||||
* If we reached the bottom of interrupt context,
|
||||
* return saved pc in pt_regs.
|
||||
* IRQ stacks start at IRQ_STACK_START
|
||||
* task stacks at THREAD_SIZE - 32
|
||||
*/
|
||||
if (pc == (unsigned long)ret_from_irq ||
|
||||
pc == (unsigned long)ret_from_exception) {
|
||||
struct pt_regs *regs;
|
||||
if (*sp >= stack_page &&
|
||||
*sp + sizeof(*regs) <= stack_page + THREAD_SIZE - 32) {
|
||||
regs = (struct pt_regs *)*sp;
|
||||
pc = regs->cp0_epc;
|
||||
if (!user_mode(regs) && __kernel_text_address(pc)) {
|
||||
*sp = regs->regs[29];
|
||||
*ra = regs->regs[31];
|
||||
return pc;
|
||||
}
|
||||
low = stack_page;
|
||||
if (!preemptible() && on_irq_stack(raw_smp_processor_id(), *sp)) {
|
||||
high = stack_page + IRQ_STACK_START;
|
||||
irq_stack_high = high;
|
||||
} else {
|
||||
high = stack_page + THREAD_SIZE - 32;
|
||||
irq_stack_high = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* If we reached the top of the interrupt stack, start unwinding
|
||||
* the interrupted task stack.
|
||||
*/
|
||||
if (unlikely(*sp == irq_stack_high)) {
|
||||
unsigned long task_sp = *(unsigned long *)*sp;
|
||||
|
||||
/*
|
||||
* Check that the pointer saved in the IRQ stack head points to
|
||||
* something within the stack of the current task
|
||||
*/
|
||||
if (!object_is_on_stack((void *)task_sp))
|
||||
return 0;
|
||||
|
||||
/*
|
||||
* Follow pointer to tasks kernel stack frame where interrupted
|
||||
* state was saved.
|
||||
*/
|
||||
regs = (struct pt_regs *)task_sp;
|
||||
pc = regs->cp0_epc;
|
||||
if (!user_mode(regs) && __kernel_text_address(pc)) {
|
||||
*sp = regs->regs[29];
|
||||
*ra = regs->regs[31];
|
||||
return pc;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -532,8 +553,7 @@ unsigned long notrace unwind_stack_by_address(unsigned long stack_page,
|
||||
if (leaf < 0)
|
||||
return 0;
|
||||
|
||||
if (*sp < stack_page ||
|
||||
*sp + info.frame_size > stack_page + THREAD_SIZE - 32)
|
||||
if (*sp < low || *sp + info.frame_size > high)
|
||||
return 0;
|
||||
|
||||
if (leaf)
|
||||
|
||||
@@ -182,7 +182,7 @@ SECTIONS
|
||||
* Force .bss to 64K alignment so that .bss..swapper_pg_dir
|
||||
* gets that alignment. .sbss should be empty, so there will be
|
||||
* no holes after __init_end. */
|
||||
BSS_SECTION(0, 0x10000, 0)
|
||||
BSS_SECTION(0, 0x10000, 8)
|
||||
|
||||
_end = . ;
|
||||
|
||||
|
||||
@@ -469,8 +469,8 @@ void __init ltq_soc_init(void)
|
||||
panic("Failed to load xbar nodes from devicetree");
|
||||
if (of_address_to_resource(np_xbar, 0, &res_xbar))
|
||||
panic("Failed to get xbar resources");
|
||||
if (request_mem_region(res_xbar.start, resource_size(&res_xbar),
|
||||
res_xbar.name) < 0)
|
||||
if (!request_mem_region(res_xbar.start, resource_size(&res_xbar),
|
||||
res_xbar.name))
|
||||
panic("Failed to get xbar resources");
|
||||
|
||||
ltq_xbar_membase = ioremap_nocache(res_xbar.start,
|
||||
|
||||
@@ -176,7 +176,7 @@ static struct rt2880_pmx_func spi_cs1_grp_mt7628[] = {
|
||||
|
||||
static struct rt2880_pmx_func spis_grp_mt7628[] = {
|
||||
FUNC("pwm_uart2", 3, 14, 4),
|
||||
FUNC("util", 2, 14, 4),
|
||||
FUNC("utif", 2, 14, 4),
|
||||
FUNC("gpio", 1, 14, 4),
|
||||
FUNC("spis", 0, 14, 4),
|
||||
};
|
||||
@@ -190,28 +190,28 @@ static struct rt2880_pmx_func gpio_grp_mt7628[] = {
|
||||
|
||||
static struct rt2880_pmx_func p4led_kn_grp_mt7628[] = {
|
||||
FUNC("jtag", 3, 30, 1),
|
||||
FUNC("util", 2, 30, 1),
|
||||
FUNC("utif", 2, 30, 1),
|
||||
FUNC("gpio", 1, 30, 1),
|
||||
FUNC("p4led_kn", 0, 30, 1),
|
||||
};
|
||||
|
||||
static struct rt2880_pmx_func p3led_kn_grp_mt7628[] = {
|
||||
FUNC("jtag", 3, 31, 1),
|
||||
FUNC("util", 2, 31, 1),
|
||||
FUNC("utif", 2, 31, 1),
|
||||
FUNC("gpio", 1, 31, 1),
|
||||
FUNC("p3led_kn", 0, 31, 1),
|
||||
};
|
||||
|
||||
static struct rt2880_pmx_func p2led_kn_grp_mt7628[] = {
|
||||
FUNC("jtag", 3, 32, 1),
|
||||
FUNC("util", 2, 32, 1),
|
||||
FUNC("utif", 2, 32, 1),
|
||||
FUNC("gpio", 1, 32, 1),
|
||||
FUNC("p2led_kn", 0, 32, 1),
|
||||
};
|
||||
|
||||
static struct rt2880_pmx_func p1led_kn_grp_mt7628[] = {
|
||||
FUNC("jtag", 3, 33, 1),
|
||||
FUNC("util", 2, 33, 1),
|
||||
FUNC("utif", 2, 33, 1),
|
||||
FUNC("gpio", 1, 33, 1),
|
||||
FUNC("p1led_kn", 0, 33, 1),
|
||||
};
|
||||
@@ -232,28 +232,28 @@ static struct rt2880_pmx_func wled_kn_grp_mt7628[] = {
|
||||
|
||||
static struct rt2880_pmx_func p4led_an_grp_mt7628[] = {
|
||||
FUNC("jtag", 3, 39, 1),
|
||||
FUNC("util", 2, 39, 1),
|
||||
FUNC("utif", 2, 39, 1),
|
||||
FUNC("gpio", 1, 39, 1),
|
||||
FUNC("p4led_an", 0, 39, 1),
|
||||
};
|
||||
|
||||
static struct rt2880_pmx_func p3led_an_grp_mt7628[] = {
|
||||
FUNC("jtag", 3, 40, 1),
|
||||
FUNC("util", 2, 40, 1),
|
||||
FUNC("utif", 2, 40, 1),
|
||||
FUNC("gpio", 1, 40, 1),
|
||||
FUNC("p3led_an", 0, 40, 1),
|
||||
};
|
||||
|
||||
static struct rt2880_pmx_func p2led_an_grp_mt7628[] = {
|
||||
FUNC("jtag", 3, 41, 1),
|
||||
FUNC("util", 2, 41, 1),
|
||||
FUNC("utif", 2, 41, 1),
|
||||
FUNC("gpio", 1, 41, 1),
|
||||
FUNC("p2led_an", 0, 41, 1),
|
||||
};
|
||||
|
||||
static struct rt2880_pmx_func p1led_an_grp_mt7628[] = {
|
||||
FUNC("jtag", 3, 42, 1),
|
||||
FUNC("util", 2, 42, 1),
|
||||
FUNC("utif", 2, 42, 1),
|
||||
FUNC("gpio", 1, 42, 1),
|
||||
FUNC("p1led_an", 0, 42, 1),
|
||||
};
|
||||
|
||||
@@ -145,5 +145,5 @@ void prom_soc_init(struct ralink_soc_info *soc_info)
|
||||
|
||||
rt2880_pinmux_data = rt3883_pinmux_data;
|
||||
|
||||
ralink_soc == RT3883_SOC;
|
||||
ralink_soc = RT3883_SOC;
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
* the PDC INTRIGUE calls. This is done to eliminate bugs introduced
|
||||
* in various PDC revisions. The code is much more maintainable
|
||||
* and reliable this way vs having to debug on every version of PDC
|
||||
* on every box.
|
||||
* on every box.
|
||||
*/
|
||||
|
||||
#include <linux/capability.h>
|
||||
@@ -195,8 +195,8 @@ static int perf_config(uint32_t *image_ptr);
|
||||
static int perf_release(struct inode *inode, struct file *file);
|
||||
static int perf_open(struct inode *inode, struct file *file);
|
||||
static ssize_t perf_read(struct file *file, char __user *buf, size_t cnt, loff_t *ppos);
|
||||
static ssize_t perf_write(struct file *file, const char __user *buf, size_t count,
|
||||
loff_t *ppos);
|
||||
static ssize_t perf_write(struct file *file, const char __user *buf,
|
||||
size_t count, loff_t *ppos);
|
||||
static long perf_ioctl(struct file *file, unsigned int cmd, unsigned long arg);
|
||||
static void perf_start_counters(void);
|
||||
static int perf_stop_counters(uint32_t *raddr);
|
||||
@@ -222,7 +222,7 @@ extern void perf_intrigue_disable_perf_counters (void);
|
||||
/*
|
||||
* configure:
|
||||
*
|
||||
* Configure the cpu with a given data image. First turn off the counters,
|
||||
* Configure the cpu with a given data image. First turn off the counters,
|
||||
* then download the image, then turn the counters back on.
|
||||
*/
|
||||
static int perf_config(uint32_t *image_ptr)
|
||||
@@ -234,7 +234,7 @@ static int perf_config(uint32_t *image_ptr)
|
||||
error = perf_stop_counters(raddr);
|
||||
if (error != 0) {
|
||||
printk("perf_config: perf_stop_counters = %ld\n", error);
|
||||
return -EINVAL;
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
printk("Preparing to write image\n");
|
||||
@@ -242,7 +242,7 @@ printk("Preparing to write image\n");
|
||||
error = perf_write_image((uint64_t *)image_ptr);
|
||||
if (error != 0) {
|
||||
printk("perf_config: DOWNLOAD = %ld\n", error);
|
||||
return -EINVAL;
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
printk("Preparing to start counters\n");
|
||||
@@ -254,7 +254,7 @@ printk("Preparing to start counters\n");
|
||||
}
|
||||
|
||||
/*
|
||||
* Open the device and initialize all of its memory. The device is only
|
||||
* Open the device and initialize all of its memory. The device is only
|
||||
* opened once, but can be "queried" by multiple processes that know its
|
||||
* file descriptor.
|
||||
*/
|
||||
@@ -298,8 +298,8 @@ static ssize_t perf_read(struct file *file, char __user *buf, size_t cnt, loff_t
|
||||
* called on the processor that the download should happen
|
||||
* on.
|
||||
*/
|
||||
static ssize_t perf_write(struct file *file, const char __user *buf, size_t count,
|
||||
loff_t *ppos)
|
||||
static ssize_t perf_write(struct file *file, const char __user *buf,
|
||||
size_t count, loff_t *ppos)
|
||||
{
|
||||
int err;
|
||||
size_t image_size;
|
||||
@@ -307,11 +307,11 @@ static ssize_t perf_write(struct file *file, const char __user *buf, size_t coun
|
||||
uint32_t interface_type;
|
||||
uint32_t test;
|
||||
|
||||
if (perf_processor_interface == ONYX_INTF)
|
||||
if (perf_processor_interface == ONYX_INTF)
|
||||
image_size = PCXU_IMAGE_SIZE;
|
||||
else if (perf_processor_interface == CUDA_INTF)
|
||||
else if (perf_processor_interface == CUDA_INTF)
|
||||
image_size = PCXW_IMAGE_SIZE;
|
||||
else
|
||||
else
|
||||
return -EFAULT;
|
||||
|
||||
if (!capable(CAP_SYS_ADMIN))
|
||||
@@ -331,22 +331,22 @@ static ssize_t perf_write(struct file *file, const char __user *buf, size_t coun
|
||||
|
||||
/* First check the machine type is correct for
|
||||
the requested image */
|
||||
if (((perf_processor_interface == CUDA_INTF) &&
|
||||
(interface_type != CUDA_INTF)) ||
|
||||
((perf_processor_interface == ONYX_INTF) &&
|
||||
(interface_type != ONYX_INTF)))
|
||||
if (((perf_processor_interface == CUDA_INTF) &&
|
||||
(interface_type != CUDA_INTF)) ||
|
||||
((perf_processor_interface == ONYX_INTF) &&
|
||||
(interface_type != ONYX_INTF)))
|
||||
return -EINVAL;
|
||||
|
||||
/* Next check to make sure the requested image
|
||||
is valid */
|
||||
if (((interface_type == CUDA_INTF) &&
|
||||
if (((interface_type == CUDA_INTF) &&
|
||||
(test >= MAX_CUDA_IMAGES)) ||
|
||||
((interface_type == ONYX_INTF) &&
|
||||
(test >= MAX_ONYX_IMAGES)))
|
||||
((interface_type == ONYX_INTF) &&
|
||||
(test >= MAX_ONYX_IMAGES)))
|
||||
return -EINVAL;
|
||||
|
||||
/* Copy the image into the processor */
|
||||
if (interface_type == CUDA_INTF)
|
||||
if (interface_type == CUDA_INTF)
|
||||
return perf_config(cuda_images[test]);
|
||||
else
|
||||
return perf_config(onyx_images[test]);
|
||||
@@ -360,7 +360,7 @@ static ssize_t perf_write(struct file *file, const char __user *buf, size_t coun
|
||||
static void perf_patch_images(void)
|
||||
{
|
||||
#if 0 /* FIXME!! */
|
||||
/*
|
||||
/*
|
||||
* NOTE: this routine is VERY specific to the current TLB image.
|
||||
* If the image is changed, this routine might also need to be changed.
|
||||
*/
|
||||
@@ -368,9 +368,9 @@ static void perf_patch_images(void)
|
||||
extern void $i_dtlb_miss_2_0();
|
||||
extern void PA2_0_iva();
|
||||
|
||||
/*
|
||||
/*
|
||||
* We can only use the lower 32-bits, the upper 32-bits should be 0
|
||||
* anyway given this is in the kernel
|
||||
* anyway given this is in the kernel
|
||||
*/
|
||||
uint32_t itlb_addr = (uint32_t)&($i_itlb_miss_2_0);
|
||||
uint32_t dtlb_addr = (uint32_t)&($i_dtlb_miss_2_0);
|
||||
@@ -378,21 +378,21 @@ static void perf_patch_images(void)
|
||||
|
||||
if (perf_processor_interface == ONYX_INTF) {
|
||||
/* clear last 2 bytes */
|
||||
onyx_images[TLBMISS][15] &= 0xffffff00;
|
||||
onyx_images[TLBMISS][15] &= 0xffffff00;
|
||||
/* set 2 bytes */
|
||||
onyx_images[TLBMISS][15] |= (0x000000ff&((dtlb_addr) >> 24));
|
||||
onyx_images[TLBMISS][16] = (dtlb_addr << 8)&0xffffff00;
|
||||
onyx_images[TLBMISS][17] = itlb_addr;
|
||||
|
||||
/* clear last 2 bytes */
|
||||
onyx_images[TLBHANDMISS][15] &= 0xffffff00;
|
||||
onyx_images[TLBHANDMISS][15] &= 0xffffff00;
|
||||
/* set 2 bytes */
|
||||
onyx_images[TLBHANDMISS][15] |= (0x000000ff&((dtlb_addr) >> 24));
|
||||
onyx_images[TLBHANDMISS][16] = (dtlb_addr << 8)&0xffffff00;
|
||||
onyx_images[TLBHANDMISS][17] = itlb_addr;
|
||||
|
||||
/* clear last 2 bytes */
|
||||
onyx_images[BIG_CPI][15] &= 0xffffff00;
|
||||
onyx_images[BIG_CPI][15] &= 0xffffff00;
|
||||
/* set 2 bytes */
|
||||
onyx_images[BIG_CPI][15] |= (0x000000ff&((dtlb_addr) >> 24));
|
||||
onyx_images[BIG_CPI][16] = (dtlb_addr << 8)&0xffffff00;
|
||||
@@ -405,24 +405,24 @@ static void perf_patch_images(void)
|
||||
|
||||
} else if (perf_processor_interface == CUDA_INTF) {
|
||||
/* Cuda interface */
|
||||
cuda_images[TLBMISS][16] =
|
||||
cuda_images[TLBMISS][16] =
|
||||
(cuda_images[TLBMISS][16]&0xffff0000) |
|
||||
((dtlb_addr >> 8)&0x0000ffff);
|
||||
cuda_images[TLBMISS][17] =
|
||||
cuda_images[TLBMISS][17] =
|
||||
((dtlb_addr << 24)&0xff000000) | ((itlb_addr >> 16)&0x000000ff);
|
||||
cuda_images[TLBMISS][18] = (itlb_addr << 16)&0xffff0000;
|
||||
|
||||
cuda_images[TLBHANDMISS][16] =
|
||||
cuda_images[TLBHANDMISS][16] =
|
||||
(cuda_images[TLBHANDMISS][16]&0xffff0000) |
|
||||
((dtlb_addr >> 8)&0x0000ffff);
|
||||
cuda_images[TLBHANDMISS][17] =
|
||||
cuda_images[TLBHANDMISS][17] =
|
||||
((dtlb_addr << 24)&0xff000000) | ((itlb_addr >> 16)&0x000000ff);
|
||||
cuda_images[TLBHANDMISS][18] = (itlb_addr << 16)&0xffff0000;
|
||||
|
||||
cuda_images[BIG_CPI][16] =
|
||||
cuda_images[BIG_CPI][16] =
|
||||
(cuda_images[BIG_CPI][16]&0xffff0000) |
|
||||
((dtlb_addr >> 8)&0x0000ffff);
|
||||
cuda_images[BIG_CPI][17] =
|
||||
cuda_images[BIG_CPI][17] =
|
||||
((dtlb_addr << 24)&0xff000000) | ((itlb_addr >> 16)&0x000000ff);
|
||||
cuda_images[BIG_CPI][18] = (itlb_addr << 16)&0xffff0000;
|
||||
} else {
|
||||
@@ -434,7 +434,7 @@ static void perf_patch_images(void)
|
||||
|
||||
/*
|
||||
* ioctl routine
|
||||
* All routines effect the processor that they are executed on. Thus you
|
||||
* All routines effect the processor that they are executed on. Thus you
|
||||
* must be running on the processor that you wish to change.
|
||||
*/
|
||||
|
||||
@@ -460,7 +460,7 @@ static long perf_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
|
||||
}
|
||||
|
||||
/* copy out the Counters */
|
||||
if (copy_to_user((void __user *)arg, raddr,
|
||||
if (copy_to_user((void __user *)arg, raddr,
|
||||
sizeof (raddr)) != 0) {
|
||||
error = -EFAULT;
|
||||
break;
|
||||
@@ -488,7 +488,7 @@ static const struct file_operations perf_fops = {
|
||||
.open = perf_open,
|
||||
.release = perf_release
|
||||
};
|
||||
|
||||
|
||||
static struct miscdevice perf_dev = {
|
||||
MISC_DYNAMIC_MINOR,
|
||||
PA_PERF_DEV,
|
||||
@@ -596,7 +596,7 @@ static int perf_stop_counters(uint32_t *raddr)
|
||||
/* OR sticky2 (bit 1496) to counter2 bit 32 */
|
||||
tmp64 |= (userbuf[23] >> 8) & 0x0000000080000000;
|
||||
raddr[2] = (uint32_t)tmp64;
|
||||
|
||||
|
||||
/* Counter3 is bits 1497 to 1528 */
|
||||
tmp64 = (userbuf[23] >> 7) & 0x00000000ffffffff;
|
||||
/* OR sticky3 (bit 1529) to counter3 bit 32 */
|
||||
@@ -618,7 +618,7 @@ static int perf_stop_counters(uint32_t *raddr)
|
||||
userbuf[22] = 0;
|
||||
userbuf[23] = 0;
|
||||
|
||||
/*
|
||||
/*
|
||||
* Write back the zeroed bytes + the image given
|
||||
* the read was destructive.
|
||||
*/
|
||||
@@ -626,13 +626,13 @@ static int perf_stop_counters(uint32_t *raddr)
|
||||
} else {
|
||||
|
||||
/*
|
||||
* Read RDR-15 which contains the counters and sticky bits
|
||||
* Read RDR-15 which contains the counters and sticky bits
|
||||
*/
|
||||
if (!perf_rdr_read_ubuf(15, userbuf)) {
|
||||
return -13;
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* Clear out the counters
|
||||
*/
|
||||
perf_rdr_clear(15);
|
||||
@@ -645,7 +645,7 @@ static int perf_stop_counters(uint32_t *raddr)
|
||||
raddr[2] = (uint32_t)((userbuf[1] >> 32) & 0x00000000ffffffffUL);
|
||||
raddr[3] = (uint32_t)(userbuf[1] & 0x00000000ffffffffUL);
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -683,7 +683,7 @@ static int perf_rdr_read_ubuf(uint32_t rdr_num, uint64_t *buffer)
|
||||
i = tentry->num_words;
|
||||
while (i--) {
|
||||
buffer[i] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* Check for bits an even number of 64 */
|
||||
if ((xbits = width & 0x03f) != 0) {
|
||||
@@ -809,18 +809,22 @@ static int perf_write_image(uint64_t *memaddr)
|
||||
}
|
||||
|
||||
runway = ioremap_nocache(cpu_device->hpa.start, 4096);
|
||||
if (!runway) {
|
||||
pr_err("perf_write_image: ioremap failed!\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
/* Merge intrigue bits into Runway STATUS 0 */
|
||||
tmp64 = __raw_readq(runway + RUNWAY_STATUS) & 0xffecfffffffffffful;
|
||||
__raw_writeq(tmp64 | (*memaddr++ & 0x0013000000000000ul),
|
||||
__raw_writeq(tmp64 | (*memaddr++ & 0x0013000000000000ul),
|
||||
runway + RUNWAY_STATUS);
|
||||
|
||||
|
||||
/* Write RUNWAY DEBUG registers */
|
||||
for (i = 0; i < 8; i++) {
|
||||
__raw_writeq(*memaddr++, runway + RUNWAY_DEBUG);
|
||||
}
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -844,7 +848,7 @@ printk("perf_rdr_write\n");
|
||||
perf_rdr_shift_out_U(rdr_num, buffer[i]);
|
||||
} else {
|
||||
perf_rdr_shift_out_W(rdr_num, buffer[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
printk("perf_rdr_write done\n");
|
||||
}
|
||||
|
||||
@@ -764,7 +764,29 @@ EXC_REAL(program_check, 0x700, 0x800)
|
||||
EXC_VIRT(program_check, 0x4700, 0x4800, 0x700)
|
||||
TRAMP_KVM(PACA_EXGEN, 0x700)
|
||||
EXC_COMMON_BEGIN(program_check_common)
|
||||
EXCEPTION_PROLOG_COMMON(0x700, PACA_EXGEN)
|
||||
/*
|
||||
* It's possible to receive a TM Bad Thing type program check with
|
||||
* userspace register values (in particular r1), but with SRR1 reporting
|
||||
* that we came from the kernel. Normally that would confuse the bad
|
||||
* stack logic, and we would report a bad kernel stack pointer. Instead
|
||||
* we switch to the emergency stack if we're taking a TM Bad Thing from
|
||||
* the kernel.
|
||||
*/
|
||||
li r10,MSR_PR /* Build a mask of MSR_PR .. */
|
||||
oris r10,r10,0x200000@h /* .. and SRR1_PROGTM */
|
||||
and r10,r10,r12 /* Mask SRR1 with that. */
|
||||
srdi r10,r10,8 /* Shift it so we can compare */
|
||||
cmpldi r10,(0x200000 >> 8) /* .. with an immediate. */
|
||||
bne 1f /* If != go to normal path. */
|
||||
|
||||
/* SRR1 had PR=0 and SRR1_PROGTM=1, so use the emergency stack */
|
||||
andi. r10,r12,MSR_PR; /* Set CR0 correctly for label */
|
||||
/* 3 in EXCEPTION_PROLOG_COMMON */
|
||||
mr r10,r1 /* Save r1 */
|
||||
ld r1,PACAEMERGSP(r13) /* Use emergency stack */
|
||||
subi r1,r1,INT_FRAME_SIZE /* alloc stack frame */
|
||||
b 3f /* Jump into the macro !! */
|
||||
1: EXCEPTION_PROLOG_COMMON(0x700, PACA_EXGEN)
|
||||
bl save_nvgprs
|
||||
RECONCILE_IRQ_STATE(r10, r11)
|
||||
addi r3,r1,STACK_FRAME_OVERHEAD
|
||||
|
||||
@@ -452,9 +452,20 @@ static long restore_tm_sigcontexts(struct task_struct *tsk,
|
||||
if (MSR_TM_RESV(msr))
|
||||
return -EINVAL;
|
||||
|
||||
/* pull in MSR TM from user context */
|
||||
/* pull in MSR TS bits from user context */
|
||||
regs->msr = (regs->msr & ~MSR_TS_MASK) | (msr & MSR_TS_MASK);
|
||||
|
||||
/*
|
||||
* Ensure that TM is enabled in regs->msr before we leave the signal
|
||||
* handler. It could be the case that (a) user disabled the TM bit
|
||||
* through the manipulation of the MSR bits in uc_mcontext or (b) the
|
||||
* TM bit was disabled because a sufficient number of context switches
|
||||
* happened whilst in the signal handler and load_tm overflowed,
|
||||
* disabling the TM bit. In either case we can end up with an illegal
|
||||
* TM state leading to a TM Bad Thing when we return to userspace.
|
||||
*/
|
||||
regs->msr |= MSR_TM;
|
||||
|
||||
/* pull in MSR LE from user context */
|
||||
regs->msr = (regs->msr & ~MSR_LE) | (msr & MSR_LE);
|
||||
|
||||
|
||||
@@ -1359,7 +1359,9 @@ static inline pmd_t pmdp_huge_clear_flush(struct vm_area_struct *vma,
|
||||
static inline void pmdp_invalidate(struct vm_area_struct *vma,
|
||||
unsigned long addr, pmd_t *pmdp)
|
||||
{
|
||||
pmdp_xchg_direct(vma->vm_mm, addr, pmdp, __pmd(_SEGMENT_ENTRY_INVALID));
|
||||
pmd_t pmd = __pmd(pmd_val(*pmdp) | _SEGMENT_ENTRY_INVALID);
|
||||
|
||||
pmdp_xchg_direct(vma->vm_mm, addr, pmdp, pmd);
|
||||
}
|
||||
|
||||
#define __HAVE_ARCH_PMDP_SET_WRPROTECT
|
||||
|
||||
@@ -296,6 +296,7 @@ struct x86_emulate_ctxt {
|
||||
|
||||
bool perm_ok; /* do not check permissions if true */
|
||||
bool ud; /* inject an #UD if host doesn't support insn */
|
||||
bool tf; /* TF value before instruction (after for syscall/sysret) */
|
||||
|
||||
bool have_exception;
|
||||
struct x86_exception exception;
|
||||
|
||||
@@ -176,10 +176,15 @@ static int acpi_register_lapic(int id, u32 acpiid, u8 enabled)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (!enabled) {
|
||||
++disabled_cpus;
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (boot_cpu_physical_apicid != -1U)
|
||||
ver = boot_cpu_apic_version;
|
||||
|
||||
cpu = __generic_processor_info(id, ver, enabled);
|
||||
cpu = generic_processor_info(id, ver);
|
||||
if (cpu >= 0)
|
||||
early_per_cpu(x86_cpu_to_acpiid, cpu) = acpiid;
|
||||
|
||||
|
||||
@@ -2070,7 +2070,7 @@ static int allocate_logical_cpuid(int apicid)
|
||||
return nr_logical_cpuids++;
|
||||
}
|
||||
|
||||
int __generic_processor_info(int apicid, int version, bool enabled)
|
||||
int generic_processor_info(int apicid, int version)
|
||||
{
|
||||
int cpu, max = nr_cpu_ids;
|
||||
bool boot_cpu_detected = physid_isset(boot_cpu_physical_apicid,
|
||||
@@ -2128,11 +2128,9 @@ int __generic_processor_info(int apicid, int version, bool enabled)
|
||||
if (num_processors >= nr_cpu_ids) {
|
||||
int thiscpu = max + disabled_cpus;
|
||||
|
||||
if (enabled) {
|
||||
pr_warning("APIC: NR_CPUS/possible_cpus limit of %i "
|
||||
"reached. Processor %d/0x%x ignored.\n",
|
||||
max, thiscpu, apicid);
|
||||
}
|
||||
pr_warning("APIC: NR_CPUS/possible_cpus limit of %i "
|
||||
"reached. Processor %d/0x%x ignored.\n",
|
||||
max, thiscpu, apicid);
|
||||
|
||||
disabled_cpus++;
|
||||
return -EINVAL;
|
||||
@@ -2184,23 +2182,13 @@ int __generic_processor_info(int apicid, int version, bool enabled)
|
||||
apic->x86_32_early_logical_apicid(cpu);
|
||||
#endif
|
||||
set_cpu_possible(cpu, true);
|
||||
|
||||
if (enabled) {
|
||||
num_processors++;
|
||||
physid_set(apicid, phys_cpu_present_map);
|
||||
set_cpu_present(cpu, true);
|
||||
} else {
|
||||
disabled_cpus++;
|
||||
}
|
||||
physid_set(apicid, phys_cpu_present_map);
|
||||
set_cpu_present(cpu, true);
|
||||
num_processors++;
|
||||
|
||||
return cpu;
|
||||
}
|
||||
|
||||
int generic_processor_info(int apicid, int version)
|
||||
{
|
||||
return __generic_processor_info(apicid, version, true);
|
||||
}
|
||||
|
||||
int hard_smp_processor_id(void)
|
||||
{
|
||||
return read_apic_id();
|
||||
|
||||
@@ -2738,6 +2738,7 @@ static int em_syscall(struct x86_emulate_ctxt *ctxt)
|
||||
ctxt->eflags &= ~(X86_EFLAGS_VM | X86_EFLAGS_IF);
|
||||
}
|
||||
|
||||
ctxt->tf = (ctxt->eflags & X86_EFLAGS_TF) != 0;
|
||||
return X86EMUL_CONTINUE;
|
||||
}
|
||||
|
||||
|
||||
@@ -5250,6 +5250,8 @@ static void init_emulate_ctxt(struct kvm_vcpu *vcpu)
|
||||
kvm_x86_ops->get_cs_db_l_bits(vcpu, &cs_db, &cs_l);
|
||||
|
||||
ctxt->eflags = kvm_get_rflags(vcpu);
|
||||
ctxt->tf = (ctxt->eflags & X86_EFLAGS_TF) != 0;
|
||||
|
||||
ctxt->eip = kvm_rip_read(vcpu);
|
||||
ctxt->mode = (!is_protmode(vcpu)) ? X86EMUL_MODE_REAL :
|
||||
(ctxt->eflags & X86_EFLAGS_VM) ? X86EMUL_MODE_VM86 :
|
||||
@@ -5465,37 +5467,26 @@ static int kvm_vcpu_check_hw_bp(unsigned long addr, u32 type, u32 dr7,
|
||||
return dr6;
|
||||
}
|
||||
|
||||
static void kvm_vcpu_check_singlestep(struct kvm_vcpu *vcpu, unsigned long rflags, int *r)
|
||||
static void kvm_vcpu_do_singlestep(struct kvm_vcpu *vcpu, int *r)
|
||||
{
|
||||
struct kvm_run *kvm_run = vcpu->run;
|
||||
|
||||
/*
|
||||
* rflags is the old, "raw" value of the flags. The new value has
|
||||
* not been saved yet.
|
||||
*
|
||||
* This is correct even for TF set by the guest, because "the
|
||||
* processor will not generate this exception after the instruction
|
||||
* that sets the TF flag".
|
||||
*/
|
||||
if (unlikely(rflags & X86_EFLAGS_TF)) {
|
||||
if (vcpu->guest_debug & KVM_GUESTDBG_SINGLESTEP) {
|
||||
kvm_run->debug.arch.dr6 = DR6_BS | DR6_FIXED_1 |
|
||||
DR6_RTM;
|
||||
kvm_run->debug.arch.pc = vcpu->arch.singlestep_rip;
|
||||
kvm_run->debug.arch.exception = DB_VECTOR;
|
||||
kvm_run->exit_reason = KVM_EXIT_DEBUG;
|
||||
*r = EMULATE_USER_EXIT;
|
||||
} else {
|
||||
vcpu->arch.emulate_ctxt.eflags &= ~X86_EFLAGS_TF;
|
||||
/*
|
||||
* "Certain debug exceptions may clear bit 0-3. The
|
||||
* remaining contents of the DR6 register are never
|
||||
* cleared by the processor".
|
||||
*/
|
||||
vcpu->arch.dr6 &= ~15;
|
||||
vcpu->arch.dr6 |= DR6_BS | DR6_RTM;
|
||||
kvm_queue_exception(vcpu, DB_VECTOR);
|
||||
}
|
||||
if (vcpu->guest_debug & KVM_GUESTDBG_SINGLESTEP) {
|
||||
kvm_run->debug.arch.dr6 = DR6_BS | DR6_FIXED_1 | DR6_RTM;
|
||||
kvm_run->debug.arch.pc = vcpu->arch.singlestep_rip;
|
||||
kvm_run->debug.arch.exception = DB_VECTOR;
|
||||
kvm_run->exit_reason = KVM_EXIT_DEBUG;
|
||||
*r = EMULATE_USER_EXIT;
|
||||
} else {
|
||||
vcpu->arch.emulate_ctxt.eflags &= ~X86_EFLAGS_TF;
|
||||
/*
|
||||
* "Certain debug exceptions may clear bit 0-3. The
|
||||
* remaining contents of the DR6 register are never
|
||||
* cleared by the processor".
|
||||
*/
|
||||
vcpu->arch.dr6 &= ~15;
|
||||
vcpu->arch.dr6 |= DR6_BS | DR6_RTM;
|
||||
kvm_queue_exception(vcpu, DB_VECTOR);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5650,8 +5641,9 @@ restart:
|
||||
toggle_interruptibility(vcpu, ctxt->interruptibility);
|
||||
vcpu->arch.emulate_regs_need_sync_to_vcpu = false;
|
||||
kvm_rip_write(vcpu, ctxt->eip);
|
||||
if (r == EMULATE_DONE)
|
||||
kvm_vcpu_check_singlestep(vcpu, rflags, &r);
|
||||
if (r == EMULATE_DONE &&
|
||||
(ctxt->tf || (vcpu->guest_debug & KVM_GUESTDBG_SINGLESTEP)))
|
||||
kvm_vcpu_do_singlestep(vcpu, &r);
|
||||
if (!ctxt->have_exception ||
|
||||
exception_type(ctxt->exception.vector) == EXCPT_TRAP)
|
||||
__kvm_set_rflags(vcpu, ctxt->eflags);
|
||||
|
||||
@@ -8,6 +8,7 @@ PURGATORY_OBJS = $(addprefix $(obj)/,$(purgatory-y))
|
||||
LDFLAGS_purgatory.ro := -e purgatory_start -r --no-undefined -nostdlib -z nodefaultlib
|
||||
targets += purgatory.ro
|
||||
|
||||
KASAN_SANITIZE := n
|
||||
KCOV_INSTRUMENT := n
|
||||
|
||||
# Default KBUILD_CFLAGS can have -pg option set when FTRACE is enabled. That
|
||||
|
||||
@@ -293,7 +293,7 @@ static gpt_entry *alloc_read_gpt_entries(struct parsed_partitions *state,
|
||||
if (!gpt)
|
||||
return NULL;
|
||||
|
||||
count = le32_to_cpu(gpt->num_partition_entries) *
|
||||
count = (size_t)le32_to_cpu(gpt->num_partition_entries) *
|
||||
le32_to_cpu(gpt->sizeof_partition_entry);
|
||||
if (!count)
|
||||
return NULL;
|
||||
@@ -352,7 +352,7 @@ static int is_gpt_valid(struct parsed_partitions *state, u64 lba,
|
||||
gpt_header **gpt, gpt_entry **ptes)
|
||||
{
|
||||
u32 crc, origcrc;
|
||||
u64 lastlba;
|
||||
u64 lastlba, pt_size;
|
||||
|
||||
if (!ptes)
|
||||
return 0;
|
||||
@@ -434,13 +434,20 @@ static int is_gpt_valid(struct parsed_partitions *state, u64 lba,
|
||||
goto fail;
|
||||
}
|
||||
|
||||
/* Sanity check partition table size */
|
||||
pt_size = (u64)le32_to_cpu((*gpt)->num_partition_entries) *
|
||||
le32_to_cpu((*gpt)->sizeof_partition_entry);
|
||||
if (pt_size > KMALLOC_MAX_SIZE) {
|
||||
pr_debug("GUID Partition Table is too large: %llu > %lu bytes\n",
|
||||
(unsigned long long)pt_size, KMALLOC_MAX_SIZE);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
if (!(*ptes = alloc_read_gpt_entries(state, *gpt)))
|
||||
goto fail;
|
||||
|
||||
/* Check the GUID Partition Entry Array CRC */
|
||||
crc = efi_crc32((const unsigned char *) (*ptes),
|
||||
le32_to_cpu((*gpt)->num_partition_entries) *
|
||||
le32_to_cpu((*gpt)->sizeof_partition_entry));
|
||||
crc = efi_crc32((const unsigned char *) (*ptes), pt_size);
|
||||
|
||||
if (crc != le32_to_cpu((*gpt)->partition_entry_array_crc32)) {
|
||||
pr_debug("GUID Partition Entry Array CRC check failed.\n");
|
||||
|
||||
@@ -224,7 +224,6 @@ static DECLARE_TRANSPORT_CLASS(ata_port_class,
|
||||
|
||||
static void ata_tport_release(struct device *dev)
|
||||
{
|
||||
put_device(dev->parent);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -284,7 +283,7 @@ int ata_tport_add(struct device *parent,
|
||||
device_initialize(dev);
|
||||
dev->type = &ata_port_type;
|
||||
|
||||
dev->parent = get_device(parent);
|
||||
dev->parent = parent;
|
||||
dev->release = ata_tport_release;
|
||||
dev_set_name(dev, "ata%d", ap->print_id);
|
||||
transport_setup_device(dev);
|
||||
@@ -348,7 +347,6 @@ static DECLARE_TRANSPORT_CLASS(ata_link_class,
|
||||
|
||||
static void ata_tlink_release(struct device *dev)
|
||||
{
|
||||
put_device(dev->parent);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -410,7 +408,7 @@ int ata_tlink_add(struct ata_link *link)
|
||||
int error;
|
||||
|
||||
device_initialize(dev);
|
||||
dev->parent = get_device(&ap->tdev);
|
||||
dev->parent = &ap->tdev;
|
||||
dev->release = ata_tlink_release;
|
||||
if (ata_is_host_link(link))
|
||||
dev_set_name(dev, "link%d", ap->print_id);
|
||||
@@ -589,7 +587,6 @@ static DECLARE_TRANSPORT_CLASS(ata_dev_class,
|
||||
|
||||
static void ata_tdev_release(struct device *dev)
|
||||
{
|
||||
put_device(dev->parent);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -662,7 +659,7 @@ static int ata_tdev_add(struct ata_device *ata_dev)
|
||||
int error;
|
||||
|
||||
device_initialize(dev);
|
||||
dev->parent = get_device(&link->tdev);
|
||||
dev->parent = &link->tdev;
|
||||
dev->release = ata_tdev_release;
|
||||
if (ata_is_host_link(link))
|
||||
dev_set_name(dev, "dev%d.%d", ap->print_id,ata_dev->devno);
|
||||
|
||||
@@ -644,14 +644,16 @@ static void svia_configure(struct pci_dev *pdev, int board_id,
|
||||
pci_write_config_byte(pdev, SATA_NATIVE_MODE, tmp8);
|
||||
}
|
||||
|
||||
/* enable IRQ on hotplug */
|
||||
pci_read_config_byte(pdev, SVIA_MISC_3, &tmp8);
|
||||
if ((tmp8 & SATA_HOTPLUG) != SATA_HOTPLUG) {
|
||||
dev_dbg(&pdev->dev,
|
||||
"enabling SATA hotplug (0x%x)\n",
|
||||
(int) tmp8);
|
||||
tmp8 |= SATA_HOTPLUG;
|
||||
pci_write_config_byte(pdev, SVIA_MISC_3, tmp8);
|
||||
if (board_id == vt6421) {
|
||||
/* enable IRQ on hotplug */
|
||||
pci_read_config_byte(pdev, SVIA_MISC_3, &tmp8);
|
||||
if ((tmp8 & SATA_HOTPLUG) != SATA_HOTPLUG) {
|
||||
dev_dbg(&pdev->dev,
|
||||
"enabling SATA hotplug (0x%x)\n",
|
||||
(int) tmp8);
|
||||
tmp8 |= SATA_HOTPLUG;
|
||||
pci_write_config_byte(pdev, SVIA_MISC_3, tmp8);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -858,7 +858,8 @@ static ssize_t driver_override_store(struct device *dev,
|
||||
struct platform_device *pdev = to_platform_device(dev);
|
||||
char *driver_override, *old, *cp;
|
||||
|
||||
if (count > PATH_MAX)
|
||||
/* We need to keep extra room for a newline */
|
||||
if (count >= (PAGE_SIZE - 1))
|
||||
return -EINVAL;
|
||||
|
||||
driver_override = kstrndup(buf, count, GFP_KERNEL);
|
||||
|
||||
@@ -182,6 +182,7 @@ static int i2s_pll_clk_probe(struct platform_device *pdev)
|
||||
if (IS_ERR(pll_clk->base))
|
||||
return PTR_ERR(pll_clk->base);
|
||||
|
||||
memset(&init, 0, sizeof(init));
|
||||
clk_name = node->name;
|
||||
init.name = clk_name;
|
||||
init.ops = &i2s_pll_ops;
|
||||
|
||||
@@ -803,6 +803,13 @@ static const struct sunxi_ccu_desc sun8i_h3_ccu_desc = {
|
||||
.num_resets = ARRAY_SIZE(sun8i_h3_ccu_resets),
|
||||
};
|
||||
|
||||
static struct ccu_mux_nb sun8i_h3_cpu_nb = {
|
||||
.common = &cpux_clk.common,
|
||||
.cm = &cpux_clk.mux,
|
||||
.delay_us = 1, /* > 8 clock cycles at 24 MHz */
|
||||
.bypass_index = 1, /* index of 24 MHz oscillator */
|
||||
};
|
||||
|
||||
static void __init sun8i_h3_ccu_setup(struct device_node *node)
|
||||
{
|
||||
void __iomem *reg;
|
||||
@@ -821,6 +828,9 @@ static void __init sun8i_h3_ccu_setup(struct device_node *node)
|
||||
writel(val | (3 << 16), reg + SUN8I_H3_PLL_AUDIO_REG);
|
||||
|
||||
sunxi_ccu_probe(node, reg, &sun8i_h3_ccu_desc);
|
||||
|
||||
ccu_mux_notifier_register(pll_cpux_clk.common.hw.clk,
|
||||
&sun8i_h3_cpu_nb);
|
||||
}
|
||||
CLK_OF_DECLARE(sun8i_h3_ccu, "allwinner,sun8i-h3-ccu",
|
||||
sun8i_h3_ccu_setup);
|
||||
|
||||
@@ -609,6 +609,7 @@ static void intel_pstate_hwp_set_online_cpus(void)
|
||||
static int pid_param_set(void *data, u64 val)
|
||||
{
|
||||
*(u32 *)data = val;
|
||||
pid_params.sample_rate_ns = pid_params.sample_rate_ms * NSEC_PER_MSEC;
|
||||
intel_pstate_reset_all_pid();
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -168,7 +168,7 @@ static int axp288_handle_chrg_det_event(struct axp288_extcon_info *info)
|
||||
return ret;
|
||||
}
|
||||
|
||||
vbus_attach = (pwr_stat & PS_STAT_VBUS_PRESENT);
|
||||
vbus_attach = (pwr_stat & PS_STAT_VBUS_VALID);
|
||||
if (!vbus_attach)
|
||||
goto notify_otg;
|
||||
|
||||
|
||||
@@ -739,8 +739,10 @@ int kfd_wait_on_events(struct kfd_process *p,
|
||||
struct kfd_event_data event_data;
|
||||
|
||||
if (copy_from_user(&event_data, &events[i],
|
||||
sizeof(struct kfd_event_data)))
|
||||
sizeof(struct kfd_event_data))) {
|
||||
ret = -EFAULT;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
ret = init_event_waiter(p, &event_waiters[i],
|
||||
event_data.event_id, i);
|
||||
|
||||
@@ -150,13 +150,8 @@ static void malidp_de_plane_update(struct drm_plane *plane,
|
||||
/* convert src values from Q16 fixed point to integer */
|
||||
src_w = plane->state->src_w >> 16;
|
||||
src_h = plane->state->src_h >> 16;
|
||||
if (plane->state->rotation & MALIDP_ROTATED_MASK) {
|
||||
dest_w = plane->state->crtc_h;
|
||||
dest_h = plane->state->crtc_w;
|
||||
} else {
|
||||
dest_w = plane->state->crtc_w;
|
||||
dest_h = plane->state->crtc_h;
|
||||
}
|
||||
dest_w = plane->state->crtc_w;
|
||||
dest_h = plane->state->crtc_h;
|
||||
|
||||
malidp_hw_write(mp->hwdev, format_id, mp->layer->base);
|
||||
|
||||
@@ -189,9 +184,9 @@ static void malidp_de_plane_update(struct drm_plane *plane,
|
||||
if (plane->state->rotation & DRM_ROTATE_MASK)
|
||||
val = ilog2(plane->state->rotation & DRM_ROTATE_MASK) << LAYER_ROT_OFFSET;
|
||||
if (plane->state->rotation & DRM_REFLECT_X)
|
||||
val |= LAYER_V_FLIP;
|
||||
if (plane->state->rotation & DRM_REFLECT_Y)
|
||||
val |= LAYER_H_FLIP;
|
||||
if (plane->state->rotation & DRM_REFLECT_Y)
|
||||
val |= LAYER_V_FLIP;
|
||||
|
||||
/* set the 'enable layer' bit */
|
||||
val |= LAYER_ENABLE;
|
||||
|
||||
@@ -1152,6 +1152,13 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv, enum port port,
|
||||
is_hdmi = is_dvi && (child->common.device_type & DEVICE_TYPE_NOT_HDMI_OUTPUT) == 0;
|
||||
is_edp = is_dp && (child->common.device_type & DEVICE_TYPE_INTERNAL_CONNECTOR);
|
||||
|
||||
if (port == PORT_A && is_dvi) {
|
||||
DRM_DEBUG_KMS("VBT claims port A supports DVI%s, ignoring\n",
|
||||
is_hdmi ? "/HDMI" : "");
|
||||
is_dvi = false;
|
||||
is_hdmi = false;
|
||||
}
|
||||
|
||||
info->supports_dvi = is_dvi;
|
||||
info->supports_hdmi = is_hdmi;
|
||||
info->supports_dp = is_dp;
|
||||
|
||||
@@ -272,8 +272,30 @@ static int intel_overlay_on(struct intel_overlay *overlay)
|
||||
return intel_overlay_do_wait_request(overlay, req, NULL);
|
||||
}
|
||||
|
||||
static void intel_overlay_flip_prepare(struct intel_overlay *overlay,
|
||||
struct i915_vma *vma)
|
||||
{
|
||||
enum pipe pipe = overlay->crtc->pipe;
|
||||
|
||||
WARN_ON(overlay->old_vma);
|
||||
|
||||
i915_gem_track_fb(overlay->vma ? overlay->vma->obj : NULL,
|
||||
vma ? vma->obj : NULL,
|
||||
INTEL_FRONTBUFFER_OVERLAY(pipe));
|
||||
|
||||
intel_frontbuffer_flip_prepare(overlay->i915,
|
||||
INTEL_FRONTBUFFER_OVERLAY(pipe));
|
||||
|
||||
overlay->old_vma = overlay->vma;
|
||||
if (vma)
|
||||
overlay->vma = i915_vma_get(vma);
|
||||
else
|
||||
overlay->vma = NULL;
|
||||
}
|
||||
|
||||
/* overlay needs to be enabled in OCMD reg */
|
||||
static int intel_overlay_continue(struct intel_overlay *overlay,
|
||||
struct i915_vma *vma,
|
||||
bool load_polyphase_filter)
|
||||
{
|
||||
struct drm_i915_private *dev_priv = overlay->i915;
|
||||
@@ -308,27 +330,35 @@ static int intel_overlay_continue(struct intel_overlay *overlay,
|
||||
intel_ring_emit(ring, flip_addr);
|
||||
intel_ring_advance(ring);
|
||||
|
||||
intel_overlay_flip_prepare(overlay, vma);
|
||||
|
||||
intel_overlay_submit_request(overlay, req, NULL);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void intel_overlay_release_old_vma(struct intel_overlay *overlay)
|
||||
{
|
||||
struct i915_vma *vma;
|
||||
|
||||
vma = fetch_and_zero(&overlay->old_vma);
|
||||
if (WARN_ON(!vma))
|
||||
return;
|
||||
|
||||
intel_frontbuffer_flip_complete(overlay->i915,
|
||||
INTEL_FRONTBUFFER_OVERLAY(overlay->crtc->pipe));
|
||||
|
||||
i915_gem_object_unpin_from_display_plane(vma);
|
||||
i915_vma_put(vma);
|
||||
}
|
||||
|
||||
static void intel_overlay_release_old_vid_tail(struct i915_gem_active *active,
|
||||
struct drm_i915_gem_request *req)
|
||||
{
|
||||
struct intel_overlay *overlay =
|
||||
container_of(active, typeof(*overlay), last_flip);
|
||||
struct i915_vma *vma;
|
||||
|
||||
vma = fetch_and_zero(&overlay->old_vma);
|
||||
if (WARN_ON(!vma))
|
||||
return;
|
||||
|
||||
i915_gem_track_fb(vma->obj, NULL,
|
||||
INTEL_FRONTBUFFER_OVERLAY(overlay->crtc->pipe));
|
||||
|
||||
i915_gem_object_unpin_from_display_plane(vma);
|
||||
i915_vma_put(vma);
|
||||
intel_overlay_release_old_vma(overlay);
|
||||
}
|
||||
|
||||
static void intel_overlay_off_tail(struct i915_gem_active *active,
|
||||
@@ -336,15 +366,8 @@ static void intel_overlay_off_tail(struct i915_gem_active *active,
|
||||
{
|
||||
struct intel_overlay *overlay =
|
||||
container_of(active, typeof(*overlay), last_flip);
|
||||
struct i915_vma *vma;
|
||||
|
||||
/* never have the overlay hw on without showing a frame */
|
||||
vma = fetch_and_zero(&overlay->vma);
|
||||
if (WARN_ON(!vma))
|
||||
return;
|
||||
|
||||
i915_gem_object_unpin_from_display_plane(vma);
|
||||
i915_vma_put(vma);
|
||||
intel_overlay_release_old_vma(overlay);
|
||||
|
||||
overlay->crtc->overlay = NULL;
|
||||
overlay->crtc = NULL;
|
||||
@@ -398,6 +421,8 @@ static int intel_overlay_off(struct intel_overlay *overlay)
|
||||
}
|
||||
intel_ring_advance(ring);
|
||||
|
||||
intel_overlay_flip_prepare(overlay, NULL);
|
||||
|
||||
return intel_overlay_do_wait_request(overlay, req,
|
||||
intel_overlay_off_tail);
|
||||
}
|
||||
@@ -836,18 +861,10 @@ static int intel_overlay_do_put_image(struct intel_overlay *overlay,
|
||||
|
||||
intel_overlay_unmap_regs(overlay, regs);
|
||||
|
||||
ret = intel_overlay_continue(overlay, scale_changed);
|
||||
ret = intel_overlay_continue(overlay, vma, scale_changed);
|
||||
if (ret)
|
||||
goto out_unpin;
|
||||
|
||||
i915_gem_track_fb(overlay->vma ? overlay->vma->obj : NULL,
|
||||
vma->obj, INTEL_FRONTBUFFER_OVERLAY(pipe));
|
||||
|
||||
overlay->old_vma = overlay->vma;
|
||||
overlay->vma = vma;
|
||||
|
||||
intel_frontbuffer_flip(dev_priv, INTEL_FRONTBUFFER_OVERLAY(pipe));
|
||||
|
||||
return 0;
|
||||
|
||||
out_unpin:
|
||||
@@ -1215,6 +1232,7 @@ int intel_overlay_put_image_ioctl(struct drm_device *dev, void *data,
|
||||
|
||||
mutex_unlock(&dev->struct_mutex);
|
||||
drm_modeset_unlock_all(dev);
|
||||
i915_gem_object_put(new_bo);
|
||||
|
||||
kfree(params);
|
||||
|
||||
|
||||
@@ -387,6 +387,13 @@ static bool intel_psr_match_conditions(struct intel_dp *intel_dp)
|
||||
return false;
|
||||
}
|
||||
|
||||
/* PSR2 is restricted to work with panel resolutions upto 3200x2000 */
|
||||
if (intel_crtc->config->pipe_src_w > 3200 ||
|
||||
intel_crtc->config->pipe_src_h > 2000) {
|
||||
dev_priv->psr.psr2_support = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
dev_priv->psr.source_ok = true;
|
||||
return true;
|
||||
}
|
||||
@@ -425,7 +432,6 @@ void intel_psr_enable(struct intel_dp *intel_dp)
|
||||
struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
|
||||
struct drm_device *dev = intel_dig_port->base.base.dev;
|
||||
struct drm_i915_private *dev_priv = to_i915(dev);
|
||||
struct intel_crtc *crtc = to_intel_crtc(intel_dig_port->base.base.crtc);
|
||||
|
||||
if (!HAS_PSR(dev)) {
|
||||
DRM_DEBUG_KMS("PSR not supported on this platform\n");
|
||||
@@ -452,12 +458,7 @@ void intel_psr_enable(struct intel_dp *intel_dp)
|
||||
hsw_psr_setup_vsc(intel_dp);
|
||||
|
||||
if (dev_priv->psr.psr2_support) {
|
||||
/* PSR2 is restricted to work with panel resolutions upto 3200x2000 */
|
||||
if (crtc->config->pipe_src_w > 3200 ||
|
||||
crtc->config->pipe_src_h > 2000)
|
||||
dev_priv->psr.psr2_support = false;
|
||||
else
|
||||
skl_psr_setup_su_vsc(intel_dp);
|
||||
skl_psr_setup_su_vsc(intel_dp);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -604,7 +604,8 @@ static int i2c_hid_alloc_buffers(struct i2c_hid *ihid, size_t report_size)
|
||||
{
|
||||
/* the worst case is computed from the set_report command with a
|
||||
* reportID > 15 and the maximum report length */
|
||||
int args_len = sizeof(__u8) + /* optional ReportID byte */
|
||||
int args_len = sizeof(__u8) + /* ReportID */
|
||||
sizeof(__u8) + /* optional ReportID byte */
|
||||
sizeof(__u16) + /* data register */
|
||||
sizeof(__u16) + /* size of the report */
|
||||
report_size; /* report */
|
||||
|
||||
@@ -611,8 +611,10 @@ static struct wacom_hdev_data *wacom_get_hdev_data(struct hid_device *hdev)
|
||||
|
||||
/* Try to find an already-probed interface from the same device */
|
||||
list_for_each_entry(data, &wacom_udev_list, list) {
|
||||
if (compare_device_paths(hdev, data->dev, '/'))
|
||||
if (compare_device_paths(hdev, data->dev, '/')) {
|
||||
kref_get(&data->kref);
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
/* Fallback to finding devices that appear to be "siblings" */
|
||||
@@ -712,6 +714,9 @@ static int wacom_led_control(struct wacom *wacom)
|
||||
if (!wacom->led.groups)
|
||||
return -ENOTSUPP;
|
||||
|
||||
if (wacom->wacom_wac.features.type == REMOTE)
|
||||
return -ENOTSUPP;
|
||||
|
||||
if (wacom->wacom_wac.pid) { /* wireless connected */
|
||||
report_id = WAC_CMD_WL_LED_CONTROL;
|
||||
buf_size = 13;
|
||||
@@ -2433,6 +2438,8 @@ static void wacom_remove(struct hid_device *hdev)
|
||||
if (hdev->bus == BUS_BLUETOOTH)
|
||||
device_remove_file(&hdev->dev, &dev_attr_speed);
|
||||
|
||||
wacom_release_resources(wacom);
|
||||
|
||||
hid_set_drvdata(hdev, NULL);
|
||||
}
|
||||
|
||||
|
||||
@@ -559,8 +559,8 @@ static int wacom_intuos_pad(struct wacom_wac *wacom)
|
||||
keys = data[9] & 0x07;
|
||||
}
|
||||
} else {
|
||||
buttons = ((data[6] & 0x10) << 10) |
|
||||
((data[5] & 0x10) << 9) |
|
||||
buttons = ((data[6] & 0x10) << 5) |
|
||||
((data[5] & 0x10) << 4) |
|
||||
((data[6] & 0x0F) << 4) |
|
||||
(data[5] & 0x0F);
|
||||
}
|
||||
|
||||
@@ -161,6 +161,10 @@ static void fcopy_send_data(struct work_struct *dummy)
|
||||
out_src = smsg_out;
|
||||
break;
|
||||
|
||||
case WRITE_TO_FILE:
|
||||
out_src = fcopy_transaction.fcopy_msg;
|
||||
out_len = sizeof(struct hv_do_fcopy);
|
||||
break;
|
||||
default:
|
||||
out_src = fcopy_transaction.fcopy_msg;
|
||||
out_len = fcopy_transaction.recv_len;
|
||||
|
||||
@@ -208,11 +208,13 @@ static ssize_t get_cpu_vid(struct device *dev, struct device_attribute *attr,
|
||||
}
|
||||
static DEVICE_ATTR(cpu0_vid, S_IRUGO, get_cpu_vid, NULL);
|
||||
|
||||
#define VDD_FROM_REG(val) (((val) * 95 + 2) / 4)
|
||||
#define VDD_TO_REG(val) clamp_val((((val) * 4 + 47) / 95), 0, 255)
|
||||
#define VDD_FROM_REG(val) DIV_ROUND_CLOSEST((val) * 95, 4)
|
||||
#define VDD_CLAMP(val) clamp_val(val, 0, 255 * 95 / 4)
|
||||
#define VDD_TO_REG(val) DIV_ROUND_CLOSEST(VDD_CLAMP(val) * 4, 95)
|
||||
|
||||
#define IN_FROM_REG(val) ((val) * 19)
|
||||
#define IN_TO_REG(val) clamp_val((((val) + 9) / 19), 0, 255)
|
||||
#define IN_FROM_REG(val) ((val) * 19)
|
||||
#define IN_CLAMP(val) clamp_val(val, 0, 255 * 19)
|
||||
#define IN_TO_REG(val) DIV_ROUND_CLOSEST(IN_CLAMP(val), 19)
|
||||
|
||||
static ssize_t get_in_input(struct device *dev, struct device_attribute *attr,
|
||||
char *buf)
|
||||
@@ -349,8 +351,13 @@ static SENSOR_DEVICE_ATTR(in4_max, S_IRUGO | S_IWUSR,
|
||||
|
||||
#define DIV_FROM_REG(val) (1 << (val))
|
||||
#define FAN_FROM_REG(val, div) ((val) == 0 ? 0 : (480000 / ((val) << (div))))
|
||||
#define FAN_TO_REG(val, div) ((val) <= 0 ? 0 : \
|
||||
clamp_val((480000 + ((val) << ((div)-1))) / ((val) << (div)), 1, 255))
|
||||
|
||||
#define FAN_BASE(div) (480000 >> (div))
|
||||
#define FAN_CLAMP(val, div) clamp_val(val, FAN_BASE(div) / 255, \
|
||||
FAN_BASE(div))
|
||||
#define FAN_TO_REG(val, div) ((val) == 0 ? 0 : \
|
||||
DIV_ROUND_CLOSEST(480000, \
|
||||
FAN_CLAMP(val, div) << (div)))
|
||||
|
||||
static ssize_t get_fan_input(struct device *dev, struct device_attribute *attr,
|
||||
char *buf)
|
||||
@@ -513,9 +520,9 @@ static SENSOR_DEVICE_ATTR(fan2_div, S_IRUGO | S_IWUSR,
|
||||
static DEVICE_ATTR(fan1_off, S_IRUGO | S_IWUSR,
|
||||
get_fan_off, set_fan_off);
|
||||
|
||||
#define TEMP_FROM_REG(val) (((val) - 130) * 1000)
|
||||
#define TEMP_TO_REG(val) clamp_val(((((val) < 0 ? \
|
||||
(val) - 500 : (val) + 500) / 1000) + 130), 0, 255)
|
||||
#define TEMP_FROM_REG(val) (((val) - 130) * 1000)
|
||||
#define TEMP_CLAMP(val) clamp_val(val, -130000, 125000)
|
||||
#define TEMP_TO_REG(val) (DIV_ROUND_CLOSEST(TEMP_CLAMP(val), 1000) + 130)
|
||||
|
||||
static ssize_t get_temp_input(struct device *dev, struct device_attribute *attr,
|
||||
char *buf)
|
||||
|
||||
@@ -1125,7 +1125,7 @@ void stm_source_unregister_device(struct stm_source_data *data)
|
||||
|
||||
stm_source_link_drop(src);
|
||||
|
||||
device_destroy(&stm_source_class, src->dev.devt);
|
||||
device_unregister(&src->dev);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(stm_source_unregister_device);
|
||||
|
||||
|
||||
@@ -175,7 +175,7 @@ static void meson_i2c_put_data(struct meson_i2c *i2c, char *buf, int len)
|
||||
wdata1 |= *buf++ << ((i - 4) * 8);
|
||||
|
||||
writel(wdata0, i2c->regs + REG_TOK_WDATA0);
|
||||
writel(wdata0, i2c->regs + REG_TOK_WDATA1);
|
||||
writel(wdata1, i2c->regs + REG_TOK_WDATA1);
|
||||
|
||||
dev_dbg(i2c->dev, "%s: data %08x %08x len %d\n", __func__,
|
||||
wdata0, wdata1, len);
|
||||
|
||||
@@ -257,7 +257,7 @@ static int ad7793_setup(struct iio_dev *indio_dev,
|
||||
unsigned int vref_mv)
|
||||
{
|
||||
struct ad7793_state *st = iio_priv(indio_dev);
|
||||
int i, ret = -1;
|
||||
int i, ret;
|
||||
unsigned long long scale_uv;
|
||||
u32 id;
|
||||
|
||||
@@ -266,7 +266,7 @@ static int ad7793_setup(struct iio_dev *indio_dev,
|
||||
return ret;
|
||||
|
||||
/* reset the serial interface */
|
||||
ret = spi_write(st->sd.spi, (u8 *)&ret, sizeof(ret));
|
||||
ret = ad_sd_reset(&st->sd, 32);
|
||||
if (ret < 0)
|
||||
goto out;
|
||||
usleep_range(500, 2000); /* Wait for at least 500us */
|
||||
|
||||
@@ -177,6 +177,34 @@ out:
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(ad_sd_read_reg);
|
||||
|
||||
/**
|
||||
* ad_sd_reset() - Reset the serial interface
|
||||
*
|
||||
* @sigma_delta: The sigma delta device
|
||||
* @reset_length: Number of SCLKs with DIN = 1
|
||||
*
|
||||
* Returns 0 on success, an error code otherwise.
|
||||
**/
|
||||
int ad_sd_reset(struct ad_sigma_delta *sigma_delta,
|
||||
unsigned int reset_length)
|
||||
{
|
||||
uint8_t *buf;
|
||||
unsigned int size;
|
||||
int ret;
|
||||
|
||||
size = DIV_ROUND_UP(reset_length, 8);
|
||||
buf = kcalloc(size, sizeof(*buf), GFP_KERNEL);
|
||||
if (!buf)
|
||||
return -ENOMEM;
|
||||
|
||||
memset(buf, 0xff, size);
|
||||
ret = spi_write(sigma_delta->spi, buf, size);
|
||||
kfree(buf);
|
||||
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(ad_sd_reset);
|
||||
|
||||
static int ad_sd_calibrate(struct ad_sigma_delta *sigma_delta,
|
||||
unsigned int mode, unsigned int channel)
|
||||
{
|
||||
|
||||
@@ -28,8 +28,6 @@
|
||||
#include <linux/iio/driver.h>
|
||||
|
||||
#define AXP288_ADC_EN_MASK 0xF1
|
||||
#define AXP288_ADC_TS_PIN_GPADC 0xF2
|
||||
#define AXP288_ADC_TS_PIN_ON 0xF3
|
||||
|
||||
enum axp288_adc_id {
|
||||
AXP288_ADC_TS,
|
||||
@@ -123,16 +121,6 @@ static int axp288_adc_read_channel(int *val, unsigned long address,
|
||||
return IIO_VAL_INT;
|
||||
}
|
||||
|
||||
static int axp288_adc_set_ts(struct regmap *regmap, unsigned int mode,
|
||||
unsigned long address)
|
||||
{
|
||||
/* channels other than GPADC do not need to switch TS pin */
|
||||
if (address != AXP288_GP_ADC_H)
|
||||
return 0;
|
||||
|
||||
return regmap_write(regmap, AXP288_ADC_TS_PIN_CTRL, mode);
|
||||
}
|
||||
|
||||
static int axp288_adc_read_raw(struct iio_dev *indio_dev,
|
||||
struct iio_chan_spec const *chan,
|
||||
int *val, int *val2, long mask)
|
||||
@@ -143,16 +131,7 @@ static int axp288_adc_read_raw(struct iio_dev *indio_dev,
|
||||
mutex_lock(&indio_dev->mlock);
|
||||
switch (mask) {
|
||||
case IIO_CHAN_INFO_RAW:
|
||||
if (axp288_adc_set_ts(info->regmap, AXP288_ADC_TS_PIN_GPADC,
|
||||
chan->address)) {
|
||||
dev_err(&indio_dev->dev, "GPADC mode\n");
|
||||
ret = -EINVAL;
|
||||
break;
|
||||
}
|
||||
ret = axp288_adc_read_channel(val, chan->address, info->regmap);
|
||||
if (axp288_adc_set_ts(info->regmap, AXP288_ADC_TS_PIN_ON,
|
||||
chan->address))
|
||||
dev_err(&indio_dev->dev, "TS pin restore\n");
|
||||
break;
|
||||
default:
|
||||
ret = -EINVAL;
|
||||
@@ -162,15 +141,6 @@ static int axp288_adc_read_raw(struct iio_dev *indio_dev,
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int axp288_adc_set_state(struct regmap *regmap)
|
||||
{
|
||||
/* ADC should be always enabled for internal FG to function */
|
||||
if (regmap_write(regmap, AXP288_ADC_TS_PIN_CTRL, AXP288_ADC_TS_PIN_ON))
|
||||
return -EIO;
|
||||
|
||||
return regmap_write(regmap, AXP20X_ADC_EN1, AXP288_ADC_EN_MASK);
|
||||
}
|
||||
|
||||
static const struct iio_info axp288_adc_iio_info = {
|
||||
.read_raw = &axp288_adc_read_raw,
|
||||
.driver_module = THIS_MODULE,
|
||||
@@ -199,7 +169,7 @@ static int axp288_adc_probe(struct platform_device *pdev)
|
||||
* Set ADC to enabled state at all time, including system suspend.
|
||||
* otherwise internal fuel gauge functionality may be affected.
|
||||
*/
|
||||
ret = axp288_adc_set_state(axp20x->regmap);
|
||||
ret = regmap_write(info->regmap, AXP20X_ADC_EN1, AXP288_ADC_EN_MASK);
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "unable to enable ADC device\n");
|
||||
return ret;
|
||||
|
||||
@@ -401,6 +401,7 @@ static const struct of_device_id mx25_gcq_ids[] = {
|
||||
{ .compatible = "fsl,imx25-gcq", },
|
||||
{ /* Sentinel */ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, mx25_gcq_ids);
|
||||
|
||||
static struct platform_driver mx25_gcq_driver = {
|
||||
.driver = {
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
* MCP3204
|
||||
* MCP3208
|
||||
* ------------
|
||||
* 13 bit converter
|
||||
* MCP3301
|
||||
*
|
||||
* Datasheet can be found here:
|
||||
* http://ww1.microchip.com/downloads/en/DeviceDoc/21293C.pdf mcp3001
|
||||
@@ -96,7 +98,7 @@ static int mcp320x_channel_to_tx_data(int device_index,
|
||||
}
|
||||
|
||||
static int mcp320x_adc_conversion(struct mcp320x *adc, u8 channel,
|
||||
bool differential, int device_index)
|
||||
bool differential, int device_index, int *val)
|
||||
{
|
||||
int ret;
|
||||
|
||||
@@ -117,19 +119,25 @@ static int mcp320x_adc_conversion(struct mcp320x *adc, u8 channel,
|
||||
|
||||
switch (device_index) {
|
||||
case mcp3001:
|
||||
return (adc->rx_buf[0] << 5 | adc->rx_buf[1] >> 3);
|
||||
*val = (adc->rx_buf[0] << 5 | adc->rx_buf[1] >> 3);
|
||||
return 0;
|
||||
case mcp3002:
|
||||
case mcp3004:
|
||||
case mcp3008:
|
||||
return (adc->rx_buf[0] << 2 | adc->rx_buf[1] >> 6);
|
||||
*val = (adc->rx_buf[0] << 2 | adc->rx_buf[1] >> 6);
|
||||
return 0;
|
||||
case mcp3201:
|
||||
return (adc->rx_buf[0] << 7 | adc->rx_buf[1] >> 1);
|
||||
*val = (adc->rx_buf[0] << 7 | adc->rx_buf[1] >> 1);
|
||||
return 0;
|
||||
case mcp3202:
|
||||
case mcp3204:
|
||||
case mcp3208:
|
||||
return (adc->rx_buf[0] << 4 | adc->rx_buf[1] >> 4);
|
||||
*val = (adc->rx_buf[0] << 4 | adc->rx_buf[1] >> 4);
|
||||
return 0;
|
||||
case mcp3301:
|
||||
return sign_extend32((adc->rx_buf[0] & 0x1f) << 8 | adc->rx_buf[1], 12);
|
||||
*val = sign_extend32((adc->rx_buf[0] & 0x1f) << 8
|
||||
| adc->rx_buf[1], 12);
|
||||
return 0;
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
@@ -150,12 +158,10 @@ static int mcp320x_read_raw(struct iio_dev *indio_dev,
|
||||
switch (mask) {
|
||||
case IIO_CHAN_INFO_RAW:
|
||||
ret = mcp320x_adc_conversion(adc, channel->address,
|
||||
channel->differential, device_index);
|
||||
|
||||
channel->differential, device_index, val);
|
||||
if (ret < 0)
|
||||
goto out;
|
||||
|
||||
*val = ret;
|
||||
ret = IIO_VAL_INT;
|
||||
break;
|
||||
|
||||
@@ -312,6 +318,7 @@ static int mcp320x_probe(struct spi_device *spi)
|
||||
indio_dev->name = spi_get_device_id(spi)->name;
|
||||
indio_dev->modes = INDIO_DIRECT_MODE;
|
||||
indio_dev->info = &mcp320x_info;
|
||||
spi_set_drvdata(spi, indio_dev);
|
||||
|
||||
chip_info = &mcp320x_chip_infos[spi_get_device_id(spi)->driver_data];
|
||||
indio_dev->channels = chip_info->channels;
|
||||
|
||||
@@ -866,8 +866,10 @@ static int twl4030_madc_probe(struct platform_device *pdev)
|
||||
|
||||
/* Enable 3v1 bias regulator for MADC[3:6] */
|
||||
madc->usb3v1 = devm_regulator_get(madc->dev, "vusb3v1");
|
||||
if (IS_ERR(madc->usb3v1))
|
||||
return -ENODEV;
|
||||
if (IS_ERR(madc->usb3v1)) {
|
||||
ret = -ENODEV;
|
||||
goto err_i2c;
|
||||
}
|
||||
|
||||
ret = regulator_enable(madc->usb3v1);
|
||||
if (ret)
|
||||
@@ -876,11 +878,13 @@ static int twl4030_madc_probe(struct platform_device *pdev)
|
||||
ret = iio_device_register(iio_dev);
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "could not register iio device\n");
|
||||
goto err_i2c;
|
||||
goto err_usb3v1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
err_usb3v1:
|
||||
regulator_disable(madc->usb3v1);
|
||||
err_i2c:
|
||||
twl4030_madc_set_current_generator(madc, 0, 0);
|
||||
err_current_generator:
|
||||
|
||||
@@ -306,8 +306,10 @@ static ssize_t iio_debugfs_read_reg(struct file *file, char __user *userbuf,
|
||||
ret = indio_dev->info->debugfs_reg_access(indio_dev,
|
||||
indio_dev->cached_reg_addr,
|
||||
0, &val);
|
||||
if (ret)
|
||||
if (ret) {
|
||||
dev_err(indio_dev->dev.parent, "%s: read failed\n", __func__);
|
||||
return ret;
|
||||
}
|
||||
|
||||
len = snprintf(buf, sizeof(buf), "0x%X\n", val);
|
||||
|
||||
|
||||
@@ -558,7 +558,7 @@ static int bmp280_chip_config(struct bmp280_data *data)
|
||||
u8 osrs = BMP280_OSRS_TEMP_X(data->oversampling_temp + 1) |
|
||||
BMP280_OSRS_PRESS_X(data->oversampling_press + 1);
|
||||
|
||||
ret = regmap_update_bits(data->regmap, BMP280_REG_CTRL_MEAS,
|
||||
ret = regmap_write_bits(data->regmap, BMP280_REG_CTRL_MEAS,
|
||||
BMP280_OSRS_TEMP_MASK |
|
||||
BMP280_OSRS_PRESS_MASK |
|
||||
BMP280_MODE_MASK,
|
||||
|
||||
@@ -7080,7 +7080,7 @@ static void qib_7322_txchk_change(struct qib_devdata *dd, u32 start,
|
||||
unsigned long flags;
|
||||
|
||||
while (wait) {
|
||||
unsigned long shadow;
|
||||
unsigned long shadow = 0;
|
||||
int cstart, previ = -1;
|
||||
|
||||
/*
|
||||
|
||||
@@ -274,6 +274,7 @@ static u32 alloc_index(struct rxe_pool *pool)
|
||||
if (index >= range)
|
||||
index = find_first_zero_bit(pool->table, range);
|
||||
|
||||
WARN_ON_ONCE(index >= range);
|
||||
set_bit(index, pool->table);
|
||||
pool->last = index;
|
||||
return index + pool->min_index;
|
||||
|
||||
@@ -418,7 +418,7 @@ static enum resp_states check_length(struct rxe_qp *qp,
|
||||
static enum resp_states check_rkey(struct rxe_qp *qp,
|
||||
struct rxe_pkt_info *pkt)
|
||||
{
|
||||
struct rxe_mem *mem;
|
||||
struct rxe_mem *mem = NULL;
|
||||
u64 va;
|
||||
u32 rkey;
|
||||
u32 resid;
|
||||
@@ -452,38 +452,38 @@ static enum resp_states check_rkey(struct rxe_qp *qp,
|
||||
mem = lookup_mem(qp->pd, access, rkey, lookup_remote);
|
||||
if (!mem) {
|
||||
state = RESPST_ERR_RKEY_VIOLATION;
|
||||
goto err1;
|
||||
goto err;
|
||||
}
|
||||
|
||||
if (unlikely(mem->state == RXE_MEM_STATE_FREE)) {
|
||||
state = RESPST_ERR_RKEY_VIOLATION;
|
||||
goto err1;
|
||||
goto err;
|
||||
}
|
||||
|
||||
if (mem_check_range(mem, va, resid)) {
|
||||
state = RESPST_ERR_RKEY_VIOLATION;
|
||||
goto err2;
|
||||
goto err;
|
||||
}
|
||||
|
||||
if (pkt->mask & RXE_WRITE_MASK) {
|
||||
if (resid > mtu) {
|
||||
if (pktlen != mtu || bth_pad(pkt)) {
|
||||
state = RESPST_ERR_LENGTH;
|
||||
goto err2;
|
||||
goto err;
|
||||
}
|
||||
|
||||
qp->resp.resid = mtu;
|
||||
} else {
|
||||
if (pktlen != resid) {
|
||||
state = RESPST_ERR_LENGTH;
|
||||
goto err2;
|
||||
goto err;
|
||||
}
|
||||
if ((bth_pad(pkt) != (0x3 & (-resid)))) {
|
||||
/* This case may not be exactly that
|
||||
* but nothing else fits.
|
||||
*/
|
||||
state = RESPST_ERR_LENGTH;
|
||||
goto err2;
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -493,9 +493,9 @@ static enum resp_states check_rkey(struct rxe_qp *qp,
|
||||
qp->resp.mr = mem;
|
||||
return RESPST_EXECUTE;
|
||||
|
||||
err2:
|
||||
rxe_drop_ref(mem);
|
||||
err1:
|
||||
err:
|
||||
if (mem)
|
||||
rxe_drop_ref(mem);
|
||||
return state;
|
||||
}
|
||||
|
||||
|
||||
@@ -1302,7 +1302,7 @@ static void __ipoib_reap_neigh(struct ipoib_dev_priv *priv)
|
||||
rcu_dereference_protected(neigh->hnext,
|
||||
lockdep_is_held(&priv->lock)));
|
||||
/* remove from path/mc list */
|
||||
list_del(&neigh->list);
|
||||
list_del_init(&neigh->list);
|
||||
call_rcu(&neigh->rcu, ipoib_neigh_reclaim);
|
||||
} else {
|
||||
np = &neigh->hnext;
|
||||
@@ -1466,7 +1466,7 @@ void ipoib_neigh_free(struct ipoib_neigh *neigh)
|
||||
rcu_dereference_protected(neigh->hnext,
|
||||
lockdep_is_held(&priv->lock)));
|
||||
/* remove from parent list */
|
||||
list_del(&neigh->list);
|
||||
list_del_init(&neigh->list);
|
||||
call_rcu(&neigh->rcu, ipoib_neigh_reclaim);
|
||||
return;
|
||||
} else {
|
||||
@@ -1551,7 +1551,7 @@ void ipoib_del_neighs_by_gid(struct net_device *dev, u8 *gid)
|
||||
rcu_dereference_protected(neigh->hnext,
|
||||
lockdep_is_held(&priv->lock)));
|
||||
/* remove from parent list */
|
||||
list_del(&neigh->list);
|
||||
list_del_init(&neigh->list);
|
||||
call_rcu(&neigh->rcu, ipoib_neigh_reclaim);
|
||||
} else {
|
||||
np = &neigh->hnext;
|
||||
@@ -1593,7 +1593,7 @@ static void ipoib_flush_neighs(struct ipoib_dev_priv *priv)
|
||||
rcu_dereference_protected(neigh->hnext,
|
||||
lockdep_is_held(&priv->lock)));
|
||||
/* remove from path/mc list */
|
||||
list_del(&neigh->list);
|
||||
list_del_init(&neigh->list);
|
||||
call_rcu(&neigh->rcu, ipoib_neigh_reclaim);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -165,11 +165,11 @@ int ipoib_vlan_add(struct net_device *pdev, unsigned short pkey)
|
||||
out:
|
||||
up_write(&ppriv->vlan_rwsem);
|
||||
|
||||
rtnl_unlock();
|
||||
|
||||
if (result)
|
||||
free_netdev(priv->dev);
|
||||
|
||||
rtnl_unlock();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -193,7 +193,6 @@ int ipoib_vlan_delete(struct net_device *pdev, unsigned short pkey)
|
||||
list_for_each_entry_safe(priv, tpriv, &ppriv->child_intfs, list) {
|
||||
if (priv->pkey == pkey &&
|
||||
priv->child_type == IPOIB_LEGACY_CHILD) {
|
||||
unregister_netdevice(priv->dev);
|
||||
list_del(&priv->list);
|
||||
dev = priv->dev;
|
||||
break;
|
||||
@@ -201,6 +200,11 @@ int ipoib_vlan_delete(struct net_device *pdev, unsigned short pkey)
|
||||
}
|
||||
up_write(&ppriv->vlan_rwsem);
|
||||
|
||||
if (dev) {
|
||||
ipoib_dbg(ppriv, "delete child vlan %s\n", dev->name);
|
||||
unregister_netdevice(dev);
|
||||
}
|
||||
|
||||
rtnl_unlock();
|
||||
|
||||
if (dev) {
|
||||
|
||||
@@ -542,7 +542,10 @@ static void sysmmu_tlb_invalidate_flpdcache(struct sysmmu_drvdata *data,
|
||||
spin_lock_irqsave(&data->lock, flags);
|
||||
if (is_sysmmu_active(data) && data->version >= MAKE_MMU_VER(3, 3)) {
|
||||
clk_enable(data->clk_master);
|
||||
__sysmmu_tlb_invalidate_entry(data, iova, 1);
|
||||
if (sysmmu_block(data)) {
|
||||
__sysmmu_tlb_invalidate_entry(data, iova, 1);
|
||||
sysmmu_unblock(data);
|
||||
}
|
||||
clk_disable(data->clk_master);
|
||||
}
|
||||
spin_unlock_irqrestore(&data->lock, flags);
|
||||
|
||||
@@ -468,8 +468,12 @@ static int __arm_lpae_map(struct arm_lpae_io_pgtable *data, unsigned long iova,
|
||||
if (cfg->quirks & IO_PGTABLE_QUIRK_ARM_NS)
|
||||
pte |= ARM_LPAE_PTE_NSTABLE;
|
||||
__arm_lpae_set_pte(ptep, pte, cfg);
|
||||
} else {
|
||||
} else if (!iopte_leaf(pte, lvl)) {
|
||||
cptep = iopte_deref(pte, data);
|
||||
} else {
|
||||
/* We require an unmap first */
|
||||
WARN_ON(!selftest_running);
|
||||
return -EEXIST;
|
||||
}
|
||||
|
||||
/* Rinse, repeat */
|
||||
|
||||
@@ -828,7 +828,6 @@ isdn_ppp_write(int min, struct file *file, const char __user *buf, int count)
|
||||
isdn_net_local *lp;
|
||||
struct ippp_struct *is;
|
||||
int proto;
|
||||
unsigned char protobuf[4];
|
||||
|
||||
is = file->private_data;
|
||||
|
||||
@@ -842,24 +841,28 @@ isdn_ppp_write(int min, struct file *file, const char __user *buf, int count)
|
||||
if (!lp)
|
||||
printk(KERN_DEBUG "isdn_ppp_write: lp == NULL\n");
|
||||
else {
|
||||
/*
|
||||
* Don't reset huptimer for
|
||||
* LCP packets. (Echo requests).
|
||||
*/
|
||||
if (copy_from_user(protobuf, buf, 4))
|
||||
return -EFAULT;
|
||||
proto = PPP_PROTOCOL(protobuf);
|
||||
if (proto != PPP_LCP)
|
||||
lp->huptimer = 0;
|
||||
if (lp->isdn_device < 0 || lp->isdn_channel < 0) {
|
||||
unsigned char protobuf[4];
|
||||
/*
|
||||
* Don't reset huptimer for
|
||||
* LCP packets. (Echo requests).
|
||||
*/
|
||||
if (copy_from_user(protobuf, buf, 4))
|
||||
return -EFAULT;
|
||||
|
||||
proto = PPP_PROTOCOL(protobuf);
|
||||
if (proto != PPP_LCP)
|
||||
lp->huptimer = 0;
|
||||
|
||||
if (lp->isdn_device < 0 || lp->isdn_channel < 0)
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ((dev->drv[lp->isdn_device]->flags & DRV_FLAG_RUNNING) &&
|
||||
lp->dialstate == 0 &&
|
||||
(lp->flags & ISDN_NET_CONNECTED)) {
|
||||
unsigned short hl;
|
||||
struct sk_buff *skb;
|
||||
unsigned char *cpy_buf;
|
||||
/*
|
||||
* we need to reserve enough space in front of
|
||||
* sk_buff. old call to dev_alloc_skb only reserved
|
||||
@@ -872,11 +875,21 @@ isdn_ppp_write(int min, struct file *file, const char __user *buf, int count)
|
||||
return count;
|
||||
}
|
||||
skb_reserve(skb, hl);
|
||||
if (copy_from_user(skb_put(skb, count), buf, count))
|
||||
cpy_buf = skb_put(skb, count);
|
||||
if (copy_from_user(cpy_buf, buf, count))
|
||||
{
|
||||
kfree_skb(skb);
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
/*
|
||||
* Don't reset huptimer for
|
||||
* LCP packets. (Echo requests).
|
||||
*/
|
||||
proto = PPP_PROTOCOL(cpy_buf);
|
||||
if (proto != PPP_LCP)
|
||||
lp->huptimer = 0;
|
||||
|
||||
if (is->debug & 0x40) {
|
||||
printk(KERN_DEBUG "ppp xmit: len %d\n", (int) skb->len);
|
||||
isdn_ppp_frame_log("xmit", skb->data, skb->len, 32, is->unit, lp->ppp_slot);
|
||||
|
||||
@@ -1407,11 +1407,24 @@ retry_write:
|
||||
mbio->bi_private = r10_bio;
|
||||
|
||||
atomic_inc(&r10_bio->remaining);
|
||||
|
||||
cb = blk_check_plugged(raid10_unplug, mddev,
|
||||
sizeof(*plug));
|
||||
if (cb)
|
||||
plug = container_of(cb, struct raid10_plug_cb,
|
||||
cb);
|
||||
else
|
||||
plug = NULL;
|
||||
spin_lock_irqsave(&conf->device_lock, flags);
|
||||
bio_list_add(&conf->pending_bio_list, mbio);
|
||||
conf->pending_count++;
|
||||
if (plug) {
|
||||
bio_list_add(&plug->pending, mbio);
|
||||
plug->pending_cnt++;
|
||||
} else {
|
||||
bio_list_add(&conf->pending_bio_list, mbio);
|
||||
conf->pending_count++;
|
||||
}
|
||||
spin_unlock_irqrestore(&conf->device_lock, flags);
|
||||
if (!mddev_check_plugged(mddev))
|
||||
if (!plug)
|
||||
md_wakeup_thread(mddev->thread);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,11 +56,11 @@
|
||||
by Nathan Laredo <laredo@gnu.org> */
|
||||
|
||||
int av7110_debiwrite(struct av7110 *av7110, u32 config,
|
||||
int addr, u32 val, int count)
|
||||
int addr, u32 val, unsigned int count)
|
||||
{
|
||||
struct saa7146_dev *dev = av7110->dev;
|
||||
|
||||
if (count <= 0 || count > 32764) {
|
||||
if (count > 32764) {
|
||||
printk("%s: invalid count %d\n", __func__, count);
|
||||
return -1;
|
||||
}
|
||||
@@ -78,12 +78,12 @@ int av7110_debiwrite(struct av7110 *av7110, u32 config,
|
||||
return 0;
|
||||
}
|
||||
|
||||
u32 av7110_debiread(struct av7110 *av7110, u32 config, int addr, int count)
|
||||
u32 av7110_debiread(struct av7110 *av7110, u32 config, int addr, unsigned int count)
|
||||
{
|
||||
struct saa7146_dev *dev = av7110->dev;
|
||||
u32 result = 0;
|
||||
|
||||
if (count > 32764 || count <= 0) {
|
||||
if (count > 32764) {
|
||||
printk("%s: invalid count %d\n", __func__, count);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -377,14 +377,14 @@ extern int av7110_fw_request(struct av7110 *av7110, u16 *request_buf,
|
||||
|
||||
/* DEBI (saa7146 data extension bus interface) access */
|
||||
extern int av7110_debiwrite(struct av7110 *av7110, u32 config,
|
||||
int addr, u32 val, int count);
|
||||
int addr, u32 val, unsigned int count);
|
||||
extern u32 av7110_debiread(struct av7110 *av7110, u32 config,
|
||||
int addr, int count);
|
||||
int addr, unsigned int count);
|
||||
|
||||
|
||||
/* DEBI during interrupt */
|
||||
/* single word writes */
|
||||
static inline void iwdebi(struct av7110 *av7110, u32 config, int addr, u32 val, int count)
|
||||
static inline void iwdebi(struct av7110 *av7110, u32 config, int addr, u32 val, unsigned int count)
|
||||
{
|
||||
av7110_debiwrite(av7110, config, addr, val, count);
|
||||
}
|
||||
@@ -397,7 +397,7 @@ static inline void mwdebi(struct av7110 *av7110, u32 config, int addr,
|
||||
av7110_debiwrite(av7110, config, addr, 0, count);
|
||||
}
|
||||
|
||||
static inline u32 irdebi(struct av7110 *av7110, u32 config, int addr, u32 val, int count)
|
||||
static inline u32 irdebi(struct av7110 *av7110, u32 config, int addr, u32 val, unsigned int count)
|
||||
{
|
||||
u32 res;
|
||||
|
||||
@@ -408,7 +408,7 @@ static inline u32 irdebi(struct av7110 *av7110, u32 config, int addr, u32 val, i
|
||||
}
|
||||
|
||||
/* DEBI outside interrupts, only for count <= 4! */
|
||||
static inline void wdebi(struct av7110 *av7110, u32 config, int addr, u32 val, int count)
|
||||
static inline void wdebi(struct av7110 *av7110, u32 config, int addr, u32 val, unsigned int count)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
||||
@@ -417,7 +417,7 @@ static inline void wdebi(struct av7110 *av7110, u32 config, int addr, u32 val, i
|
||||
spin_unlock_irqrestore(&av7110->debilock, flags);
|
||||
}
|
||||
|
||||
static inline u32 rdebi(struct av7110 *av7110, u32 config, int addr, u32 val, int count)
|
||||
static inline u32 rdebi(struct av7110 *av7110, u32 config, int addr, u32 val, unsigned int count)
|
||||
{
|
||||
unsigned long flags;
|
||||
u32 res;
|
||||
|
||||
@@ -849,9 +849,7 @@ int gsc_prepare_addr(struct gsc_ctx *ctx, struct vb2_buffer *vb,
|
||||
|
||||
if ((frame->fmt->pixelformat == V4L2_PIX_FMT_VYUY) ||
|
||||
(frame->fmt->pixelformat == V4L2_PIX_FMT_YVYU) ||
|
||||
(frame->fmt->pixelformat == V4L2_PIX_FMT_NV61) ||
|
||||
(frame->fmt->pixelformat == V4L2_PIX_FMT_YVU420) ||
|
||||
(frame->fmt->pixelformat == V4L2_PIX_FMT_NV21) ||
|
||||
(frame->fmt->pixelformat == V4L2_PIX_FMT_YVU420M))
|
||||
swap(addr->cb, addr->cr);
|
||||
|
||||
|
||||
@@ -535,7 +535,9 @@ static void __exit lkdtm_module_exit(void)
|
||||
/* Handle test-specific clean-up. */
|
||||
lkdtm_usercopy_exit();
|
||||
|
||||
unregister_jprobe(lkdtm_jprobe);
|
||||
if (lkdtm_jprobe != NULL)
|
||||
unregister_jprobe(lkdtm_jprobe);
|
||||
|
||||
pr_info("Crash point unregistered\n");
|
||||
}
|
||||
|
||||
|
||||
@@ -1413,6 +1413,23 @@ out_err:
|
||||
return err;
|
||||
}
|
||||
|
||||
static void mmc_select_driver_type(struct mmc_card *card)
|
||||
{
|
||||
int card_drv_type, drive_strength, drv_type;
|
||||
|
||||
card_drv_type = card->ext_csd.raw_driver_strength |
|
||||
mmc_driver_type_mask(0);
|
||||
|
||||
drive_strength = mmc_select_drive_strength(card,
|
||||
card->ext_csd.hs200_max_dtr,
|
||||
card_drv_type, &drv_type);
|
||||
|
||||
card->drive_strength = drive_strength;
|
||||
|
||||
if (drv_type)
|
||||
mmc_set_driver_type(card->host, drv_type);
|
||||
}
|
||||
|
||||
static int mmc_select_hs400es(struct mmc_card *card)
|
||||
{
|
||||
struct mmc_host *host = card->host;
|
||||
@@ -1461,6 +1478,8 @@ static int mmc_select_hs400es(struct mmc_card *card)
|
||||
goto out_err;
|
||||
}
|
||||
|
||||
mmc_select_driver_type(card);
|
||||
|
||||
/* Switch card to HS400 */
|
||||
val = EXT_CSD_TIMING_HS400 |
|
||||
card->drive_strength << EXT_CSD_DRV_STR_SHIFT;
|
||||
@@ -1494,23 +1513,6 @@ out_err:
|
||||
return err;
|
||||
}
|
||||
|
||||
static void mmc_select_driver_type(struct mmc_card *card)
|
||||
{
|
||||
int card_drv_type, drive_strength, drv_type;
|
||||
|
||||
card_drv_type = card->ext_csd.raw_driver_strength |
|
||||
mmc_driver_type_mask(0);
|
||||
|
||||
drive_strength = mmc_select_drive_strength(card,
|
||||
card->ext_csd.hs200_max_dtr,
|
||||
card_drv_type, &drv_type);
|
||||
|
||||
card->drive_strength = drive_strength;
|
||||
|
||||
if (drv_type)
|
||||
mmc_set_driver_type(card->host, drv_type);
|
||||
}
|
||||
|
||||
/*
|
||||
* For device supporting HS200 mode, the following sequence
|
||||
* should be done before executing the tuning process.
|
||||
|
||||
@@ -277,7 +277,7 @@ static void sdio_release_func(struct device *dev)
|
||||
sdio_free_func_cis(func);
|
||||
|
||||
kfree(func->info);
|
||||
|
||||
kfree(func->tmpbuf);
|
||||
kfree(func);
|
||||
}
|
||||
|
||||
@@ -292,6 +292,16 @@ struct sdio_func *sdio_alloc_func(struct mmc_card *card)
|
||||
if (!func)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
/*
|
||||
* allocate buffer separately to make sure it's properly aligned for
|
||||
* DMA usage (incl. 64 bit DMA)
|
||||
*/
|
||||
func->tmpbuf = kmalloc(4, GFP_KERNEL);
|
||||
if (!func->tmpbuf) {
|
||||
kfree(func);
|
||||
return ERR_PTR(-ENOMEM);
|
||||
}
|
||||
|
||||
func->card = card;
|
||||
|
||||
device_initialize(&func->dev);
|
||||
|
||||
@@ -326,6 +326,7 @@ static void b53_get_vlan_entry(struct b53_device *dev, u16 vid,
|
||||
|
||||
static void b53_set_forwarding(struct b53_device *dev, int enable)
|
||||
{
|
||||
struct dsa_switch *ds = dev->ds;
|
||||
u8 mgmt;
|
||||
|
||||
b53_read8(dev, B53_CTRL_PAGE, B53_SWITCH_MODE, &mgmt);
|
||||
@@ -336,6 +337,15 @@ static void b53_set_forwarding(struct b53_device *dev, int enable)
|
||||
mgmt &= ~SM_SW_FWD_EN;
|
||||
|
||||
b53_write8(dev, B53_CTRL_PAGE, B53_SWITCH_MODE, mgmt);
|
||||
|
||||
/* Include IMP port in dumb forwarding mode when no tagging protocol is
|
||||
* set
|
||||
*/
|
||||
if (ds->ops->get_tag_protocol(ds) == DSA_TAG_PROTO_NONE) {
|
||||
b53_read8(dev, B53_CTRL_PAGE, B53_SWITCH_CTRL, &mgmt);
|
||||
mgmt |= B53_MII_DUMB_FWDG_EN;
|
||||
b53_write8(dev, B53_CTRL_PAGE, B53_SWITCH_CTRL, mgmt);
|
||||
}
|
||||
}
|
||||
|
||||
static void b53_enable_vlan(struct b53_device *dev, bool enable)
|
||||
|
||||
@@ -104,6 +104,10 @@
|
||||
#define B53_UC_FWD_EN BIT(6)
|
||||
#define B53_MC_FWD_EN BIT(7)
|
||||
|
||||
/* Switch control (8 bit) */
|
||||
#define B53_SWITCH_CTRL 0x22
|
||||
#define B53_MII_DUMB_FWDG_EN BIT(6)
|
||||
|
||||
/* (16 bit) */
|
||||
#define B53_UC_FLOOD_MASK 0x32
|
||||
#define B53_MC_FLOOD_MASK 0x34
|
||||
|
||||
@@ -402,7 +402,7 @@ static int mal_poll(struct napi_struct *napi, int budget)
|
||||
unsigned long flags;
|
||||
|
||||
MAL_DBG2(mal, "poll(%d)" NL, budget);
|
||||
again:
|
||||
|
||||
/* Process TX skbs */
|
||||
list_for_each(l, &mal->poll_list) {
|
||||
struct mal_commac *mc =
|
||||
@@ -451,7 +451,6 @@ static int mal_poll(struct napi_struct *napi, int budget)
|
||||
spin_lock_irqsave(&mal->lock, flags);
|
||||
mal_disable_eob_irq(mal);
|
||||
spin_unlock_irqrestore(&mal->lock, flags);
|
||||
goto again;
|
||||
}
|
||||
mc->ops->poll_tx(mc->dev);
|
||||
}
|
||||
|
||||
@@ -1253,6 +1253,7 @@ static void release_sub_crqs(struct ibmvnic_adapter *adapter)
|
||||
release_sub_crq_queue(adapter,
|
||||
adapter->tx_scrq[i]);
|
||||
}
|
||||
kfree(adapter->tx_scrq);
|
||||
adapter->tx_scrq = NULL;
|
||||
}
|
||||
|
||||
@@ -1265,6 +1266,7 @@ static void release_sub_crqs(struct ibmvnic_adapter *adapter)
|
||||
release_sub_crq_queue(adapter,
|
||||
adapter->rx_scrq[i]);
|
||||
}
|
||||
kfree(adapter->rx_scrq);
|
||||
adapter->rx_scrq = NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -7882,6 +7882,11 @@ static pci_ers_result_t igb_io_slot_reset(struct pci_dev *pdev)
|
||||
pci_enable_wake(pdev, PCI_D3hot, 0);
|
||||
pci_enable_wake(pdev, PCI_D3cold, 0);
|
||||
|
||||
/* In case of PCI error, adapter lose its HW address
|
||||
* so we should re-assign it here.
|
||||
*/
|
||||
hw->hw_addr = adapter->io_addr;
|
||||
|
||||
igb_reset(adapter);
|
||||
wr32(E1000_WUS, ~0);
|
||||
result = PCI_ERS_RESULT_RECOVERED;
|
||||
|
||||
@@ -249,15 +249,14 @@ static void mlxsw_sp_span_entry_destroy(struct mlxsw_sp *mlxsw_sp,
|
||||
}
|
||||
|
||||
static struct mlxsw_sp_span_entry *
|
||||
mlxsw_sp_span_entry_find(struct mlxsw_sp_port *port)
|
||||
mlxsw_sp_span_entry_find(struct mlxsw_sp *mlxsw_sp, u8 local_port)
|
||||
{
|
||||
struct mlxsw_sp *mlxsw_sp = port->mlxsw_sp;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < mlxsw_sp->span.entries_count; i++) {
|
||||
struct mlxsw_sp_span_entry *curr = &mlxsw_sp->span.entries[i];
|
||||
|
||||
if (curr->used && curr->local_port == port->local_port)
|
||||
if (curr->used && curr->local_port == local_port)
|
||||
return curr;
|
||||
}
|
||||
return NULL;
|
||||
@@ -268,7 +267,8 @@ static struct mlxsw_sp_span_entry
|
||||
{
|
||||
struct mlxsw_sp_span_entry *span_entry;
|
||||
|
||||
span_entry = mlxsw_sp_span_entry_find(port);
|
||||
span_entry = mlxsw_sp_span_entry_find(port->mlxsw_sp,
|
||||
port->local_port);
|
||||
if (span_entry) {
|
||||
/* Already exists, just take a reference */
|
||||
span_entry->ref_count++;
|
||||
@@ -453,12 +453,13 @@ err_port_bind:
|
||||
}
|
||||
|
||||
static void mlxsw_sp_span_mirror_remove(struct mlxsw_sp_port *from,
|
||||
struct mlxsw_sp_port *to,
|
||||
u8 destination_port,
|
||||
enum mlxsw_sp_span_type type)
|
||||
{
|
||||
struct mlxsw_sp_span_entry *span_entry;
|
||||
|
||||
span_entry = mlxsw_sp_span_entry_find(to);
|
||||
span_entry = mlxsw_sp_span_entry_find(from->mlxsw_sp,
|
||||
destination_port);
|
||||
if (!span_entry) {
|
||||
netdev_err(from->dev, "no span entry found\n");
|
||||
return;
|
||||
@@ -1255,10 +1256,8 @@ static int mlxsw_sp_port_add_cls_matchall(struct mlxsw_sp_port *mlxsw_sp_port,
|
||||
static void mlxsw_sp_port_del_cls_matchall(struct mlxsw_sp_port *mlxsw_sp_port,
|
||||
struct tc_cls_matchall_offload *cls)
|
||||
{
|
||||
struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp;
|
||||
struct mlxsw_sp_port_mall_tc_entry *mall_tc_entry;
|
||||
enum mlxsw_sp_span_type span_type;
|
||||
struct mlxsw_sp_port *to_port;
|
||||
|
||||
mall_tc_entry = mlxsw_sp_port_mirror_entry_find(mlxsw_sp_port,
|
||||
cls->cookie);
|
||||
@@ -1269,11 +1268,12 @@ static void mlxsw_sp_port_del_cls_matchall(struct mlxsw_sp_port *mlxsw_sp_port,
|
||||
|
||||
switch (mall_tc_entry->type) {
|
||||
case MLXSW_SP_PORT_MALL_MIRROR:
|
||||
to_port = mlxsw_sp->ports[mall_tc_entry->mirror.to_local_port];
|
||||
span_type = mall_tc_entry->mirror.ingress ?
|
||||
MLXSW_SP_SPAN_INGRESS : MLXSW_SP_SPAN_EGRESS;
|
||||
|
||||
mlxsw_sp_span_mirror_remove(mlxsw_sp_port, to_port, span_type);
|
||||
mlxsw_sp_span_mirror_remove(mlxsw_sp_port,
|
||||
mall_tc_entry->mirror.to_local_port,
|
||||
span_type);
|
||||
break;
|
||||
default:
|
||||
WARN_ON(1);
|
||||
|
||||
@@ -1222,7 +1222,7 @@ static struct qed_dcbx_get *qed_dcbnl_get_dcbx(struct qed_hwfn *hwfn,
|
||||
{
|
||||
struct qed_dcbx_get *dcbx_info;
|
||||
|
||||
dcbx_info = kzalloc(sizeof(*dcbx_info), GFP_KERNEL);
|
||||
dcbx_info = kmalloc(sizeof(*dcbx_info), GFP_ATOMIC);
|
||||
if (!dcbx_info)
|
||||
return NULL;
|
||||
|
||||
|
||||
@@ -932,7 +932,8 @@ static void emac_mac_rx_descs_refill(struct emac_adapter *adpt,
|
||||
|
||||
curr_rxbuf->dma_addr =
|
||||
dma_map_single(adpt->netdev->dev.parent, skb->data,
|
||||
curr_rxbuf->length, DMA_FROM_DEVICE);
|
||||
adpt->rxbuf_size, DMA_FROM_DEVICE);
|
||||
|
||||
ret = dma_mapping_error(adpt->netdev->dev.parent,
|
||||
curr_rxbuf->dma_addr);
|
||||
if (ret) {
|
||||
|
||||
@@ -339,7 +339,7 @@ enum FELIC_MODE_BIT {
|
||||
ECMR_DPAD = 0x00200000, ECMR_RZPF = 0x00100000,
|
||||
ECMR_ZPF = 0x00080000, ECMR_PFR = 0x00040000, ECMR_RXF = 0x00020000,
|
||||
ECMR_TXF = 0x00010000, ECMR_MCT = 0x00002000, ECMR_PRCEF = 0x00001000,
|
||||
ECMR_PMDE = 0x00000200, ECMR_RE = 0x00000040, ECMR_TE = 0x00000020,
|
||||
ECMR_MPDE = 0x00000200, ECMR_RE = 0x00000040, ECMR_TE = 0x00000020,
|
||||
ECMR_RTM = 0x00000010, ECMR_ILB = 0x00000008, ECMR_ELB = 0x00000004,
|
||||
ECMR_DM = 0x00000002, ECMR_PRM = 0x00000001,
|
||||
};
|
||||
|
||||
@@ -139,40 +139,52 @@ rocker_tlv_start(struct rocker_desc_info *desc_info)
|
||||
int rocker_tlv_put(struct rocker_desc_info *desc_info,
|
||||
int attrtype, int attrlen, const void *data);
|
||||
|
||||
static inline int rocker_tlv_put_u8(struct rocker_desc_info *desc_info,
|
||||
int attrtype, u8 value)
|
||||
static inline int
|
||||
rocker_tlv_put_u8(struct rocker_desc_info *desc_info, int attrtype, u8 value)
|
||||
{
|
||||
return rocker_tlv_put(desc_info, attrtype, sizeof(u8), &value);
|
||||
u8 tmp = value; /* work around GCC PR81715 */
|
||||
|
||||
return rocker_tlv_put(desc_info, attrtype, sizeof(u8), &tmp);
|
||||
}
|
||||
|
||||
static inline int rocker_tlv_put_u16(struct rocker_desc_info *desc_info,
|
||||
int attrtype, u16 value)
|
||||
static inline int
|
||||
rocker_tlv_put_u16(struct rocker_desc_info *desc_info, int attrtype, u16 value)
|
||||
{
|
||||
return rocker_tlv_put(desc_info, attrtype, sizeof(u16), &value);
|
||||
u16 tmp = value;
|
||||
|
||||
return rocker_tlv_put(desc_info, attrtype, sizeof(u16), &tmp);
|
||||
}
|
||||
|
||||
static inline int rocker_tlv_put_be16(struct rocker_desc_info *desc_info,
|
||||
int attrtype, __be16 value)
|
||||
static inline int
|
||||
rocker_tlv_put_be16(struct rocker_desc_info *desc_info, int attrtype, __be16 value)
|
||||
{
|
||||
return rocker_tlv_put(desc_info, attrtype, sizeof(__be16), &value);
|
||||
__be16 tmp = value;
|
||||
|
||||
return rocker_tlv_put(desc_info, attrtype, sizeof(__be16), &tmp);
|
||||
}
|
||||
|
||||
static inline int rocker_tlv_put_u32(struct rocker_desc_info *desc_info,
|
||||
int attrtype, u32 value)
|
||||
static inline int
|
||||
rocker_tlv_put_u32(struct rocker_desc_info *desc_info, int attrtype, u32 value)
|
||||
{
|
||||
return rocker_tlv_put(desc_info, attrtype, sizeof(u32), &value);
|
||||
u32 tmp = value;
|
||||
|
||||
return rocker_tlv_put(desc_info, attrtype, sizeof(u32), &tmp);
|
||||
}
|
||||
|
||||
static inline int rocker_tlv_put_be32(struct rocker_desc_info *desc_info,
|
||||
int attrtype, __be32 value)
|
||||
static inline int
|
||||
rocker_tlv_put_be32(struct rocker_desc_info *desc_info, int attrtype, __be32 value)
|
||||
{
|
||||
return rocker_tlv_put(desc_info, attrtype, sizeof(__be32), &value);
|
||||
__be32 tmp = value;
|
||||
|
||||
return rocker_tlv_put(desc_info, attrtype, sizeof(__be32), &tmp);
|
||||
}
|
||||
|
||||
static inline int rocker_tlv_put_u64(struct rocker_desc_info *desc_info,
|
||||
int attrtype, u64 value)
|
||||
static inline int
|
||||
rocker_tlv_put_u64(struct rocker_desc_info *desc_info, int attrtype, u64 value)
|
||||
{
|
||||
return rocker_tlv_put(desc_info, attrtype, sizeof(u64), &value);
|
||||
u64 tmp = value;
|
||||
|
||||
return rocker_tlv_put(desc_info, attrtype, sizeof(u64), &tmp);
|
||||
}
|
||||
|
||||
static inline struct rocker_tlv *
|
||||
|
||||
@@ -197,11 +197,15 @@ static int efx_ef10_init_datapath_caps(struct efx_nic *efx)
|
||||
nic_data->datapath_caps =
|
||||
MCDI_DWORD(outbuf, GET_CAPABILITIES_OUT_FLAGS1);
|
||||
|
||||
if (outlen >= MC_CMD_GET_CAPABILITIES_V2_OUT_LEN)
|
||||
if (outlen >= MC_CMD_GET_CAPABILITIES_V2_OUT_LEN) {
|
||||
nic_data->datapath_caps2 = MCDI_DWORD(outbuf,
|
||||
GET_CAPABILITIES_V2_OUT_FLAGS2);
|
||||
else
|
||||
nic_data->piobuf_size = MCDI_WORD(outbuf,
|
||||
GET_CAPABILITIES_V2_OUT_SIZE_PIO_BUFF);
|
||||
} else {
|
||||
nic_data->datapath_caps2 = 0;
|
||||
nic_data->piobuf_size = ER_DZ_TX_PIOBUF_SIZE;
|
||||
}
|
||||
|
||||
/* record the DPCPU firmware IDs to determine VEB vswitching support.
|
||||
*/
|
||||
@@ -825,8 +829,8 @@ static int efx_ef10_link_piobufs(struct efx_nic *efx)
|
||||
offset = ((efx->tx_channel_offset + efx->n_tx_channels -
|
||||
tx_queue->channel->channel - 1) *
|
||||
efx_piobuf_size);
|
||||
index = offset / ER_DZ_TX_PIOBUF_SIZE;
|
||||
offset = offset % ER_DZ_TX_PIOBUF_SIZE;
|
||||
index = offset / nic_data->piobuf_size;
|
||||
offset = offset % nic_data->piobuf_size;
|
||||
|
||||
/* When the host page size is 4K, the first
|
||||
* host page in the WC mapping may be within
|
||||
@@ -1161,11 +1165,11 @@ static int efx_ef10_dimension_resources(struct efx_nic *efx)
|
||||
* functions of the controller.
|
||||
*/
|
||||
if (efx_piobuf_size != 0 &&
|
||||
ER_DZ_TX_PIOBUF_SIZE / efx_piobuf_size * EF10_TX_PIOBUF_COUNT >=
|
||||
nic_data->piobuf_size / efx_piobuf_size * EF10_TX_PIOBUF_COUNT >=
|
||||
efx->n_tx_channels) {
|
||||
unsigned int n_piobufs =
|
||||
DIV_ROUND_UP(efx->n_tx_channels,
|
||||
ER_DZ_TX_PIOBUF_SIZE / efx_piobuf_size);
|
||||
nic_data->piobuf_size / efx_piobuf_size);
|
||||
|
||||
rc = efx_ef10_alloc_piobufs(efx, n_piobufs);
|
||||
if (rc)
|
||||
|
||||
@@ -500,6 +500,7 @@ enum {
|
||||
* @pio_write_base: Base address for writing PIO buffers
|
||||
* @pio_write_vi_base: Relative VI number for @pio_write_base
|
||||
* @piobuf_handle: Handle of each PIO buffer allocated
|
||||
* @piobuf_size: size of a single PIO buffer
|
||||
* @must_restore_piobufs: Flag: PIO buffers have yet to be restored after MC
|
||||
* reboot
|
||||
* @rx_rss_context: Firmware handle for our RSS context
|
||||
@@ -537,6 +538,7 @@ struct efx_ef10_nic_data {
|
||||
void __iomem *wc_membase, *pio_write_base;
|
||||
unsigned int pio_write_vi_base;
|
||||
unsigned int piobuf_handle[EF10_TX_PIOBUF_COUNT];
|
||||
u16 piobuf_size;
|
||||
bool must_restore_piobufs;
|
||||
u32 rx_rss_context;
|
||||
bool rx_rss_context_exclusive;
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
|
||||
#ifdef EFX_USE_PIO
|
||||
|
||||
#define EFX_PIOBUF_SIZE_MAX ER_DZ_TX_PIOBUF_SIZE
|
||||
#define EFX_PIOBUF_SIZE_DEF ALIGN(256, L1_CACHE_BYTES)
|
||||
unsigned int efx_piobuf_size __read_mostly = EFX_PIOBUF_SIZE_DEF;
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ static int xgmiitorgmii_read_status(struct phy_device *phydev)
|
||||
priv->phy_drv->read_status(phydev);
|
||||
|
||||
val = mdiobus_read(phydev->mdio.bus, priv->addr, XILINX_GMII2RGMII_REG);
|
||||
val &= XILINX_GMII2RGMII_SPEED_MASK;
|
||||
val &= ~XILINX_GMII2RGMII_SPEED_MASK;
|
||||
|
||||
if (phydev->speed == SPEED_1000)
|
||||
val |= BMCR_SPEED1000;
|
||||
|
||||
@@ -2366,8 +2366,10 @@ start_again:
|
||||
|
||||
hdr = genlmsg_put(skb, portid, seq, &team_nl_family, flags | NLM_F_MULTI,
|
||||
TEAM_CMD_OPTIONS_GET);
|
||||
if (!hdr)
|
||||
if (!hdr) {
|
||||
nlmsg_free(skb);
|
||||
return -EMSGSIZE;
|
||||
}
|
||||
|
||||
if (nla_put_u32(skb, TEAM_ATTR_TEAM_IFINDEX, team->dev->ifindex))
|
||||
goto nla_put_failure;
|
||||
@@ -2639,8 +2641,10 @@ start_again:
|
||||
|
||||
hdr = genlmsg_put(skb, portid, seq, &team_nl_family, flags | NLM_F_MULTI,
|
||||
TEAM_CMD_PORT_LIST_GET);
|
||||
if (!hdr)
|
||||
if (!hdr) {
|
||||
nlmsg_free(skb);
|
||||
return -EMSGSIZE;
|
||||
}
|
||||
|
||||
if (nla_put_u32(skb, TEAM_ATTR_TEAM_IFINDEX, team->dev->ifindex))
|
||||
goto nla_put_failure;
|
||||
|
||||
@@ -1283,11 +1283,13 @@ static ssize_t tun_get_user(struct tun_struct *tun, struct tun_file *tfile,
|
||||
switch (tun->flags & TUN_TYPE_MASK) {
|
||||
case IFF_TUN:
|
||||
if (tun->flags & IFF_NO_PI) {
|
||||
switch (skb->data[0] & 0xf0) {
|
||||
case 0x40:
|
||||
u8 ip_version = skb->len ? (skb->data[0] >> 4) : 0;
|
||||
|
||||
switch (ip_version) {
|
||||
case 4:
|
||||
pi.proto = htons(ETH_P_IP);
|
||||
break;
|
||||
case 0x60:
|
||||
case 6:
|
||||
pi.proto = htons(ETH_P_IPV6);
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -364,7 +364,7 @@ config USB_NET_NET1080
|
||||
optionally with LEDs that indicate traffic
|
||||
|
||||
config USB_NET_PLUSB
|
||||
tristate "Prolific PL-2301/2302/25A1 based cables"
|
||||
tristate "Prolific PL-2301/2302/25A1/27A1 based cables"
|
||||
# if the handshake/init/reset problems, from original 'plusb',
|
||||
# are ever resolved ... then remove "experimental"
|
||||
depends on USB_USBNET
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user