]> www.infradead.org Git - users/jedix/linux-maple.git/log
users/jedix/linux-maple.git
5 years agomaple_tree: Fix range checking on skip_node
Liam R. Howlett [Tue, 14 May 2019 17:49:12 +0000 (13:49 -0400)]
maple_tree: Fix range checking on skip_node

When skipping a node, it is only valid to break out of the loop if slot
+ 1 is valid.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
5 years agomaple_tree: Fix forward searching for gaps.
Liam R. Howlett [Wed, 24 Apr 2019 17:52:00 +0000 (13:52 -0400)]
maple_tree: Fix forward searching for gaps.

There was an off-by-one issue with the gap calculation as it is
exclusive - inclusive.

Fix the ascend search in maple_awalk using the wrong parent slot.

Return -EBUSY correctly when a failure occurs.

Fix node splitting when there is no such thing as dense.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
5 years agomaple_dump: Pad better
Matthew Wilcox [Wed, 24 Apr 2019 17:03:27 +0000 (13:03 -0400)]
maple_dump: Pad better

I think this works out better visually than the previous effort.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agomaple_dump: Pad to indicate depth
Matthew Wilcox [Tue, 23 Apr 2019 19:44:48 +0000 (15:44 -0400)]
maple_dump: Pad to indicate depth

Not entirely sure if this is the best way to indicate depth; let's
try it for a bit and see how confused we get.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agomaple_tree: Disable dense nodes.
Liam R. Howlett [Tue, 23 Apr 2019 19:22:52 +0000 (15:22 -0400)]
maple_tree: Disable dense nodes.

Disable dense nodes to avoid split issues.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
5 years agomaple_tree: messy test output
Liam R. Howlett [Tue, 2 Apr 2019 14:59:15 +0000 (10:59 -0400)]
maple_tree: messy test output

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
5 years agomaple_tree: Remove early exit on tests
Liam R. Howlett [Thu, 28 Mar 2019 17:59:33 +0000 (13:59 -0400)]
maple_tree: Remove early exit on tests

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
5 years agomaple_tree: Add awalk for walking allocation trees for gaps.
Liam R. Howlett [Thu, 28 Mar 2019 16:24:09 +0000 (12:24 -0400)]
maple_tree: Add awalk for walking allocation trees for gaps.

Adds mtree_alloc_range to allocate a range.  Some basic tests.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
5 years agomaple_tree: Add maple_tree alloc support for gaps.
Liam R. Howlett [Fri, 15 Mar 2019 20:01:22 +0000 (16:01 -0400)]
maple_tree: Add maple_tree alloc support for gaps.

Start populating gaps with values
Remove the maple_aleaf_64 type and use regular maple_leaf_64.
Rework pivot calculations to be more straight forward.
Don't use dense nodes in the root node to avoid having a dense node as
the right-most node.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
5 years agomaple_tree: typedef maple_enode for encoded node.
Liam R. Howlett [Mon, 18 Mar 2019 19:57:30 +0000 (15:57 -0400)]
maple_tree: typedef maple_enode for encoded node.

Use the compiler to check if an encoded node or a regular node is used

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
5 years agomaple_tree: typedef parent node to maple_pnode
Liam R. Howlett [Mon, 18 Mar 2019 17:51:34 +0000 (13:51 -0400)]
maple_tree: typedef parent node to maple_pnode

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
5 years agomaple_tree: Use encoded node for getting rcu slot in ma_encoded_parent
Liam R. Howlett [Fri, 15 Mar 2019 20:26:39 +0000 (16:26 -0400)]
maple_tree: Use encoded node for getting rcu slot in ma_encoded_parent

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
5 years agomaple_tree: Add initial maple_arange_64 node support.
Liam R. Howlett [Tue, 12 Mar 2019 18:52:59 +0000 (14:52 -0400)]
maple_tree: Add initial maple_arange_64 node support.

maple_arange_64 is for allocation ranges which need to track gaps in
subtrees.  This commit does not address tracking the gaps.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
5 years agotest_maple_tree: Fix range checking.
Liam R. Howlett [Thu, 14 Mar 2019 16:53:16 +0000 (12:53 -0400)]
test_maple_tree: Fix range checking.

Checking a range was not using the correct number range.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
5 years agomaple_tree: Fix range add to empty tree.
Liam R. Howlett [Wed, 13 Mar 2019 15:56:15 +0000 (11:56 -0400)]
maple_tree: Fix range add to empty tree.

When adding to an empty tree, use the encoded node to set the pivot.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
5 years agomaple_tree: Rework internal walk.
Liam R. Howlett [Tue, 12 Mar 2019 18:52:18 +0000 (14:52 -0400)]
maple_tree: Rework internal walk.

Reduce possible calls to get an rcu entry.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
5 years agoma_xa_benchmark: Update time calculations
Liam R. Howlett [Fri, 8 Mar 2019 18:54:13 +0000 (13:54 -0500)]
ma_xa_benchmark: Update time calculations

Time calculations were prone to overflow because seconds were not
included.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
5 years agomaple_tree: Fix double free error.
Liam R. Howlett [Fri, 8 Mar 2019 18:53:10 +0000 (13:53 -0500)]
maple_tree: Fix double free error.

