Re: [PATCH v3 2/6] PCI: brcmstb: Add control of EP voltage regulators

2021-03-29 Thread Mark Brown
On Mon, Mar 29, 2021 at 03:48:46PM -0400, Jim Quinlan wrote: > I'm not concerned about a namespace collision and I don't think you > should be concerned either. First, this driver is for Broadcom STB > PCIe chips and boards, and we also deliver the DT to the customers. > We typically do not have

Re: [PATCH v5 4/4] fs: unicode: Add utf8 module and a unicode layer

2021-03-29 Thread Gabriel Krisman Bertazi
Shreeya Patel writes: > utf8data.h_shipped has a large database table which is an auto-generated > decodification trie for the unicode normalization functions. > It is not necessary to load this large table in the kernel if no > filesystem is using it, hence make UTF-8 encoding loadable by

Re: [RFC] clk: add boot clock support

2021-03-29 Thread Sebastian Reichel
Hi, On Mon, Mar 29, 2021 at 01:03:20PM -0700, Saravana Kannan wrote: > On Fri, Mar 26, 2021 at 2:52 AM Sebastian Reichel > wrote: > > On Thu, Mar 25, 2021 at 06:55:52PM -0700, Saravana Kannan wrote: > > > On Thu, Mar 25, 2021 at 6:27 PM Rob Herring wrote: > > > > On Thu, Mar 18, 2021 at

Re: [PATCH] hwmon: (nzxt-kraken2) mark and order concurrent accesses

2021-03-29 Thread Guenter Roeck
On Mon, Mar 29, 2021 at 05:22:01AM -0300, Jonas Malaco wrote: > To avoid a spinlock, the driver explores concurrent memory accesses > between _raw_event and _read, having the former updating fields on a > data structure while the latter could be reading from them. Because > these are "plain"

Re: [PATCH v4 14/22] x86/fpu/xstate: Expand the xstate buffer on the first use of dynamic user state

2021-03-29 Thread Len Brown
On Mon, Mar 29, 2021 at 2:49 PM Thomas Gleixner wrote: > According to documentation it is irrelevant whether AMX usage is > disabled via XCR0, CR4.OSXSAVE or XFD[18]. In any case the effect of > AMX INIT=0 will prevent C6. > > As I explained in great length there are enough ways to get into a >

[PATCH AUTOSEL 5.10 04/33] bpf, x86: Use kvmalloc_array instead kmalloc_array in bpf_jit_comp

2021-03-29 Thread Sasha Levin
From: Yonghong Song [ Upstream commit de920fc64cbaa031f947e9be964bda05fd090380 ] x86 bpf_jit_comp.c used kmalloc_array to store jited addresses for each bpf insn. With a large bpf program, we have see the following allocation failures in our production server: page allocation failure:

[PATCH AUTOSEL 5.10 17/33] netfilter: nftables: skip hook overlap logic if flowtable is stale

2021-03-29 Thread Sasha Levin
From: Pablo Neira Ayuso [ Upstream commit 86fe2c19eec4728fd9a42ba18f3b47f0d5f9fd7c ] If the flowtable has been previously removed in this batch, skip the hook overlap checks. This fixes spurious EEXIST errors when removing and adding the flowtable in the same batch. Signed-off-by: Pablo Neira

[PATCH AUTOSEL 5.10 12/33] mac80211: choose first enabled channel for monitor

2021-03-29 Thread Sasha Levin
From: Karthikeyan Kathirvel [ Upstream commit 041c881a0ba8a75f71118bd9766b78f04beed469 ] Even if the first channel from sband channel list is invalid or disabled mac80211 ends up choosing it as the default channel for monitor interfaces, making them not usable. Fix this by assigning the first

[PATCH AUTOSEL 5.10 16/33] netfilter: conntrack: Fix gre tunneling over ipv6

2021-03-29 Thread Sasha Levin
From: Ludovic Senecaux [ Upstream commit 8b2030b4305951f44afef80225f1475618e25a73 ] This fix permits gre connections to be tracked within ip6tables rules Signed-off-by: Ludovic Senecaux Acked-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso Signed-off-by: Sasha Levin ---

[PATCH AUTOSEL 5.10 09/33] net: correct sk_acceptq_is_full()

2021-03-29 Thread Sasha Levin
From: liuyacan [ Upstream commit f211ac154577ec9ccf07c15f18a6abf0d9bdb4ab ] The "backlog" argument in listen() specifies the maximom length of pending connections, so the accept queue should be considered full if there are exactly "backlog" elements. Signed-off-by: liuyacan Signed-off-by:

[PATCH AUTOSEL 5.10 07/33] kunit: tool: Fix a python tuple typing error

2021-03-29 Thread Sasha Levin
From: David Gow [ Upstream commit 7421b1a4d10c633ca5f14c8236d3e2c1de07e52b ] The first argument to namedtuple() should match the name of the type, which wasn't the case for KconfigEntryBase. Fixing this is enough to make mypy show no python typing errors again. Fixes 97752c39bd ("kunit:

[PATCH AUTOSEL 5.10 10/33] mac80211: fix double free in ibss_leave

2021-03-29 Thread Sasha Levin
From: Markus Theil [ Upstream commit 3bd801b14e0c5d29eeddc7336558beb3344efaa3 ] Clear beacon ie pointer and ie length after free in order to prevent double free. == BUG: KASAN: double-free or invalid-free \ in

[PATCH AUTOSEL 5.10 08/33] mISDN: fix crash in fritzpci

