Re: [RFC-PATCH 1/2] mm: Add __GFP_NO_LOCKS flag

2020-08-18 Thread Thomas Gleixner
On Tue, Aug 18 2020 at 06:53, Paul E. McKenney wrote: > On Tue, Aug 18, 2020 at 09:43:44AM +0200, Michal Hocko wrote: >> Thomas had a good point that it doesn't really make much sense to >> optimize for flooders because that just makes them more effective. > > The point is not to make the flooders

[PATCH v2 net] ptp: ptp_clockmatrix: use i2c_master_send for i2c write

2020-08-18 Thread min.li.xe
From: Min Li The old code for i2c write would break on some controllers, which fails at handling Repeated Start Condition. So we will just use i2c_master_send to handle write in one transanction. Changes since v1: - Remove indentation change Signed-off-by: Min Li ---

Re: [PATCH v3 0/2] add regmap-spi-avmm & Intel Max10 BMC chip support

2020-08-18 Thread Tom Rix
Yilun, I was looking at the tx side a bit and think the padding function could be moved into the pkt/phy function.  The pky/phy function already is looking for the eop's so reuse it and remove the search for eop and exchange the loops that do char moving and padding to mem* functions.  The

[PATCH] net: stmmac: Fix signedness bug in stmmac_probe_config_dt()

2020-08-18 Thread YueHaibing
The "plat->phy_interface" variable is an enum and in this context GCC will treat it as an unsigned int so the error handling is never triggered. Fixes: b9f0b2f634c0 ("net: stmmac: platform: fix probe for ACPI devices") Signed-off-by: YueHaibing ---

Re: [RFC PATCH 0/5] KVM: arm64: Add pvtime LPT support

2020-08-18 Thread Marc Zyngier
On 2020-08-17 09:41, Keqian Zhu wrote: Hi all, This patch series picks up the LPT pvtime feature originally developed by Steven Price: https://patchwork.kernel.org/cover/10726499/ Backgroud: There is demand for cross-platform migration, which means we have to solve different CPU features and

Re: [PATCH v4 3/7] genirq: Introduce irq_suspend_one() and irq_resume_one() callbacks

2020-08-18 Thread Thomas Gleixner
Maulik, On Tue, Aug 18 2020 at 10:05, Maulik Shah wrote: > On 8/14/2020 4:28 AM, Doug Anderson wrote: >> On Thu, Aug 13, 2020 at 3:09 PM Thomas Gleixner wrote: > > + if (chip->flags & IRQCHIP_UNMASK_WAKEUP_ON_SUSPEND) > + unmask_irq(desc); > > I tried this

[PATCH v2 2/2] arm64: dts: rockchip: change fallback string rockchip,rk3308-spdif

2020-08-18 Thread Johan Jonker
A test with the command below shows that the compatible string "rockchip,rk3308-spdif", "rockchip,rk3328-spdif" is already in use, but is not added to a document. The current fallback string "rockchip,rk3328-spdif" points to a data set enum RK_SPDIF_RK3366 in rockchip_spdif.c that is not used

Re: [PATCH v4 12/20] gpiolib: cdev: support setting debounce

2020-08-18 Thread Kent Gibson
On Mon, Aug 17, 2020 at 08:21:58PM +0200, Bartosz Golaszewski wrote: > On Fri, Aug 14, 2020 at 5:05 AM Kent Gibson wrote: > > > > Add support for setting debounce on a line via the GPIO uAPI. > > Where debounce is not supported by hardware, a software debounce is > > provided. > > > >

[PATCH v2 1/2] ASoC: rockchip-spdif: add description for rk3308

2020-08-18 Thread Johan Jonker
A test with the command below shows that the compatible string "rockchip,rk3308-spdif", "rockchip,rk3328-spdif" is already in use, but is not added to a document. The current fallback string "rockchip,rk3328-spdif" points to a data set enum RK_SPDIF_RK3366 in rockchip_spdif.c that is not used

Re: [PATCH] scsi: ufs: Remove an unpaired ufshcd_scsi_unblock_requests() in err_handler()

2020-08-18 Thread Bart Van Assche
On 2020-08-17 22:20, Can Guo wrote: > Commit 5586dd8ea250a ("scsi: ufs: Fix a race condition between error > handler and runtime PM ops") moves the ufshcd_scsi_block_requests() inside > err_handler(), but forgets to remove the ufshcd_scsi_unblock_requests() in > the early return path. Correct the

Re: [PATCH v3 2/3] selinux: add basic filtering for audit trace events

2020-08-18 Thread Stephen Smalley
On 8/17/20 1:07 PM, Thiébaud Weksteen wrote: From: Peter Enderborg This patch adds further attributes to the event. These attributes are helpful to understand the context of the message and can be used to filter the events. There are three common items. Source context, target context and

[PATCH 05/11] soundwire: bus: update multi-link definition with hw sync details

2020-08-18 Thread Bard Liao
From: Pierre-Louis Bossart Hardware-based synchronization is typically required when the bus->multi_link flag is set. On Intel platforms, when the Cadence IP is configured in 'Multi Master Mode', the hardware synchronization is required even when a stream only uses a single segment. The

[PATCH 11/11] soundwire: intel: don't manage link power individually

2020-08-18 Thread Bard Liao
From: Pierre-Louis Bossart Each link has separate power controls, but experimental results show we need to use an all-or-none approach to the link power management. This change has marginal power impacts, the DSP needs to be powered anyways before SoundWire links can be powered, and even when

