[PATCH v7 3/7] xen/pvh: Create a new file for Xen specific PVH code

2018-04-16 Thread Maran Wilson
We need to refactor PVH entry code so that support for other hypervisors like Qemu/KVM can be added more easily. The first step in that direction is to create a new file that will eventually hold the Xen specific routines. Signed-off-by: Maran Wilson --- arch/x86/platform/pvh/enlighten.c | 5 ++

[PATCH v7 6/7] xen/pvh: Add memory map pointer to hvm_start_info struct

2018-04-16 Thread Maran Wilson
The start info structure that is defined as part of the x86/HVM direct boot ABI and used for starting Xen PVH guests would be more versatile if it also included a way to pass information about the memory map to the guest. This would allow KVM guests to share the same entry point. Signed-off-by: Ma

[PATCH v7 7/7] KVM: x86: Allow Qemu/KVM to use PVH entry point

2018-04-16 Thread Maran Wilson
For certain applications it is desirable to rapidly boot a KVM virtual machine. In cases where legacy hardware and software support within the guest is not needed, Qemu should be able to boot directly into the uncompressed Linux kernel binary without the need to run firmware. There already exists

[PATCH v7 5/7] xen/pvh: Move Xen code for getting mem map via hcall out of common file

2018-04-16 Thread Maran Wilson
We need to refactor PVH entry code so that support for other hypervisors like Qemu/KVM can be added more easily. The original design for PVH entry in Xen guests relies on being able to obtain the memory map from the hypervisor using a hypercall. When we extend the PVH entry ABI to support other hy

Re: [PATCH 1/2] parisc: use the asm-generic version for writeX()

2018-04-16 Thread Sinan Kaya
On 4/16/2018 7:09 PM, John David Anglin wrote: > On 2018-04-16 6:01 PM, Sinan Kaya wrote: >> parisc architecture seems to be mapping writeX() and writeX_relaxed() APIs >> to __raw_writeX() API. >> >> __raw_writeX() API doesn't provide any kind of ordering guarantees. >> commit 755bd04aaf4b ("io: de

Re: [PATCH 1/2] parisc: use the asm-generic version for writeX()

2018-04-16 Thread John David Anglin
On 2018-04-16 6:01 PM, Sinan Kaya wrote: parisc architecture seems to be mapping writeX() and writeX_relaxed() APIs to __raw_writeX() API. __raw_writeX() API doesn't provide any kind of ordering guarantees. commit 755bd04aaf4b ("io: define stronger ordering for the default writeX() implementatio

Re: [PATCH 1/5] dt-bindings: allow dwmac-sun8i to use other devices' exported regmap

2018-04-16 Thread Icenowy Zheng
于 2018年4月17日 GMT+08:00 上午2:47:45, Rob Herring 写到: >On Wed, Apr 11, 2018 at 10:16:37PM +0800, Icenowy Zheng wrote: >> On some Allwinner SoCs the EMAC clock register needed by dwmac-sun8i >is >> in another device's memory space. In this situation dwmac-sun8i can >use >> a regmap exported by the ot

Re: [PATCH v3 07/10] Documentation: dt-bindings: Add documents for PECI hwmon client drivers

2018-04-16 Thread Jae Hyun Yoo
On 4/16/2018 11:14 AM, Rob Herring wrote: On Tue, Apr 10, 2018 at 11:32:09AM -0700, Jae Hyun Yoo wrote: This commit adds dt-bindings documents for PECI cputemp and dimmtemp client drivers. "dt-bindings: hwmon: ..." for the subject. I'll change the subject. Signed-off-by: Jae Hyun Yoo Re

Re: [PATCH v2 00/10] SWIM driver fixes

2018-04-16 Thread Finn Thain
On Wed, 11 Apr 2018, I wrote: > This patch series has fixes for bugs in the SWIM floppy disk controller > driver, including an oops and a soft lockup. > Apparently no-one is authorized to push this series intact. Geert, would you please take just the first two patches? Jens, would you please

linux-next: build failure after merge of the netfilter tree

2018-04-16 Thread Stephen Rothwell
Hi all, After merging the netfilter tree, today's linux-next build (powerpc ppc64_defconfig) failed like this: net/netfilter/nf_conntrack_extend.c: In function 'nf_ct_ext_ add': net/netfilter/nf_conntrack_extend.c:74:2: error: implicit declaration of function 'kmemleak_not_leak' [-Werror=implici

Re: kernel panics with 4.14.X versions

2018-04-16 Thread Pavlos Parissis
On 16/04/2018 04:40 μμ, Jan Kara wrote: > On Mon 16-04-18 15:25:50, Guillaume Morin wrote: >> Fwiw, there have been already reports of similar soft lockups in >> fsnotify() on 4.14: https://lkml.org/lkml/2018/3/2/1038 >> >> We have also noticed similar softlockups with 4.14.22 here. > > Yeah. >

Re: [PATCH 1/2] parisc: use the asm-generic version for writeX()

2018-04-16 Thread John David Anglin
On 2018-04-16 7:15 PM, Sinan Kaya wrote: Thanks for testing. Can you add this on top and see if it helps? --- a/arch/parisc/include/asm/io.h +++ b/arch/parisc/include/asm/io.h @@ -259,6 +259,7 @@ extern void outsl (unsigned long port, const void *src, unsigned long count); * value for either

Re: [PATCH 1/2] parisc: use the asm-generic version for writeX()

2018-04-16 Thread Sinan Kaya
On 4/16/2018 7:37 PM, John David Anglin wrote: >>   +#include >>   #include > Still lots of problems. > > Dave > > --  > John David Anglin  dave.ang...@bell.net > > > io.log > > > CC arch/parisc/kernel/asm-offsets.s > In file included from ./arch/parisc/include/asm/io.h:262:0, >