2021-03-29 Thread Sasha Levin
From: Tong Zhang [ Upstream commit a9f81244d2e33e6dfcef120fefd30c96b3f7cdb0 ] setup_fritz() in avmfritz.c might fail with -EIO and in this case the isac.type and isac.write_reg is not initialized and remains 0(NULL). A subsequent call to isac_release() will dereference isac->write_reg and

[PATCH AUTOSEL 5.10 13/33] drm/msm/dsi_pll_7nm: Fix variable usage for pll_lockdet_rate

2021-03-29 Thread Sasha Levin
From: Dmitry Baryshkov [ Upstream commit 9daaf31307856defb1070685418ce5a484ecda3a ] The PLL_LOCKDET_RATE_1 was being programmed with a hardcoded value directly, but the same value was also being specified in the dsi_pll_regs struct pll_lockdet_rate variable: let's use it! Based on 362cadf34b9f

[PATCH AUTOSEL 5.10 11/33] mac80211: Check crypto_aead_encrypt for errors

2021-03-29 Thread Sasha Levin
From: Daniel Phan [ Upstream commit 58d25626f6f0ea5bcec3c13387b9f835d188723d ] crypto_aead_encrypt returns <0 on error, so if these calls are not checked, execution may continue with failed encrypts. It also seems that these two crypto_aead_encrypt calls are the only instances in the codebase

[PATCH AUTOSEL 5.10 06/33] net: pxa168_eth: Fix a potential data race in pxa168_eth_remove

2021-03-29 Thread Sasha Levin
From: Pavel Andrianov [ Upstream commit 0571a753cb07982cc82f4a5115e0b321da89e1f3 ] pxa168_eth_remove() firstly calls unregister_netdev(), then cancels a timeout work. unregister_netdev() shuts down a device interface and removes it from the kernel tables. If the timeout occurs in parallel, the

[PATCH AUTOSEL 5.10 05/33] net/mlx5e: Enforce minimum value check for ICOSQ size

2021-03-29 Thread Sasha Levin
From: Tariq Toukan [ Upstream commit 5115daa675ccf70497fe56e8916cf738d8212c10 ] The ICOSQ size should not go below MLX5E_PARAMS_MINIMUM_LOG_SQ_SIZE. Enforce this where it's missing. Signed-off-by: Tariq Toukan Reviewed-by: Maxim Mikityanskiy Reviewed-by: Saeed Mahameed Signed-off-by: Saeed

[PATCH AUTOSEL 5.10 15/33] drm/msm: Ratelimit invalid-fence message

2021-03-29 Thread Sasha Levin
From: Rob Clark [ Upstream commit 7ad48d27a2846bfda29214fb454d001c3e02b9e7 ] We have seen a couple cases where low memory situations cause something bad to happen, followed by a flood of these messages obscuring the root cause. Lets ratelimit the dmesg spam so that next time it happens we

Re: [PATCH V4 05/18] iommu/ioasid: Redefine IOASID set and allocation APIs

2021-03-29 Thread Jacob Pan
Hi Jason, On Mon, 29 Mar 2021 13:31:47 -0300, Jason Gunthorpe wrote: > On Wed, Mar 24, 2021 at 12:05:28PM -0700, Jacob Pan wrote: > > > > IMHO a use created PASID is either bound to a mm (current) at creation > > > time, or it will never be bound to a mm and its page table is under > > > user

Re: [PATCH] ethernet/netronome/nfp: Fix a use after free in nfp_bpf_ctrl_msg_rx

2021-03-29 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (refs/heads/master): On Mon, 29 Mar 2021 04:50:02 -0700 you wrote: > In nfp_bpf_ctrl_msg_rx, if > nfp_ccm_get_type(skb) == NFP_CCM_TYPE_BPF_BPF_EVENT is true, the skb > will be freed. But the skb is still used by nfp_ccm_rx(>ccm, skb). > > My

Re: [PATCH 2/2] soc: mediatek: Add mt8192 devapc driver

2021-03-29 Thread Nina Wu
Hi, Matthias On Mon, 2021-03-29 at 13:16 +0200, Matthias Brugger wrote: > As a general comment: > > Please split your patch in several, one introducing changes to the existing > code > base which are needed for newer SoCs (depending on the changes more then one) > and one which actually adds

Re: [PATCH 5.4 000/111] 5.4.109-rc1 review

2021-03-29 Thread Samuel Zou
On 2021/3/29 15:57, Greg Kroah-Hartman wrote: This is the start of the stable review cycle for the 5.4.109 release. There are 111 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know. Responses should be

Re: [PATCH v3 11/17] riscv: Convert to GENERIC_CMDLINE

2021-03-29 Thread Nick Kossifidis
Στις 2021-03-26 17:26, Rob Herring έγραψε: On Fri, Mar 26, 2021 at 8:20 AM Christophe Leroy wrote: Le 26/03/2021 à 15:08, Andreas Schwab a écrit : > On Mär 26 2021, Christophe Leroy wrote: > >> diff --git a/arch/riscv/kernel/setup.c b/arch/riscv/kernel/setup.c >> index

[PATCH v1 4/7] bus: mhi: core: Add support for Flash Programmer execution environment

2021-03-29 Thread Bhaumik Bhatt
From: Carl Yin MHI WWAN modems support downloading firmware to NAND or eMMC using Firehose protocol with process as follows: 1. Modem boots up, enters AMSS execution environment and the device later enters EDL (Emergency Download) mode through any mechanism host can use such as a diag command.

[PATCH v1 2/7] bus: mhi: core: Wait for ready after an EDL firmware download