[PATCH 02/11] soundwire: intel: ignore software command retries

2020-08-18 Thread Bard Liao
From: Pierre-Louis Bossart with multiple links synchronized in hardware, retrying commands in software is not recommended. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao --- drivers/soundwire/intel.c | 5 + 1 file changed, 5 insertions(+) diff --git

[PATCH 10/11] soundwire: intel: pass link_mask information to each master

2020-08-18 Thread Bard Liao
From: Pierre-Louis Bossart While the hardware exposes independent bits to power-up each master, the recommended sequence is to power all links or none. Idle links can still use the clock stop mode while the master is powered. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao ---

[PATCH 08/11] soundwire: stream: enable hw_sync as needed by hardware

2020-08-18 Thread Bard Liao
From: Pierre-Louis Bossart Use platform-specific information to decide when to use hw_sync, not only a number of links > 1. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao --- drivers/soundwire/stream.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff

[PATCH 07/11] soundwire: intel: Only call sdw stream APIs for the first cpu_dai

2020-08-18 Thread Bard Liao
We should call these APIs once per stream. So we can only call it when the dai ops is invoked for the first cpu dai. Signed-off-by: Bard Liao Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan --- drivers/soundwire/intel.c | 45 +-- 1 file

[PATCH 06/11] soundwire: intel: add multi-link hw_synchronization information

2020-08-18 Thread Bard Liao
From: Pierre-Louis Bossart set the flags as required by hardware implementation Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao --- drivers/soundwire/intel.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c index

[PATCH 04/11] soundwire: intel: add missing support for all clock stop modes

2020-08-18 Thread Bard Liao
From: Pierre-Louis Bossart Deal with the BUS_RESET case, which is the default. The only change is to add support for the exit sequence using the syncArm/syncGo mode for the exit reset sequence. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao --- drivers/soundwire/intel.c | 49

[PATCH 03/11] soundwire: intel: add multi-link support

2020-08-18 Thread Bard Liao
From: Pierre-Louis Bossart The multi-link support is enabled with a hardware gsync signal connecting all links. All commands and operations which typically are handled on an SSP boundary will be deferred further and enabled across all links with the 'syncGo' sequence. Signed-off-by:

Re: Scheduler benchmarks

2020-08-18 Thread Greg KH
On Tue, Aug 18, 2020 at 08:00:11PM +0530, Muni Sekhar wrote: > Hi all, > > I’ve two identical Linux systems with only kernel differences. What are the differences in the kernels? > While doing kernel profiling with perf, I got the below mentioned > metrics for Scheduler benchmarks. > > 1st

[PATCH 09/11] soundwire: intel: add dynamic debug trace for clock-stop invalid configs

2020-08-18 Thread Bard Liao
From: Pierre-Louis Bossart Detect cases where the clock is assumed to be stopped but the IP is not in the relevant state, and add a dynamic debug trace. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao --- drivers/soundwire/intel.c | 5 + 1 file changed, 5 insertions(+) diff

[PATCH 01/11] soundwire: intel: disable shim wake on suspend

2020-08-18 Thread Bard Liao
From: Pierre-Louis Bossart If we enabled the clock stop mode and suspend, we need to disable the shim wake. We do so only if the parent is pm_runtime active due to power rail dependencies. GitHub issue: https://github.com/thesofproject/linux/issues/1678 Signed-off-by: Pierre-Louis Bossart

[PATCH 00/11] soundwire: intel: add multi-link support

2020-08-18 Thread Bard Liao
This series enables multi-link support for Intel platforms. Bard Liao (1): soundwire: intel: Only call sdw stream APIs for the first cpu_dai Pierre-Louis Bossart (10): soundwire: intel: disable shim wake on suspend soundwire: intel: ignore software command retries soundwire: intel: add

Scheduler benchmarks

2020-08-18 Thread Muni Sekhar
Hi all, I’ve two identical Linux systems with only kernel differences. While doing kernel profiling with perf, I got the below mentioned metrics for Scheduler benchmarks. 1st system (older kernel version compared to the other system) benchmark result: $ perf bench sched messaging -g 64 #

Re: [PATCH v3 1/3] selinux: add tracepoint on audited events

2020-08-18 Thread Stephen Smalley
On 8/17/20 1:07 PM, Thiébaud Weksteen wrote: The audit data currently captures which process and which target is responsible for a denial. There is no data on where exactly in the process that call occurred. Debugging can be made easier by being able to reconstruct the unified kernel and

Re: [PATCH bpf-next v8 1/7] A purely mechanical change to split the renaming from the actual generalization.

2020-08-18 Thread KP Singh
On 8/18/20 1:56 AM, Martin KaFai Lau wrote: > On Mon, Aug 03, 2020 at 06:46:49PM +0200, KP Singh wrote: >> From: KP Singh >> >> Flags/consts: >> >> SK_STORAGE_CREATE_FLAG_MASKBPF_LOCAL_STORAGE_CREATE_FLAG_MASK >> BPF_SK_STORAGE_CACHE_SIZE BPF_LOCAL_STORAGE_CACHE_SIZE >>

Re: [PATCH v3 00/44] SPMI patches needed by Hikey 970