Re: [PATCH 1/2] parisc: use the asm-generic version for writeX()

2018-04-16 Thread Sinan Kaya
On 4/16/2018 7:44 PM, Sinan Kaya wrote: >> John David Anglin  dave.ang...@bell.net >> >> >> io.log >> >> >> CC arch/parisc/kernel/asm-offsets.s >> In file included from ./arch/parisc/include/asm/io.h:262:0, >> from ./include/linux/io.h:25, >> from ./include/

Re: [PATCH v3 07/10] Documentation: dt-bindings: Add documents for PECI hwmon client drivers

2018-04-16 Thread Jae Hyun Yoo
On 4/16/2018 4:22 PM, Jae Hyun Yoo wrote: On 4/16/2018 11:14 AM, Rob Herring wrote: On Tue, Apr 10, 2018 at 11:32:09AM -0700, Jae Hyun Yoo wrote: This commit adds dt-bindings documents for PECI cputemp and dimmtemp client drivers. "dt-bindings: hwmon: ..." for the subject. I'll change the

Re: [PATCH v2 2/2] HID: input: do not increment usages when a duplicate is found

2018-04-16 Thread Dmitry Torokhov
On Mon, Dec 11, 2017 at 08:29:26AM +1000, Peter Hutterer wrote: > On Fri, Dec 08, 2017 at 03:28:18PM +0100, Benjamin Tissoires wrote: > > This is something that bothered us from a long time. When hid-input > > doesn't know how to map a usage, it uses *_MISC. But there is something > > else which in

Re: [PATCH v3 06/11] iio: inkern: add module put/get on iio dev module when requesting channels

2018-04-16 Thread Dmitry Torokhov
On Sun, Apr 15, 2018 at 08:33:21PM +0100, Jonathan Cameron wrote: > On Tue, 10 Apr 2018 11:57:52 +0300 > Eugen Hristev wrote: > > > When requesting channels for a particular consumer device, > > besides requesting the device (incrementing the reference counter), also > > do it for the driver modu

Re: [PATCH] soc: qcom: cmd-db: Make endian-agnostic

2018-04-16 Thread Evan Green
On Thu, Apr 12, 2018 at 3:41 PM Stephen Boyd wrote: > This driver deals with memory that is stored in little-endian format. > Update the structures with the proper little-endian types and then > do the proper conversions when reading the fields. Note that we compare > the ids with a memcmp() beca

Re: [PATCH v3 2/5] efi: Add embedded peripheral firmware support