2021-03-29 Thread Bhaumik Bhatt
Currently, the firmware load handler returns after the EDL image is downloaded. Wait for an MHI READY transition instead as the specification expects so as to proceed with further bootup such as device entering Flash Programmer execution environment. Signed-off-by: Bhaumik Bhatt Reviewed-by:

[PATCH v1 0/7] MHI Emergency download and flash programmer support

2021-03-29 Thread Bhaumik Bhatt
Allow handling EDL mode after SYS_ERROR occurs by reading the execution environment post handling and move to power on reset state to accommodate the scenario. Handle EDL mode properly and wait for ready instead of just exiting from the firmware load. Allow use of the Flash Programmer execution

[PATCH v1 1/7] bus: mhi: core: Rely on accurate method to determine EDL mode

2021-03-29 Thread Bhaumik Bhatt
Relying on the current execution environment to determine if EDL image was downloaded should not be done as the execution environment can change at this point in error cases and we may misread it. Instead, MHI can rely on the local 'fw_name' variable as a safer alternative. Signed-off-by: Bhaumik

[PATCH v1 7/7] bus: mhi: core: Improve state strings for debug messages

2021-03-29 Thread Bhaumik Bhatt
As of now abbreviations are being used for many state and execution environment strings. Improve and expand those such that debug messages are clear. Signed-off-by: Bhaumik Bhatt Reviewed-by: Manivannan Sadhasivam --- drivers/bus/mhi/core/init.c | 34 +- 1 file

[PATCH v1 6/7] bus: mhi: core: Wait for MHI READY state in most scenarios

2021-03-29 Thread Bhaumik Bhatt
When moving from SYS_ERROR transition to a different execution environment, MHI host relies on the BHI register read to spawn the next image download or wait for READY -> M0 states. The device can at times move the execution environment to mission mode when a pass through is expected, which can

[PATCH v1 3/7] bus: mhi: core: Handle EDL mode entry appropriately

2021-03-29 Thread Bhaumik Bhatt
Device entering EDL or Emergency Download Mode will be in a SYS_ERROR MHI state. This requires MHI host to proceed with the EDL image download over BHI before device can enter an MHI READY state and proceed with further bootup. Allow this to be handled by relying on the execution environment check

Re: [PATCH 4.9 00/53] 4.9.264-rc1 review

2021-03-29 Thread Shuah Khan
On 3/29/21 1:57 AM, Greg Kroah-Hartman wrote: This is the start of the stable review cycle for the 4.9.264 release. There are 53 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know. Responses should be made

Re: [PATCH 4.4 00/33] 4.4.264-rc1 review

2021-03-29 Thread Shuah Khan
On 3/29/21 1:57 AM, Greg Kroah-Hartman wrote: This is the start of the stable review cycle for the 4.4.264 release. There are 33 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know. Responses should be made

[PATCH v1 5/7] bus: mhi: core: Identify Flash Programmer as a mission mode use case

2021-03-29 Thread Bhaumik Bhatt
MHI power up can go through an EDL to Flash Programmer path when the device has a blank NAND. In those cases, mhi_sync_power_up() can timeout waiting for a mission mode execution environment. Allow a successful power up instead by identifying Flash Programmer as a valid mission mode execution

[PATCH] linux/trace_events.h: Remove duplicate struct declaration

2021-03-29 Thread Wan Jiabing
struct trace_array is declared twice. One has been declared at forward struct declaration. Remove the duplicate. And sort these forward declarations alphabetically. Signed-off-by: Wan Jiabing --- include/linux/trace_events.h | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff

[PATCH] linux/memcontrol.h: Remove duplicate struct declaration

2021-03-29 Thread Wan Jiabing
struct mem_cgroup is declared twice. One has been declared at forward struct declaration. Remove the duplicate. Signed-off-by: Wan Jiabing --- include/linux/memcontrol.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index

Re: [PATCH v3 1/1] x86/tdx: Handle MWAIT, MONITOR and WBINVD

2021-03-29 Thread Andi Kleen
> > No, if these instructions take a #VE then they were executed at CPL=0. > > MONITOR > > and MWAIT will #UD without VM-Exit->#VE. Same for WBINVD, s/#UD/#GP. > > Dare I ask about XSETBV? XGETBV does not cause a #VE, it just works normally. The guest has full AVX capabilities. -Andi

Re: [PATCH 0/2] blktrace: fix trace buffer leak and limit trace buffer size

2021-03-29 Thread Ming Lei
On Tue, Mar 23, 2021 at 04:14:38PM +0800, Ming Lei wrote: > blktrace may pass big trace buffer size via '-b', meantime the system > may have lots of CPU cores, so too much memory can be allocated for > blktrace. > > The 1st patch shutdown bltrace in blkdev_close() in case of task > exiting, for

[PATCH v7 2/7] bus: mhi: core: Clear context for stopped channels from remove()

2021-03-29 Thread Bhaumik Bhatt
If a channel was explicitly stopped but not reset and a driver remove is issued, clean up the channel context such that it is reflected on the device. This move is useful if a client driver module is unloaded or a device crash occurs with the host having placed the channel in a stopped state.

[PATCH v7 3/7] bus: mhi: core: Improvements to the channel handling state machine

2021-03-29 Thread Bhaumik Bhatt
Improve the channel handling state machine such that all commands go through a common function and a validation process to ensure that the state machine is not violated in any way and adheres to the MHI specification. Using this common function allows MHI to: 1. Fail early if device is in a bad

Re: [PATCH v2 10/13] dt-bindings: spi: cadence-qspi: Add support for Pensando Elba SoC