There was a double free which raced with the rcu free so it was not
detected all the time.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
5 years agomaple: Fix _mas_walk return & clean up ma_insert root expand logic
Liam R. Howlett [Thu, 7 Mar 2019 15:18:29 +0000 (10:18 -0500)]
maple: Fix _mas_walk return & clean up ma_insert root expand logic

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
5 years agomaple: Fix off by one error when walking.
Liam R. Howlett [Thu, 7 Mar 2019 14:47:48 +0000 (09:47 -0500)]
maple: Fix off by one error when walking.

When going to the next slot, the minimum value is actually pivot + 1 and
not just the pivot value.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
5 years agomaple_tree: Optimize _mas_walk
Liam R. Howlett [Sun, 17 Feb 2019 22:01:21 +0000 (17:01 -0500)]
maple_tree: Optimize _mas_walk

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
5 years agomaple_tree: Rework walk.
Liam R. Howlett [Fri, 15 Feb 2019 21:27:03 +0000 (16:27 -0500)]
maple_tree: Rework walk.

Make walk more efficient by avoiding duplicate fetches of slot and pivots.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
5 years agomaple_tree: Make walk faster.
Liam R. Howlett [Fri, 15 Feb 2019 20:58:50 +0000 (15:58 -0500)]
maple_tree: Make walk faster.

Avoid looking up duplicate information.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
5 years agoma_xa_benchmark: Fix percentage calculation for time.
Liam R. Howlett [Fri, 15 Feb 2019 20:45:42 +0000 (15:45 -0500)]
ma_xa_benchmark: Fix percentage calculation for time.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
5 years agomaple_tree: Efficiencies
Liam R. Howlett [Fri, 15 Feb 2019 20:43:48 +0000 (15:43 -0500)]
maple_tree: Efficiencies

Remove unneeded code.
Fix splitting from the back of a node.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
5 years agomaple_tree: Dense node support & nulls in tree.
Liam R. Howlett [Wed, 13 Feb 2019 16:12:02 +0000 (11:12 -0500)]
maple_tree: Dense node support & nulls in tree.

Support dense node types.  The reduces the space required for sequential
indexes a lot.
Splitting now decides between usign the parent type and the dense node
type for left/right independently.
Fixes had to be made to pivot lookups.
A few static inline additions to speed things up.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
5 years agomaple_tree: Performance enhancements.
Liam R. Howlett [Tue, 12 Feb 2019 21:01:13 +0000 (16:01 -0500)]
maple_tree:  Performance enhancements.

Start using slot 0 on splits.
Fix missing breaks on set of slots.
Calc node type only once during certain loops

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
5 years agomaple_tree: Make functions node-type generic.
Liam R. Howlett [Thu, 7 Feb 2019 19:34:49 +0000 (14:34 -0500)]
maple_tree: Make functions node-type generic.

Move mt_max outside of debug and add mt_slots
Create mt_slots for enum to slot size mapping.
Rename ma_cp_data_64 to ma_split_data
Drop extra calls in split.
Create calls to get/set pivots & slots.
Rework all functions to use generic calls.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
5 years agoma_xa_benchmark: Use user time. add rcu barrier before size calc.
Liam R. Howlett [Wed, 6 Feb 2019 20:23:25 +0000 (15:23 -0500)]
ma_xa_benchmark: Use user time. add rcu barrier before size calc.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
5 years agoma_xa_benchmark: Initial push
Liam R. Howlett [Tue, 5 Feb 2019 17:30:13 +0000 (12:30 -0500)]
ma_xa_benchmark: Initial push

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
5 years agomaple_tree: remove duplicate function.
Liam R. Howlett [Tue, 5 Feb 2019 15:23:16 +0000 (10:23 -0500)]
maple_tree: remove duplicate function.

When adding a check for reserved entries, I hadn't noticed it already
existed.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
5 years agotest_maple_tree: Fix comments & add more tests.
Liam R. Howlett [Fri, 1 Feb 2019 19:22:25 +0000 (14:22 -0500)]
test_maple_tree: Fix comments & add more tests.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
5 years agomaple_tree: Fix split & insert to use last slot.
Liam R. Howlett [Fri, 1 Feb 2019 19:21:33 +0000 (14:21 -0500)]
maple_tree: Fix split & insert to use last slot.

The last slot was revealed to be NULL always.  Fix this by changing the
the end calculations and to ensure it is okay to use the final slot.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
5 years agomaple_tree: Drop depth from split operation.
Liam R. Howlett [Fri, 1 Feb 2019 18:09:56 +0000 (13:09 -0500)]
maple_tree: Drop depth from split operation.

It is not used.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
5 years agomaple_tree: Fix root bit & parent type.
Liam R. Howlett [Fri, 1 Feb 2019 18:00:47 +0000 (13:00 -0500)]
maple_tree: Fix root bit & parent type.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
5 years agomaple_tree: fix goto lables in ma_insert
Liam R. Howlett [Fri, 1 Feb 2019 00:30:44 +0000 (19:30 -0500)]
maple_tree: fix goto lables in ma_insert

Fix the order of goto labels and set the error correct if using exists.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
5 years agomaple_tree: Add root expand to node if the single entry ends in 10.
Liam R. Howlett [Fri, 1 Feb 2019 00:28:50 +0000 (19:28 -0500)]
maple_tree: Add root expand to node if the single entry ends in 10.

As requested by page cache.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
5 years agomaple_tree: Change mask calc for mt_parent_type
Liam R. Howlett [Fri, 1 Feb 2019 00:28:10 +0000 (19:28 -0500)]
maple_tree: Change mask calc for mt_parent_type

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
5 years agomaple_tree: Remove depth from ma_split.
Liam R. Howlett [Thu, 31 Jan 2019 16:18:46 +0000 (11:18 -0500)]
maple_tree: Remove depth from ma_split.

