platform/kernel/linux-rpi.git
5 years agoxarray: Add range store functionality
Matthew Wilcox [Wed, 15 Aug 2018 18:13:29 +0000 (14:13 -0400)]
xarray: Add range store functionality

This version of xa_store_range() really only supports load and store.
Our only user only needs basic load and store functionality, so there's
no need to do the extra work to support marking and overlapping stores
correctly yet.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agoxarray: Move multiorder_check to in-kernel tests
Matthew Wilcox [Sun, 9 Sep 2018 05:52:17 +0000 (01:52 -0400)]
xarray: Move multiorder_check to in-kernel tests

This version is a little less thorough in order to be a little quicker,
but tests the important edge cases.  Also test adding a multiorder entry
at a non-canonical index, and erasing it.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agoxarray: Move multiorder_shrink to kernel tests
Matthew Wilcox [Sat, 8 Sep 2018 16:09:52 +0000 (12:09 -0400)]
xarray: Move multiorder_shrink to kernel tests

Test this functionality inside the kernel as well as in userspace.
Also remove insert_bug() as there's no comparable thing to test
in the XArray code.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agoxarray: Move multiorder account test in-kernel
Matthew Wilcox [Tue, 28 Aug 2018 20:13:16 +0000 (16:13 -0400)]
xarray: Move multiorder account test in-kernel

Move this test to the in-kernel test suite, and enhance it to test
several different orders.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agoradix tree test suite: Convert iteration test to XArray
Matthew Wilcox [Mon, 20 Aug 2018 19:48:46 +0000 (15:48 -0400)]
radix tree test suite: Convert iteration test to XArray

With no code left in the kernel using the multiorder radix tree, convert
the iteration test from the radix tree to the XArray.  It's unlikely to
suffer the same bug as the radix tree, but this test will prevent that
bug from ever creeping into the XArray implementation.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agoradix tree test suite: Convert tag_tagged_items to XArray
Matthew Wilcox [Sat, 18 Aug 2018 11:09:22 +0000 (07:09 -0400)]
radix tree test suite: Convert tag_tagged_items to XArray

The tag_tagged_items() function is supposed to test the page-writeback
tagging code.  Since that has been converted to the XArray, there's
not much point in testing the radix tree's tagging code.  This requires
using the pthread mutex embedded in the xarray instead of an external
lock, so remove the pthread mutexes which protect xarrays/radix trees.
Also remove radix_tree_iter_tag_set() as this was the last user.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agoradix tree: Remove radix_tree_clear_tags
Matthew Wilcox [Mon, 9 Apr 2018 20:52:21 +0000 (16:52 -0400)]
radix tree: Remove radix_tree_clear_tags

The page cache was the only user of this interface and it has now
been converted to the XArray.  Transform the test into a test of
xas_init_marks().

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agoradix tree: Remove radix_tree_maybe_preload_order
Matthew Wilcox [Sat, 19 May 2018 20:47:47 +0000 (16:47 -0400)]
radix tree: Remove radix_tree_maybe_preload_order

This function was only used by the page cache which is now converted
to the XArray.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agoradix tree: Remove split/join code
Matthew Wilcox [Sat, 19 May 2018 20:47:47 +0000 (16:47 -0400)]
radix tree: Remove split/join code

radix_tree_split and radix_tree_join were never used upstream.  Remove
them; if they're needed in future they will be replaced by XArray
equivalents.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agoradix tree: Remove radix_tree_update_node_t
Matthew Wilcox [Mon, 9 Apr 2018 20:24:45 +0000 (16:24 -0400)]
radix tree: Remove radix_tree_update_node_t

The only user of this functionality was the workingset code, and it's
now been converted to the XArray.  Remove __radix_tree_delete_node()
entirely as it was also only used by the workingset code.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agopage cache: Finish XArray conversion
Matthew Wilcox [Wed, 6 Dec 2017 00:04:20 +0000 (19:04 -0500)]
page cache: Finish XArray conversion

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 <willy@infradead.org>
5 years agodax: Convert page fault handlers to XArray
Matthew Wilcox [Fri, 30 Mar 2018 02:58:27 +0000 (22:58 -0400)]
dax: Convert page fault handlers to XArray

This is the last part of DAX to be converted to the XArray so
remove all the old helper functions.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agodax: Convert dax_lock_mapping_entry to XArray
Matthew Wilcox [Tue, 12 Jun 2018 13:46:30 +0000 (09:46 -0400)]
dax: Convert dax_lock_mapping_entry to XArray

Instead of always retrying when we slept, only retry if the page has
moved.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agodax: Convert dax writeback to XArray
Matthew Wilcox [Wed, 28 Mar 2018 20:03:45 +0000 (16:03 -0400)]
dax: Convert dax writeback to XArray

Use XArray iteration instead of a pagevec.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agodax: Convert __dax_invalidate_entry to XArray
Matthew Wilcox [Wed, 28 Mar 2018 19:40:41 +0000 (15:40 -0400)]
dax: Convert __dax_invalidate_entry to XArray

Avoids walking the radix tree multiple times looking for tags.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agodax: Convert dax_layout_busy_page to XArray
Matthew Wilcox [Thu, 17 May 2018 17:03:48 +0000 (13:03 -0400)]
dax: Convert dax_layout_busy_page to XArray

Instead of using a pagevec, just use the XArray iterators.  Add a
conditional rescheduling point which probably should have been there in
the original.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agodax: Convert dax_insert_pfn_mkwrite to XArray
Matthew Wilcox [Wed, 28 Mar 2018 15:48:03 +0000 (11:48 -0400)]
dax: Convert dax_insert_pfn_mkwrite to XArray

