[PATCH RFC 14/24] userfaultfd: wp: apply _PAGE_UFFD_WP bit

2019-01-21 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 -

[PATCH RFC 13/24] mm: merge parameters for change_protection()

2019-01-21 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() -

[PATCH RFC 19/24] userfaultfd: wp: support swap and page migration

2019-01-21 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

[PATCH RFC 17/24] userfaultfd: wp: drop _PAGE_UFFD_WP properly when fork

2019-01-21 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. Signed-off-by:

[PATCH RFC 18/24] userfaultfd: wp: add pmd_swp_*uffd_wp() helpers

2019-01-21 Thread Peter Xu
Adding these missing helpers for uffd-wp operations with pmd swap/migration entries. Signed-off-by: Peter Xu --- arch/x86/include/asm/pgtable.h | 15 +++ include/asm-generic/pgtable_uffd.h | 15 +++ 2 files changed, 30 insertions(+) diff --git

[PATCH v3 3/6] i2c: mediatek: remove completion_done()

2019-01-21 Thread qii wang
Completion_done() is useless when we don't use its return value, so we remove it. Signed-off-by: qii wang --- drivers/i2c/busses/i2c-mt65xx.c |2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/i2c/busses/i2c-mt65xx.c b/drivers/i2c/busses/i2c-mt65xx.c index 7396449..660de1e 100644

[PATCH v3 1/6] dt-bindings: i2c: Add Mediatek MT7629 i2c binding

2019-01-21 Thread qii wang
Add MT7629 i2c binding to binding file. Signed-off-by: qii wang Reviewed-by: Rob Herring --- Documentation/devicetree/bindings/i2c/i2c-mtk.txt |1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/i2c/i2c-mtk.txt

[PATCH v3 2/6] i2c: mediatek: speeds is replaced by macros definitions

2019-01-21 Thread qii wang
Different speeds have been defined by macros, so we use macros definitions. Signed-off-by: qii wang Reviewed-by: Nicolas Boichat --- drivers/i2c/busses/i2c-mt65xx.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/i2c/busses/i2c-mt65xx.c

[PATCH v3 6/6] i2c: mediatek: Add i2c support for MediaTek MT8183

2019-01-21 Thread qii wang
Add i2c compatible for MT8183. Compare to 2712 i2c controller, MT8183 has different registers, offsets, clock, and share i3c controller. Signed-off-by: qii wang --- drivers/i2c/busses/i2c-mt65xx.c | 127 --- 1 file changed, 120 insertions(+), 7 deletions(-)

[PATCH RFC 22/24] userfaultfd: wp: UFFDIO_REGISTER_MODE_WP documentation update

2019-01-21 Thread Peter Xu
From: Martin Cracauer Adds documentation about the write protection support. Signed-off-by: Andrea Arcangeli [peterx: rewrite in rst format; fixups here and there] Signed-off-by: Peter Xu --- Documentation/admin-guide/mm/userfaultfd.rst | 51 1 file changed, 51

[PATCH RFC 20/24] userfaultfd: wp: don't wake up when doing write protect

2019-01-21 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. Signed-off-by: Peter Xu --- fs/userfaultfd.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git

[PATCH RFC 23/24] userfaultfd: selftests: refactor statistics

2019-01-21 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

[PATCH RFC 21/24] khugepaged: skip collapse if uffd-wp detected

2019-01-21 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

Re: [PATCH v3 2/2] mtd: spi-nor: cadence-quadspi: Add support for Octal SPI controller

2019-01-21 Thread Vignesh R
On 20/01/19 8:58 PM, tudor.amba...@microchip.com wrote: > Vignesh, > > On 01/20/2019 04:56 PM, tudor.amba...@microchip.com wrote: >> Looks good. > > one more thing: in cqspi_read_setup() I see that the dummy cycles are adjusted > if (f_pdata->inst_width != CQSPI_INST_TYPE_QUAD). > > Should

[PATCH v3 4/6] i2c: mediatek: Add offsets array for new i2c registers

2019-01-21 Thread qii wang
New i2c registers would have different offsets, so we use different offsets array to distinguish different i2c registers version. Signed-off-by: qii wang Reviewed-by: Sean Wang Reviewed-by: Nicolas Boichat --- drivers/i2c/busses/i2c-mt65xx.c | 163 +-- 1

Re: [BUG] USB: atm: Licensing conflict

2019-01-21 Thread Greg KH
On Fri, Jan 18, 2019 at 11:53:18AM +0100, Thomas Gleixner wrote: > The addition of SPDX identifiers to the USB subsystem introduced a license > conflict. The driver is dual licensed under GPL v2 and BSD 2 clause > according to the license texts in the file. But even the GPL v2 licensing > of this

[PATCH RFC 24/24] userfaultfd: selftests: add write-protect test

2019-01-21 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

[PATCH v3 0/6] add i2c support for mt7629 and mt8183

