Re: [PATCH] mm: cleancache: fix corruption on missed inode invalidation

2018-11-15 Thread Vasily Averin
On 11/16/18 1:31 AM, Andrew Morton wrote: > On Mon, 12 Nov 2018 12:57:34 +0300 Pavel Tikhomirov > wrote: > >> If all pages are deleted from the mapping by memory reclaim and also >> moved to the cleancache: >> >> __delete_from_page_cache >> (no shadow case) >> unaccount_page_cache_page >>

Re: [PATCH v2 1/2] pci: prevent sk hynix nvme from entering D3

2018-11-15 Thread Christoph Hellwig
On Thu, Nov 15, 2018 at 11:30:15AM -0600, Bjorn Helgaas wrote: > > But I guess you have to do this anyway just to add the vendor/device > ID to the driver, so maybe this isn't a big deal to you. If you can > do a quirk like this in the driver, it would be invisible to me and I > wouldn't care. I

Re: [PATCH 1/1] Input: synaptics - enable SMBus for HP 15-ay000 (SYN3221).

2018-11-15 Thread Benjamin Tissoires
On Fri, Nov 16, 2018 at 6:00 AM Teika Kazura wrote: > > SMBus works fine for the touchpad with id SYN3221, used in the HP 15-ay000 > series, Nice. Thanks for the patch. Reviewed-by: Benjamin Tissoires Cheers, Benjamin > > This device has been reported in these messages in the "linux-input"

Re: [PATCH v2 1/2] Makefile: Fix distcc compilation with x86 macros

2018-11-15 Thread Masahiro Yamada
On Thu, Nov 15, 2018 at 1:01 PM Nadav Amit wrote: > > Introducing the use of asm macros in c-code broke distcc, since it only > sends the preprocessed source file. The solution is to break the > compilation into two separate phases of compilation and assembly, and > between the two concatenate the

[PATCH 2/2] ASoC: sdm845: Add support for Secondary MI2S interface

2018-11-15 Thread Rohit kumar
Add support to configure bit clock for secondary MI2S TX interface. Signed-off-by: Rohit kumar --- sound/soc/qcom/sdm845.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/sound/soc/qcom/sdm845.c b/sound/soc/qcom/sdm845.c index 84e6ee7..58593db 100644 --- a/sound/soc/qcom/

[PATCH 0/2] ASoC: SDM845: Update MI2S and TDM configuration

2018-11-15 Thread Rohit kumar
Update bit clock rate, slot width for TDM and MI2S interfaces. Also add support for secondary MI2S TX interface in SDM845 machine driver. Rohit kumar (2): ASoC: sdm845: Update slot_width for Quaternary TDM port ASoC: sdm845: Add support for Secondary MI2S interface sound/soc/qcom/sdm845.c |

[PATCH 1/2] ASoC: sdm845: Update slot_width for Quaternary TDM port

2018-11-15 Thread Rohit kumar
Change slot_width for quaternary TDM port to 16 and update bclk rate for TDM and MI2S interfaces accordingly. Signed-off-by: Rohit kumar --- sound/soc/qcom/sdm845.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sound/soc/qcom/sdm845.c b/sound/soc/qcom/sdm845.c inde

Re: [PATCH v2 2/2] x86: set a dependency on macros.S

2018-11-15 Thread Masahiro Yamada
On Thu, Nov 15, 2018 at 1:01 PM Nadav Amit wrote: > > Changes in macros.S should trigger the recompilation of all C files, as > the macros might need to affect their compilation. > > Acked-by: Ingo Molnar > Signed-off-by: Nadav Amit > --- When we talked about this last time, we agreed to not do

Re: [RFC PATCH 5/5] mm, memory_hotplug: be more verbose for memory offline failures

