[PATCH v8] PCI: Workaround wrong flags completions for IDT switch

2018-03-06 Thread James Puthukattukaran
The IDT switch incorrectly flags an ACS source violation on a read config request to an end point device on the completion (IDT 89H32H8G3-YC, errata #36) even though the PCI Express spec states that completions are never affected by ACS source violation (PCI Spec 3.1, Section 6.12.1.1). Here's t

[PATCH] mm: might_sleep warning

2018-03-06 Thread Pavel Tatashin
Robot reported this issue: https://lkml.org/lkml/2018/2/27/851 That is introduced by: mm: initialize pages on demand during boot The problem is caused by changing static branch value within spin lock. Spin lock disables preemption, and changing static branch value takes mutex lock in its path, an

Re: [PATCH 1/2] mmc: bcm2835: reset host on timeout

2018-03-06 Thread Michal Suchánek
Hello, On Sat, 3 Mar 2018 14:58:45 +0100 (CET) Stefan Wahren wrote: > Hi Michal, > > yesterday i finished my stress tests with Raspberry Pi 3. > > Scenario: > - copy Tumbleweed on SD card > (openSUSE-Tumbleweed-ARM-JeOS-raspberrypi3.aarch64-2018.02.02-Build1.2.raw, > Linux 4.14.15) > - setup

Re: [PATCH v2 0/8] PECI device driver introduction

2018-03-06 Thread Jae Hyun Yoo
Hi Pavel, Please see my answer inline. On 3/6/2018 4:40 AM, Pavel Machek wrote: Hi! Introduction of the Platform Environment Control Interface (PECI) bus device driver. PECI is a one-wire bus interface that provides a communication channel between Intel processor and chipset components to ext

[PATCH v8 13/63] xarray: Add definition of struct xarray

2018-03-06 Thread Matthew Wilcox
From: Matthew Wilcox This is a direct replacement for struct radix_tree_root. Some of the struct members have changed name; convert those, and use a #define so that radix_tree users continue to work without change. Signed-off-by: Matthew Wilcox --- include/linux/radix-tree.h | 3

[PATCH v8 48/63] shmem: Convert shmem_add_to_page_cache to XArray

2018-03-06 Thread Matthew Wilcox
From: Matthew Wilcox This removes the last caller of radix_tree_maybe_preload_order(). Simpler code, unless we run out of memory for new xa_nodes partway through inserting entries into the xarray. Hopefully we can support multi-index entries in the page cache soon and all the awful code goes awa

[PATCH v8 02/63] radix tree: Use GFP_ZONEMASK bits of gfp_t for flags

2018-03-06 Thread Matthew Wilcox
From: Matthew Wilcox None of these bits may be used for slab allocations, so we can use them as radix tree flags as long as we mask them off before passing them to the slab allocator. Move the IDR flag from the high bits to the GFP_ZONEMASK bits. Signed-off-by: Matthew Wilcox Acked-by: Jeff La

[PATCH v8 46/63] shmem: Convert shmem_confirm_swap to XArray

2018-03-06 Thread Matthew Wilcox
From: Matthew Wilcox xa_load has its own RCU locking, so we can eliminate it here. Signed-off-by: Matthew Wilcox --- mm/shmem.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/mm/shmem.c b/mm/shmem.c index 5813808965cd..0af8a439dfad 100644 --- a/mm/shmem.c +++ b/mm/sh

[PATCH v8 62/63] page cache: Finish XArray conversion

2018-03-06 Thread Matthew Wilcox
From: Matthew Wilcox With no more radix tree API users left, we can drop the GFP flags and use xa_init() instead of INIT_RADIX_TREE(). Signed-off-by: Matthew Wilcox --- fs/inode.c | 2 +- mm/swap_state.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/inode.c b/f

[PATCH v8 63/63] radix tree: Remove unused functions

2018-03-06 Thread Matthew Wilcox
From: Matthew Wilcox The following functions are (now) unused: - __radix_tree_delete_node - radix_tree_gang_lookup_slot - radix_tree_join - radix_tree_maybe_preload_order - radix_tree_split - radix_tree_split_preload Signed-off-by: Matthew Wilcox --- include/linux/radix-tree.h | 16 +--

[PATCH v8 45/63] shmem: Convert replace to XArray

2018-03-06 Thread Matthew Wilcox
From: Matthew Wilcox shmem_radix_tree_replace() is renamed to shmem_xa_replace() and converted to use the XArray API. Signed-off-by: Matthew Wilcox --- mm/shmem.c | 22 -- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/mm/shmem.c b/mm/shmem.c index ac53cae5d

[PATCH v8 60/63] lustre: Convert to XArray

2018-03-06 Thread Matthew Wilcox
From: Matthew Wilcox Signed-off-by: Matthew Wilcox --- drivers/staging/lustre/lustre/llite/glimpse.c | 12 +--- drivers/staging/lustre/lustre/mdc/mdc_request.c | 16 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/drivers/staging/lustre/lustre/llite/g

[PATCH v8 61/63] dax: Convert to XArray

2018-03-06 Thread Matthew Wilcox
From: Matthew Wilcox The DAX code (by its nature) is deeply interwoven with the radix tree infrastructure, doing operations directly on the radix tree slots. Convert the whole file to use XArray concepts; mostly passing around xa_state instead of address_space, index or slot. Signed-off-by: Matt

[PATCH v8 56/63] fs: Convert buffer to XArray

2018-03-06 Thread Matthew Wilcox
From: Matthew Wilcox Mostly comment fixes, but one use of __xa_set_tag. Signed-off-by: Matthew Wilcox --- fs/buffer.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/fs/buffer.c b/fs/buffer.c index 3ee82c056d85..70af8fbc64cf 100644 --- a/fs/buffer.c +++ b/fs/

[PATCH v8 55/63] btrfs: Convert page cache to XArray

2018-03-06 Thread Matthew Wilcox
From: Matthew Wilcox Signed-off-by: Matthew Wilcox --- fs/btrfs/compression.c | 4 +--- fs/btrfs/extent_io.c | 8 +++- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c index ad330af89eef..c2286f436571 100644 --- a/fs/btrfs/comp

[PATCH v8 58/63] nilfs2: Convert to XArray

2018-03-06 Thread Matthew Wilcox
From: Matthew Wilcox I'm not 100% convinced that the rewrite of nilfs_copy_back_pages is correct, but it will at least have different bugs from the current version. Signed-off-by: Matthew Wilcox --- fs/nilfs2/btnode.c | 37 +++- fs/nilfs2/page.c | 72 +

[PATCH v8 57/63] fs: Convert writeback to XArray

2018-03-06 Thread Matthew Wilcox
From: Matthew Wilcox A couple of short loops. Signed-off-by: Matthew Wilcox --- fs/fs-writeback.c | 25 + 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index 091577edc497..98e5e08274a2 100644 --- a/fs/fs-writeback.c

[PATCH v8 59/63] f2fs: Convert to XArray

2018-03-06 Thread Matthew Wilcox
From: Matthew Wilcox This is a straightforward conversion. Signed-off-by: Matthew Wilcox --- fs/f2fs/data.c | 3 +-- fs/f2fs/dir.c| 5 + fs/f2fs/inline.c | 6 +- fs/f2fs/node.c | 10 ++ 4 files changed, 5 insertions(+), 19 deletions(-) diff --git a/fs/f2fs/data.c b/

[PATCH v8 54/63] shmem: Comment fixups

2018-03-06 Thread Matthew Wilcox
From: Matthew Wilcox Remove the last mentions of radix tree from various comments. Signed-off-by: Matthew Wilcox --- mm/shmem.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/mm/shmem.c b/mm/shmem.c index 707430003ec7..6b044cb6c8b5 100644 --- a/mm/shmem.c +++

[pci PATCH v3 0/3] Add support for unmanaged SR-IOV

2018-03-06 Thread Alexander Duyck
This series is meant to add support for SR-IOV on devices when the VFs are not managed by the kernel. Examples of recent patches attempting to do this include: virto - https://patchwork.kernel.org/patch/10241225/ pci-stub - https://patchwork.kernel.org/patch/10109935/ vfio - https://patchwork.kerne

Re: [PATCH] usb,signal,security: only pass the cred, not the secid, to kill_pid_info_as_cred and security_task_kill

2018-03-06 Thread Casey Schaufler
On 3/6/2018 11:01 AM, Paul Moore wrote: > On Fri, Sep 8, 2017 at 6:09 PM, James Morris wrote: >> On Fri, 8 Sep 2017, Paul Moore wrote: >>> Looks fine to me from a SELinux perspective. If Casey and John are >>> happy with this I can volunteer to pull it into the selinux/next tree >>> (once the mer

[pci PATCH v3 1/3] pci-iov: Add support for unmanaged SR-IOV

2018-03-06 Thread Alexander Duyck
From: Alexander Duyck This patch is meant to add some basic functionality to support for SR-IOV on devices when the VFs are not managed by the kernel. The functions provided here can be used by drivers such as vfio-pci and virtio to enable SR-IOV on devices that are either managed by userspace, o

[pci PATCH v3 2/3] vfio: Add support for unmanaged or userspace managed SR-IOV

2018-03-06 Thread Alexander Duyck
From: Alexander Duyck This patch is meant to allow assignment of an SR-IOV enabled PF, as in VFs have been generated, with vfio-pci. My understanding is the primary use case for this is something like DPDK running the PF while the VFs are all assigned to guests. A secondary effect of this is tha

[pci PATCH v3 3/3] virtio_pci: Add support for unmanaged SR-IOV on virtio_pci devices

2018-03-06 Thread Alexander Duyck
From: Alexander Duyck Hardware-realized virtio_pci devices can implement SR-IOV, so this patch enables its use. The device in question is an upcoming Intel NIC that implements both a virtio_net PF and virtio_net VFs. These are hardware realizations of what has been up to now been a software inter

[PATCH v8 49/63] shmem: Convert shmem_alloc_hugepage to XArray

2018-03-06 Thread Matthew Wilcox
From: Matthew Wilcox xa_find() is a slightly easier API to use than radix_tree_gang_lookup_slot() because it contains its own RCU locking. Signed-off-by: Matthew Wilcox --- mm/shmem.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/mm/shmem.c b/mm/shmem.c in

[PATCH v8 52/63] memfd: Convert shmem_tag_pins to XArray

2018-03-06 Thread Matthew Wilcox
From: Matthew Wilcox Simplify the locking by taking the spinlock while we walk the tree on the assumption that many acquires and releases of the lock will be worse than holding the lock for a (potentially) long time. We could replicate the same locking behaviour with the xarray, but would have t

[PATCH v8 50/63] shmem: Convert shmem_free_swap to XArray

2018-03-06 Thread Matthew Wilcox
From: Matthew Wilcox This is a perfect use for xa_cmpxchg(). Note the use of 0 for GFP flags; we won't be allocating memory. Signed-off-by: Matthew Wilcox --- mm/shmem.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/mm/shmem.c b/mm/shmem.c index a0a354a87f3b..cfbf

[PATCH v8 51/63] shmem: Convert shmem_partial_swap_usage to XArray

2018-03-06 Thread Matthew Wilcox
From: Matthew Wilcox Simpler code because the xarray takes care of things like the limit and dereferencing the slot. Signed-off-by: Matthew Wilcox --- mm/shmem.c | 18 +++--- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/mm/shmem.c b/mm/shmem.c index cfbffb4b47a2..

[PATCH v8 53/63] memfd: Convert shmem_wait_for_pins to XArray

2018-03-06 Thread Matthew Wilcox
From: Matthew Wilcox As with shmem_tag_pins(), hold the lock around the entire loop instead of acquiring & dropping it for each entry we're going to untag. Signed-off-by: Matthew Wilcox --- mm/memfd.c | 61 + 1 file changed, 25 insert

[PATCH v8 47/63] shmem: Convert find_swap_entry to XArray

2018-03-06 Thread Matthew Wilcox
From: Matthew Wilcox This is a 1:1 conversion. Signed-off-by: Matthew Wilcox --- mm/shmem.c | 23 +++ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/mm/shmem.c b/mm/shmem.c index 0af8a439dfad..49f42dc9e1dc 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -1076,2

Re: [PATCH v6] arm64: Add support for new control bits CTR_EL0.DIC and CTR_EL0.IDC

2018-03-06 Thread Shanker Donthineni
Hi Will, On 03/06/2018 12:48 PM, Shanker Donthineni wrote: > Hi Will, > > On 03/06/2018 09:23 AM, Will Deacon wrote: >> Hi Shanker, >> >> On Tue, Mar 06, 2018 at 08:47:27AM -0600, Shanker Donthineni wrote: >>> On 03/06/2018 07:44 AM, Will Deacon wrote: I think this is a slight asymmetry with

[PATCH v8 43/63] mm: Convert khugepaged_scan_shmem to XArray

2018-03-06 Thread Matthew Wilcox
From: Matthew Wilcox Slightly shorter and easier to read code. Signed-off-by: Matthew Wilcox --- mm/khugepaged.c | 17 + 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/mm/khugepaged.c b/mm/khugepaged.c index 3685c8e2b3dc..39e260a0639c 100644 --- a/mm/khugepaged.

[PATCH v8 42/63] mm: Convert collapse_shmem to XArray

2018-03-06 Thread Matthew Wilcox
From: Matthew Wilcox I found another victim of the radix tree being hard to use. Because there was no call to radix_tree_preload(), khugepaged was allocating radix_tree_nodes using GFP_ATOMIC. I also converted a local_irq_save()/restore() pair to disable()/enable(). Signed-off-by: Matthew Wilc

[PATCH v8 44/63] pagevec: Use xa_tag_t

2018-03-06 Thread Matthew Wilcox
From: Matthew Wilcox Removes sparse warnings. Signed-off-by: Matthew Wilcox --- fs/btrfs/extent_io.c| 4 ++-- fs/ext4/inode.c | 2 +- fs/f2fs/data.c | 2 +- fs/gfs2/aops.c | 2 +- include/linux/pagevec.h | 8 +--- mm/swap.c | 4 ++-- 6 files chan

[PATCH v8 41/63] mm: Convert huge_memory to XArray

2018-03-06 Thread Matthew Wilcox
From: Matthew Wilcox Quite a straightforward conversion. Signed-off-by: Matthew Wilcox --- mm/huge_memory.c | 17 +++-- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/mm/huge_memory.c b/mm/huge_memory.c index 89737c0e0d34..354b7f768d0f 100644 --- a/mm/huge_memory.c

[PATCH v8 39/63] mm: Convert __do_page_cache_readahead to XArray

2018-03-06 Thread Matthew Wilcox
From: Matthew Wilcox This one is trivial. Signed-off-by: Matthew Wilcox --- mm/readahead.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/mm/readahead.c b/mm/readahead.c index 3ff9763b0461..5f528d649d5e 100644 --- a/mm/readahead.c +++ b/mm/readahead.c @@ -174,9 +174,7 @

[PATCH v8 14/63] xarray: Define struct xa_node

2018-03-06 Thread Matthew Wilcox
From: Matthew Wilcox This is a direct replacement for struct radix_tree_node. A couple of struct members have changed name, so convert those. Use a #define so that radix tree users continue to work without change. Signed-off-by: Matthew Wilcox --- include/linux/radix-tree.h| 29 +

[PATCH v8 40/63] mm: Convert page migration to XArray

2018-03-06 Thread Matthew Wilcox
From: Matthew Wilcox Signed-off-by: Matthew Wilcox --- mm/migrate.c | 41 - 1 file changed, 16 insertions(+), 25 deletions(-) diff --git a/mm/migrate.c b/mm/migrate.c index 740b71857898..9a15d27768a0 100644 --- a/mm/migrate.c +++ b/mm/migrate.c @@ -322,7

[PATCH v8 34/63] mm: Convert page-writeback to XArray

2018-03-06 Thread Matthew Wilcox
From: Matthew Wilcox Includes moving mapping_tagged() to fs.h as a static inline, and changing it to return bool. Signed-off-by: Matthew Wilcox --- include/linux/fs.h | 17 +-- mm/page-writeback.c | 63 +++-- 2 files changed, 32 inse

[PATCH v8 35/63] mm: Convert workingset to XArray

2018-03-06 Thread Matthew Wilcox
From: Matthew Wilcox We construct a fake XA_STATE and use it to delete the node with xa_store() rather than adding a special function for this unique use case. Signed-off-by: Matthew Wilcox --- include/linux/swap.h | 9 - mm/workingset.c | 51 ++---

[PATCH v8 36/63] mm: Convert truncate to XArray

2018-03-06 Thread Matthew Wilcox
From: Matthew Wilcox This is essentially xa_cmpxchg() with the locking handled above us, and it doesn't have to handle replacing a NULL entry. Signed-off-by: Matthew Wilcox --- mm/truncate.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/mm/truncate.c b/mm/

[PATCH v8 37/63] mm: Convert add_to_swap_cache to XArray

2018-03-06 Thread Matthew Wilcox
From: Matthew Wilcox Combine __add_to_swap_cache and add_to_swap_cache into one function since there is no more need to preload. Signed-off-by: Matthew Wilcox --- mm/swap_state.c | 93 ++--- 1 file changed, 29 insertions(+), 64 deletions(-)

[PATCH v8 38/63] mm: Convert delete_from_swap_cache to XArray

2018-03-06 Thread Matthew Wilcox
From: Matthew Wilcox Both callers of __delete_from_swap_cache have the swp_entry_t already, so pass that in to make constructing the XA_STATE easier. Signed-off-by: Matthew Wilcox --- include/linux/swap.h | 5 +++-- mm/swap_state.c | 24 ++-- mm/vmscan.c | 2

[PATCH v8 32/63] page cache: Remove stray radix comment

2018-03-06 Thread Matthew Wilcox
From: Matthew Wilcox Signed-off-by: Matthew Wilcox --- mm/filemap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/filemap.c b/mm/filemap.c index 0635e9cdbc06..86c83014c909 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -2579,7 +2579,7 @@ static struct page *do_read_cac

[PATCH v8 31/63] page cache: Convert delete_batch to XArray

2018-03-06 Thread Matthew Wilcox
From: Matthew Wilcox Rename the function from page_cache_tree_delete_batch to just page_cache_delete_batch. Signed-off-by: Matthew Wilcox --- mm/filemap.c | 28 +--- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/mm/filemap.c b/mm/filemap.c index 5a6c7c

[PATCH v8 33/63] page cache: Convert filemap_range_has_page to XArray

2018-03-06 Thread Matthew Wilcox
From: Matthew Wilcox Instead of calling find_get_pages_range() and putting any reference, use xas_find() to iterate over any entries in the range, skipping the shadow/swap entries. Signed-off-by: Matthew Wilcox --- mm/filemap.c | 26 ++ 1 file changed, 18 insertions(+),

[PATCH v8 28/63] page cache: Add and replace pages using the XArray

2018-03-06 Thread Matthew Wilcox
From: Matthew Wilcox Use the XArray APIs to add and replace pages in the page cache. This removes two uses of the radix tree preload API and is significantly shorter code. Signed-off-by: Matthew Wilcox --- include/linux/swap.h | 8 ++- mm/filemap.c | 143 ++--

[PATCH v8 30/63] page cache: Convert page cache lookups to XArray

2018-03-06 Thread Matthew Wilcox
From: Matthew Wilcox Introduce page_cache_pin() to factor out the common logic between the various lookup routines: find_get_entry find_get_entries find_get_pages_range find_get_pages_contig find_get_pages_range_tag find_get_entries_tag filemap_map_pages By using the xa_state to control the ite

[PATCH v8 25/63] xarray: Add MAINTAINERS entry

2018-03-06 Thread Matthew Wilcox
From: Matthew Wilcox Add myself as XArray and IDR maintainer. Signed-off-by: Matthew Wilcox --- MAINTAINERS | 12 1 file changed, 12 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 6d78237066ab..08613d97a74d 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -15293,6 +15293

[PATCH v8 27/63] page cache: Convert hole search to XArray

2018-03-06 Thread Matthew Wilcox
From: Matthew Wilcox The page cache offers the ability to search for a miss in the previous or next N locations. Rather than teach the XArray about the page cache's definition of a miss, use xas_prev() and xas_next() to search the page array. This should be more efficient as it does not have to

[PATCH v8 26/63] page cache: Rearrange address_space

2018-03-06 Thread Matthew Wilcox
From: Matthew Wilcox Change i_pages from a radix_tree_root to an xarray, convert the documentation into kernel-doc format and change the order of the elements to pack them better on 64-bit systems. Signed-off-by: Matthew Wilcox --- include/linux/fs.h | 46 +++---

Re: [PATCH 3/3] media: vb2-core: vb2_ops: document non-interrupt-cantext calling

2018-03-06 Thread Luca Ceresoli
Hi, I noticed a typo in the title: cantext -> context I will fix in v2. On 28/02/2018 23:24, Luca Ceresoli wrote: > Driver writers can benefit in knowing if/when callbacks are called in > interrupt context. But it is not completely obvious here, so document it. > > Signed-off-by: Luca Ceresoli

[PATCH v8 29/63] page cache: Convert page deletion to XArray

2018-03-06 Thread Matthew Wilcox
From: Matthew Wilcox The code is slightly shorter and simpler. Signed-off-by: Matthew Wilcox --- mm/filemap.c | 30 ++ 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/mm/filemap.c b/mm/filemap.c index 0e19ea454cba..bdda1beda932 100644 --- a/mm/filema

[PATCH v8 20/63] xarray: Add xa_for_each

2018-03-06 Thread Matthew Wilcox
From: Matthew Wilcox This iterator allows the user to efficiently walk a range of the array, executing the loop body once for each entry in that range that matches the filter. This commit also includes xa_find() and xa_find_above() which are helper functions for xa_for_each() but may also be use

[PATCH v8 21/63] xarray: Add xa_extract

2018-03-06 Thread Matthew Wilcox
From: Matthew Wilcox This function combines the functionality of radix_tree_gang_lookup() and radix_tree_gang_lookup_tagged(). It extracts entries matching the specified filter into a normal array. Signed-off-by: Matthew Wilcox --- include/linux/xarray.h | 2 ++ lib/xarray.c | 80 +

[PATCH v8 22/63] xarray: Add xa_destroy

2018-03-06 Thread Matthew Wilcox
From: Matthew Wilcox This function frees all the internal memory allocated to the xarray and reinitialises it to be empty. Signed-off-by: Matthew Wilcox --- include/linux/xarray.h | 1 + lib/xarray.c | 28 2 files changed, 29 insertions(+) diff --git a/

[PATCH v8 23/63] xarray: Add xas_next and xas_prev

2018-03-06 Thread Matthew Wilcox
From: Matthew Wilcox These two functions move the xas index by one position, and adjust the rest of the iterator state to match it. This is more efficient than calling xas_set() as it keeps the iterator at the leaves of the tree instead of walking the iterator from the root each time. Signed-of

[PATCH v8 24/63] xarray: Add xas_create_range

2018-03-06 Thread Matthew Wilcox
From: Matthew Wilcox This hopefully temporary function is useful for users who have not yet been converted to multi-index entries. Signed-off-by: Matthew Wilcox --- include/linux/xarray.h | 2 ++ lib/xarray.c | 22 ++ 2 files changed, 24 insertions(+) diff --git

[PATCH v8 18/63] xarray: Add xa_store

2018-03-06 Thread Matthew Wilcox
From: Matthew Wilcox xa_store() differs from radix_tree_insert() in that it will overwrite an existing element in the array rather than returning an error. This is the behaviour which most users want, and those that want more complex behaviour generally want to use the xas family of routines any

[PATCH v8 19/63] xarray: Add xa_cmpxchg and xa_insert

2018-03-06 Thread Matthew Wilcox
From: Matthew Wilcox Like cmpxchg(), xa_cmpxchg will only store to the index if the current entry matches the old entry. It returns the current entry, which is usually more useful than the errno returned by radix_tree_insert(). For the users who really only want the errno, the xa_insert() wrappe

[PATCH v8 15/63] xarray: Add documentation

2018-03-06 Thread Matthew Wilcox
From: Matthew Wilcox This is documentation on how to use the XArray, not details about its internal implementation. Signed-off-by: Matthew Wilcox --- Documentation/core-api/index.rst | 1 + Documentation/core-api/xarray.rst | 361 ++ 2 files changed, 362

[PATCH v8 16/63] xarray: Add xa_load

2018-03-06 Thread Matthew Wilcox
From: Matthew Wilcox This first function in the XArray API brings with it a lot of support infrastructure. The advanced API is based around the xa_state which is a more capable version of the radix_tree_iter. As the test-suite demonstrates, it is possible to use the xarray and radix tree APIs o

[PATCH v8 17/63] xarray: Add xa_get_tag, xa_set_tag and xa_clear_tag

2018-03-06 Thread Matthew Wilcox
From: Matthew Wilcox XArray tags are slightly more strongly typed than the radix tree tags, but occupy the same bits. This commit also adds the xas_ family of tag operations, for cases where the caller is already holding the lock, and xa_tagged() to ask whether any array member has a particular

[PATCH v8 10/63] page cache: Use xa_lock

2018-03-06 Thread Matthew Wilcox
From: Matthew Wilcox Remove the address_space ->tree_lock and use the xa_lock newly added to the radix_tree_root. Rename the address_space ->page_tree to ->i_pages, since we don't really care that it's a tree. Signed-off-by: Matthew Wilcox Acked-by: Jeff Layton --- Documentation/cgroup-v1/me

[PATCH v8 11/63] xarray: Replace exceptional entries

2018-03-06 Thread Matthew Wilcox
From: Matthew Wilcox Introduce xarray value entries to replace the radix tree exceptional entry code. This is a slight change in encoding to allow the use of an extra bit (we can now store BITS_PER_LONG - 1 bits in a value entry). It is also a change in emphasis; exceptional entries are intimida

Re: [PATCH v3 01/10] drivers: qcom: rpmh-rsc: add RPMH controller for QCOM SoCs

2018-03-06 Thread Stephen Boyd
Quoting Lina Iyer (2018-03-02 08:43:08) > Add controller driver for QCOM SoCs that have hardware based shared > resource management. The hardware IP known as RSC (Resource State > Coordinator) houses multiple Direct Resource Voter (DRV) for different > execution levels. A DRV is a unique voter on t

[PATCH v8 01/63] mac80211_hwsim: Use DEFINE_IDA

2018-03-06 Thread Matthew Wilcox
From: Matthew Wilcox This is preferred to opencoding an IDA_INIT. Signed-off-by: Matthew Wilcox --- drivers/net/wireless/mac80211_hwsim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c index 7b6

[PATCH v8 12/63] xarray: Change definition of sibling entries

2018-03-06 Thread Matthew Wilcox
From: Matthew Wilcox Instead of storing a pointer to the slot containing the canonical entry, store the offset of the slot. Produces slightly more efficient code (~300 bytes) and simplifies the implementation. Signed-off-by: Matthew Wilcox --- include/linux/xarray.h | 93 +

[PATCH v8 09/63] xarray: Add the xa_lock to the radix_tree_root

2018-03-06 Thread Matthew Wilcox
From: Matthew Wilcox This results in no change in structure size on 64-bit machines as it fits in the padding between the gfp_t and the void *. 32-bit machines will grow the structure from 8 to 12 bytes. Almost all radix trees are protected with (at least) a spinlock, so as they are converted f

[PATCH v8 08/63] fscache: Use appropriate radix tree accessors

2018-03-06 Thread Matthew Wilcox
From: Matthew Wilcox Don't open-code accesses to data structure internals. Signed-off-by: Matthew Wilcox Reviewed-by: Jeff Layton --- fs/fscache/cookie.c | 2 +- fs/fscache/object.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/fscache/cookie.c b/fs/fscache/cookie.

[PATCH v8 07/63] xfs: Rename xa_ elements to ail_

2018-03-06 Thread Matthew Wilcox
From: Matthew Wilcox This is a simple rename, except that xa_ail becomes ail_head. Signed-off-by: Matthew Wilcox Reviewed-by: Darrick J. Wong --- fs/xfs/xfs_buf_item.c| 10 ++-- fs/xfs/xfs_dquot.c | 4 +- fs/xfs/xfs_dquot_item.c | 11 ++-- fs/xfs/xfs_inode_item.c | 22 +++

[PATCH v8 06/63] btrfs: Use filemap_range_has_page()

2018-03-06 Thread Matthew Wilcox
From: Matthew Wilcox The current implementation of btrfs_page_exists_in_range() gives the wrong answer if the workingset code has stored a shadow entry in the page cache. The filemap_range_has_page() function does not have this problem, and it's shared code, so use it instead. Signed-off-by: Ma

[PATCH v8 04/63] unicore32: Turn flush_dcache_mmap_lock into a no-op

2018-03-06 Thread Matthew Wilcox
From: Matthew Wilcox Unicore doesn't walk the VMA tree in its flush_dcache_page() implementation, so has no need to take the tree_lock. Signed-off-by: Matthew Wilcox --- arch/unicore32/include/asm/cacheflush.h | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/unico

[PATCH v8 05/63] Export __set_page_dirty

2018-03-06 Thread Matthew Wilcox
From: Matthew Wilcox XFS currently contains a copy-and-paste of __set_page_dirty(). Export it from buffer.c instead. Signed-off-by: Matthew Wilcox Acked-by: Jeff Layton --- fs/buffer.c| 3 ++- fs/xfs/xfs_aops.c | 15 ++- include/linux/mm.h | 1 + 3 files changed, 5 ins

[PATCH v8 00/63] XArray v8

2018-03-06 Thread Matthew Wilcox
Added acks from Jeff Layton (thanks!) - Renamed the address_space ->pages to ->i_pages - Used GFP_ZONEMASK instead of the more obtuse shifting by 4 (Jeff Layton) - Realised that page_cache_range_empty() and filemap_range_has_page() were essentially the same function, so redid that pair o

[PATCH v8 03/63] arm64: Turn flush_dcache_mmap_lock into a no-op

2018-03-06 Thread Matthew Wilcox
From: Matthew Wilcox ARM64 doesn't walk the VMA tree in its flush_dcache_page() implementation, so has no need to take the tree_lock. Signed-off-by: Matthew Wilcox Reviewed-by: Will Deacon --- arch/arm64/include/asm/cacheflush.h | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) dif

Re: [PATCH net-next] modules: allow modprobe load regular elf binaries

2018-03-06 Thread Andy Lutomirski
On Tue, Mar 6, 2018 at 1:34 AM, Alexei Starovoitov wrote: > As the first step in development of bpfilter project [1] the request_module() > code is extended to allow user mode helpers to be invoked. Idea is that > user mode helpers are built as part of the kernel build and installed as > tradition

Re: [PATCH] kernel/sys_ni: sort cond_syscall() entries

2018-03-06 Thread Randy Dunlap
On 03/06/2018 10:53 AM, Dominik Brodowski wrote: > diff --git a/kernel/sys_ni.c b/kernel/sys_ni.c > index b5189762d275..44c65e4d2528 100644 > --- a/kernel/sys_ni.c > +++ b/kernel/sys_ni.c > @@ -17,245 +17,403 @@ asmlinkage long sys_ni_syscall(void) > return -ENOSYS; > } > > -cond_syscall(

Re: Regulator regression in next-20180305

2018-03-06 Thread Fabio Estevam
Hi Mark, On Tue, Mar 6, 2018 at 4:12 PM, Mark Brown wrote: > Yeah, that's what I expected. What we really need to figure out I think > is what exactly is taking the lock that we end up colliding with, I > don't seem to be able to reproduce so I'm having to just go on staring > at the code here.

[PATCH v1] xen: acpi: upload _PSD info for offline CPUs too

2018-03-06 Thread Joao Martins
All uploaded PM data from offline CPUs takes the info from vCPU 0 and changing only the acpi_id. For processors which P-state coordination type is HW_ALL (0xFD) it is OK to upload bogus P-state dependency information (_PSD), because Xen will ignore cpufreq domains existence. Albeit for hardware ex

Re: [PATCH] pci-iov: Add support for unmanaged SR-IOV

2018-03-06 Thread Don Dutile
On 03/05/2018 04:41 PM, Alexander Duyck wrote: On Mon, Mar 5, 2018 at 12:57 PM, Don Dutile wrote: On 03/01/2018 03:22 PM, Alex Williamson wrote: On Wed, 28 Feb 2018 16:36:38 -0800 Alexander Duyck wrote: On Wed, Feb 28, 2018 at 2:59 PM, Alex Williamson wrote: On Wed, 28 Feb 2018 09:49:21

Re: [PATCH v3 2/4] rtc: isl1208: switch to rtc_register_device

2018-03-06 Thread Alexandre Belloni
On 05/03/2018 at 10:43:53 +, Denis OSTERLAND wrote: > From: Denis Osterland > > Fix possible race condition. > It is not allowed to return with an error code after RTC is registered. > > Suggested-by: Alexandre Belloni > Signed-off-by: Denis Osterland > Reviewed-by: Michael Grzeschik > --

Re: [PATCH v3 1/4] rtc: isl1208: enable interrupt after context preparation

2018-03-06 Thread Alexandre Belloni
On 05/03/2018 at 10:43:53 +, Denis OSTERLAND wrote: > From: Michael Grzeschik > > The interrupt handler got enabled very early. If the interrupt cause is > triggering immediately before the context is fully prepared. This can > lead to undefined behaviour. Therefor we move the interrupt enabl

Re: [PATCH 3/3] staging:iio:meter: Aligns open parenthesis

2018-03-06 Thread Rodrigo Siqueira
Hi On 03/06, Dan Carpenter wrote: > On Tue, Mar 06, 2018 at 09:26:07AM -0300, Rodrigo Siqueira wrote: > > @@ -63,7 +63,7 @@ int ade7758_probe_trigger(struct iio_dev *indio_dev) > > int ret; > > > > st->trig = iio_trigger_alloc("%s-dev%d", > > - spi_get_d

[RESEND PATCH v3] crypto: add zBeWalgo compression for zram

2018-03-06 Thread Benjamin Warnke
Currently ZRAM uses compression-algorithms from the crypto-api. ZRAM compresses each page individually. As a result the compression algorithm is forced to use a very small sliding window. None of the available compression algorithms is designed to achieve high compression ratios with small inputs.

Re: [PATCH 6/7] perf auxtrace: Make auxtrace_queues__add_buffer() allocate struct buffer

2018-03-06 Thread Arnaldo Carvalho de Melo
Em Tue, Mar 06, 2018 at 11:13:17AM +0200, Adrian Hunter escreveu: > In preparation for supporting AUX area sampling buffers, > auxtrace_queues__add_buffer() needs to be more generic. To that end, move > memory allocation for struct buffer into it. > > Signed-off-by: Adrian Hunter > --- > tools/p

Re: [PATCH net-next] modules: allow modprobe load regular elf binaries

2018-03-06 Thread Linus Torvalds
On Tue, Mar 6, 2018 at 12:01 PM, Andy Lutomirski wrote: > > I assume I'm missing some context here, but why does this need to be > handled by the kernel rather than, say, a change to how modprobe > works? Honestly, the less we have to mess with user-mode tooling, the better. We've been *so* much

Re: [PATCH v2 6/8] [PATCH 6/8] Documentation: hwmon: Add a document for PECI hwmon client driver

2018-03-06 Thread Randy Dunlap
Hi, On 02/21/2018 08:16 AM, Jae Hyun Yoo wrote: > +temp_labelProvides DDR DIMM temperature if this label > indicates > + 'DIMM #'. > +temp_inputProvides current temperature of the DDR DIMM. > + > +Note: > + DIMM temperature group will be ap

Re: [PATCH] perf stat: fix cvs output format

2018-03-06 Thread Ilya Pronin
Speaking from the user's seat. An optional (not just empty) cgroup field is fine as long it consistently appears when requested with -G option. The problem with print_metric_csv() was that in the case of unsupported counters 2 additional empty fields in the output are completely unexpected and not

Re: [PATCH] mm: might_sleep warning

2018-03-06 Thread Andrew Morton
On Tue, 6 Mar 2018 14:20:22 -0500 Pavel Tatashin wrote: > Robot reported this issue: > https://lkml.org/lkml/2018/2/27/851 > > That is introduced by: > mm: initialize pages on demand during boot > > The problem is caused by changing static branch value within spin lock. > Spin lock disables p

Re: Simplifying our RCU models

2018-03-06 Thread Paul E. McKenney
On Tue, Mar 06, 2018 at 09:47:38AM +0100, Ingo Molnar wrote: > > * Paul E. McKenney wrote: > > > > > But if we look at the bigger API picture: > > > > > > > > !PREEMPT_RCU PREEMPT_RCU=y > > > > rcu_read_lock():atomicpreemptible > > > > rcu_read_lock

linux-next: Signed-off-by missing for commit in the v4l-dvb tree

2018-03-06 Thread Stephen Rothwell
Hi Mauro, Commit c20ffbfe085f ("media: dvb-usb-cxusb: Geniatech T230C support") is missing a Signed-off-by from its author. -- Cheers, Stephen Rothwell pgpkTsw7_vZOJ.pgp Description: OpenPGP digital signature

Re: [PATCH v3 3/4] rtc: isl1208: add support for isl1219 with tamper detection

2018-03-06 Thread Alexandre Belloni
On 05/03/2018 at 10:43:52 +, Denis OSTERLAND wrote: > diff --git a/Documentation/devicetree/bindings/rtc/isil,isl1219.txt > b/Documentation/devicetree/bindings/rtc/isil,isl1219.txt > new file mode 100644 > index 000..7937c13 > --- /dev/null > +++ b/Documentation/devicetree/bindings/rtc/isi

Re: [RFC PATCH 0/4 v2] Define killable version for access_remote_vm() and use it in fs/proc

2018-03-06 Thread Andrew Morton
On Tue, 27 Feb 2018 08:25:47 +0800 Yang Shi wrote: > > Background: > When running vm-scalability with large memory (> 300GB), the below hung > task issue happens occasionally. > > INFO: task ps:14018 blocked for more than 120 seconds. >Tainted: GE 4.9.79-009.ali3000.alios7.x

[GIT PULL] SCSI fixes for 4.16-rc4

2018-03-06 Thread James Bottomley
This patch is mostly fixes for driver specific issues (nine of them) and the storvsc performance improvement with interrupt handling which was dropped from the previous fixes pull request.  We also have two regressions: one is a double call_rcu() in ATA error handling and the other is a missed conv

Re: [PATCH] mm: might_sleep warning

2018-03-06 Thread Andrew Morton
On Tue, 6 Mar 2018 15:48:26 -0500 Pavel Tatashin wrote: > On Tue, Mar 6, 2018 at 3:36 PM, Andrew Morton > wrote: > > > On Tue, 6 Mar 2018 14:20:22 -0500 Pavel Tatashin < > > pasha.tatas...@oracle.com> wrote: > > > > > spin_lock(&deferred_zone_grow_lock); > > > - static_branch_disabl

Re: [PATH 0/4] usbip: make vhci_hcd.* objects independent of vhci_hcd.0

2018-03-06 Thread Shuah Khan
On 03/06/2018 01:35 AM, Salvador Fandiño wrote: > > > On 03/06/2018 01:03 AM, Shuah Khan wrote: >> On 03/05/2018 02:00 AM, Salvador Fandiño wrote: >>> On 02/21/2018 01:35 AM, Shuah Khan wrote: Hi Salvador, On 01/30/2018 01:36 AM, Salvador Fandino wrote: > Let me start by explai

Re: [PATCH 1/7] platform/x86: fujitsu-laptop: Define constants for FUNC operations

2018-03-06 Thread Michał Kępień
Andy, > What I'm trying to tell is about consistency of style. I completely agree with all you wrote, those are all good suggestions. But you started your reasoning with: > So, imagine if we have two bitfields in some register, one with one > bit and the other with two. We are not looking at a

Re: [PATCH v5 0/3] Support Perf Extension on AMD KVM guests

2018-03-06 Thread Radim Krcmar
2018-02-16 13:26-0600, Natarajan, Janakarajan: > On 2/5/2018 1:24 PM, Janakarajan Natarajan wrote: > > This patchset adds support for Perf Extension on AMD KVM guests. > > > > When perf runs on a guest with family = 15h || 17h, the MSRs that are > > accessed, when the Perf Extension flag is made a

Re: [PATCH v5 1/3] x86/msr: Add AMD Core Perf Extension MSRs

2018-03-06 Thread Radim Krcmar
2018-02-05 13:24-0600, Janakarajan Natarajan: > Add the EventSelect and Counter MSRs for AMD Core Perf Extension. > > Signed-off-by: Janakarajan Natarajan > --- > arch/x86/include/asm/msr-index.h | 14 ++ > 1 file changed, 14 insertions(+) > > diff --git a/arch/x86/include/asm/msr-i

<    2   3   4   5   6   7   8   9   >