the depth is no longer use, so drop it.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
5 years agoThoughts: Add table of bits in the parent.
Liam R. Howlett [Thu, 31 Jan 2019 16:15:05 +0000 (11:15 -0500)]
Thoughts: Add table of bits in the parent.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
5 years agomaple_tree: Fix parent definitions & fallout from ULONG_MAX ending.
Liam R. Howlett [Thu, 31 Jan 2019 16:11:13 +0000 (11:11 -0500)]
maple_tree: Fix parent definitions & fallout from ULONG_MAX ending.

coalesce needed to be updated for ULONG_MAX endings.
ma_copy needed to check for ULONG_MAX ending.
ma_encoded_parent no longer updates the ma_state limits.
adopt_children needed the encoded node passed in for the node type to
encode in the parent of the children.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
5 years agotest_maple_tree: Add seqential test for adding 1000 entries
Liam R. Howlett [Thu, 31 Jan 2019 15:53:33 +0000 (10:53 -0500)]
test_maple_tree: Add seqential test for adding 1000 entries

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
5 years agomaple_tree: Add comment about encode parent.
Liam R. Howlett [Wed, 30 Jan 2019 14:38:56 +0000 (09:38 -0500)]
maple_tree: Add comment about encode parent.

function name seems to lack description

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
5 years agomaple_tree: Move mas_update_limits
Liam R. Howlett [Tue, 29 Jan 2019 20:53:03 +0000 (15:53 -0500)]
maple_tree: Move mas_update_limits

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
5 years agomaple_tree: Small cleanup of code and comments
Liam R. Howlett [Tue, 29 Jan 2019 20:28:36 +0000 (15:28 -0500)]
maple_tree: Small cleanup of code and comments

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
5 years agomaple_tree: Fix error in splitting on the right side
Liam R. Howlett [Tue, 29 Jan 2019 20:06:00 +0000 (15:06 -0500)]
maple_tree: Fix error in splitting on the right side

When splitting on the right side, there were a number of logical
errors:
1. Finding the parents type needed the parent to be encoded, so move the
logic to a location better suited to use the encoded node.
2. ma_copy had an incorrect range (off by one).
3. mt_replace was not using the encoded node to find the parent's slot.
This would always return zero.
4. ma_link had a potential overflow in the pivot.
5. The ma_state's min/max was not being updated and so the pivots were
not always correct when using the min/max.
6. The data end detection needed to be updated to also check for
ULONG_MAX.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
5 years agotest_maple_tree: port nomem thread race test.
Liam R. Howlett [Mon, 28 Jan 2019 19:08:29 +0000 (14:08 -0500)]
test_maple_tree: port nomem thread race test.

Test to see that allocations work when two threads are racing.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
5 years agomaple_tree: Change return type of ma_insert.
Liam R. Howlett [Mon, 28 Jan 2019 19:07:04 +0000 (14:07 -0500)]
maple_tree: Change return type of ma_insert.

ma_insert was returning a pointer in the old API.  This is no longer
needed.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
5 years agotest_maple_tree: Re-implement old allocation tests for new API.
Liam R. Howlett [Mon, 28 Jan 2019 18:30:15 +0000 (13:30 -0500)]
test_maple_tree: Re-implement old allocation tests for new API.

Rewrite the allocation tests for maple2 rewrite.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
5 years agotesting: Fix bug in allocation tests for radix-tree linux.
Liam R. Howlett [Mon, 28 Jan 2019 18:29:01 +0000 (13:29 -0500)]
testing: Fix bug in allocation tests for radix-tree linux.

When initializing kmem_cache for testing, ensure non_kernel is
initialized to zero.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
5 years agotest_maple_tree: Fix compile warning
Liam R. Howlett [Mon, 28 Jan 2019 15:21:11 +0000 (10:21 -0500)]
test_maple_tree: Fix compile warning

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
5 years agomaple_tree: Clean up erase function.
Liam R. Howlett [Fri, 25 Jan 2019 21:03:21 +0000 (16:03 -0500)]
maple_tree: Clean up erase function.

The node type is set during the partial copy of data operation now.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
5 years agomaple_tree: Remove enc_full and just use mas->node.
Liam R. Howlett [Fri, 25 Jan 2019 20:49:28 +0000 (15:49 -0500)]
maple_tree: Remove enc_full and just use mas->node.

No need for this variable in mas_split.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
5 years agomaple_tree: Load safe root to mas->node in encoded_parent
Liam R. Howlett [Fri, 25 Jan 2019 20:43:38 +0000 (15:43 -0500)]
maple_tree: Load safe root to mas->node in encoded_parent

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
5 years agomaple_tree: Code clean up.
Liam R. Howlett [Fri, 25 Jan 2019 20:34:15 +0000 (15:34 -0500)]
maple_tree: Code clean up.

Drop unused variables & a fuction left from development of split

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
5 years agomaple_tree: Fix dump debug code when the last slot is null.
Liam R. Howlett [Tue, 22 Jan 2019 15:14:38 +0000 (10:14 -0500)]
maple_tree: Fix dump debug code when the last slot is null.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
5 years agomaple_node: Fix comments
Liam R. Howlett [Fri, 18 Jan 2019 19:46:54 +0000 (14:46 -0500)]
maple_node: Fix comments

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
5 years agomaple_tree: Split support
Liam R. Howlett [Fri, 18 Jan 2019 15:55:38 +0000 (10:55 -0500)]
maple_tree: Split support