2019-01-21 Thread qii wang
This series are based on 5.0-rc1 and provide six patches to support mt7629 and mt8183 IC. Main changes compared to v2: --update commit message --add Reviewed-by from Rob Herring, Nicolas and Sean Main changes compared to v1: --remove useless dt-binding for mt7629 --split a patch into two(2/6

[PATCH v3 5/6] dt-bindings: i2c: Add Mediatek MT8183 i2c binding

2019-01-21 Thread qii wang
Add MT8183 i2c binding to binding file. Compare to 2712 i2c controller, MT8183 has different registers, offsets, clock, and share i3c controller. Signed-off-by: qii wang Reviewed-by: Rob Herring --- Documentation/devicetree/bindings/i2c/i2c-mtk.txt |6 -- 1 file changed, 4

Re: [RFC] Provide in-kernel headers for making it easy to extend the kernel

2019-01-21 Thread hpa
On January 20, 2019 5:45:53 PM PST, Joel Fernandes wrote: >On Sun, Jan 20, 2019 at 01:58:15PM -0800, h...@zytor.com wrote: >> On January 20, 2019 8:10:03 AM PST, Joel Fernandes > wrote: >> >On Sat, Jan 19, 2019 at 11:01:13PM -0800, h...@zytor.com wrote: >> >> On January 19, 2019 2:36:06 AM PST,

[PATCH] gpio: sprd: Remove unused irq trigger setting

2019-01-21 Thread Baolin Wang
The Spreadtrum PMIC interrupt controller has no registers to set irq trigger type, since it is always high level trigger. That means the PMIC EIC controller as a child device of PMIC INTC does not need to set the trigger type, so remove it. Signed-off-by: Baolin Wang ---

Re: [RFC] Provide in-kernel headers for making it easy to extend the kernel

2019-01-21 Thread hpa
On January 20, 2019 8:10:03 AM PST, Joel Fernandes wrote: >On Sat, Jan 19, 2019 at 11:01:13PM -0800, h...@zytor.com wrote: >> On January 19, 2019 2:36:06 AM PST, Greg KH > wrote: >> >On Sat, Jan 19, 2019 at 02:28:00AM -0800, Christoph Hellwig wrote: >> >> This seems like a pretty horrible idea

Re: [PATCH RFC 1/1] arm64: Use PSCI calls for CPU stop when hotplug is supported

2019-01-21 Thread Pramod Kumar
On Mon, Jan 21, 2019 at 11:30 AM Pramod Kumar wrote: > > > > On Mon, Jan 21, 2019 at 11:28 AM Pramod Kumar > wrote: >> >> Hi Sudeep, >> >> Thanks for having a glance on the patch. Please see my reply in line. >> >> Regards, >> Pramod >> >> On Fri, Jan 18, 2019 at 5:02 PM Sudeep Holla wrote:

Re: [PATCH v2] Poll for monitored tasks being alive in fork mode

2019-01-21 Thread Jin, Yao
Hi Arnaldo, Is this patch acceptable? Thanks Jin Yao On 1/7/2019 5:05 PM, Jiri Olsa wrote: On Mon, Jan 07, 2019 at 09:00:50AM +0800, Jin Yao wrote: Following test shows the stat keeps running even if no longer task to monitor (mgen exits at ~5s). perf stat -e cycles -p `pgrep mgen` -I1000

Re: [PATCH v4 3/3] fs: let filldir_t return bool instead of an error code

2019-01-21 Thread Dave Chinner
On Fri, Jan 18, 2019 at 05:14:40PM +0100, Jann Horn wrote: > As Al Viro pointed out, many filldir_t functions return error codes, but > all callers of filldir_t functions just check whether the return value is > non-zero (to determine whether to continue reading the directory); more > precise

Re: [RFC net-next] net: Z-Wave driver prototype

2019-01-21 Thread Andreas Färber
Hi, Am 20.01.19 um 19:56 schrieb Randy Dunlap: > On 1/20/19 10:33 AM, Andreas Färber wrote: >> Tested as external kernel module, so Kconfig/Makefile integration missing. [...] >> diff --git a/drivers/net/zwave/Makefile b/drivers/net/zwave/Makefile >> new file mode 100644 >> index

[PATCH v1 1/6] usb: fsl: Set USB_EN bit to select ULPI phy

2019-01-21 Thread Yinbo Zhu
From: Nikhil Badola Set USB_EN bit to select ULPI phy for USB controller version 2.5 Signed-off-by: Nikhil Badola Signed-off-by: yinbo.zhu --- drivers/usb/host/ehci-fsl.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/drivers/usb/host/ehci-fsl.c

[PATCH v1 6/6] usb :fsl: Change string format for errata property

2019-01-21 Thread Yinbo Zhu
From: Nikhil Badola Remove USB errata checking code from driver. Applicability of erratum is retrieved by reading corresponding property in device tree. This property is written during device tree fixup. Signed-off-by: Ramneek Mehresh Signed-off-by: Nikhil Badola Signed-off-by: yinbo.zhu ---

[PATCH v2 02/21] powerpc: use memblock functions returning virtual address

2019-01-21 Thread Mike Rapoport
From: Christophe Leroy Since only the virtual address of allocated blocks is used, lets use functions returning directly virtual address. Those functions have the advantage of also zeroing the block. [ MR: - updated error message in alloc_stack() to be more verbose - convereted several

[PATCH v1 4/6] usb: linux/fsl_device: Add platform member has_fsl_erratum_a006918

2019-01-21 Thread Yinbo Zhu
This patch is to add member has_fsl_erratum_a006918 in platform data Signed-off-by: Yinbo Zhu --- include/linux/fsl_devices.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/include/linux/fsl_devices.h b/include/linux/fsl_devices.h index 60cef82..7ea53c8 100644 ---

[PATCH v1 3/6] usb: host: Stops USB controller init if PLL fails to lock

2019-01-21 Thread Yinbo Zhu
From: yinbo.zhu USB erratum-A006918 workaround tries to start internal PHY inside uboot (when PLL fails to lock). However, if the workaround also fails, then USB initialization is also stopped inside Linux. Erratum-A006918 workaround failure creates "fsl,erratum_a006918" node in device-tree.

[PATCH v2 01/21] openrisc: prefer memblock APIs returning virtual address

2019-01-21 Thread Mike Rapoport
The allocation of the page tables memory in openrics uses memblock_phys_alloc() and then converts the returned physical address to virtual one. Use memblock_alloc_raw() and add a panic() if the allocation fails. Signed-off-by: Mike Rapoport --- arch/openrisc/mm/init.c | 5 - 1 file changed,

Re: [PATCH] jffs2: check dstlen for jffs2_zlib_compress()

2019-01-21 Thread Richard Weinberger
On Mon, Jan 21, 2019 at 1:21 AM Yang Yang wrote: > > KASAN reports a BUG when download file in jffs2 filesystem. > The board name is nxp-ls1043ardb-ls1043a. > It is because when dstlen == 1, cpage_out will write array out of bounds. > Actually, there's no meaning for jffs2_zlib_compress() to

[PATCH v2 00/21] Refine memblock API

2019-01-21 Thread Mike Rapoport
Hi, Current memblock API is quite extensive and, which is more annoying, duplicated. Except the low-level functions that allow searching for a free memory region and marking it as reserved, memblock provides three (well, two and a half) sets of functions to allocate memory. There are several

[PATCH v2 06/21] memblock: memblock_phys_alloc_try_nid(): don't panic

2019-01-21 Thread Mike Rapoport
The memblock_phys_alloc_try_nid() function tries to allocate memory from the requested node and then falls back to allocation from any node in the system. The memblock_alloc_base() fallback used by this function panics if the allocation fails. Replace the memblock_alloc_base() fallback with the

[PATCH v2 05/21] memblock: emphasize that memblock_alloc_range() returns a physical address

2019-01-21 Thread Mike Rapoport
Rename memblock_alloc_range() to memblock_phys_alloc_range() to emphasize that it returns a physical address. While on it, remove the 'enum memblock_flags' parameter from this function as its only user anyway sets it to MEMBLOCK_NONE, which is the default for the most of memblock allocations.

[PATCH v2 03/21] memblock: replace memblock_alloc_base(ANYWHERE) with memblock_phys_alloc

2019-01-21 Thread Mike Rapoport
The calls to memblock_alloc_base(size, align, MEMBLOCK_ALLOC_ANYWHERE) and memblock_phys_alloc(size, align) are equivalent as both try to allocate 'size' bytes with 'align' alignment anywhere in the memory and panic if hte allocation fails. The conversion is done using the following semantic

Re: [PATCH v5] coding-style: Clarify the expectations around bool

2019-01-21 Thread Jonathan Corbet
On Fri, 18 Jan 2019 15:50:47 -0700 Jason Gunthorpe wrote: > There has been some confusion since checkpatch started warning about bool > use in structures, and people have been avoiding using it. > > Many people feel there is still a legitimate place for bool in structures, > so provide some

[PATCH v2 08/21] memblock: drop __memblock_alloc_base()

2019-01-21 Thread Mike Rapoport
The __memblock_alloc_base() function tries to allocate a memory up to the limit specified by its max_addr parameter. Depending on the value of this parameter, the __memblock_alloc_base() can is replaced with the appropriate memblock_phys_alloc*() variant. Signed-off-by: Mike Rapoport Acked-by:

[PATCH v2 07/21] memblock: memblock_phys_alloc(): don't panic

2019-01-21 Thread Mike Rapoport
Make the memblock_phys_alloc() function an inline wrapper for memblock_phys_alloc_range() and update the memblock_phys_alloc() callers to check the returned value and panic in case of error. Signed-off-by: Mike Rapoport --- arch/arm/mm/init.c | 4 arch/arm64/mm/mmu.c

[PATCH v2 12/21] arch: use memblock_alloc() instead of memblock_alloc_from(size, align, 0)

2019-01-21 Thread Mike Rapoport
The last parameter of memblock_alloc_from() is the lower limit for the memory allocation. When it is 0, the call is equivalent to memblock_alloc(). Signed-off-by: Mike Rapoport Acked-by: Paul Burton # MIPS part --- arch/alpha/kernel/core_cia.c | 2 +- arch/alpha/kernel/pci_iommu.c | 4 ++--

[PATCH] input: Fix the CONFIG_SPARC64 mixup

2019-01-21 Thread Deepa Dinamani
Arnd Bergmann pointed out that CONFIG_* cannot be used in a uapi header. Override with an equivalent conditional. Fixes: 2e746942ebac ("Input: input_event - provide override for sparc64") Fixes: 152194fe9c3f ("Input: extend usable life of event timestamps to 2106 on 32 bit systems")

[PATCH v2 13/21] arch: don't memset(0) memory returned by memblock_alloc()

2019-01-21 Thread Mike Rapoport
memblock_alloc() already clears the allocated memory, no point in doing it twice. Signed-off-by: Mike Rapoport Acked-by: Geert Uytterhoeven # m68k --- arch/c6x/mm/init.c | 1 - arch/h8300/mm/init.c| 1 - arch/ia64/kernel/mca.c | 2 -- arch/m68k/mm/mcfmmu.c | 1 -

[PATCH v1 5/6] usb: linux/fsl_device: Add platform member has_fsl_erratum_14

2019-01-21 Thread Yinbo Zhu
This patch is to add member has_fsl_erratum_14 in platform data Signed-off-by: Yinbo Zhu --- include/linux/fsl_devices.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/include/linux/fsl_devices.h b/include/linux/fsl_devices.h index 7ea53c8..5c21a3a 100644 ---

[PATCH v2 18/21] swiotlb: add checks for the return value of memblock_alloc*()

2019-01-21 Thread Mike Rapoport
Add panic() calls if memblock_alloc() returns NULL. The panic() format duplicates the one used by memblock itself and in order to avoid explosion with long parameters list replace open coded allocation size calculations with a local variable. Signed-off-by: Mike Rapoport ---

[PATCH v2 17/21] init/main: add checks for the return value of memblock_alloc*()

2019-01-21 Thread Mike Rapoport
Add panic() calls if memblock_alloc() returns NULL. The panic() format duplicates the one used by memblock itself and in order to avoid explosion with long parameters list replace open coded allocation size calculations with a local variable. Signed-off-by: Mike Rapoport --- init/main.c | 26

Re: [PATCH] mm: Expose lazy vfree pages to control via sysctl

2019-01-21 Thread Ashish Mhetre
The issue is not seen on new kernel. This patch won't be needed. Thanks. On 06/01/19 2:12 PM, Ashish Mhetre wrote: Matthew, this issue was last reported in September 2018 on K4.9. I verified that the optimization patches mentioned by you were not present in our downstream kernel when we faced

[PATCH v2 19/21] treewide: add checks for the return value of memblock_alloc*()

2019-01-21 Thread Mike Rapoport
Add check for the return value of memblock_alloc*() functions and call panic() in case of error. The panic message repeats the one used by panicing memblock allocators with adjustment of parameters to include only relevant ones. The replacement was mostly automated with semantic patches like the

[PATCH v2 20/21] memblock: memblock_alloc_try_nid: don't panic

2019-01-21 Thread Mike Rapoport
As all the memblock_alloc*() users are now checking the return value and panic() in case of error, the panic() call can be removed from the core memblock allocator, namely memblock_alloc_try_nid(). Signed-off-by: Mike Rapoport --- mm/memblock.c | 15 +-- 1 file changed, 5

[PATCH v2 21/21] memblock: drop memblock_alloc_*_nopanic() variants

2019-01-21 Thread Mike Rapoport
As all the memblock allocation functions return NULL in case of error rather than panic(), the duplicates with _nopanic suffix can be removed. Signed-off-by: Mike Rapoport Acked-by: Greg Kroah-Hartman --- arch/arc/kernel/unwind.c | 3 +-- arch/sh/mm/init.c | 2 +-

[PATCH v2 16/21] mm/percpu: add checks for the return value of memblock_alloc*()

2019-01-21 Thread Mike Rapoport
Add panic() calls if memblock_alloc() returns NULL. The panic() format duplicates the one used by memblock itself and in order to avoid explosion with long parameters list replace open coded allocation size calculations with a local variable. Signed-off-by: Mike Rapoport --- mm/percpu.c | 73

[PATCH v2 10/21] memblock: refactor internal allocation functions

2019-01-21 Thread Mike Rapoport
Currently, memblock has several internal functions with overlapping functionality. They all call memblock_find_in_range_node() to find free memory and then reserve the allocated range and mark it with kmemleak. However, there is difference in the allocation constraints and in fallback strategies.

Re: [PATCH v2 26/29] y2038: use time32 syscall names on 32-bit

2019-01-21 Thread Geert Uytterhoeven
Hi Arnd, On Fri, Jan 18, 2019 at 5:21 PM Arnd Bergmann wrote: > This is the big flip, where all 32-bit architectures set COMPAT_32BIT_TIME > abd use the _time32 system calls from the former compat layer instead and > of the system calls that take __kernel_timespec and similar arguments.

[PATCH v2 15/21] sparc: add checks for the return value of memblock_alloc*()

2019-01-21 Thread Mike Rapoport
Add panic() calls if memblock_alloc*() returns NULL. Most of the changes are simply addition of if(!ptr) panic(); statements after the calls to memblock_alloc*() variants. Exceptions are pcpu_populate_pte() and kernel_map_range() that were slightly refactored to

[PATCH v2 14/21] ia64: add checks for the return value of memblock_alloc*()

2019-01-21 Thread Mike Rapoport
Add panic() calls if memblock_alloc*() returns NULL. Most of the changes are simply addition of if(!ptr) panic(); statements after the calls to memblock_alloc*() variants. Exceptions are create_mem_map_page_table() and ia64_log_init() that were slightly refactored to

Re: [PATCHv7] x86/kdump: bugfix, make the behavior of crashkernel=X consistent with kaslr

2019-01-21 Thread Pingfan Liu
On Sat, Jan 19, 2019 at 9:25 AM Jerry Hoemann wrote: > > On Tue, Jan 15, 2019 at 04:07:03PM +0800, Pingfan Liu wrote: > > People reported a bug on a high end server with many pcie devices, where > > kernel bootup with crashkernel=384M, and kaslr is enabled. Even > > though we still see much

[PATCH v1 2/6] usb: phy: Workaround for USB erratum-A005728

2019-01-21 Thread Yinbo Zhu
From: Suresh Gupta PHY_CLK_VALID bit for UTMI PHY in USBDR does not set even if PHY is providing valid clock. Workaround for this involves resetting of PHY and check PHY_CLK_VALID bit multiple times. If PHY_CLK_VALID bit is still not set even after 5 retries, it would be safe to deaclare that

[PATCH v2 11/21] memblock: make memblock_find_in_range_node() and choose_memblock_flags() static

2019-01-21 Thread Mike Rapoport
These functions are not used outside memblock. Make them static. Signed-off-by: Mike Rapoport --- include/linux/memblock.h | 4 mm/memblock.c| 4 ++-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/include/linux/memblock.h b/include/linux/memblock.h index

Re: [PATCH] power: supply: isp1704: switch to gpiod API

2019-01-21 Thread Sebastian Reichel
Hi, On Thu, Dec 13, 2018 at 02:38:58AM +0100, Sebastian Reichel wrote: > This migrates isp1704 driver from old GPIO API to new descriptor > based GPIO API and drops useless platform data as a side-effect. > > Migration is simple, since all mainline users are DT based and > DT API does not

Re: [PATCH] power: supply: axp288_fuel_gauge: Change to use DEFINE_SHOW_ATTRIBUTE macro

2019-01-21 Thread Sebastian Reichel
Hi, On Thu, Nov 22, 2018 at 09:25:51AM -0500, Yangtao Li wrote: > Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. > > Signed-off-by: Yangtao Li > --- Thanks, queued to power-supply-next. Sorry for the delay, I missed this when I collected patches for the 5.0 kernel. -- Sebastian >

[RESEND PATCH V8 02/11] KVM: X86: Add arbitrary data pointer in kvm memslot iterator functions

2019-01-21 Thread Ahmed Abd El Mawgood
This will help sharing data into the slot_level_handler callback. In my case I need to a share a counter for the pages traversed to use it in some bitmap. Being able to send arbitrary memory pointer into the slot_level_handler callback made it easy. Signed-off-by: Ahmed Abd El Mawgood ---

Re: [PATCH v3 1/8] i2c: iproc: I2C read up to 255 bytes support

2019-01-21 Thread Ray Jui
On 1/17/2019 10:04 PM, Rayagonda Kokatanur wrote: > From: Shreesha Rajashekar > > Add support to allow I2C RX transfer up to 255 bytes. > > Signed-off-by: Rayagonda Kokatanur > Signed-off-by: Shreesha Rajashekar > --- > drivers/i2c/busses/i2c-bcm-iproc.c | 98 >

[PATCH v2 09/21] memblock: drop memblock_alloc_base()

2019-01-21 Thread Mike Rapoport
The memblock_alloc_base() function tries to allocate a memory up to the limit specified by its max_addr parameter and panics if the allocation fails. Replace its usage with memblock_phys_alloc_range() and make the callers check the return value and panic in case of error. Signed-off-by: Mike

Re: [PATCH] doc:process: add missing internal link in stable-kernel-rules

2019-01-21 Thread Jonathan Corbet
On Sun, 20 Jan 2019 12:16:29 +0100 Federico Vaga wrote: > Keep consistent the document. In the document, option references > are always linked, except for the one I fixed with this patch > > Signed-off-by: Federico Vaga Applied, thanks. jon

[PATCH v2 04/21] memblock: drop memblock_alloc_base_nid()

2019-01-21 Thread Mike Rapoport
The memblock_alloc_base_nid() is a oneliner wrapper for memblock_alloc_range_nid() without any side effect. Replace it's usage by the direct calls to memblock_alloc_range_nid(). Signed-off-by: Mike Rapoport --- include/linux/memblock.h | 3 --- mm/memblock.c| 15 --- 2

Re: [PATCH v2 15/16] block: sed-opal: don't repeat opal_discovery0 in each steps array

2019-01-21 Thread David Kozub
On Sat, 19 Jan 2019, Scott Bauer wrote: On Thu, Jan 17, 2019 at 09:31:55PM +, David Kozub wrote: - for (state = 0; !error && state < n_steps; state++) { - step = [state]; - - error = step->fn(dev, step->data); - if (error) { -

[GIT PULL] gcc-plugin fixes for v5.0-rc4

2019-01-21 Thread Kees Cook
Hi Linus, Please pull these gcc-plugin fixes for v5.0-rc4. Thanks! -Kees The following changes since commit 1c7fc5cbc33980acd13d668f1c8f0313d6ae9fd8: Linux 5.0-rc2 (2019-01-14 10:41:12 +1200) are available in the Git repository at:

Re: [PATCH v2 1/1] doc: networking: integrate scaling document into doc tree

2019-01-21 Thread Jonathan Corbet
On Fri, 18 Jan 2019 21:38:32 +0100 Otto Sabart wrote: > Convert scaling document into reStructuredText and add reference to > scaling document into main table of contents in network documentation. > > There are no semantic changes. > > There are no references to "scaling.txt" file. Whole

Re: [PATCH] mtd: rawnand: denali: remove ->erase hook

2019-01-21 Thread Boris Brezillon
On Mon, 21 Jan 2019 13:52:06 +0900 Masahiro Yamada wrote: > Commit f9ebd1bb4103 ("mtd: rawnand: Deprecate ->erase()") discouraged > the use of this hook, so I am happy to follow the suggestion. > > Although the Denali IP provides a special MAP10 command for erasing, > using it would not buy us

Re: [PATCH v5 2/2] phy: zynqmp: Add phy driver for xilinx zynqmp phy core

2019-01-21 Thread Kishon Vijay Abraham I
Hi Anurag, On 17/01/19 9:39 PM, Anurag Kumar Vulisha wrote: > Hi Kishon, > >> -Original Message- >> From: Kishon Vijay Abraham I [mailto:kis...@ti.com] >> Sent: Wednesday, January 16, 2019 1:38 PM >> To: Anurag Kumar Vulisha ; robh...@kernel.org; Mark >> Rutland ;

[RESEND PATCH V8 09/11] KVM: Add new exit reason For ROE violations

2019-01-21 Thread Ahmed Abd El Mawgood
The problem is that qemu will not be able to detect ROE violations, so one option would be create host API to tell if a given page is ROE protected, or create ROE violation exit reason. Signed-off-by: Ahmed Abd El Mawgood --- arch/x86/kvm/x86.c | 10 +- include/kvm/roe.h|

Re: [PATCH v7 5/5] tpm: pass an array of tpm_extend_digest structures to tpm_pcr_extend()

2019-01-21 Thread Roberto Sassu
On 1/18/2019 4:12 PM, Jarkko Sakkinen wrote: On Thu, Jan 17, 2019 at 08:59:00AM +0100, Roberto Sassu wrote: On 12/20/2018 4:21 PM, Jarkko Sakkinen wrote: On Thu, Dec 13, 2018 at 11:29:45AM +0100, Roberto Sassu wrote: Currently, tpm_pcr_extend() accepts as an input only a SHA1 digest. This

Re: [PATCH v9 1/2] dmaengine: 8250_mtk_dma: add MediaTek uart DMA support

2019-01-21 Thread Long Cheng
On Sun, 2019-01-20 at 10:57 +0530, Vinod Koul wrote: > On 10-01-19, 18:33, Long Cheng wrote: > > On Fri, 2019-01-04 at 22:49 +0530, Vinod Koul wrote: > > > On 02-01-19, 10:12, Long Cheng wrote: > > > > In DMA engine framework, add 8250 uart dma to support MediaTek uart. > > > > If MediaTek uart

Re: [PATCH] doc:it_IT: add translations in process/

2019-01-21 Thread Federico Vaga
On Monday, January 21, 2019 2:56:17 AM CET Jonathan Corbet wrote: > On Sat, 19 Jan 2019 23:13:41 +0100 > > Federico Vaga wrote: > > This patch adds the Italian translation for the following documents > > in Documentation/process: > > > > - applying-patches > > - submit-checklist > > -

linux-next: manual merge of the vhost tree with the net tree

2019-01-21 Thread Stephen Rothwell
Hi Michael, Today's linux-next merge of the vhost tree got a conflict in: drivers/net/virtio_net.c between commit: df133f3f9625 ("virtio_net: bulk free tx skbs") from the net tree and commits: a73c976c635f ("virtio_net: bulk free tx skbs") 017ed06fa099 ("virtio-net: bql support")

Re: [PATCH v2] mtd: rawnand: remove ->legacy.erase and single_erase()

2019-01-21 Thread Boris Brezillon
On Mon, 21 Jan 2019 15:32:07 +0900 Masahiro Yamada wrote: > Now that the last user of this hook, denali.c, stopped using it, > we can remove the erase hook from nand_legacy. > > I squashed single_erase() because only the difference between > single_erase() and nand_erase_op() is the number of

[PATCH] Add kv_to_page()

2019-01-21 Thread Matthew Wilcox
We currently have 12 places in the kernel which call either vmalloc_to_page() or virt_to_page() or even kmap_to_page() depending on the type of memory passed to them. This is clearly useful functionality we should provide in the kernel core so add kv_to_page() and convert these users.

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

2019-01-21 Thread Takashi Iwai
On Mon, 21 Jan 2019 01:21:48 +0100, Stephen Rothwell wrote: On Mon, 21 Jan 2019 01:21:48 +0100, Stephen Rothwell wrote: > > Hi Takashi, > > After merging the sound tree, today's linux-next build (arm > multi_v7_defconfig) produced this warning: > > sound/pci/hda/hda_codec.c: In function

Re: [PATCH] doc:process: remove note from 'stable api nonsense'

2019-01-21 Thread Federico Vaga
On Monday, January 21, 2019 2:43:38 AM CET Jonathan Corbet wrote: > On Fri, 18 Jan 2019 22:58:04 +0100 > > Federico Vaga wrote: > > The link referred by the note can't be retrieved: this patch just > > remove that old note. > > > > Signed-off-by: Federico Vaga > > --- > > > >

[RESEND PATCH V8 08/11] KVM: X86: Port ROE_MPROTECT_CHUNK to x86

2019-01-21 Thread Ahmed Abd El Mawgood
Apply d->memslot->partial_roe_bitmap to shadow page table entries too. Signed-off-by: Ahmed Abd El Mawgood --- arch/x86/kvm/roe.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/x86/kvm/roe.c b/arch/x86/kvm/roe.c index f787106be8..700f69823b 100644 ---

Re: [PATCH] Documentation: DMA-API: fix two typos

2019-01-21 Thread Jonathan Corbet
On Fri, 18 Jan 2019 13:38:22 + Corentin Labbe wrote: > This patch fixes two typos, a missing "e" and dma-api/driver_filter was > incorrectly typed dma-api/driver-filter. > > Signed-off-by: Corentin Labbe So I've applied this, but... > Documentation/DMA-API.txt | 4 ++-- > 1 file

Re: [PATCH v1 3/6] usb: host: Stops USB controller init if PLL fails to lock

2019-01-21 Thread Sergei Shtylyov
Hello! On 21.01.2019 6:13, Yinbo Zhu wrote: From: yinbo.zhu USB erratum-A006918 workaround tries to start internal PHY inside uboot (when PLL fails to lock). However, if the workaround also fails, then USB initialization is also stopped inside Linux. Erratum-A006918 workaround failure

Re: [PATCH] usb: dwc3: gadget: issue a stop command for ISOC endpoint

2019-01-21 Thread Felipe Balbi
Hi, Zeng Tao writes: > For ISOC transfers, if there is no available data for a period, we need > to stop the transfer by issue a stop command, otherwise, all the > upcoming transfers will started by update transfer command, and will be > dropped with MISS ISOC errors. We, actually, have code

[PATCH V14 00/18] block: support multi-page bvec

2019-01-21 Thread Ming Lei
Hi, This patchset brings multi-page bvec into block layer: 1) what is multi-page bvec? Multipage bvecs means that one 'struct bio_bvec' can hold multiple pages which are physically contiguous instead of one single page used in linux kernel for long time. 2) why is multi-page bvec introduced?

[PATCH V14 02/18] block: don't use bio->bi_vcnt to figure out segment number

2019-01-21 Thread Ming Lei
It is wrong to use bio->bi_vcnt to figure out how many segments there are in the bio even though CLONED flag isn't set on this bio, because this bio may be splitted or advanced. So always use bio_segments() in blk_recount_segments(), and it shouldn't cause any performance loss now because the

[PATCH V14 01/18] btrfs: look at bi_size for repair decisions

2019-01-21 Thread Ming Lei
From: Christoph Hellwig bio_readpage_error currently uses bi_vcnt to decide if it is worth retrying an I/O. But the vector count is mostly an implementation artifact - it really should figure out if there is more than a single sector worth retrying. Use bi_size for that and shift by

[PATCH] PM / devfreq: consistent indentation

2019-01-21 Thread MyungJoo Ham
Following up with complaints on inconsistent indentation from Yangtao Li, this fixes indentation inconsistency. In principle, this tries to put arguments aligned to the left including the first argument except for in the case where the first argument is on the far-right side. Signed-off-by:

[PATCH V14 05/18] block: introduce bio_for_each_mp_bvec() and rq_for_each_mp_bvec()

2019-01-21 Thread Ming Lei
bio_for_each_mp_bvec() is used for iterating over multi-page bvec for bio split & merge code. rq_for_each_mp_bvec() can be used for drivers which may handle the multi-page bvec directly, so far loop is one perfect use case. Reviewed-by: Christoph Hellwig Reviewed-by: Omar Sandoval

[PATCH V14 03/18] block: remove bvec_iter_rewind()

2019-01-21 Thread Ming Lei
Commit 7759eb23fd980 ("block: remove bio_rewind_iter()") removes bio_rewind_iter(), then no one uses bvec_iter_rewind() any more, so remove it. Reviewed-by: Omar Sandoval Reviewed-by: Christoph Hellwig Signed-off-by: Ming Lei --- include/linux/bvec.h | 24 1 file

Re: [PATCH v2 29/29] y2038: add 64-bit time_t syscalls to all 32-bit architectures

2019-01-21 Thread Geert Uytterhoeven
Hi Russell, On Sat, Jan 19, 2019 at 3:29 PM Russell King - ARM Linux admin wrote: > On Fri, Jan 18, 2019 at 11:53:25AM -0800, Andy Lutomirski wrote: > > On Fri, Jan 18, 2019 at 11:33 AM Arnd Bergmann wrote: > > > On Fri, Jan 18, 2019 at 7:50 PM Andy Lutomirski wrote: > > > > On Fri, Jan 18,

[PATCH V14 04/18] block: introduce multi-page bvec helpers

2019-01-21 Thread Ming Lei
This patch introduces helpers of 'mp_bvec_iter_*' for multi-page bvec support. The introduced helpers treate one bvec as real multi-page segment, which may include more than one pages. The existed helpers of bvec_iter_* are interfaces for supporting current bvec iterator which is thought as

[PATCH V14 07/18] block: use bio_for_each_mp_bvec() to map sg

2019-01-21 Thread Ming Lei
It is more efficient to use bio_for_each_mp_bvec() to map sg, meantime we have to consider splitting multipage bvec as done in blk_bio_segment_split(). Reviewed-by: Omar Sandoval Reviewed-by: Christoph Hellwig Signed-off-by: Ming Lei --- block/blk-merge.c | 70

[PATCH V14 08/18] block: introduce mp_bvec_last_segment()

2019-01-21 Thread Ming Lei
BTRFS and guard_bio_eod() need to get the last singlepage segment from one multipage bvec, so introduce this helper to make them happy. Reviewed-by: Omar Sandoval Signed-off-by: Ming Lei --- include/linux/bvec.h | 22 ++ 1 file changed, 22 insertions(+) diff --git

[PATCH V14 06/18] block: use bio_for_each_mp_bvec() to compute multi-page bvec count

2019-01-21 Thread Ming Lei
First it is more efficient to use bio_for_each_mp_bvec() in both blk_bio_segment_split() and __blk_recalc_rq_segments() to compute how many multi-page bvecs there are in the bio. Secondly once bio_for_each_mp_bvec() is used, the bvec may need to be splitted because its length can be very longer

[PATCH V14 09/18] fs/buffer.c: use bvec iterator to truncate the bio

2019-01-21 Thread Ming Lei
Once multi-page bvec is enabled, the last bvec may include more than one page, this patch use mp_bvec_last_segment() to truncate the bio. Reviewed-by: Omar Sandoval Reviewed-by: Christoph Hellwig Signed-off-by: Ming Lei --- fs/buffer.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-)

[PATCH V14 14/18] block: enable multipage bvecs

2019-01-21 Thread Ming Lei
This patch pulls the trigger for multi-page bvecs. Reviewed-by: Omar Sandoval Signed-off-by: Ming Lei --- block/bio.c | 22 +++--- fs/iomap.c | 4 ++-- fs/xfs/xfs_aops.c | 4 ++-- include/linux/bio.h | 2 +- 4 files changed, 20 insertions(+), 12

[PATCH -next] drm/stm: ltdc: remove set but not used variable 'src_h'

2019-01-21 Thread YueHaibing
Fixes gcc '-Wunused-but-set-variable' warning: drivers/gpu/drm/stm/ltdc.c: In function 'ltdc_plane_atomic_check': drivers/gpu/drm/stm/ltdc.c:694:13: warning: variable 'src_y' set but not used [-Wunused-but-set-variable] u32 src_x, src_y, src_w, src_h; ^ ^

Re: [PATCH] MAINTAINERS: Add entry for Amlogic NAND controller driver

2019-01-21 Thread Miquel Raynal
Hi Jianxin, Jianxin Pan wrote on Mon, 21 Jan 2019 12:18:18 +0800: > Hi Miquel, > > On 2019/1/20 23:06, Miquel Raynal wrote: > > Hi Jianxin, > > > > Jianxin Pan wrote on Sun, 20 Jan 2019 > > 01:02:35 +0800: > > > >> Add entry for Amlogic NAND controller driver and its bindings[0]. > >> >

[PATCH V14 10/18] btrfs: use mp_bvec_last_segment to get bio's last page

2019-01-21 Thread Ming Lei
Preparing for supporting multi-page bvec. Reviewed-by: Omar Sandoval Signed-off-by: Ming Lei --- fs/btrfs/extent_io.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index dc8ba3ee515d..986ef49b0269 100644 ---

[PATCH V14 11/18] block: loop: pass multi-page bvec to iov_iter

2019-01-21 Thread Ming Lei
iov_iter is implemented on bvec itererator helpers, so it is safe to pass multi-page bvec to it, and this way is much more efficient than passing one page in each bvec. Reviewed-by: Christoph Hellwig Reviewed-by: Omar Sandoval Signed-off-by: Ming Lei --- drivers/block/loop.c | 20

  1   2   3   4   5   6   7   8   9   10   >