2020-08-18 Thread Mauro Carvalho Chehab
Em Tue, 18 Aug 2020 16:17:50 +0200 Greg Kroah-Hartman escreveu: > On Mon, Aug 17, 2020 at 09:10:19AM +0200, Mauro Carvalho Chehab wrote: > > Hi Greg, > > > > This patch series is part of a work I'm doing in order to be able to support > > a HiKey 970 board that I recently got on my hands. >

Re: [PATCH] staging: emxx_udc: Use standard BIT() macro

2020-08-18 Thread Randy Dunlap
On 8/18/20 6:49 AM, Alex Dewar wrote: > Currently emxx_udc.h defines bit values using local macros. Use the > standard one instead. > > Also, combine bit values with bitwise-or rather than addition, as > suggested by Coccinelle. > > Signed-off-by: Alex Dewar Hi, Does this build? Just

RE: [PATCH v8 3/5] firmware: xilinx: Add RPU configuration APIs

2020-08-18 Thread Ben Levinsky
> -Original Message- > From: Stefano Stabellini > Sent: Thursday, August 13, 2020 1:36 PM > To: Ben Levinsky > Cc: Stefano Stabellini ; Michal Simek > ; devicet...@vger.kernel.org; > mathieu.poir...@linaro.org; Ed T. Mooring ; linux- > remotep...@vger.kernel.org;

Re: [PATCH v2 1/4] staging: android: Replace BUG_ON with WARN_ON

2020-08-18 Thread Greg Kroah-Hartman
On Tue, Aug 18, 2020 at 05:19:40PM +0300, Tomer Samara wrote: > On Tue, Aug 18, 2020 at 04:11:06PM +0200, Greg Kroah-Hartman wrote: > > On Sun, Aug 16, 2020 at 10:23:25PM +0300, Tomer Samara wrote: > > > BUG_ON() is replaced with WARN_ON at ion_page_pool.c > > > > Why? > > > > > Fixes the

Re: [PATCH v36 21/24] x86/vdso: Implement a vDSO for Intel SGX enclave call

2020-08-18 Thread Jarkko Sakkinen
On Thu, Aug 06, 2020 at 10:55:43AM -0400, Nathaniel McCallum wrote: > In a past revision of this patch, I had requested a void *misc > parameter that could be passed through vdso_sgx_enter_enclave_t into > sgx_enclave_exit_handler_t. This request encountered some push back > and I dropped the

RE: [PATCH v8 2/5] firmware: xilinx: Add shutdown/wakeup APIs

2020-08-18 Thread Ben Levinsky
> -Original Message- > From: Stefano Stabellini > Sent: Thursday, August 13, 2020 1:36 PM > To: Ben Levinsky > Cc: Stefano Stabellini ; Michal Simek > ; devicet...@vger.kernel.org; > mathieu.poir...@linaro.org; Ed T. Mooring ; linux- > remotep...@vger.kernel.org;

Re: [PATCH 1/2] PCI: rockchip: Work around missing device_type property in DT

2020-08-18 Thread Rob Herring
On Tue, Aug 18, 2020 at 1:35 AM Marc Zyngier wrote: > > On 2020-08-17 17:12, Rob Herring wrote: > > On Sun, Aug 16, 2020 at 4:40 AM Marc Zyngier wrote: > >> > >> On Sun, 16 Aug 2020 00:22:28 +0100, > >> Bjorn Helgaas wrote: > >> > > >> > On Sat, Aug 15, 2020 at 01:51:11PM +0100, Marc Zyngier

Re: [PATCH 2/3] fpga manager: xilinx-spi: provide better diagnostics on programming failure

2020-08-18 Thread Tom Rix
On 8/18/20 3:20 AM, Luca Ceresoli wrote: > [a question for GPIO maintainers below] > > Hi Tom, > > thanks for your review! > > On 17/08/20 20:15, Tom Rix wrote: >> The other two patches are fine. >> >> On 8/17/20 9:59 AM, Luca Ceresoli wrote: >>> When the DONE pin does not go high after

Re: [PATCH v2 1/4] staging: android: Replace BUG_ON with WARN_ON

2020-08-18 Thread Tomer Samara
On Tue, Aug 18, 2020 at 04:11:06PM +0200, Greg Kroah-Hartman wrote: > On Sun, Aug 16, 2020 at 10:23:25PM +0300, Tomer Samara wrote: > > BUG_ON() is replaced with WARN_ON at ion_page_pool.c > > Why? > > > Fixes the following issue: > > Avoid crashing the kernel - try using WARN_ON & recovery code

Re: [rcu:rcu/next 125/128] kernel/rcu/rcuscale.c:430:6: error: 'perf_type' undeclared; did you mean

2020-08-18 Thread Paul E. McKenney
On Tue, Aug 18, 2020 at 02:44:34PM +0800, kernel test robot wrote: > Hi Paul, > > First bad commit (maybe != root cause): Stephen Rothwell beat you to this one, but yes, it is a real bug. I have queued a fix and will rebase it in later today. Thank you for your testing efforts!

arch/powerpc/platforms/86xx/mpc8610_hpcd.c:295:23: sparse: sparse: incorrect type in assignment (different address spaces)

2020-08-18 Thread kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 06a4ec1d9dc652e17ee3ac2ceb6c7cf6c2b75cdd commit: 670d0a4b10704667765f7d18f7592993d02783aa sparse: use identifiers to define address spaces date: 9 weeks ago config: powerpc-randconfig-s032-20200818

Re: [PATCH v3.1 43/44] dt: document HiSilicon SPMI controller and mfd/regulator properties