2021-03-29 Thread Brad Larson
On Mon, Mar 29, 2021 at 9:01 AM Mark Brown wrote: > > On Sun, Mar 28, 2021 at 06:59:35PM -0700, Brad Larson wrote: > > Add new vendor Pensando Systems Elba SoC compatible > > string and convert to json-schema. > > These are two unrelated changes and should be separate patches, again as > covered

Re: [PATCH -tip] locking: Move CONFIG_LOCK_EVENT_COUNTS into Kernel hacking section

2021-03-29 Thread Waiman Long
On 3/29/21 10:06 PM, Davidlohr Bueso wrote: It's a lot more intuitive to have it in the locking section of the kernel hacking part rather than under "General architecture-dependent options". Signed-off-by: Davidlohr Bueso --- arch/Kconfig | 9 - lib/Kconfig.debug | 9 +

Re: [External] [PATCH] linux/memcontrol.h: Remove duplicate struct declaration

2021-03-29 Thread Muchun Song
On Tue, Mar 30, 2021 at 10:03 AM Wan Jiabing wrote: > > struct mem_cgroup is declared twice. One has been declared > at forward struct declaration. Remove the duplicate. > > Signed-off-by: Wan Jiabing Reviewed-by: Muchun Song Thanks. > --- > include/linux/memcontrol.h | 2 -- > 1 file

Re: [External] [PATCH v2 5/8] hugetlb: call update_and_free_page without hugetlb_lock

2021-03-29 Thread Muchun Song
On Tue, Mar 30, 2021 at 7:24 AM Mike Kravetz wrote: > > With the introduction of remove_hugetlb_page(), there is no need for > update_and_free_page to hold the hugetlb lock. Change all callers to > drop the lock before calling. > > With additional code modifications, this will allow loops which

[PATCH 1/1] iommu/vt-d: Report right snoop capability when using FL for IOVA

2021-03-29 Thread Lu Baolu
The Intel VT-d driver checks wrong register to report snoop capablility when using first level page table for GPA to HPA translation. This might lead the IOMMU driver to say that it supports snooping control, but in reality, it does not. Fix this by always setting PASID-table-entry.PGSNP whenever

Re: [PATCH v2 13/13] gpio: Use linux/gpio/driver.h

2021-03-29 Thread Brad Larson
On Mon, Mar 29, 2021 at 6:44 AM Linus Walleij wrote: > > On Mon, Mar 29, 2021 at 4:00 AM Brad Larson wrote: > > > New drivers should include instead > > of legacy . > > > > Signed-off-by: Brad Larson > > Fold into patch 1 as indicated by Greg. > > Yours, > Linus Walleij Yes, thanks for the

Re: [External] [PATCH v2 6/8] hugetlb: change free_pool_huge_page to remove_pool_huge_page

2021-03-29 Thread Muchun Song
On Tue, Mar 30, 2021 at 7:24 AM Mike Kravetz wrote: > > free_pool_huge_page was called with hugetlb_lock held. It would remove > a hugetlb page, and then free the corresponding pages to the lower level > allocators such as buddy. free_pool_huge_page was called in a loop to > remove hugetlb

[PATCH net-next 1/1] stmmac: intel: add cross time-stamping freq difference adjustment

2021-03-29 Thread Wong Vee Khee
Cross time-stamping mechanism used in certain instance of Intel mGbE may run at different clock frequency in comparison to the clock frequency used by processor, so we introduce cross T/S frequency adjustment to ensure TSC calculation is correct when processor got the cross time-stamps.

[PATCH v2 01/14] drm/bridge: Fix the stop condition of drm_bridge_chain_pre_enable()

2021-03-29 Thread Douglas Anderson
The drm_bridge_chain_pre_enable() is not the proper opposite of drm_bridge_chain_post_disable(). It continues along the chain to _before_ the starting bridge. Let's fix that. Fixes: 05193dc38197 ("drm/bridge: Make the bridge chain a double-linked list") Signed-off-by: Douglas Anderson --- (no

[PATCH v2 00/14] drm: Fix EDID reading on ti-sn65dsi86

2021-03-29 Thread Douglas Anderson
The primary goal of this series is to try to properly fix EDID reading for eDP panels using the ti-sn65dsi86 bridge. Previously we had a patch that added EDID reading but it turned out not to work at bootup. This caused some extra churn at bootup as we tried (and failed) to read the EDID several

[PATCH v2 03/14] drm/bridge: ti-sn65dsi86: Remove incorrectly tagged kerneldoc comment

2021-03-29 Thread Douglas Anderson
A random comment inside a function had "/**" in front of it. That doesn't make sense. Remove. Signed-off-by: Douglas Anderson --- (no changes since v1) drivers/gpu/drm/bridge/ti-sn65dsi86.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH v2 02/14] drm/bridge: ti-sn65dsi86: Simplify refclk handling

2021-03-29 Thread Douglas Anderson
The clock framework makes it simple to deal with an optional clock. You can call clk_get_optional() and if the clock isn't specified it'll just return NULL without complaint. It's valid to pass NULL to enable/disable/prepare/unprepare. Let's make use of this to simplify things a tiny bit.

[PATCH v2 06/14] drm/bridge: ti-sn65dsi86: Move drm_panel_unprepare() to post_disable()