Add some XArray-based helper functions to replace the radix tree based
metaphors currently in use.  The biggest change is that converted code
doesn't see its own lock bit; get_unlocked_entry() always returns an
entry with the lock bit clear.  So we don't have to mess around loading
the current entry and clearing the lock bit; we can just store the
unlocked entry that we already have.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agodax: Hash on XArray instead of mapping
Matthew Wilcox [Wed, 28 Mar 2018 15:01:43 +0000 (11:01 -0400)]
dax: Hash on XArray instead of mapping

Since the XArray is embedded in the struct address_space, its address
contains exactly as much entropy as the address of the mapping.  This
patch is purely preparatory for later patches which will simplify the
wait/wake interfaces.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agodax: Rename some functions
Matthew Wilcox [Tue, 27 Mar 2018 17:39:38 +0000 (13:39 -0400)]
dax: Rename some functions

Remove mentions of 'radix' and 'radix tree'.  Simplify some names by
dropping the word 'mapping'.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agof2fs: Convert to XArray
Matthew Wilcox [Tue, 5 Dec 2017 01:25:25 +0000 (20:25 -0500)]
f2fs: Convert to XArray

This is a straightforward conversion.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agonilfs2: Convert to XArray
Matthew Wilcox [Tue, 5 Dec 2017 00:33:30 +0000 (19:33 -0500)]
nilfs2: Convert to XArray

This is close to a 1:1 replacement of radix tree APIs with their XArray
equivalents.  It would be possible to optimise nilfs_copy_back_pages(),
but that doesn't seem to be in the performance path.  Also, I think
it has a pre-existing bug, and I've added a note to that effect in the
source code.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agofs: Convert writeback to XArray
Matthew Wilcox [Mon, 4 Dec 2017 15:46:23 +0000 (10:46 -0500)]
fs: Convert writeback to XArray

A couple of short loops.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agofs: Convert buffer to XArray
Matthew Wilcox [Mon, 4 Dec 2017 15:40:41 +0000 (10:40 -0500)]
fs: Convert buffer to XArray

Mostly comment fixes, but one use of __xa_set_mark.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agobtrfs: Convert page cache to XArray
Matthew Wilcox [Mon, 4 Dec 2017 15:37:22 +0000 (10:37 -0500)]
btrfs: Convert page cache to XArray

Signed-off-by: Matthew Wilcox <willy@infradead.org>
Acked-by: David Sterba <dsterba@suse.com>
5 years agoshmem: Comment fixups
Matthew Wilcox [Mon, 4 Dec 2017 08:31:13 +0000 (03:31 -0500)]
shmem: Comment fixups

Remove the last mentions of radix tree from various comments.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agomemfd: Convert memfd_tag_pins to XArray
Matthew Wilcox [Wed, 22 Nov 2017 13:37:38 +0000 (08:37 -0500)]
memfd: Convert memfd_tag_pins to XArray

Switch to a batch-processing model like memfd_wait_for_pins() and
use the xa_state previously set up by memfd_wait_for_pins().

Signed-off-by: Matthew Wilcox <willy@infradead.org>
Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com>
5 years agomemfd: Convert memfd_wait_for_pins to XArray
Matthew Wilcox [Wed, 22 Nov 2017 16:11:31 +0000 (11:11 -0500)]
memfd: Convert memfd_wait_for_pins to XArray

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 while we process an entire batch of pages.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com>
5 years agoshmem: Convert shmem_partial_swap_usage to XArray
Matthew Wilcox [Mon, 4 Dec 2017 08:28:00 +0000 (03:28 -0500)]
shmem: Convert shmem_partial_swap_usage to XArray

Simpler code because the xarray takes care of things like the limit and
dereferencing the slot.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agoshmem: Convert shmem_free_swap to XArray
Matthew Wilcox [Mon, 4 Dec 2017 08:13:54 +0000 (03:13 -0500)]
shmem: Convert shmem_free_swap to XArray

Since we are conditionally storing NULL in the XArray, we do not need
to allocate memory and the GFP flags will be unused.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agoshmem: Convert shmem_alloc_hugepage to XArray
Matthew Wilcox [Sat, 2 Dec 2017 03:13:06 +0000 (22:13 -0500)]
shmem: Convert shmem_alloc_hugepage to XArray

xa_find() is a slightly easier API to use than
radix_tree_gang_lookup_slot() because it contains its own RCU locking.
This commit removes the last user of radix_tree_gang_lookup_slot()
so remove the function too.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agoshmem: Convert shmem_add_to_page_cache to XArray
Matthew Wilcox [Fri, 1 Dec 2017 18:25:14 +0000 (13:25 -0500)]
shmem: Convert shmem_add_to_page_cache to XArray

We can use xas_find_conflict() instead of radix_tree_gang_lookup_slot()
to find any conflicting entry and combine the three paths through this
function into one.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agoshmem: Convert find_swap_entry to XArray
Matthew Wilcox [Wed, 22 Nov 2017 13:36:00 +0000 (08:36 -0500)]
shmem: Convert find_swap_entry to XArray

This is a 1:1 conversion.  The major part of this patch is converting
the test framework from userspace to kernel space and mirroring the
algorithm now used in find_swap_entry().

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agoshmem: Convert shmem_confirm_swap to XArray
Matthew Wilcox [Wed, 22 Nov 2017 13:34:58 +0000 (08:34 -0500)]
shmem: Convert shmem_confirm_swap to XArray