Initial split support.  Walks up the tree splitting as necessary to
support the addition of a node.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
5 years agomaple_tree: Rearrange _ma_insert for appends.
Liam R. Howlett [Tue, 15 Jan 2019 16:17:00 +0000 (11:17 -0500)]
maple_tree: Rearrange _ma_insert for appends.

Reorder and make _ma_insert append safe and prepare for split.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
5 years agomaple_tree: Refactor coalesce into a separate function.
Liam R. Howlett [Fri, 11 Jan 2019 15:46:29 +0000 (10:46 -0500)]
maple_tree: Refactor coalesce into a separate function.

Reworked logic to have a bit of a cleaner looking function.  Supports
full nodes now as well.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
5 years agomaple_tree: Avoid allocating a node in coalescing until necessary
Liam R. Howlett [Fri, 11 Jan 2019 02:01:25 +0000 (21:01 -0500)]
maple_tree: Avoid allocating a node in coalescing until necessary

When looping through a node, don't create a new node if there is no need
to do so.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
5 years agomaple_tree: Avoid coalescing on insert if it is not needed.
Liam R. Howlett [Thu, 10 Jan 2019 20:18:01 +0000 (15:18 -0500)]
maple_tree: Avoid coalescing on insert if it is not needed.

On insert, iterate over the pivots looking for matching ones to
determine if slots need to be coalesced.
Erase always needs to coalesce, so don't check there.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
5 years agomaple_tree: whitespace fix
Liam R. Howlett [Thu, 10 Jan 2019 19:57:47 +0000 (14:57 -0500)]
maple_tree: whitespace fix

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
5 years agotest_maple_tree: Add new function to allow __GFP_DIRECT_RECLAIM gfp for
Liam R. Howlett [Thu, 10 Jan 2019 19:06:51 +0000 (14:06 -0500)]
test_maple_tree: Add new function to allow __GFP_DIRECT_RECLAIM gfp for
a given number of times.

Set a variable that allows reclaims to occur for a specific count for
testing.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
5 years agomaple_tree: Change ma_coalesce to return the number of slots removed.
Liam R. Howlett [Thu, 10 Jan 2019 19:05:43 +0000 (14:05 -0500)]
maple_tree: Change ma_coalesce to return the number of slots removed.

Set ma->node to the new node, so save the previous node before calling
the function.  Also fix an off-by-one error in ma_coalesce.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
5 years agoCorrected typo
Liam R. Howlett [Thu, 10 Jan 2019 18:49:06 +0000 (13:49 -0500)]
Corrected typo

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
5 years agomaple_tree: Add erase support.
Liam R. Howlett [Thu, 10 Jan 2019 16:08:14 +0000 (11:08 -0500)]
maple_tree: Add erase support.

Refactor replacing a node in a tree to its own function and use that
with the erase and insert functions.

Erase NULLs the range in which the index resides and coalesces adjacent
NULLs if allocation succeeds.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
5 years agomaple_tree: Fix several off-by-one errors.
Liam R. Howlett [Thu, 10 Jan 2019 16:06:23 +0000 (11:06 -0500)]
maple_tree: Fix several off-by-one errors.

When counting through the slots/pivots, the pivots overflow before the
slots which is an area of confusion sometimes.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
5 years agomaple_tree: Rework walking the tree to combine insert/walk/erase
Liam R. Howlett [Wed, 9 Jan 2019 20:11:15 +0000 (15:11 -0500)]
maple_tree: Rework walking the tree to combine insert/walk/erase
functions.

This turned out to be a huge deal with many issues resolved for the
following of Thoughts:

1. Nodes can use the last 0x7F bits of the address, so clear them and
such.
2. Root needs to have bit 1 (0x2) set, so be safe around that.
3. mas->node should be encoded (except root needs to remove bit 1 to
avoid being seen as an error).
4. xa_is_node no longer works, so remove BUG_ONs.  Take care that we
know we have a value when we have a slot & an leaf node in mas->node.
5. Store slots in the same place as the alloc requests as their uses do
not overlap.
6. mas_start needs to return a safe root instead of making its own node.
7. Insert was basically rewritten
8. Verify that we are no inserting reserved values
9. Change testcases to not try to insert reserved values.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
5 years agomaple_tree: Fix potential race condition in _ma_insert
Liam R. Howlett [Mon, 7 Jan 2019 19:45:10 +0000 (14:45 -0500)]
maple_tree: Fix potential race condition in _ma_insert

The pivots protect readers from reading invalid data.  Without a wmb
between overwriting the end pivot (of zero), there is a potential that
the writes could be reordered and a race condition would exist between
updating both values and a reader interleaving those writes.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
5 years agomaple_tree: Add insert/append operation.
Liam R. Howlett [Mon, 7 Jan 2019 17:46:05 +0000 (12:46 -0500)]
maple_tree: Add insert/append operation.

Check for NULL runs by looking for duplicate pivots and coalesce them
into a single entry.  Append and insert into a new node, then replace
the old node and adopt the children.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
5 years agomaple_tree: Fix data_end calculation and root expansion.
Liam R. Howlett [Thu, 3 Jan 2019 18:30:57 +0000 (13:30 -0500)]
maple_tree: Fix data_end calculation and root expansion.

Root expansion needs to set the pivot to the empty value if there is no
zero for the append to function correctly.

In append, we know the data end will always be at least 1, so take two
off the idx when checking the previous pivot value (since we also add 1
to the end for the new termination).