2018-11-15 Thread Michal Hocko
On Thu 15-11-18 16:07:16, Andrew Morton wrote: > On Wed, 7 Nov 2018 11:18:30 +0100 Michal Hocko wrote: > > > From: Michal Hocko > > > > There is only very limited information printed when the memory offlining > > fails: > > [ 1984.506184] rac1 kernel: memory offlining [mem > > 0x826-0

[PATCH 5/6] zram: add bd_stat statistics

2018-11-15 Thread Minchan Kim
bd_stat reprenents things happened in backing device. Currently, it supports bd_counts, bd_reads and bd_writes which are helpful to understand wearout of flash and memory saving. Signed-off-by: Minchan Kim --- Documentation/ABI/testing/sysfs-block-zram | 8 ++ Documentation/blockdev/zram.tx

[PATCH 6/6] zram: writeback throttle

2018-11-15 Thread Minchan Kim
On small memory system, there are lots of write IO so if we use flash device as swap, there would be serious flash wearout. To overcome the problem, system developers need to design write limitation strategy to guarantee flash health for entire product life. This patch creates a new konb "writebac

[PATCH 4/6] zram: support idle page writeback

2018-11-15 Thread Minchan Kim
This patch supports new feature "zram idle page writeback". On zram-swap usecase, zram has usually idle swap pages come from many processes. It's pointless to keep in memory(ie, zram). To solve the problem, this feature gives idle page writeback to backing device so the goal is to save more memory

[PATCH 1/6] zram: fix lockdep warning of free block handling

2018-11-15 Thread Minchan Kim
[ 254.519728] [ 254.520311] WARNING: inconsistent lock state [ 254.520898] 4.19.0+ #390 Not tainted [ 254.521387] [ 254.521732] inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage. [ 254.521732] zram_verify/2095 [HC0[0]:SC1[1]:

[PATCH 3/6] zram: introduce ZRAM_IDLE flag

2018-11-15 Thread Minchan Kim
To support idle page writeback with upcoming patches, this patch introduces a new ZRAM_IDLE flag. Userspace can mark zram slots as "idle" via "echo 1 > /sys/block/zramX/idle" which marks every allocated zram slot as ZRAM_IDLE. User could see it by /sys/kernel/debug/zram/zram0/block_state.

[PATCH 2/6] zram: refactoring flags and writeback stuff

2018-11-15 Thread Minchan Kim
This patch does renaming some variables and restructuring some codes for better redability in writeback and zs_free_page. Signed-off-by: Minchan Kim --- drivers/block/zram/zram_drv.c | 105 +- drivers/block/zram/zram_drv.h | 8 +-- 2 files changed, 44 insertions

[PATCH 0/6] zram idle page writeback

2018-11-15 Thread Minchan Kim
Inherently, swap device has many idle pages which are rare touched since it was allocated. It is never problem if we use storage device as swap. However, it's just waste for zram-swap. This patchset supports zram idle page writeback feature. * Admin can define what is idle page "no access since X

Re: [alsa-devel] [PATCH v3 1/5] ALSA: soc-compress: add support to snd_compr_set_runtime_buffer()

2018-11-15 Thread Daniel Baluta
Hi Srinivas, One minor comment: > struct snd_compr_ops *ops; > + struct snd_dma_buffer *dma_buffer_p; I don't think it is necessary to encode the type inside the name variable So, dma_buffer would sounds better to me then dma_buffer_p; > void *buffer; It is also consist

Re: [PATCH 4/8] kbuild: simplify dependency generation for CONFIG_TRIM_UNUSED_KSYMS

2018-11-15 Thread Masahiro Yamada
On Fri, Nov 16, 2018 at 2:13 PM Nicolas Pitre wrote: > > On Thu, 15 Nov 2018, Masahiro Yamada wrote: > > > My main motivation of this commit is to clean up scripts/Kbuild.include > > and scripts/Makefile.build. > > > > Currently, CONFIG_TRIM_UNUSED_KSYMS works with a tricky gimmick; > > possibly e

Re: [PATCH V3 1/3] mmc: sdhci: Allow platform controlled voltage switching

2018-11-15 Thread Adrian Hunter
On 16/11/18 1:17 AM, Evan Green wrote: > On Wed, Nov 14, 2018 at 6:36 AM Veerabhadrarao Badiganti > wrote: >> > diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h > index b001cf4..3c28152 100644 > --- a/drivers/mmc/host/sdhci.h > +++ b/drivers/mmc/host/sdhci.h > @

Re: [PATCH tip/core/rcu 6/7] mm: Replace spin_is_locked() with lockdep

2018-11-15 Thread Paul E. McKenney
On Thu, Nov 15, 2018 at 10:49:17AM -0800, Davidlohr Bueso wrote: > On Sun, 11 Nov 2018, Paul E. McKenney wrote: > > >From: Lance Roy > > > >lockdep_assert_held() is better suited to checking locking requirements, > >since it only checks if the current thread holds the lock regardless of > >whethe

RE: [PATCH v3 1/2] mtd: spi-nor: add macros related to MICRON flash

2018-11-15 Thread Yogesh Narayan Gaur
Hi Boris, Please apply this patch series [1] in the coming release. -- Regards Yogesh Gaur [1] https://patchwork.ozlabs.org/project/linux-mtd/list/?series=70384 > -Original Message- > From: Yogesh Narayan Gaur > Sent: Tuesday, October 23, 2018 3:31 PM > To: 'Boris Brezillon' > Cc: Mark

Re: [resend PATCH 1/3] pwm: mediatek: drop flag 'has_clks'

2018-11-15 Thread Uwe Kleine-König
On Wed, Nov 14, 2018 at 01:47:52PM +0100, Thierry Reding wrote: > On Tue, Nov 13, 2018 at 10:08:22AM +0800, Ryder Lee wrote: > > The flag 'has_clks' and related checks are superfluous as the CCF > > subsystem does this for you. > > Both of these mechanisms aren't equivalent. While CCF can deal wit

Re: [PATCH v2 4/4] ARM: dts: meson: consistently disable pin bias

2018-11-15 Thread Martin Blumenstingl
On Fri, Nov 9, 2018 at 3:05 PM Jerome Brunet wrote: > > On Amlogic chipsets, the bias set through pinconf applies to the pad > itself, not only the GPIO function. This means that even when we change > the function of the pad from GPIO to anything else, the bias previously > set still applies. > >

Re: [PATCH 0/3] tools/memory-model: Add SRCU support

2018-11-15 Thread Paul E. McKenney
On Thu, Nov 15, 2018 at 11:19:24AM -0500, Alan Stern wrote: > Paul and other LKMM maintainers: > > The following series of patches adds support for SRCU to the Linux > Kernel Memory Model. That is, it adds the srcu_read_lock(), > srcu_read_unlock(), and synchronize_srcu() primitives to the model.

[PATCH v2 1/2] build_bug.h: remove negative-array fallback for BUILD_BUG_ON()

2018-11-15 Thread Masahiro Yamada
The kernel can only be compiled with an optimization option (-O2, -Os, or the currently proposed -Og). Hence, __OPTIMIZE__ is always defined in the kernel source. The fallback for -O0 case is just hypothetical and pointless. Moreover, commit 0bb95f80a38f ("Makefile: Globally enable VLA warning") e

Re: [PATCH 0/7] ACPI HMAT memory sysfs representation

2018-11-15 Thread Anshuman Khandual
On 11/15/2018 04:19 AM, Keith Busch wrote: > This series provides a new sysfs representation for heterogeneous > system memory. > > The previous series that was specific to HMAT that this series was based > on was last posted here: https://lkml.org/lkml/2017/12/13/968 > > Platforms may provide mu

[PATCH v2 2/2] build_bug.h: remove all dummy BUILD_BUG_ON stubs for sparse

2018-11-15 Thread Masahiro Yamada
The introduction of these dummy BUILD_BUG_ON stubs dates back to commit 903c0c7cdc21 ("sparse: define dummy BUILD_BUG_ON definition for sparse"). At that time, BUILD_BUG_ON() was implemented with the negative array trick, which Sparse complains about even if the condition can be optimized and evalu

[PATCH 1/2] build_bug.h: remove negative-array fallback for BUILD_BUG_ON()

2018-11-15 Thread Masahiro Yamada
The kernel can only be compiled with an optimization option (-O2, -Os, or the currently proposed -Og). Hence, __OPTIMIZE__ is always defined in the kernel source. A fallback for -O0 case is just hypothetical and pointless. Moreover, commit 0bb95f80a38f ("Makefile: Globally enable VLA warning") ena

[PATCH 2/2] build_bug.h: remove all dummy BUILD_BUG_ON stubs for sparse

2018-11-15 Thread Masahiro Yamada
The introduction of these dummy BUILD_BUG_ON stubs dates back to commit 903c0c7cdc21 ("sparse: define dummy BUILD_BUG_ON definition for sparse"). At that time, BUILD_BUG_ON() was implemented with the negative array trick, which Sparse complains about even if the condition can be optimized and evalu

[PATCH] initramfs: clean old path before creating a hardlink

2018-11-15 Thread Li Zhijian
Previously, sys_link() will fail due to the new path is already existed. this case ofen appears when we use a concated initrd, below is an sample: 1) prepare a basic rootfs, it contains a regular files rc.local lizhijian@:~/yocto-tiny-i386-2016-04-22$ cat etc/rc.local #!/bin/sh echo "Running /et