xa_load has its own RCU locking, so we can eliminate it here.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agoshmem: Convert shmem_radix_tree_replace to XArray
Matthew Wilcox [Fri, 17 Nov 2017 15:22:37 +0000 (10:22 -0500)]
shmem: Convert shmem_radix_tree_replace to XArray

Rename shmem_radix_tree_replace() to shmem_replace_entry() and
convert it to use the XArray API.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agopagevec: Use xa_mark_t
Matthew Wilcox [Tue, 5 Dec 2017 22:30:38 +0000 (17:30 -0500)]
pagevec: Use xa_mark_t

Removes sparse warnings.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agomm: Convert is_page_cache_freeable to XArray
Matthew Wilcox [Sun, 10 Jun 2018 11:34:39 +0000 (07:34 -0400)]
mm: Convert is_page_cache_freeable to XArray

This is just a variable rename and comment change.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agomm: Convert khugepaged_scan_shmem to XArray
Matthew Wilcox [Mon, 4 Dec 2017 20:06:23 +0000 (15:06 -0500)]
mm: Convert khugepaged_scan_shmem to XArray

Slightly shorter and easier to read code.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agomm: Convert collapse_shmem to XArray
Matthew Wilcox [Mon, 4 Dec 2017 19:56:08 +0000 (14:56 -0500)]
mm: Convert collapse_shmem to XArray

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 Wilcox <willy@infradead.org>
5 years agomm: Convert huge_memory to XArray
Matthew Wilcox [Mon, 4 Dec 2017 15:16:10 +0000 (10:16 -0500)]
mm: Convert huge_memory to XArray

Quite a straightforward conversion.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agomm: Convert page migration to XArray
Matthew Wilcox [Mon, 4 Dec 2017 09:35:16 +0000 (04:35 -0500)]
mm: Convert page migration to XArray

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agomm: Convert __do_page_cache_readahead to XArray
Matthew Wilcox [Mon, 4 Dec 2017 09:30:18 +0000 (04:30 -0500)]
mm: Convert __do_page_cache_readahead to XArray

This one is trivial.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agomm: Convert delete_from_swap_cache to XArray
Matthew Wilcox [Wed, 29 Nov 2017 13:32:39 +0000 (08:32 -0500)]
mm: Convert delete_from_swap_cache to XArray

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 <willy@infradead.org>
5 years agomm: Convert add_to_swap_cache to XArray
Matthew Wilcox [Mon, 27 Nov 2017 20:46:54 +0000 (15:46 -0500)]
mm: Convert add_to_swap_cache to XArray

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 <willy@infradead.org>
5 years agomm: Convert truncate to XArray
Matthew Wilcox [Sun, 26 Nov 2017 03:52:46 +0000 (22:52 -0500)]
mm: Convert truncate to XArray

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 <willy@infradead.org>
5 years agomm: Convert workingset to XArray
Matthew Wilcox [Fri, 24 Nov 2017 19:24:59 +0000 (14:24 -0500)]
mm: Convert workingset to XArray

We construct an XA_STATE and use it to delete the node with
xas_store() rather than adding a special function for this unique
use case.  Includes a test that simulates this usage for the
test suite.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agomm: Convert page-writeback to XArray
Matthew Wilcox [Wed, 22 Nov 2017 16:41:23 +0000 (11:41 -0500)]
mm: Convert page-writeback to XArray

Includes moving mapping_tagged() to fs.h as a static inline, and
changing it to return bool.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agopage cache: Convert filemap_range_has_page to XArray
Matthew Wilcox [Tue, 16 Jan 2018 11:26:49 +0000 (06:26 -0500)]
page cache: Convert filemap_range_has_page to XArray

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 <willy@infradead.org>
5 years agopage cache: Remove stray radix comment
Matthew Wilcox [Mon, 4 Dec 2017 09:02:00 +0000 (04:02 -0500)]
page cache: Remove stray radix comment

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agopage cache: Convert delete_batch to XArray
Matthew Wilcox [Mon, 4 Dec 2017 08:59:45 +0000 (03:59 -0500)]
page cache: Convert delete_batch to XArray

Rename the function from page_cache_tree_delete_batch to just
page_cache_delete_batch.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agoradix tree test suite: Convert regression1 to XArray
Matthew Wilcox [Thu, 17 May 2018 04:13:27 +0000 (00:13 -0400)]
radix tree test suite: Convert regression1 to XArray

Now the page cache lookup is using the XArray, let's convert this
regression test from the radix tree API to the XArray so it's testing
roughly the same thing it was testing before.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agopage cache: Convert filemap_map_pages to XArray
Matthew Wilcox [Thu, 17 May 2018 04:08:30 +0000 (00:08 -0400)]
page cache: Convert filemap_map_pages to XArray

Slight change of strategy here; if we have trouble getting hold of a
page for whatever reason (eg a compound page is split underneath us),
don't spin to stabilise the page, just continue the iteration, like we
would if we failed to trylock the page.  Since this is a speculative
optimisation, it feels like we should allow the process to take an extra
fault if it turns out to need this page instead of spending time to pin
down a page it may not need.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agopage cache: Convert find_get_entries_tag to XArray
Matthew Wilcox [Thu, 17 May 2018 03:56:04 +0000 (23:56 -0400)]
page cache: Convert find_get_entries_tag to XArray