2020-08-18 Thread Greg Kroah-Hartman
On Tue, Aug 18, 2020 at 01:10:24PM +0200, Mauro Carvalho Chehab wrote: > From e464ec2c38c083403b556e60f189ee8ae2f2c9c6 Mon Sep 17 00:00:00 2001 > From: Mauro Carvalho Chehab > Date: Fri, 31 Jul 2020 09:46:02 +0200 > Subject: [PATCH] dt: document HiSilicon SPMI controller and mfd/regulator >

Re: [PATCH v3 42/44] MAINTAINERS: add an entry for HiSilicon 6421v600 drivers

2020-08-18 Thread Greg Kroah-Hartman
On Mon, Aug 17, 2020 at 09:11:01AM +0200, Mauro Carvalho Chehab wrote: > Add an entry for the SPMI, MFD and PMIC parts of the > HiSilicon 6421v600 support. > > Signed-off-by: Mauro Carvalho Chehab > --- > MAINTAINERS | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/MAINTAINERS

[PATCH v4 6/6] mm: secretmem: add ability to reserve memory at boot

2020-08-18 Thread Mike Rapoport
From: Mike Rapoport Taking pages out from the direct map and bringing them back may create undesired fragmentation and usage of the smaller pages in the direct mapping of the physical memory. This can be avoided if a significantly large area of the physical memory would be reserved for

[PATCH v4 5/6] mm: secretmem: use PMD-size pages to amortize direct map fragmentation

2020-08-18 Thread Mike Rapoport
From: Mike Rapoport Removing a PAGE_SIZE page from the direct map every time such page is allocated for a secret memory mapping will cause severe fragmentation of the direct map. This fragmentation can be reduced by using PMD-size pages as a pool for small pages for secret memory mappings. Add

Re: [PATCH v3 00/44] SPMI patches needed by Hikey 970

2020-08-18 Thread Greg Kroah-Hartman
On Mon, Aug 17, 2020 at 09:10:19AM +0200, Mauro Carvalho Chehab wrote: > Hi Greg, > > This patch series is part of a work I'm doing in order to be able to support > a HiKey 970 board that I recently got on my hands. With this applied, I get the following build error: ERROR: modpost:

[PATCH v4 4/6] arch, mm: wire up memfd_secret system call were relevant

2020-08-18 Thread Mike Rapoport
From: Mike Rapoport Wire up memfd_secret system call on architectures that define ARCH_HAS_SET_DIRECT_MAP, namely arm64, risc-v and x86. Signed-off-by: Mike Rapoport Acked-by: Palmer Dabbelt Acked-by: Arnd Bergmann --- arch/arm64/include/asm/unistd.h| 2 +-

[PATCH v4 0/6] mm: introduce memfd_secret system call to create "secret" memory areas

2020-08-18 Thread Mike Rapoport
From: Mike Rapoport Hi, This is an implementation of "secret" mappings backed by a file descriptor. v4 changes: * rebase on v5.9-rc1 * Do not redefine PMD_PAGE_ORDER in fs/dax.c, thanks Kirill * Make secret mappings exclusive by default and only require flags to memfd_secret() system call

[PATCH v4 1/6] mm: add definition of PMD_PAGE_ORDER

2020-08-18 Thread Mike Rapoport
From: Mike Rapoport The definition of PMD_PAGE_ORDER denoting the number of base pages in the second-level leaf page is already used by DAX and maybe handy in other cases as well. Several architectures already have definition of PMD_ORDER as the size of second level page table, so to avoid

[PATCH v4 3/6] mm: introduce memfd_secret system call to create "secret" memory areas

2020-08-18 Thread Mike Rapoport
From: Mike Rapoport Introduce "memfd_secret" system call with the ability to create memory areas visible only in the context of the owning process and not mapped not only to other processes but in the kernel page tables as well. The user will create a file descriptor using the memfd_secret()

[PATCH v4 2/6] mmap: make mlock_future_check() global

2020-08-18 Thread Mike Rapoport
From: Mike Rapoport It will be used by the upcoming secret memory implementation. Signed-off-by: Mike Rapoport --- mm/internal.h | 3 +++ mm/mmap.c | 5 ++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/mm/internal.h b/mm/internal.h index 10c677655912..40544fbf49c9

[PATCH v7 00/18] Add static_call

2020-08-18 Thread Peter Zijlstra
Hi all, static_call(), is the idea of static_branch() applied to indirect function calls. Remove a data load (indirection) by modifying the text. The inline implementation still relies on objtool to generate the .static_call_sites section, mostly because this is a natural place for x86_64 and

Re: [PATCH] net: Relax the npages test against MAX_SKB_FRAGS

2020-08-18 Thread Eric Dumazet
On Tue, Aug 18, 2020 at 4:58 AM Miaohe Lin wrote: > > The npages test against MAX_SKB_FRAGS can be relaxed if we succeed to > allocate high order pages as the note in comment said. > > Signed-off-by: Miaohe Lin > --- > net/core/skbuff.c | 11 --- > 1 file changed, 4 insertions(+), 7

[PATCH v7 16/18] static_call: Allow early init

2020-08-18 Thread Peter Zijlstra
In order to use static_call() to wire up x86_pmu, we need to initialize earlier, specifically before memory allocation works; copy some of the tricks from jump_label to enable this. Primarily we overload key->next to store a sites pointer when there are no modules, this avoids having to use

