Re: [PATCH 19/28] locking/lockdep: Optimize irq usage check when marking lock usage bit

2019-04-25 Thread Yuyang Du
Thanks for review. On Fri, 26 Apr 2019 at 03:32, Peter Zijlstra wrote: > > On Wed, Apr 24, 2019 at 06:19:25PM +0800, Yuyang Du wrote: > > After only a quick read of these next patches; this is the one that > worries me most. > > You did mention Frederic's patches, but I'm not entirely sure you're

[PATCH v4] cpufreq: qoriq: add support for lx2160a

2019-04-25 Thread Vabhav Sharma
Enable support of NXP SoC lx2160a to handle the lx2160a SoC. Signed-off-by: Tang Yuantian Signed-off-by: Yogesh Gaur Signed-off-by: Vabhav Sharma Acked-by: Scott Wood Acked-by: Stephen Boyd Acked-by: Viresh Kumar --- Changes for v4: - Incorporated review comments from Stephen Boyd Changes f

[PATCH v4] clk: qoriq: add support for lx2160a

2019-04-25 Thread Vabhav Sharma
Add clockgen support and configuration for NXP SoC lx2160a with compatible property as "fsl,lx2160a-clockgen". Signed-off-by: Tang Yuantian Signed-off-by: Yogesh Gaur Signed-off-by: Vabhav Sharma Acked-by: Scott Wood Acked-by: Stephen Boyd Acked-by: Viresh Kumar --- Changes for v4: - Incorpo

[PATCH] clk: imx: correct pfdv2 gate_bit/vld_bit operations

2019-04-25 Thread Anson Huang
The operations of pfdv2 gate_bit/valid_bit are incorrect, they are defined as u8 for bit offset, but gate_bit is actually assigned as mask which could be 32 bit long and it causes overflow, and vld_bit is assigned as bit offset based on incorrect gate_bit value, it causes incorrect pfd clock gate s

Re: [PATCH] dt-bindings: Add silabs,si5341

2019-04-25 Thread Mike Looijmans
On 26-04-19 01:04, Stephen Boyd wrote: > Quoting Mike Looijmans (2019-04-24 02:02:16) >> Adds the devicetree bindings for the si5341 driver that supports the >> Si5341 and Si5340 chips. >> >> Signed-off-by: Mike Looijmans >> --- >> .../bindings/clock/silabs,si5341.txt | 141

RE: [EXT] Re: [PATCH v3] clk: qoriq: add support for lx2160a

2019-04-25 Thread Vabhav Sharma
> -Original Message- > From: Stephen Boyd > Sent: Thursday, April 25, 2019 11:52 PM > To: linux-...@vger.kernel.org; linux-kernel@vger.kernel.org; linux- > p...@vger.kernel.org; Vabhav Sharma > Cc: mturque...@baylibre.com; r...@rjwysocki.net; viresh.ku...@linaro.org; > Yogesh Narayan Ga

Re: [PATCH 20/28] locking/lockdep: Refactorize check_noncircular and check_redundant

2019-04-25 Thread Yuyang Du
Thanks for review. On Fri, 26 Apr 2019 at 03:48, Peter Zijlstra wrote: > > On Wed, Apr 24, 2019 at 06:19:26PM +0800, Yuyang Du wrote: > > These two functions now handle different check results themselves. A new > > check_path function is added to check whether there is a path in the > > dependenc

[PATCH v4 4/6] usb: roles: add API to get usb_role_switch by node

2019-04-25 Thread Chunfeng Yun
Add fwnode_usb_role_switch_get() to make easier to get usb_role_switch by fwnode which register it. It's useful when there is not device_connection registered between two drivers and only knows the fwnode which register usb_role_switch. Signed-off-by: Chunfeng Yun --- v4 changes: 1. use switch_

[PATCH v4 5/6] usb: roles: add USB Type-B GPIO connector driver

2019-04-25 Thread Chunfeng Yun
Due to the requirement of usb-connector.txt binding, the old way using extcon to support USB Dual-Role switch is now deprecated when use Type-B connector. This patch introduces a driver of Type-B connector which typically uses an input GPIO to detect USB ID pin, and try to replace the function prov

Re: [PATCH 22/28] locking/lockdep: Adjust new bit cases in mark_lock