Slightly shorter and simpler code.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agopage cache; Convert find_get_pages_range_tag to XArray
Matthew Wilcox [Wed, 16 May 2018 22:12:54 +0000 (18:12 -0400)]
page cache; Convert find_get_pages_range_tag to XArray

The 'end' parameter of the xas_for_each iterator avoids a useless
iteration at the end of the range.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agopage cache: Convert find_get_pages_contig to XArray
Matthew Wilcox [Wed, 16 May 2018 22:00:33 +0000 (18:00 -0400)]
page cache: Convert find_get_pages_contig to XArray

There's no direct replacement for radix_tree_for_each_contig()
in the XArray API as it's an unusual thing to do.  Instead,
open-code a loop using xas_next().  This removes the only user of
radix_tree_for_each_contig() so delete the iterator from the API and
the test suite code for it.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agopage cache: Convert find_get_pages_range to XArray
Matthew Wilcox [Wed, 16 May 2018 21:38:56 +0000 (17:38 -0400)]
page cache: Convert find_get_pages_range to XArray

The 'end' parameter of the xas_for_each iterator avoids a useless
iteration at the end of the range.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agopage cache: Convert find_get_entries to XArray
Matthew Wilcox [Wed, 16 May 2018 21:20:45 +0000 (17:20 -0400)]
page cache: Convert find_get_entries to XArray

Slightly shorter and simpler code.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agopage cache: Convert find_get_entry to XArray
Matthew Wilcox [Wed, 16 May 2018 20:12:50 +0000 (16:12 -0400)]
page cache: Convert find_get_entry to XArray

Slightly shorter and simpler code.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agopage cache: Convert page deletion to XArray
Matthew Wilcox [Tue, 21 Nov 2017 14:17:59 +0000 (09:17 -0500)]
page cache: Convert page deletion to XArray

The code is slightly shorter and simpler.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agopage cache: Add and replace pages using the XArray
Matthew Wilcox [Fri, 17 Nov 2017 15:01:45 +0000 (10:01 -0500)]
page cache: Add and replace pages using the XArray

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.  It also removes the last user of __radix_tree_create()
outside radix-tree.c itself, so make it static.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agopage cache: Convert hole search to XArray
Matthew Wilcox [Tue, 21 Nov 2017 19:07:06 +0000 (14:07 -0500)]
page cache: Convert hole search to XArray

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 start the
lookup from the top for each index.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agopage cache: Rearrange address_space
Matthew Wilcox [Tue, 6 Mar 2018 03:46:03 +0000 (22:46 -0500)]
page cache: Rearrange address_space

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 <willy@infradead.org>
5 years agoida: Convert to XArray
Matthew Wilcox [Wed, 4 Jul 2018 19:42:46 +0000 (15:42 -0400)]
ida: Convert to XArray

Use the XA_TRACK_FREE ability to track which entries have a free bit,
similarly to how it uses the radix tree's IDR_FREE tag.  This eliminates
the per-cpu ida_bitmap preload, and fixes the memory consumption
regression I introduced when making the IDR able to store any pointer.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agoxarray: Track free entries in an XArray
Matthew Wilcox [Wed, 4 Jul 2018 14:50:12 +0000 (10:50 -0400)]
xarray: Track free entries in an XArray

Add the optional ability to track which entries in an XArray are free
and provide xa_alloc() to replace most of the functionality of the IDR.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agoxarray: Add MAINTAINERS entry
Matthew Wilcox [Mon, 27 Nov 2017 20:32:05 +0000 (15:32 -0500)]
xarray: Add MAINTAINERS entry

Add myself as XArray and IDR maintainer.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agoxarray: Add xa_reserve and xa_release
Matthew Wilcox [Mon, 1 Oct 2018 18:54:59 +0000 (14:54 -0400)]
xarray: Add xa_reserve and xa_release

This function reserves a slot in the XArray for users which need
to acquire multiple locks before storing their entry in the tree and
so cannot use a plain xa_store().

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agoxarray: Add xas_create_range
Matthew Wilcox [Mon, 4 Dec 2017 05:11:48 +0000 (00:11 -0500)]
xarray: Add xas_create_range

This hopefully temporary function is useful for users who have not yet
been converted to multi-index entries.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agoxarray: Add xas_for_each_conflict
Matthew Wilcox [Sat, 2 Jun 2018 02:46:02 +0000 (22:46 -0400)]
xarray: Add xas_for_each_conflict

This iterator iterates over each entry that is stored in the index or
indices specified by the xa_state.  This is intended for use for a
conditional store of a multiindex entry, or to allow entries which are
about to be removed from the xarray to be disposed of properly.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agoxarray: Step through an XArray
Matthew Wilcox [Fri, 1 Dec 2017 05:06:52 +0000 (00:06 -0500)]
xarray: Step through an XArray

The xas_next and xas_prev 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-off-by: Matthew Wilcox <willy@infradead.org>
5 years agoxarray: Destroy an XArray
Matthew Wilcox [Fri, 17 Nov 2017 13:16:34 +0000 (08:16 -0500)]
xarray: Destroy an XArray

This function frees all the internal memory allocated to the xarray
and reinitialises it to be empty.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agoxarray: Extract entries from an XArray
Matthew Wilcox [Tue, 14 Nov 2017 21:42:22 +0000 (16:42 -0500)]
xarray: Extract entries from an XArray

The xa_extract 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 <willy@infradead.org>
5 years agoxarray: Add XArray iterators
Matthew Wilcox [Tue, 14 Nov 2017 13:30:11 +0000 (08:30 -0500)]
xarray: Add XArray iterators

