mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-24 19:40:21 +09:00
Merge 4.9.89 into android-4.9
Changes in 4.9.89
blkcg: fix double free of new_blkg in blkcg_init_queue
Input: tsc2007 - check for presence and power down tsc2007 during probe
perf stat: Issue a HW watchdog disable hint
staging: speakup: Replace BUG_ON() with WARN_ON().
staging: wilc1000: add check for kmalloc allocation failure.
HID: reject input outside logical range only if null state is set
drm: qxl: Don't alloc fbdev if emulation is not supported
ARM: dts: r8a7791: Remove unit-address and reg from integrated cache
ARM: dts: r8a7792: Remove unit-address and reg from integrated cache
ARM: dts: r8a7793: Remove unit-address and reg from integrated cache
ARM: dts: r8a7794: Remove unit-address and reg from integrated cache
arm64: dts: r8a7796: Remove unit-address and reg from integrated cache
drm/sun4i: Fix up error path cleanup for master bind function
drm/sun4i: Set drm_crtc.port to the underlying TCON's output port node
ath10k: fix a warning during channel switch with multiple vaps
drm/sun4i: Fix TCON clock and regmap initialization sequence
PCI/MSI: Stop disabling MSI/MSI-X in pci_device_shutdown()
selinux: check for address length in selinux_socket_bind()
x86/mm: Make mmap(MAP_32BIT) work correctly
perf sort: Fix segfault with basic block 'cycles' sort dimension
x86/mce: Handle broadcasted MCE gracefully with kexec
eventpoll.h: fix epoll event masks
i40e: Acquire NVM lock before reads on all devices
i40e: fix ethtool to get EEPROM data from X722 interface
perf tools: Make perf_event__synthesize_mmap_events() scale
ARM: brcmstb: Enable ZONE_DMA for non 64-bit capable peripherals
drivers: net: xgene: Fix hardware checksum setting
drivers: net: phy: xgene: Fix mdio write
drivers: net: xgene: Fix wrong logical operation
drivers: net: xgene: Fix Rx checksum validation logic
drm: Defer disabling the vblank IRQ until the next interrupt (for instant-off)
ath10k: disallow DFS simulation if DFS channel is not enabled
ath10k: fix fetching channel during potential radar detection
usb: misc: lvs: fix race condition in disconnect handling
ARM: bcm2835: Enable missing CMA settings for VC4 driver
net: ethernet: bgmac: Allow MAC address to be specified in DTB
netem: apply correct delay when rate throttling
x86/mce: Init some CPU features early
omapfb: dss: Handle return errors in dss_init_ports()
perf probe: Fix concat_probe_trace_events
perf probe: Return errno when not hitting any event
HID: clamp input to logical range if no null state
net/8021q: create device with all possible features in wanted_features
ARM: dts: Adjust moxart IRQ controller and flags
qed: Always publish VF link from leading hwfn
s390/topology: fix typo in early topology code
zd1211rw: fix NULL-deref at probe
batman-adv: handle race condition for claims between gateways
of: fix of_device_get_modalias returned length when truncating buffers
solo6x10: release vb2 buffers in solo_stop_streaming()
x86/boot/32: Defer resyncing initial_page_table until per-cpu is set up
scsi: fnic: Fix for "Number of Active IOs" in fnicstats becoming negative
scsi: ipr: Fix missed EH wakeup
media: i2c/soc_camera: fix ov6650 sensor getting wrong clock
timers, sched_clock: Update timeout for clock wrap
sysrq: Reset the watchdog timers while displaying high-resolution timers
Input: qt1070 - add OF device ID table
sched: act_csum: don't mangle TCP and UDP GSO packets
PCI: hv: Properly handle PCI bus remove
PCI: hv: Lock PCI bus on device eject
ASoC: rcar: ssi: don't set SSICR.CKDV = 000 with SSIWSR.CONT
spi: omap2-mcspi: poll OMAP2_MCSPI_CHSTAT_RXS for PIO transfer
tcp: sysctl: Fix a race to avoid unexpected 0 window from space
dmaengine: imx-sdma: add 1ms delay to ensure SDMA channel is stopped
usb: dwc3: make sure UX_EXIT_PX is cleared
ARM: dts: bcm2835: add index to the ethernet alias
perf annotate: Fix a bug following symbolic link of a build-id file
perf buildid: Do not assume that readlink() returns a null terminated string
i40e/i40evf: Fix use after free in Rx cleanup path
scsi: be2iscsi: Check tag in beiscsi_mccq_compl_wait
driver: (adm1275) set the m,b and R coefficients correctly for power
bonding: make speed, duplex setting consistent with link state
mm: Fix false-positive VM_BUG_ON() in page_cache_{get,add}_speculative()
ALSA: firewire-lib: add a quirk of packet without valid EOH in CIP format
ARM: dts: r8a7794: Add DU1 clock to device tree
ARM: dts: r8a7794: Correct clock of DU1
ARM: dts: silk: Correct clock of DU1
blk-throttle: make sure expire time isn't too big
regulator: core: Limit propagation of parent voltage count and list
perf trace: Handle unpaired raw_syscalls:sys_exit event
f2fs: relax node version check for victim data in gc
drm/ttm: never add BO that failed to validate to the LRU list
bonding: refine bond_fold_stats() wrap detection
PCI: Apply Cavium ACS quirk only to CN81xx/CN83xx/CN88xx devices
powerpc/mm/hugetlb: Filter out hugepage size not supported by page table layout
braille-console: Fix value returned by _braille_console_setup
drm/vmwgfx: Fixes to vmwgfx_fb
vxlan: vxlan dev should inherit lowerdev's gso_max_size
NFC: nfcmrvl: Include unaligned.h instead of access_ok.h
NFC: nfcmrvl: double free on error path
NFC: pn533: change order of free_irq and dev unregistration
ARM: dts: r7s72100: fix ethernet clock parent
ARM: dts: r8a7790: Correct parent of SSI[0-9] clocks
ARM: dts: r8a7791: Correct parent of SSI[0-9] clocks
ARM: dts: r8a7793: Correct parent of SSI[0-9] clocks
powerpc: Avoid taking a data miss on every userspace instruction miss
net: hns: Correct HNS RSS key set function
net/faraday: Add missing include of of.h
qed: Fix TM block ILT allocation
rtmutex: Fix PI chain order integrity
printk: Correctly handle preemption in console_unlock()
drm: rcar-du: Handle event when disabling CRTCs
ARM: dts: koelsch: Correct clock frequency of X2 DU clock input
reiserfs: Make cancel_old_flush() reliable
ASoC: rt5677: Add OF device ID table
IB/hfi1: Check for QSFP presence before attempting reads
ALSA: firewire-digi00x: add support for console models of Digi00x series
ALSA: firewire-digi00x: handle all MIDI messages on streaming packets
fm10k: correctly check if interface is removed
EDAC, altera: Fix peripheral warnings for Cyclone5
scsi: ses: don't get power status of SES device slot on probe
qed: Correct MSI-x for storage
apparmor: Make path_max parameter readonly
iommu/iova: Fix underflow bug in __alloc_and_insert_iova_range
kvm/svm: Setup MCG_CAP on AMD properly
kvm: nVMX: Disallow userspace-injected exceptions in guest mode
video: ARM CLCD: fix dma allocation size
drm/radeon: Fail fb creation from imported dma-bufs.
drm/amdgpu: Fail fb creation from imported dma-bufs. (v2)
drm/rockchip: vop: Enable pm domain before vop_initial
i40e: only register client on iWarp-capable devices
coresight: Fixes coresight DT parse to get correct output port ID.
lkdtm: turn off kcov for lkdtm_rodata_do_nothing:
tty: amba-pl011: Fix spurious TX interrupts
serial: imx: setup DCEDTE early and ensure DCD and RI irqs to be off
MIPS: BPF: Quit clobbering callee saved registers in JIT code.
MIPS: BPF: Fix multiple problems in JIT skb access helpers.
MIPS: r2-on-r6-emu: Fix BLEZL and BGTZL identification
MIPS: r2-on-r6-emu: Clear BLTZALL and BGEZALL debugfs counters
v4l: vsp1: Prevent multiple streamon race commencing pipeline early
v4l: vsp1: Register pipe with output WPF
regulator: isl9305: fix array size
md/raid6: Fix anomily when recovering a single device in RAID6.
md.c:didn't unlock the mddev before return EINVAL in array_size_store
powerpc/nohash: Fix use of mmu_has_feature() in setup_initial_memory_limit()
usb: dwc2: Make sure we disconnect the gadget state
usb: gadget: dummy_hcd: Fix wrong power status bit clear/reset in dummy_hub_control()
perf evsel: Return exact sub event which failed with EPERM for wildcards
iwlwifi: mvm: fix RX SKB header size and align it properly
drivers/perf: arm_pmu: handle no platform_device
perf inject: Copy events when reordering events in pipe mode
net: fec: add phy-reset-gpios PROBE_DEFER check
perf session: Don't rely on evlist in pipe mode
vfio/powerpc/spapr_tce: Enforce IOMMU type compatibility check
vfio/spapr_tce: Check kzalloc() return when preregistering memory
scsi: sg: check for valid direction before starting the request
scsi: sg: close race condition in sg_remove_sfp_usercontext()
ALSA: hda: Add Geminilake id to SKL_PLUS
kprobes/x86: Fix kprobe-booster not to boost far call instructions
kprobes/x86: Set kprobes pages read-only
pwm: tegra: Increase precision in PWM rate calculation
clk: qcom: msm8996: Fix the vfe1 powerdomain name
Bluetooth: Avoid bt_accept_unlink() double unlinking
Bluetooth: 6lowpan: fix delay work init in add_peer_chan()
mac80211_hwsim: use per-interface power level
ath10k: fix compile time sanity check for CE4 buffer size
wil6210: fix protection against connections during reset
wil6210: fix memory access violation in wil_memcpy_from/toio_32
perf stat: Fix bug in handling events in error state
mwifiex: Fix invalid port issue
drm/edid: set ELD connector type in drm_edid_to_eld()
video/hdmi: Allow "empty" HDMI infoframes
HID: elo: clear BTN_LEFT mapping
iwlwifi: mvm: rs: don't override the rate history in the search cycle
clk: meson: gxbb: fix wrong clock for SARADC/SANA
ARM: dts: exynos: Correct Trats2 panel reset line
sched: Stop switched_to_rt() from sending IPIs to offline CPUs
sched: Stop resched_cpu() from sending IPIs to offline CPUs
test_firmware: fix setting old custom fw path back on exit
net: ieee802154: adf7242: Fix bug if defined DEBUG
net: xfrm: allow clearing socket xfrm policies.
mtd: nand: fix interpretation of NAND_CMD_NONE in nand_command[_lp]()
net: thunderx: Set max queue count taking XDP_TX into account
ARM: dts: am335x-pepper: Fix the audio CODEC's reset pin
ARM: dts: omap3-n900: Fix the audio CODEC's reset pin
mtd: nand: ifc: update bufnum mask for ver >= 2.0.0
userns: Don't fail follow_automount based on s_user_ns
leds: pm8058: Silence pointer to integer size warning
power: supply: ab8500_charger: Fix an error handling path
power: supply: ab8500_charger: Bail out in case of error in 'ab8500_charger_init_hw_registers()'
ath10k: update tdls teardown state to target
scsi: ses: don't ask for diagnostic pages repeatedly during probe
pwm: stmpe: Fix wrong register offset for hwpwm=2 case
clk: qcom: msm8916: fix mnd_width for codec_digcodec
mwifiex: cfg80211: do not change virtual interface during scan processing
ath10k: fix invalid STS_CAP_OFFSET_MASK
tools/usbip: fixes build with musl libc toolchain
spi: sun6i: disable/unprepare clocks on remove
bnxt_en: Don't print "Link speed -1 no longer supported" messages.
scsi: core: scsi_get_device_flags_keyed(): Always return device flags
scsi: devinfo: apply to HP XP the same flags as Hitachi VSP
scsi: dh: add new rdac devices
media: vsp1: Prevent suspending and resuming DRM pipelines
media: cpia2: Fix a couple off by one bugs
veth: set peer GSO values
drm/amdkfd: Fix memory leaks in kfd topology
powerpc/modules: Don't try to restore r2 after a sibling call
agp/intel: Flush all chipset writes after updating the GGTT
mac80211_hwsim: enforce PS_MANUAL_POLL to be set after PS_ENABLED
mac80211: remove BUG() when interface type is invalid
ASoC: nuc900: Fix a loop timeout test
ipvlan: add L2 check for packets arriving via virtual devices
rcutorture/configinit: Fix build directory error message
locking/locktorture: Fix num reader/writer corner cases
ima: relax requiring a file signature for new files with zero length
net: hns: Some checkpatch.pl script & warning fixes
x86/boot/32: Fix UP boot on Quark and possibly other platforms
x86/cpufeatures: Add Intel PCONFIG cpufeature
selftests/x86/entry_from_vm86: Exit with 1 if we fail
selftests/x86: Add tests for User-Mode Instruction Prevention
selftests/x86: Add tests for the STR and SLDT instructions
selftests/x86/entry_from_vm86: Add test cases for POPF
x86/vm86/32: Fix POPF emulation
x86/speculation, objtool: Annotate indirect calls/jumps for objtool on 32-bit kernels
x86/speculation: Remove Skylake C2 from Speculation Control microcode blacklist
x86/mm: Fix vmalloc_fault to use pXd_large
parisc: Handle case where flush_cache_range is called with no context
ALSA: pcm: Fix UAF in snd_pcm_oss_get_formats()
ALSA: hda - Revert power_save option default value
ALSA: seq: Fix possible UAF in snd_seq_check_queue()
ALSA: seq: Clear client entry before deleting else at closing
drm/amdgpu: fix prime teardown order
drm/amdgpu/dce: Don't turn off DP sink when disconnected
fs: Teach path_connected to handle nfs filesystems with multiple roots.
lock_parent() needs to recheck if dentry got __dentry_kill'ed under it
fs/aio: Add explicit RCU grace period when freeing kioctx
fs/aio: Use RCU accessors for kioctx_table->table[]
irqchip/gic-v3-its: Ensure nr_ites >= nr_lpis
scsi: sg: fix SG_DXFER_FROM_DEV transfers
scsi: sg: fix static checker warning in sg_is_valid_dxfer
scsi: sg: only check for dxfer_len greater than 256M
btrfs: alloc_chunk: fix DUP stripe size handling
btrfs: Fix use-after-free when cleaning up fs_devs with a single stale device
scsi: qla2xxx: Fix extraneous ref on sp's after adapter break
USB: gadget: udc: Add missing platform_device_put() on error in bdc_pci_probe()
usb: dwc3: Fix GDBGFIFOSPACE_TYPE values
usb: gadget: bdc: 64-bit pointer capability check
Linux 4.9.89
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
2
Makefile
2
Makefile
@@ -1,6 +1,6 @@
|
||||
VERSION = 4
|
||||
PATCHLEVEL = 9
|
||||
SUBLEVEL = 88
|
||||
SUBLEVEL = 89
|
||||
EXTRAVERSION =
|
||||
NAME = Roaring Lionus
|
||||
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
&audio_codec {
|
||||
status = "okay";
|
||||
|
||||
gpio-reset = <&gpio1 16 GPIO_ACTIVE_LOW>;
|
||||
reset-gpios = <&gpio1 16 GPIO_ACTIVE_LOW>;
|
||||
AVDD-supply = <&ldo3_reg>;
|
||||
IOVDD-supply = <&ldo3_reg>;
|
||||
DRVDD-supply = <&ldo3_reg>;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/ {
|
||||
aliases {
|
||||
ethernet = ðernet;
|
||||
ethernet0 = ðernet;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/ {
|
||||
aliases {
|
||||
ethernet = ðernet;
|
||||
ethernet0 = ðernet;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -408,7 +408,7 @@
|
||||
reg = <0>;
|
||||
vdd3-supply = <&lcd_vdd3_reg>;
|
||||
vci-supply = <&ldo25_reg>;
|
||||
reset-gpios = <&gpy4 5 GPIO_ACTIVE_HIGH>;
|
||||
reset-gpios = <&gpf2 1 GPIO_ACTIVE_HIGH>;
|
||||
power-on-delay= <50>;
|
||||
reset-delay = <100>;
|
||||
init-delay = <100>;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
/include/ "moxart.dtsi"
|
||||
#include "moxart.dtsi"
|
||||
|
||||
/ {
|
||||
model = "MOXA UC-7112-LX";
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
*/
|
||||
|
||||
/include/ "skeleton.dtsi"
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
|
||||
/ {
|
||||
compatible = "moxa,moxart";
|
||||
@@ -36,8 +37,8 @@
|
||||
ranges;
|
||||
|
||||
intc: interrupt-controller@98800000 {
|
||||
compatible = "moxa,moxart-ic";
|
||||
reg = <0x98800000 0x38>;
|
||||
compatible = "moxa,moxart-ic", "faraday,ftintc010";
|
||||
reg = <0x98800000 0x100>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <2>;
|
||||
interrupt-mask = <0x00080000>;
|
||||
@@ -59,7 +60,7 @@
|
||||
timer: timer@98400000 {
|
||||
compatible = "moxa,moxart-timer";
|
||||
reg = <0x98400000 0x42>;
|
||||
interrupts = <19 1>;
|
||||
interrupts = <19 IRQ_TYPE_EDGE_FALLING>;
|
||||
clocks = <&clk_apb>;
|
||||
};
|
||||
|
||||
@@ -80,7 +81,7 @@
|
||||
dma: dma@90500000 {
|
||||
compatible = "moxa,moxart-dma";
|
||||
reg = <0x90500080 0x40>;
|
||||
interrupts = <24 0>;
|
||||
interrupts = <24 IRQ_TYPE_LEVEL_HIGH>;
|
||||
#dma-cells = <1>;
|
||||
};
|
||||
|
||||
@@ -93,7 +94,7 @@
|
||||
sdhci: sdhci@98e00000 {
|
||||
compatible = "moxa,moxart-sdhci";
|
||||
reg = <0x98e00000 0x5C>;
|
||||
interrupts = <5 0>;
|
||||
interrupts = <5 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clk_apb>;
|
||||
dmas = <&dma 5>,
|
||||
<&dma 5>;
|
||||
@@ -120,7 +121,7 @@
|
||||
mac0: mac@90900000 {
|
||||
compatible = "moxa,moxart-mac";
|
||||
reg = <0x90900000 0x90>;
|
||||
interrupts = <25 0>;
|
||||
interrupts = <25 IRQ_TYPE_LEVEL_HIGH>;
|
||||
phy-handle = <ðphy0>;
|
||||
phy-mode = "mii";
|
||||
status = "disabled";
|
||||
@@ -129,7 +130,7 @@
|
||||
mac1: mac@92000000 {
|
||||
compatible = "moxa,moxart-mac";
|
||||
reg = <0x92000000 0x90>;
|
||||
interrupts = <27 0>;
|
||||
interrupts = <27 IRQ_TYPE_LEVEL_HIGH>;
|
||||
phy-handle = <ðphy1>;
|
||||
phy-mode = "mii";
|
||||
status = "disabled";
|
||||
@@ -138,7 +139,7 @@
|
||||
uart0: uart@98200000 {
|
||||
compatible = "ns16550a";
|
||||
reg = <0x98200000 0x20>;
|
||||
interrupts = <31 8>;
|
||||
interrupts = <31 IRQ_TYPE_LEVEL_HIGH>;
|
||||
reg-shift = <2>;
|
||||
reg-io-width = <4>;
|
||||
clock-frequency = <14745600>;
|
||||
|
||||
@@ -510,7 +510,7 @@
|
||||
tlv320aic3x: tlv320aic3x@18 {
|
||||
compatible = "ti,tlv320aic3x";
|
||||
reg = <0x18>;
|
||||
gpio-reset = <&gpio2 28 GPIO_ACTIVE_HIGH>; /* 60 */
|
||||
reset-gpios = <&gpio2 28 GPIO_ACTIVE_LOW>; /* 60 */
|
||||
ai3x-gpio-func = <
|
||||
0 /* AIC3X_GPIO1_FUNC_DISABLED */
|
||||
5 /* AIC3X_GPIO2_FUNC_DIGITAL_MIC_INPUT */
|
||||
@@ -527,7 +527,7 @@
|
||||
tlv320aic3x_aux: tlv320aic3x@19 {
|
||||
compatible = "ti,tlv320aic3x";
|
||||
reg = <0x19>;
|
||||
gpio-reset = <&gpio2 28 GPIO_ACTIVE_HIGH>; /* 60 */
|
||||
reset-gpios = <&gpio2 28 GPIO_ACTIVE_LOW>; /* 60 */
|
||||
|
||||
AVDD-supply = <&vmmc2>;
|
||||
DRVDD-supply = <&vmmc2>;
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
#clock-cells = <1>;
|
||||
compatible = "renesas,r7s72100-mstp-clocks", "renesas,cpg-mstp-clocks";
|
||||
reg = <0xfcfe0430 4>;
|
||||
clocks = <&p0_clk>;
|
||||
clocks = <&b_clk>;
|
||||
clock-indices = <R7S72100_CLK_ETHER>;
|
||||
clock-output-names = "ether";
|
||||
};
|
||||
|
||||
@@ -1437,8 +1437,11 @@
|
||||
compatible = "renesas,r8a7790-mstp-clocks", "renesas,cpg-mstp-clocks";
|
||||
reg = <0 0xe6150998 0 4>, <0 0xe61509a8 0 4>;
|
||||
clocks = <&p_clk>,
|
||||
<&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>,
|
||||
<&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>,
|
||||
<&mstp10_clks R8A7790_CLK_SSI_ALL>, <&mstp10_clks R8A7790_CLK_SSI_ALL>,
|
||||
<&mstp10_clks R8A7790_CLK_SSI_ALL>, <&mstp10_clks R8A7790_CLK_SSI_ALL>,
|
||||
<&mstp10_clks R8A7790_CLK_SSI_ALL>, <&mstp10_clks R8A7790_CLK_SSI_ALL>,
|
||||
<&mstp10_clks R8A7790_CLK_SSI_ALL>, <&mstp10_clks R8A7790_CLK_SSI_ALL>,
|
||||
<&mstp10_clks R8A7790_CLK_SSI_ALL>, <&mstp10_clks R8A7790_CLK_SSI_ALL>,
|
||||
<&p_clk>,
|
||||
<&mstp10_clks R8A7790_CLK_SCU_ALL>, <&mstp10_clks R8A7790_CLK_SCU_ALL>,
|
||||
<&mstp10_clks R8A7790_CLK_SCU_ALL>, <&mstp10_clks R8A7790_CLK_SCU_ALL>,
|
||||
|
||||
@@ -279,7 +279,7 @@
|
||||
x2_clk: x2-clock {
|
||||
compatible = "fixed-clock";
|
||||
#clock-cells = <0>;
|
||||
clock-frequency = <148500000>;
|
||||
clock-frequency = <74250000>;
|
||||
};
|
||||
|
||||
x13_clk: x13-clock {
|
||||
|
||||
@@ -74,9 +74,8 @@
|
||||
next-level-cache = <&L2_CA15>;
|
||||
};
|
||||
|
||||
L2_CA15: cache-controller@0 {
|
||||
L2_CA15: cache-controller-0 {
|
||||
compatible = "cache";
|
||||
reg = <0>;
|
||||
power-domains = <&sysc R8A7791_PD_CA15_SCU>;
|
||||
cache-unified;
|
||||
cache-level = <2>;
|
||||
@@ -1438,8 +1437,11 @@
|
||||
compatible = "renesas,r8a7791-mstp-clocks", "renesas,cpg-mstp-clocks";
|
||||
reg = <0 0xe6150998 0 4>, <0 0xe61509a8 0 4>;
|
||||
clocks = <&p_clk>,
|
||||
<&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>,
|
||||
<&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>,
|
||||
<&mstp10_clks R8A7791_CLK_SSI_ALL>, <&mstp10_clks R8A7791_CLK_SSI_ALL>,
|
||||
<&mstp10_clks R8A7791_CLK_SSI_ALL>, <&mstp10_clks R8A7791_CLK_SSI_ALL>,
|
||||
<&mstp10_clks R8A7791_CLK_SSI_ALL>, <&mstp10_clks R8A7791_CLK_SSI_ALL>,
|
||||
<&mstp10_clks R8A7791_CLK_SSI_ALL>, <&mstp10_clks R8A7791_CLK_SSI_ALL>,
|
||||
<&mstp10_clks R8A7791_CLK_SSI_ALL>, <&mstp10_clks R8A7791_CLK_SSI_ALL>,
|
||||
<&p_clk>,
|
||||
<&mstp10_clks R8A7791_CLK_SCU_ALL>, <&mstp10_clks R8A7791_CLK_SCU_ALL>,
|
||||
<&mstp10_clks R8A7791_CLK_SCU_ALL>, <&mstp10_clks R8A7791_CLK_SCU_ALL>,
|
||||
|
||||
@@ -58,9 +58,8 @@
|
||||
next-level-cache = <&L2_CA15>;
|
||||
};
|
||||
|
||||
L2_CA15: cache-controller@0 {
|
||||
L2_CA15: cache-controller-0 {
|
||||
compatible = "cache";
|
||||
reg = <0>;
|
||||
cache-unified;
|
||||
cache-level = <2>;
|
||||
power-domains = <&sysc R8A7792_PD_CA15_SCU>;
|
||||
|
||||
@@ -65,9 +65,8 @@
|
||||
power-domains = <&sysc R8A7793_PD_CA15_CPU1>;
|
||||
};
|
||||
|
||||
L2_CA15: cache-controller@0 {
|
||||
L2_CA15: cache-controller-0 {
|
||||
compatible = "cache";
|
||||
reg = <0>;
|
||||
power-domains = <&sysc R8A7793_PD_CA15_SCU>;
|
||||
cache-unified;
|
||||
cache-level = <2>;
|
||||
@@ -1235,8 +1234,11 @@
|
||||
compatible = "renesas,r8a7793-mstp-clocks", "renesas,cpg-mstp-clocks";
|
||||
reg = <0 0xe6150998 0 4>, <0 0xe61509a8 0 4>;
|
||||
clocks = <&p_clk>,
|
||||
<&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>,
|
||||
<&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>,
|
||||
<&mstp10_clks R8A7793_CLK_SSI_ALL>, <&mstp10_clks R8A7793_CLK_SSI_ALL>,
|
||||
<&mstp10_clks R8A7793_CLK_SSI_ALL>, <&mstp10_clks R8A7793_CLK_SSI_ALL>,
|
||||
<&mstp10_clks R8A7793_CLK_SSI_ALL>, <&mstp10_clks R8A7793_CLK_SSI_ALL>,
|
||||
<&mstp10_clks R8A7793_CLK_SSI_ALL>, <&mstp10_clks R8A7793_CLK_SSI_ALL>,
|
||||
<&mstp10_clks R8A7793_CLK_SSI_ALL>, <&mstp10_clks R8A7793_CLK_SSI_ALL>,
|
||||
<&p_clk>,
|
||||
<&mstp10_clks R8A7793_CLK_SCU_ALL>, <&mstp10_clks R8A7793_CLK_SCU_ALL>,
|
||||
<&mstp10_clks R8A7793_CLK_SCU_ALL>, <&mstp10_clks R8A7793_CLK_SCU_ALL>,
|
||||
|
||||
@@ -425,7 +425,7 @@
|
||||
status = "okay";
|
||||
|
||||
clocks = <&mstp7_clks R8A7794_CLK_DU0>,
|
||||
<&mstp7_clks R8A7794_CLK_DU0>,
|
||||
<&mstp7_clks R8A7794_CLK_DU1>,
|
||||
<&x2_clk>, <&x3_clk>;
|
||||
clock-names = "du.0", "du.1", "dclkin.0", "dclkin.1";
|
||||
|
||||
|
||||
@@ -56,9 +56,8 @@
|
||||
next-level-cache = <&L2_CA7>;
|
||||
};
|
||||
|
||||
L2_CA7: cache-controller@0 {
|
||||
L2_CA7: cache-controller-0 {
|
||||
compatible = "cache";
|
||||
reg = <0>;
|
||||
power-domains = <&sysc R8A7794_PD_CA7_SCU>;
|
||||
cache-unified;
|
||||
cache-level = <2>;
|
||||
@@ -917,7 +916,7 @@
|
||||
interrupts = <GIC_SPI 256 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 268 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&mstp7_clks R8A7794_CLK_DU0>,
|
||||
<&mstp7_clks R8A7794_CLK_DU0>;
|
||||
<&mstp7_clks R8A7794_CLK_DU1>;
|
||||
clock-names = "du.0", "du.1";
|
||||
status = "disabled";
|
||||
|
||||
@@ -1262,19 +1261,21 @@
|
||||
clocks = <&mp_clk>, <&hp_clk>,
|
||||
<&zs_clk>, <&p_clk>, <&p_clk>, <&zs_clk>,
|
||||
<&zs_clk>, <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>,
|
||||
<&zx_clk>;
|
||||
<&zx_clk>, <&zx_clk>;
|
||||
#clock-cells = <1>;
|
||||
clock-indices = <
|
||||
R8A7794_CLK_EHCI R8A7794_CLK_HSUSB
|
||||
R8A7794_CLK_HSCIF2 R8A7794_CLK_SCIF5
|
||||
R8A7794_CLK_SCIF4 R8A7794_CLK_HSCIF1 R8A7794_CLK_HSCIF0
|
||||
R8A7794_CLK_SCIF3 R8A7794_CLK_SCIF2 R8A7794_CLK_SCIF1
|
||||
R8A7794_CLK_SCIF0 R8A7794_CLK_DU0
|
||||
R8A7794_CLK_SCIF0
|
||||
R8A7794_CLK_DU1 R8A7794_CLK_DU0
|
||||
>;
|
||||
clock-output-names =
|
||||
"ehci", "hsusb",
|
||||
"hscif2", "scif5", "scif4", "hscif1", "hscif0",
|
||||
"scif3", "scif2", "scif1", "scif0", "du0";
|
||||
"scif3", "scif2", "scif1", "scif0",
|
||||
"du1", "du0";
|
||||
};
|
||||
mstp8_clks: mstp8_clks@e6150990 {
|
||||
compatible = "renesas,r8a7794-mstp-clocks", "renesas,cpg-mstp-clocks";
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
# CONFIG_LOCALVERSION_AUTO is not set
|
||||
CONFIG_SYSVIPC=y
|
||||
CONFIG_FHANDLE=y
|
||||
CONFIG_NO_HZ=y
|
||||
CONFIG_HIGH_RES_TIMERS=y
|
||||
CONFIG_BSD_PROCESS_ACCT=y
|
||||
@@ -32,6 +31,7 @@ CONFIG_PREEMPT_VOLUNTARY=y
|
||||
CONFIG_AEABI=y
|
||||
CONFIG_KSM=y
|
||||
CONFIG_CLEANCACHE=y
|
||||
CONFIG_CMA=y
|
||||
CONFIG_SECCOMP=y
|
||||
CONFIG_KEXEC=y
|
||||
CONFIG_CRASH_DUMP=y
|
||||
@@ -52,6 +52,7 @@ CONFIG_MAC80211=y
|
||||
CONFIG_DEVTMPFS=y
|
||||
CONFIG_DEVTMPFS_MOUNT=y
|
||||
# CONFIG_STANDALONE is not set
|
||||
CONFIG_DMA_CMA=y
|
||||
CONFIG_SCSI=y
|
||||
CONFIG_BLK_DEV_SD=y
|
||||
CONFIG_SCSI_CONSTANTS=y
|
||||
@@ -62,7 +63,6 @@ CONFIG_USB_NET_SMSC95XX=y
|
||||
CONFIG_ZD1211RW=y
|
||||
CONFIG_INPUT_EVDEV=y
|
||||
# CONFIG_LEGACY_PTYS is not set
|
||||
# CONFIG_DEVKMEM is not set
|
||||
CONFIG_SERIAL_AMBA_PL011=y
|
||||
CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
|
||||
CONFIG_TTY_PRINTK=y
|
||||
|
||||
@@ -199,6 +199,7 @@ config ARCH_BRCMSTB
|
||||
select BRCMSTB_L2_IRQ
|
||||
select BCM7120_L2_IRQ
|
||||
select ARCH_DMA_ADDR_T_64BIT if ARM_LPAE
|
||||
select ZONE_DMA if ARM_LPAE
|
||||
select SOC_BRCMSTB
|
||||
select SOC_BUS
|
||||
help
|
||||
|
||||
@@ -36,9 +36,8 @@
|
||||
enable-method = "psci";
|
||||
};
|
||||
|
||||
L2_CA57: cache-controller@0 {
|
||||
L2_CA57: cache-controller-0 {
|
||||
compatible = "cache";
|
||||
reg = <0>;
|
||||
power-domains = <&sysc R8A7796_PD_CA57_SCU>;
|
||||
cache-unified;
|
||||
cache-level = <2>;
|
||||
|
||||
@@ -1096,10 +1096,20 @@ repeat:
|
||||
}
|
||||
break;
|
||||
|
||||
case beql_op:
|
||||
case bnel_op:
|
||||
case blezl_op:
|
||||
case bgtzl_op:
|
||||
/*
|
||||
* For BLEZL and BGTZL, rt field must be set to 0. If this
|
||||
* is not the case, this may be an encoding of a MIPS R6
|
||||
* instruction, so return to CPU execution if this occurs
|
||||
*/
|
||||
if (MIPSInst_RT(inst)) {
|
||||
err = SIGILL;
|
||||
break;
|
||||
}
|
||||
/* fall through */
|
||||
case beql_op:
|
||||
case bnel_op:
|
||||
if (delay_slot(regs)) {
|
||||
err = SIGILL;
|
||||
break;
|
||||
@@ -2329,6 +2339,8 @@ static int mipsr2_stats_clear_show(struct seq_file *s, void *unused)
|
||||
__this_cpu_write((mipsr2bremustats).bgezl, 0);
|
||||
__this_cpu_write((mipsr2bremustats).bltzll, 0);
|
||||
__this_cpu_write((mipsr2bremustats).bgezll, 0);
|
||||
__this_cpu_write((mipsr2bremustats).bltzall, 0);
|
||||
__this_cpu_write((mipsr2bremustats).bgezall, 0);
|
||||
__this_cpu_write((mipsr2bremustats).bltzal, 0);
|
||||
__this_cpu_write((mipsr2bremustats).bgezal, 0);
|
||||
__this_cpu_write((mipsr2bremustats).beql, 0);
|
||||
|
||||
@@ -526,7 +526,8 @@ static void save_bpf_jit_regs(struct jit_ctx *ctx, unsigned offset)
|
||||
u32 sflags, tmp_flags;
|
||||
|
||||
/* Adjust the stack pointer */
|
||||
emit_stack_offset(-align_sp(offset), ctx);
|
||||
if (offset)
|
||||
emit_stack_offset(-align_sp(offset), ctx);
|
||||
|
||||
tmp_flags = sflags = ctx->flags >> SEEN_SREG_SFT;
|
||||
/* sflags is essentially a bitmap */
|
||||
@@ -578,7 +579,8 @@ static void restore_bpf_jit_regs(struct jit_ctx *ctx,
|
||||
emit_load_stack_reg(r_ra, r_sp, real_off, ctx);
|
||||
|
||||
/* Restore the sp and discard the scrach memory */
|
||||
emit_stack_offset(align_sp(offset), ctx);
|
||||
if (offset)
|
||||
emit_stack_offset(align_sp(offset), ctx);
|
||||
}
|
||||
|
||||
static unsigned int get_stack_depth(struct jit_ctx *ctx)
|
||||
@@ -625,8 +627,14 @@ static void build_prologue(struct jit_ctx *ctx)
|
||||
if (ctx->flags & SEEN_X)
|
||||
emit_jit_reg_move(r_X, r_zero, ctx);
|
||||
|
||||
/* Do not leak kernel data to userspace */
|
||||
if (bpf_needs_clear_a(&ctx->skf->insns[0]))
|
||||
/*
|
||||
* Do not leak kernel data to userspace, we only need to clear
|
||||
* r_A if it is ever used. In fact if it is never used, we
|
||||
* will not save/restore it, so clearing it in this case would
|
||||
* corrupt the state of the caller.
|
||||
*/
|
||||
if (bpf_needs_clear_a(&ctx->skf->insns[0]) &&
|
||||
(ctx->flags & SEEN_A))
|
||||
emit_jit_reg_move(r_A, r_zero, ctx);
|
||||
}
|
||||
|
||||
|
||||
@@ -90,18 +90,14 @@ FEXPORT(sk_load_half_positive)
|
||||
is_offset_in_header(2, half)
|
||||
/* Offset within header boundaries */
|
||||
PTR_ADDU t1, $r_skb_data, offset
|
||||
.set reorder
|
||||
lh $r_A, 0(t1)
|
||||
.set noreorder
|
||||
lhu $r_A, 0(t1)
|
||||
#ifdef CONFIG_CPU_LITTLE_ENDIAN
|
||||
# if defined(__mips_isa_rev) && (__mips_isa_rev >= 2)
|
||||
wsbh t0, $r_A
|
||||
seh $r_A, t0
|
||||
wsbh $r_A, $r_A
|
||||
# else
|
||||
sll t0, $r_A, 24
|
||||
andi t1, $r_A, 0xff00
|
||||
sra t0, t0, 16
|
||||
srl t1, t1, 8
|
||||
sll t0, $r_A, 8
|
||||
srl t1, $r_A, 8
|
||||
andi t0, t0, 0xff00
|
||||
or $r_A, t0, t1
|
||||
# endif
|
||||
#endif
|
||||
@@ -115,7 +111,7 @@ FEXPORT(sk_load_byte_positive)
|
||||
is_offset_in_header(1, byte)
|
||||
/* Offset within header boundaries */
|
||||
PTR_ADDU t1, $r_skb_data, offset
|
||||
lb $r_A, 0(t1)
|
||||
lbu $r_A, 0(t1)
|
||||
jr $r_ra
|
||||
move $r_ret, zero
|
||||
END(sk_load_byte)
|
||||
@@ -139,6 +135,11 @@ FEXPORT(sk_load_byte_positive)
|
||||
* (void *to) is returned in r_s0
|
||||
*
|
||||
*/
|
||||
#ifdef CONFIG_CPU_LITTLE_ENDIAN
|
||||
#define DS_OFFSET(SIZE) (4 * SZREG)
|
||||
#else
|
||||
#define DS_OFFSET(SIZE) ((4 * SZREG) + (4 - SIZE))
|
||||
#endif
|
||||
#define bpf_slow_path_common(SIZE) \
|
||||
/* Quick check. Are we within reasonable boundaries? */ \
|
||||
LONG_ADDIU $r_s1, $r_skb_len, -SIZE; \
|
||||
@@ -150,7 +151,7 @@ FEXPORT(sk_load_byte_positive)
|
||||
PTR_LA t0, skb_copy_bits; \
|
||||
PTR_S $r_ra, (5 * SZREG)($r_sp); \
|
||||
/* Assign low slot to a2 */ \
|
||||
move a2, $r_sp; \
|
||||
PTR_ADDIU a2, $r_sp, DS_OFFSET(SIZE); \
|
||||
jalr t0; \
|
||||
/* Reset our destination slot (DS but it's ok) */ \
|
||||
INT_S zero, (4 * SZREG)($r_sp); \
|
||||
|
||||
@@ -542,7 +542,8 @@ void flush_cache_mm(struct mm_struct *mm)
|
||||
rp3440, etc. So, avoid it if the mm isn't too big. */
|
||||
if ((!IS_ENABLED(CONFIG_SMP) || !arch_irqs_disabled()) &&
|
||||
mm_total_size(mm) >= parisc_cache_flush_threshold) {
|
||||
flush_tlb_all();
|
||||
if (mm->context)
|
||||
flush_tlb_all();
|
||||
flush_cache_all();
|
||||
return;
|
||||
}
|
||||
@@ -570,6 +571,8 @@ void flush_cache_mm(struct mm_struct *mm)
|
||||
pfn = pte_pfn(*ptep);
|
||||
if (!pfn_valid(pfn))
|
||||
continue;
|
||||
if (unlikely(mm->context))
|
||||
flush_tlb_page(vma, addr);
|
||||
__flush_cache_page(vma, addr, PFN_PHYS(pfn));
|
||||
}
|
||||
}
|
||||
@@ -596,26 +599,46 @@ flush_user_icache_range(unsigned long start, unsigned long end)
|
||||
void flush_cache_range(struct vm_area_struct *vma,
|
||||
unsigned long start, unsigned long end)
|
||||
{
|
||||
pgd_t *pgd;
|
||||
unsigned long addr;
|
||||
|
||||
if ((!IS_ENABLED(CONFIG_SMP) || !arch_irqs_disabled()) &&
|
||||
end - start >= parisc_cache_flush_threshold) {
|
||||
flush_tlb_range(vma, start, end);
|
||||
if (vma->vm_mm->context)
|
||||
flush_tlb_range(vma, start, end);
|
||||
flush_cache_all();
|
||||
return;
|
||||
}
|
||||
|
||||
flush_user_dcache_range_asm(start, end);
|
||||
if (vma->vm_flags & VM_EXEC)
|
||||
flush_user_icache_range_asm(start, end);
|
||||
flush_tlb_range(vma, start, end);
|
||||
if (vma->vm_mm->context == mfsp(3)) {
|
||||
flush_user_dcache_range_asm(start, end);
|
||||
if (vma->vm_flags & VM_EXEC)
|
||||
flush_user_icache_range_asm(start, end);
|
||||
flush_tlb_range(vma, start, end);
|
||||
return;
|
||||
}
|
||||
|
||||
pgd = vma->vm_mm->pgd;
|
||||
for (addr = vma->vm_start; addr < vma->vm_end; addr += PAGE_SIZE) {
|
||||
unsigned long pfn;
|
||||
pte_t *ptep = get_ptep(pgd, addr);
|
||||
if (!ptep)
|
||||
continue;
|
||||
pfn = pte_pfn(*ptep);
|
||||
if (pfn_valid(pfn)) {
|
||||
if (unlikely(vma->vm_mm->context))
|
||||
flush_tlb_page(vma, addr);
|
||||
__flush_cache_page(vma, addr, PFN_PHYS(pfn));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
flush_cache_page(struct vm_area_struct *vma, unsigned long vmaddr, unsigned long pfn)
|
||||
{
|
||||
BUG_ON(!vma->vm_mm->context);
|
||||
|
||||
if (pfn_valid(pfn)) {
|
||||
flush_tlb_page(vma, vmaddr);
|
||||
if (likely(vma->vm_mm->context))
|
||||
flush_tlb_page(vma, vmaddr);
|
||||
__flush_cache_page(vma, vmaddr, PFN_PHYS(pfn));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ int patch_branch(unsigned int *addr, unsigned long target, int flags);
|
||||
int patch_instruction(unsigned int *addr, unsigned int instr);
|
||||
|
||||
int instr_is_relative_branch(unsigned int instr);
|
||||
int instr_is_relative_link_branch(unsigned int instr);
|
||||
int instr_is_branch_to_addr(const unsigned int *instr, unsigned long addr);
|
||||
unsigned long branch_target(const unsigned int *instr);
|
||||
unsigned int translate_branch(const unsigned int *dest,
|
||||
|
||||
@@ -494,7 +494,17 @@ static bool is_early_mcount_callsite(u32 *instruction)
|
||||
restore r2. */
|
||||
static int restore_r2(u32 *instruction, struct module *me)
|
||||
{
|
||||
if (is_early_mcount_callsite(instruction - 1))
|
||||
u32 *prev_insn = instruction - 1;
|
||||
|
||||
if (is_early_mcount_callsite(prev_insn))
|
||||
return 1;
|
||||
|
||||
/*
|
||||
* Make sure the branch isn't a sibling call. Sibling calls aren't
|
||||
* "link" branches and they don't return, so they don't need the r2
|
||||
* restore afterwards.
|
||||
*/
|
||||
if (!instr_is_relative_link_branch(*prev_insn))
|
||||
return 1;
|
||||
|
||||
if (*instruction != PPC_INST_NOP) {
|
||||
|
||||
@@ -95,6 +95,11 @@ int instr_is_relative_branch(unsigned int instr)
|
||||
return instr_is_branch_iform(instr) || instr_is_branch_bform(instr);
|
||||
}
|
||||
|
||||
int instr_is_relative_link_branch(unsigned int instr)
|
||||
{
|
||||
return instr_is_relative_branch(instr) && (instr & BRANCH_SET_LINK);
|
||||
}
|
||||
|
||||
static unsigned long branch_iform_target(const unsigned int *instr)
|
||||
{
|
||||
signed long imm;
|
||||
|
||||
@@ -294,7 +294,7 @@ int do_page_fault(struct pt_regs *regs, unsigned long address,
|
||||
* can result in fault, which will cause a deadlock when called with
|
||||
* mmap_sem held
|
||||
*/
|
||||
if (user_mode(regs))
|
||||
if (!is_exec && user_mode(regs))
|
||||
store_update_sp = store_updates_sp(regs);
|
||||
|
||||
if (user_mode(regs))
|
||||
|
||||
@@ -765,6 +765,24 @@ static int __init add_huge_page_size(unsigned long long size)
|
||||
if ((mmu_psize = shift_to_mmu_psize(shift)) < 0)
|
||||
return -EINVAL;
|
||||
|
||||
#ifdef CONFIG_PPC_BOOK3S_64
|
||||
/*
|
||||
* We need to make sure that for different page sizes reported by
|
||||
* firmware we only add hugetlb support for page sizes that can be
|
||||
* supported by linux page table layout.
|
||||
* For now we have
|
||||
* Radix: 2M
|
||||
* Hash: 16M and 16G
|
||||
*/
|
||||
if (radix_enabled()) {
|
||||
if (mmu_psize != MMU_PAGE_2M)
|
||||
return -EINVAL;
|
||||
} else {
|
||||
if (mmu_psize != MMU_PAGE_16M && mmu_psize != MMU_PAGE_16G)
|
||||
return -EINVAL;
|
||||
}
|
||||
#endif
|
||||
|
||||
BUG_ON(mmu_psize_defs[mmu_psize].shift != shift);
|
||||
|
||||
/* Return if huge page size has already been setup */
|
||||
|
||||
@@ -751,7 +751,7 @@ void setup_initial_memory_limit(phys_addr_t first_memblock_base,
|
||||
* avoid going over total available memory just in case...
|
||||
*/
|
||||
#ifdef CONFIG_PPC_FSL_BOOK3E
|
||||
if (mmu_has_feature(MMU_FTR_TYPE_FSL_E)) {
|
||||
if (early_mmu_has_feature(MMU_FTR_TYPE_FSL_E)) {
|
||||
unsigned long linear_sz;
|
||||
unsigned int num_cams;
|
||||
|
||||
|
||||
@@ -372,7 +372,7 @@ static int __init topology_setup(char *str)
|
||||
|
||||
rc = kstrtobool(str, &enabled);
|
||||
if (!rc && !enabled)
|
||||
S390_lowcore.machine_flags &= ~MACHINE_HAS_TOPOLOGY;
|
||||
S390_lowcore.machine_flags &= ~MACHINE_FLAG_TOPOLOGY;
|
||||
return rc;
|
||||
}
|
||||
early_param("topology", topology_setup);
|
||||
|
||||
@@ -302,6 +302,7 @@
|
||||
/* Intel-defined CPU features, CPUID level 0x00000007:0 (EDX), word 18 */
|
||||
#define X86_FEATURE_AVX512_4VNNIW (18*32+ 2) /* AVX-512 Neural Network Instructions */
|
||||
#define X86_FEATURE_AVX512_4FMAPS (18*32+ 3) /* AVX-512 Multiply Accumulation Single precision */
|
||||
#define X86_FEATURE_PCONFIG (18*32+18) /* Intel PCONFIG */
|
||||
#define X86_FEATURE_SPEC_CTRL (18*32+26) /* "" Speculation Control (IBRS + IBPB) */
|
||||
#define X86_FEATURE_INTEL_STIBP (18*32+27) /* "" Single Thread Indirect Branch Predictors */
|
||||
#define X86_FEATURE_ARCH_CAPABILITIES (18*32+29) /* IA32_ARCH_CAPABILITIES MSR (Intel) */
|
||||
|
||||
@@ -183,7 +183,10 @@
|
||||
* otherwise we'll run out of registers. We don't care about CET
|
||||
* here, anyway.
|
||||
*/
|
||||
# define CALL_NOSPEC ALTERNATIVE("call *%[thunk_target]\n", \
|
||||
# define CALL_NOSPEC \
|
||||
ALTERNATIVE( \
|
||||
ANNOTATE_RETPOLINE_SAFE \
|
||||
"call *%[thunk_target]\n", \
|
||||
" jmp 904f;\n" \
|
||||
" .align 16\n" \
|
||||
"901: call 903f;\n" \
|
||||
|
||||
@@ -15,6 +15,7 @@ struct machine_ops {
|
||||
};
|
||||
|
||||
extern struct machine_ops machine_ops;
|
||||
extern int crashing_cpu;
|
||||
|
||||
void native_machine_crash_shutdown(struct pt_regs *regs);
|
||||
void native_machine_shutdown(void);
|
||||
|
||||
@@ -64,7 +64,7 @@ void check_mpx_erratum(struct cpuinfo_x86 *c)
|
||||
/*
|
||||
* Early microcode releases for the Spectre v2 mitigation were broken.
|
||||
* Information taken from;
|
||||
* - https://newsroom.intel.com/wp-content/uploads/sites/11/2018/01/microcode-update-guidance.pdf
|
||||
* - https://newsroom.intel.com/wp-content/uploads/sites/11/2018/03/microcode-update-guidance.pdf
|
||||
* - https://kb.vmware.com/s/article/52345
|
||||
* - Microcode revisions observed in the wild
|
||||
* - Release note from 20180108 microcode release
|
||||
@@ -82,7 +82,6 @@ static const struct sku_microcode spectre_bad_microcodes[] = {
|
||||
{ INTEL_FAM6_KABYLAKE_MOBILE, 0x09, 0x80 },
|
||||
{ INTEL_FAM6_SKYLAKE_X, 0x03, 0x0100013e },
|
||||
{ INTEL_FAM6_SKYLAKE_X, 0x04, 0x0200003c },
|
||||
{ INTEL_FAM6_SKYLAKE_DESKTOP, 0x03, 0xc2 },
|
||||
{ INTEL_FAM6_BROADWELL_CORE, 0x04, 0x28 },
|
||||
{ INTEL_FAM6_BROADWELL_GT3E, 0x01, 0x1b },
|
||||
{ INTEL_FAM6_BROADWELL_XEON_D, 0x02, 0x14 },
|
||||
|
||||
@@ -48,6 +48,7 @@
|
||||
#include <asm/tlbflush.h>
|
||||
#include <asm/mce.h>
|
||||
#include <asm/msr.h>
|
||||
#include <asm/reboot.h>
|
||||
|
||||
#include "mce-internal.h"
|
||||
|
||||
@@ -1081,9 +1082,22 @@ void do_machine_check(struct pt_regs *regs, long error_code)
|
||||
* on Intel.
|
||||
*/
|
||||
int lmce = 1;
|
||||
int cpu = smp_processor_id();
|
||||
|
||||
/* If this CPU is offline, just bail out. */
|
||||
if (cpu_is_offline(smp_processor_id())) {
|
||||
/*
|
||||
* Cases where we avoid rendezvous handler timeout:
|
||||
* 1) If this CPU is offline.
|
||||
*
|
||||
* 2) If crashing_cpu was set, e.g. we're entering kdump and we need to
|
||||
* skip those CPUs which remain looping in the 1st kernel - see
|
||||
* crash_nmi_callback().
|
||||
*
|
||||
* Note: there still is a small window between kexec-ing and the new,
|
||||
* kdump kernel establishing a new #MC handler where a broadcasted MCE
|
||||
* might not get handled properly.
|
||||
*/
|
||||
if (cpu_is_offline(cpu) ||
|
||||
(crashing_cpu != -1 && crashing_cpu != cpu)) {
|
||||
u64 mcgstatus;
|
||||
|
||||
mcgstatus = mce_rdmsrl(MSR_IA32_MCG_STATUS);
|
||||
@@ -1681,6 +1695,25 @@ static int __mcheck_cpu_ancient_init(struct cpuinfo_x86 *c)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Init basic CPU features needed for early decoding of MCEs.
|
||||
*/
|
||||
static void __mcheck_cpu_init_early(struct cpuinfo_x86 *c)
|
||||
{
|
||||
if (c->x86_vendor == X86_VENDOR_AMD) {
|
||||
mce_flags.overflow_recov = !!cpu_has(c, X86_FEATURE_OVERFLOW_RECOV);
|
||||
mce_flags.succor = !!cpu_has(c, X86_FEATURE_SUCCOR);
|
||||
mce_flags.smca = !!cpu_has(c, X86_FEATURE_SMCA);
|
||||
|
||||
if (mce_flags.smca) {
|
||||
msr_ops.ctl = smca_ctl_reg;
|
||||
msr_ops.status = smca_status_reg;
|
||||
msr_ops.addr = smca_addr_reg;
|
||||
msr_ops.misc = smca_misc_reg;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void __mcheck_cpu_init_vendor(struct cpuinfo_x86 *c)
|
||||
{
|
||||
switch (c->x86_vendor) {
|
||||
@@ -1690,21 +1723,7 @@ static void __mcheck_cpu_init_vendor(struct cpuinfo_x86 *c)
|
||||
break;
|
||||
|
||||
case X86_VENDOR_AMD: {
|
||||
mce_flags.overflow_recov = !!cpu_has(c, X86_FEATURE_OVERFLOW_RECOV);
|
||||
mce_flags.succor = !!cpu_has(c, X86_FEATURE_SUCCOR);
|
||||
mce_flags.smca = !!cpu_has(c, X86_FEATURE_SMCA);
|
||||
|
||||
/*
|
||||
* Install proper ops for Scalable MCA enabled processors
|
||||
*/
|
||||
if (mce_flags.smca) {
|
||||
msr_ops.ctl = smca_ctl_reg;
|
||||
msr_ops.status = smca_status_reg;
|
||||
msr_ops.addr = smca_addr_reg;
|
||||
msr_ops.misc = smca_misc_reg;
|
||||
}
|
||||
mce_amd_feature_init(c);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1790,6 +1809,7 @@ void mcheck_cpu_init(struct cpuinfo_x86 *c)
|
||||
|
||||
machine_check_vector = do_machine_check;
|
||||
|
||||
__mcheck_cpu_init_early(c);
|
||||
__mcheck_cpu_init_generic();
|
||||
__mcheck_cpu_init_vendor(c);
|
||||
__mcheck_cpu_init_clear_banks();
|
||||
|
||||
@@ -199,6 +199,8 @@ retry:
|
||||
return (opcode != 0x62 && opcode != 0x67);
|
||||
case 0x70:
|
||||
return 0; /* can't boost conditional jump */
|
||||
case 0x90:
|
||||
return opcode != 0x9a; /* can't boost call far */
|
||||
case 0xc0:
|
||||
/* can't boost software-interruptions */
|
||||
return (0xc1 < opcode && opcode < 0xcc) || opcode == 0xcf;
|
||||
@@ -407,6 +409,8 @@ static int arch_copy_kprobe(struct kprobe *p)
|
||||
{
|
||||
int ret;
|
||||
|
||||
set_memory_rw((unsigned long)p->ainsn.insn & PAGE_MASK, 1);
|
||||
|
||||
/* Copy an instruction with recovering if other optprobe modifies it.*/
|
||||
ret = __copy_instruction(p->ainsn.insn, p->addr);
|
||||
if (!ret)
|
||||
@@ -421,6 +425,8 @@ static int arch_copy_kprobe(struct kprobe *p)
|
||||
else
|
||||
p->ainsn.boostable = -1;
|
||||
|
||||
set_memory_ro((unsigned long)p->ainsn.insn & PAGE_MASK, 1);
|
||||
|
||||
/* Check whether the instruction modifies Interrupt Flag or not */
|
||||
p->ainsn.if_modifier = is_IF_modifier(p->ainsn.insn);
|
||||
|
||||
|
||||
@@ -371,6 +371,7 @@ int arch_prepare_optimized_kprobe(struct optimized_kprobe *op,
|
||||
}
|
||||
|
||||
buf = (u8 *)op->optinsn.insn;
|
||||
set_memory_rw((unsigned long)buf & PAGE_MASK, 1);
|
||||
|
||||
/* Copy instructions into the out-of-line buffer */
|
||||
ret = copy_optimized_instructions(buf + TMPL_END_IDX, op->kp.addr);
|
||||
@@ -393,6 +394,8 @@ int arch_prepare_optimized_kprobe(struct optimized_kprobe *op,
|
||||
synthesize_reljump(buf + TMPL_END_IDX + op->optinsn.size,
|
||||
(u8 *)op->kp.addr + op->optinsn.size);
|
||||
|
||||
set_memory_ro((unsigned long)buf & PAGE_MASK, 1);
|
||||
|
||||
flush_icache_range((unsigned long) buf,
|
||||
(unsigned long) buf + TMPL_END_IDX +
|
||||
op->optinsn.size + RELATIVEJUMP_SIZE);
|
||||
|
||||
@@ -769,10 +769,11 @@ void machine_crash_shutdown(struct pt_regs *regs)
|
||||
#endif
|
||||
|
||||
|
||||
/* This is the CPU performing the emergency shutdown work. */
|
||||
int crashing_cpu = -1;
|
||||
|
||||
#if defined(CONFIG_SMP)
|
||||
|
||||
/* This keeps a track of which one is crashing cpu. */
|
||||
static int crashing_cpu;
|
||||
static nmi_shootdown_cb shootdown_callback;
|
||||
|
||||
static atomic_t waiting_for_crash_ipi;
|
||||
|
||||
@@ -287,4 +287,25 @@ void __init setup_per_cpu_areas(void)
|
||||
|
||||
/* Setup cpu initialized, callin, callout masks */
|
||||
setup_cpu_local_masks();
|
||||
|
||||
#ifdef CONFIG_X86_32
|
||||
/*
|
||||
* Sync back kernel address range again. We already did this in
|
||||
* setup_arch(), but percpu data also needs to be available in
|
||||
* the smpboot asm. We can't reliably pick up percpu mappings
|
||||
* using vmalloc_fault(), because exception dispatch needs
|
||||
* percpu data.
|
||||
*/
|
||||
clone_pgd_range(initial_page_table + KERNEL_PGD_BOUNDARY,
|
||||
swapper_pg_dir + KERNEL_PGD_BOUNDARY,
|
||||
KERNEL_PGD_PTRS);
|
||||
|
||||
/*
|
||||
* sync back low identity map too. It is used for example
|
||||
* in the 32-bit EFI stub.
|
||||
*/
|
||||
clone_pgd_range(initial_page_table,
|
||||
swapper_pg_dir + KERNEL_PGD_BOUNDARY,
|
||||
min(KERNEL_PGD_PTRS, KERNEL_PGD_BOUNDARY));
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#include <linux/uaccess.h>
|
||||
#include <linux/elf.h>
|
||||
|
||||
#include <asm/compat.h>
|
||||
#include <asm/ia32.h>
|
||||
#include <asm/syscalls.h>
|
||||
|
||||
@@ -100,7 +101,7 @@ out:
|
||||
static void find_start_end(unsigned long flags, unsigned long *begin,
|
||||
unsigned long *end)
|
||||
{
|
||||
if (!test_thread_flag(TIF_ADDR32) && (flags & MAP_32BIT)) {
|
||||
if (!in_compat_syscall() && (flags & MAP_32BIT)) {
|
||||
/* This is usually used needed to map code in small
|
||||
model, so it needs to be in the first 31bit. Limit
|
||||
it to that. This means we need to move the
|
||||
@@ -175,7 +176,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
|
||||
return addr;
|
||||
|
||||
/* for MAP_32BIT mappings we force the legacy mmap base */
|
||||
if (!test_thread_flag(TIF_ADDR32) && (flags & MAP_32BIT))
|
||||
if (!in_compat_syscall() && (flags & MAP_32BIT))
|
||||
goto bottomup;
|
||||
|
||||
/* requesting a specific address */
|
||||
|
||||
@@ -719,7 +719,8 @@ void handle_vm86_fault(struct kernel_vm86_regs *regs, long error_code)
|
||||
return;
|
||||
|
||||
check_vip:
|
||||
if (VEFLAGS & X86_EFLAGS_VIP) {
|
||||
if ((VEFLAGS & (X86_EFLAGS_VIP | X86_EFLAGS_VIF)) ==
|
||||
(X86_EFLAGS_VIP | X86_EFLAGS_VIF)) {
|
||||
save_v86_state(regs, VM86_STI);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -5449,6 +5449,12 @@ static inline void avic_post_state_restore(struct kvm_vcpu *vcpu)
|
||||
avic_handle_ldr_update(vcpu);
|
||||
}
|
||||
|
||||
static void svm_setup_mce(struct kvm_vcpu *vcpu)
|
||||
{
|
||||
/* [63:9] are reserved. */
|
||||
vcpu->arch.mcg_cap &= 0x1ff;
|
||||
}
|
||||
|
||||
static struct kvm_x86_ops svm_x86_ops __ro_after_init = {
|
||||
.cpu_has_kvm_support = has_svm,
|
||||
.disabled_by_bios = is_disabled,
|
||||
@@ -5564,6 +5570,7 @@ static struct kvm_x86_ops svm_x86_ops __ro_after_init = {
|
||||
.pmu_ops = &amd_pmu_ops,
|
||||
.deliver_posted_interrupt = svm_deliver_avic_intr,
|
||||
.update_pi_irte = svm_update_pi_irte,
|
||||
.setup_mce = svm_setup_mce,
|
||||
};
|
||||
|
||||
static int __init svm_init(void)
|
||||
|
||||
@@ -3070,7 +3070,8 @@ static int kvm_vcpu_ioctl_x86_set_vcpu_events(struct kvm_vcpu *vcpu,
|
||||
return -EINVAL;
|
||||
|
||||
if (events->exception.injected &&
|
||||
(events->exception.nr > 31 || events->exception.nr == NMI_VECTOR))
|
||||
(events->exception.nr > 31 || events->exception.nr == NMI_VECTOR ||
|
||||
is_guest_mode(vcpu)))
|
||||
return -EINVAL;
|
||||
|
||||
/* INITs are latched while in SMM */
|
||||
|
||||
@@ -343,7 +343,7 @@ static noinline int vmalloc_fault(unsigned long address)
|
||||
if (!pmd_k)
|
||||
return -1;
|
||||
|
||||
if (pmd_huge(*pmd_k))
|
||||
if (pmd_large(*pmd_k))
|
||||
return 0;
|
||||
|
||||
pte_k = pte_offset_kernel(pmd_k, address);
|
||||
@@ -463,7 +463,7 @@ static noinline int vmalloc_fault(unsigned long address)
|
||||
if (pud_none(*pud) || pud_pfn(*pud) != pud_pfn(*pud_ref))
|
||||
BUG();
|
||||
|
||||
if (pud_huge(*pud))
|
||||
if (pud_large(*pud))
|
||||
return 0;
|
||||
|
||||
pmd = pmd_offset(pud, address);
|
||||
@@ -474,7 +474,7 @@ static noinline int vmalloc_fault(unsigned long address)
|
||||
if (pmd_none(*pmd) || pmd_pfn(*pmd) != pmd_pfn(*pmd_ref))
|
||||
BUG();
|
||||
|
||||
if (pmd_huge(*pmd))
|
||||
if (pmd_large(*pmd))
|
||||
return 0;
|
||||
|
||||
pte_ref = pte_offset_kernel(pmd_ref, address);
|
||||
|
||||
@@ -1078,10 +1078,8 @@ int blkcg_init_queue(struct request_queue *q)
|
||||
if (preloaded)
|
||||
radix_tree_preload_end();
|
||||
|
||||
if (IS_ERR(blkg)) {
|
||||
blkg_free(new_blkg);
|
||||
if (IS_ERR(blkg))
|
||||
return PTR_ERR(blkg);
|
||||
}
|
||||
|
||||
q->root_blkg = blkg;
|
||||
q->root_rl.blkg = blkg;
|
||||
|
||||
@@ -499,6 +499,17 @@ static void throtl_dequeue_tg(struct throtl_grp *tg)
|
||||
static void throtl_schedule_pending_timer(struct throtl_service_queue *sq,
|
||||
unsigned long expires)
|
||||
{
|
||||
unsigned long max_expire = jiffies + 8 * throtl_slice;
|
||||
|
||||
/*
|
||||
* Since we are adjusting the throttle limit dynamically, the sleep
|
||||
* time calculated according to previous limit might be invalid. It's
|
||||
* possible the cgroup sleep time is very long and no other cgroups
|
||||
* have IO running so notify the limit changes. Make sure the cgroup
|
||||
* doesn't sleep too long to avoid the missed notification.
|
||||
*/
|
||||
if (time_after(expires, max_expire))
|
||||
expires = max_expire;
|
||||
mod_timer(&sq->pending_timer, expires);
|
||||
throtl_log(sq, "schedule timer. delay=%lu jiffies=%lu",
|
||||
expires - jiffies, jiffies);
|
||||
|
||||
@@ -871,6 +871,8 @@ void intel_gtt_insert_sg_entries(struct sg_table *st,
|
||||
}
|
||||
}
|
||||
wmb();
|
||||
if (intel_private.driver->chipset_flush)
|
||||
intel_private.driver->chipset_flush();
|
||||
}
|
||||
EXPORT_SYMBOL(intel_gtt_insert_sg_entries);
|
||||
|
||||
|
||||
@@ -572,7 +572,7 @@ static MESON_GATE(gxbb_pl301, HHI_GCLK_MPEG0, 6);
|
||||
static MESON_GATE(gxbb_periphs, HHI_GCLK_MPEG0, 7);
|
||||
static MESON_GATE(gxbb_spicc, HHI_GCLK_MPEG0, 8);
|
||||
static MESON_GATE(gxbb_i2c, HHI_GCLK_MPEG0, 9);
|
||||
static MESON_GATE(gxbb_sar_adc, HHI_GCLK_MPEG0, 10);
|
||||
static MESON_GATE(gxbb_sana, HHI_GCLK_MPEG0, 10);
|
||||
static MESON_GATE(gxbb_smart_card, HHI_GCLK_MPEG0, 11);
|
||||
static MESON_GATE(gxbb_rng0, HHI_GCLK_MPEG0, 12);
|
||||
static MESON_GATE(gxbb_uart0, HHI_GCLK_MPEG0, 13);
|
||||
@@ -623,7 +623,7 @@ static MESON_GATE(gxbb_usb0_ddr_bridge, HHI_GCLK_MPEG2, 9);
|
||||
static MESON_GATE(gxbb_mmc_pclk, HHI_GCLK_MPEG2, 11);
|
||||
static MESON_GATE(gxbb_dvin, HHI_GCLK_MPEG2, 12);
|
||||
static MESON_GATE(gxbb_uart2, HHI_GCLK_MPEG2, 15);
|
||||
static MESON_GATE(gxbb_sana, HHI_GCLK_MPEG2, 22);
|
||||
static MESON_GATE(gxbb_sar_adc, HHI_GCLK_MPEG2, 22);
|
||||
static MESON_GATE(gxbb_vpu_intr, HHI_GCLK_MPEG2, 25);
|
||||
static MESON_GATE(gxbb_sec_ahb_ahb3_bridge, HHI_GCLK_MPEG2, 26);
|
||||
static MESON_GATE(gxbb_clk81_a53, HHI_GCLK_MPEG2, 29);
|
||||
|
||||
@@ -1437,6 +1437,7 @@ static const struct freq_tbl ftbl_codec_clk[] = {
|
||||
|
||||
static struct clk_rcg2 codec_digcodec_clk_src = {
|
||||
.cmd_rcgr = 0x1c09c,
|
||||
.mnd_width = 8,
|
||||
.hid_width = 5,
|
||||
.parent_map = gcc_xo_gpll1_emclk_sleep_map,
|
||||
.freq_tbl = ftbl_codec_clk,
|
||||
|
||||
@@ -2984,7 +2984,7 @@ static struct gdsc vfe1_gdsc = {
|
||||
.cxcs = (unsigned int []){ 0x36ac },
|
||||
.cxc_count = 1,
|
||||
.pd = {
|
||||
.name = "vfe0",
|
||||
.name = "vfe1",
|
||||
},
|
||||
.parent = &camss_gdsc.pd,
|
||||
.pwrsts = PWRSTS_OFF_ON,
|
||||
|
||||
@@ -937,6 +937,21 @@ static int sdma_disable_channel(struct dma_chan *chan)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int sdma_disable_channel_with_delay(struct dma_chan *chan)
|
||||
{
|
||||
sdma_disable_channel(chan);
|
||||
|
||||
/*
|
||||
* According to NXP R&D team a delay of one BD SDMA cost time
|
||||
* (maximum is 1ms) should be added after disable of the channel
|
||||
* bit, to ensure SDMA core has really been stopped after SDMA
|
||||
* clients call .device_terminate_all.
|
||||
*/
|
||||
mdelay(1);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void sdma_set_watermarklevel_for_p2p(struct sdma_channel *sdmac)
|
||||
{
|
||||
struct sdma_engine *sdma = sdmac->sdma;
|
||||
@@ -1828,7 +1843,7 @@ static int sdma_probe(struct platform_device *pdev)
|
||||
sdma->dma_device.device_prep_slave_sg = sdma_prep_slave_sg;
|
||||
sdma->dma_device.device_prep_dma_cyclic = sdma_prep_dma_cyclic;
|
||||
sdma->dma_device.device_config = sdma_config;
|
||||
sdma->dma_device.device_terminate_all = sdma_disable_channel;
|
||||
sdma->dma_device.device_terminate_all = sdma_disable_channel_with_delay;
|
||||
sdma->dma_device.src_addr_widths = BIT(DMA_SLAVE_BUSWIDTH_4_BYTES);
|
||||
sdma->dma_device.dst_addr_widths = BIT(DMA_SLAVE_BUSWIDTH_4_BYTES);
|
||||
sdma->dma_device.directions = BIT(DMA_DEV_TO_MEM) | BIT(DMA_MEM_TO_DEV);
|
||||
|
||||
@@ -1020,13 +1020,23 @@ out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int socfpga_is_a10(void)
|
||||
{
|
||||
return of_machine_is_compatible("altr,socfpga-arria10");
|
||||
}
|
||||
|
||||
static int validate_parent_available(struct device_node *np);
|
||||
static const struct of_device_id altr_edac_a10_device_of_match[];
|
||||
static int __init __maybe_unused altr_init_a10_ecc_device_type(char *compat)
|
||||
{
|
||||
int irq;
|
||||
struct device_node *child, *np = of_find_compatible_node(NULL, NULL,
|
||||
"altr,socfpga-a10-ecc-manager");
|
||||
struct device_node *child, *np;
|
||||
|
||||
if (!socfpga_is_a10())
|
||||
return -ENODEV;
|
||||
|
||||
np = of_find_compatible_node(NULL, NULL,
|
||||
"altr,socfpga-a10-ecc-manager");
|
||||
if (!np) {
|
||||
edac_printk(KERN_ERR, EDAC_DEVICE, "ECC Manager not found\n");
|
||||
return -ENODEV;
|
||||
@@ -1542,8 +1552,12 @@ static const struct edac_device_prv_data a10_sdmmceccb_data = {
|
||||
static int __init socfpga_init_sdmmc_ecc(void)
|
||||
{
|
||||
int rc = -ENODEV;
|
||||
struct device_node *child = of_find_compatible_node(NULL, NULL,
|
||||
"altr,socfpga-sdmmc-ecc");
|
||||
struct device_node *child;
|
||||
|
||||
if (!socfpga_is_a10())
|
||||
return -ENODEV;
|
||||
|
||||
child = of_find_compatible_node(NULL, NULL, "altr,socfpga-sdmmc-ecc");
|
||||
if (!child) {
|
||||
edac_printk(KERN_WARNING, EDAC_DEVICE, "SDMMC node not found\n");
|
||||
return -ENODEV;
|
||||
|
||||
@@ -69,25 +69,18 @@ void amdgpu_connector_hotplug(struct drm_connector *connector)
|
||||
/* don't do anything if sink is not display port, i.e.,
|
||||
* passive dp->(dvi|hdmi) adaptor
|
||||
*/
|
||||
if (dig_connector->dp_sink_type == CONNECTOR_OBJECT_ID_DISPLAYPORT) {
|
||||
int saved_dpms = connector->dpms;
|
||||
/* Only turn off the display if it's physically disconnected */
|
||||
if (!amdgpu_display_hpd_sense(adev, amdgpu_connector->hpd.hpd)) {
|
||||
drm_helper_connector_dpms(connector, DRM_MODE_DPMS_OFF);
|
||||
} else if (amdgpu_atombios_dp_needs_link_train(amdgpu_connector)) {
|
||||
/* Don't try to start link training before we
|
||||
* have the dpcd */
|
||||
if (amdgpu_atombios_dp_get_dpcd(amdgpu_connector))
|
||||
return;
|
||||
if (dig_connector->dp_sink_type == CONNECTOR_OBJECT_ID_DISPLAYPORT &&
|
||||
amdgpu_display_hpd_sense(adev, amdgpu_connector->hpd.hpd) &&
|
||||
amdgpu_atombios_dp_needs_link_train(amdgpu_connector)) {
|
||||
/* Don't start link training before we have the DPCD */
|
||||
if (amdgpu_atombios_dp_get_dpcd(amdgpu_connector))
|
||||
return;
|
||||
|
||||
/* set it to OFF so that drm_helper_connector_dpms()
|
||||
* won't return immediately since the current state
|
||||
* is ON at this point.
|
||||
*/
|
||||
connector->dpms = DRM_MODE_DPMS_OFF;
|
||||
drm_helper_connector_dpms(connector, DRM_MODE_DPMS_ON);
|
||||
}
|
||||
connector->dpms = saved_dpms;
|
||||
/* Turn the connector off and back on immediately, which
|
||||
* will trigger link training
|
||||
*/
|
||||
drm_helper_connector_dpms(connector, DRM_MODE_DPMS_OFF);
|
||||
drm_helper_connector_dpms(connector, DRM_MODE_DPMS_ON);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -533,6 +533,12 @@ amdgpu_user_framebuffer_create(struct drm_device *dev,
|
||||
return ERR_PTR(-ENOENT);
|
||||
}
|
||||
|
||||
/* Handle is imported dma-buf, so cannot be migrated to VRAM for scanout */
|
||||
if (obj->import_attach) {
|
||||
DRM_DEBUG_KMS("Cannot create framebuffer from imported dma_buf\n");
|
||||
return ERR_PTR(-EINVAL);
|
||||
}
|
||||
|
||||
amdgpu_fb = kzalloc(sizeof(*amdgpu_fb), GFP_KERNEL);
|
||||
if (amdgpu_fb == NULL) {
|
||||
drm_gem_object_unreference_unlocked(obj);
|
||||
|
||||
@@ -36,8 +36,6 @@ void amdgpu_gem_object_free(struct drm_gem_object *gobj)
|
||||
struct amdgpu_bo *robj = gem_to_amdgpu_bo(gobj);
|
||||
|
||||
if (robj) {
|
||||
if (robj->gem_base.import_attach)
|
||||
drm_prime_gem_destroy(&robj->gem_base, robj->tbo.sg);
|
||||
amdgpu_mn_unregister(robj);
|
||||
amdgpu_bo_unref(&robj);
|
||||
}
|
||||
|
||||
@@ -94,6 +94,8 @@ static void amdgpu_ttm_bo_destroy(struct ttm_buffer_object *tbo)
|
||||
|
||||
amdgpu_update_memory_usage(bo->adev, &bo->tbo.mem, NULL);
|
||||
|
||||
if (bo->gem_base.import_attach)
|
||||
drm_prime_gem_destroy(&bo->gem_base, bo->tbo.sg);
|
||||
drm_gem_object_release(&bo->gem_base);
|
||||
amdgpu_bo_unref(&bo->parent);
|
||||
if (!list_empty(&bo->shadow_list)) {
|
||||
|
||||
@@ -519,11 +519,17 @@ static ssize_t sysprops_show(struct kobject *kobj, struct attribute *attr,
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void kfd_topology_kobj_release(struct kobject *kobj)
|
||||
{
|
||||
kfree(kobj);
|
||||
}
|
||||
|
||||
static const struct sysfs_ops sysprops_ops = {
|
||||
.show = sysprops_show,
|
||||
};
|
||||
|
||||
static struct kobj_type sysprops_type = {
|
||||
.release = kfd_topology_kobj_release,
|
||||
.sysfs_ops = &sysprops_ops,
|
||||
};
|
||||
|
||||
@@ -559,6 +565,7 @@ static const struct sysfs_ops iolink_ops = {
|
||||
};
|
||||
|
||||
static struct kobj_type iolink_type = {
|
||||
.release = kfd_topology_kobj_release,
|
||||
.sysfs_ops = &iolink_ops,
|
||||
};
|
||||
|
||||
@@ -586,6 +593,7 @@ static const struct sysfs_ops mem_ops = {
|
||||
};
|
||||
|
||||
static struct kobj_type mem_type = {
|
||||
.release = kfd_topology_kobj_release,
|
||||
.sysfs_ops = &mem_ops,
|
||||
};
|
||||
|
||||
@@ -625,6 +633,7 @@ static const struct sysfs_ops cache_ops = {
|
||||
};
|
||||
|
||||
static struct kobj_type cache_type = {
|
||||
.release = kfd_topology_kobj_release,
|
||||
.sysfs_ops = &cache_ops,
|
||||
};
|
||||
|
||||
@@ -747,6 +756,7 @@ static const struct sysfs_ops node_ops = {
|
||||
};
|
||||
|
||||
static struct kobj_type node_type = {
|
||||
.release = kfd_topology_kobj_release,
|
||||
.sysfs_ops = &node_ops,
|
||||
};
|
||||
|
||||
|
||||
@@ -3347,8 +3347,7 @@ EXPORT_SYMBOL(drm_edid_get_monitor_name);
|
||||
* @edid: EDID to parse
|
||||
*
|
||||
* Fill the ELD (EDID-Like Data) buffer for passing to the audio driver. The
|
||||
* Conn_Type, HDCP and Port_ID ELD fields are left for the graphics driver to
|
||||
* fill in.
|
||||
* HDCP and Port_ID ELD fields are left for the graphics driver to fill in.
|
||||
*/
|
||||
void drm_edid_to_eld(struct drm_connector *connector, struct edid *edid)
|
||||
{
|
||||
@@ -3426,6 +3425,12 @@ void drm_edid_to_eld(struct drm_connector *connector, struct edid *edid)
|
||||
}
|
||||
eld[5] |= total_sad_count << 4;
|
||||
|
||||
if (connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort ||
|
||||
connector->connector_type == DRM_MODE_CONNECTOR_eDP)
|
||||
eld[DRM_ELD_SAD_COUNT_CONN_TYPE] |= DRM_ELD_CONN_TYPE_DP;
|
||||
else
|
||||
eld[DRM_ELD_SAD_COUNT_CONN_TYPE] |= DRM_ELD_CONN_TYPE_HDMI;
|
||||
|
||||
eld[DRM_ELD_BASELINE_ELD_LEN] =
|
||||
DIV_ROUND_UP(drm_eld_calc_baseline_block_size(eld), 4);
|
||||
|
||||
|
||||
@@ -1202,9 +1202,9 @@ static void drm_vblank_put(struct drm_device *dev, unsigned int pipe)
|
||||
if (atomic_dec_and_test(&vblank->refcount)) {
|
||||
if (drm_vblank_offdelay == 0)
|
||||
return;
|
||||
else if (dev->vblank_disable_immediate || drm_vblank_offdelay < 0)
|
||||
else if (drm_vblank_offdelay < 0)
|
||||
vblank_disable_fn((unsigned long)vblank);
|
||||
else
|
||||
else if (!dev->vblank_disable_immediate)
|
||||
mod_timer(&vblank->disable_timer,
|
||||
jiffies + ((drm_vblank_offdelay * HZ)/1000));
|
||||
}
|
||||
@@ -1819,6 +1819,16 @@ bool drm_handle_vblank(struct drm_device *dev, unsigned int pipe)
|
||||
wake_up(&vblank->queue);
|
||||
drm_handle_vblank_events(dev, pipe);
|
||||
|
||||
/* With instant-off, we defer disabling the interrupt until after
|
||||
* we finish processing the following vblank. The disable has to
|
||||
* be last (after drm_handle_vblank_events) so that the timestamp
|
||||
* is always accurate.
|
||||
*/
|
||||
if (dev->vblank_disable_immediate &&
|
||||
drm_vblank_offdelay > 0 &&
|
||||
!atomic_read(&vblank->refcount))
|
||||
vblank_disable_fn((unsigned long)vblank);
|
||||
|
||||
spin_unlock_irqrestore(&dev->event_lock, irqflags);
|
||||
|
||||
return true;
|
||||
|
||||
@@ -387,9 +387,11 @@ static const struct drm_fb_helper_funcs qxl_fb_helper_funcs = {
|
||||
|
||||
int qxl_fbdev_init(struct qxl_device *qdev)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
#ifdef CONFIG_DRM_FBDEV_EMULATION
|
||||
struct qxl_fbdev *qfbdev;
|
||||
int bpp_sel = 32; /* TODO: parameter from somewhere? */
|
||||
int ret;
|
||||
|
||||
qfbdev = kzalloc(sizeof(struct qxl_fbdev), GFP_KERNEL);
|
||||
if (!qfbdev)
|
||||
@@ -423,6 +425,8 @@ fini:
|
||||
drm_fb_helper_fini(&qfbdev->helper);
|
||||
free:
|
||||
kfree(qfbdev);
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -438,6 +442,9 @@ void qxl_fbdev_fini(struct qxl_device *qdev)
|
||||
|
||||
void qxl_fbdev_set_suspend(struct qxl_device *qdev, int state)
|
||||
{
|
||||
if (!qdev->mode_info.qfbdev)
|
||||
return;
|
||||
|
||||
drm_fb_helper_set_suspend(&qdev->mode_info.qfbdev->helper, state);
|
||||
}
|
||||
|
||||
|
||||
@@ -1352,6 +1352,12 @@ radeon_user_framebuffer_create(struct drm_device *dev,
|
||||
return ERR_PTR(-ENOENT);
|
||||
}
|
||||
|
||||
/* Handle is imported dma-buf, so cannot be migrated to VRAM for scanout */
|
||||
if (obj->import_attach) {
|
||||
DRM_DEBUG_KMS("Cannot create framebuffer from imported dma_buf\n");
|
||||
return ERR_PTR(-EINVAL);
|
||||
}
|
||||
|
||||
radeon_fb = kzalloc(sizeof(*radeon_fb), GFP_KERNEL);
|
||||
if (radeon_fb == NULL) {
|
||||
drm_gem_object_unreference_unlocked(obj);
|
||||
|
||||
@@ -512,6 +512,13 @@ static void rcar_du_crtc_disable(struct drm_crtc *crtc)
|
||||
rcar_du_crtc_stop(rcrtc);
|
||||
rcar_du_crtc_put(rcrtc);
|
||||
|
||||
spin_lock_irq(&crtc->dev->event_lock);
|
||||
if (crtc->state->event) {
|
||||
drm_crtc_send_vblank_event(crtc, crtc->state->event);
|
||||
crtc->state->event = NULL;
|
||||
}
|
||||
spin_unlock_irq(&crtc->dev->event_lock);
|
||||
|
||||
rcrtc->outputs = 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -503,7 +503,7 @@ static int vop_enable(struct drm_crtc *crtc)
|
||||
ret = pm_runtime_get_sync(vop->dev);
|
||||
if (ret < 0) {
|
||||
dev_err(vop->dev, "failed to get pm runtime: %d\n", ret);
|
||||
goto err_put_pm_runtime;
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = clk_enable(vop->hclk);
|
||||
@@ -1348,10 +1348,16 @@ static int vop_initial(struct vop *vop)
|
||||
return PTR_ERR(vop->dclk);
|
||||
}
|
||||
|
||||
ret = pm_runtime_get_sync(vop->dev);
|
||||
if (ret < 0) {
|
||||
dev_err(vop->dev, "failed to get pm runtime: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = clk_prepare(vop->dclk);
|
||||
if (ret < 0) {
|
||||
dev_err(vop->dev, "failed to prepare dclk\n");
|
||||
return ret;
|
||||
goto err_put_pm_runtime;
|
||||
}
|
||||
|
||||
/* Enable both the hclk and aclk to setup the vop */
|
||||
@@ -1411,6 +1417,8 @@ static int vop_initial(struct vop *vop)
|
||||
|
||||
vop->is_enabled = false;
|
||||
|
||||
pm_runtime_put_sync(vop->dev);
|
||||
|
||||
return 0;
|
||||
|
||||
err_disable_aclk:
|
||||
@@ -1419,6 +1427,8 @@ err_disable_hclk:
|
||||
clk_disable_unprepare(vop->hclk);
|
||||
err_unprepare_dclk:
|
||||
clk_unprepare(vop->dclk);
|
||||
err_put_pm_runtime:
|
||||
pm_runtime_put_sync(vop->dev);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -1519,12 +1529,6 @@ static int vop_bind(struct device *dev, struct device *master, void *data)
|
||||
if (!vop->regsbak)
|
||||
return -ENOMEM;
|
||||
|
||||
ret = vop_initial(vop);
|
||||
if (ret < 0) {
|
||||
dev_err(&pdev->dev, "cannot initial vop dev - err %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
irq = platform_get_irq(pdev, 0);
|
||||
if (irq < 0) {
|
||||
dev_err(dev, "cannot find irq for vop\n");
|
||||
@@ -1551,8 +1555,17 @@ static int vop_bind(struct device *dev, struct device *master, void *data)
|
||||
|
||||
pm_runtime_enable(&pdev->dev);
|
||||
|
||||
ret = vop_initial(vop);
|
||||
if (ret < 0) {
|
||||
dev_err(&pdev->dev, "cannot initial vop dev - err %d\n", ret);
|
||||
goto err_disable_pm_runtime;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
err_disable_pm_runtime:
|
||||
pm_runtime_disable(&pdev->dev);
|
||||
vop_destroy_crtc(vop);
|
||||
err_enable_irq:
|
||||
enable_irq(vop->irq); /* To balance out the disable_irq above */
|
||||
return ret;
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include <linux/clk-provider.h>
|
||||
#include <linux/ioport.h>
|
||||
#include <linux/of_address.h>
|
||||
#include <linux/of_graph.h>
|
||||
#include <linux/of_irq.h>
|
||||
#include <linux/regmap.h>
|
||||
|
||||
@@ -136,5 +137,9 @@ struct sun4i_crtc *sun4i_crtc_init(struct drm_device *drm)
|
||||
|
||||
drm_crtc_helper_add(&scrtc->crtc, &sun4i_crtc_helper_funcs);
|
||||
|
||||
/* Set crtc.port to output port node of the tcon */
|
||||
scrtc->crtc.port = of_graph_get_port_by_id(drv->tcon->dev->of_node,
|
||||
1);
|
||||
|
||||
return scrtc;
|
||||
}
|
||||
|
||||
@@ -145,7 +145,7 @@ static int sun4i_drv_bind(struct device *dev)
|
||||
ret = component_bind_all(drm->dev, drm);
|
||||
if (ret) {
|
||||
dev_err(drm->dev, "Couldn't bind all pipelines components\n");
|
||||
goto free_drm;
|
||||
goto cleanup_mode_config;
|
||||
}
|
||||
|
||||
/* Create our layers */
|
||||
@@ -153,7 +153,7 @@ static int sun4i_drv_bind(struct device *dev)
|
||||
if (IS_ERR(drv->layers)) {
|
||||
dev_err(drm->dev, "Couldn't create the planes\n");
|
||||
ret = PTR_ERR(drv->layers);
|
||||
goto free_drm;
|
||||
goto cleanup_mode_config;
|
||||
}
|
||||
|
||||
/* Create our CRTC */
|
||||
@@ -161,7 +161,7 @@ static int sun4i_drv_bind(struct device *dev)
|
||||
if (!drv->crtc) {
|
||||
dev_err(drm->dev, "Couldn't create the CRTC\n");
|
||||
ret = -EINVAL;
|
||||
goto free_drm;
|
||||
goto cleanup_mode_config;
|
||||
}
|
||||
drm->irq_enabled = true;
|
||||
|
||||
@@ -173,7 +173,7 @@ static int sun4i_drv_bind(struct device *dev)
|
||||
if (IS_ERR(drv->fbdev)) {
|
||||
dev_err(drm->dev, "Couldn't create our framebuffer\n");
|
||||
ret = PTR_ERR(drv->fbdev);
|
||||
goto free_drm;
|
||||
goto cleanup_mode_config;
|
||||
}
|
||||
|
||||
/* Enable connectors polling */
|
||||
@@ -181,10 +181,16 @@ static int sun4i_drv_bind(struct device *dev)
|
||||
|
||||
ret = drm_dev_register(drm, 0);
|
||||
if (ret)
|
||||
goto free_drm;
|
||||
goto finish_poll;
|
||||
|
||||
return 0;
|
||||
|
||||
finish_poll:
|
||||
drm_kms_helper_poll_fini(drm);
|
||||
sun4i_framebuffer_free(drm);
|
||||
cleanup_mode_config:
|
||||
drm_mode_config_cleanup(drm);
|
||||
drm_vblank_cleanup(drm);
|
||||
free_drm:
|
||||
drm_dev_unref(drm);
|
||||
return ret;
|
||||
|
||||
@@ -336,12 +336,11 @@ static int sun4i_tcon_init_clocks(struct device *dev,
|
||||
}
|
||||
}
|
||||
|
||||
return sun4i_dclk_create(dev, tcon);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void sun4i_tcon_free_clocks(struct sun4i_tcon *tcon)
|
||||
{
|
||||
sun4i_dclk_free(tcon);
|
||||
clk_disable_unprepare(tcon->clk);
|
||||
}
|
||||
|
||||
@@ -506,22 +505,28 @@ static int sun4i_tcon_bind(struct device *dev, struct device *master,
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = sun4i_tcon_init_regmap(dev, tcon);
|
||||
if (ret) {
|
||||
dev_err(dev, "Couldn't init our TCON regmap\n");
|
||||
goto err_assert_reset;
|
||||
}
|
||||
|
||||
ret = sun4i_tcon_init_clocks(dev, tcon);
|
||||
if (ret) {
|
||||
dev_err(dev, "Couldn't init our TCON clocks\n");
|
||||
goto err_assert_reset;
|
||||
}
|
||||
|
||||
ret = sun4i_tcon_init_regmap(dev, tcon);
|
||||
if (ret) {
|
||||
dev_err(dev, "Couldn't init our TCON regmap\n");
|
||||
goto err_free_clocks;
|
||||
}
|
||||
|
||||
ret = sun4i_dclk_create(dev, tcon);
|
||||
if (ret) {
|
||||
dev_err(dev, "Couldn't create our TCON dot clock\n");
|
||||
goto err_free_clocks;
|
||||
}
|
||||
|
||||
ret = sun4i_tcon_init_irq(dev, tcon);
|
||||
if (ret) {
|
||||
dev_err(dev, "Couldn't init our TCON interrupts\n");
|
||||
goto err_free_clocks;
|
||||
goto err_free_dotclock;
|
||||
}
|
||||
|
||||
ret = sun4i_rgb_init(drm);
|
||||
@@ -530,6 +535,8 @@ static int sun4i_tcon_bind(struct device *dev, struct device *master,
|
||||
|
||||
return 0;
|
||||
|
||||
err_free_dotclock:
|
||||
sun4i_dclk_free(tcon);
|
||||
err_free_clocks:
|
||||
sun4i_tcon_free_clocks(tcon);
|
||||
err_assert_reset:
|
||||
@@ -542,6 +549,7 @@ static void sun4i_tcon_unbind(struct device *dev, struct device *master,
|
||||
{
|
||||
struct sun4i_tcon *tcon = dev_get_drvdata(dev);
|
||||
|
||||
sun4i_dclk_free(tcon);
|
||||
sun4i_tcon_free_clocks(tcon);
|
||||
}
|
||||
|
||||
|
||||
@@ -1209,18 +1209,20 @@ int ttm_bo_init(struct ttm_bo_device *bdev,
|
||||
if (likely(!ret))
|
||||
ret = ttm_bo_validate(bo, placement, interruptible, false);
|
||||
|
||||
if (!resv) {
|
||||
if (!resv)
|
||||
ttm_bo_unreserve(bo);
|
||||
|
||||
} else if (!(bo->mem.placement & TTM_PL_FLAG_NO_EVICT)) {
|
||||
if (unlikely(ret)) {
|
||||
ttm_bo_unref(&bo);
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (resv && !(bo->mem.placement & TTM_PL_FLAG_NO_EVICT)) {
|
||||
spin_lock(&bo->glob->lru_lock);
|
||||
ttm_bo_add_to_lru(bo);
|
||||
spin_unlock(&bo->glob->lru_lock);
|
||||
}
|
||||
|
||||
if (unlikely(ret))
|
||||
ttm_bo_unref(&bo);
|
||||
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL(ttm_bo_init);
|
||||
|
||||
@@ -433,7 +433,7 @@ static int vmw_fb_kms_detach(struct vmw_fb_par *par,
|
||||
set.y = 0;
|
||||
set.mode = NULL;
|
||||
set.fb = NULL;
|
||||
set.num_connectors = 1;
|
||||
set.num_connectors = 0;
|
||||
set.connectors = &par->con;
|
||||
ret = drm_mode_set_config_internal(&set);
|
||||
if (ret) {
|
||||
@@ -821,7 +821,9 @@ int vmw_fb_off(struct vmw_private *vmw_priv)
|
||||
flush_delayed_work(&par->local_work);
|
||||
|
||||
mutex_lock(&par->bo_mutex);
|
||||
drm_modeset_lock_all(vmw_priv->dev);
|
||||
(void) vmw_fb_kms_detach(par, true, false);
|
||||
drm_modeset_unlock_all(vmw_priv->dev);
|
||||
mutex_unlock(&par->bo_mutex);
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -42,6 +42,12 @@ static int elo_input_configured(struct hid_device *hdev,
|
||||
{
|
||||
struct input_dev *input = hidinput->input;
|
||||
|
||||
/*
|
||||
* ELO devices have one Button usage in GenDesk field, which makes
|
||||
* hid-input map it to BTN_LEFT; that confuses userspace, which then
|
||||
* considers the device to be a mouse/touchpad instead of touchscreen.
|
||||
*/
|
||||
clear_bit(BTN_LEFT, input->keybit);
|
||||
set_bit(BTN_TOUCH, input->keybit);
|
||||
set_bit(ABS_PRESSURE, input->absbit);
|
||||
input_set_abs_params(input, ABS_PRESSURE, 0, 256, 0, 0);
|
||||
|
||||
@@ -1149,18 +1149,26 @@ void hidinput_hid_event(struct hid_device *hid, struct hid_field *field, struct
|
||||
|
||||
/*
|
||||
* Ignore out-of-range values as per HID specification,
|
||||
* section 5.10 and 6.2.25.
|
||||
* section 5.10 and 6.2.25, when NULL state bit is present.
|
||||
* When it's not, clamp the value to match Microsoft's input
|
||||
* driver as mentioned in "Required HID usages for digitizers":
|
||||
* https://msdn.microsoft.com/en-us/library/windows/hardware/dn672278(v=vs.85).asp
|
||||
*
|
||||
* The logical_minimum < logical_maximum check is done so that we
|
||||
* don't unintentionally discard values sent by devices which
|
||||
* don't specify logical min and max.
|
||||
*/
|
||||
if ((field->flags & HID_MAIN_ITEM_VARIABLE) &&
|
||||
(field->logical_minimum < field->logical_maximum) &&
|
||||
(value < field->logical_minimum ||
|
||||
value > field->logical_maximum)) {
|
||||
dbg_hid("Ignoring out-of-range value %x\n", value);
|
||||
return;
|
||||
(field->logical_minimum < field->logical_maximum)) {
|
||||
if (field->flags & HID_MAIN_ITEM_NULL_STATE &&
|
||||
(value < field->logical_minimum ||
|
||||
value > field->logical_maximum)) {
|
||||
dbg_hid("Ignoring out-of-range value %x\n", value);
|
||||
return;
|
||||
}
|
||||
value = clamp(value,
|
||||
field->logical_minimum,
|
||||
field->logical_maximum);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -101,8 +101,8 @@ static const struct coefficients adm1075_coefficients[] = {
|
||||
[0] = { 27169, 0, -1 }, /* voltage */
|
||||
[1] = { 806, 20475, -1 }, /* current, irange25 */
|
||||
[2] = { 404, 20475, -1 }, /* current, irange50 */
|
||||
[3] = { 0, -1, 8549 }, /* power, irange25 */
|
||||
[4] = { 0, -1, 4279 }, /* power, irange50 */
|
||||
[3] = { 8549, 0, -1 }, /* power, irange25 */
|
||||
[4] = { 4279, 0, -1 }, /* power, irange50 */
|
||||
};
|
||||
|
||||
static const struct coefficients adm1275_coefficients[] = {
|
||||
|
||||
@@ -149,7 +149,7 @@ struct coresight_platform_data *of_get_coresight_platform_data(
|
||||
continue;
|
||||
|
||||
/* The local out port number */
|
||||
pdata->outports[i] = endpoint.id;
|
||||
pdata->outports[i] = endpoint.port;
|
||||
|
||||
/*
|
||||
* Get a handle on the remote port and parent
|
||||
|
||||
@@ -9489,8 +9489,11 @@ static int test_qsfp_read(struct hfi1_pportdata *ppd)
|
||||
int ret;
|
||||
u8 status;
|
||||
|
||||
/* report success if not a QSFP */
|
||||
if (ppd->port_type != PORT_TYPE_QSFP)
|
||||
/*
|
||||
* Report success if not a QSFP or, if it is a QSFP, but the cable is
|
||||
* not present
|
||||
*/
|
||||
if (ppd->port_type != PORT_TYPE_QSFP || !qsfp_mod_present(ppd))
|
||||
return 0;
|
||||
|
||||
/* read byte 2, the status byte */
|
||||
|
||||
@@ -274,9 +274,18 @@ static const struct i2c_device_id qt1070_id[] = {
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, qt1070_id);
|
||||
|
||||
#ifdef CONFIG_OF
|
||||
static const struct of_device_id qt1070_of_match[] = {
|
||||
{ .compatible = "qt1070", },
|
||||
{ },
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, qt1070_of_match);
|
||||
#endif
|
||||
|
||||
static struct i2c_driver qt1070_driver = {
|
||||
.driver = {
|
||||
.name = "qt1070",
|
||||
.of_match_table = of_match_ptr(qt1070_of_match),
|
||||
.pm = &qt1070_pm_ops,
|
||||
},
|
||||
.id_table = qt1070_id,
|
||||
|
||||
@@ -455,6 +455,14 @@ static int tsc2007_probe(struct i2c_client *client,
|
||||
|
||||
tsc2007_stop(ts);
|
||||
|
||||
/* power down the chip (TSC2007_SETUP does not ACK on I2C) */
|
||||
err = tsc2007_xfer(ts, PWRDOWN);
|
||||
if (err < 0) {
|
||||
dev_err(&client->dev,
|
||||
"Failed to setup chip: %d\n", err);
|
||||
return err; /* usually, chip does not respond */
|
||||
}
|
||||
|
||||
err = input_register_device(input_dev);
|
||||
if (err) {
|
||||
dev_err(&client->dev,
|
||||
|
||||
@@ -138,7 +138,7 @@ static int __alloc_and_insert_iova_range(struct iova_domain *iovad,
|
||||
break; /* found a free slot */
|
||||
}
|
||||
adjust_limit_pfn:
|
||||
limit_pfn = curr_iova->pfn_lo - 1;
|
||||
limit_pfn = curr_iova->pfn_lo ? (curr_iova->pfn_lo - 1) : 0;
|
||||
move_left:
|
||||
prev = curr;
|
||||
curr = rb_prev(curr);
|
||||
|
||||
@@ -684,7 +684,7 @@ static struct irq_chip its_irq_chip = {
|
||||
* This gives us (((1UL << id_bits) - 8192) >> 5) possible allocations.
|
||||
*/
|
||||
#define IRQS_PER_CHUNK_SHIFT 5
|
||||
#define IRQS_PER_CHUNK (1 << IRQS_PER_CHUNK_SHIFT)
|
||||
#define IRQS_PER_CHUNK (1UL << IRQS_PER_CHUNK_SHIFT)
|
||||
|
||||
static unsigned long *lpi_bitmap;
|
||||
static u32 lpi_chunks;
|
||||
@@ -1320,11 +1320,10 @@ static struct its_device *its_create_device(struct its_node *its, u32 dev_id,
|
||||
|
||||
dev = kzalloc(sizeof(*dev), GFP_KERNEL);
|
||||
/*
|
||||
* At least one bit of EventID is being used, hence a minimum
|
||||
* of two entries. No, the architecture doesn't let you
|
||||
* express an ITT with a single entry.
|
||||
* We allocate at least one chunk worth of LPIs bet device,
|
||||
* and thus that many ITEs. The device may require less though.
|
||||
*/
|
||||
nr_ites = max(2UL, roundup_pow_of_two(nvecs));
|
||||
nr_ites = max(IRQS_PER_CHUNK, roundup_pow_of_two(nvecs));
|
||||
sz = nr_ites * its->ite_size;
|
||||
sz = max(sz, ITS_ITT_ALIGN) + ITS_ITT_ALIGN - 1;
|
||||
itt = kzalloc(sz, GFP_KERNEL);
|
||||
|
||||
@@ -106,7 +106,7 @@ static int pm8058_led_probe(struct platform_device *pdev)
|
||||
if (!led)
|
||||
return -ENOMEM;
|
||||
|
||||
led->ledtype = (u32)of_device_get_match_data(&pdev->dev);
|
||||
led->ledtype = (u32)(unsigned long)of_device_get_match_data(&pdev->dev);
|
||||
|
||||
map = dev_get_regmap(pdev->dev.parent, NULL);
|
||||
if (!map) {
|
||||
|
||||
@@ -4826,8 +4826,10 @@ array_size_store(struct mddev *mddev, const char *buf, size_t len)
|
||||
return err;
|
||||
|
||||
/* cluster raid doesn't support change array_sectors */
|
||||
if (mddev_is_clustered(mddev))
|
||||
if (mddev_is_clustered(mddev)) {
|
||||
mddev_unlock(mddev);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (strncmp(buf, "default", 7) == 0) {
|
||||
if (mddev->pers)
|
||||
|
||||
@@ -3391,9 +3391,20 @@ static int fetch_block(struct stripe_head *sh, struct stripe_head_state *s,
|
||||
BUG_ON(test_bit(R5_Wantcompute, &dev->flags));
|
||||
BUG_ON(test_bit(R5_Wantread, &dev->flags));
|
||||
BUG_ON(sh->batch_head);
|
||||
|
||||
/*
|
||||
* In the raid6 case if the only non-uptodate disk is P
|
||||
* then we already trusted P to compute the other failed
|
||||
* drives. It is safe to compute rather than re-read P.
|
||||
* In other cases we only compute blocks from failed
|
||||
* devices, otherwise check/repair might fail to detect
|
||||
* a real inconsistency.
|
||||
*/
|
||||
|
||||
if ((s->uptodate == disks - 1) &&
|
||||
((sh->qd_idx >= 0 && sh->pd_idx == disk_idx) ||
|
||||
(s->failed && (disk_idx == s->failed_num[0] ||
|
||||
disk_idx == s->failed_num[1]))) {
|
||||
disk_idx == s->failed_num[1])))) {
|
||||
/* have disk failed, and we're requested to fetch it;
|
||||
* do compute it
|
||||
*/
|
||||
|
||||
@@ -1033,7 +1033,7 @@ static int ov6650_probe(struct i2c_client *client,
|
||||
priv->code = MEDIA_BUS_FMT_YUYV8_2X8;
|
||||
priv->colorspace = V4L2_COLORSPACE_JPEG;
|
||||
|
||||
priv->clk = v4l2_clk_get(&client->dev, "mclk");
|
||||
priv->clk = v4l2_clk_get(&client->dev, NULL);
|
||||
if (IS_ERR(priv->clk)) {
|
||||
ret = PTR_ERR(priv->clk);
|
||||
goto eclkget;
|
||||
|
||||
@@ -341,6 +341,17 @@ static void solo_stop_streaming(struct vb2_queue *q)
|
||||
struct solo_dev *solo_dev = vb2_get_drv_priv(q);
|
||||
|
||||
solo_stop_thread(solo_dev);
|
||||
|
||||
spin_lock(&solo_dev->slock);
|
||||
while (!list_empty(&solo_dev->vidq_active)) {
|
||||
struct solo_vb2_buf *buf = list_entry(
|
||||
solo_dev->vidq_active.next,
|
||||
struct solo_vb2_buf, list);
|
||||
|
||||
list_del(&buf->list);
|
||||
vb2_buffer_done(&buf->vb.vb2_buf, VB2_BUF_STATE_ERROR);
|
||||
}
|
||||
spin_unlock(&solo_dev->slock);
|
||||
INIT_LIST_HEAD(&solo_dev->vidq_active);
|
||||
}
|
||||
|
||||
|
||||
@@ -596,6 +596,7 @@ int vsp1_drm_init(struct vsp1_device *vsp1)
|
||||
pipe->bru = &vsp1->bru->entity;
|
||||
pipe->lif = &vsp1->lif->entity;
|
||||
pipe->output = vsp1->wpf[0];
|
||||
pipe->output->pipe = pipe;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -509,7 +509,13 @@ static int __maybe_unused vsp1_pm_suspend(struct device *dev)
|
||||
{
|
||||
struct vsp1_device *vsp1 = dev_get_drvdata(dev);
|
||||
|
||||
vsp1_pipelines_suspend(vsp1);
|
||||
/*
|
||||
* When used as part of a display pipeline, the VSP is stopped and
|
||||
* restarted explicitly by the DU.
|
||||
*/
|
||||
if (!vsp1->drm)
|
||||
vsp1_pipelines_suspend(vsp1);
|
||||
|
||||
pm_runtime_force_suspend(vsp1->dev);
|
||||
|
||||
return 0;
|
||||
@@ -520,7 +526,13 @@ static int __maybe_unused vsp1_pm_resume(struct device *dev)
|
||||
struct vsp1_device *vsp1 = dev_get_drvdata(dev);
|
||||
|
||||
pm_runtime_force_resume(vsp1->dev);
|
||||
vsp1_pipelines_resume(vsp1);
|
||||
|
||||
/*
|
||||
* When used as part of a display pipeline, the VSP is stopped and
|
||||
* restarted explicitly by the DU.
|
||||
*/
|
||||
if (!vsp1->drm)
|
||||
vsp1_pipelines_resume(vsp1);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -792,6 +792,7 @@ static int vsp1_video_start_streaming(struct vb2_queue *vq, unsigned int count)
|
||||
{
|
||||
struct vsp1_video *video = vb2_get_drv_priv(vq);
|
||||
struct vsp1_pipeline *pipe = video->rwpf->pipe;
|
||||
bool start_pipeline = false;
|
||||
unsigned long flags;
|
||||
int ret;
|
||||
|
||||
@@ -802,11 +803,23 @@ static int vsp1_video_start_streaming(struct vb2_queue *vq, unsigned int count)
|
||||
mutex_unlock(&pipe->lock);
|
||||
return ret;
|
||||
}
|
||||
|
||||
start_pipeline = true;
|
||||
}
|
||||
|
||||
pipe->stream_count++;
|
||||
mutex_unlock(&pipe->lock);
|
||||
|
||||
/*
|
||||
* vsp1_pipeline_ready() is not sufficient to establish that all streams
|
||||
* are prepared and the pipeline is configured, as multiple streams
|
||||
* can race through streamon with buffers already queued; Therefore we
|
||||
* don't even attempt to start the pipeline until the last stream has
|
||||
* called through here.
|
||||
*/
|
||||
if (!start_pipeline)
|
||||
return 0;
|
||||
|
||||
spin_lock_irqsave(&pipe->irqlock, flags);
|
||||
if (vsp1_pipeline_ready(pipe))
|
||||
vsp1_video_pipeline_run(pipe);
|
||||
|
||||
@@ -812,7 +812,7 @@ static int cpia2_querybuf(struct file *file, void *fh, struct v4l2_buffer *buf)
|
||||
struct camera_data *cam = video_drvdata(file);
|
||||
|
||||
if(buf->type != V4L2_BUF_TYPE_VIDEO_CAPTURE ||
|
||||
buf->index > cam->num_frames)
|
||||
buf->index >= cam->num_frames)
|
||||
return -EINVAL;
|
||||
|
||||
buf->m.offset = cam->buffers[buf->index].data - cam->frame_buffer;
|
||||
@@ -863,7 +863,7 @@ static int cpia2_qbuf(struct file *file, void *fh, struct v4l2_buffer *buf)
|
||||
|
||||
if(buf->type != V4L2_BUF_TYPE_VIDEO_CAPTURE ||
|
||||
buf->memory != V4L2_MEMORY_MMAP ||
|
||||
buf->index > cam->num_frames)
|
||||
buf->index >= cam->num_frames)
|
||||
return -EINVAL;
|
||||
|
||||
DBG("QBUF #%d\n", buf->index);
|
||||
|
||||
@@ -65,6 +65,8 @@ lkdtm-$(CONFIG_LKDTM) += lkdtm_rodata_objcopy.o
|
||||
lkdtm-$(CONFIG_LKDTM) += lkdtm_usercopy.o
|
||||
|
||||
CFLAGS_lkdtm_rodata.o += $(DISABLE_LTO)
|
||||
KCOV_INSTRUMENT_lkdtm_rodata.o := n
|
||||
|
||||
OBJCOPYFLAGS :=
|
||||
OBJCOPYFLAGS_lkdtm_rodata_objcopy.o := \
|
||||
--set-section-flags .text=alloc,readonly \
|
||||
|
||||
@@ -148,7 +148,7 @@ enclosure_register(struct device *dev, const char *name, int components,
|
||||
for (i = 0; i < components; i++) {
|
||||
edev->component[i].number = -1;
|
||||
edev->component[i].slot = -1;
|
||||
edev->component[i].power_status = 1;
|
||||
edev->component[i].power_status = -1;
|
||||
}
|
||||
|
||||
mutex_lock(&container_list_lock);
|
||||
@@ -600,6 +600,11 @@ static ssize_t get_component_power_status(struct device *cdev,
|
||||
|
||||
if (edev->cb->get_power_status)
|
||||
edev->cb->get_power_status(edev, ecomp);
|
||||
|
||||
/* If still uninitialized, the callback failed or does not exist. */
|
||||
if (ecomp->power_status == -1)
|
||||
return (edev->cb->get_power_status) ? -EIO : -ENOTTY;
|
||||
|
||||
return snprintf(buf, 40, "%s\n", ecomp->power_status ? "on" : "off");
|
||||
}
|
||||
|
||||
|
||||
@@ -907,6 +907,13 @@ static int fsl_ifc_chip_init(struct fsl_ifc_mtd *priv)
|
||||
if (ctrl->version == FSL_IFC_VERSION_1_1_0)
|
||||
fsl_ifc_sram_init(priv);
|
||||
|
||||
/*
|
||||
* As IFC version 2.0.0 has 16KB of internal SRAM as compared to older
|
||||
* versions which had 8KB. Hence bufnum mask needs to be updated.
|
||||
*/
|
||||
if (ctrl->version >= FSL_IFC_VERSION_2_0_0)
|
||||
priv->bufnum_mask = (priv->bufnum_mask * 2) + 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -715,7 +715,8 @@ static void nand_command(struct mtd_info *mtd, unsigned int command,
|
||||
chip->cmd_ctrl(mtd, readcmd, ctrl);
|
||||
ctrl &= ~NAND_CTRL_CHANGE;
|
||||
}
|
||||
chip->cmd_ctrl(mtd, command, ctrl);
|
||||
if (command != NAND_CMD_NONE)
|
||||
chip->cmd_ctrl(mtd, command, ctrl);
|
||||
|
||||
/* Address cycle, when necessary */
|
||||
ctrl = NAND_CTRL_ALE | NAND_CTRL_CHANGE;
|
||||
@@ -744,6 +745,7 @@ static void nand_command(struct mtd_info *mtd, unsigned int command,
|
||||
*/
|
||||
switch (command) {
|
||||
|
||||
case NAND_CMD_NONE:
|
||||
case NAND_CMD_PAGEPROG:
|
||||
case NAND_CMD_ERASE1:
|
||||
case NAND_CMD_ERASE2:
|
||||
@@ -806,7 +808,9 @@ static void nand_command_lp(struct mtd_info *mtd, unsigned int command,
|
||||
}
|
||||
|
||||
/* Command latch cycle */
|
||||
chip->cmd_ctrl(mtd, command, NAND_NCE | NAND_CLE | NAND_CTRL_CHANGE);
|
||||
if (command != NAND_CMD_NONE)
|
||||
chip->cmd_ctrl(mtd, command,
|
||||
NAND_NCE | NAND_CLE | NAND_CTRL_CHANGE);
|
||||
|
||||
if (column != -1 || page_addr != -1) {
|
||||
int ctrl = NAND_CTRL_CHANGE | NAND_NCE | NAND_ALE;
|
||||
@@ -842,6 +846,7 @@ static void nand_command_lp(struct mtd_info *mtd, unsigned int command,
|
||||
*/
|
||||
switch (command) {
|
||||
|
||||
case NAND_CMD_NONE:
|
||||
case NAND_CMD_CACHEDPROG:
|
||||
case NAND_CMD_PAGEPROG:
|
||||
case NAND_CMD_ERASE1:
|
||||
|
||||
@@ -371,9 +371,10 @@ down:
|
||||
/* Get link speed and duplex from the slave's base driver
|
||||
* using ethtool. If for some reason the call fails or the
|
||||
* values are invalid, set speed and duplex to -1,
|
||||
* and return.
|
||||
* and return. Return 1 if speed or duplex settings are
|
||||
* UNKNOWN; 0 otherwise.
|
||||
*/
|
||||
static void bond_update_speed_duplex(struct slave *slave)
|
||||
static int bond_update_speed_duplex(struct slave *slave)
|
||||
{
|
||||
struct net_device *slave_dev = slave->dev;
|
||||
struct ethtool_link_ksettings ecmd;
|
||||
@@ -383,24 +384,27 @@ static void bond_update_speed_duplex(struct slave *slave)
|
||||
slave->duplex = DUPLEX_UNKNOWN;
|
||||
|
||||
res = __ethtool_get_link_ksettings(slave_dev, &ecmd);
|
||||
if (res < 0)
|
||||
return;
|
||||
|
||||
if (ecmd.base.speed == 0 || ecmd.base.speed == ((__u32)-1))
|
||||
return;
|
||||
|
||||
if (res < 0) {
|
||||
slave->link = BOND_LINK_DOWN;
|
||||
return 1;
|
||||
}
|
||||
if (ecmd.base.speed == 0 || ecmd.base.speed == ((__u32)-1)) {
|
||||
slave->link = BOND_LINK_DOWN;
|
||||
return 1;
|
||||
}
|
||||
switch (ecmd.base.duplex) {
|
||||
case DUPLEX_FULL:
|
||||
case DUPLEX_HALF:
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
slave->link = BOND_LINK_DOWN;
|
||||
return 1;
|
||||
}
|
||||
|
||||
slave->speed = ecmd.base.speed;
|
||||
slave->duplex = ecmd.base.duplex;
|
||||
|
||||
return;
|
||||
return 0;
|
||||
}
|
||||
|
||||
const char *bond_slave_link_status(s8 link)
|
||||
@@ -3327,12 +3331,17 @@ static void bond_fold_stats(struct rtnl_link_stats64 *_res,
|
||||
for (i = 0; i < sizeof(*_res) / sizeof(u64); i++) {
|
||||
u64 nv = new[i];
|
||||
u64 ov = old[i];
|
||||
s64 delta = nv - ov;
|
||||
|
||||
/* detects if this particular field is 32bit only */
|
||||
if (((nv | ov) >> 32) == 0)
|
||||
res[i] += (u32)nv - (u32)ov;
|
||||
else
|
||||
res[i] += nv - ov;
|
||||
delta = (s64)(s32)((u32)nv - (u32)ov);
|
||||
|
||||
/* filter anomalies, some drivers reset their stats
|
||||
* at down/up events.
|
||||
*/
|
||||
if (delta > 0)
|
||||
res[i] += delta;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -560,6 +560,7 @@ static void xgene_enet_cle_bypass(struct xgene_enet_pdata *pdata,
|
||||
xgene_enet_rd_csr(pdata, CLE_BYPASS_REG0_0_ADDR, &cb);
|
||||
cb |= CFG_CLE_BYPASS_EN0;
|
||||
CFG_CLE_IP_PROTOCOL0_SET(&cb, 3);
|
||||
CFG_CLE_IP_HDR_LEN_SET(&cb, 0);
|
||||
xgene_enet_wr_csr(pdata, CLE_BYPASS_REG0_0_ADDR, cb);
|
||||
|
||||
xgene_enet_rd_csr(pdata, CLE_BYPASS_REG1_0_ADDR, &cb);
|
||||
|
||||
@@ -163,6 +163,7 @@ enum xgene_enet_rm {
|
||||
#define CFG_RXCLK_MUXSEL0_SET(dst, val) xgene_set_bits(dst, val, 26, 3)
|
||||
|
||||
#define CFG_CLE_IP_PROTOCOL0_SET(dst, val) xgene_set_bits(dst, val, 16, 2)
|
||||
#define CFG_CLE_IP_HDR_LEN_SET(dst, val) xgene_set_bits(dst, val, 8, 5)
|
||||
#define CFG_CLE_DSTQID0_SET(dst, val) xgene_set_bits(dst, val, 0, 12)
|
||||
#define CFG_CLE_FPSEL0_SET(dst, val) xgene_set_bits(dst, val, 16, 4)
|
||||
#define CFG_MACMODE_SET(dst, val) xgene_set_bits(dst, val, 18, 2)
|
||||
|
||||
@@ -505,14 +505,24 @@ static netdev_tx_t xgene_enet_start_xmit(struct sk_buff *skb,
|
||||
return NETDEV_TX_OK;
|
||||
}
|
||||
|
||||
static void xgene_enet_skip_csum(struct sk_buff *skb)
|
||||
static void xgene_enet_rx_csum(struct sk_buff *skb)
|
||||
{
|
||||
struct net_device *ndev = skb->dev;
|
||||
struct iphdr *iph = ip_hdr(skb);
|
||||
|
||||
if (!ip_is_fragment(iph) ||
|
||||
(iph->protocol != IPPROTO_TCP && iph->protocol != IPPROTO_UDP)) {
|
||||
skb->ip_summed = CHECKSUM_UNNECESSARY;
|
||||
}
|
||||
if (!(ndev->features & NETIF_F_RXCSUM))
|
||||
return;
|
||||
|
||||
if (skb->protocol != htons(ETH_P_IP))
|
||||
return;
|
||||
|
||||
if (ip_is_fragment(iph))
|
||||
return;
|
||||
|
||||
if (iph->protocol != IPPROTO_TCP && iph->protocol != IPPROTO_UDP)
|
||||
return;
|
||||
|
||||
skb->ip_summed = CHECKSUM_UNNECESSARY;
|
||||
}
|
||||
|
||||
static int xgene_enet_rx_frame(struct xgene_enet_desc_ring *rx_ring,
|
||||
@@ -537,9 +547,9 @@ static int xgene_enet_rx_frame(struct xgene_enet_desc_ring *rx_ring,
|
||||
buf_pool->rx_skb[skb_index] = NULL;
|
||||
|
||||
/* checking for error */
|
||||
status = (GET_VAL(ELERR, le64_to_cpu(raw_desc->m0)) << LERR_LEN) ||
|
||||
status = (GET_VAL(ELERR, le64_to_cpu(raw_desc->m0)) << LERR_LEN) |
|
||||
GET_VAL(LERR, le64_to_cpu(raw_desc->m0));
|
||||
if (unlikely(status > 2)) {
|
||||
if (unlikely(status)) {
|
||||
dev_kfree_skb_any(skb);
|
||||
xgene_enet_parse_error(rx_ring, netdev_priv(rx_ring->ndev),
|
||||
status);
|
||||
@@ -555,10 +565,7 @@ static int xgene_enet_rx_frame(struct xgene_enet_desc_ring *rx_ring,
|
||||
|
||||
skb_checksum_none_assert(skb);
|
||||
skb->protocol = eth_type_trans(skb, ndev);
|
||||
if (likely((ndev->features & NETIF_F_IP_CSUM) &&
|
||||
skb->protocol == htons(ETH_P_IP))) {
|
||||
xgene_enet_skip_csum(skb);
|
||||
}
|
||||
xgene_enet_rx_csum(skb);
|
||||
|
||||
rx_ring->rx_packets++;
|
||||
rx_ring->rx_bytes += datalen;
|
||||
@@ -1725,7 +1732,7 @@ static int xgene_enet_probe(struct platform_device *pdev)
|
||||
xgene_enet_setup_ops(pdata);
|
||||
|
||||
if (pdata->phy_mode == PHY_INTERFACE_MODE_XGMII) {
|
||||
ndev->features |= NETIF_F_TSO;
|
||||
ndev->features |= NETIF_F_TSO | NETIF_F_RXCSUM;
|
||||
spin_lock_init(&pdata->mss_lock);
|
||||
}
|
||||
ndev->hw_features = ndev->features;
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include <linux/bcma/bcma.h>
|
||||
#include <linux/brcmphy.h>
|
||||
#include <linux/etherdevice.h>
|
||||
#include <linux/of_net.h>
|
||||
#include "bgmac.h"
|
||||
|
||||
static inline bool bgmac_is_bcm4707_family(struct bcma_device *core)
|
||||
@@ -96,7 +97,7 @@ static int bgmac_probe(struct bcma_device *core)
|
||||
struct ssb_sprom *sprom = &core->bus->sprom;
|
||||
struct mii_bus *mii_bus;
|
||||
struct bgmac *bgmac;
|
||||
u8 *mac;
|
||||
const u8 *mac = NULL;
|
||||
int err;
|
||||
|
||||
bgmac = kzalloc(sizeof(*bgmac), GFP_KERNEL);
|
||||
@@ -110,21 +111,27 @@ static int bgmac_probe(struct bcma_device *core)
|
||||
|
||||
bcma_set_drvdata(core, bgmac);
|
||||
|
||||
switch (core->core_unit) {
|
||||
case 0:
|
||||
mac = sprom->et0mac;
|
||||
break;
|
||||
case 1:
|
||||
mac = sprom->et1mac;
|
||||
break;
|
||||
case 2:
|
||||
mac = sprom->et2mac;
|
||||
break;
|
||||
default:
|
||||
dev_err(bgmac->dev, "Unsupported core_unit %d\n",
|
||||
core->core_unit);
|
||||
err = -ENOTSUPP;
|
||||
goto err;
|
||||
if (bgmac->dev->of_node)
|
||||
mac = of_get_mac_address(bgmac->dev->of_node);
|
||||
|
||||
/* If no MAC address assigned via device tree, check SPROM */
|
||||
if (!mac) {
|
||||
switch (core->core_unit) {
|
||||
case 0:
|
||||
mac = sprom->et0mac;
|
||||
break;
|
||||
case 1:
|
||||
mac = sprom->et1mac;
|
||||
break;
|
||||
case 2:
|
||||
mac = sprom->et2mac;
|
||||
break;
|
||||
default:
|
||||
dev_err(bgmac->dev, "Unsupported core_unit %d\n",
|
||||
core->core_unit);
|
||||
err = -ENOTSUPP;
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
|
||||
ether_addr_copy(bgmac->mac_addr, mac);
|
||||
|
||||
@@ -1498,12 +1498,16 @@ static int bnxt_async_event_process(struct bnxt *bp,
|
||||
|
||||
if (BNXT_VF(bp))
|
||||
goto async_event_process_exit;
|
||||
if (data1 & 0x20000) {
|
||||
|
||||
/* print unsupported speed warning in forced speed mode only */
|
||||
if (!(link_info->autoneg & BNXT_AUTONEG_SPEED) &&
|
||||
(data1 & 0x20000)) {
|
||||
u16 fw_speed = link_info->force_link_speed;
|
||||
u32 speed = bnxt_fw_to_ethtool_speed(fw_speed);
|
||||
|
||||
netdev_warn(bp->dev, "Link speed %d no longer supported\n",
|
||||
speed);
|
||||
if (speed != SPEED_UNKNOWN)
|
||||
netdev_warn(bp->dev, "Link speed %d no longer supported\n",
|
||||
speed);
|
||||
}
|
||||
set_bit(BNXT_LINK_SPEED_CHNG_SP_EVENT, &bp->sp_event);
|
||||
/* fall thru */
|
||||
|
||||
@@ -1576,6 +1576,11 @@ static int nicvf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
nic->pdev = pdev;
|
||||
nic->pnicvf = nic;
|
||||
nic->max_queues = qcount;
|
||||
/* If no of CPUs are too low, there won't be any queues left
|
||||
* for XDP_TX, hence double it.
|
||||
*/
|
||||
if (!nic->t88)
|
||||
nic->max_queues *= 2;
|
||||
|
||||
/* MAP VF's configuration registers */
|
||||
nic->reg_base = pcim_iomap(pdev, PCI_CFG_REG_BAR_NUM, 0);
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include <linux/io.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/netdevice.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/phy.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <net/ip.h>
|
||||
|
||||
@@ -3209,7 +3209,7 @@ static int fec_enet_init(struct net_device *ndev)
|
||||
}
|
||||
|
||||
#ifdef CONFIG_OF
|
||||
static void fec_reset_phy(struct platform_device *pdev)
|
||||
static int fec_reset_phy(struct platform_device *pdev)
|
||||
{
|
||||
int err, phy_reset;
|
||||
bool active_high = false;
|
||||
@@ -3217,7 +3217,7 @@ static void fec_reset_phy(struct platform_device *pdev)
|
||||
struct device_node *np = pdev->dev.of_node;
|
||||
|
||||
if (!np)
|
||||
return;
|
||||
return 0;
|
||||
|
||||
of_property_read_u32(np, "phy-reset-duration", &msec);
|
||||
/* A sane reset duration should not be longer than 1s */
|
||||
@@ -3225,8 +3225,10 @@ static void fec_reset_phy(struct platform_device *pdev)
|
||||
msec = 1;
|
||||
|
||||
phy_reset = of_get_named_gpio(np, "phy-reset-gpios", 0);
|
||||
if (!gpio_is_valid(phy_reset))
|
||||
return;
|
||||
if (phy_reset == -EPROBE_DEFER)
|
||||
return phy_reset;
|
||||
else if (!gpio_is_valid(phy_reset))
|
||||
return 0;
|
||||
|
||||
active_high = of_property_read_bool(np, "phy-reset-active-high");
|
||||
|
||||
@@ -3235,7 +3237,7 @@ static void fec_reset_phy(struct platform_device *pdev)
|
||||
"phy-reset");
|
||||
if (err) {
|
||||
dev_err(&pdev->dev, "failed to get phy-reset-gpios: %d\n", err);
|
||||
return;
|
||||
return err;
|
||||
}
|
||||
|
||||
if (msec > 20)
|
||||
@@ -3244,14 +3246,17 @@ static void fec_reset_phy(struct platform_device *pdev)
|
||||
usleep_range(msec * 1000, msec * 1000 + 1000);
|
||||
|
||||
gpio_set_value_cansleep(phy_reset, !active_high);
|
||||
|
||||
return 0;
|
||||
}
|
||||
#else /* CONFIG_OF */
|
||||
static void fec_reset_phy(struct platform_device *pdev)
|
||||
static int fec_reset_phy(struct platform_device *pdev)
|
||||
{
|
||||
/*
|
||||
* In case of platform probe, the reset has been done
|
||||
* by machine code.
|
||||
*/
|
||||
return 0;
|
||||
}
|
||||
#endif /* CONFIG_OF */
|
||||
|
||||
@@ -3422,6 +3427,7 @@ fec_probe(struct platform_device *pdev)
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev,
|
||||
"Failed to enable phy regulator: %d\n", ret);
|
||||
clk_disable_unprepare(fep->clk_ipg);
|
||||
goto failed_regulator;
|
||||
}
|
||||
} else {
|
||||
@@ -3434,7 +3440,9 @@ fec_probe(struct platform_device *pdev)
|
||||
pm_runtime_set_active(&pdev->dev);
|
||||
pm_runtime_enable(&pdev->dev);
|
||||
|
||||
fec_reset_phy(pdev);
|
||||
ret = fec_reset_phy(pdev);
|
||||
if (ret)
|
||||
goto failed_reset;
|
||||
|
||||
if (fep->bufdesc_ex)
|
||||
fec_ptp_init(pdev);
|
||||
@@ -3495,8 +3503,10 @@ failed_init:
|
||||
fec_ptp_stop(pdev);
|
||||
if (fep->reg_phy)
|
||||
regulator_disable(fep->reg_phy);
|
||||
failed_reset:
|
||||
pm_runtime_put(&pdev->dev);
|
||||
pm_runtime_disable(&pdev->dev);
|
||||
failed_regulator:
|
||||
clk_disable_unprepare(fep->clk_ipg);
|
||||
failed_clk_ipg:
|
||||
fec_enet_clk_enable(ndev, false);
|
||||
failed_clk:
|
||||
|
||||
@@ -773,8 +773,9 @@ static int hns_ae_get_rss(struct hnae_handle *handle, u32 *indir, u8 *key,
|
||||
memcpy(key, ppe_cb->rss_key, HNS_PPEV2_RSS_KEY_SIZE);
|
||||
|
||||
/* update the current hash->queue mappings from the shadow RSS table */
|
||||
memcpy(indir, ppe_cb->rss_indir_table,
|
||||
HNS_PPEV2_RSS_IND_TBL_SIZE * sizeof(*indir));
|
||||
if (indir)
|
||||
memcpy(indir, ppe_cb->rss_indir_table,
|
||||
HNS_PPEV2_RSS_IND_TBL_SIZE * sizeof(*indir));
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -785,15 +786,19 @@ static int hns_ae_set_rss(struct hnae_handle *handle, const u32 *indir,
|
||||
struct hns_ppe_cb *ppe_cb = hns_get_ppe_cb(handle);
|
||||
|
||||
/* set the RSS Hash Key if specififed by the user */
|
||||
if (key)
|
||||
hns_ppe_set_rss_key(ppe_cb, (u32 *)key);
|
||||
if (key) {
|
||||
memcpy(ppe_cb->rss_key, key, HNS_PPEV2_RSS_KEY_SIZE);
|
||||
hns_ppe_set_rss_key(ppe_cb, ppe_cb->rss_key);
|
||||
}
|
||||
|
||||
/* update the shadow RSS table with user specified qids */
|
||||
memcpy(ppe_cb->rss_indir_table, indir,
|
||||
HNS_PPEV2_RSS_IND_TBL_SIZE * sizeof(*indir));
|
||||
if (indir) {
|
||||
/* update the shadow RSS table with user specified qids */
|
||||
memcpy(ppe_cb->rss_indir_table, indir,
|
||||
HNS_PPEV2_RSS_IND_TBL_SIZE * sizeof(*indir));
|
||||
|
||||
/* now update the hardware */
|
||||
hns_ppe_set_indir_table(ppe_cb, ppe_cb->rss_indir_table);
|
||||
/* now update the hardware */
|
||||
hns_ppe_set_indir_table(ppe_cb, ppe_cb->rss_indir_table);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user