[PATCH v7 07/18] static_call: Add inline static call infrastructure

2020-08-18 Thread Peter Zijlstra
From: Josh Poimboeuf Add infrastructure for an arch-specific CONFIG_HAVE_STATIC_CALL_INLINE option, which is a faster version of CONFIG_HAVE_STATIC_CALL. At runtime, the static call sites are patched directly, rather than using the out-of-line trampolines. Compared to out-of-line static calls,

[PATCH] writeback: clear auto_free in initializaiton

2020-08-18 Thread trix
From: Tom Rix Review fs/fs-writeback.c bdi_split_work_to_wbs The CONFIG_CGROUP_WRITEBACK version contains this line base_work->auto_free = 0; Which seems like a strange place to set auto_free as it is not where the rest of base_work is initialized. In the default version of

[PATCH v7 15/18] static_call: Add some validation

2020-08-18 Thread Peter Zijlstra
Verify the text we're about to change is as we expect it to be. Requested-by: Steven Rostedt Signed-off-by: Peter Zijlstra (Intel) --- arch/x86/kernel/static_call.c | 28 ++-- 1 file changed, 26 insertions(+), 2 deletions(-) --- a/arch/x86/kernel/static_call.c +++

[PATCH v7 03/18] module: Properly propagate MODULE_STATE_COMING failure

2020-08-18 Thread Peter Zijlstra
Now that notifiers got unbroken; use the proper interface to handle notifier errors and propagate them. There were already MODULE_STATE_COMING notifiers that failed; notably: - jump_label_module_notifier() - tracepoint_module_notify() - bpf_event_notify() By propagating this error, we fix

[PATCH v7 13/18] static_call: Add static_call_cond()

2020-08-18 Thread Peter Zijlstra
Extend the static_call infrastructure to optimize the following common pattern: if (func_ptr) func_ptr(args...) For the trampoline (which is in effect a tail-call), we patch the JMP.d32 into a RET, which then directly consumes the trampoline call. For the in-line sites

[PATCH v7 10/18] x86/static_call: Add inline static call implementation for x86-64

2020-08-18 Thread Peter Zijlstra
From: Josh Poimboeuf Add the inline static call implementation for x86-64. The generated code is identical to the out-of-line case, except we move the trampoline into it's own section. Objtool uses the trampoline naming convention to detect all the call sites. It then annotates those call sites

[PATCH v7 14/18] static_call: Handle tail-calls

2020-08-18 Thread Peter Zijlstra
GCC can turn our static_call(name)(args...) into a tail call, in which case we get a JMP.d32 into the trampoline (which then does a further tail-call). Teach objtool to recognise and mark these in .static_call_sites and adjust the code patching to deal with this. Signed-off-by: Peter Zijlstra

[PATCH v7 09/18] x86/static_call: Add out-of-line static call implementation

2020-08-18 Thread Peter Zijlstra
From: Josh Poimboeuf Add the x86 out-of-line static call implementation. For each key, a permanent trampoline is created which is the destination for all static calls for the given key. The trampoline has a direct jump which gets patched by static_call_update() when the destination function

[PATCH v7 01/18] notifier: Fix broken error handling pattern

2020-08-18 Thread Peter Zijlstra
The current notifiers have the following error handling pattern all over the place: int err, nr; err = __foo_notifier_call_chain(, val_up, v, -1, ); if (err & NOTIFIER_STOP_MASK) __foo_notifier_call_chain(, val_down, v, nr-1, NULL) And aside from the

[PATCH v7 06/18] static_call: Add basic static call infrastructure

2020-08-18 Thread Peter Zijlstra
From: Josh Poimboeuf Static calls are a replacement for global function pointers. They use code patching to allow direct calls to be used instead of indirect calls. They give the flexibility of function pointers, but with improved performance. This is especially important for cases where

[PATCH v7 18/18] x86/perf, static_call: Optimize x86_pmu methods

2020-08-18 Thread Peter Zijlstra
Replace many of the indirect calls with static_call(). The average PMI time, as measured by perf_sample_event_took()*: PRE:3283.03 [ns] POST: 3145.12 [ns] Which is a ~138 [ns] win per PMI, or a ~4.2% decrease. [*] on an IVB-EP, using: 'perf record -a -e cycles -- make O=defconfig-build/

[PATCH v7 08/18] static_call: Avoid kprobes on inline static_call()s

2020-08-18 Thread Peter Zijlstra
Similar to how we disallow kprobes on any other dynamic text (ftrace/jump_label) also disallow kprobes on inline static_call()s. Signed-off-by: Peter Zijlstra (Intel) --- arch/x86/kernel/kprobes/opt.c |4 +- include/linux/static_call.h | 11 ++ kernel/kprobes.c |2 +

[PATCH v7 17/18] tracepoint: Optimize using static_call()

2020-08-18 Thread Peter Zijlstra
From: "Steven Rostedt (VMware)" Currently the tracepoint site will iterate a vector and issue indirect calls to however many handlers are registered (ie. the vector is long). Using static_call() it is possible to optimize this for the common case of only having a single handler registered. In

[PATCH v7 02/18] module: Fix up module_notifier return values

2020-08-18 Thread Peter Zijlstra
While auditing all module notifiers I noticed a whole bunch of fail wrt the return value. Notifiers have a 'special' return semantics. As is; NOTIFY_DONE vs NOTIFY_OK is a bit vague; but notifier_from_errno(0) results in NOTIFY_OK and NOTIFY_DONE has a comment that says "Don't care". >From this