The xa_for_each 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_after() which are helper functions for xa_for_each() but
may also be useful in their own right.

In the xas family of functions, we have xas_for_each(), xas_find(),
xas_next_entry(), xas_for_each_tagged(), xas_find_tagged(),
xas_next_tagged() and xas_pause().

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agoxarray: Add XArray conditional store operations
Matthew Wilcox [Fri, 10 Nov 2017 20:34:55 +0000 (15:34 -0500)]
xarray: Add XArray conditional store operations

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() wrapper
provides a more convenient calling convention.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agoxarray: Add XArray unconditional store operations
Matthew Wilcox [Fri, 10 Nov 2017 20:15:08 +0000 (15:15 -0500)]
xarray: Add XArray unconditional store operations

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 anyway.

For memory allocation, xa_store() will first attempt to request memory
from the slab allocator; if memory is not immediately available, it will
drop the xa_lock and allocate memory, keeping a pointer in the xa_state.
It does not use the per-CPU cache, although those will continue to exist
until all radix tree users are converted to the xarray.

This patch also includes xa_erase() and __xa_erase() for a streamlined
way to store NULL.  Since there is no need to allocate memory in order
to store a NULL in the XArray, we do not need to trouble the user with
deciding what memory allocation flags to use.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agoxarray: Add XArray marks
Matthew Wilcox [Fri, 10 Nov 2017 14:34:31 +0000 (09:34 -0500)]
xarray: Add XArray marks

XArray marks are like the radix tree tags, only slightly more strongly
typed.  They are renamed in order to distinguish them from tagged
pointers.  This commit adds the basic get/set/clear operations.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agoxarray: Add XArray load operation
Matthew Wilcox [Tue, 7 Nov 2017 19:57:46 +0000 (14:57 -0500)]
xarray: Add XArray load operation

The xa_load function brings with it a lot of infrastructure; xa_empty(),
xa_is_err(), and large chunks of the XArray advanced API that are used
to implement xa_load.

As the test-suite demonstrates, it is possible to use the XArray functions
on a radix tree.  The radix tree functions depend on the GFP flags being
stored in the root of the tree, so it's not possible to use the radix
tree functions on an XArray.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agoxarray: Add documentation
Matthew Wilcox [Fri, 24 Nov 2017 03:57:20 +0000 (22:57 -0500)]
xarray: Add documentation

This is documentation on how to use the XArray, not details about its
internal implementation.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
Acked-by: Josef Bacik <jbacik@fb.com>
5 years agoxarray: Define struct xa_node
Matthew Wilcox [Thu, 9 Nov 2017 14:23:56 +0000 (09:23 -0500)]
xarray: Define struct xa_node

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 <willy@infradead.org>
Reviewed-by: Josef Bacik <jbacik@fb.com>
5 years agoxarray: Add definition of struct xarray
Matthew Wilcox [Tue, 7 Nov 2017 21:30:10 +0000 (16:30 -0500)]
xarray: Add definition of struct xarray

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 <willy@infradead.org>
Reviewed-by: Josef Bacik <jbacik@fb.com>
5 years agoxarray: Change definition of sibling entries
Matthew Wilcox [Sat, 4 Nov 2017 03:09:45 +0000 (23:09 -0400)]
xarray: Change definition of sibling entries

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 <willy@infradead.org>
Reviewed-by: Josef Bacik <jbacik@fb.com>
5 years agoxarray: Replace exceptional entries
Matthew Wilcox [Fri, 3 Nov 2017 17:30:42 +0000 (13:30 -0400)]
xarray: Replace exceptional entries

Introduce xarray value entries and tagged pointers to replace radix
tree exceptional entries.  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
intimidating and different.  As the comment explains, you can choose
to store values or pointers in the xarray and they are both first-class
citizens.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
Reviewed-by: Josef Bacik <jbacik@fb.com>
5 years agoidr: Permit any valid kernel pointer to be stored
Matthew Wilcox [Mon, 25 Jun 2018 10:56:50 +0000 (06:56 -0400)]
idr: Permit any valid kernel pointer to be stored

An upcoming change to the encoding of internal entries will set the bottom
two bits to 0b10.  Unfortunately, m68k only aligns some data structures
to 2 bytes, so the IDR will interpret them as internal entries and things
will go badly wrong.

Change the radix tree so that it stops either when the node indicates
that it's the bottom of the tree (shift == 0) or when the entry is not an
internal entry.  This means we cannot insert an arbitrary kernel pointer
as a multiorder entry, but the IDR does not permit multiorder entries.

Annoyingly, this means the IDR can no longer take advantage of the radix
tree's ability to store a single entry at offset 0 without allocating
memory.  A pointer which is 2-byte aligned cannot be stored directly in
the root as it would be indistinguishable from a node, so we must allocate
a node in order to store a 2-byte pointer at index 0.  The idr_replace()
function does not take a GFP flags argument, so cannot allocate memory.
If a user inserts a 4-byte aligned pointer at index 0 and then replaces
it with a 2-byte aligned pointer, we must be able to store it.

Arbitrary pointer values are still not permitted; pointers of the
form 2 + (i * 4) for values of i between 0 and 1023 are reserved for
the implementation.  These are not valid kernel pointers as they would
point into the zero page.

This change does cause a runtime memory consumption regression for
the IDA.  I will recover that later.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
Tested-by: Guenter Roeck <linux@roeck-us.net>
5 years agoUpdate email address
Matthew Wilcox [Sat, 16 Jun 2018 21:32:07 +0000 (17:32 -0400)]
Update email address