Append will need to be altered to cover off the overflow possibility in
the future.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
5 years agomaple_tree: clean up swithc statement and remove null parent assignment
Liam R. Howlett [Thu, 3 Jan 2019 16:42:27 +0000 (11:42 -0500)]
maple_tree: clean up swithc statement and remove null parent assignment

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
5 years agoMore Thoughts
Matthew Wilcox [Wed, 2 Jan 2019 21:18:41 +0000 (16:18 -0500)]
More Thoughts

Mostly relating to auxiliary data

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agomaple_tree: Implement destroy.
Liam R. Howlett [Thu, 3 Jan 2019 15:34:32 +0000 (10:34 -0500)]
maple_tree: Implement destroy.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
5 years agomaple_tree: Implement expanding root.
Liam R. Howlett [Wed, 2 Jan 2019 18:31:54 +0000 (13:31 -0500)]
maple_tree: Implement expanding root.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
5 years agomaple_tree: Add kmem_cache
Matthew Wilcox [Mon, 24 Dec 2018 17:31:00 +0000 (12:31 -0500)]
maple_tree: Add kmem_cache

Allocate nodes from a kmem cache, making the necessary changes to the
slab emulation to support alignment.  Free nodes through RCU.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agomaple_tree: Change my thoughts
Matthew Wilcox [Mon, 24 Dec 2018 15:27:45 +0000 (10:27 -0500)]
maple_tree: Change my thoughts

Reorganise the Thoughts file to bring it to some kind of order, and
change the tree dumping code accordingly.  It only supports three kinds
of node so far: leaf_64, range_64 and dense.  But it does now support
user pointers that are only 2-byte aligned.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agoAdd some notes
Matthew Wilcox [Fri, 21 Dec 2018 20:30:54 +0000 (15:30 -0500)]
Add some notes

Not for upstream, obviously

5 years agomaple_tree: Fix mt_dump
Matthew Wilcox [Thu, 20 Dec 2018 19:41:03 +0000 (14:41 -0500)]
maple_tree: Fix mt_dump

Conform to new definition of maple tree

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agomaple_tree: Fix compilation differently
Matthew Wilcox [Thu, 20 Dec 2018 02:28:39 +0000 (21:28 -0500)]
maple_tree: Fix compilation differently

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agomaple_tree: Testing framework and stubbed out maple_tree.c
Liam R. Howlett [Wed, 19 Dec 2018 20:43:14 +0000 (15:43 -0500)]
maple_tree: Testing framework and stubbed out maple_tree.c

Also fix some compile issues with header.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
5 years agomaple_tree: Add header file
Matthew Wilcox [Wed, 19 Dec 2018 19:40:16 +0000 (14:40 -0500)]
maple_tree: Add header file

Signed-off-by: Matthew Wilcox <willy@infradead.org>
5 years agoLinux 5.3-rc2 v5.3-rc2
Linus Torvalds [Sun, 28 Jul 2019 19:47:02 +0000 (12:47 -0700)]
Linux 5.3-rc2

5 years agoMerge tag 'meminit-v5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees...
Linus Torvalds [Sun, 28 Jul 2019 19:33:15 +0000 (12:33 -0700)]
Merge tag 'meminit-v5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux

Pull structleak fix from Kees Cook:
 "Disable gcc-based stack variable auto-init under KASAN (Arnd
  Bergmann).

  This fixes a bunch of build warnings under KASAN and the
  gcc-plugin-based stack auto-initialization features (which are
  arguably redundant, so better to let KASAN control this)"

* tag 'meminit-v5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
  structleak: disable STRUCTLEAK_BYREF in combination with KASAN_STACK

5 years agoMerge tag 'kbuild-fixes-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahi...
Linus Torvalds [Sun, 28 Jul 2019 17:35:04 +0000 (10:35 -0700)]
Merge tag 'kbuild-fixes-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild

Pull Kbuild fixes from Masahiro Yamada:

 - add compile_commands.json to .gitignore

 - fix false-positive warning from gen_compile_commands.py after
   allnoconfig build

 - remove unused code

* tag 'kbuild-fixes-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
  kbuild: remove unused single-used-m
  gen_compile_commands: lower the entry count threshold
  .gitignore: Add compilation database file
  kbuild: remove unused objectify macro

5 years agoMerge tag 'char-misc-5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
Linus Torvalds [Sun, 28 Jul 2019 17:26:10 +0000 (10:26 -0700)]
Merge tag 'char-misc-5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc

Pull char/misc driver fixes from Greg KH:
 "Here are some small char and misc driver fixes for 5.3-rc2 to resolve
  some reported issues.

  Nothing major at all, some binder bugfixes for issues found, some new
  mei device ids, firmware building warning fixes, habanalabs fixes, a
  few other build fixes, and a MAINTAINERS update.

  All of these have been in linux-next with no reported issues"

* tag 'char-misc-5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
  test_firmware: fix a memory leak bug
  hpet: Fix division by zero in hpet_time_div()
  eeprom: make older eeprom drivers select NVMEM_SYSFS
  vmw_balloon: Remove Julien from the maintainers list
  fpga-manager: altera-ps-spi: Fix build error
  mei: me: add mule creek canyon (EHL) device ids
  binder: prevent transactions to context manager from its own process.
  binder: Set end of SG buffer area properly.
  firmware: Fix missing inline
  firmware: fix build errors in paged buffer handling code
  habanalabs: don't reset device when getting VRHOT
  habanalabs: use %pad for printing a dma_addr_t