[PATCH v7 11/18] static_call: Simple self-test

2020-08-18 Thread Peter Zijlstra
Signed-off-by: Peter Zijlstra (Intel) --- arch/Kconfig |6 ++ kernel/static_call.c | 43 +++ 2 files changed, 49 insertions(+) --- a/arch/Kconfig +++ b/arch/Kconfig @@ -103,6 +103,12 @@ config STATIC_KEYS_SELFTEST help

[PATCH v7 12/18] x86/alternatives: Teach text_poke_bp() to emulate RET

2020-08-18 Thread Peter Zijlstra
Future patches will need to poke a RET instruction, provide the infrastructure required for this. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Steven Rostedt (VMware) --- arch/x86/include/asm/text-patching.h | 19 +++ arch/x86/kernel/alternative.c|5 + 2

[PATCH v7 05/18] compiler.h: Make __ADDRESSABLE() symbol truly unique

2020-08-18 Thread Peter Zijlstra
From: Josh Poimboeuf The __ADDRESSABLE() macro uses the __LINE__ macro to create a temporary symbol which has a unique name. However, if the macro is used multiple times from within another macro, the line number will always be the same, resulting in duplicate symbols. Make the temporary

[PATCH v7 04/18] jump_label,module: Fix module lifetime for __jump_label_mod_text_reserved

2020-08-18 Thread Peter Zijlstra
Nothing ensures the module exists while we're iterating mod->jump_entries in __jump_label_mod_text_reserved(), take a module reference to ensure the module sticks around. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Steven Rostedt (VMware) --- kernel/jump_label.c | 10 -- 1

Re: [PATCH v2 4/4] staging: android: Add error handling to order_to_index callers

2020-08-18 Thread Greg Kroah-Hartman
On Sun, Aug 16, 2020 at 10:31:22PM +0300, Tomer Samara wrote: > Add error check to: > - free_buffer_page > - alloc_buffer_page > after calling order_to_index, due to converting BUG to WARN at > order_to_index. You are fixing a bug you caused in a previous patch, not good :) thanks, greg k-h

[RFC PATCH] iio: core: Add optional symbolic label to a device channel

2020-08-18 Thread Cristian Pop
If a label is defined in the device tree for this channel add that to the channel specific attributes. This is useful for userspace to be able to identify an individual channel. Signed-off-by: Cristian Pop --- drivers/iio/industrialio-core.c | 10 -- include/linux/iio/iio.h | 2

Re: [PATCH v2 3/4] staging: android: Convert BUG to WARN

2020-08-18 Thread Greg Kroah-Hartman
On Sun, Aug 16, 2020 at 10:30:10PM +0300, Tomer Samara wrote: > replace BUG() with WARN() at ion_sytem_heap.c, this > fix the following checkpatch issue: > Avoid crashing the kernel - try using WARN_ON & > recovery code ratherthan BUG() or BUG_ON(). > > Signed-off-by: Tomer Samara > --- >

Re: [PATCH v2 1/4] staging: android: Replace BUG_ON with WARN_ON

2020-08-18 Thread Greg Kroah-Hartman
On Sun, Aug 16, 2020 at 10:23:25PM +0300, Tomer Samara wrote: > BUG_ON() is replaced with WARN_ON at ion_page_pool.c Why? > Fixes the following issue: > Avoid crashing the kernel - try using WARN_ON & recovery code ratherthan > BUG() or BUG_ON(). Ideally you can get rid of WARN_ON() too,

Re: [PATCH] PCI: tegra: no need to check return value of debugfs_create functions

2020-08-18 Thread Thierry Reding
On Tue, Aug 18, 2020 at 03:37:39PM +0200, Greg Kroah-Hartman wrote: > When calling debugfs functions, there is no need to ever check the > return value. The function can work or not, but the code logic should > never do something different based on this. > > Cc: Lorenzo Pieralisi > Cc: Rob

Re: [PATCH v2 2/4] staging: android: Add error handling to ion_page_pool_shrink

2020-08-18 Thread Greg Kroah-Hartman
On Sun, Aug 16, 2020 at 10:24:22PM +0300, Tomer Samara wrote: > Add error check to ion_page_pool_shrink after calling > ion_page_pool_remove, due to converting BUG_ON to WARN_ON. > > Signed-off-by: Tomer Samara So this fixes a previous patch? That's not good, please merge them together so you

Re: linux-next: build failure after merge of the rcu tree

2020-08-18 Thread Paul E. McKenney
On Tue, Aug 18, 2020 at 11:43:54AM +1000, Stephen Rothwell wrote: > Hi all, > > After merging the rcu tree, today's linux-next build (x86_64 allmodconfig) > failed like this: > > In file included from include/linux/kernel.h:15, > from kernel/rcu/rcuscale.c:13: >

Re: [PATCH] staging: rtl8723bs: os_dep: fix function-name print using __func__

2020-08-18 Thread Greg KH
On Wed, Aug 12, 2020 at 09:37:45PM +0530, Mohammed Rushad wrote: > This patch to the os_intfs.c fixes the printing of function names using > the preferred '"%s...", __func__' and alignment issues as pointed out by > the checkpatch.pl tool. > > Signed-off-by: Mohammed Rushad > --- >

[PATCH] ethernet: cirrus: Remove unused macros