linux-next: Tree for Nov 16

2018-11-15 Thread Stephen Rothwell
Hi all, Changes since 20181115: The xtensa tree gained a conflict against Linus' tree. The block tree gained a conflict against Linus' tree. The tip tree still had its build failure for which I applied a fix patch. Non-merge commits (relative to Linus' tree): 3059 3132 files

RE: [PATCH v5 3/9] spi: Add a driver for the Freescale/NXP QuadSPI controller

2018-11-15 Thread Yogesh Narayan Gaur
Hi Frieder, > -Original Message- > From: Schrempf Frieder [mailto:frieder.schre...@kontron.de] > Sent: Thursday, November 15, 2018 7:32 PM > To: Yogesh Narayan Gaur > Cc: Boris Brezillon ; > linux-...@lists.infradead.org; > linux-...@vger.kernel.org; Marek Vasut ; Mark > Brown ; Han Xu ;

[PATCH] x86/cpu/AMD: Fix CPB bit for more processors

2018-11-15 Thread Jiaxun Yang
CPUID Fn8000_0007_EDX[CPB] is wrongly 0 on Model 17, Stepping 0, but revision guide has not been released for newer Family 17h models. Tesed on AMD "Ryzen 7 2700U with Radeon Vega Mobile Gfx" and "AMD Ryzen 5 2500U with Radeon Vega Mobile Gfx", their CPUID Fn_0001_EAX is 0x00810f10 and should

[PATCH] slab: fix 'dubious: x & !y' warning from Sparse

2018-11-15 Thread Masahiro Yamada
Sparse reports: ./include/linux/slab.h:332:43: warning: dubious: x & !y Signed-off-by: Masahiro Yamada --- include/linux/slab.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/slab.h b/include/linux/slab.h index 918f374..d395c73 100644 --- a/include/linux/slab.

Re: [PATCH] ARM: dts: imx6sll: remove unused property in gpc node

2018-11-15 Thread Shawn Guo
On Tue, Nov 06, 2018 at 09:19:36AM +, Anson Huang wrote: > The "fsl,mf-mix-wakeup-irq" is ONLY used as a temporary > solution in NXP's internal tree for Mega/Fast Mix off > feature after suspend, upstream kernel does NOT need it, > remove it. > > Signed-off-by: Anson Huang Applied both, than

Re: [PATCH] arm64: dts: rockchip: rk3399: Add xin32k clk

2018-11-15 Thread dbasehore .
On Thu, Nov 15, 2018 at 9:03 PM Doug Anderson wrote: > > Hi, > > On Thu, Nov 15, 2018 at 4:42 PM Derek Basehore wrote: > > > > This adds the xin32k clock to the RK3399 CPU. Even though it's not > > directly used, muxes will end up traversing the entire clk tree on > > calls to determine_rate if i

[PATCH] arm64: dts: rockchip: rk3399: Add xin32k clk

2018-11-15 Thread Derek Basehore
This adds the xin32k clock to the RK3399 CPU. Even though it's not directly used, muxes will end up traversing the entire clk tree on calls to determine_rate if it doesn't exist. Signed-off-by: Derek Basehore --- arch/arm64/boot/dts/rockchip/rk3399.dtsi | 7 +++ 1 file changed, 7 insertions(

Re: [PATCH 4/8] kbuild: simplify dependency generation for CONFIG_TRIM_UNUSED_KSYMS

2018-11-15 Thread Nicolas Pitre
On Thu, 15 Nov 2018, Masahiro Yamada wrote: > My main motivation of this commit is to clean up scripts/Kbuild.include > and scripts/Makefile.build. > > Currently, CONFIG_TRIM_UNUSED_KSYMS works with a tricky gimmick; > possibly exported symbols are detected by letting $(CPP) replace > EXPORT_SYMB

Re: [PATCH] arm64: dts: rockchip: rk3399: Add xin32k clk

2018-11-15 Thread Doug Anderson
Hi, On Thu, Nov 15, 2018 at 4:42 PM Derek Basehore wrote: > > This adds the xin32k clock to the RK3399 CPU. Even though it's not > directly used, muxes will end up traversing the entire clk tree on > calls to determine_rate if it doesn't exist. > > Signed-off-by: Derek Basehore > --- > arch/arm

[PATCH 1/1] Input: synaptics - enable SMBus for HP 15-ay000 (SYN3221).

2018-11-15 Thread Teika Kazura
SMBus works fine for the touchpad with id SYN3221, used in the HP 15-ay000 series, This device has been reported in these messages in the "linux-input" mailing list: * https://marc.info/?l=linux-input&m=152016683003369&w=2 * https://www.spinics.net/lists/linux-input/msg52525.html Reported-by: N

Re: possible deadlock in acct_pin_kill

2018-11-15 Thread syzbot
syzbot has found a reproducer for the following crash on: HEAD commit:da5322e65940 Merge tag 'selinux-pr-20181115' of git://git... git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=1570390540 kernel config: https://syzkaller.appspot.com/x

Re: [PATCH] mm: use managed_zone() for more exact check in zone iteration

2018-11-15 Thread Wei Yang
On Thu, Nov 15, 2018 at 01:37:35PM -0800, Andrew Morton wrote: >On Thu, 15 Nov 2018 07:50:40 +0800 Wei Yang wrote: > >> For one zone, there are three digits to describe its space range: >> >> spanned_pages >> present_pages >> managed_pages >> >> The detailed meaning is written in inc

[PATCH] perf stat: Fix shadow stats for clock events

2018-11-15 Thread Ravi Bangoria
Commit 0aa802a79469 ("perf stat: Get rid of extra clock display function") introduced scale and unit for clock events. Thus, perf_stat__update_shadow_stats() now saves scaled values of clock events in msecs, instead of original nsecs. But while calculating values of shadow stats we still consider c

Re: Crash in msm serial on dragonboard with ftrace bootargs

2018-11-15 Thread Viresh Kumar
On Thu, Nov 15, 2018 at 4:23 PM Srinivas Kandagatla wrote: > Yes, this is not the solution, but it proves that the hand-off between > booloaders and kernel is the issue. > > In general there is wider issue with resources hand-off between > bootloader and kernel. > > There has been some proposal i

Re: [PATCH 1/2] clocksource: Demote dbx500 PRCMU clocksource

2018-11-15 Thread Baolin Wang
On 15 November 2018 at 21:32, Linus Walleij wrote: > Demote the DBx500 PRCMU clocksource to quality 100 and > mark it as NONSTOP so it will still be used for > timekeeping across suspend/resume. > > The Nomadik MTU timer which has higher precision will > be used when the system is up and running,

Re: [PATCH v6 0/2] arm64: dts: add prng-ee nodes

2018-11-15 Thread Vinod Koul
On 15-11-18, 11:20, Andy Gross wrote: > On Thu, Nov 15, 2018 at 09:15:18AM +0530, Vinod Koul wrote: > > On 01-10-18, 11:51, Vinod Koul wrote: > > > This adds prng-ee nodes for msm8996 and sdm845 > > > > Ping Andy, would appreciate if you can pick these up. > > Done. I did have to massage the loc

Re: [PATCH] ASoC: imx-audmux: complete dt-bindings for imx6

2018-11-15 Thread Shawn Guo
On Mon, Nov 05, 2018 at 02:58:02PM +0100, Clément Péron wrote: > From: Colin Didier > > The MX6 Audmux differs from MX51. > > This patch adds the audmux for i.MX6 family. > > Signed-off-by: Colin Didier > Signed-off-by: Clément Péron I think you should send it to ASoC maintainer and list for

Re: [PATCH] ARM: dts: imx6ul: ccimx6ulsom: Fix indentation on iomuxc nodes

2018-11-15 Thread Shawn Guo
On Mon, Nov 05, 2018 at 11:48:04AM +0100, Alex Gonzalez wrote: > This patch corrects indentation problems in the gpmigrp and i2c1grp nodes. > > Signed-off-by: Alex Gonzalez Applied, thanks.

Re: [PATCH v2] ARM: dts: imx6ul: ccimx6ulsom: Add support for wireless SOM variant

2018-11-15 Thread Shawn Guo
On Mon, Nov 05, 2018 at 11:43:42AM +0100, Alex Gonzalez wrote: > The wireless variants of the ConnecCore 6UL SOM include a Qualcomm > QCA6564 wireless chip with dual WiFi and Bluetooth. > > Both the ConnectCore 6UL SBC Express and Pro boards fit a wireless SOM. > > The Wifi is connected through t

Re: [PATCHv3 1/6] atomics: add common header generation files

2018-11-15 Thread Mark Rutland
Hi Andrew, On Thu, Nov 15, 2018 at 03:10:48PM -0800, Andrew Morton wrote: > On Tue, 4 Sep 2018 11:48:25 +0100 Mark Rutland wrote: > > > To minimize repetition, to allow for future rework, and to ensure > > regularity of the various atomic APIs, we'd like to automatically > > generate (the bulk

[PATCH] misc/pvpanic: resolve compile errors for arch=um

2018-11-15 Thread Peng Hao
Resolve compile error for arch=um pvpanic.c:(.text+0xb6): undefined reference to `devm_ioremap_resource' Signed-off-by: Peng Hao --- drivers/misc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig index 642626a..f417b06 100644

Oops: 0003 [#1] PREEMPT SMP NOPTI

2018-11-15 Thread Kyle Sanderson
2008(!) dual-core Atom box. model name : Intel(R) Atom(TM) CPU 330 @ 1.60GHz [1027540.690329] perf: interrupt took too long (12579 > 12560), lowering kernel.perf_event_max_sample_rate to 15000 [1027540.774026] perf: interrupt took too long (15754 > 15723), lowering kernel.perf_event_max_sa

Re: linux-next: manual merge of the block tree with Linus' tree

2018-11-15 Thread Jens Axboe
On 11/15/18 7:19 PM, Stephen Rothwell wrote: > Hi all, > > Today's linux-next merge of the block tree got a conflict in: > > block/blk.h > > between commit: > > 1adfc5e4136f ("block: make sure discard bio is aligned with logical block > size") > > from Linus' tree (precedes v4.20-rc2) and

linux-next: manual merge of the block tree with Linus' tree

2018-11-15 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the block tree got a conflict in: block/blk.h between commit: 1adfc5e4136f ("block: make sure discard bio is aligned with logical block size") from Linus' tree (precedes v4.20-rc2) and commit: 079076b3416e ("block: remove deadline __deadline manipula

Re: [PATCH 1/2] perf vendor events: Add stepping in CPUID string for x86

2018-11-15 Thread Arnaldo Carvalho de Melo
Em Thu, Nov 15, 2018 at 04:01:46PM -0500, Liang, Kan escreveu: > > > On 11/15/2018 3:44 PM, Jiri Olsa wrote: > > On Wed, Nov 14, 2018 at 01:24:15PM -0800, kan.li...@linux.intel.com wrote: > > > From: Kan Liang > > > > > > Perf tools cannot find the proper event list for Cascadelake server. > >

[PATCH v2] ASoC: rt5663: Add documentation for power supply support

2018-11-15 Thread Cheng-Yi Chiang
rt5663 codec driver will support setting CPVDD and AVDD power supply from device tree. Signed-off-by: Cheng-Yi Chiang --- Moved power supply properties to required properties. Documentation/devicetree/bindings/sound/rt5663.txt | 6 ++ 1 file changed, 6 insertions(+) diff --git a/Documenta

[PATCH 1/1] Improve kernfs_notify() poll notification latency

2018-11-15 Thread Radu Rendec
kernfs_notify() does two notifications: poll and fsnotify. Originally, both notifications were done from scheduled work context and all that kernfs_notify() did was schedule the work. This patch simply moves the poll notification from the scheduled work handler to kernfs_notify(). The fsnotify not

[PATCH 0/1] kernfs_notify() poll latency

2018-11-15 Thread Radu Rendec
Hi everyone, I believe kernfs_notify() poll latency can be improved if the poll notification is done from kernfs_notify() directly rather than scheduled work context. I am sure there are good reasons why the fsnotify notification must be done from scheduled work context (an obvious one is that it

Re: [PATCH v3 06/13] dt-bindings: irqchip: Introduce TISCI Interrupt router bindings

2018-11-15 Thread Lokesh Vutla
Hi Rob, On 11/13/2018 11:43 AM, Lokesh Vutla wrote: > Hi Rob, > > On 12/11/18 11:30 PM, Rob Herring wrote: >> On Tue, Nov 06, 2018 at 02:10:58PM +0530, Lokesh Vutla wrote: >>> Add the DT binding documentation for Interrupt router driver. >>> >>> Signed-off-by: Lokesh Vutla >>> --- >>> Changes si

Re: [PATCH 5/8] kbuild: change if_changed_rule to accept multi-line recipe

2018-11-15 Thread Masahiro Yamada
On Thu, Nov 15, 2018 at 6:12 PM Rasmus Villemoes wrote: > > On 15/11/2018 09.27, Masahiro Yamada wrote: > > GNU Make supports 'define' ... 'endef' directive, which can describe > > a recipe that consists of multiple lines. > > > > endef > > > > This does not actually exploit the benefits of 'def

Re: [PATCH v17 18/23] platform/x86: Intel SGX driver

2018-11-15 Thread Randy Dunlap
On 11/15/18 5:01 PM, Jarkko Sakkinen wrote: > Intel Software Guard eXtensions (SGX) is a set of CPU instructions that > can be used by applications to set aside private regions of code and > data. The code outside the enclave is disallowed to access the memory > inside the enclave by the CPU access

Re: [RFC PATCH] dt-bindings: add a jsonschema binding example

2018-11-15 Thread jonsm...@gmail.com
On Thu, Nov 15, 2018 at 6:42 PM Rob Herring wrote: > > On Wed, Nov 14, 2018 at 1:39 PM jonsm...@gmail.com wrote: > > > > On Fri, Apr 20, 2018 at 9:36 PM Rob Herring wrote: > > > I share the concern as I doubt most kernel developers don't know > > > jsonschema. But then the alternative is us defi

Re: [PATCH v3] tpm: add support for partial reads

2018-11-15 Thread Jarkko Sakkinen
On Thu, Nov 15, 2018 at 04:26:33PM -0800, Tadeusz Struk wrote: > On 11/15/18 3:31 PM, Jarkko Sakkinen wrote: > > You could drop these memset() calls and also one from > > tpm_timeout_work(). The call could be done once in the beginning of > > tpm_common_write() instead of having three different cal

Re: Memory hotplug softlock issue

2018-11-15 Thread Baoquan He
On 11/15/18 at 03:32pm, Michal Hocko wrote: > On Thu 15-11-18 21:38:40, Baoquan He wrote: > > On 11/15/18 at 02:19pm, Michal Hocko wrote: > > > On Thu 15-11-18 21:12:11, Baoquan He wrote: > > > > On 11/15/18 at 09:30am, Michal Hocko wrote: > > > [...] > > > > > It would be also good to find out whe

Re: [PATCH] serial: 8250: Default SERIAL_OF_PLATFORM to SERIAL_8250

2018-11-15 Thread Guenter Roeck
On Thu, Nov 15, 2018 at 11:48:20AM -0800, Florian Fainelli wrote: > > OK, would you mind testing this below? It seems to me that 8250_of.c is > incompatible with arch/powerpc/kernel/legacy_serial.c and that is what > is causing the issue here. > > diff --git a/drivers/tty/serial/8250/Kconfig > b/

Re: [PATCH] Revert "HID: uhid: use strlcpy() instead of strncpy()"

2018-11-15 Thread Kees Cook
On Thu, Nov 15, 2018 at 5:55 AM, David Herrmann wrote: > Hi > > On Thu, Nov 15, 2018 at 12:09 AM Kees Cook wrote: >> On Wed, Nov 14, 2018 at 9:40 AM, Laura Abbott wrote: > [...] >> > Can we switch to strscpy instead? This will quiet gcc and avoid the >> > issues with strlcpy. >> >> Yes please: i

[PATCH v17 23/23] selftests/x86: Add a selftest for SGX

2018-11-15 Thread Jarkko Sakkinen
Add a selftest for SGX. It is a trivial test where a simple enclave copies one 64-bit word of memory between two memory locations given to the enclave as arguments. Signed-off-by: Jarkko Sakkinen --- tools/testing/selftests/x86/Makefile | 10 + tools/testing/selftests/x86/sgx/Makefile

[PATCH v17 21/23] platform/x86: ptrace() support for the SGX driver

2018-11-15 Thread Jarkko Sakkinen
Add VMA callbacks for ptrace() that can be used with debug enclaves. With debug enclaves data can be read and write the memory word at a time by using ENCLS(EDBGRD) and ENCLS(EDBGWR) leaf instructions. Signed-off-by: Jarkko Sakkinen --- drivers/platform/x86/intel_sgx/sgx_vma.c | 109

[PATCH v17 20/23] x86/sgx: Add a simple swapper for the EPC memory manager

2018-11-15 Thread Jarkko Sakkinen
Wire up the EPC manager's reclaim flow to the SGX driver's swapping functionality. In the long term there will be multiple users of the EPC manager, e.g. SGX driver and KVM, thus the interface between the EPC manager and the driver is fairly genericized and decoupled. But to avoid adding unusued

[PATCH v17 19/23] platform/x86: sgx: Add swapping functionality to the Intel SGX driver

2018-11-15 Thread Jarkko Sakkinen
Because the kernel is untrusted, swapping pages in/out of the Enclave Page Cache (EPC) has specialized requirements: * The kernel cannot directly access EPC memory, i.e. cannot copy data to/from the EPC. * To evict a page from the EPC, the kernel must "prove" to hardware that are no valid TLB

[PATCH v17 18/23] platform/x86: Intel SGX driver

2018-11-15 Thread Jarkko Sakkinen
Intel Software Guard eXtensions (SGX) is a set of CPU instructions that can be used by applications to set aside private regions of code and data. The code outside the enclave is disallowed to access the memory inside the enclave by the CPU access control. SGX driver provides a ioctl API for loadi

[PATCH v17 15/23] x86/sgx: Enumerate and track EPC sections

2018-11-15 Thread Jarkko Sakkinen
From: Sean Christopherson Enumerate Enclave Page Cache (EPC) sections via CPUID and add the data structures necessary to track EPC pages so that they can be allocated, freed and managed. As a system may have multiple EPC sections, invoke CPUID on SGX sub-leafs until an invalid leaf is encountere

[PATCH v17 17/23] x86/sgx: Add sgx_einit() for initializing enclaves

2018-11-15 Thread Jarkko Sakkinen
From: Sean Christopherson Add a helper function to perform ENCLS(EINIT) with the correct LE hash MSR values. ENCLS[EINIT] initializes an enclave, verifying the enclave's measurement and preparing it for execution, i.e. the enclave cannot be run until it has been initialized. The measurement asp

[PATCH v17 16/23] x86/sgx: Add functions to allocate and free EPC pages

2018-11-15 Thread Jarkko Sakkinen
At this time there is no support for reclaiming pages prior to the owner explicitly freeing the page. As for freeing pages, because freeing a page is expected to succeed in the vast majority of cases and because most call sites will not be equipped to handle failure, provide a variant for freeing

[PATCH v17 14/23] x86/sgx: Add wrappers for ENCLS leaf functions

2018-11-15 Thread Jarkko Sakkinen
ENCLS is an umbrella instruction for a variety of cpl0 SGX functions. The ENCLS function that is executed is specified in EAX, with each function potentially having more leaf-specific operands beyond EAX. ENCLS introduces its own (positive value) error codes that (some) leafs use to return failure

[PATCH v17 13/23] x86/msr: Add SGX Launch Control MSR definitions

2018-11-15 Thread Jarkko Sakkinen
From: Sean Christopherson Add a new IA32_FEATURE_CONTROL bit, SGX_LE_WR. When set, SGX_LE_WR allows software to write the SGXLEPUBKEYHASH MSRs (see below). The The existence of the bit is enumerated by CPUID as X86_FEATURE_SGX_LC. Like all other flags in IA32_FEATURE_CONTROL, the MSR must be lo

[PATCH v17 12/23] x86/sgx: Add definitions for SGX's CPUID leaf and variable sub-leafs

2018-11-15 Thread Jarkko Sakkinen
SGX defines its own CPUID leaf, 0x12, along with a variable number of sub-leafs. Sub-leafs 0 and 1 are always available if SGX is supported and enumerate various SGX features, e.g. instruction sets and enclave capabilities. Sub-leafs 2+ are variable, both in their existence and in what they enume

[PATCH v17 10/23] x86/sgx: Add ENCLS architectural error codes

2018-11-15 Thread Jarkko Sakkinen
The SGX architecture defines an extensive set of error codes that are used by ENCL{S,U,V} instructions to provide software with (somewhat) precise error information. Though they are architectural, define the known error codes in a separate file from sgx_arch.h so that they can be exposed to usersp

[PATCH v17 11/23] x86/sgx: Add SGX1 and SGX2 architectural data structures

2018-11-15 Thread Jarkko Sakkinen
Define the data structures used by various ENCLS functions needed for Linux to support all SGX1 and SGX2 ENCLS leaf functions. This is not an exhaustive representation of all SGX data structures as several are only consumed by ENCLU (userspace), e.g. REPORT and KEYREQUEST, while others are only co

[PATCH v17 09/23] x86/sgx: Define SGX1 and SGX2 ENCLS leafs

2018-11-15 Thread Jarkko Sakkinen
ENCLS, a.k.a. Enclave System instruction, is an umbrella instruction for a variety of privileged SGX functions. The ENCLS function to be executed is specified in EAX, a la GETSEC of SMX/TXT fame. Leafs may use additional registers for function-specific operands. ENCLS also introduces its own set

[PATCH v17 08/23] x86/mm: x86/sgx: Signal SIGSEGV for userspace #PFs w/ PF_SGX

2018-11-15 Thread Jarkko Sakkinen
From: Sean Christopherson The PF_SGX bit is set if and only if the #PF is detected by the SGX Enclave Page Cache Map (EPCM). The EPCM is a hardware-managed table that enforces accesses to an enclave's EPC pages in addition to the software-managed kernel page tables, i.e. the effective permission

[PATCH v17 04/23] x86/msr: Add IA32_FEATURE_CONTROL.SGX_ENABLE definition

2018-11-15 Thread Jarkko Sakkinen
From: Sean Christopherson Add a new IA32_FEATURE_CONTROL bit, SGX_ENABLE, which must be set in order to execute SGX instructions, i.e. ENCL{S,U,V}. The existence of the bit is enumerated by CPUID as X86_FEATURE_SGX. Like all other flags in IA32_FEATURE_CONTROL, the MSR must be locked for SGX_EN

[PATCH v17 06/23] x86/cpu/intel: Detect SGX support and update caps appropriately

2018-11-15 Thread Jarkko Sakkinen
From: Sean Christopherson Similar to other large Intel features such as VMX and TXT, SGX must be explicitly enabled in IA32_FEATURE_CONTROL MSR to be truly usable. Clear all SGX related capabilities if SGX is not fully enabled in IA32_FEATURE_CONTROL or if the SGX1 instruction set isn't supported

[PATCH v17 07/23] x86/mm: x86/sgx: Add new 'PF_SGX' page fault error code bit

2018-11-15 Thread Jarkko Sakkinen
From: Sean Christopherson The SGX bit is set in the #PF error code if and only if the fault is detected by the Enclave Page Cache Map (EPCM), a hardware-managed table that enforces the paging permissions defined by the enclave, e.g. to prevent the kernel from changing the permissions of an enclav

[PATCH v17 05/23] x86/cpufeatures: Add Intel-defined SGX_LC feature bit

2018-11-15 Thread Jarkko Sakkinen
From: Kai Huang X86_FEATURE_SGX_LC reflects whether or not the CPU supports SGX Launch Control, i.e. enumerates the existence of IA32_FEATURE_CONTROL's SGX_LE_WR bit and the IA32_SGXLEPUBKEYHASH MSRs. Signed-off-by: Kai Huang Signed-off-by: Jarkko Sakkinen --- arch/x86/include/asm/cpufeatures

[PATCH v17 02/23] x86/cpufeatures: Add Intel-defined SGX feature bit

2018-11-15 Thread Jarkko Sakkinen
From: Kai Huang X86_FEATURE_SGX reflects whether or not the CPU supports Intel's Software Guard eXtensions (SGX). Signed-off-by: Kai Huang Signed-off-by: Jarkko Sakkinen --- arch/x86/include/asm/cpufeatures.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/include/asm/cpufeatures

[PATCH v17 03/23] x86/cpufeatures: Add SGX sub-features (as Linux-defined bits)

2018-11-15 Thread Jarkko Sakkinen
From: Sean Christopherson CPUID_12_EAX is an Intel-defined feature bits leaf dedicated for SGX that enumerates the SGX instruction sets that are supported by the CPU, e.g. SGX1, SGX2, etc... Because Linux currently only cares about two bits (SGX1 and SGX2) and there are currently only four docum

[PATCH v17 01/23] x86/sgx: Update MAINTAINERS

2018-11-15 Thread Jarkko Sakkinen
Add the maintainer information for the SGX subsystem. Signed-off-by: Jarkko Sakkinen --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 0abecc528dac..aaf56b544858 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -7676,6 +7676,13 @@ L: li

Re: [PATCH v3 1/2] x86/fpu: track AVX-512 usage of tasks

2018-11-15 Thread Dave Hansen
On 11/15/18 4:21 PM, Li, Aubrey wrote: > On 2018/11/15 23:40, Dave Hansen wrote: >> On 11/14/18 3:00 PM, Aubrey Li wrote: >>> AVX-512 component has 3 states, only Hi16_ZMM state causes notable >>> frequency drop. Add per task Hi16_ZMM state tracking to context switch. >> >> Just curious, but is the

Re: [RFC PATCH 2/5] mm: lower the printk loglevel for __dump_page messages

2018-11-15 Thread Baoquan He
On 11/07/18 at 11:18am, Michal Hocko wrote: > From: Michal Hocko > > __dump_page messages use KERN_EMERG resp. KERN_ALERT loglevel (this is > the case since 2004). Most callers of this function are really detecting > a critical page state and BUG right after. On the other hand the > function is c

[PATCH] arm64: dts: rockchip: rk3399: Add xin32k clk

2018-11-15 Thread Derek Basehore
This adds the xin32k clock to the RK3399 CPU. Even though it's not directly used, muxes will end up traversing the entire clk tree on calls to determine_rate if it doesn't exist. Signed-off-by: Derek Basehore --- arch/arm64/boot/dts/rockchip/rk3399.dtsi | 7 +++ 1 file changed, 7 insertions(

Applied "regulator/of_get_regulator: add child path to find the regulator supplier" to the regulator tree

2018-11-15 Thread Mark Brown
The patch regulator/of_get_regulator: add child path to find the regulator supplier has been applied to the regulator tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git All being well this means that it will be integrated into the linux-next tree (usually somet

Re: [PATCH] watchdog: core: suppress "watchdog did not stop" message

2018-11-15 Thread Tao Ren
On 11/15/18 4:19 PM, Guenter Roeck wrote: > NACK. This message is displayed if/when the watchdog application > exits without stopping the watchdog and/or without closing properly. > This _is_ critical since it will reboot the system after the next > timeout period. > > If userspace triggers this m

Re: [PATCH v3 2/2] proc: add /proc//arch_state

2018-11-15 Thread Li, Aubrey
On 2018/11/15 23:18, Dave Hansen wrote: > On 11/14/18 3:00 PM, Aubrey Li wrote: >> +void arch_thread_state(struct seq_file *m, struct task_struct *task) >> +{ >> +/* >> + * Report AVX-512 Hi16_ZMM registers usage >> + */ >> +if (task->thread.fpu.hi16zmm_usage) >> +seq_pu

[PATCH] perf build: fix -lbfd feature check

2018-11-15 Thread Stanislav Fomichev
Current libbfd feature test unconditionally links against -liberty and -lz. While it's required on some systems (e.g. opensuse), it's completely unnecessary on the others, where only -lbdf is sufficient (debian). This patch streamlines (and renames) the following feature checks: feature-libbfd

[PATCH 1/6] locking/mutex: Remove caller signal_pending branch predictions

2018-11-15 Thread Davidlohr Bueso
This is already done for us internally by the signal machinery. Cc: pet...@infradead.org Cc: mi...@kernel.org Signed-off-by: Davidlohr Bueso --- kernel/locking/mutex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/locking/mutex.c b/kernel/locking/mutex.c index 3f8a35

[PATCH 4/6] mm: Remove caller signal_pending branch predictions

2018-11-15 Thread Davidlohr Bueso
This is already done for us internally by the signal machinery. Signed-off-by: Davidlohr Bueso --- mm/filemap.c | 2 +- mm/gup.c | 2 +- mm/hugetlb.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mm/filemap.c b/mm/filemap.c index 81adec8ee02c..abd6c4591855 100644 ---

[PATCH 3/6] arch/arc: Remove caller signal_pending_branch predictions

2018-11-15 Thread Davidlohr Bueso
This is already done for us internally by the signal machinery. Cc: vgu...@synopsys.com Signed-off-by: Davidlohr Bueso --- arch/arc/mm/fault.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arc/mm/fault.c b/arch/arc/mm/fault.c index c9da6102eb4f..6b6df8f9f882 100644 ---

[PATCH 2/6] kernel/sched: Remove caller signal_pending branch predictions

2018-11-15 Thread Davidlohr Bueso
This is already done for us internally by the signal machinery. Cc: pet...@infradead.org Cc: mi...@kernel.org Signed-off-by: Davidlohr Bueso --- kernel/sched/core.c | 2 +- kernel/sched/swait.c | 2 +- kernel/sched/wait.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/k

[PATCH 5/6] drivers/i2c: Remove caller signal_pending branch predictions

2018-11-15 Thread Davidlohr Bueso
This is already done for us internally by the signal machinery. Cc: linux-...@vger.kernel.org Cc: p...@axentia.se Signed-off-by: Davidlohr Bueso --- drivers/i2c/busses/i2c-ibm_iic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-ibm_iic.c b/drivers/i2c

  1   2   3   4   5   6   >