tun_build_skb() is not thread safe since it uses per queue page frag,
this will break things when multiple threads are sending through same
queue. Switch to use per-thread generator (no lock involved).
Fixes: 66ccbc9c87 ("tap: use build_skb() for small packet")
Tested-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Pull "mvebu dt for 4.14 (part 1)" from Gregory CLEMENT:
Add arm_global_timer node on Armada 38x
Fix PCI bus dtc warnings on mvebu 32 bits device tree files
* tag 'mvebu-dt-4.14-1' of git://git.infradead.org/linux-mvebu:
ARM: dts: armada-38x: Add arm_global_timer node
ARM: dts: marvell: fix PCI bus dtc warnings
Pull "Gemini DTS updates for ARM SoC take one" from Linus Walleij:
* tag 'gemini-dts-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik:
ARM: dts: gemini: add pin control set-up for the SoC
ARM: dts: Add DTS file for D-Link DIR-685
ARM: dts: gemini: Switch to using macros
For sw_flow_actions, the actions_len only represents the kernel part's
size, and when we dump the actions to the userspace, we will do the
convertions, so it's true size may become bigger than the actions_len.
But unfortunately, for OVS_PACKET_ATTR_ACTIONS, we use the actions_len
to alloc the skbuff, so the user_skb's size may become insufficient and
oops will happen like this:
skbuff: skb_over_panic: text:ffffffff8148fabf len:1749 put:157 head:
ffff881300f39000 data:ffff881300f39000 tail:0x6d5 end:0x6c0 dev:<NULL>
------------[ cut here ]------------
kernel BUG at net/core/skbuff.c:129!
[...]
Call Trace:
<IRQ>
[<ffffffff8148be82>] skb_put+0x43/0x44
[<ffffffff8148fabf>] skb_zerocopy+0x6c/0x1f4
[<ffffffffa0290d36>] queue_userspace_packet+0x3a3/0x448 [openvswitch]
[<ffffffffa0292023>] ovs_dp_upcall+0x30/0x5c [openvswitch]
[<ffffffffa028d435>] output_userspace+0x132/0x158 [openvswitch]
[<ffffffffa01e6890>] ? ip6_rcv_finish+0x74/0x77 [ipv6]
[<ffffffffa028e277>] do_execute_actions+0xcc1/0xdc8 [openvswitch]
[<ffffffffa028e3f2>] ovs_execute_actions+0x74/0x106 [openvswitch]
[<ffffffffa0292130>] ovs_dp_process_packet+0xe1/0xfd [openvswitch]
[<ffffffffa0292b77>] ? key_extract+0x63c/0x8d5 [openvswitch]
[<ffffffffa029848b>] ovs_vport_receive+0xa1/0xc3 [openvswitch]
[...]
Also we can find that the actions_len is much little than the orig_len:
crash> struct sw_flow_actions 0xffff8812f539d000
struct sw_flow_actions {
rcu = {
next = 0xffff8812f5398800,
func = 0xffffe3b00035db32
},
orig_len = 1384,
actions_len = 592,
actions = 0xffff8812f539d01c
}
So as a quick fix, use the orig_len instead of the actions_len to alloc
the user_skb.
Last, this oops happened on our system running a relative old kernel, but
the same risk still exists on the mainline, since we use the wrong
actions_len from the beginning.
Fixes: ccea74457b ("openvswitch: include datapath actions with sampled-packet upcall to userspace")
Cc: Neil McKee <neil.mckee@inmon.com>
Signed-off-by: Liping Zhang <zlpnobody@gmail.com>
Acked-by: Pravin B Shelar <pshelar@ovn.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
The main purpose of this tracepoint is to monitor bulk dequeue
in the network qdisc layer, as it cannot be deducted from the
existing qdisc stats.
The txq_state can be used for determining the reason for zero packet
dequeues, see enum netdev_queue_state_t.
Notice all packets doesn't necessary activate this tracepoint. As
qdiscs with flag TCQ_F_CAN_BYPASS, can directly invoke
sch_direct_xmit() when qdisc_qlen is zero.
Remember that perf record supports filters like:
perf record -e qdisc:qdisc_dequeue \
--filter 'ifindex == 4 && (packets > 1 || txq_state > 0)'
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Pull "Rockchip dts32 changes for 4.14" from Heiko Stübner:
Removal of the deprectated num-slots property from all Rockchip dw-mmc
nodes. The rv1108 gains support for sd-cards on the evaluation board and
the general nodes get a bit of cosmetic. On rk3288 the evb gains support
saradc and the adc-key connected to it while some more boards also get
their mali gpu enabled (fennec, evb, tinker).
The biggest set of changes can be found on the rk3228/rk3229 combo this
time. It gets core support for efuse, sdmmc, sdio, io-domans and spdif
as well as a separate rk3229.dtsi that will keep the slight differences
between the two brothers rk3228/rk3229. The evaluation board also gets
some attention and abled nodes (regulators, io-domains, emmc, tsadc keys)
But I think the most interesting change is the cpu enable-method for it.
Instead of using the older in-kernel method, we're now also moving to
handling this in firmware via the psci interface on 32bit Rockchip socs.
In a recently merged pull request [0] support for the rk3228/rk3229 was
added to OP-TEE including the psci support and it seems supporting other
32bit Rockchip socs that way is also planned for the future.
[0] https://github.com/OP-TEE/optee_os/pull/1666
* tag 'v4.14-rockchip-dts32-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: (23 commits)
ARM: dts: rockchip: fix property-ordering in rv1108 mmc nodes
ARM: dts: rockchip: enable sdmmc for rv1108 evb
ARM: dts: rockchip: add efuse device node for rk3228
ARM: dts: rockchip: add gpio power-key for rk3229-evb
ARM: dts: rockchip: enable tsadc for rk3229-evb
ARM: dts: rockchip: enable eMMC for rk3229-evb
ARM: dts: rockchip: enable io-domain for rk3229-evb
ARM: dts: rockchip: add cpu-supply property for cpu node of rk3229-evb
ARM: dts: rockchip: add regulator nodes for rk3229-evb
ARM: dts: rockchip: add sdmmc and sdio nodes for rk3228 SoC
ARM: dts: rockchip: fix compatible string for eMMC node of rk3228 SoC
ARM: dts: rockchip: add cpu enable method for rk3228 SoC
ARM: dts: rockchip: remove num-slots from all platforms
ARM: dts: rockchip: Add io-domain node for rk3228
ARM: dts: rockchip: add basic dtsi file for RK3229 SoC
ARM: dts: rockchip: enable adc key for rk3288-evb
ARM: dts: rockchip: enable saradc for rk3288-evb
ARM: dts: rockchip: enable ARM Mali GPU on rk3288-fennec
ARM: dts: rockchip: enable ARM Mali GPU on rk3288-evb
ARM: dts: rockchip: enable ARM Mali GPU on rk3288-tinker
...
Pull "Renesas ARM Based SoC DT Updates for v4.14" from Simon Horman:
Changes of note:
* Add pin controller support to the RZ/G1M (r8a7743) SoC and
RZ/A1 (r7s72100) SoCs now that the driver is available in v4.13-rc1.
* Add GPIO support to the RZ/G1M (r8a7743) SoC now that the driver
is availabe in v4.13-rc1.
* Enable MMCIF0 and Ethernet AVB support on the RZ/G1M (r8a7743) SoC and
the iWave-RZG1M-20M Qseven SOM. This depends on newly added pin
controller support noted above.
* Use R-Car Gen 2 fallback binding for vin nodes
This makes binding use consistent across R-Car Gen 2 SoCs.
It does not have any run-time effect
* Use SMP jump stub SRAM region from DT on R-Car Gen 2 SoCs
Geert Uytterhoeven says, "The R-Car Gen2 platform code for CPU core
bringup needs to copy a jump stub to on-SoC SRAM. Currently it uses a
hardcoded address pointing to ICRAM1."
* Add Inter Connect RAM to R-Car Gen 2 and RZ/G1 SoCs
Geert Uytterhoeven says, "R-Car Gen2 and RZ/G1 SoCs contain two or three
blocks of SRAM, which can be used for several purposes. One such purpose
is holding a jump stub for CPU core bringup."
* Use generic compatible string for I2C EEPROM for RZ/A1 (r7s72100) SoC
and koelsch board.
This is part of a tree-wide cleanup by Javier Martinez Canillas
* tag 'renesas-dt-for-v4.14' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: (38 commits)
ARM: dts: iwg20m: Correct indentation of mmcif0 properties
ARM: dts: rskrza1: Add LED0 pin support
ARM: dts: rskrza1: Add SDHI1 pin group
ARM: dts: rskrza1: Add Ethernet pin group
ARM: dts: rskrza1: Add SCIF2 pin group
ARM: dts: genmai: Add ethernet pin group
ARM: dts: genmai: Add user led device nodes
ARM: dts: genmai: Add RIIC2 pin group
ARM: dts: genmai: Add SCIF2 pin group
ARM: dts: r7s72100: Add pin controller node
ARM: dts: iwg20m: Add MMCIF0 support
ARM: dts: r8a7794: Use R-Car Gen 2 fallback binding for vin nodes
ARM: dts: r8a7791: Use R-Car Gen 2 fallback binding for vin nodes
ARM: dts: r8a7790: Use R-Car Gen 2 fallback binding for vin nodes
ARM: dts: r8a7743: Add MMCIF0 support
ARM: dts: r8a7794: Reserve SRAM for the SMP jump stub
ARM: dts: r8a7793: Reserve SRAM for the SMP jump stub
ARM: dts: r8a7792: Reserve SRAM for the SMP jump stub
ARM: dts: r8a7791: Reserve SRAM for the SMP jump stub
ARM: dts: r8a7790: Reserve SRAM for the SMP jump stub
...
Pull "Renesas ARM Based SoC DT Bindings Updates for v4.14" from Simon Horman:
* Document R-Car D3 (r8a77995) SoC and Draak board
* Document reserved SRAM for the SMP jump stub on R-Car Gen2 and RZ/G1 SoCs
Geert Uytterhoeven says, "+Renesas R-Car Gen2 and RZ/G1 SoCs need a small
piece of SRAM for the jump stub +for secondary CPU bringup and CPU
hotplug. +This memory is reserved by adding a child node to a
"mmio-sram" node..."
* Add a VSP channel index to DU vsps
Laurent Pinchart says, "multiple LIF instances in the VSP. The current DT
bindings don't support specifying that kind of SoC integration scheme.
Extend them with a VSP channel index."
* Add R-Car M3-W (r8a7796) HDMI TX DT bindings
This is compatible with existing R-Car H3 (r8a7795) support
* tag 'renesas-dt-bindings-for-v4.14' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
ARM: shmobile: Document Renesas Draak board DT bindings
ARM: shmobile: Document R-Car D3 SoC DT bindings
dt-bindings: display: rcar-du: Add a VSP channel index to the vsps DT property
dt-bindings: sram: Document renesas,smp-sram
dt-bindings: display: renesas: Add R-Car M3-W HDMI TX DT bindings
Pull "STM32 DT updates for v4.14, round 1" from Alexandre Torgue:
Highlights:
----------
-Add DMA support on STM32F746
-Add DMA support on STM32H743
-Add DAC support on STM32H743
-Add DAC support on STM32F429
-Add ADC support on STM32H743
-Enable ADC on stm32h743i-eval board
-Add CEC support on STM32F7xx MCUs
-Enable CEC on stm32f769-disco board
-Remove rdinit from stm32f4 boards
* tag 'stm32-dt-for-v4.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32:
ARM: dts: stm32: Add DMA support for STM32H743 SoC
ARM: dts: stm32: Add DMA support for STM32F746 SoC
ARM: dts: stm32: enable ADC on stm32h743i-eval board
ARM: dts: stm32: add ADC support on stm32h743
ARM: dts: stm32: Add DAC support on stm32h743
ARM: dts: stm32: Add DAC support on stm32f429
ARM: dts: stm32: enable CEC for stm32f769 discovery
ARM: dts: stm32: add CEC for stm32f7 family
ARM: dts: stm32: reorder stm32h743 nodes
ARM: dts: stm32: Remove rdinit from bootargs on stm32f429-disco
ARM: dts: stm32: Remove rdinit from bootargs on stm32f429i-eval
ARM: dts: stm32: Remove rdinit from bootargs on stm32f469-disco
Pull "Samsung DTS ARM changes for v4.13" from Krzysztof Kozłowski:
Remove deprecated and unneeded properties from Exynos boards.
* tag 'samsung-dt-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux:
ARM: dts: exynos: Remove num-slots from exynos platforms
ARM: dts: exynos: Remove the OF graph from DSI node
Pull "defconfig changes for omaps for v4.14" from Tony Lindgren:
Defconfig updates for omaps for v4.14 to enable DP83867
phy driver on dra72x and dra71x evm, and LP87565 that is
on dra76-evm.
* tag 'omap-for-v4.14/defconfig-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
ARM: omap2plus_defconfig: Enable LP87565
ARM: omap2plus_defconfig: enable DP83867 phy driver
Pull "Gemini changes for v4.14" from Linus Walleij:
They all deal with fixing up the Kconfig selects
for misc stuff that has been merged in different
subsystems:
- We have a reset controller
- We have a clock controller
- We need ARM_AMBA for FTDMAC020 which is PL08x
- We need to select the pin controller (being merged
for v4.14)
* tag 'gemini-for-arm-soc-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik:
ARM: gemini: select pin controller
ARM: gemini: select ARM_AMBA
ARM: gemini: select the clock controller
ARM: gemini: tag the arch as having reset controller
Pull "mvebu soc for 4.14 (part 1)" from Gregory CLEMENT:
Enabling ARM_GLOBAL_TIMER in mvebu_v7_defconfig for Armada 38x
* tag 'mvebu-soc-4.14-1' of git://git.infradead.org/linux-mvebu:
ARM: mvebu: enable ARM_GLOBAL_TIMER compilation Armada 38x platforms
Update ARM/ZTE entry to include all those ZTE ZX platform drivers and
files that do not have a separate MAINTAINERS entry.
Since I have been contributing a lot for ZTE ZX SoCs support and
collecting platform patches for a few cycles, add myself as one
maintainer for the platform.
Cc: Jun Nie <jun.nie@linaro.org>
Cc: Baoyou Xie <baoyou.xie@linaro.org>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Pull "Updates to for omap debug_ll code to use generic DEBUG_UART_8250 code" from Tony Lindgren:
The legacy code to try to detect the debug_ll uart based on machine
is no longer needed, and we can remove it. Note that the Kconfig
options stay the same, we just need to define the port configuration
now.
* tag 'omap-for-v4.14/debug-ll-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
ARM: debug: Use generic 8250 debug_ll for am3517 and am335x
ARM: debug: Use generic 8250 debug_ll for ti81xx
ARM: debug: Use generic 8250 debug_ll for omap3/4/5
ARM: debug: Use generic 8250 debug_ll for omap2 and omap3/4/5 common uarts
Pull "soc changes for omaps for v4.14" from Tony Lindgren:
SoC updates for omaps for v4.14. Most of the chages are to add
support for new dra762 SoC. The other changes are are for legacy
DMA code removal, and MMC quirk and iodelay config for dra7.
* tag 'omap-for-v4.14/soc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
ARM: OMAP: dra7: powerdomain data: Register SoC specific powerdomains
ARM: dra762: Enable SMP for dra762
ARM: dra7: hwmod: Register dra76x specific hwmod
ARM: dra762: Add support for device identification
ARM: OMAP2+: board-generic: add support for dra762 family
ARM: OMAP2+: Select PINCTRL_TI_IODELAY for SOC_DRA7XX
ARM: OMAP2+: Add pdata-quirks for MMC/SD on DRA74x EVM
ARM: OMAP2+: Remove unused legacy code for DMA
Pull "Renesas ARM Based SoC Updates for v4.14" Simon Horman:
* Add debug-ll support to RZ/G1M (r8a7743) SoC
Chris Paterson says, "RZ/G1M uses SCIF0 for the debug console, like most
of the R-Car Gen2 SoCs."
* Remove ARCH_SHMOBILE_MULTI
Geert Uytterhoeven says, "The migration from ARCH_SHMOBILE_MULTI to
ARCH_RENESAS has been completed in v4.12..."
* Correct arch timer frequency on RZ/G1M (r8a7743) SoC
Geert Uytterhoeven says, "According to the datasheet, the frequency of
the ARM architecture timer on RZ/G1E depends on the frequency of the ZS
clock..."
* Add support for CPG/MSSR bindings
Geert Uytterhoeven says, "When using the new CPG/MSSR bindings, there is
no longer a "renesas,rcar-gen2-cpg-clocks" node, and the code to obtain
the external clock crystal frequency falls back to a default of 20 MHz.
While this is correct for all upstream R-Car Gen2 and RZ/G1 boards, this
is not necessarily the case for out-of-tree third party boards.
Add support for finding the external clock crystal oscillator on RZ/G1M,
and on R-Car H2, M2-W, and M2-N using the new CPG/MSSR bindings, through
the corresponding "renesas,r8a77xx-cpg-mssr" nodes."
* Obtain jump stub region from DT
Geert Uytterhoeven says, "Add support for obtaining from DT the SRAM
region to store the jump stub for CPU core bringup, according to the
renesas,smp-sram DT bindings."
* tag 'renesas-soc-for-v4.14' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
ARM: shmobile: Remove ARCH_SHMOBILE_MULTI
ARM: shmobile: rcar-gen2: Correct arch timer frequency on RZ/G1E
ARM: shmobile: rcar-gen2: Add support for CPG/MSSR bindings
ARM: shmobile: rcar-gen2: Obtain jump stub region from DT
ARM: debug-ll: Add support for r8a7743
Remove unnecessary static on local variables syscon_regmap.
Such variables are initialized before being used, on every
execution path throughout the functions. The static has no
benefit and, removing it reduces the object file size.
This issue was detected using Coccinelle and the following
semantic patch:
@bad exists@
position p;
identifier x;
type T;
@@
static T x@p;
...
x = <+...x...+>
@@
identifier x;
expression e;
type T;
position p != bad.p;
@@
-static
T x@p;
... when != x
when strict
?x = e;
In the following log you can see the difference in the object file size.
This log is the output of the size command, before and after the code
change:
before:
text data bss dec hex filename
3339 2104 128 5571 15c3 drivers/soc/versatile/soc-realview.o
after:
text data bss dec hex filename
3321 2048 64 5433 1539 drivers/soc/versatile/soc-realview.o
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Pull "non-urgent dts fixes for omaps for v4.14" from Tony Lindgren:
Two non-urgent dts fixes for dra7 Ethernet quirk. These are sent
separately from the rest of the dts changes to avoid merge conflicts
as these depend on earlier fixes sent during v4.13-rc cycle.
* tag 'omap-for-v4.14/fixes-not-urgent-dt-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
ARM: dts: dra72-evm-revc: workaround incorrect DP83867 RX_CTRL pin strap
ARM: dts: dra71-evm: workaround incorrect DP83867 RX_CTRL pin strap
Pull "ARM: hisi fixes for 4.14" from Wei Xu:
- Fix the comment typo of the machine code "0xe51ff004"
to avoid confusion.
* tag 'hisi-fixes-for-4.14' of git://github.com/hisilicon/linux-hisi:
ARM: hisi: Fix typo in comment
Pull "Renesas ARM Based SoC Drivers Updates for v4.14" from Simon Horman:
Add R-Car D3 (r8a77995) support to the Renesas-specific SoC drivers
- SoC identification
- System controller
- Reset controller
* tag 'renesas-drivers-for-v4.14' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
soc: renesas: rcar-rst: Add support for R-Car D3
soc: renesas: rcar-sysc: Add support for R-Car D3 power areas
soc: renesas: Add r8a77995 SYSC PM Domain Binding Definitions
soc: renesas: Identify R-Car D3
Pull "ADC device support for Cirrus Logic EP93xx SoC" from Alexander Sverdlin:
- Add ADC specific clock
- Add ADC device support to EP93xx core
- Add ADC instance to EDB93xx boards
The above doesn't include a driver for ADC device.
* tag 'arm-ep93xx-adc' of https://github.com/sverdlin/linux:
ARM: edb93xx: Add ADC platform device
ARM: ep93xx: Add ADC platform device support to core
ARM: ep93xx: Add ADC clock
Pull "Samsung mach/soc changes for v4.14" from Krzysztof Kozłowski:
Only for S3C24xx platform:
1. Cleanup from non-existent CONFIG entries.
2. Fix unmet NET dependency when H1940 bluetooth chip is selected..
* tag 'samsung-soc-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux:
ARM: s3c24xx: make H1940BT depend on RFKILL
ARM: s3c24xx: Do not confuse local define with Kconfig
ARM: s3c24xx: Remove non-existing SND_SOC_SMDK2443_WM9710
ARM: s3c24xx: Remove non-existing CONFIG_CPU_S3C2413
Pull "Qualcomm ARM Based Driver Updates for v4.14" from Andy Gross:
* Minor fixes for SMSM and WCNSS_CTRL
* Move Qcom SoC drivers to submenu
* Fix mdt_loader to use request_firmware_into_buf()
* tag 'qcom-drivers-for-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux:
soc: qcom: mdt_loader: Use request_firmware_into_buf()
soc: qcom: bring all qcom drivers into a submenu
soc: qcom: wcnss_ctrl: add missing MODULE_DEVICE_TABLE()
soc: qcom: smsm: fix of_node refcnting problem
Pull "Rockchip driver changes for 4.14" from Heiko Stübner:
Powerdomain support for rk3366 and disabling of the automatic
jtag/sdmmc switching for rk3328.
* tag 'v4.14-rockchip-drivers-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip:
soc: rockchip: power-domain: add power domain support for rk3366
dt-bindings: add binding for rk3366 power domains
dt-bindings: power: add RK3366 SoCs header for power-domain
soc: rockchip: disable jtag switching for RK3328 Soc
Pull "Small fixes and enhancements for the TEE subsystem" from Jens Wiklander:
* tag 'tee-drv-for-4.14' of http://git.linaro.org/people/jens.wiklander/linux-tee:
tee: optee: sync with new naming of interrupts
tee: indicate privileged dev in gen_caps
tee: optee: interruptible RPC sleep
tee: optee: add const to tee_driver_ops and tee_desc structures
tee: tee_shm: Constify dma_buf_ops structures.
tee: add forward declaration for struct device
tee: optee: fix uninitialized symbol 'parg'
Sometimes people seems unclear when to use the %pS or %pF printk format.
For example, see commit 51d96dc2e2 ("random: fix warning message on ia64
and parisc") which fixed such a wrong format string.
The documentation should be more clear about the difference.
Signed-off-by: Helge Deller <deller@gmx.de>
[pmladek@suse.com: Restructure the entire section]
Signed-off-by: Petr Mladek <pmladek@suse.com>
Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Signed-off-by: Helge Deller <deller@gmx.de>
Switch from using custom MAX_LEGACY_IRQS and MAX_LEGACY_HOST_IRQS macros to
the generic PCI_NUM_INTX definition for the number of INTx interrupts.
Based-on-similar-patches-by: Paul Burton <paul.burton@imgtec.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Cc: Murali Karicheri <m-karicheri2@ti.com>
Simon Horman says:
====================
nfp: process MTU updates from firmware flower app
The first patch of this series moves processing of control messages from a
BH handler to a workqueue. That change makes it safe to process MTU
updates from the firmware which is added by the second patch of this
series.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Now that control message processing occurs in a workqueue rather than a BH
handler MTU updates received from the firmware may be safely processed.
Signed-off-by: Simon Horman <simon.horman@netronome.com>
Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Processing of control messages is not time-critical and future processing
of some messages will require taking the RTNL which is not possible
in a BH handler. It seems simplest to move all control message processing
to a workqueue.
Signed-off-by: Simon Horman <simon.horman@netronome.com>
Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
In the devmap alloc map logic we check to ensure that the sizeof the
values are not greater than KMALLOC_MAX_SIZE. But, in the dev map case
we ensure the value size is 4bytes earlier in the function because all
values should be netdev ifindex values.
The second check is harmless but is not needed so remove it.
Signed-off-by: John Fastabend <john.fastabend@gmail.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
MAX_MSI_HOST_IRQS and MAX_LEGACY_HOST_IRQS are defined in both
pci-keystone.h (which is included by pci-keystone.c) and in pci-keystone.c
itself.
Remove the duplicate definitions from pci-keystone.c.
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Cc: Murali Karicheri <m-karicheri2@ti.com>
There is no need to log message if ATU hvapi couldn't get register.
Unlike PCI hvapi, ATU hvapi registration failure is not hard error.
Even if ATU hvapi registration fails (on system with ATU or without
ATU) system continues with legacy IOMMU. So only log message when
ATU hvapi successfully get registered.
Signed-off-by: Tushar Dave <tushar.n.dave@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>