2019-04-25 Thread Yuyang Du
Thanks for review. On Fri, 26 Apr 2019 at 03:52, Peter Zijlstra wrote: > > + if (new_bit >= LOCK_USAGE_STATES) { > > + WARN_ON(1); > > Does that want to be DEBUG_LOCKS_WARN_ON() ? Indeed, it was.

[v4 PATCH 0/6] add USB Type-B GPIO connector driver

2019-04-25 Thread Chunfeng Yun
Because the USB Connector is introduced and the requirement of usb-connector.txt binding, the old way using extcon to support USB Dual-Role switch is now deprecated, meanwhile there is no available common driver when use Type-B connector, typically using an input GPIO to detect USB ID pin. This pat

Re: [PATCH 23/28] locking/lockdep: Update irqsafe lock bitmaps

2019-04-25 Thread Yuyang Du
Thanks for review. On Fri, 26 Apr 2019 at 03:55, Peter Zijlstra wrote: > > + if (!dir) { > > + unsigned long *bitmaps[4] = { > > + lock_classes_hardirq_safe, > > + lock_classes_hardirq_safe_read, > > + lock_classes_softir

Re: [PATCH v2 05/11] powerpc/mm: get rid of mm_ctx_slice_mask_xxx()

2019-04-25 Thread Aneesh Kumar K.V
Christophe Leroy writes: > Now that slice_mask_for_size() is in mmu.h, the mm_ctx_slice_mask_xxx() > are not needed anymore, so drop them. Note that the 8xx ones where > not used anyway. > Reviewed-by: Aneesh Kumar K.V > Signed-off-by: Christophe Leroy > --- > arch/powerpc/include/asm/book3s

Re: [PATCH 2/2] HID: input: add mapping for KEY_KBD_LAYOUT_NEXT

2019-04-25 Thread Benjamin Tissoires
On Thu, Apr 25, 2019 at 6:38 PM Dmitry Torokhov wrote: > > HUTRR56 defined a new usage code on consumer page to cycle through > set of keyboard layouts, let's add this mapping. > > Signed-off-by: Dmitry Torokhov > --- Acked-by: Benjamin Tissoires I don't think this will collide with the HID tr

Re: [PATCH 26/28] locking/lockdep: Remove __bfs

2019-04-25 Thread Yuyang Du
Thanks for review. On Fri, 26 Apr 2019 at 04:07, Peter Zijlstra wrote: > > On Wed, Apr 24, 2019 at 06:19:32PM +0800, Yuyang Du wrote: > > Since there is no need for backward dependecy searching, remove this > > extra function layer. > > OK, so $subject confused the heck out of me, I thought you w

[RFC][PATCH] panic: make panic start/end messages consistent

2019-04-25 Thread Sergey Senozhatsky
We don't have consistency: - we always print panic header pr_emerg("Kernel panic - not syncing:") - but we don't always print panic footer pr_emerg("---[ end Kernel panic - not syncing:") For instance, no panic footer (end panic) message will be printed when panic_timeout is set -

Re: [PATCH 1/3] mfd: apple-ibridge: Add Apple iBridge MFD driver.

2019-04-25 Thread Benjamin Tissoires
On Fri, Apr 26, 2019 at 7:56 AM Life is hard, and then you die wrote: > > > Hi Benjamin, > > On Thu, Apr 25, 2019 at 11:39:12AM +0200, Benjamin Tissoires wrote: > > On Thu, Apr 25, 2019 at 10:19 AM Life is hard, and then you die > > wrote: > > > > > > Hi Benjamin, > > > > > > Thank you for lo

Re: linux-next: build warning after merge of the char-misc tree

2019-04-25 Thread Greg KH
On Fri, Apr 26, 2019 at 03:56:53PM +1000, Stephen Rothwell wrote: > Hi all, > > After merging the char-misc tree, today's linux-next build (x86_64 > allmodconfig) produced this warning: > > drivers/misc/aspeed-p2a-ctrl.c: In function 'aspeed_p2a_mmap': > drivers/misc/aspeed-p2a-ctrl.c:110:2: warn

Re: [PATCH] tty: Don't force RISCV SBI console as preferred console

2019-04-25 Thread Anup Patel
On Fri, Apr 26, 2019 at 10:11 AM Atish Patra wrote: > > On 4/25/19 6:35 AM, Anup Patel wrote: > > The Linux kernel will auto-disables all boot consoles whenever it > > gets a preferred real console. > > > > Currently on RISC-V systems, if we have a real console which is not > > RISCV SBI console t

Re: [PATCH] tty: Don't force RISCV SBI console as preferred console

2019-04-25 Thread Christoph Hellwig
On Thu, Apr 25, 2019 at 09:41:21PM -0700, Atish Patra wrote: > Do we even need HVC_SBI console to be enabled by default? Disabling > CONFIG_HVC_RISCV_SBI seems to be fine while running in QEMU. > > If we don't need it, I suggest we should remove the config option from > defconfig in addition to th

Re: [LKP] [btrfs] 302167c50b: fio.write_bw_MBps -12.4% regression

2019-04-25 Thread Huang, Ying
Hi, Josef, kernel test robot writes: > Greeting, > > FYI, we noticed a -12.4% regression of fio.write_bw_MBps due to commit: > > > commit: 302167c50b32e7fccc98994a91d40ddbbab04e52 ("btrfs: don't end the > transaction for delayed refs in throttle") > https://git.kernel.org/cgit/linux/kernel/git/

linux-next: manual merge of the staging tree with the v4l-dvb tree

2019-04-25 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the staging tree got conflicts in: drivers/staging/media/zoran/Kconfig drivers/staging/media/zoran/videocodec.c drivers/staging/media/zoran/videocodec.h drivers/staging/media/zoran/zoran.h drivers/staging/media/zoran/zoran_card.c drivers/staging/med

Re: [PATCH 2/2] mmc: sdhci_am654: Fix SLOTTYPE write

2019-04-25 Thread Adrian Hunter
On 25/04/19 6:57 PM, Faiz Abbas wrote: > In the call to regmap_update_bits() for SLOTTYPE, the mask and value > fields are exchanged. Fix this. Could you also comment on whether this has any known effect on the driver. > > Signed-off-by: Faiz Abbas > --- > drivers/mmc/host/sdhci_am654.c | 4 ++

[PATCH 1/3] tty: simserial: drop unused iflag macro

2019-04-25 Thread Johan Hovold
Drop the RELEVANT_IFLAG() macro which hasn't been used for over a decade. Cc: Tony Luck Cc: Fenghua Yu Signed-off-by: Johan Hovold --- arch/ia64/hp/sim/simserial.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/ia64/hp/sim/simserial.c b/arch/ia64/hp/sim/simserial.c index 7aeb48a1857

[PATCH 0/3] tty: drop unused iflag macro

2019-04-25 Thread Johan Hovold
I noticed that the RELEVANT_IFLAG() macro was unused in USB serial and turns out there were a few more instances that could be dropped. I have some pending changes that may conflict with the corresponding change to USB serial so I'll take that one separately through my tree, but perhaps the rest c

[PATCH v2 13/17] powerpc/mm: cleanup HPAGE_SHIFT setup

2019-04-25 Thread Christophe Leroy
Only book3s/64 may select default among several HPAGE_SHIFT at runtime. 8xx always defines 512K pages as default FSL_BOOK3E always defines 4M pages as default This patch limits HUGETLB_PAGE_SIZE_VARIABLE to book3s/64 moves the definitions in subarches files. Signed-off-by: Christophe Leroy ---

[PATCH v2 14/17] powerpc/mm: cleanup remaining ifdef mess in hugetlbpage.c

2019-04-25 Thread Christophe Leroy
Only 3 subarches support huge pages. So when it is either 2 of them, it is not the third one. And mmu_has_feature() is known by all subarches so IS_ENABLED() can be used instead of #ifdef Signed-off-by: Christophe Leroy --- arch/powerpc/mm/hugetlbpage.c | 12 +--- 1 file changed, 5 inse

[PATCH 2/3] tty: ipoctal: drop unused iflag macro

2019-04-25 Thread Johan Hovold
Drop the RELEVANT_IFLAG() macro which has never been used. Cc: Samuel Iglesias Gonsalvez Cc: Jens Taprogge Signed-off-by: Johan Hovold --- drivers/ipack/devices/ipoctal.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/ipack/devices/ipoctal.h b/drivers/ipack/devices/ipoctal.h index

[PATCH v2 09/17] powerpc/mm: split asm/hugetlb.h into dedicated subarch files

2019-04-25 Thread Christophe Leroy
Three subarches support hugepages: - fsl book3e - book3s/64 - 8xx This patch splits asm/hugetlb.h to reduce the #ifdef mess. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/book3s/64/hugetlb.h | 40 +++ arch/powerpc/include/asm/hugetlb.h | 87 ++---

[PATCH v2 15/17] powerpc/mm: flatten function __find_linux_pte() step 1

2019-04-25 Thread Christophe Leroy
__find_linux_pte() is full of if/else which is hard to follow allthough the handling is pretty simple. This patch flattens the function by getting rid of as much if/else as possible. In order to ease the review, this is done in three steps. Signed-off-by: Christophe Leroy --- arch/powerpc/mm/pg

[PATCH 3/3] tty: cpm_uart: drop unused iflag macro

2019-04-25 Thread Johan Hovold
Drop the RELEVANT_IFLAG() macro which hasn't been used at least since the dawn of git. Signed-off-by: Johan Hovold --- drivers/tty/serial/cpm_uart/cpm_uart_core.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/tty/serial/cpm_uart/cpm_uart_core.c b/drivers/tty/serial/cpm_uart/cpm_u

[PATCH v2 17/17] powerpc/mm: flatten function __find_linux_pte() step 3

2019-04-25 Thread Christophe Leroy
__find_linux_pte() is full of if/else which is hard to follow allthough the handling is pretty simple. Previous patches left a { } block. This patch removes it. Signed-off-by: Christophe Leroy --- arch/powerpc/mm/pgtable.c | 98 +++ 1 file changed, 49

Re: [RFC PATCH v5 3/4] x86/acrn: Use HYPERVISOR_CALLBACK_VECTOR for ACRN guest upcall vector

2019-04-25 Thread Ingo Molnar
* Zhao, Yakui wrote: > > > > Does the hypervisor model the APIC EOI command, i.e. does it require the > > > > APIC to be acked? I.e. would not acking the APIC create an IRQ storm? > > > > > > The hypervisor requires that the APIC EOI should be acked. If the EOI APIC > > > is not acked, the API

linux-next: build warning after merge of the char-misc tree

2019-04-25 Thread Stephen Rothwell
Hi all, After merging the char-misc tree, today's linux-next build (x86_64 allmodconfig) produced this warning: drivers/misc/aspeed-p2a-ctrl.c: In function 'aspeed_p2a_mmap': drivers/misc/aspeed-p2a-ctrl.c:110:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement

Re: [PATCH 1/3] mfd: apple-ibridge: Add Apple iBridge MFD driver.

2019-04-25 Thread Life is hard, and then you die
Hi Benjamin, On Thu, Apr 25, 2019 at 11:39:12AM +0200, Benjamin Tissoires wrote: > On Thu, Apr 25, 2019 at 10:19 AM Life is hard, and then you die > wrote: > > > > Hi Benjamin, > > > > Thank you for looking at this. > > > > On Wed, Apr 24, 2019 at 04:18:23PM +0200, Benjamin Tissoires wrote:

[PATCH v2] arm64: dts: ls1028a: Add USB dt nodes

2019-04-25 Thread Ran Wang
This patch adds USB dt nodes for LS1028A. Signed-off-by: Ran Wang --- Changes in v2: - Rename node from usb3@... to usb@... to meet DTSpec arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi | 20 1 files changed, 20 insertions(+), 0 deletions(-) diff --git a/arch/arm64/boo

Re: [PATCH 1/2] mmc: sdhci_am654: Fix minor phy configurations

2019-04-25 Thread Adrian Hunter
On 25/04/19 6:57 PM, Faiz Abbas wrote: > Fix the following minor things: > > 1. Line wrapping with the regmap_*() functions is way more conservative > than required by the 80 character rule. Expand the function calls out to > use less number of lines. > > 2. Add an error message if the DLL fails

Re: [PATCH 1/2] RISC-V: Add DT documentation for SiFive L2 Cache Controller

2019-04-25 Thread Yash Shah
On Thu, Apr 25, 2019 at 3:43 PM Sudeep Holla wrote: > > On Thu, Apr 25, 2019 at 11:24:55AM +0530, Yash Shah wrote: > > Add device tree bindings for SiFive FU540 L2 cache controller driver > > > > Signed-off-by: Yash Shah > > --- > > .../devicetree/bindings/riscv/sifive-l2-cache.txt | 53 > > ++

Re: [PATCHv2 4/4] printk: make sure we always print console disabled message

2019-04-25 Thread Sergey Senozhatsky
Forgot to mention that the series is still in RFC phase. On (04/26/19 14:33), Sergey Senozhatsky wrote: [..] > +++ b/kernel/printk/printk.c > @@ -2613,6 +2613,12 @@ static int __unregister_console(struct console > *console) > pr_info("%sconsole [%s%d] disabled\n", > (consol

Re: [PATCH 02/28] locking/lockdep: Add description and explanation in lockdep design doc

2019-04-25 Thread Yuyang Du
Thank you very much for review. You mean class can go away? Before Bart's addition, it can go away. Right? I think maybe the original point of "never go away" in that context did not intend to talk about a class's real disappearance. Anyway, the points should be made comprehensive. You want me to

Re: [PATCH 2/2] RISC-V: sifive_l2_cache: Add L2 cache controller driver for SiFive SoCs

2019-04-25 Thread Yash Shah
On Thu, Apr 25, 2019 at 3:48 PM Sudeep Holla wrote: > > On Thu, Apr 25, 2019 at 11:24:56AM +0530, Yash Shah wrote: > > The driver currently supports only SiFive FU540-C000 platform. > > > > The initial version of L2 cache controller driver includes: > > - Initial configuration reporting at boot up

Re: [PATCH 1/3] mfd: apple-ibridge: Add Apple iBridge MFD driver.

2019-04-25 Thread Life is hard, and then you die
Hi Jonathan, On Wed, Apr 24, 2019 at 08:13:17PM +0100, Jonathan Cameron wrote: > On Wed, 24 Apr 2019 03:47:18 -0700 > "Life is hard, and then you die" wrote: > > > Hi Jonathan, > > > > On Mon, Apr 22, 2019 at 12:34:26PM +0100, Jonathan Cameron wrote: > > > On Sun, 21 Apr 2019 20:12:49 -07

[PATCHv2 2/4] printk: remove invalid register_console() comment

2019-04-25 Thread Sergey Senozhatsky
We don't iterate consoles twice, since commit 8259cf434202 ("printk: Ensure that "console enabled" messages are printed on the console"), so the comment is not valid anymore, and can be removed, as was suggested by Petr. The patch also invokes pr_info("%sconsole [%s%d] enabled\n") before we unloc

[PATCHv2 4/4] printk: make sure we always print console disabled message

2019-04-25 Thread Sergey Senozhatsky
Make sure that we print 'console disabled' messages on all the consoles, including the one we are about to unregister. Otherwise, unregistered console will not have that message, because pr_info() under console_sem doesn't print anything. We do the same thing in __register_console() with the 'cons

[PATCHv2 3/4] printk: factor out register_console() code

2019-04-25 Thread Sergey Senozhatsky
We need to take console_sem lock when we iterate console drivers list. Otherwise, another CPU can concurrently modify console drivers list or console drivers. Current register_console() has several race conditions - for_each_console() must be done under console_sem. Factor out console registration

[PATCH] Revert "drm/qxl: drop prime import/export callbacks"

2019-04-25 Thread Gerd Hoffmann
This reverts commit f4c34b1e2a37d5676180901fa6ff188bcb6371f8. Simliar to commit a0cecc23cfcb Revert "drm/virtio: drop prime import/export callbacks". We have to do the same with qxl, for the same reasons (it breaks DRI3). Drop the WARN_ON_ONCE(). Fixes: f4c34b1e2a37d5676180901fa6ff188bcb6371f8

[PATCHv2 0/4] Access console drivers list under console_sem

2019-04-25 Thread Sergey Senozhatsky
Hello, Normally, we grab console_sem lock before we iterate consoles list, which is necessary if we want to be race free. The only exception to this rule is console_flush_on_panic(). However, it seems that we are not fully race free - register_console() iterates console drivers list in uns

[PATCHv2 1/4] printk: factor out __unregister_console() code

2019-04-25 Thread Sergey Senozhatsky
The following pattern in register_console() is not completely safe: for_each_console(bcon) if (bcon->flags & CON_BOOT) unregister_console(bcon); Because, in theory, console drivers list and console drivers can be modified concurrently from another CPU. We need to grab c

Re: [PATCH V2] mm: Allow userland to request that the kernel clear memory on release

2019-04-25 Thread Michal Hocko
On Thu 25-04-19 14:42:52, Jann Horn wrote: > On Thu, Apr 25, 2019 at 2:14 PM Michal Hocko wrote: > [...] > > On Wed 24-04-19 14:10:39, Matthew Garrett wrote: > > > From: Matthew Garrett > > > > > > Applications that hold secrets and wish to avoid them leaking can use > > > mlock() to prevent the

Re: [PATCH] nvme: determine the number of IO queues

2019-04-25 Thread Aaron Ma
On 4/25/19 10:39 PM, Christoph Hellwig wrote: > Honestly, unless this is a device shiping in a max market consumer > product already I don't think we should work around this crap at all, > given that this device has obviously never been tested at all. It > really needs a firmware fix instead of

Re: [PATCH V2] mm: Allow userland to request that the kernel clear memory on release

2019-04-25 Thread Michal Hocko
On Thu 25-04-19 13:39:01, Matthew Garrett wrote: > On Thu, Apr 25, 2019 at 5:37 AM Michal Hocko wrote: > > Besides that you inherently assume that the user would do mlock because > > you do not try to wipe the swap content. Is this intentional? > > Yes, given MADV_DONTDUMP doesn't imply mlock I t

Re: [PATCH 1/2] serial: 8250-mtk: add follow control

2019-04-25 Thread Long Cheng
On Thu, 2019-04-25 at 12:40 +0200, Matthias Brugger wrote: > > On 25/04/2019 10:41, Long Cheng wrote: > > Add SW and HW follow control function. > > Can you please explain a bit more what you are doing in this patch. > You change the setting of the registers for different baud rates. Please > ela

Re: [PATCH] sparc: vdso: add FORCE to the build rule of %.so

2019-04-25 Thread David Miller
From: Masahiro Yamada Date: Fri, 26 Apr 2019 09:40:46 +0900 > Hi David, > > > On Wed, Apr 3, 2019 at 5:34 PM Masahiro Yamada > wrote: >> >> $(call if_changed,...) must have FORCE as a prerequisite. >> >> Signed-off-by: Masahiro Yamada >> --- > > Ping? Sorry, I'm really busy and taking a sho

[PATCH v4 26/27] userfaultfd: selftests: refactor statistics

2019-04-25 Thread Peter Xu
Introduce uffd_stats structure for statistics of the self test, at the same time refactor the code to always pass in the uffd_stats for either read() or poll() typed fault handling threads instead of using two different ways to return the statistic results. No functional change. With the new stru

[PATCH v4 27/27] userfaultfd: selftests: add write-protect test

2019-04-25 Thread Peter Xu
This patch adds uffd tests for write protection. Instead of introducing new tests for it, let's simply squashing uffd-wp tests into existing uffd-missing test cases. Changes are: (1) Bouncing tests We do the write-protection in two ways during the bouncing test: - By using UFFDIO_COPY_MODE

[PATCH v4 25/27] userfaultfd: wp: declare _UFFDIO_WRITEPROTECT conditionally

2019-04-25 Thread Peter Xu
Only declare _UFFDIO_WRITEPROTECT if the user specified UFFDIO_REGISTER_MODE_WP and if all the checks passed. Then when the user registers regions with shmem/hugetlbfs we won't expose the new ioctl to them. Even with complete anonymous memory range, we'll only expose the new WP ioctl bit if the r

[PATCH v4 22/27] userfaultfd: wp: enabled write protection in userfaultfd API

2019-04-25 Thread Peter Xu
From: Shaohua Li Now it's safe to enable write protection in userfaultfd API Cc: Andrea Arcangeli Cc: Pavel Emelyanov Cc: Rik van Riel Cc: Kirill A. Shutemov Cc: Mel Gorman Cc: Hugh Dickins Cc: Johannes Weiner Signed-off-by: Shaohua Li Signed-off-by: Andrea Arcangeli Reviewed-by: Jerome

[PATCH v4 19/27] userfaultfd: introduce helper vma_find_uffd

2019-04-25 Thread Peter Xu
We've have multiple (and more coming) places that would like to find a userfault enabled VMA from a mm struct that covers a specific memory range. This patch introduce the helper for it, meanwhile apply it to the code. Suggested-by: Mike Rapoport Reviewed-by: Jerome Glisse Reviewed-by: Mike Rap

[PATCH v4 13/27] mm: introduce do_wp_page_cont()

2019-04-25 Thread Peter Xu
The userfaultfd handling in do_wp_page() is very special comparing to the rest of the function because it only postpones the real handling of the page fault to the userspace program. Isolate the handling part of do_wp_page() into a new function called do_wp_page_cont() so that we can use it somewh

[PATCH v4 24/27] userfaultfd: wp: UFFDIO_REGISTER_MODE_WP documentation update

2019-04-25 Thread Peter Xu
From: Martin Cracauer Adds documentation about the write protection support. Signed-off-by: Martin Cracauer Signed-off-by: Andrea Arcangeli [peterx: rewrite in rst format; fixups here and there] Reviewed-by: Jerome Glisse Reviewed-by: Mike Rapoport Signed-off-by: Peter Xu --- Documentation

[PATCH v4 21/27] userfaultfd: wp: add the writeprotect API to userfaultfd ioctl

2019-04-25 Thread Peter Xu
From: Andrea Arcangeli v1: From: Shaohua Li v2: cleanups, remove a branch. [peterx writes up the commit message, as below...] This patch introduces the new uffd-wp APIs for userspace. Firstly, we'll allow to do UFFDIO_REGISTER with write protection tracking using the new UFFDIO_REGISTER_MODE

[PATCH v4 23/27] userfaultfd: wp: don't wake up when doing write protect

2019-04-25 Thread Peter Xu
It does not make sense to try to wake up any waiting thread when we're write-protecting a memory region. Only wake up when resolving a write protected page fault. Reviewed-by: Mike Rapoport Signed-off-by: Peter Xu --- fs/userfaultfd.c | 13 - 1 file changed, 8 insertions(+), 5 dele

[PATCH v4 15/27] userfaultfd: wp: drop _PAGE_UFFD_WP properly when fork

2019-04-25 Thread Peter Xu
UFFD_EVENT_FORK support for uffd-wp should be already there, except that we should clean the uffd-wp bit if uffd fork event is not enabled. Detect that to avoid _PAGE_UFFD_WP being set even if the VMA is not being tracked by VM_UFFD_WP. Do this for both small PTEs and huge PMDs. Reviewed-by: Jer

[PATCH v4 20/27] userfaultfd: wp: support write protection for userfault vma range

2019-04-25 Thread Peter Xu
From: Shaohua Li Add API to enable/disable writeprotect a vma range. Unlike mprotect, this doesn't split/merge vmas. Cc: Andrea Arcangeli Cc: Rik van Riel Cc: Kirill A. Shutemov Cc: Mel Gorman Cc: Hugh Dickins Cc: Johannes Weiner Signed-off-by: Shaohua Li Signed-off-by: Andrea Arcangeli

[PATCH v4 18/27] khugepaged: skip collapse if uffd-wp detected

2019-04-25 Thread Peter Xu
Don't collapse the huge PMD if there is any userfault write protected small PTEs. The problem is that the write protection is in small page granularity and there's no way to keep all these write protection information if the small pages are going to be merged into a huge PMD. The same thing needs

[PATCH v4 17/27] userfaultfd: wp: support swap and page migration

2019-04-25 Thread Peter Xu
For either swap and page migration, we all use the bit 2 of the entry to identify whether this entry is uffd write-protected. It plays a similar role as the existing soft dirty bit in swap entries but only for keeping the uffd-wp tracking for a specific PTE/PMD. Something special here is that whe

[PATCH v4 16/27] userfaultfd: wp: add pmd_swp_*uffd_wp() helpers

2019-04-25 Thread Peter Xu
Adding these missing helpers for uffd-wp operations with pmd swap/migration entries. Reviewed-by: Jerome Glisse Reviewed-by: Mike Rapoport Signed-off-by: Peter Xu --- arch/x86/include/asm/pgtable.h | 15 +++ include/asm-generic/pgtable_uffd.h | 15 +++ 2 files chang

[PATCH v4 14/27] userfaultfd: wp: handle COW properly for uffd-wp

2019-04-25 Thread Peter Xu
This allows uffd-wp to support write-protected pages for COW. For example, the uffd write-protected PTE could also be write-protected by other usages like COW or zero pages. When that happens, we can't simply set the write bit in the PTE since otherwise it'll change the content of every single re

[PATCH v4 12/27] userfaultfd: wp: apply _PAGE_UFFD_WP bit

2019-04-25 Thread Peter Xu
Firstly, introduce two new flags MM_CP_UFFD_WP[_RESOLVE] for change_protection() when used with uffd-wp and make sure the two new flags are exclusively used. Then, - For MM_CP_UFFD_WP: apply the _PAGE_UFFD_WP bit and remove _PAGE_RW when a range of memory is write protected by uffd - For

[PATCH v4 10/27] userfaultfd: wp: add UFFDIO_COPY_MODE_WP

2019-04-25 Thread Peter Xu
From: Andrea Arcangeli This allows UFFDIO_COPY to map pages write-protected. Signed-off-by: Andrea Arcangeli [peterx: switch to VM_WARN_ON_ONCE in mfill_atomic_pte; add brackets around "dst_vma->vm_flags & VM_WRITE"; fix wordings in comments and commit messages] Reviewed-by: Jerome Glisse Re

[PATCH v4 11/27] mm: merge parameters for change_protection()

2019-04-25 Thread Peter Xu
change_protection() was used by either the NUMA or mprotect() code, there's one parameter for each of the callers (dirty_accountable and prot_numa). Further, these parameters are passed along the calls: - change_protection_range() - change_p4d_range() - change_pud_range() - change_pmd_ran

[PATCH v4 06/27] userfaultfd: wp: add helper for writeprotect check

2019-04-25 Thread Peter Xu
From: Shaohua Li add helper for writeprotect check. Will use it later. Cc: Andrea Arcangeli Cc: Pavel Emelyanov Cc: Rik van Riel Cc: Kirill A. Shutemov Cc: Mel Gorman Cc: Hugh Dickins Cc: Johannes Weiner Signed-off-by: Shaohua Li Signed-off-by: Andrea Arcangeli Reviewed-by: Jerome Gliss

[PATCH v4 09/27] userfaultfd: wp: userfaultfd_pte/huge_pmd_wp() helpers

2019-04-25 Thread Peter Xu
From: Andrea Arcangeli Implement helpers methods to invoke userfaultfd wp faults more selectively: not only when a wp fault triggers on a vma with vma->vm_flags VM_UFFD_WP set, but only if the _PAGE_UFFD_WP bit is set in the pagetable too. Signed-off-by: Andrea Arcangeli Reviewed-by: Jerome Gli

[PATCH v4 08/27] userfaultfd: wp: add WP pagetable tracking to x86

2019-04-25 Thread Peter Xu
From: Andrea Arcangeli Accurate userfaultfd WP tracking is possible by tracking exactly which virtual memory ranges were writeprotected by userland. We can't relay only on the RW bit of the mapped pagetable because that information is destroyed by fork() or KSM or swap. If we were to relay on tha

[PATCH v4 04/27] mm: allow VM_FAULT_RETRY for multiple times

2019-04-25 Thread Peter Xu
The idea comes from a discussion between Linus and Andrea [1]. Before this patch we only allow a page fault to retry once. We achieved this by clearing the FAULT_FLAG_ALLOW_RETRY flag when doing handle_mm_fault() the second time. This was majorly used to avoid unexpected starvation of the system

[PATCH v4 07/27] userfaultfd: wp: hook userfault handler to write protection fault

2019-04-25 Thread Peter Xu
From: Andrea Arcangeli There are several cases write protection fault happens. It could be a write to zero page, swaped page or userfault write protected page. When the fault happens, there is no way to know if userfault write protect the page before. Here we just blindly issue a userfault notifi

[PATCH v4 02/27] mm: userfault: return VM_FAULT_RETRY on signals

2019-04-25 Thread Peter Xu
The idea comes from the upstream discussion between Linus and Andrea: https://lkml.org/lkml/2017/10/30/560 A summary to the issue: there was a special path in handle_userfault() in the past that we'll return a VM_FAULT_NOPAGE when we detected non-fatal signals when waiting for userfault handlin

[PATCH v4 01/27] mm: gup: rename "nonblocking" to "locked" where proper

2019-04-25 Thread Peter Xu
There's plenty of places around __get_user_pages() that has a parameter "nonblocking" which does not really mean that "it won't block" (because it can really block) but instead it shows whether the mmap_sem is released by up_read() during the page fault handling mostly when VM_FAULT_RETRY is return

[PATCH v4 03/27] userfaultfd: don't retake mmap_sem to emulate NOPAGE

2019-04-25 Thread Peter Xu
The idea comes from the upstream discussion between Linus and Andrea: https://lkml.org/lkml/2017/10/30/560 A summary to the issue: there was a special path in handle_userfault() in the past that we'll return a VM_FAULT_NOPAGE when we detected non-fatal signals when waiting for userfault handling.

[PATCH v4 05/27] mm: gup: allow VM_FAULT_RETRY for multiple times

2019-04-25 Thread Peter Xu
This is the gup counterpart of the change that allows the VM_FAULT_RETRY to happen for more than once. Reviewed-by: Jerome Glisse Signed-off-by: Peter Xu --- mm/gup.c | 17 + mm/hugetlb.c | 6 -- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/mm/gup.c b

[PATCH v4 00/27] userfaultfd: write protection support

2019-04-25 Thread Peter Xu
This series implements initial write protection support for userfaultfd. Currently both shmem and hugetlbfs are not supported yet, but only anonymous memory. This is the 4nd version of it. The latest code can also be found at: https://github.com/xzpeter/linux/tree/uffd-wp-merged v4 changelog

Re: [PATCH 2/2] pinctrl: tegra: Add Tegra194 pinmux driver

2019-04-25 Thread Vidya Sagar
On 4/26/2019 8:26 AM, Krishna Yarlagadda wrote: Tegra194 has PCIE L5 rst and clkreq pins which need to be controlled dynamically at runtime. This driver supports change pinmux for these pins. Pinmux for rest of the pins is set statically by bootloader and will not be changed by this driver Signe

Re: [PATCH] tty: Don't force RISCV SBI console as preferred console

2019-04-25 Thread Atish Patra
On 4/25/19 6:35 AM, Anup Patel wrote: The Linux kernel will auto-disables all boot consoles whenever it gets a preferred real console. Currently on RISC-V systems, if we have a real console which is not RISCV SBI console then boot consoles (such as earlycon=sbi) are not auto-disabled when a real

Re: [PATCH] kernel/sched: run nohz idle load balancer on HK_FLAG_MISC CPUs

2019-04-25 Thread Nicholas Piggin
Peter Zijlstra's on April 25, 2019 9:56 pm: > On Fri, Apr 12, 2019 at 02:26:13PM +1000, Nicholas Piggin wrote: >> The nohz idle balancer runs on the lowest idle CPU. This can >> interfere with isolated CPUs, so confine it to HK_FLAG_MISC >> housekeeping CPUs. >> >> HK_FLAG_SCHED is not used for th

Re: [PATCH] staging: most: protect potential string overflow

2019-04-25 Thread Bo YU
On Wed, Apr 24, 2019 at 10:55 PM Dan Carpenter wrote: > > On Mon, Apr 22, 2019 at 10:20:18PM -0400, Bo YU wrote: > > There maybe cause potential string overflow issue due to use > > strcpy without checking the length > > > > Detected By CoversityScan CID# 1444760 > > > > Fixes: 131ac62253dba:(stag

Re: [PATCH v2 4/9] powerpc/powernv/npu: use helper pci_dev_id

2019-04-25 Thread Alexey Kardashevskiy
On 25/04/2019 05:14, Heiner Kallweit wrote: > Use new helper pci_dev_id() to simplify the code. > > Signed-off-by: Heiner Kallweit Reviewed-by: Alexey Kardashevskiy > --- > arch/powerpc/platforms/powernv/npu-dma.c | 14 ++ > 1 file changed, 6 insertions(+), 8 deletions(-) >

Re: [PATCH 1/2] clk: imx7ulp: update nic1_bus_clk parent info

2019-04-25 Thread Shawn Guo
On Thu, Apr 25, 2019 at 05:03:31PM -0700, Stephen Boyd wrote: > Quoting Anson Huang (2019-04-24 22:19:07) > > Since i.MX7ULP B0 chip, nic1_bus_clk's parent is changed to > > from nic0_clk directly, update it accordingly. > > > > Signed-off-by: Anson Huang > > Looks ok. Shawn, will you pick it up

Re: [PATCH v2 03/12] arm64: dts: tegra210: set thermtrip

2019-04-25 Thread Wei Ni
Hi Thierry, Eduardo have picked this series to his branch except dts patches. Please check "git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal.git" in the linus branch. They will be merged in the next major kernel release. Could you please take these three dts changes? Here i

Re: [RFC PATCH v5 4/4] x86/acrn: Add hypercall for ACRN guest

2019-04-25 Thread Zhao, Yakui
On 2019年04月25日 19:00, Borislav Petkov wrote: On Thu, Apr 25, 2019 at 06:16:02PM +0800, Zhao, Yakui wrote: The parameter register for the VMCALL is predefined in ACRN hypervisor. Now the R8 is used to pass the hcall_id. It seems that there is no special constraint for R8~R15. So the explicit r

[PATCH] ASoC: fsl_sai: Add missing return 0 in remove()

2019-04-25 Thread Nicolin Chen
Build warning being reported: sound/soc/fsl/fsl_sai.c: In function 'fsl_sai_remove': sound/soc/fsl/fsl_sai.c:921:1: warning: no return statement in function returning non-void [-Wreturn-type] So this patch just adds a "return 0" to fix it. Fixes: 812ad463e089 ("ASoC: fsl_sai: Add supp

[PATCH v2] KVM: x86: Add Intel CPUID.1F cpuid emulation support

2019-04-25 Thread Like Xu
Some new systems have multiple software-visible die within each package. Add support to expose Intel V2 Extended Topology Enumeration Leaf CPUID.1F. Co-developed-by: Xiaoyao Li Signed-off-by: Xiaoyao Li Signed-off-by: Like Xu --- ==changelog== v2: - Apply cpuid.1f check rule on Intel SDM page

[PATCH v3] sound: isa: gus: fix misuse of %x

2019-04-25 Thread Fuqian Huang
Pointers should be printed with %p or %px rather than cast to long type and printed with %lx. Drop the address printing. Signed-off-by: Fuqian Huang --- sound/isa/gus/gus_mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/isa/gus/gus_mem.c b/sound/isa/gus/gus_mem.c i

Re: linux-next: build warning after merge of the sound-asoc tree

2019-04-25 Thread Nicolin Chen
On Fri, Apr 26, 2019 at 01:05:49PM +1000, Stephen Rothwell wrote: > Hi all, > > After merging the sound-asoc tree, today's linux-next build (arm > multi_v7_defconfig) produced this warning: > > sound/soc/fsl/fsl_sai.c: In function 'fsl_sai_remove': > sound/soc/fsl/fsl_sai.c:921:1: warning: no ret

linux-next: build warning after merge of the sound-asoc tree

2019-04-25 Thread Stephen Rothwell
Hi all, After merging the sound-asoc tree, today's linux-next build (arm multi_v7_defconfig) produced this warning: sound/soc/fsl/fsl_sai.c: In function 'fsl_sai_remove': sound/soc/fsl/fsl_sai.c:921:1: warning: no return statement in function returning non-void [-Wreturn-type] } ^ Introduced

Zdravstvuyte! Vas interesuyut kliyentskiye bazy dannykh?

2019-04-25 Thread linux-kernel
Zdravstvuyte! Vas interesuyut kliyentskiye bazy dannykh?

Re: Re: Re: Re: Re: [RFC][PATCH 2/5] mips/atomic: Fix loongson_llsc_mb() wreckage

2019-04-25 Thread huangpei
> -原始邮件- > 发件人: "Peter Zijlstra" > 发送时间: 2019-04-25 21:31:05 (星期四) > 收件人: huang...@loongson.cn > 抄送: "Paul Burton" , "st...@rowland.harvard.edu" > , "aki...@gmail.com" , > "andrea.pa...@amarulasolutions.com" , > "boqun.f...@gmail.com" , "dlus...@nvidia.com" > , "dhowe...@redhat.com"

[PATCH 1/2] dt-binding: Tegra194 pinctrl support

2019-04-25 Thread Krishna Yarlagadda
Add new compatible string and other fields used in pinctrl driver for Tegra194 in nvidia,tegra210-pinmux.txt Signed-off-by: Krishna Yarlagadda --- .../bindings/pinctrl/nvidia,tegra210-pinmux.txt| 43 +++--- 1 file changed, 38 insertions(+), 5 deletions(-) diff --git a/Docum

[PATCH 2/2] pinctrl: tegra: Add Tegra194 pinmux driver

2019-04-25 Thread Krishna Yarlagadda
Tegra194 has PCIE L5 rst and clkreq pins which need to be controlled dynamically at runtime. This driver supports change pinmux for these pins. Pinmux for rest of the pins is set statically by bootloader and will not be changed by this driver Signed-off-by: Krishna Yarlagadda Signed-off-by: Sures

Re: [PATCH] bcache: avoid clang -Wunintialized warning

2019-04-25 Thread Coly Li
On 2019/4/26 2:08 上午, Nathan Chancellor wrote: > On Fri, Mar 22, 2019 at 03:35:00PM +0100, Arnd Bergmann wrote: >> clang has identified a code path in which it thinks a >> variable may be unused: >> >> drivers/md/bcache/alloc.c:333:4: error: variable 'bucket' is used >> uninitialized whenever 'if'

RE: [RFC PATCH 0/5] New fallback workflow for heterogeneous memory system

2019-04-25 Thread Du, Fan
>-Original Message- >From: Dan Williams [mailto:dan.j.willi...@intel.com] >Sent: Thursday, April 25, 2019 11:43 PM >To: Du, Fan >Cc: Michal Hocko ; a...@linux-foundation.org; Wu, >Fengguang ; Hansen, Dave >; xishi.qiuxi...@alibaba-inc.com; Huang, Ying >; linux...@kvack.org; linux-kernel@

  1   2   3   4   5   6   7   8   9   10   >