5 years agoMerge tag 'tty-5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Linus Torvalds [Sun, 28 Jul 2019 17:18:33 +0000 (10:18 -0700)]
Merge tag 'tty-5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty

Pull tty fixes from Greg KH:
 "Here are two tty/vt fixes:

   - delete the netx-serial driver as the arch has been removed, no need
     to keep the serial driver for it around either.

   - vt console_lock fix to resolve a reported noisy warning at runtime

  Both of these have been in linux-next with no reported issues"

* tag 'tty-5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
  vt: Grab console_lock around con_is_bound in show_bind
  tty: serial: netx: Delete driver

5 years agoMerge tag 'spdx-5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
Linus Torvalds [Sun, 28 Jul 2019 17:00:06 +0000 (10:00 -0700)]
Merge tag 'spdx-5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/spdx

Pull SPDX fixes from Greg KH:
 "Here are some small SPDX fixes for 5.3-rc2 for things that came in
  during the 5.3-rc1 merge window that we previously missed.

  Only three small patches here:

   - two uapi patches to resolve some SPDX tags that were not correct

   - fix an invalid SPDX tag in the iomap Makefile file

  All have been properly reviewed on the public mailing lists"

* tag 'spdx-5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/spdx:
  iomap: fix Invalid License ID
  treewide: remove SPDX "WITH Linux-syscall-note" from kernel-space headers again
  treewide: add "WITH Linux-syscall-note" to SPDX tag of uapi headers

5 years agoMerge tag 'usb-5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Linus Torvalds [Sun, 28 Jul 2019 16:52:35 +0000 (09:52 -0700)]
Merge tag 'usb-5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb

Pull USB fixes from Greg KH:
 "Here are some small fixes for 5.3-rc2. All of these resolve some
  reported issues, some more than others :)

  Included in here is:

   - xhci fix for an annoying issue with odd devices

   - reversion of some usb251xb patches that should not have been merged

   - usb pci quirk additions and fixups

   - usb storage fix

   - usb host controller error test fix

  All of these have been in linux-next with no reported issues"

* tag 'usb-5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
  xhci: Fix crash if scatter gather is used with Immediate Data Transfer (IDT).
  usb: usb251xb: Reallow swap-dx-lanes to apply to the upstream port
  Revert "usb: usb251xb: Add US port lanes inversion property"
  Revert "usb: usb251xb: Add US lanes inversion dts-bindings"
  usb: wusbcore: fix unbalanced get/put cluster_id
  usb/hcd: Fix a NULL vs IS_ERR() bug in usb_hcd_setup_local_mem()
  usb-storage: Add a limitation for blk_queue_max_hw_sectors()
  usb: pci-quirks: Minor cleanup for AMD PLL quirk
  usb: pci-quirks: Correct AMD PLL quirk detection

5 years agoMerge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc
Linus Torvalds [Sun, 28 Jul 2019 16:38:55 +0000 (09:38 -0700)]
Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc

Pull ARM SoC fixes from Olof Johansson:
 "Here's the first batch of fixes for this release cycle.

  Main diffstat here is the re-deletion of netx. I messed up and most
  likely didn't remove the files from the index when I test-merged this
  and saw conflicts, and from there on out 'git rerere' remembered the
  mistake and I missed checking it. Here it's done again as expected.

  Besides that:

   - A defconfig refresh + enabling of new drivers for u8500

   - i.MX fixlets for i2c/SAI/pinmux

   - sleep.S build fix for Davinci

   - Broadcom devicetree build/warning fix"

* tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc:
  ARM: defconfig: u8500: Add new drivers
  ARM: defconfig: u8500: Refresh defconfig
  ARM: dts: bcm: bcm47094: add missing #cells for mdio-bus-mux
  ARM: davinci: fix sleep.S build error on ARMv4
  arm64: dts: imx8mq: fix SAI compatible
  arm64: dts: imx8mm: Correct SAI3 RXC/TXFS pin's mux option #1
  ARM: dts: imx6ul: fix clock frequency property name of I2C buses
  ARM: Delete netx a second time
  ARM: dts: imx7ulp: Fix usb-phy unit address format

5 years agoMerge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 28 Jul 2019 04:46:43 +0000 (21:46 -0700)]
Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fixes from Thomas Gleixner:
 "A set of x86 fixes and functional updates:

   - Prevent stale huge I/O TLB mappings on 32bit. A long standing bug
     which got exposed by KPTI support for 32bit

   - Prevent bogus access_ok() warnings in arch_stack_walk_user()

   - Add display quirks for Lenovo devices which have height and width
     swapped

   - Add the missing CR2 fixup for 32 bit async pagefaults. Fallout of
     the CR2 bug fix series.

   - Unbreak handling of force enabled HPET by moving the 'is HPET
     counting' check back to the original place.

   - A more accurate check for running on a hypervisor platform in the
     MDS mitigation code. Not perfect, but more accurate than the
     previous one.

   - Update a stale and confusing comment vs. IRQ stacks"

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/speculation/mds: Apply more accurate check on hypervisor platform
  x86/hpet: Undo the early counter is counting check
  x86/entry/32: Pass cr2 to do_async_page_fault()
  x86/irq/64: Update stale comment
  x86/sysfb_efi: Add quirks for some devices with swapped width and height
  x86/stacktrace: Prevent access_ok() warnings in arch_stack_walk_user()
  mm/vmalloc: Sync unmappings in __purge_vmap_area_lazy()
  x86/mm: Sync also unmappings in vmalloc_sync_all()
  x86/mm: Check for pfn instead of page in vmalloc_sync_one()