2021-03-29 Thread Douglas Anderson
We prepared the panel in pre_enable() so we should unprepare it in post_disable() to match. This becomes important once we start using pre_enable() and post_disable() to make sure things are powered on (and then off again) when reading the EDID. Signed-off-by: Douglas Anderson --- (no changes

[PATCH v2 08/14] drm/bridge: ti-sn65dsi86: Remove extra call: drm_connector_update_edid_property()

2021-03-29 Thread Douglas Anderson
As of commit 5186421cbfe2 ("drm: Introduce epoch counter to drm_connector") the drm_get_edid() function calls drm_connector_update_edid_property() for us. There's no reason for us to call it again. Signed-off-by: Douglas Anderson --- (no changes since v1) drivers/gpu/drm/bridge/ti-sn65dsi86.c

[PATCH] arm: ptdump: add __init section marker to three functions

2021-03-29 Thread Jisheng Zhang
They are not needed after booting, so mark them as __init to move them to the .init section. Signed-off-by: Jisheng Zhang --- arch/arm/mm/dump.c | 4 ++-- arch/arm/mm/ptdump_debugfs.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm/mm/dump.c

Re: [PATCH 3/3] drm/bridge: ti-sn65dsi86: Properly get the EDID, but only if refclk

2021-03-29 Thread Laurent Pinchart
Hi Doug, On Mon, Mar 29, 2021 at 07:57:05PM -0700, Doug Anderson wrote: > On Tue, Mar 16, 2021 at 5:44 PM Doug Anderson wrote: > > On Tue, Mar 16, 2021 at 2:46 PM Laurent Pinchart wrote: > > > On Mon, Mar 15, 2021 at 09:25:37AM -0700, Doug Anderson wrote: > > > > On Sat, Mar 13, 2021 at 1:17 PM

[PATCH] arm: ptdump: convert to DEFINE_SHOW_ATTRIBUTE

2021-03-29 Thread Jisheng Zhang
Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Jisheng Zhang --- arch/arm/mm/ptdump_debugfs.c | 13 + 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/arch/arm/mm/ptdump_debugfs.c b/arch/arm/mm/ptdump_debugfs.c index 8df9afac8d81..318de969ae0f

Re: [PATCH v2 1/5] hwmon: (max31790) Rework to use regmap

2021-03-29 Thread Václav Kubernát
Hi Guenter, Thank you for the comments. I will fix the issues in a V3 patch. About the mutex: I was looking at regmap and saw it did locking by itself. But I suppose writing still has to be locked, because the write function writes more than once. I will add the mutex back. Václav út 30. 3.

Re:Re: [PATCH] linux/trace_events.h: Remove duplicate struct declaration

2021-03-29 Thread 万家兵
>On Tue, 30 Mar 2021 09:55:17 +0800>Wan Jiabing wrote: > >> struct trace_array is declared twice. One has been declared >> at forward struct declaration. Remove the duplicate. >> And sort these forward declarations alphabetically. > >Um, no that's not how we sort things. > >> >> Signed-off-by:

RE: [PATCH] usb: cdns3: delete repeated clear operations

2021-03-29 Thread Pawel Laszczak
> >On 21-03-22 07:19:46, Pawel Laszczak wrote: >> Hi Peter, >> >> Can you add this patch to for-usb-next branch. >> > >Feel free add your ACK base on this patch. > >Peter >> Thanks. >> >> > >> > >> >dma_alloc_coherent already zeroes out memory, so memset is not needed. >> > >> >Signed-off-by: Wang

Re: [Question] Is there a race window between swapoff vs synchronous swap_readpage

2021-03-29 Thread Huang, Ying
Miaohe Lin writes: > On 2021/3/30 9:57, Huang, Ying wrote: >> Hi, Miaohe, >> >> Miaohe Lin writes: >> >>> Hi all, >>> I am investigating the swap code, and I found the below possible race >>> window: >>> >>> CPU 1 CPU 2 >>> -

Re: [External] [PATCH 2/3] mm: Charge active memcg when no mm is set

2021-03-29 Thread Shakeel Butt
On Mon, Mar 29, 2021 at 9:13 AM Muchun Song wrote: > > On Mon, Mar 29, 2021 at 10:49 PM Dan Schatzberg > wrote: [...] > > Since remote memcg must hold a reference, we do not > need to do something like get_active_memcg() does. > Just use css_get to obtain a ref, it is simpler. Just > Like below.

Re: [PATCH v3 2/6] PCI: brcmstb: Add control of EP voltage regulators

2021-03-29 Thread Mark Brown
On Mon, Mar 29, 2021 at 02:09:58PM -0700, Florian Fainelli wrote: > On 3/29/21 1:45 PM, Mark Brown wrote: > > management in the driver anyway? Just mark the regualtors as always on > > and set up an appropriate suspend mode configuration and everything > > should work without the drivers doing

Re: [PATCH] mm: page_alloc: ignore init_on_free=1 for page alloc

2021-03-29 Thread Andrey Konovalov
On Mon, Mar 29, 2021 at 2:10 PM Vlastimil Babka wrote: > > > commit 855a9c4018f3219db8be7e4b9a65ab22aebfde82 > > Author: Andrey Konovalov > > Date: Thu Mar 18 17:01:40 2021 +1100 > > > > kasan, mm: integrate page_alloc init with HW_TAGS > > But the mmotm patch/-next commit also changes

[PATCH v5 3/4] ioctl_userfaultfd.2: Add UFFD_FEATURE_THREAD_ID docs

2021-03-29 Thread Peter Xu
UFFD_FEATURE_THREAD_ID is supported in Linux 4.14. Acked-by: Mike Rapoport Signed-off-by: Peter Xu --- man2/ioctl_userfaultfd.2 | 5 + 1 file changed, 5 insertions(+) diff --git a/man2/ioctl_userfaultfd.2 b/man2/ioctl_userfaultfd.2 index 47ae5f473..d4a8375b8 100644 ---

[PATCH v5 0/4] man2: udpate mm/userfaultfd manpages to latest

2021-03-29 Thread Peter Xu
v5: - add r-bs for Mike R. - Fix spelling mistake "diable" [Mike R.] - s/Starting from/Since/ for patch 2 (also replaced two existing ones in the same file) [Alex] - s/un-write-protect/write-unprotect/ [Alex] - s/The process was interrupted and need to retry/The process was interrupted; retry

[PATCH v5 1/4] userfaultfd.2: Add UFFD_FEATURE_THREAD_ID docs

2021-03-29 Thread Peter Xu
UFFD_FEATURE_THREAD_ID is supported since Linux 4.14. Acked-by: Mike Rapoport Signed-off-by: Peter Xu --- man2/userfaultfd.2 | 13 + 1 file changed, 13 insertions(+) diff --git a/man2/userfaultfd.2 b/man2/userfaultfd.2 index e7dc9f813..5c41e4816 100644 --- a/man2/userfaultfd.2 +++

[PATCH v5 4/4] ioctl_userfaultfd.2: Add write-protect mode docs

2021-03-29 Thread Peter Xu
Userfaultfd write-protect mode is supported starting from Linux 5.7. Acked-by: Mike Rapoport Signed-off-by: Peter Xu --- man2/ioctl_userfaultfd.2 | 84 ++-- 1 file changed, 81 insertions(+), 3 deletions(-) diff --git a/man2/ioctl_userfaultfd.2

[PATCH v5 2/4] userfaultfd.2: Add write-protect mode

2021-03-29 Thread Peter Xu
Write-protect mode is supported starting from Linux 5.7. Acked-by: Mike Rapoport Signed-off-by: Peter Xu --- man2/userfaultfd.2 | 108 +++-- 1 file changed, 104 insertions(+), 4 deletions(-) diff --git a/man2/userfaultfd.2 b/man2/userfaultfd.2 index

Re: [PATCH v3 2/2] usb: dwc3: Fix DRD mode change sequence following programming guide

2021-03-29 Thread Wesley Cheng
On 3/6/2021 3:39 PM, Thinh Nguyen wrote: > Wesley Cheng wrote: >> >> On 1/7/2021 5:51 PM, John Stultz wrote: >>> In reviewing the previous patch, Thinh Nguyen pointed out that >>> the DRD mode change sequence should be like the following when >>> switching from host -> device according to the

[PATCH AUTOSEL 5.10 25/33] ptp_qoriq: fix overflow in ptp_qoriq_adjfine() u64 calcalation

2021-03-29 Thread Sasha Levin
From: Yangbo Lu [ Upstream commit f51d7bf1dbe5522c51c93fe8faa5f4abbdf339cd ] Current calculation for diff of TMR_ADD register value may have 64-bit overflow in this code line, when long type scaled_ppm is large. adj *= scaled_ppm; This patch is to resolve it by using mul_u64_u64_div_u64().

[PATCH AUTOSEL 5.11 36/38] cifs: Silently ignore unknown oplock break handle

2021-03-29 Thread Sasha Levin
From: Vincent Whitchurch [ Upstream commit 219481a8f90ec3a5eed9638fb35609e4b1aeece7 ] Make SMB2 not print out an error when an oplock break is received for an unknown handle, similar to SMB1. The debug message which is printed for these unknown handles may also be misleading, so fix that too.

[PATCH AUTOSEL 5.10 33/33] math: Export mul_u64_u64_div_u64

2021-03-29 Thread Sasha Levin
From: "David S. Miller" [ Upstream commit bf45947864764548697e7515fe693e10f173f312 ] Fixes: f51d7bf1dbe5 ("ptp_qoriq: fix overflow in ptp_qoriq_adjfine() u64 calcalation") Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- lib/math/div64.c | 1 + 1 file changed, 1 insertion(+)

[PATCH AUTOSEL 5.10 31/33] cifs: Silently ignore unknown oplock break handle

2021-03-29 Thread Sasha Levin
From: Vincent Whitchurch [ Upstream commit 219481a8f90ec3a5eed9638fb35609e4b1aeece7 ] Make SMB2 not print out an error when an oplock break is received for an unknown handle, similar to SMB1. The debug message which is printed for these unknown handles may also be misleading, so fix that too.

[PATCH AUTOSEL 5.11 31/38] arm64: kernel: disable CNP on Carmel

2021-03-29 Thread Sasha Levin
From: Rich Wiley [ Upstream commit 20109a859a9b514eb10c22b8a14b5704ffe93897 ] On NVIDIA Carmel cores, CNP behaves differently than it does on standard ARM cores. On Carmel, if two cores have CNP enabled and share an L2 TLB entry created by core0 for a specific ASID, a non-shareable TLBI from

[PATCH AUTOSEL 5.10 26/33] scsi: target: pscsi: Clean up after failure in pscsi_map_sg()

2021-03-29 Thread Sasha Levin
From: Martin Wilck [ Upstream commit 36fa766faa0c822c860e636fe82b1affcd022974 ] If pscsi_map_sg() fails, make sure to drop references to already allocated bios. Link: https://lore.kernel.org/r/20210323212431.15306-2-mwi...@suse.com Reviewed-by: Christoph Hellwig Reviewed-by: Lee Duncan

[PATCH AUTOSEL 5.10 32/33] io_uring: fix timeout cancel return code

2021-03-29 Thread Sasha Levin
From: Pavel Begunkov [ Upstream commit 1ee4160c73b2102a52bc97a4128a89c34821414f ] When we cancel a timeout we should emit a sensible return code, like -ECANCELED but not 0, otherwise it may trick users. Signed-off-by: Pavel Begunkov Link:

[PATCH AUTOSEL 5.4 02/19] bus: ti-sysc: Fix warning on unbind if reset is not deasserted

2021-03-29 Thread Sasha Levin
From: Tony Lindgren [ Upstream commit a7b5d7c4969aba8d1f04c29048906abaa71fb6a9 ] We currently get thefollowing on driver unbind if a reset is configured and asserted: WARNING: CPU: 0 PID: 993 at drivers/reset/core.c:432 reset_control_assert ... (reset_control_assert) from []

[PATCH AUTOSEL 5.4 04/19] bpf, x86: Use kvmalloc_array instead kmalloc_array in bpf_jit_comp

2021-03-29 Thread Sasha Levin
From: Yonghong Song [ Upstream commit de920fc64cbaa031f947e9be964bda05fd090380 ] x86 bpf_jit_comp.c used kmalloc_array to store jited addresses for each bpf insn. With a large bpf program, we have see the following allocation failures in our production server: page allocation failure:

[PATCH AUTOSEL 5.4 01/19] ARM: dts: am33xx: add aliases for mmc interfaces

2021-03-29 Thread Sasha Levin
From: Mans Rullgard [ Upstream commit 9bbce32a20d6a72c767a7f85fd6127babd1410ac ] Without DT aliases, the numbering of mmc interfaces is unpredictable. Adding them makes it possible to refer to devices consistently. The popular suggestion to use UUIDs obviously doesn't work with a blank device

[PATCH AUTOSEL 5.4 06/19] net: pxa168_eth: Fix a potential data race in pxa168_eth_remove

2021-03-29 Thread Sasha Levin
From: Pavel Andrianov [ Upstream commit 0571a753cb07982cc82f4a5115e0b321da89e1f3 ] pxa168_eth_remove() firstly calls unregister_netdev(), then cancels a timeout work. unregister_netdev() shuts down a device interface and removes it from the kernel tables. If the timeout occurs in parallel, the

[PATCH AUTOSEL 5.11 38/38] math: Export mul_u64_u64_div_u64

2021-03-29 Thread Sasha Levin
From: "David S. Miller" [ Upstream commit bf45947864764548697e7515fe693e10f173f312 ] Fixes: f51d7bf1dbe5 ("ptp_qoriq: fix overflow in ptp_qoriq_adjfine() u64 calcalation") Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- lib/math/div64.c | 1 + 1 file changed, 1 insertion(+)

[PATCH AUTOSEL 5.11 37/38] io_uring: fix timeout cancel return code

2021-03-29 Thread Sasha Levin
From: Pavel Begunkov [ Upstream commit 1ee4160c73b2102a52bc97a4128a89c34821414f ] When we cancel a timeout we should emit a sensible return code, like -ECANCELED but not 0, otherwise it may trick users. Signed-off-by: Pavel Begunkov Link:

[PATCH AUTOSEL 5.10 29/33] ia64: fix format strings for err_inject

2021-03-29 Thread Sasha Levin
From: Sergei Trofimovich [ Upstream commit 95d44a470a6814207d52dd6312203b0f4ef12710 ] Fix warning with %lx / u64 mismatch: arch/ia64/kernel/err_inject.c: In function 'show_resources': arch/ia64/kernel/err_inject.c:62:22: warning: format '%lx' expects argument of type 'long unsigned

[PATCH AUTOSEL 5.10 30/33] cifs: revalidate mapping when we open files for SMB1 POSIX

2021-03-29 Thread Sasha Levin
From: Ronnie Sahlberg [ Upstream commit cee8f4f6fcabfdf229542926128e9874d19016d5 ] RHBZ: 1933527 Under SMB1 + POSIX, if an inode is reused on a server after we have read and cached a part of a file, when we then open the new file with the re-cycled inode there is a chance that we may serve the

[PATCH AUTOSEL 5.4 05/19] net/mlx5e: Enforce minimum value check for ICOSQ size

2021-03-29 Thread Sasha Levin
From: Tariq Toukan [ Upstream commit 5115daa675ccf70497fe56e8916cf738d8212c10 ] The ICOSQ size should not go below MLX5E_PARAMS_MINIMUM_LOG_SQ_SIZE. Enforce this where it's missing. Signed-off-by: Tariq Toukan Reviewed-by: Maxim Mikityanskiy Reviewed-by: Saeed Mahameed Signed-off-by: Saeed

[PATCH AUTOSEL 5.4 03/19] platform/x86: intel-hid: Support Lenovo ThinkPad X1 Tablet Gen 2

2021-03-29 Thread Sasha Levin
From: Alban Bedel [ Upstream commit 56678a5f44ef5f0ad9a67194bbee2280c6286534 ] Like a few other system the Lenovo ThinkPad X1 Tablet Gen 2 miss the HEBC method, which prevent the power button from working. Add a quirk to enable the button array on this system family and fix the power button.

[PATCH AUTOSEL 5.10 27/33] selftests/vm: fix out-of-tree build

2021-03-29 Thread Sasha Levin
From: Rong Chen [ Upstream commit 19ec368cbc7ee1915e78c120b7a49c7f14734192 ] When building out-of-tree, attempting to make target from $(OUTPUT) directory: make[1]: *** No rule to make target '$(OUTPUT)/protection_keys.c', needed by '$(OUTPUT)/protection_keys_32'. Link:

[PATCH AUTOSEL 5.10 28/33] ia64: mca: allocate early mca with GFP_ATOMIC

2021-03-29 Thread Sasha Levin
From: Sergei Trofimovich [ Upstream commit f2a419cf495f95cac49ea289318b833477e1a0e2 ] The sleep warning happens at early boot right at secondary CPU activation bootup: smp: Bringing up secondary CPUs ... BUG: sleeping function called from invalid context at mm/page_alloc.c:4942

[PATCH] nvmem: Change to unified property interface

2021-03-29 Thread Kevin Paul Herbert
Change from using device tree (Open Firmware) APIs to the unified 'fwnode' interface. Change of_nvmem_cell_get() to fwnode_nvmem_cell_get(), and add a wrapper for of_nvmem_cell_get(). Change of_nvmem_device_get() to fwnode_nvmem_device_get(). There are no known accessors to the OF interface, so

Re: [PATCH v2 1/6] software node: Free resources explicitly when swnode_register() fails

2021-03-29 Thread Daniel Scally
Hi Andy On 29/03/2021 16:12, Andy Shevchenko wrote: > Currently we have a slightly twisted logic in swnode_register(). > It frees resources that it doesn't allocate on error path and > in once case it relies on the ->release() implementation. > > Untwist the logic by freeing resources explicitly

Re: [PATCH v2 5/6] software node: Introduce SOFTWARE_NODE_REFERENCE() helper macro

2021-03-29 Thread Daniel Scally
Hi Andy On 29/03/2021 16:12, Andy Shevchenko wrote: > This is useful to assign software node reference with arguments > in a common way. Moreover, we have already couple of users that > may be converted. And by the fact, one of them is moved right here > to use the helper. > > Signed-off-by: Andy

[PATCH v2 1/1] net: sched: bump refcount for new action in ACT replace mode

2021-03-29 Thread Kumar Kartikeya Dwivedi
Currently, action creation using ACT API in replace mode is buggy. When invoking for non-existent action index 42, tc action replace action bpf obj foo.o sec index 42 kernel creates the action, fills up the netlink response, and then just deletes the action after notifying userspace.

Re: [PATCH 1/1] net: sched: extend lifetime of new action in replace mode

2021-03-29 Thread Kumar Kartikeya Dwivedi
On Mon, Mar 29, 2021 at 02:35:12PM IST, Vlad Buslov wrote: > it seems that there are two ways actions are overwritten/deleted: > > 1. Directly through action API, which is still serialized by rtnl lock. > > 2. Classifier API, which doesn't use rtnl lock anymore and can execute > concurrently. > >

[PATCH v2 3/8] hugetlb: add per-hstate mutex to synchronize user adjustments

2021-03-29 Thread Mike Kravetz
The helper routine hstate_next_node_to_alloc accesses and modifies the hstate variable next_nid_to_alloc. The helper is used by the routines alloc_pool_huge_page and adjust_pool_surplus. adjust_pool_surplus is called with hugetlb_lock held. However, alloc_pool_huge_page can not be called with

[PATCH v2 1/8] mm/cma: change cma mutex to irq safe spinlock

2021-03-29 Thread Mike Kravetz
Ideally, cma_release could be called from any context. However, that is not possible because a mutex is used to protect the per-area bitmap. Change the bitmap to an irq safe spinlock. Signed-off-by: Mike Kravetz --- mm/cma.c | 20 +++- mm/cma.h | 2 +-

[PATCH v2 2/8] hugetlb: no need to drop hugetlb_lock to call cma_release

2021-03-29 Thread Mike Kravetz
Now that cma_release is non-blocking and irq safe, there is no need to drop hugetlb_lock before calling. Signed-off-by: Mike Kravetz --- mm/hugetlb.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 3c3e4baa4156..1d62f0492e7b 100644 --- a/mm/hugetlb.c

[PATCH v2 5/8] hugetlb: call update_and_free_page without hugetlb_lock

2021-03-29 Thread Mike Kravetz
With the introduction of remove_hugetlb_page(), there is no need for update_and_free_page to hold the hugetlb lock. Change all callers to drop the lock before calling. With additional code modifications, this will allow loops which decrease the huge page pool to drop the hugetlb_lock with each

[PATCH v2 6/8] hugetlb: change free_pool_huge_page to remove_pool_huge_page

2021-03-29 Thread Mike Kravetz
free_pool_huge_page was called with hugetlb_lock held. It would remove a hugetlb page, and then free the corresponding pages to the lower level allocators such as buddy. free_pool_huge_page was called in a loop to remove hugetlb pages and these loops could hold the hugetlb_lock for a

[PATCH v2 8/8] hugetlb: add lockdep_assert_held() calls for hugetlb_lock

2021-03-29 Thread Mike Kravetz
After making hugetlb lock irq safe and separating some functionality done under the lock, add some lockdep_assert_held to help verify locking. Signed-off-by: Mike Kravetz Acked-by: Michal Hocko Reviewed-by: Miaohe Lin Reviewed-by: Muchun Song --- mm/hugetlb.c | 9 + 1 file changed, 9

[PATCH] xfrm/compat: Cleanup WARN()s that can be user-triggered

2021-03-29 Thread Dmitry Safonov
Replace WARN_ONCE() that can be triggered from userspace with pr_warn_once(). Those still give user a hint what's the issue. I've left WARN()s that are not possible to trigger with current code-base and that would mean that the code has issues: - relying on current compat_msg_min[type] <=

  1   2   3   4   5   6   7   8   9   10   >