Redirect some older email addresses that are in the git logs.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agoMerge tag 'for-linus-20180929' of git://git.kernel.dk/linux-block
Greg Kroah-Hartman [Sat, 29 Sep 2018 21:52:14 +0000 (14:52 -0700)]
Merge tag 'for-linus-20180929' of git://git.kernel.dk/linux-block

Jens writes:
  "Block fixes for 4.19-rc6

   A set of fixes that should go into this release. This pull request
   contains:

   - A fix (hopefully) for the persistent grants for xen-blkfront. A
     previous fix from this series wasn't complete, hence reverted, and
     this one should hopefully be it. (Boris Ostrovsky)

   - Fix for an elevator drain warning with SMR devices, which is
     triggered when you switch schedulers (Damien)

   - bcache deadlock fix (Guoju Fang)

   - Fix for the block unplug tracepoint, which has had the
     timer/explicit flag reverted since 4.11 (Ilya)

   - Fix a regression in this series where the blk-mq timeout hook is
     invoked with the RCU read lock held, hence preventing it from
     blocking (Keith)

   - NVMe pull from Christoph, with a single multipath fix (Susobhan Dey)"

* tag 'for-linus-20180929' of git://git.kernel.dk/linux-block:
  xen/blkfront: correct purging of persistent grants
  Revert "xen/blkfront: When purging persistent grants, keep them in the buffer"
  blk-mq: I/O and timer unplugs are inverted in blktrace
  bcache: add separate workqueue for journal_write to avoid deadlock
  xen/blkfront: When purging persistent grants, keep them in the buffer
  block: fix deadline elevator drain for zoned block devices
  blk-mq: Allow blocking queue tag iter callbacks
  nvme: properly propagate errors in nvme_mpath_init

5 years agoMerge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Greg Kroah-Hartman [Sat, 29 Sep 2018 21:34:06 +0000 (14:34 -0700)]
Merge branch 'x86-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

Thomas writes:
  "A single fix for the AMD memory encryption boot code so it does not
   read random garbage instead of the cached encryption bit when a kexec
   kernel is allocated above the 32bit address limit."

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/boot: Fix kexec booting failure in the SEV bit detection code

5 years agoMerge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Greg Kroah-Hartman [Sat, 29 Sep 2018 21:32:49 +0000 (14:32 -0700)]
Merge branch 'timers-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

Thomas writes:
  "Three small fixes for clocksource drivers:
   - Proper error handling in the Atmel PIT driver
   - Add CLOCK_SOURCE_SUSPEND_NONSTOP for TI SoCs so suspend works again
   - Fix the next event function for Facebook Backpack-CMM BMC chips so
     usleep(100) doesnt sleep several milliseconds"

* 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  clocksource/drivers/timer-atmel-pit: Properly handle error cases
  clocksource/drivers/fttmr010: Fix set_next_event handler
  clocksource/drivers/ti-32k: Add CLOCK_SOURCE_SUSPEND_NONSTOP flag for non-am43 SoCs

5 years agoMerge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Greg Kroah-Hartman [Sat, 29 Sep 2018 18:32:03 +0000 (11:32 -0700)]
Merge branch 'perf-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

Thomas writes:
  "A single fix for a missing sanity check when a pinned event is tried
  to be read on the wrong CPU due to a legit event scheduling failure."

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  perf/core: Add sanity check to deal with pinned event failure

5 years agoMerge tag 'pm-4.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Greg Kroah-Hartman [Sat, 29 Sep 2018 13:50:36 +0000 (06:50 -0700)]
Merge tag 'pm-4.19-rc6' of git://git./linux/kernel/git/rafael/linux-pm

Rafael writes:
  "Power management fix for 4.19-rc6

   Fix incorrect __init and __exit annotations in the Qualcomm
   Kryo cpufreq driver (Nathan Chancellor)."

* tag 'pm-4.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  cpufreq: qcom-kryo: Fix section annotations

5 years agocpufreq: qcom-kryo: Fix section annotations
Nathan Chancellor [Thu, 20 Sep 2018 00:22:21 +0000 (17:22 -0700)]
cpufreq: qcom-kryo: Fix section annotations

There is currently a warning when building the Kryo cpufreq driver into
the kernel image:

WARNING: vmlinux.o(.text+0x8aa424): Section mismatch in reference from
the function qcom_cpufreq_kryo_probe() to the function
.init.text:qcom_cpufreq_kryo_get_msm_id()
The function qcom_cpufreq_kryo_probe() references
the function __init qcom_cpufreq_kryo_get_msm_id().
This is often because qcom_cpufreq_kryo_probe lacks a __init
annotation or the annotation of qcom_cpufreq_kryo_get_msm_id is wrong.

Remove the '__init' annotation from qcom_cpufreq_kryo_get_msm_id
so that there is no more mismatch warning.

Additionally, Nick noticed that the remove function was marked as
'__init' when it should really be marked as '__exit'.

Fixes: 46e2856b8e18 (cpufreq: Add Kryo CPU scaling driver)
Fixes: 5ad7346b4ae2 (cpufreq: kryo: Add module remove and exit)
Reported-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Cc: 4.18+ <stable@vger.kernel.org> # 4.18+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
5 years agoMerge tag 'dma-mapping-4.19-3' of git://git.infradead.org/users/hch/dma-mapping
Greg Kroah-Hartman [Sat, 29 Sep 2018 09:52:24 +0000 (02:52 -0700)]
Merge tag 'dma-mapping-4.19-3' of git://git.infradead.org/users/hch/dma-mapping