5 years agoMerge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 28 Jul 2019 04:22:33 +0000 (21:22 -0700)]
Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull scheduler fixes from Thomas Gleixner:
 "Two fixes for the fair scheduling class:

   - Prevent freeing memory which is accessible by concurrent readers

   - Make the RCU annotations for numa groups consistent"

* 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  sched/fair: Use RCU accessors consistently for ->numa_group
  sched/fair: Don't free p->numa_faults with concurrent readers

5 years agoMerge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 28 Jul 2019 04:17:56 +0000 (21:17 -0700)]
Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull perf fixes from Thomas Gleixner:
 "A pile of perf related fixes:

  Kernel:
   - Fix SLOTS PEBS event constraints for Icelake CPUs

   - Add the missing mask bit to allow counting hardware generated
     prefetches on L3 for Icelake CPUs

   - Make the test for hypervisor platforms more accurate (as far as
     possible)

   - Handle PMUs correctly which override event->cpu

   - Yet another missing fallthrough annotation

  Tools:
     perf.data:
        - Fix loading of compressed data split across adjacent records
        - Fix buffer size setting for processing CPU topology perf.data
          header.

     perf stat:
        - Fix segfault for event group in repeat mode
        - Always separate "stalled cycles per insn" line, it was being
          appended to the "instructions" line.

     perf script:
        - Fix --max-blocks man page description.
        - Improve man page description of metrics.
        - Fix off by one in brstackinsn IPC computation.

     perf probe:
        - Avoid calling freeing routine multiple times for same pointer.

     perf build:
        - Do not use -Wshadow on gcc < 4.8, avoiding too strict warnings
          treated as errors, breaking the build"

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  perf/x86/intel: Mark expected switch fall-throughs
  perf/core: Fix creating kernel counters for PMUs that override event->cpu
  perf/x86: Apply more accurate check on hypervisor platform
  perf/x86/intel: Fix invalid Bit 13 for Icelake MSR_OFFCORE_RSP_x register
  perf/x86/intel: Fix SLOTS PEBS event constraint
  perf build: Do not use -Wshadow on gcc < 4.8
  perf probe: Avoid calling freeing routine multiple times for same pointer
  perf probe: Set pev->nargs to zero after freeing pev->args entries
  perf session: Fix loading of compressed data split across adjacent records
  perf stat: Always separate stalled cycles per insn
  perf stat: Fix segfault for event group in repeat mode
  perf tools: Fix proper buffer size for feature processing
  perf script: Fix off by one in brstackinsn IPC computation
  perf script: Improve man page description of metrics
  perf script: Fix --max-blocks man page description

5 years agoMerge branch 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 28 Jul 2019 04:10:26 +0000 (21:10 -0700)]
Merge branch 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull locking fixes from Thomas Gleixner:
 "A set of locking fixes:

   - Address the fallout of the rwsem rework. Missing ACQUIREs and a
     sanity check to prevent a use-after-free

   - Add missing checks for unitialized mutexes when mutex debugging is
     enabled.

   - Remove the bogus code in the generic SMP variant of
     arch_futex_atomic_op_inuser()

   - Fixup the #ifdeffery in lockdep to prevent compile warnings"

* 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  locking/mutex: Test for initialized mutex
  locking/lockdep: Clean up #ifdef checks
  locking/lockdep: Hide unused 'class' variable
  locking/rwsem: Add ACQUIRE comments
  tty/ldsem, locking/rwsem: Add missing ACQUIRE to read_failed sleep loop
  lcoking/rwsem: Add missing ACQUIRE to read_slowpath sleep loop
  locking/rwsem: Add missing ACQUIRE to read_slowpath exit when queue is empty
  locking/rwsem: Don't call owner_on_cpu() on read-owner
  futex: Cleanup generic SMP variant of arch_futex_atomic_op_inuser()

5 years agoMerge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 28 Jul 2019 03:49:43 +0000 (20:49 -0700)]
Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull objtool fix from Thomas Gleixner:
 "A single robustness fix for objtool to handle unbalanced CLAC
  invocations under all circumstances"

* 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  objtool: Improve UACCESS coverage

5 years agoMerge tag 'Wimplicit-fallthrough-5.3-rc2' of git://git.kernel.org/pub/scm/linux/kerne...
Linus Torvalds [Sat, 27 Jul 2019 18:04:18 +0000 (11:04 -0700)]
Merge tag 'Wimplicit-fallthrough-5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux

Pull Wimplicit-fallthrough enablement from Gustavo A. R. Silva:
 "This marks switch cases where we are expecting to fall through, and
  globally enables the -Wimplicit-fallthrough option in the main
  Makefile.

  Finally, some missing-break fixes that have been tagged for -stable:

   - drm/amdkfd: Fix missing break in switch statement

   - drm/amdgpu/gfx10: Fix missing break in switch statement

  With these changes, we completely get rid of all the fall-through
  warnings in the kernel"

* tag 'Wimplicit-fallthrough-5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux:
  Makefile: Globally enable fall-through warning
  drm/i915: Mark expected switch fall-throughs
  drm/amd/display: Mark expected switch fall-throughs
  drm/amdkfd/kfd_mqd_manager_v10: Avoid fall-through warning
  drm/amdgpu/gfx10: Fix missing break in switch statement
  drm/amdkfd: Fix missing break in switch statement
  perf/x86/intel: Mark expected switch fall-throughs
  mtd: onenand_base: Mark expected switch fall-through
  afs: fsclient: Mark expected switch fall-throughs
  afs: yfsclient: Mark expected switch fall-throughs
  can: mark expected switch fall-throughs
  firewire: mark expected switch fall-throughs

