[PATCH] MIPS: ath25: Convert random_ether_addr to eth_random_addr

2018-06-22 Thread Joe Perches
random_ether_addr is a #define for eth_random_addr which is generally preferred in kernel code by ~3:1 Convert the uses of random_ether_addr to enable removing the #define Signed-off-by: Joe Perches --- arch/mips/ath25/board.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --

Re: [PATCH] platform/x86: dell-smbios: make a function and a pointer static

2018-06-22 Thread Julia Lawall
On Fri, 22 Jun 2018, Darren Hart wrote: > On Thu, Jun 21, 2018 at 07:15:24PM +0100, Colin King wrote: > > From: Colin Ian King > > > > The function dell_smbios_smm_call and pointer platform_device are > > local to the source and do not need to be in global scope, so make > > them static. > > >

Re: [RFC][PATCH 0/6] Use printk_safe context for TTY and UART port locks

2018-06-22 Thread Sergey Senozhatsky
On (06/22/18 17:21), Alan Cox wrote: > On Wed, 20 Jun 2018 11:44:13 +0900 > Linus Torvalds wrote: > > > On Wed, Jun 20, 2018 at 11:34 AM Steven Rostedt wrote: > > > > > > Perhaps we should do an audit of the console drivers and remove all > > > printk, pr_* , WARN*, BUG* from them. > > > > On

[PATCH v2 3/3] pinctrl: actions: Add interrupt support for OWL S900 SoC

2018-06-22 Thread Manivannan Sadhasivam
Add interrupt support for Actions Semi OWL S900 SoC. Signed-off-by: Manivannan Sadhasivam --- drivers/pinctrl/actions/Kconfig| 1 + drivers/pinctrl/actions/pinctrl-owl.c | 271 - drivers/pinctrl/actions/pinctrl-owl.h | 22 +- drivers/pinctrl/actions/pinctrl-s

[PATCH v2 2/3] arm64: dts: actions: Add interrupt properties to pinctrl node for S900

2018-06-22 Thread Manivannan Sadhasivam
Add interrupt properties to pinctrl node for Actions Semi S900 SoC. Signed-off-by: Manivannan Sadhasivam --- arch/arm64/boot/dts/actions/s900.dtsi | 8 1 file changed, 8 insertions(+) diff --git a/arch/arm64/boot/dts/actions/s900.dtsi b/arch/arm64/boot/dts/actions/s900.dtsi index aa3a

[PATCH v2 0/3] Add gpio interrupt support for Actions Semi S900 SoC

2018-06-22 Thread Manivannan Sadhasivam
This patchset adds interrupt support for Actions Semi S900 GPIO's. Each port has individual register sets for configuring the below interrupt types: 1. Rising Edge Interrupt 2. Falling Edge Interrupt 3. Software Emulation of both Edges 4. High Level Interrupt 5. Low Level Interrupt Thanks, Mani

[PATCH v2 1/3] dt-bindings: pinctrl: Add gpio interrupt bindings for Actions S900 SoC

2018-06-22 Thread Manivannan Sadhasivam
Add gpio interrupt bindings for Actions Semi S900 SoC. Signed-off-by: Manivannan Sadhasivam Reviewed-by: Rob Herring --- .../bindings/pinctrl/actions,s900-pinctrl.txt | 10 ++ 1 file changed, 10 insertions(+) diff --git a/Documentation/devicetree/bindings/pinctrl/actions,s900-

Re: [RFC PATCH 02/16] x86/split_lock: Handle #AC exception for split lock in kernel mode