2020-08-18 Thread Alex Dewar
Remove a couple of unused #defines in cs89x0.h. Signed-off-by: Alex Dewar --- drivers/net/ethernet/cirrus/cs89x0.h | 4 1 file changed, 4 deletions(-) diff --git a/drivers/net/ethernet/cirrus/cs89x0.h b/drivers/net/ethernet/cirrus/cs89x0.h index 91423b70bb45..210f9ec9af4b 100644 ---

Re: [PATCH] staging: rtl8723bs: os_dep: fix coding style issue in xmit_linux.c

2020-08-18 Thread Greg KH
On Mon, Aug 03, 2020 at 12:26:44AM +0530, Mohammed Rushad wrote: > This is a patch to the xmit_linux.c file that fixes brace and missing > line warning found by checkpatch.pl tool > > Signed-off-by: Mohammed Rushad > --- > drivers/staging/rtl8723bs/os_dep/xmit_linux.c | 4 ++-- > 1 file

Re: [PATCH 2/2] x86/MCE/AMD Support new memory interleaving schemes during address translation

2020-08-18 Thread Yazen Ghannam
On Sat, Aug 15, 2020 at 11:13:36AM +0200, Ingo Molnar wrote: > > * Yazen Ghannam wrote: > > > + /* Read D18F1x208 (System Fabric ID Mask 0). */ > > + if (amd_df_indirect_read(nid, 1, 0x208, umc, )) > > + goto out_err; > > + > > + /* Determine if system is a legacy Data

Re: [PATCH v2] staging: wfx: refactor to avoid duplication at hif_tx.c

2020-08-18 Thread Greg KH
On Mon, Aug 10, 2020 at 11:38:33AM +0200, Jérôme Pouiller wrote: > Hello Tomer, > > On Wednesday 5 August 2020 14:14:42 CEST Tomer Samara wrote: > > > > Add functions wfx_full_send(), wfx_full_send_no_reply_async(), > > wfx_full_send_no_reply() and wfx_full_send_no_reply_free() > > which works

Re: [PATCH v4 09/20] gpiolib: cdev: support edge detection for uAPI v2

2020-08-18 Thread Kent Gibson
On Sun, Aug 16, 2020 at 04:32:34PM +0200, Bartosz Golaszewski wrote: > On Fri, Aug 14, 2020 at 5:04 AM Kent Gibson wrote: > > > > Add support for edge detection to lines requested using > > GPIO_V2_GET_LINE_IOCTL. > > [snip] > > > > + /* event_buffer_size only valid with edge detection */

[PATCH -next] crypto: sa2ul - Fix pointer-to-int-cast warning

2020-08-18 Thread YueHaibing
drivers/crypto/sa2ul.c: In function ‘sa_sha_init’: drivers/crypto/sa2ul.c:1486:33: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] crypto_ahash_digestsize(tfm), (u64)rctx); ^ ./include/linux/dev_printk.h:123:47: note: in

Re: [PATCH] pinctrl: cherryview: Add quirk with custom translation of ACPI GPIO numbers

2020-08-18 Thread Andy Shevchenko
On Fri, Apr 17, 2020 at 05:55:44PM -0700, Brian Norris wrote: > - Michal (bouncing) > > On Fri, Apr 17, 2020 at 2:05 AM Mika Westerberg > wrote: > > I wonder if we can add back the previous GPIO base like this? > > Thanks for the patch! At first glance, it looks like the right kind of > thing.

Re: [PATCH] powerpc/32s: Fix is_module_segment() when MODULES_VADDR is defined

2020-08-18 Thread Michael Ellerman
On Wed, 5 Aug 2020 15:27:28 + (UTC), Christophe Leroy wrote: > When MODULES_VADDR is defined, is_module_segment() shall check the > address against it instead of checking agains VMALLOC_START. Applied to powerpc/fixes. [1/1] powerpc/32s: Fix is_module_segment() when MODULES_VADDR is defined

Re: [PATCH] powerpc/kasan: Fix KASAN_SHADOW_START on BOOK3S_32

2020-08-18 Thread Michael Ellerman
On Wed, 5 Aug 2020 15:27:29 + (UTC), Christophe Leroy wrote: > On BOOK3S_32, when we have modules and strict kernel RWX, modules > are not in vmalloc space but in a dedicated segment that is > below PAGE_OFFSET. > > So KASAN_SHADOW_START must take it into account. > > MODULES_VADDR can't be

Re: [PATCH] powerpc/fixmap: Fix the size of the early debug area

2020-08-18 Thread Michael Ellerman
On Mon, 17 Aug 2020 06:03:26 + (UTC), Christophe Leroy wrote: > Commit ("03fd42d458fb powerpc/fixmap: Fix FIX_EARLY_DEBUG_BASE when > page size is 256k") reworked the setup of the early debug area and > mistakenly replaced 128 * 1024 by SZ_128. > > Change to SZ_128K to restore the original

[tip: x86/cpu] x86/cpu: Use XGETBV and XSETBV mnemonics in fpu/internal.h

2020-08-18 Thread tip-bot2 for Uros Bizjak
The following commit has been merged into the x86/cpu branch of tip: Commit-ID: 86109813990b5d6d6cfb8072382ee69d11ea9460 Gitweb: https://git.kernel.org/tip/86109813990b5d6d6cfb8072382ee69d11ea9460 Author:Uros Bizjak AuthorDate:Tue, 07 Jul 2020 19:47:22 +02:00 Committer:

Re: [PATCH v2] staging: wfx: fixed misspelled word in comment

2020-08-18 Thread Greg KH
On Tue, Aug 04, 2020 at 06:17:47PM +0530, Aditya Bansal wrote: > From: Aditya Bansal > > Subject: [PATCH v2] fixed typo in driver/staging/wfx/hif_tx.c file > > Correct the spelling of word function and careful > > Signed-off-by: Aditya Bansal > --- > > diff --git

Re: [PATCH] arm64: dts: qcom: sc7180: Fix the LLCC base register size

2020-08-18 Thread Doug Anderson
Hi, On Tue, Aug 18, 2020 at 12:38 AM Sai Prakash Ranjan wrote: > > There is one LLCC logical bank(LLCC0) on SC7180 SoC and the size of the > LLCC0 base > is 0x5(320KB) not 2MB, so correct the size and fix copy paste > mistake > carried over from SDM845. Sounds fine, thanks! -Doug

Re: [PATCH 2/7] media: coda: no need to check return value of debugfs_create functions

2020-08-18 Thread Philipp Zabel
On Tue, 2020-08-18 at 15:36 +0200, Greg Kroah-Hartman wrote: > When calling debugfs functions, there is no need to ever check the > return value. The function can work or not, but the code logic should > never do something different based on this. > > Cc: Philipp Zabel > Cc: Mauro Carvalho

Re: [RFC-PATCH 1/2] mm: Add __GFP_NO_LOCKS flag

2020-08-18 Thread Paul E. McKenney
On Tue, Aug 18, 2020 at 09:43:44AM +0200, Michal Hocko wrote: > On Mon 17-08-20 15:28:03, Paul E. McKenney wrote: > > On Mon, Aug 17, 2020 at 10:28:49AM +0200, Michal Hocko wrote: > > > On Mon 17-08-20 00:56:55, Uladzislau Rezki wrote: > > > > [ . . . ] > > > > > > wget > > > >

Re: [PATCH v6] fuse: Add support for passthrough read/write

2020-08-18 Thread Alessio Balsini
Thank you both for the important feedback, I tried to consolidate all your suggestions in the new version of the patch, shared below. As you both recommended, that tricky ki_filp swapping has been removed, taking overlayfs as a reference for the management of asynchronous requests. The V7 below

: warning: format '%lx' expects argument of type 'long unsigned int', but argument 4 has type 's64' {aka 'long long int'}

2020-08-18 Thread kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 06a4ec1d9dc652e17ee3ac2ceb6c7cf6c2b75cdd commit: 239a5791ffd5559f51815df442c4dbbe7fc21ade dynamic_debug: allow to work if debugfs is disabled date: 6 months ago config: ia64-randconfig-r005-20200818

Re: [PATCH v2 1/3] bcm-vk: add bcm_vk UAPI

2020-08-18 Thread Greg Kroah-Hartman
On Wed, Aug 05, 2020 at 05:46:29PM -0700, Scott Branden wrote: > Add user space api for bcm-vk driver. > > Signed-off-by: Scott Branden > --- > include/uapi/linux/misc/bcm_vk.h | 99 > 1 file changed, 99 insertions(+) > create mode 100644

drivers/mfd/khadas-mcu.c:125:34: warning: unused variable 'khadas_mcu_of_match'

2020-08-18 Thread kernel test robot
: 9 weeks ago config: x86_64-randconfig-r006-20200818 (attached as .config) compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 790878f291fa5dc58a1c560cb6cc76fd1bfd1c5a) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin

Re: [PATCHv2] PCI: designware-ep: Fix the Header Type check

2020-08-18 Thread Rob Herring
On Tue, Aug 18, 2020 at 3:35 AM Zhiqiang Hou wrote: > > From: Hou Zhiqiang > > The current check will result in the multiple function device > fails to initialize. So fix the check by masking out the > multiple function bit. > > Fixes: 0b24134f7888 ("PCI: dwc: Add validation that PCIe core is

Re: [PATCH 2/2] soundwire: fix port_ready[] dynamic allocation in mipi_disco and ASoC codecs

2020-08-18 Thread Pierre-Louis Bossart
In addition, there's a WIP change to regmap to add support for SoundWire 1.2 MBQ-based register access, but this only affects regmap and ASoC trees, all handled by Mark. I have to take this comment back, the regmap change will depend on the MBQ macro that should go in the SoundWire tree.

Re: [RFC PATCH] mm: silence soft lockups from unlock_page

2020-08-18 Thread Greg KH
On Wed, Aug 05, 2020 at 10:46:12PM -0700, Hugh Dickins wrote: > On Mon, 27 Jul 2020, Greg KH wrote: > > > > Linus just pointed me at this thread. > > > > If you could run: > > echo -n 'module xhci_hcd =p' > /sys/kernel/debug/dynamic_debug/control > > and run the same workload to see if

Re: [RFC PATCH 0/8] memcg: Enable fine-grained per process memory control

2020-08-18 Thread Johannes Weiner
On Tue, Aug 18, 2020 at 12:18:44PM +0200, pet...@infradead.org wrote: > What you need is a feeback loop against the rate of freeing pages, and > when you near the saturation point, the allocation rate should exactly > match the freeing rate. IO throttling solves a slightly different problem. IO

<    3   4   5   6   7   8   9   10   11   12   >