5 years agoMerge tag 's390-5.3-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
Linus Torvalds [Sat, 27 Jul 2019 15:58:04 +0000 (08:58 -0700)]
Merge tag 's390-5.3-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux

Pull s390 updates from Heiko Carstens:

 - Add ABI to kernel image file which allows e.g. the file utility to
   figure out the kernel version.

 - Wire up clone3 system call.

 - Add support for kasan bitops instrumentation.

 - uapi header cleanup: use __u{16,32,64} instead of uint{16,32,64}_t.

 - Provide proper ARCH_ZONE_DMA_BITS so the s390 DMA zone is correctly
   defined with 2 GB instead of the default value of 1 MB.

 - Farhan Ali leaves the group of vfio-ccw maintainers.

 - Various small vfio-ccw fixes.

 - Add missing locking for airq_areas array in virtio code.

 - Minor qdio improvements.

* tag 's390-5.3-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
  MAINTAINERS: vfio-ccw: Remove myself as the maintainer
  s390/mm: use shared variables for sysctl range check
  virtio/s390: fix race on airq_areas[]
  s390/dma: provide proper ARCH_ZONE_DMA_BITS value
  s390/kasan: add bitops instrumentation
  s390/bitops: make test functions return bool
  s390: wire up clone3 system call
  kbuild: enable arch/s390/include/uapi/asm/zcrypt.h for uapi header test
  s390: use __u{16,32,64} instead of uint{16,32,64}_t in uapi header
  s390/hypfs: fix a typo in the name of a function
  s390/qdio: restrict QAOB usage to IQD unicast queues
  s390/qdio: add sanity checks to the fast-requeue path
  s390: enable detection of kernel version from bzImage
  Documentation: fix vfio-ccw doc
  vfio-ccw: Update documentation for csch/hsch
  vfio-ccw: Don't call cp_free if we are processing a channel program
  vfio-ccw: Set pa_nr to 0 if memory allocation fails for pa_iova_pfn
  vfio-ccw: Fix memory leak and don't call cp_free in cp_init
  vfio-ccw: Fix misleading comment when setting orb.cmd.c64

5 years agoMerge tag 'devicetree-fixes-for-5.3-2' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 27 Jul 2019 15:49:19 +0000 (08:49 -0700)]
Merge tag 'devicetree-fixes-for-5.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux

Pull Devicetree fixes from Rob Herring:
 "The nvmem changes would typically go thru Greg's tree, but they were
  missed in the merge window. [ Acked by Greg ]

  Summary:

   - Fix mismatches in $id values and actual filenames. Now checked by
     tools.

   - Convert nvmem binding to DT schema

   - Fix a typo in of_property_read_bool() kerneldoc

   - Remove some redundant description in al-fic interrupt-controller"

* tag 'devicetree-fixes-for-5.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
  dt-bindings: Fix more $id value mismatches filenames
  dt-bindings: nvmem: SID: Fix the examples node names
  dt-bindings: nvmem: Add YAML schemas for the generic NVMEM bindings
  of: Fix typo in kerneldoc
  dt-bindings: interrupt-controller: al-fic: remove redundant binding
  dt-bindings: clk: allwinner,sun4i-a10-ccu: Correct path in $id

5 years agoMerge tag 'libnvdimm-fixes-5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 27 Jul 2019 15:25:51 +0000 (08:25 -0700)]
Merge tag 'libnvdimm-fixes-5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm

Pull libnvdimm fixes from Dan Williams:
 "A collection of locking and async operations fixes for v5.3-rc2. These
  had been soaking in a branch targeting the merge window, but missed
  due to a regression hunt. This fixed up version has otherwise been in
  -next this past week with no reported issues.

  In order to gain confidence in the locking changes the pull also
  includes a debug / instrumentation patch to enable lockdep coverage
  for libnvdimm subsystem operations that depend on the device_lock for
  exclusion. As mentioned in the changelog it is a hack, but it works
  and documents the locking expectations of the sub-system in a way that
  others can use lockdep to verify. The driver core touches got an ack
  from Greg.

  Summary:

   - Fix duplicate device_unregister() calls (multiple threads competing
     to do unregister work when scheduling device removal from a sysfs
     attribute of the self-same device).

   - Fix badblocks registration order bug. Ensure region badblocks are
     initialized in advance of namespace registration.

   - Fix a deadlock between the bus lock and probe operations.

   - Export device-core infrastructure to coordinate async operations
     via the device ->dead state.

   - Add device-core infrastructure to validate device_lock() usage with
     lockdep"

* tag 'libnvdimm-fixes-5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm:
  driver-core, libnvdimm: Let device subsystems add local lockdep coverage
  libnvdimm/bus: Fix wait_nvdimm_bus_probe_idle() ABBA deadlock
  libnvdimm/bus: Stop holding nvdimm_bus_list_mutex over __nd_ioctl()
  libnvdimm/bus: Prepare the nd_ioctl() path to be re-entrant
  libnvdimm/region: Register badblocks before namespaces
  libnvdimm/bus: Prevent duplicate device_unregister() calls
  drivers/base: Introduce kill_device()