Christoph writes:
  "dma mapping fix for 4.19-rc6

   fix a missing Kconfig symbol for commits introduced in 4.19-rc"

* tag 'dma-mapping-4.19-3' of git://git.infradead.org/users/hch/dma-mapping:
  dma-mapping: add the missing ARCH_HAS_SYNC_DMA_FOR_CPU_ALL declaration

5 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Greg Kroah-Hartman [Sat, 29 Sep 2018 01:04:50 +0000 (18:04 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/dtor/input

Dmitry writes:
  "Input updates for v4.19-rc5

   Just a few driver fixes"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: uinput - allow for max == min during input_absinfo validation
  Input: elantech - enable middle button of touchpad on ThinkPad P72
  Input: atakbd - fix Atari CapsLock behaviour
  Input: atakbd - fix Atari keymap
  Input: egalax_ts - add system wakeup support
  Input: gpio-keys - fix a documentation index issue

5 years agoMerge tag 'spi-fix-v4.19-rc5' of https://git.kernel.org/pub/scm/linux/kernel/git...
Greg Kroah-Hartman [Sat, 29 Sep 2018 01:04:06 +0000 (18:04 -0700)]
Merge tag 'spi-fix-v4.19-rc5' of https://git./linux/kernel/git/broonie/spi

Mark writes:
  "spi: Fixes for v4.19

   Quite a few fixes for the Renesas drivers in here, plus a fix for the
   Tegra driver and some documentation fixes for the recently added
   spi-mem code.  The Tegra fix is relatively large but fairly
   straightforward and mechanical, it runs on probe so it's been
   reasonably well covered in -next testing."

* tag 'spi-fix-v4.19-rc5' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
  spi: spi-mem: Move the DMA-able constraint doc to the kerneldoc header
  spi: spi-mem: Add missing description for data.nbytes field
  spi: rspi: Fix interrupted DMA transfers
  spi: rspi: Fix invalid SPI use during system suspend
  spi: sh-msiof: Fix handling of write value for SISTR register
  spi: sh-msiof: Fix invalid SPI use during system suspend
  spi: gpio: Fix copy-and-paste error
  spi: tegra20-slink: explicitly enable/disable clock

5 years agoMerge tag 'regulator-v4.19-rc5' of https://git.kernel.org/pub/scm/linux/kernel/git...
Greg Kroah-Hartman [Sat, 29 Sep 2018 01:02:25 +0000 (18:02 -0700)]
Merge tag 'regulator-v4.19-rc5' of https://git./linux/kernel/git/broonie/regulator

Mark writes:
  "regulator: Fixes for 4.19

   A collection of fairly minor bug fixes here, a couple of driver
   specific ones plus two core fixes.  There's one fix for the new
   suspend state code which fixes some confusion with constant values
   that are supposed to indicate noop operation and another fixing a
   race condition with the creation of sysfs files on new regulators."

* tag 'regulator-v4.19-rc5' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
  regulator: fix crash caused by null driver data
  regulator: Fix 'do-nothing' value for regulators without suspend state
  regulator: da9063: fix DT probing with constraints
  regulator: bd71837: Disable voltage monitoring for LDO3/4

5 years agoMerge tag 'powerpc-4.19-3' of https://git.kernel.org/pub/scm/linux/kernel/git/powerpc...
Greg Kroah-Hartman [Sat, 29 Sep 2018 00:43:32 +0000 (17:43 -0700)]
Merge tag 'powerpc-4.19-3' of https://git./linux/kernel/git/powerpc/linux

Michael writes:
  "powerpc fixes for 4.19 #3

   A reasonably big batch of fixes due to me being away for a few weeks.

   A fix for the TM emulation support on Power9, which could result in
   corrupting the guest r11 when running under KVM.

   Two fixes to the TM code which could lead to userspace GPR corruption
   if we take an SLB miss at exactly the wrong time.

   Our dynamic patching code had a bug that meant we could patch freed
   __init text, which could lead to corrupting userspace memory.

   csum_ipv6_magic() didn't work on little endian platforms since we
   optimised it recently.

   A fix for an endian bug when reading a device tree property telling
   us how many storage keys the machine has available.

   Fix a crash seen on some configurations of PowerVM when migrating the
   partition from one machine to another.

   A fix for a regression in the setup of our CPU to NUMA node mapping
   in KVM guests.

   A fix to our selftest Makefiles to make them work since a recent
   change to the shared Makefile logic."

* tag 'powerpc-4.19-3' of https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
  selftests/powerpc: Fix Makefiles for headers_install change
  powerpc/numa: Use associativity if VPHN hcall is successful
  powerpc/tm: Avoid possible userspace r1 corruption on reclaim
  powerpc/tm: Fix userspace r13 corruption
  powerpc/pseries: Fix unitialized timer reset on migration
  powerpc/pkeys: Fix reading of ibm, processor-storage-keys property
  powerpc: fix csum_ipv6_magic() on little endian platforms
  powerpc/powernv/ioda2: Reduce upper limit for DMA window size (again)
  powerpc: Avoid code patching freed init sections
  KVM: PPC: Book3S HV: Fix guest r11 corruption with POWER9 TM workarounds

5 years agoMerge tag 'pinctrl-v4.19-4' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw...
Greg Kroah-Hartman [Sat, 29 Sep 2018 00:42:44 +0000 (17:42 -0700)]
Merge tag 'pinctrl-v4.19-4' of git://git./linux/kernel/git/linusw/linux-pinctrl

Linus writes:
  "Pin control fixes for v4.19:
   - Fixes to x86 hardware:
   - AMD interrupt debounce issues
   - Faulty Intel cannonlake register offset
   - Revert pin translation IRQ locking"

* tag 'pinctrl-v4.19-4' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
  Revert "pinctrl: intel: Do pin translation when lock IRQ"
  pinctrl: cannonlake: Fix HOSTSW_OWN register offset of H variant
  pinctrl/amd: poll InterruptEnable bits in amd_gpio_irq_set_type

5 years agoperf/core: Add sanity check to deal with pinned event failure
Reinette Chatre [Wed, 19 Sep 2018 17:29:06 +0000 (10:29 -0700)]
perf/core: Add sanity check to deal with pinned event failure

It is possible that a failure can occur during the scheduling of a
pinned event. The initial portion of perf_event_read_local() contains
the various error checks an event should pass before it can be
considered valid. Ensure that the potential scheduling failure
of a pinned event is checked for and have a credible error.

Suggested-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: fenghua.yu@intel.com
Cc: tony.luck@intel.com
Cc: acme@kernel.org
Cc: gavin.hindman@intel.com
Cc: jithu.joseph@intel.com
Cc: dave.hansen@intel.com
Cc: hpa@zytor.com
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/6486385d1f30336e9973b24c8c65f5079543d3d3.1537377064.git.reinette.chatre@intel.com
5 years agoMerge tag 'drm-fixes-2018-09-28' of git://anongit.freedesktop.org/drm/drm
Greg Kroah-Hartman [Fri, 28 Sep 2018 16:55:17 +0000 (18:55 +0200)]
Merge tag 'drm-fixes-2018-09-28' of git://anongit.freedesktop.org/drm/drm

Dave writes:
  "drm fixes for 4.19-rc6

   Looks like a pretty normal week for graphics,

   core: syncobj fix, panel link regression revert
   amd: suspend/resume fixes, EDID emulation fix
   mali-dp: NV12 writeback and vblank reset fixes
   etnaviv: DMA setup fix"

* tag 'drm-fixes-2018-09-28' of git://anongit.freedesktop.org/drm/drm:
  drm/amd/display: Fix Edid emulation for linux
  drm/amd/display: Fix Vega10 lightup on S3 resume
  drm/amdgpu: Fix vce work queue was not cancelled when suspend
  Revert "drm/panel: Add device_link from panel device to DRM device"
  drm/syncobj: Don't leak fences when WAIT_FOR_SUBMIT is set
  drm/malidp: Fix writeback in NV12
  drm: mali-dp: Call drm_crtc_vblank_reset on device init
  drm/etnaviv: add DMA configuration for etnaviv platform device

5 years agoMerge tag 'riscv-for-linus-4.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel...
Greg Kroah-Hartman [Fri, 28 Sep 2018 16:53:22 +0000 (18:53 +0200)]
Merge tag 'riscv-for-linus-4.19-rc6' of git://git./linux/kernel/git/palmer/riscv-linux

Palmer writes:
  "A Single RISC-V Update for 4.19-rc6

   The Debian guys have been pushing on our port and found some
   unversioned symbols leaking into modules.  This PR contains a single
   fix for that issue."

* tag 'riscv-for-linus-4.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/palmer/riscv-linux:
  RISC-V: include linux/ftrace.h in asm-prototypes.h

5 years agoMerge tag 'pci-v4.19-fixes-2' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git...
Greg Kroah-Hartman [Fri, 28 Sep 2018 16:20:41 +0000 (18:20 +0200)]
Merge tag 'pci-v4.19-fixes-2' of ssh://gitolite./linux/kernel/git/helgaas/pci

Bjorn writes:
  "PCI fixes:

  - Fix ACPI hotplug issue that causes black screen crash at boot (Mika
    Westerberg)

  - Fix DesignWare "scheduling while atomic" issues (Jisheng Zhang)

  - Add PPC contacts to MAINTAINERS for PCI core error handling (Bjorn
    Helgaas)

  - Sort Mobiveil MAINTAINERS entry (Lorenzo Pieralisi)"

* tag 'pci-v4.19-fixes-2' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
  ACPI / hotplug / PCI: Don't scan for non-hotplug bridges if slot is not bridge
  PCI: dwc: Fix scheduling while atomic issues
  MAINTAINERS: Move mobiveil PCI driver entry where it belongs
  MAINTAINERS: Update PPC contacts for PCI core error handling

5 years agoMerge branch 'nvme-4.19' of git://git.infradead.org/nvme into for-linus
Jens Axboe [Fri, 28 Sep 2018 15:41:40 +0000 (09:41 -0600)]
Merge branch 'nvme-4.19' of git://git.infradead.org/nvme into for-linus

Pull NVMe fix from Christoph.

* 'nvme-4.19' of git://git.infradead.org/nvme:
  nvme: properly propagate errors in nvme_mpath_init

5 years agoxen/blkfront: correct purging of persistent grants
Juergen Gross [Fri, 28 Sep 2018 07:28:27 +0000 (09:28 +0200)]
xen/blkfront: correct purging of persistent grants

Commit a46b53672b2c2e3770b38a4abf90d16364d2584b ("xen/blkfront: cleanup
stale persistent grants") introduced a regression as purged persistent
grants were not pu into the list of free grants again. Correct that.

Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>