2018-06-22 Thread Fenghua Yu
On Fri, Jun 22, 2018 at 12:49:00PM +0200, Thomas Gleixner wrote: > On Sun, 27 May 2018, Fenghua Yu wrote: > > +static void wait_for_reexecution(void) > > +{ > > + while (time_before(jiffies, disable_split_lock_jiffies + > > + reenable_split_lock_delay)) > > + cpu_re

Re: [PATCH 1/2] arm64: dts: uniphier: add headphone detect gpio for LD20 global board

2018-06-22 Thread Masahiro Yamada
2018-06-19 13:11 GMT+09:00 Katsuhiro Suzuki : > This patch adds GPIO for headphone detection on LD20 global board. > > Signed-off-by: Katsuhiro Suzuki > --- > arch/arm64/boot/dts/socionext/uniphier-ld20-global.dts | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/arch/arm64/boot/dts/socion

Re: [PATCH] arm64: dts: uniphier: fix widget name of headphone for LD11/LD20 boards

2018-06-22 Thread Masahiro Yamada
2018-06-19 13:12 GMT+09:00 Katsuhiro Suzuki : > This patch fixes wrong name of headphone widget for receiving events > of insert/remove headphone plug from simple-card or audio-graph-card. > > If we use wrong widget name then we get warning messages such as > "asoc-audio-graph-card sound: ASoC: DAP

[PATCH] kconfig: document Kconfig source file comments

2018-06-22 Thread Randy Dunlap
From: Randy Dunlap I saw this type of Kconfig construct on LKML: config SYMBOOL #bool "prompt string" default y and wondered what it does. Then I wondered if '#' comments are even documented. They aren't, so add a little doc for that. Ah, good. kconfig says: arch/x86/Kconfig

Re: [PATCH] staging: rtl8723bs: do not use assignment in if condition

2018-06-22 Thread Joe Perches
On Fri, 2018-06-22 at 21:11 +0200, Michael Straube wrote: > On 06/22/18 19:28, Joe Perches wrote: > > Although the last memcpy of a fixed mac address could > > probably use eth_random_addr to reduce the likelihood > > of mac address collision so maybe > > eth_random_addr(mac_addr); > Us

Re: [PATCH v4 10/12] misc: throttler: Add core support for non-thermal throttling

2018-06-22 Thread Matthias Kaehlcke
On Thu, Jun 21, 2018 at 07:04:33PM -0700, Brian Norris wrote: > Hi, > > A few more things I noticed; probably my last thoughts on this > particular patch; and I think I reviewed the rest: > > On Wed, Jun 20, 2018 at 06:52:35PM -0700, Matthias Kaehlcke wrote: > > The purpose of the throttler is to

[PATCH 3/5] tracing: Use swap macro in update_max_tr

2018-06-22 Thread Steven Rostedt
From: "Gustavo A. R. Silva" Make use of the swap macro and remove unnecessary variable _buf_. This makes the code easier to read and maintain. Also, reduces the stack usage. This code was detected with the help of Coccinelle. Link: http://lkml.kernel.org/r/20180209175316.GA18720@embeddedgus Si

[PATCH 5/5] tracing: Fix SKIP_STACK_VALIDATION=1 build due to bad merge with -mrecord-mcount

2018-06-22 Thread Steven Rostedt
From: Greg Thelen Non gcc-5 builds with CONFIG_STACK_VALIDATION=y and SKIP_STACK_VALIDATION=1 fail. Example output: /bin/sh: init/.tmp_main.o: Permission denied commit 96f60dfa5819 ("trace: Use -mcount-record for dynamic ftrace"), added a mismatched endif. This causes cmd_objtool to get mista

[PATCH 4/5] tracing: Fix some errors in histogram documentation

2018-06-22 Thread Steven Rostedt
From: "Joel Fernandes (Google)" Fix typos, inconsistencies in using quotes, incorrect section number, etc. in the trace histogram documentation. Link: http://lkml.kernel.org/r/20180614224859.55864-1-j...@joelfernandes.org Reviewed-by: Masami Hiramatsu Acked-by: Tom Zanussi Signed-off-by: Joel

[PATCH 0/5] [GIT PULL] tracing: A few fixes and a clean up

2018-06-22 Thread Steven Rostedt
Linus, This contains a few fixes and a clean up. - A bad merge caused an "endif" to go in the wrong place in scripts/Makefile.build - Softirq tracing fix for tracing that corrupts lockdep and causes a false splat - Histogram documentation typo fixes - Fix a bad memory reference wh

[PATCH 1/5] tracing: Check for no filter when processing event filters

2018-06-22 Thread Steven Rostedt
From: "Steven Rostedt (VMware)" The syzkaller detected a out-of-bounds issue with the events filter code, specifically here: prog[N].pred = NULL;/* #13 */ prog[N].target = 1; /* TRUE */ prog[N+1].pred = NULL; prog[N+

[PATCH 2/5] softirq: Reorder trace_softirqs_on to prevent lockdep splat

2018-06-22 Thread Steven Rostedt
From: "Joel Fernandes (Google)" I'm able to reproduce a lockdep splat with config options: CONFIG_PROVE_LOCKING=y, CONFIG_DEBUG_LOCK_ALLOC=y and CONFIG_PREEMPTIRQ_EVENTS=y $ echo 1 > /d/tracing/events/preemptirq/preempt_enable/enable [ 26.112609] DEBUG_LOCKS_WARN_ON(current->softirqs_enabled)

Re: [PATCH] MAINTAINERS: Add Daniel Lustig as a LKMM reviewer

2018-06-22 Thread Andrea Parri
> > Thanks. Unless anyone has any opposition I'll submit the fixed > > patch as part of my next pull request. > > Works for me, especially if this means that Daniel is RISC-V's official > representative. ;-) I'd rather the "fixed patch" go through the LKMM's tree. If not for other, we tend to

Re: [RFC v2 PATCH 2/2] mm: mmap: zap pages with read mmap_sem for large mapping

2018-06-22 Thread Yang Shi
Yes, this is true but I guess what Yang Shi meant was that an userspace access racing with munmap is not well defined. You never know whether you get your data, #PTF or SEGV because it depends on timing. The user visible change might be that you lose content and get zero page instead if you hit t

Re: [PATCH 7/7] x86,idle: do not leave mm in idle state

2018-06-22 Thread Rik van Riel
On Fri, 2018-06-22 at 15:05 -0700, Andy Lutomirski wrote: > I think the right solution if you want that last little bit of > performance is to get rid of the code in intel_idle and to add it in > the core idle code. We have fancy scheduler code to estimate the > idle > time, and we should use it

Re: [PATCH 1/2] firmware: add more flexible request_firmware_async function

2018-06-22 Thread kbuild test robot
Hi Rafał, I love your patch! Yet something to improve: [auto build test ERROR on linus/master] [also build test ERROR on v4.18-rc1 next-20180622] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits

Re: [PATCH 1/2] mm: revert mem_cgroup_put() introduction

2018-06-22 Thread kbuild test robot
Hi Roman, Thank you for the patch! Yet something to improve: [auto build test ERROR on next-20180622] [cannot apply to linus/master v4.18-rc1 v4.17 v4.17-rc7 v4.18-rc1] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https

[PATCH v8 0/2] regulator: add QCOM RPMh regulator driver

2018-06-22 Thread David Collins
This patch series adds a driver and device tree binding documentation for PMIC regulator control via Resource Power Manager-hardened (RPMh) on some Qualcomm Technologies, Inc. SoCs such as SDM845. RPMh is a hardware block which contains several accelerators which are used to manage various hardwar

[PATCH v8 2/2] regulator: add QCOM RPMh regulator driver

2018-06-22 Thread David Collins
Add the QCOM RPMh regulator driver to manage PMIC regulators which are controlled via RPMh on some Qualcomm Technologies, Inc. SoCs. RPMh is a hardware block which contains several accelerators which are used to manage various hardware resources that are shared between the processors of the SoC.

[PATCH v8 1/2] regulator: dt-bindings: add QCOM RPMh regulator bindings

2018-06-22 Thread David Collins
Introduce bindings for RPMh regulator devices found on some Qualcomm Technlogies, Inc. SoCs. These devices allow a given processor within the SoC to make PMIC regulator requests which are aggregated within the RPMh hardware block along with requests from other processors in the SoC to determine th

Re: [PATCH v5 2/8] reset: qcom: AOSS (always on subsystem) reset controller

2018-06-22 Thread Bjorn Andersson
On Mon 21 May 10:27 PDT 2018, Sibi Sankar wrote: > Add reset controller driver for Qualcomm SDM845 SoC to > control reset signals provided by AOSS for Modem, Venus > ADSP, GPU, Camera, Wireless, Display subsystem > > Signed-off-by: Sibi Sankar With the adaptions discussed in the DT binding patc

Re: [PATCH v5 1/8] dt-bindings: reset: Add AOSS reset bindings for SDM845 SoCs

2018-06-22 Thread Bjorn Andersson
On Mon 21 May 10:27 PDT 2018, Sibi Sankar wrote: > Add SDM845 AOSS (always on subsystem) reset controller binding > I think it would be better if you made the binding represent the entire clock controller, rather than only the reset-related portion of it. As I can't find anything in the downstr

Re: [PATCH V7 00/41] Intel(R) Resource Director Technology Cache Pseudo-Locking enabling

2018-06-22 Thread Reinette Chatre
Hi David, On 6/22/2018 4:45 PM, David Howells wrote: > Do you have a public git branch with these patches on it somewhere? I just added them to branch cache-pseudo-locking/v7 of https://github.com/rchatre/linux.git Reinette

Re: [PATCH] platform/x86: dell-smbios: make a function and a pointer static

2018-06-22 Thread Darren Hart
On Thu, Jun 21, 2018 at 07:15:24PM +0100, Colin King wrote: > From: Colin Ian King > > The function dell_smbios_smm_call and pointer platform_device are > local to the source and do not need to be in global scope, so make > them static. > > Cleans up sparse warnings: > warning: symbol 'platform_

Re: [PATCH] MAINTAINERS: Add Daniel Lustig as a LKMM reviewer

2018-06-22 Thread Paul E. McKenney
On Fri, Jun 22, 2018 at 03:36:02PM -0700, Palmer Dabbelt wrote: > On Fri, 22 Jun 2018 14:48:56 PDT (-0700), Daniel Lustig wrote: > >On 6/22/2018 2:17 PM, Palmer Dabbelt wrote: > >>Dan runs the RISC-V memory model working group. I've been forwarding > >>him LKMM emails that end up in my inbox, but

Re: [PATCH 2/2] mm: introduce mem_cgroup_put() helper

2018-06-22 Thread Shakeel Butt
On Fri, Jun 22, 2018 at 5:06 PM Roman Gushchin wrote: > > Introduce the mem_cgroup_put() helper, which helps to eliminate > guarding memcg css release with "#ifdef CONFIG_MEMCG" in multiple > places. > > Signed-off-by: Roman Gushchin Reviewed-by: Shakeel Butt > Cc: Shakeel Butt > Cc: Johannes

Re: [PATCH 3/3] irqchip: RISC-V Local Interrupt Controller Driver

2018-06-22 Thread Randy Dunlap
On 06/22/2018 04:20 PM, Palmer Dabbelt wrote: > From: Palmer Dabbelt > > This patch adds a driver that manages the local interrupts on each > RISC-V hart, as specifiec by the RISC-V supervisor level ISA manual. > The local interrupt controller manages software interrupts, timer > interrupts, and

[PATCH 1/2] mm: revert mem_cgroup_put() introduction

2018-06-22 Thread Roman Gushchin
This patch should be folded into "mm, oom: cgroup-aware OOM killer". Signed-off-by: Roman Gushchin --- include/linux/memcontrol.h | 9 - 1 file changed, 9 deletions(-) diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index 3607913032be..cf1c3555328f 100644 --- a/incl

[PATCH 2/2] mm: introduce mem_cgroup_put() helper

2018-06-22 Thread Roman Gushchin
Introduce the mem_cgroup_put() helper, which helps to eliminate guarding memcg css release with "#ifdef CONFIG_MEMCG" in multiple places. Signed-off-by: Roman Gushchin Cc: Shakeel Butt Cc: Johannes Weiner Cc: Michal Hocko Cc: Andrew Morton --- include/linux/memcontrol.h | 9 + 1 file

Re: [PATCH] platform/x86: ideapad-laptop: Apply no_hw_rfkill to Y20-15IKBM, too

2018-06-22 Thread Darren Hart
On Fri, Jun 22, 2018 at 10:59:17AM +0200, Takashi Iwai wrote: > The commit 5d9f40b56630 ("platform/x86: ideapad-laptop: Add > Y520-15IKBN to no_hw_rfkill") added the entry for Y20-15IKBN, and it > turned out that another variant, Y20-15IKBM, also requires the > no_hw_rfkill. > > Trim the last lett

Re: [PATCH] platform/x86: dell-smbios-base: Support systems without tokens

2018-06-22 Thread Darren Hart
On Fri, Jun 15, 2018 at 12:12:51PM -0500, Mario Limonciello wrote: > Some Dell servers can use dell-smbios but they don't support the > token interface. Make it optional. > > Signed-off-by: Mario Limonciello Thanks Mario, queued. -- Darren Hart VMware Open Source Technology Center

Re: [PATCH V7 00/41] Intel(R) Resource Director Technology Cache Pseudo-Locking enabling

2018-06-22 Thread David Howells
Do you have a public git branch with these patches on it somewhere? Thanks, David

Re: [PATCH 3/3] fs, mm: account buffer_head to kmemcg

2018-06-22 Thread Shakeel Butt
On Tue, Jun 19, 2018 at 12:55 PM Roman Gushchin wrote: > > On Tue, Jun 19, 2018 at 12:51:15PM -0700, Shakeel Butt wrote: > > On Tue, Jun 19, 2018 at 10:41 AM Roman Gushchin wrote: > > > > > > On Tue, Jun 19, 2018 at 12:27:41PM -0400, Johannes Weiner wrote: > > > > On Mon, Jun 18, 2018 at 10:13:27

Re: [PATCH] platform/x86: wmi: Do not mix pages and kmalloc

2018-06-22 Thread Darren Hart
On Thu, Jun 21, 2018 at 01:24:34AM +, mario.limoncie...@dell.com wrote: > > -Original Message- > > From: Darren Hart [mailto:dvh...@infradead.org] > > Sent: Wednesday, June 20, 2018 7:17 PM > > To: Kees Cook > > Cc: LKML; Andy Shevchenko; Platform Driver; Mihai Donțu; Limonciello, Mario

Re: [PATCH] arch/x86/entry/vsyscall/vsyscall_gtod.c: remove __read_mostly from vclocks_used

2018-06-22 Thread Andy Lutomirski
On Fri, Jun 22, 2018 at 3:47 PM Thomas Gleixner wrote: > > Michael, > > On Mon, 4 Jun 2018, Michael Rodin wrote: > > > The variable "vclocks_used" doesn't appear to be "read mostly". > > Measurements of the access frequency with perf stat [1] and > > perf report show, that approximately half of th

[PATCH 1/3] RISC-V: Don't include irq-riscv-intc.h

2018-06-22 Thread Palmer Dabbelt
This file has never existed in the upstream kernel, but it's guarded by an #ifdef that's also never existed in the upstream kernel. As a part of our interrupt controller refactoring this header is no longer necessary, but this reference managed to sneak in anyway. Signed-off-by: Palmer Dabbelt -

Driver for the RISC-V Interrupt Controller

2018-06-22 Thread Palmer Dabbelt
The RISC-V ISA mandantes the presence of a simple, per-hart (hardware thread) interrupt controller availiable to supervisor mode. This patch set adds a driver for this interrupt controller. The patch set itself has been around in various flavors for a while, but as far as I remember it's never be

[PATCH 2/3] dt-bindings: interrupt-controller: RISC-V local interrupt controller docs

2018-06-22 Thread Palmer Dabbelt
From: Palmer Dabbelt This patch adds documentation on the RISC-V local interrupt controller, which is a per-hart interrupt controller that manages all interrupts entering a RISC-V hart. This interrupt controller is present on all RISC-V systems. Signed-off-by: Palmer Dabbelt --- .../interrupt

[PATCH 3/3] irqchip: RISC-V Local Interrupt Controller Driver

2018-06-22 Thread Palmer Dabbelt
From: Palmer Dabbelt This patch adds a driver that manages the local interrupts on each RISC-V hart, as specifiec by the RISC-V supervisor level ISA manual. The local interrupt controller manages software interrupts, timer interrupts, and hardware interrupts (which are routed via the platform lev

Re: [RFC PATCH 02/16] x86/split_lock: Handle #AC exception for split lock in kernel mode

2018-06-22 Thread Fenghua Yu
On Fri, Jun 22, 2018 at 01:59:44PM +0200, Thomas Gleixner wrote: > On Fri, 22 Jun 2018, Thomas Gleixner wrote: > > The whole thing is simply: > > > > handle_ac() > > { > > if (user_mode(regs)) { > > do_trap(AC, SIGBUS, ...); > > } else { > > disable_ac_on_local_cpu

Re: [PATCH v1 1/4] mhi_bus: core: Add support for MHI host interface

2018-06-22 Thread Randy Dunlap
Hi, On 04/26/2018 07:23 PM, Sujeev Dias wrote: > diff --git a/drivers/bus/Kconfig b/drivers/bus/Kconfig > index d1c0b60..e15d56d 100644 > --- a/drivers/bus/Kconfig > +++ b/drivers/bus/Kconfig > @@ -171,6 +171,23 @@ config DA8XX_MSTPRI > configuration. Allows to adjust the priorities of all

Re: [RFC PATCH 02/16] x86/split_lock: Handle #AC exception for split lock in kernel mode

2018-06-22 Thread Thomas Gleixner
On Sat, 23 Jun 2018, Thomas Gleixner wrote: > On Fri, 22 Jun 2018, Fenghua Yu wrote: > > On Fri, Jun 22, 2018 at 01:59:44PM +0200, Thomas Gleixner wrote: > > > Aside of that the spec says: > > > > > > 31 Disable LOCK# assertion for split locked access. > > > > > > Can you pretty please make sur

Re: [RFC PATCH 02/16] x86/split_lock: Handle #AC exception for split lock in kernel mode

2018-06-22 Thread Thomas Gleixner
On Fri, 22 Jun 2018, Fenghua Yu wrote: > On Fri, Jun 22, 2018 at 01:59:44PM +0200, Thomas Gleixner wrote: > > Aside of that the spec says: > > > > 31 Disable LOCK# assertion for split locked access. > > > > Can you pretty please make sure that this bit enforces #AC enable? If 31 is > > ever set

[PATCH V7 02/41] x86/intel_rdt: Document new mode, size, and bit_usage

2018-06-22 Thread Reinette Chatre
By default resource groups allow sharing of their cache allocations. There is nothing that prevents a resource group from configuring a cache allocation that overlaps with that of an existing resource group. To enable resource groups to specify that their cache allocations cannot be shared a reso

[PATCH V7 19/41] x86/intel_rdt: Add utility to test if tasks assigned to resource group

2018-06-22 Thread Reinette Chatre
In considering changes to a resource group it becomes necessary to know whether tasks have been assigned to the resource group in question. Introduce a new utility that can be used to check if any tasks have been assigned to a particular resource group. Signed-off-by: Reinette Chatre Signed-off-

[PATCH V7 03/41] x86/intel_rdt: Introduce RDT resource group mode

2018-06-22 Thread Reinette Chatre
At this time there are no constraints on how bitmasks represented by schemata can be associated with closids represented by resource groups. A bitmask of one class of service can without any objections overlap with the bitmask of another class of service. The concept of "mode" is introduced in pr

[PATCH V7 17/41] x86/intel_rdt: Introduce the Cache Pseudo-Locking modes

2018-06-22 Thread Reinette Chatre
The two modes used to manage Cache Pseudo-Locked regions are introduced. A resource group is assigned "pseudo-locksetup" mode when the user indicates that this resource group will be used for a Cache Pseudo-Locked region. When the Cache Pseudo-Locked region has been set up successfully after the u

[PATCH V7 04/41] x86/intel_rdt: Associate mode with each RDT resource group

2018-06-22 Thread Reinette Chatre
Each RDT resource group is associated with a mode that will reflect the level of sharing of its allocations. The default, shareable, will be associated with each resource group on creation since it is zero and resource groups are created with kzalloc. The managing of the mode of a resource group wi

[PATCH V7 15/41] x86/intel_rdt: Display resource groups' allocations' size in bytes

2018-06-22 Thread Reinette Chatre
The schemata file displays the allocations associated with each domain of each resource. The syntax of this file reflects the capacity bitmask (CBM) of the actual allocation. In order to determine the actual size of an allocation the user needs to dig through three different files to query the vari

[PATCH V7 05/41] x86/intel_rdt: Introduce resource group's mode resctrl file

2018-06-22 Thread Reinette Chatre
A new resctrl file "mode" associated with each resource group is introduced. This file will display the resource group's current mode and an administrator can also use it to modify the resource group's mode. Only shareable mode is currently supported. Signed-off-by: Reinette Chatre Signed-off-by

[PATCH V7 06/41] x86/intel_rdt: Introduce test to determine if closid is in use

2018-06-22 Thread Reinette Chatre
During CAT feature discovery the capacity bitmasks (CBMs) associated with all the classes of service are initialized to all ones, even if the class of service is not in use. Introduce a test that can be used to determine if a class of service is in use. This test enables code interested in parsing

[PATCH V7 30/41] x86/intel_rdt: Pseudo-lock region creation/removal core

2018-06-22 Thread Reinette Chatre
The user requests a pseudo-locked region by providing a schemata to a resource group that is in the pseudo-locksetup mode. This is the functionality that consumes the parsed user data and creates the pseudo-locked region. First, required information is deduced from user provided data. This include

[PATCH V7 00/41] Intel(R) Resource Director Technology Cache Pseudo-Locking enabling

2018-06-22 Thread Reinette Chatre
Dear Maintainers, The Cache Pseudo-Locking enabling series that was recently merged to the x86/cache branch of tip was found to conflict with the new kernfs support for mounting with fs_context. In preparation for a conflict-free merge between the two repos some no-op hooks are created within the

[PATCH V7 13/41] x86/intel_rdt: Ensure requested schemata respects mode

2018-06-22 Thread Reinette Chatre
When the administrator requests a change in a resource group's schemata we have to ensure that the new schemata respects the current resource group as well as the other active resource groups' schemata. The new schemata is not allowed to overlap with the schemata of any exclusive resource groups.

[PATCH V7 41/41] x86/intel_rdt: Simplify index type

2018-06-22 Thread Reinette Chatre
From: Ingo Molnar Simplify this pattern: #ifdef CONFIG_X86_64 u64 i; #else u32 i; #endif ... to the more natural and shorter one: unsigned long i; No change in functionality. Acked-by Thomas Gleixner Cc: Reinette Chatre Cc: Linus Torvalds Cc: Peter Zijlstra Cc:

[PATCH V7 40/41] x86/intel_rdt: Fix passing of value to 32-bit register

2018-06-22 Thread Reinette Chatre
0-day kbuild test robot reported the following issue: arch/x86/kernel/cpu/intel_rdt_pseudo_lock.c: In function 'pseudo_lock_fn': >> arch/x86/kernel/cpu/intel_rdt_pseudo_lock.c:363:1: warning: unsupported size >> for integer register } ^ >> arch/x86/kernel/cpu/intel_rdt_pseudo_lock.c:36

[PATCH V7 10/41] x86/intel_rdt: Enable setting of exclusive mode

2018-06-22 Thread Reinette Chatre
The new "mode" file now accepts "exclusive" that means that the allocations of this resource group cannot be shared. Enable users to modify a resource group's mode to "exclusive". To succeed it is required that there is no overlap between resource group's current schemata and that of all the other

[PATCH V7 14/41] x86/intel_rdt: Introduce "bit_usage" to display cache allocations details

2018-06-22 Thread Reinette Chatre
With cache regions now explicitly marked as "shareable" or "exclusive" we would like to communicate to the user how portions of the cache are used. Introduce "bit_usage" that indicates for each resource how portions of the cache are configured to be used. To assist the user to distinguish whether

[PATCH V7 23/41] x86/intel_rdt: Add check to determine if monitoring in progress

2018-06-22 Thread Reinette Chatre
When a resource group is pseudo-locked it is orphaned without a class of service associated with it. We thus do not want any monitoring in progress on a resource group that will be used for pseudo-locking. Introduce a test that can be used to determine if pseudo-locking in progress on a resource g

[PATCH V7 09/41] x86/intel_rdt: Introduce new "exclusive" mode

2018-06-22 Thread Reinette Chatre
At the moment all allocations are shareable. There is no way for a user to designate that an allocation associated with a resource group cannot be shared by another. Introduce the new mode "exclusive". When a resource group is marked as such it implies that no overlap is allowed between its alloca

[PATCH V7 22/41] x86/intel_rdt: Utilities to restrict/restore access to specific files

2018-06-22 Thread Reinette Chatre
In support of Cache Pseudo-Locking we need to restrict access to specific resctrl files to protect the state of a resource group used for pseudo-locking from being changed in unsupported ways. Introduce two utilities that can be used to either restrict or restore the access to all files irrelevant

[PATCH V7 16/41] x86/intel_rdt: Documentation for Cache Pseudo-Locking

2018-06-22 Thread Reinette Chatre
Add description of Cache Pseudo-Locking feature, its interface, as well as an example of its usage. Signed-off-by: Reinette Chatre Signed-off-by: Thomas Gleixner Cc: fenghua...@intel.com Cc: tony.l...@intel.com Cc: vikas.shiva...@linux.intel.com Cc: gavin.hind...@intel.com Cc: jithu.jos...@intel

Re: [PATCH] arch/x86/entry/vsyscall/vsyscall_gtod.c: remove __read_mostly from vclocks_used

2018-06-22 Thread Thomas Gleixner
Michael, On Mon, 4 Jun 2018, Michael Rodin wrote: > The variable "vclocks_used" doesn't appear to be "read mostly". > Measurements of the access frequency with perf stat [1] and > perf report show, that approximately half of the accesses to > this variable are write accesses and happen in update_

[PATCH V7 12/41] x86/intel_rdt: Support flexible data to parsing callbacks

2018-06-22 Thread Reinette Chatre
Each resource is associated with a configurable callback that should be used to parse the information provided for the particular resource from user space. In addition to the resource and domain pointers this callback is provided with just the character buffer being parsed. In support of flexible

[PATCH V7 08/41] x86/intel_rdt: Initialize new resource group with sane defaults

2018-06-22 Thread Reinette Chatre
Currently when a new resource group is created its allocations would be those that belonged to the resource group to which its closid belonged previously. That is, we can encounter a case like: mkdir newgroup cat newgroup/schemata L2:0=ff;1=ff echo 'L2:0=0xf0;1=0xf0' > newgroup/schemata cat newgro

[PATCH V7 20/41] x86/intel_rdt: Add utility to restrict/restore access to resctrl files

2018-06-22 Thread Reinette Chatre
When a resource group is used for Cache Pseudo-Locking then the region of cache ends up being orphaned with no class of service referring to it. The resctrl files intended to manage how the classes of services are utilized thus become irrelevant. The fact that a resctrl file is not relevant can be

[PATCH V7 26/41] x86/intel_rdt: Enable entering of pseudo-locksetup mode

2018-06-22 Thread Reinette Chatre
The user can request entering pseudo-locksetup mode by writing "pseudo-locksetup" to the mode file. Act on this request as well as support switching from a pseudo-locksetup mode (before pseudo-locked mode was entered). It is not supported to modify the mode once pseudo-locked mode has been entered.

[PATCH V7 24/41] x86/intel_rdt: Introduce pseudo-locked region

2018-06-22 Thread Reinette Chatre
A pseudo-locked region is introduced representing an instance of a pseudo-locked cache region. Each cache instance (domain) can support one pseudo-locked region. Similarly a resource group can be used for one pseudo-locked region. Include a pointer to a pseudo-locked region from the domain and res

[PATCH V7 25/41] x86/intel_rdt: Support enter/exit of locksetup mode

2018-06-22 Thread Reinette Chatre
The locksetup mode is the way in which the user communicates that the resource group will be used for a pseudo-locked region. Locksetup mode should thus ensure that all restrictions on a resource group are met before locksetup mode can be entered. The resource group should also be configured to ens

[PATCH V7 27/41] x86/intel_rdt: Split resource group removal in two

2018-06-22 Thread Reinette Chatre
Resource groups used for pseudo-locking do not require the same work on removal as the other resource groups. The resource group removal is split in two in preparation for support of pseudo-locking resource groups. A single re-ordering occurs - the setting of the rdtgrp flag is moved to later. Thi

[PATCH V7 18/41] x86/intel_rdt: Respect read and write access

2018-06-22 Thread Reinette Chatre
By default, if the opener has CAP_DAC_OVERRIDE, a kernfs file can be opened regardless of RW permissions. Writing to a kernfs file will thus succeed even if permissions are . It's required to restrict the actions that can be performed on a resource group from userspace based on the mode of the

[PATCH V7 31/41] x86/intel_rdt: Support creation/removal of pseudo-locked region

2018-06-22 Thread Reinette Chatre
The user triggers the creation of a pseudo-locked region when writing a valid schemata to the schemata file of a resource group in the pseudo-locksetup mode. A valid schemata is one that: (1) does not overlap with any other resource group, (2) does not involve a cache that already contains a pseud

[PATCH V7 32/41] x86/intel_rdt: Resctrl files reflect pseudo-locked information

2018-06-22 Thread Reinette Chatre
Information about resources as well as resource groups are contained in a variety of resctrl files. Now that pseudo-locked regions can be created the files can be updated to present appropriate information to the user. Update the resource group's schemata file to show only the information of the p

[PATCH V7 28/41] x86/intel_rdt: Add utilities to test pseudo-locked region possibility

2018-06-22 Thread Reinette Chatre
A pseudo-locked region does not have a class of service associated with it and thus not tracked in the array of control values maintained as part of the domain. Even so, when the user provides a new bitmask for another resource group it needs to be checked for interference with existing pseudo-lock

[PATCH V7 29/41] x86/intel_rdt: Discover supported platforms via prefetch disable bits

2018-06-22 Thread Reinette Chatre
Knowing the model specific prefetch disable bits is required to support cache pseudo-locking because the hardware prefetchers need to be disabled when the kernel memory is pseudo-locked to cache. We add these bits only for platforms known to support cache pseudo-locking. When the user requests loc

[PATCH V7 34/41] x86/intel_rdt: Create resctrl debug area

2018-06-22 Thread Reinette Chatre
In preparation for support of debugging of RDT sub features the user can now enable a RDT debugfs region. The debug area is always enabled when CONFIG_DEBUG_FS is set as advised in http://lkml.kernel.org/r/20180523080501.ga6...@kroah.com Also from same discussion in above linked email, no error c

[PATCH V7 35/41] x86/intel_rdt: Create debugfs files for pseudo-locking testing

2018-06-22 Thread Reinette Chatre
There is no simple yes/no test to determine if pseudo-locking was successful. In order to test pseudo-locking we expose a debugfs file for each pseudo-locked region that will record the latency of reading the pseudo-locked memory at a stride of 32 bytes (hardcoded). These numbers will give us an id

[PATCH V7 38/41] x86/intel_rdt: Support L3 cache performance event of Broadwell

2018-06-22 Thread Reinette Chatre
Broadwell microarchitecture supports pseudo-locking. Add support for the L3 cache related performance events of these systems so that the success of pseudo-locking can be measured more accurately on these platforms. Signed-off-by: Reinette Chatre Signed-off-by: Thomas Gleixner Cc: fenghua...@int

[PATCH V7 37/41] x86/intel_rdt: More precise L2 hit/miss measurements

2018-06-22 Thread Reinette Chatre
Intel Goldmont processors supports non-architectural precise events that can be used to give us more insight into the success of L2 cache pseudo-locking on these platforms. Introduce a new measurement trigger that will enable two precise events, MEM_LOAD_UOPS_RETIRED.L2_HIT and MEM_LOAD_UOPS_RETIR

[PATCH V7 11/41] x86/intel_rdt: Making CBM name and type more explicit

2018-06-22 Thread Reinette Chatre
cbm_validate() receives a pointer to the variable that will be initialized with a validated capacity bitmask. The pointer points to a variable of type unsigned long that is immediately assigned to a variable of type u32 by the caller on return from cbm_validate(). Let cbm_validate() initialize a v

[PATCH V7 36/41] x86/intel_rdt: Create character device exposing pseudo-locked region

2018-06-22 Thread Reinette Chatre
After a pseudo-locked region is created it needs to be made available to user space for usage. A character device supporting mmap() is created for each pseudo-locked region. A user space application can now use mmap() system call to map pseudo-locked region into its virtual address space. Signed-

[PATCH V7 33/41] x86/intel_rdt: Ensure RDT cleanup on exit

2018-06-22 Thread Reinette Chatre
The RDT system's initialization does not have the corresponding exit handling to ensure everything initialized on load is cleaned up also. Introduce the cleanup routines that complement all initialization. This includes the removal of a duplicate rdtgroup_init() declaration. Signed-off-by: Reinet

[PATCH V7 39/41] x86/intel_rdt: Limit C-states dynamically when pseudo-locking active

2018-06-22 Thread Reinette Chatre
Deeper C-states impact cache content through shrinking of the cache or flushing entire cache to memory before reducing power to the cache. Deeper C-states will thus negatively impact the pseudo-locked regions. To avoid impacting pseudo-locked regions C-states are limited on pseudo-locked region cr

[PATCH V7 21/41] x86/intel_rdt: Protect against resource group changes during locking

2018-06-22 Thread Reinette Chatre
We intend to modify file permissions to make the "tasks", "cpus", and "cpus_list" not accessible to the user when cache pseudo-locking in progress. Even so, it is still possible for the user to force the file permissions (using chmod) to make them writeable. Similarly, directory permissions will be

[PATCH V7 01/41] x86/intel_rdt: Provide pseudo-locking hooks within rdt_mount

2018-06-22 Thread Reinette Chatre
Stephen Rothwell reported that the Cache Pseudo-Locking enabling and the kernfs support for mounting with fs_context are conflicting. In preparation for a conflict-free merge between the two repos some no-op hooks are created within the RDT mount function being changed by the two features. The goa

[PATCH V7 07/41] x86/intel_rdt: Make useful functions available internally

2018-06-22 Thread Reinette Chatre
In support of the work done to enable resource groups to have different modes some static functions need to be available for sharing amongst all RDT components. Signed-off-by: Reinette Chatre Signed-off-by: Thomas Gleixner Cc: fenghua...@intel.com Cc: tony.l...@intel.com Cc: vikas.shiva...@linux

Re: [RFC PATCH 02/16] x86/split_lock: Handle #AC exception for split lock in kernel mode

2018-06-22 Thread Fenghua Yu
On Fri, Jun 22, 2018 at 01:59:44PM +0200, Thomas Gleixner wrote: > On Fri, 22 Jun 2018, Thomas Gleixner wrote: > > The whole thing is simply: > > > > handle_ac() > > { > > if (user_mode(regs)) { > > do_trap(AC, SIGBUS, ...); > > } else { > > disable_ac_on_local_cpu

Re: [PATCH v3 1/2] HID: i2c-hid: Use devm to allocate i2c_hid struct

2018-06-22 Thread Dmitry Torokhov
On Fri, Jun 22, 2018 at 2:13 AM Hans de Goede wrote: > > Hi, > > On 22-06-18 09:16, Benjamin Tissoires wrote: > > On Fri, Jun 22, 2018 at 4:27 AM, Stephen Boyd wrote: > >> Use devm here to save some lines and prepare for bulk regulator usage in > >> this driver. Otherwise, when we devm bulk get r

Re: [PATCH] MAINTAINERS: Add Daniel Lustig as a LKMM reviewer

2018-06-22 Thread Palmer Dabbelt
On Fri, 22 Jun 2018 14:48:56 PDT (-0700), Daniel Lustig wrote: On 6/22/2018 2:17 PM, Palmer Dabbelt wrote: Dan runs the RISC-V memory model working group. I've been forwarding him LKMM emails that end up in my inbox, but I'm far from an expert in this stuff. He requested to be added as a revie

Re: m68k boot failure in -next bisected to 'xarray: Replace exceptional entries'

2018-06-22 Thread Guenter Roeck
On Fri, Jun 22, 2018 at 02:05:19PM -0700, Matthew Wilcox wrote: > On Fri, Jun 22, 2018 at 11:42:46AM -0700, Guenter Roeck wrote: > > Hi, > > > > a few days ago, m68k boot tests in linux-next started to crash. > > I bisected the problem to commit 'xarray: Replace exceptional entries'. > > Bisect an

[PATCH 2/2] x86/microcode/AMD: Check patch size for all known CPU families

2018-06-22 Thread Maciej S. Szmigiero
Previously, the AMD microcode update driver has only checked the indicated microcode patch size for patches for the currently running CPU family. Patches for other families had their size trusted without further verification. Introduce such check for all CPU families known to the driver so if we s

[PATCH 1/2] x86/microcode/AMD: Integrate verify_patch_size() into verify_patch()

2018-06-22 Thread Maciej S. Szmigiero
Integrating verify_patch_size() into verify_patch() will allows us to introduce in the next commit a check whether the indicated patch size makes sense for its indicated CPU family - for all CPU families known to the driver. Signed-off-by: Maciej S. Szmigiero --- This is part 1/2 of a replacement

Re: [PATCH v4 1/4] seccomp: add a return code to trap to userspace

2018-06-22 Thread Jann Horn
On Fri, Jun 22, 2018 at 11:51 PM Kees Cook wrote: > > On Fri, Jun 22, 2018 at 11:09 AM, Andy Lutomirski wrote: > > One possible extra issue: IIRC /proc/.../mem uses FOLL_FORCE, which is not > > what we want here. Uuugh, I forgot about that. > > How about just adding an explicit “read/write the

  1   2   3   4   5   6   7   >