/* * This header provides constants for the reset controller * based peripheral powerdown requests on the STMicroelectronics * STiH407 SoC. */ #ifndef _DT_BINDINGS_RESET_CONTROLLER_STIH407 #define _DT_BINDINGS_RESET_CONTROLLER_STIH407 /* Powerdown requests control 0 */ #define STIH407_EMISS_POWERDOWN 0 #define STIH407_NAND_POWERDOWN 1 /* Synp GMAC PowerDown */ #define STIH407_ETH1_POWERDOWN 2 /* Powerdown requests control 1 */ #define STIH407_USB3_POWERDOWN 3 #define STIH407_USB2_PORT1_POWERDOWN 4 #define STIH407_USB2_PORT0_POWERDOWN 5 #define STIH407_PCIE1_POWERDOWN 6 #define STIH407_PCIE0_POWERDOWN 7 #define STIH407_SATA1_POWERDOWN 8 #define STIH407_SATA0_POWERDOWN 9 /* Reset defines */ #define STIH407_ETH1_SOFTRESET 0 #define STIH407_MMC1_SOFTRESET 1 #define STIH407_PICOPHY_SOFTRESET 2 #define STIH407_IRB_SOFTRESET 3 #define STIH407_PCIE0_SOFTRESET 4 #define STIH407_PCIE1_SOFTRESET 5 #define STIH407_SATA0_SOFTRESET 6 #define STIH407_SATA1_SOFTRESET 7 #define STIH407_MIPHY0_SOFTRESET 8 #define STIH407_MIPHY1_SOFTRESET 9 #define STIH407_MIPHY2_SOFTRESET 10 #define STIH407_SATA0_PWR_SOFTRESET 11 #define STIH407_SATA1_PWR_SOFTRESET 12 #define STIH407_DELTA_SOFTRESET 13 #define STIH407_BLITTER_SOFTRESET 14 #define STIH407_HDTVOUT_SOFTRESET 15 #define STIH407_HDQVDP_SOFTRESET 16 #define STIH407_VDP_AUX_SOFTRESET 17 #define STIH407_COMPO_SOFTRESET 18 #define STIH407_HDMI_TX_PHY_SOFTRESET 19 #define STIH407_JPEG_DEC_SOFTRESET 20 #define STIH407_VP8_DEC_SOFTRESET 21 #define STIH407_GPU_SOFTRESET 22 #define STIH407_HVA_SOFTRESET 23 #define STIH407_ERAM_HVA_SOFTRESET 24 #define STIH407_LPM_SOFTRESET 25 #define STIH407_KEYSCAN_SOFTRESET 26 #define STIH407_USB2_PORT0_SOFTRESET 27 #define STIH407_USB2_PORT1_SOFTRESET 28 #define STIH407_ST231_AUD_SOFTRESET 29 #define STIH407_ST231_DMU_SOFTRESET 30 #define STIH407_ST231_GP0_SOFTRESET 31 #define STIH407_ST231_GP1_SOFTRESET 32 /* Picophy reset defines */ #define STIH407_PICOPHY0_RESET 0 #define STIH407_PICOPHY1_RESET 1 #define STIH407_PICOPHY2_RESET 2 #endif /* _DT_BINDINGS_RESET_CONTROLLER_STIH407 */ n='/cgit.cgi/linux/net-next.git/log/net/core'>
path: root/net/core
diff options
context:
space:
mode:
authorAlexei Starovoitov <ast@fb.com>2017-01-30 18:25:18 -0800
committerDavid S. Miller <davem@davemloft.net>2017-01-31 13:28:06 -0500
commit4d1ceea8516cd6adf21f6b75995e2a7d4f376f9b (patch)
tree563b680927dd7b84ab2cd78b35b51c43bd0bb352 /net/core
parentf8244ab55200dbe074380c3388804adff03a8a19 (diff)
net: ethtool: convert large order kmalloc allocations to vzalloc
under memory pressure 'ethtool -S' command may warn: [ 2374.385195] ethtool: page allocation failure: order:4, mode:0x242c0c0 [ 2374.405573] CPU: 12 PID: 40211 Comm: ethtool Not tainted [ 2374.423071] Call Trace: [ 2374.423076] [<ffffffff8148cb29>] dump_stack+0x4d/0x64 [ 2374.423080] [<ffffffff811667cb>] warn_alloc_failed+0xeb/0x150 [ 2374.423082] [<ffffffff81169cd3>] ? __alloc_pages_direct_compact+0x43/0xf0 [ 2374.423084] [<ffffffff8116a25c>] __alloc_pages_nodemask+0x4dc/0xbf0 [ 2374.423091] [<ffffffffa0023dc2>] ? cmd_exec+0x722/0xcd0 [mlx5_core] [ 2374.423095] [<ffffffff811b3dcc>] alloc_pages_current+0x8c/0x110 [ 2374.423097] [<ffffffff81168859>] alloc_kmem_pages+0x19/0x90 [ 2374.423099] [<ffffffff81186e5e>] kmalloc_order_trace+0x2e/0xe0 [ 2374.423101] [<ffffffff811c0084>] __kmalloc+0x204/0x220 [ 2374.423105] [<ffffffff816c269e>] dev_ethtool+0xe4e/0x1f80 [ 2374.423106] [<ffffffff816b967e>] ? dev_get_by_name_rcu+0x5e/0x80 [ 2374.423108] [<ffffffff816d6926>] dev_ioctl+0x156/0x560 [ 2374.423111] [<ffffffff811d4c68>] ? mem_cgroup_commit_charge+0x78/0x3c0 [ 2374.423117] [<ffffffff8169d542>] sock_do_ioctl+0x42/0x50 [ 2374.423119] [<ffffffff8169d9c3>] sock_ioctl+0x1b3/0x250 [ 2374.423121] [<ffffffff811f0f42>] do_vfs_ioctl+0x92/0x580 [ 2374.423123] [<ffffffff8100222b>] ? do_audit_syscall_entry+0x4b/0x70 [ 2374.423124] [<ffffffff8100287c>] ? syscall_trace_enter_phase1+0xfc/0x120 [ 2374.423126] [<ffffffff811f14a9>] SyS_ioctl+0x79/0x90 [ 2374.423127] [<ffffffff81002bb0>] do_syscall_64+0x50/0xa0 [ 2374.423129] [<ffffffff817e19bc>] entry_SYSCALL64_slow_path+0x25/0x25 ~1160 mlx5 counters ~= order 4 allocation which is unlikely to succeed under memory pressure. Convert them to vzalloc() as ethtool_get_regs() does. Also take care of drivers without counters similar to commit 67ae7cf1eeda ("ethtool: Allow zero-length register dumps again") and reduce warn_on to warn_on_once. Signed-off-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/ethtool.c39
1 files changed, 22 insertions, 17 deletions
diff --git a/net/core/ethtool.c b/net/core/ethtool.c