2018-04-16 Thread Luis R. Rodriguez
On Sun, Apr 08, 2018 at 07:40:11PM +0200, Hans de Goede wrote: > static void firmware_free_data(const struct firmware *fw) > { > @@ -576,6 +600,15 @@ _request_firmware(const struct firmware **firmware_p, > const char *name, > goto out; > > ret = fw_get_filesystem_firmware(d

Re: repeatable boot randomness inside KVM guest

2018-04-16 Thread Alexey Dobriyan
On Mon, Apr 16, 2018 at 04:15:44PM +, Thomas Garnier wrote: > On Mon, Apr 16, 2018 at 8:54 AM Kees Cook wrote: > > > On Sat, Apr 14, 2018 at 3:44 PM, Theodore Y. Ts'o wrote: > > > +linux...@kvack.org > > > k...@vger.kernel.org, secur...@kernel.org moved to bcc > > > > > > On Sat, Apr 14, 201

Re: [PATCH] efi: Fix the size not consistent issue when unmapping memory map

2018-04-16 Thread Randy Wright
On Mon, Apr 16, 2018 at 02:37:38PM +0800, joeyli wrote: > Hi Randy, > ... > Randy, do you want to try Dave's kexec patch on your environment? Please > remove > my patch first. > > Thanks a lot! > Joey Lee Hi Joey, I tried Dave's patch to kexec-bzimage64.c on my build of the SuSE 4.12.14-15 k

Re: [PATCH 2/3] ACPI: SPCR: Add support for AMD CT/SZ

2018-04-16 Thread Jon Masters
On 03/13/2018 08:36 PM, Daniel Kurtz wrote: > AMD Carrizo / Stoneyridge use a DesignWare 8250 UART that uses a special > earlycon setup handler to configure its input clock in order to compute > baud rate divisor registers. > Detect them by examining the OEMID field in the SPCR header, and pass > t

[PATCH 2/6] cifs: Allocate validate negoation request through kmalloc

2018-04-16 Thread Long Li
From: Long Li The data buffer allocated on the stack can't be DMA'ed, and hence can't send through RDMA via SMB Direct. Fix this by allocating the request on the heap in smb3_validate_negotiate. Signed-off-by: Long Li --- fs/cifs/smb2pdu.c | 38 ++ 1 file c

[PATCH 5/6] cifs: smbd: Enable signing with smbdirect

2018-04-16 Thread Long Li
From: Long Li Now signing is supported with RDMA transport. Remove the code that disabled it. Signed-off-by: Long Li --- fs/cifs/connect.c | 8 fs/cifs/smb2pdu.c | 4 2 files changed, 12 deletions(-) diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index e8830f0..deef270 1006

[PATCH 3/6] cifs: smbd: Avoid allocating iov on the stack

2018-04-16 Thread Long Li
From: Long Li It's not necessary to allocate another iov when going through the buffers in smbd_send() through RDMA send. Remove it to reduce stack size. Signed-off-by: Long Li --- fs/cifs/smbdirect.c | 36 1 file changed, 12 insertions(+), 24 deletions(-)

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

2018-04-16 Thread Cong Wang
On Mon, Apr 16, 2018 at 4:28 PM, Stephen Rothwell wrote: > Hi all, > > After merging the netfilter tree, today's linux-next build (powerpc > ppc64_defconfig) failed like this: > > net/netfilter/nf_conntrack_extend.c: In function 'nf_ct_ext_ > add': > net/netfilter/nf_conntrack_extend.c:74:2: error

[PATCH 4/6] cifs: smbd: Don't use RDMA read/write when signing is used

2018-04-16 Thread Long Li
From: Long Li SMB server will not sign data transferred through RDMA read/write. When signing is used, it's a good idea to have all the data signed. In this case, use RDMA send/recv for all data transfers. This will degrade performance as this is not generally configured in RDMA environemnt. So

Re: [PATCH v3 2/2] iommu/amd: Add basic debugfs infrastructure for AMD IOMMU

2018-04-16 Thread Mehta, Sohil
On Fri, 2018-04-06 at 08:17 -0500, Gary R Hook wrote: > > diff --git a/drivers/iommu/Makefile b/drivers/iommu/Makefile > index 5eb1121d54b9..0ca250f626d9 100644 > --- a/drivers/iommu/Makefile > +++ b/drivers/iommu/Makefile > @@ -11,6 +11,7 @@ obj-$(CONFIG_IOMMU_IOVA) += iova.o >  obj-$(CONFIG_OF_I

[PATCH 6/6] cifs: smbd: Dump SMB packet when configured

2018-04-16 Thread Long Li
From: Long Li When sending through SMB Direct, also dump the packet in SMB send path. Also fixed a typo in debug message. Signed-off-by: Long Li --- fs/cifs/smbdirect.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fs/cifs/smbdirect.c b/fs/cifs/smbdirect.c index f57

[PATCH 1/6] cifs: smbd: Check for iov length on sending the last iov

2018-04-16 Thread Long Li
From: Long Li When sending the last iov that breaks into smaller buffers to fit the transfer size, it's necessary to check if this is the last iov. If this is the latest iov, stop and proceed to send pages. Signed-off-by: Long Li --- fs/cifs/smbdirect.c | 2 ++ 1 file changed, 2 insertions(+)

Re: On the kernel numbering scheme

2018-04-16 Thread \0xDynamite
> The current kernel numbering scheme makes no sense at all because the > first two numbers don't represent anything at all. They had some meaning > back in the 1.x 2.x 3.x days but then with the introduction of the new > rolling development model, they became worthless. > > I'd love to change the

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

2018-04-16 Thread Stephen Rothwell
Add RT1305/RT1306 amplifier driver") I have used the sound-asoc tree from next-20180416 for today. -- Cheers, Stephen Rothwell pgp4de152scba.pgp Description: OpenPGP digital signature

Re: [PATCH] efi: Fix the size not consistent issue when unmapping memory map

2018-04-16 Thread joeyli
On Mon, Apr 16, 2018 at 06:35:22PM -0600, Randy Wright wrote: > On Mon, Apr 16, 2018 at 02:37:38PM +0800, joeyli wrote: > > Hi Randy, > > ... > > Randy, do you want to try Dave's kexec patch on your environment? Please > > remove > > my patch first. > > > > Thanks a lot! > > Joey Lee > > Hi Jo

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

2018-04-16 Thread Shuming [范書銘]
:23: note: (near initialization for 'rt1305_i2c_driver.driver.acpi_match_table') Caused by commit 29bc643ddd7e ("ASoC: rt1305: Add RT1305/RT1306 amplifier driver") I have used the sound-asoc tree from next-20180416 for today. -- Cheers, Stephen Rothwell --Please consider the environment before printing this e-mail.

linux-next: manual merge of the efi-lock-down tree with the modules tree

2018-04-16 Thread Stephen Rothwell
Hi David, Today's linux-next merge of the efi-lock-down tree got a conflict in: kernel/module.c between commit: 2c8fd268f418 ("module: Do not access sig_enforce directly") from the modules tree and commit: 7c0d4949d834 ("Enforce module signatures if the kernel is locked down") from the

Re: [PATCH] infiniband: mlx5: fix build error when INFINIBAND_USER_ACCESS=m

2018-04-16 Thread Randy Dunlap
On 04/16/18 14:55, Jason Gunthorpe wrote: > On Mon, Apr 16, 2018 at 02:21:07PM -0700, Randy Dunlap wrote: >> From: Randy Dunlap >> >> Fix build errors when INFINIBAND_USER_ACCESS=m and MLX5_INFINIBAND=y. >> The build error occurs when the mlx5 driver code attempts to use >> USER_ACCESS interfaces,

[PATCH v2] infiniband: mlx5: fix build errors when INFINIBAND_USER_ACCESS=m

2018-04-16 Thread Randy Dunlap
From: Randy Dunlap Fix build errors when INFINIBAND_USER_ACCESS=m and MLX5_INFINIBAND=y. The build error occurs when the mlx5 driver code attempts to use USER_ACCESS interfaces, which are built as a loadable module. Fixes these build errors: drivers/infiniband/hw/mlx5/main.o: In function `popul

[PATCH] nvme: lightnvm: add granby support

2018-04-16 Thread Wei Xu
Add a new lightnvm quirk to identify CNEX’s Granby controller. Signed-off-by: Wei Xu --- drivers/nvme/host/pci.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c index cb73bc8..9419e88 100644 --- a/drivers/nvme/host/pci.c +++ b/drivers/nvme/

[PATCH -mm 02/21] mm, THP, swap: Make CONFIG_THP_SWAP depends on CONFIG_SWAP

2018-04-16 Thread Huang, Ying
From: Huang Ying It's unreasonable to optimize swapping for THP without basic swapping support. And this will cause build errors when THP_SWAP functions are defined in swapfile.c and called elsewhere. The comments are fixed too to reflect the latest progress. Signed-off-by: "Huang, Ying" Cc:

[PATCH -mm 01/21] mm, THP, swap: Enable PMD swap operations for CONFIG_THP_SWAP

2018-04-16 Thread Huang, Ying
From: Huang Ying Previously, the PMD swap operations are only enabled for CONFIG_ARCH_ENABLE_THP_MIGRATION. Because they are only used by the THP migration support. We will support PMD swap mapping to the huge swap cluster and swapin the THP as a whole. That will be enabled via CONFIG_THP_SWAP

[PATCH 00/21] mm, THP, swap: Swapout/swapin THP as a whole

2018-04-16 Thread Huang, Ying
From: Huang Ying Hi, Andrew, could you help me to check whether the overall design is reasonable? Hi, Hugh, Shaohua, Minchan and Rik, could you help me to review the swap part of the patchset? Especially [02/21], [03/21], [04/21], [05/21], [06/21], [07/21], [08/21], [09/21], [10/21], [11/21], [

[PATCH -mm 09/21] mm, THP, swap: Swapin a THP as a whole

2018-04-16 Thread Huang, Ying
From: Huang Ying With this patch, when page fault handler find a PMD swap mapping, it will swap in a THP as a whole. This avoids the overhead of splitting/collapsing before/after the THP swapping. And improves the swap performance greatly for reduced page fault count etc. do_huge_pmd_swap_page

[PATCH -mm 06/21] mm, THP, swap: Support PMD swap mapping when splitting huge PMD

2018-04-16 Thread Huang, Ying
From: Huang Ying A huge PMD need to be split when zap a part of the PMD mapping etc. If the PMD mapping is a swap mapping, we need to split it too. This patch implemented the support for this. This is similar as splitting the PMD page mapping, except we need to decrease the PMD swap mapping cou

[PATCH -mm 10/21] mm, THP, swap: Support to count THP swapin and its fallback

2018-04-16 Thread Huang, Ying
From: Huang Ying 2 new /proc/vmstat fields are added, "thp_swapin" and "thp_swapin_fallback" to count swapin a THP from swap device as a whole and fallback to normal page swapin. Signed-off-by: "Huang, Ying" Cc: "Kirill A. Shutemov" Cc: Andrea Arcangeli Cc: Michal Hocko Cc: Johannes Weiner

[PATCH -mm 07/21] mm, THP, swap: Support PMD swap mapping in split_swap_cluster()

2018-04-16 Thread Huang, Ying
From: Huang Ying When splitting a THP in swap cache or failing to allocate a THP when swapin a huge swap cluster, the huge swap cluster will be split. In addition to clear the huge flag of the swap cluster, the PMD swap mapping count recorded in cluster_count() will be set to 0. But we will not

[PATCH -mm 13/21] mm, THP, swap: Support PMD swap mapping in madvise_free()

2018-04-16 Thread Huang, Ying
From: Huang Ying When madvise_free() found a PMD swap mapping, if only part of the huge swap cluster is operated on, the PMD swap mapping will be split and fallback to PTE swap mapping processing. Otherwise, if all huge swap cluster is operated on, free_swap_and_cache() will be called to decreas

[PATCH -mm 19/21] mm, THP, swap: Support PMD swap mapping in common path

2018-04-16 Thread Huang, Ying
From: Huang Ying Original code is only for PMD migration entry, it is revised to support PMD swap mapping. Signed-off-by: "Huang, Ying" Cc: "Kirill A. Shutemov" Cc: Andrea Arcangeli Cc: Michal Hocko Cc: Johannes Weiner Cc: Shaohua Li Cc: Hugh Dickins Cc: Minchan Kim Cc: Rik van Riel Cc:

[PATCH -mm 21/21] mm, THP: Avoid to split THP when reclaim MADV_FREE THP

2018-04-16 Thread Huang, Ying
From: Huang Ying Previously, to reclaim MADV_FREE THP, the THP will be split firstly, then reclaim each sub-pages. This wastes cycles to split THP and unmap and free each sub-pages, and split THP even if it has been written since MADV_FREE. We have to do this because MADV_FREE THP reclaiming sh

[PATCH -mm 16/21] mm, THP, swap: Free PMD swap mapping when zap_huge_pmd()

2018-04-16 Thread Huang, Ying
From: Huang Ying For a PMD swap mapping, zap_huge_pmd() will clear the PMD and call free_swap_and_cache() to decrease the swap reference count and maybe free or split the huge swap cluster and the THP in swap cache. Signed-off-by: "Huang, Ying" Cc: "Kirill A. Shutemov" Cc: Andrea Arcangeli Cc

[PATCH -mm 18/21] mm, THP, swap: Support PMD swap mapping in mincore()

2018-04-16 Thread Huang, Ying
From: Huang Ying During mincore(), for PMD swap mapping, swap cache will be looked up. If the resulting page isn't compound page, the PMD swap mapping will be split and fallback to PTE swap mapping processing. Signed-off-by: "Huang, Ying" Cc: "Kirill A. Shutemov" Cc: Andrea Arcangeli Cc: Mich

[PATCH -mm 12/21] mm, THP, swap: Support PMD swap mapping in swapoff

2018-04-16 Thread Huang, Ying
From: Huang Ying During swapoff, for a huge swap cluster, we need to allocate a THP, read its contents into the THP and unuse the PMD and PTE swap mappings to it. If failed to allocate a THP, the huge swap cluster will be split. During unuse, if it is found that the swap cluster mapped by a PMD

[PATCH -mm 20/21] mm, THP, swap: create PMD swap mapping when unmap the THP

2018-04-16 Thread Huang, Ying
From: Huang Ying This is the final step of the THP swapin support. When reclaiming a anonymous THP, after allocating the huge swap cluster and add the THP into swap cache, the PMD page mapping will be changed to the mapping to the swap space. Previously, the PMD page mapping will be split befor

[PATCH -mm 17/21] mm, THP, swap: Support PMD swap mapping for MADV_WILLNEED

2018-04-16 Thread Huang, Ying
From: Huang Ying During MADV_WILLNEED, for a PMD swap mapping, if THP swapin is enabled for the VMA, the whole swap cluster will be swapin. Otherwise, the huge swap cluster and the PMD swap mapping will be split and fallback to PTE swap mapping. Signed-off-by: "Huang, Ying" Cc: "Kirill A. Shut

[PATCH -mm 15/21] mm, THP, swap: Support to copy PMD swap mapping when fork()

2018-04-16 Thread Huang, Ying
From: Huang Ying During fork, the page table need to be copied from parent to child. A PMD swap mapping need to be copied too and the swap reference count need to be increased. When the huge swap cluster has been split already, we need to split the PMD swap mapping and fallback to PTE copying.

[PATCH -mm 14/21] mm, cgroup, THP, swap: Support to move swap account for PMD swap mapping

2018-04-16 Thread Huang, Ying
From: Huang Ying Previously the huge swap cluster will be split after the THP is swapout. Now, to support to swapin the THP as a whole, the huge swap cluster will not be split after the THP is reclaimed. So in memcg, we need to move the swap account for PMD swap mappings in the process's page t

[PATCH -mm 11/21] mm, THP, swap: Add sysfs interface to configure THP swapin

2018-04-16 Thread Huang, Ying
From: Huang Ying Swapin a THP as a whole isn't desirable at some situations. For example, for random access pattern, swapin a THP as a whole will inflate the reading greatly. So a sysfs interface: /sys/kernel/mm/transparent_hugepage/swapin_enabled is added to configure it. Three options as fol

[PATCH -mm 08/21] mm, THP, swap: Support to read a huge swap cluster for swapin a THP

2018-04-16 Thread Huang, Ying
From: Huang Ying To swapin a THP as a whole, we need to read a huge swap cluster from the swap device. This patch revised the __read_swap_cache_async() and its callee to support this. If __read_swap_cache_async() find the swap cluster of the specified swap entry is huge, it will try to allocate

[PATCH -mm 04/21] mm, THP, swap: Support PMD swap mapping in swapcache_free_cluster()

2018-04-16 Thread Huang, Ying
From: Huang Ying Previously, during swapout, all PMD page mapping will be split and replaced with PTE swap mapping. And when clearing the SWAP_HAS_CACHE flag for the huge swap cluster in swapcache_free_cluster(), the huge swap cluster will be split. Now, during swapout, the PMD page mapping wil

[PATCH -mm 05/21] mm, THP, swap: Support PMD swap mapping in free_swap_and_cache()/swap_free()

2018-04-16 Thread Huang, Ying
From: Huang Ying When a PMD swap mapping is removed from a huge swap cluster, for example, unmap a memory range mapped with PMD swap mapping, etc, free_swap_and_cache() will be called to decrease the reference count to the huge swap cluster. free_swap_and_cache() may also free or split the huge

[PATCH -mm 03/21] mm, THP, swap: Support PMD swap mapping in swap_duplicate()

2018-04-16 Thread Huang, Ying
From: Huang Ying To support to swapin the THP as a whole, we need to create PMD swap mapping during swapout, and maintain PMD swap mapping count. This patch implements the support to increase the PMD swap mapping count (for swapout, fork, etc.) and set SWAP_HAS_CACHE flag (for swapin, etc.) for

[PATCH] spi: cadence: Add usleep_range() for cdns_spi_fill_tx_fifo()

2018-04-16 Thread sxauwsk
In case of xspi work in busy condition, may send bytes failed then caused communication failure. once something wrong, spi controller did't work any more. My test found this situation appear in both of read/write operation. so when TX FIFO is full, add one byte delay before send data. Signed-off-

[PATCH 1/3] mm: change type of free_contig_range(nr_pages) to unsigned long

2018-04-16 Thread Mike Kravetz
free_contig_range() is currently defined as: void free_contig_range(unsigned long pfn, unsigned nr_pages); change to, void free_contig_range(unsigned long pfn, unsigned long nr_pages); Some callers are passing a truncated unsigned long today. It is highly unlikely that these values will overflow

[PATCH 0/3] Interface for higher order contiguous allocations

2018-04-16 Thread Mike Kravetz
These patches came out of the "[RFC] mmap(MAP_CONTIG)" discussions at: http://lkml.kernel.org/r/21f1ec96-2822-1189-1c95-79a2bb491...@oracle.com One suggestion in that thread was to create a friendlier interface that could be used by drivers and others outside core mm code to allocate a contiguous

[PATCH 3/3] mm/hugetlb: use find_alloc_contig_pages() to allocate gigantic pages

2018-04-16 Thread Mike Kravetz
Use the new find_alloc_contig_pages() interface for the allocation of gigantic pages and remove associated code in hugetlb.c. Signed-off-by: Mike Kravetz --- mm/hugetlb.c | 87 +--- 1 file changed, 6 insertions(+), 81 deletions(-) diff --g

[PATCH 2/3] mm: add find_alloc_contig_pages() interface

2018-04-16 Thread Mike Kravetz
find_alloc_contig_pages() is a new interface that attempts to locate and allocate a contiguous range of pages. It is provided as a more convenient interface than alloc_contig_range() which is currently used by CMA and gigantic huge pages. When attempting to allocate a range of pages, migration is

[PATCH 7/7] ocxl: Document new OCXL IOCTLs

2018-04-16 Thread Alastair D'Silva
From: Alastair D'Silva Signed-off-by: Alastair D'Silva --- Documentation/accelerators/ocxl.rst | 10 ++ 1 file changed, 10 insertions(+) diff --git a/Documentation/accelerators/ocxl.rst b/Documentation/accelerators/ocxl.rst index ddcc58d01cfb..144595a80a1c 100644 --- a/Documentation/a

[PATCH 3/7] powerpc: use task_pid_nr() for TID allocation

2018-04-16 Thread Alastair D'Silva
From: Alastair D'Silva The current implementation of TID allocation, using a global IDR, may result in an errant process starving the system of available TIDs. Instead, use task_pid_nr(), as mentioned by the original author. The scenario described which prevented it's use is not applicable, as se

[PATCH 2/7] powerpc: Use TIDR CPU feature to control TIDR allocation

2018-04-16 Thread Alastair D'Silva
From: Alastair D'Silva Switch the use of TIDR on it's CPU feature, rather than assuming it is available based on architecture. Signed-off-by: Alastair D'Silva --- arch/powerpc/kernel/process.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kernel/process.c

[PATCH 6/7] ocxl: Add an IOCTL so userspace knows which platform the kernel requires

2018-04-16 Thread Alastair D'Silva
From: Alastair D'Silva In order for a userspace AFU driver to call the Power9 specific OCXL_IOCTL_ENABLE_P9_WAIT, it needs to verify that it can actually make that call. Signed-off-by: Alastair D'Silva --- drivers/misc/ocxl/file.c | 25 + include/uapi/misc/ocxl.h | 4 +

[PATCH 1/7] powerpc: Add TIDR CPU feature for Power9

2018-04-16 Thread Alastair D'Silva
From: Alastair D'Silva This patch adds a CPU feature bit to show whether the CPU has the TIDR register available, enabling as_notify/wait in userspace. Signed-off-by: Alastair D'Silva --- arch/powerpc/include/asm/cputable.h | 3 ++- arch/powerpc/include/asm/switch_to.h | 1 - arch/powerpc/ker

Re: [RFC v2] virtio: support packed ring

2018-04-16 Thread Jason Wang
On 2018年04月13日 15:15, Tiwei Bie wrote: On Fri, Apr 13, 2018 at 12:30:24PM +0800, Jason Wang wrote: On 2018年04月01日 22:12, Tiwei Bie wrote: Hello everyone, This RFC implements packed ring support for virtio driver. The code was tested with DPDK vhost (testpmd/vhost-PMD) implemented by Jens at

[PATCH 4/7] ocxl: Rename pnv_ocxl_spa_remove_pe to clarify it's action

2018-04-16 Thread Alastair D'Silva
From: Alastair D'Silva The function removes the process element from NPU cache. Signed-off-by: Alastair D'Silva --- arch/powerpc/include/asm/pnv-ocxl.h | 2 +- arch/powerpc/platforms/powernv/ocxl.c | 4 ++-- drivers/misc/ocxl/link.c | 2 +- 3 files changed, 4 insertions(+), 4 de

Re: [PATCH v2 1/2] pinctrl/samsung: Correct EINTG banks order

2018-04-16 Thread Tomasz Figa
2018-04-17 0:52 GMT+09:00 Paweł Chmiel : > All banks with GPIO interrupts should be at beginning > of bank array and without any other types of banks between them. > This order is expected by exynos_eint_gpio_irq, when doing > interrupt group to bank translation. > Otherwise, kernel NULL pointer de

[PATCH 5/7] ocxl: Expose the thread_id needed for wait on p9

2018-04-16 Thread Alastair D'Silva
From: Alastair D'Silva In order to successfully issue as_notify, an AFU needs to know the TID to notify, which in turn means that this information should be available in userspace so it can be communicated to the AFU. Signed-off-by: Alastair D'Silva --- drivers/misc/ocxl/context.c | 5 +

[PATCH 0/7] ocxl: Implement Power9 as_notify/wait for OpenCAPI

2018-04-16 Thread Alastair D'Silva
From: Alastair D'Silva The Power 9 as_notify/wait feature provides a lower latency way to signal a thread that work is complete. This series enables the use of this feature from OpenCAPI adapters, as well as addressing a potential starvation issue when allocating thread IDs. Alastair D'Silva (7)

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

2018-04-16 Thread Shuming [范書銘]
_match_table') sound/soc/codecs/rt1305.c:1179:23: error: initializer element is not constant sound/soc/codecs/rt1305.c:1179:23: note: (near initialization for 'rt1305_i2c_driver.driver.acpi_match_table') Caused by commit 29bc643ddd7e ("ASoC: rt1305: Add RT1305/RT1306 amplifier

Re: [PATCH v2 2/2] pinctrl/samsung: Document required order of banks

2018-04-16 Thread Tomasz Figa
2018-04-17 0:52 GMT+09:00 Paweł Chmiel : > This patch documents requirement coming from the way > exynos_eint_gpio_irq() is working now, which expects > EINTG banks to be at the beginning of the bank arrays. > > Cc: sta...@vger.kernel.org Probably no need for this one to go to stable, but either i

Re: [RFC v2] virtio: support packed ring

2018-04-16 Thread Michael S. Tsirkin
On Tue, Apr 17, 2018 at 10:11:58AM +0800, Jason Wang wrote: > > > On 2018年04月13日 15:15, Tiwei Bie wrote: > > On Fri, Apr 13, 2018 at 12:30:24PM +0800, Jason Wang wrote: > > > On 2018年04月01日 22:12, Tiwei Bie wrote: > > > > Hello everyone, > > > > > > > > This RFC implements packed ring support fo

Re: [PATCH] trace: add missing forward declaration

2018-04-16 Thread Ahbong Chang
It does not fail with any config without this fix. This is for new work. -- Ahbong On Mon, Apr 16, 2018 at 9:24 PM Steven Rostedt wrote: > On Mon, 16 Apr 2018 10:36:25 +0800 > Ahbong Chang wrote: > > Without this forward declaration compile may fail if this header is > > included only for reg

Re: [RFC v2] virtio: support packed ring

2018-04-16 Thread Jason Wang
On 2018年04月17日 10:17, Michael S. Tsirkin wrote: On Tue, Apr 17, 2018 at 10:11:58AM +0800, Jason Wang wrote: On 2018年04月13日 15:15, Tiwei Bie wrote: On Fri, Apr 13, 2018 at 12:30:24PM +0800, Jason Wang wrote: On 2018年04月01日 22:12, Tiwei Bie wrote: Hello everyone, This RFC implements packed

Re: [PATCH v6 00/11] Sunxi: Add SMP support on A83T

2018-04-16 Thread Ondřej Jirman
Hello Mylène, Please also add this: diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig index ce53ceaf4cc5..d9c8ecf88ec6 100644 --- a/arch/arm/mach-sunxi/Kconfig +++ b/arch/arm/mach-sunxi/Kconfig @@ -51,7 +51,7 @@ config MACH_SUN9I config ARCH_SUNXI_MC_SMP bool

linux-next: build warning after merge of the scsi tree

2018-04-16 Thread Stephen Rothwell
Hi James, After merging the scsi tree, today's linux-next build (x86_64 allmodconfig) produced this warning: drivers/scsi/storvsc_drv.c: In function 'storvsc_do_io': drivers/scsi/storvsc_drv.c:1402:1: warning: the frame size of 2216 bytes is larger than 2048 bytes [-Wframe-larger-than=] } ^ I

Re: [PATCH] perf tools: set kernel end address properly

2018-04-16 Thread Namhyung Kim
On Mon, Apr 16, 2018 at 05:48:11PM -0500, Kim Phillips wrote: > On Mon, 16 Apr 2018 12:24:07 -0500 > Kim Phillips wrote: > > > On Mon, 16 Apr 2018 13:58:00 -0300 > > Arnaldo Carvalho de Melo wrote: > > > > > Em Mon, Apr 16, 2018 at 11:07:30AM -0500, Kim Phillips escreveu: > > > > On Mon, 16 Apr

Re: [RFC v2] virtio: support packed ring

2018-04-16 Thread Michael S. Tsirkin
On Tue, Apr 17, 2018 at 10:24:32AM +0800, Jason Wang wrote: > > > On 2018年04月17日 10:17, Michael S. Tsirkin wrote: > > On Tue, Apr 17, 2018 at 10:11:58AM +0800, Jason Wang wrote: > > > > > > On 2018年04月13日 15:15, Tiwei Bie wrote: > > > > On Fri, Apr 13, 2018 at 12:30:24PM +0800, Jason Wang wrote:

Re: [PATCH v3 3/3] ALSA: hda: Disabled unused audio controller for Dell platforms with Switchable Graphics

2018-04-16 Thread Lukas Wunner
On Mon, Apr 16, 2018 at 04:25:12PM +0200, Pali Rohár wrote: > On Sunday 15 April 2018 21:05:23 Lukas Wunner wrote: > > On Sun, Apr 15, 2018 at 07:17:46PM +0200, Pali Rohár wrote: > > > On Saturday 14 April 2018 13:17:11 Lukas Wunner wrote: > > > > On Sat, Apr 14, 2018 at 12:49:50PM +0200, Pali Rohá

Re: [PATCH] efi: Fix the size not consistent issue when unmapping memory map

2018-04-16 Thread Dave Young
On 04/16/18 at 06:35pm, Randy Wright wrote: > On Mon, Apr 16, 2018 at 02:37:38PM +0800, joeyli wrote: > > Hi Randy, > > ... > > Randy, do you want to try Dave's kexec patch on your environment? Please > > remove > > my patch first. > > > > Thanks a lot! > > Joey Lee > > Hi Joey, > > I tried

Re: [RFC v2] virtio: support packed ring

2018-04-16 Thread Tiwei Bie
On Tue, Apr 17, 2018 at 10:11:58AM +0800, Jason Wang wrote: > On 2018年04月13日 15:15, Tiwei Bie wrote: > > On Fri, Apr 13, 2018 at 12:30:24PM +0800, Jason Wang wrote: > > > On 2018年04月01日 22:12, Tiwei Bie wrote: [...] > > > > +static int detach_buf_packed(struct vring_virtqueue *vq, unsigned int > >

Re: [PATCH 17/17] perf annotate: Handle variables in 'sub', 'or' and many other instructions

2018-04-16 Thread Namhyung Kim
Hi, On Fri, Apr 13, 2018 at 10:39:40AM -0700, Andi Kleen wrote: > > What do I miss? Or where is it that I'm misinterpreting the calculations > > that objdump did in its output? > > The calculations are right, but these are still two different address modes. > You cannot just turn one silently int

Re: instant reboot caused by 194a9749c73d650c0

2018-04-16 Thread Kirill A. Shutemov
On Mon, Apr 16, 2018 at 08:37:52PM +0300, Kirill A. Shutemov wrote: > On Mon, Apr 16, 2018 at 08:36:57AM -0700, Eric Dumazet wrote: > > > > > > On 04/16/2018 02:15 AM, Kirill A. Shutemov wrote: > > In the mean time, Greg told me that using gcc-4.9 instead of our old > > gcc-4.7 based toolchain wa

Re: [PATCH v2 1/4] tpm: Add explicit endianness cast

2018-04-16 Thread Jason Gunthorpe
On Thu, Apr 12, 2018 at 12:13:47PM +0200, Thiebaud Weksteen wrote: > Signed-off-by: Thiebaud Weksteen > drivers/char/tpm/tpm_eventlog_of.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/char/tpm/tpm_eventlog_of.c > b/drivers/char/tpm/tpm_eventlog_of.c > ind

Re: [RFC PATCH 1/1] vmscan: Support multiple kswapd threads per node

2018-04-16 Thread Buddy Lumpkin
> On Apr 12, 2018, at 6:16 AM, Michal Hocko wrote: > > On Tue 03-04-18 12:41:56, Buddy Lumpkin wrote: >> >>> On Apr 3, 2018, at 6:31 AM, Michal Hocko wrote: >>> >>> On Mon 02-04-18 09:24:22, Buddy Lumpkin wrote: Page replacement is handled in the Linux Kernel in one of two ways: >>

Re: instant reboot caused by 194a9749c73d650c0

2018-04-16 Thread Kirill A. Shutemov
On Mon, Apr 16, 2018 at 08:36:57AM -0700, Eric Dumazet wrote: > > > On 04/16/2018 02:15 AM, Kirill A. Shutemov wrote: > In the mean time, Greg told me that using gcc-4.9 instead of our old > gcc-4.7 based toolchain was working better. Hm. Are you saing that switching from gcc-4.7 to gcc-4.9 fixe

Re: [PATCH 2/2] mm: vmalloc: Pass proper vm_start into debugobjects

2018-04-16 Thread Anshuman Khandual
On 04/16/2018 05:39 PM, Chintan Pandya wrote: > > > On 4/13/2018 5:31 PM, Anshuman Khandual wrote: >> On 04/13/2018 05:03 PM, Chintan Pandya wrote: >>> Client can call vunmap with some intermediate 'addr' >>> which may not be the start of the VM area. Entire >>> unmap code works with vm->vm_start

[PATCH 0/9] iommu/vt-d: Improve PASID id and table management

2018-04-16 Thread Lu Baolu
This patch set improves the PASID id and PASID table management for Intel IOMMU driver. PATCH 1~3 replace per IOMMU idr name space with a global one. Current per IOMMU idr doesn't work in some cases where one application (associated with a PASID) might talk to two physical devices simultaneously w

[PATCH 1/9] iommu/vt-d: Global PASID name space

2018-04-16 Thread Lu Baolu
This adds the system wide PASID name space for the PASID allocation. Currently we are using per IOMMU PASID name spaces which are not suitable for some use cases. For an example, one application (associated with a PASID) might talk to two physical devices simultaneously while the two devices could

[PATCH 6/9] iommu/vt-d: Allocate and free pasid table

2018-04-16 Thread Lu Baolu
This patch allocates PASID table for a domain at the time when it is being created (if any devices using this domain supports PASID feature), and free it when the domain is freed. Cc: Ashok Raj Cc: Jacob Pan Cc: Kevin Tian Cc: Liu Yi L Signed-off-by: Lu Baolu --- drivers/iommu/intel-iommu.c

Re: usercopy whitelist woe in scsi_sense_cache

2018-04-16 Thread Kees Cook
On Mon, Apr 16, 2018 at 1:44 PM, Kees Cook wrote: > On Thu, Apr 12, 2018 at 8:02 PM, Kees Cook wrote: >> On Thu, Apr 12, 2018 at 3:47 PM, Kees Cook wrote: >>> After fixing up some build issues in the middle of the 4.16 cycle, I >>> get an unhelpful bisect result of commit 0a4b6e2f80aa ("Merge br

[PATCH 9/9] iommu/vt-d: Clean up PASID talbe management for SVM

2018-04-16 Thread Lu Baolu
The previous per iommu pasid table alloc/free interfaces are no longer used. Clean up the driver by removing it. Cc: Ashok Raj Cc: Jacob Pan Cc: Kevin Tian Cc: Liu Yi L Signed-off-by: Lu Baolu --- drivers/iommu/intel-iommu.c | 6 +++--- drivers/iommu/intel-svm.c | 17 ++--- in

[PATCH 3/9] iommu/vt-d: Use global PASID for SVM usage

2018-04-16 Thread Lu Baolu
This patch switches PASID management for SVM from per iommu idr to the global idr. Cc: Ashok Raj Cc: Jacob Pan Cc: Kevin Tian Cc: Liu Yi L Signed-off-by: Lu Baolu Reviewed-by: Kevin Tian --- drivers/iommu/intel-svm.c | 22 +++--- include/linux/intel-iommu.h | 1 - 2 files

Re: [PATCH v6 01/11] ARM: sunxi: smp: Move assembly code into a file

2018-04-16 Thread Chen-Yu Tsai
On Tue, Apr 17, 2018 at 5:50 AM, Mylène Josserand wrote: > Move the assembly code for cluster cache enabling and resuming > into an assembly file instead of having it directly in C code. > > Remove the CFLAGS because we are using the ARM directive "arch" > instead. > > Signed-off-by: Mylène Josser

<    5   6   7   8   9   10   11   >