[PATCH] usb: dwc3: gadget: Fix PCM1 for ISOC EP with ep->mult less than 3

2017-12-05 Thread Manu Gautam
For isochronous endpoints with ep->mult less than 3, PCM1 value of trb->size in set incorrectly. For ep->mult = 2, this is set to 0/-1 and for ep->mult = 1, this is set to -2. This is because the initial mult is set to ep->mult - 1 instead of 2. Signed-off-by: Manu Gautam

Re: [PATCH] usb: dwc2: add optional usb ecc reset bit

2017-12-05 Thread John Youn
On 11/01/2017 08:35 AM, Dinh Nguyen wrote: > The dwc2 USB controller in Stratix10 has an additional ECC reset bit that > needs to get de-asserted in order for the controller to work properly. > > Signed-off-by: Dinh Nguyen > --- > drivers/usb/dwc2/core.h | 1 + >

[PATCH] usb: xhci: fix TDS for MTK xHCI1.1

2017-12-05 Thread Chunfeng Yun
For MTK's xHCI 1.0 or latter, TD size is the number of max packet sized packets remaining in the TD, not including this TRB (following spec). For MTK's xHCI 0.96 and older, TD size is the number of max packet sized packets remaining in the TD, including this TRB (not following spec).

Re: [PATCH] usb: core: Fix logging messages with spurious periods after newlines

2017-12-05 Thread Joe Perches
On Wed, 2017-12-06 at 07:27 +0100, Greg Kroah-Hartman wrote: > On Tue, Dec 05, 2017 at 10:22:05PM -0800, Joe Perches wrote: > > Using a period after a newline causes bad output. > > Nice catch, how did you find that? $ git grep '\\n\."' -- To unsubscribe from this list: send the line

Re: [PATCH] usb: core: Fix logging messages with spurious periods after newlines

2017-12-05 Thread Greg Kroah-Hartman
On Tue, Dec 05, 2017 at 10:22:05PM -0800, Joe Perches wrote: > Using a period after a newline causes bad output. Nice catch, how did you find that? thanks, greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More

Re: usb device implemented with functionfs - must app run as root?

2017-12-05 Thread Greg KH
On Tue, Dec 05, 2017 at 10:09:35PM +, andy_purc...@keysight.com wrote: > I have implemented a USB device using functionfs. > A colleague now says our app must run as a normal user, not as root. > > I tried it and it does not work. > The problem is this - the endpoint files created by the OS

[PATCH] usb: core: Fix logging messages with spurious periods after newlines

2017-12-05 Thread Joe Perches
Using a period after a newline causes bad output. Miscellanea: o Coalesce formats too Signed-off-by: Joe Perches --- drivers/usb/core/driver.c | 8 drivers/usb/core/hub.c | 17 +++-- drivers/usb/core/message.c | 6 +++--- 3 files changed, 14

Re: [PATCH] usb: dwc2: Fix TxFIFOn sizes and total TxFIFO size issues

2017-12-05 Thread John Youn
On 11/30/2017 12:16 AM, Minas Harutyunyan wrote: > In host mode reading from DPTXSIZn returning invalid value in > dwc2_check_param_tx_fifo_sizes function. > > In total TxFIFO size calculations unnecessarily reducing by ep_info. > hw->total_fifo_size can be fully allocated for FIFO's. > > Added

Re: [PATCH v3 1/2] usb: dwc2: host: Don't retry NAKed transactions right away

2017-12-05 Thread John Youn
On 12/05/2017 08:18 AM, Stefan Wahren wrote: > Hi Felipe, > Hi John, > > > Am 30.10.2017 um 18:08 schrieb Douglas Anderson: >> On rk3288-veyron devices on Chrome OS it was found that plugging in an >> Arduino-based USB device could cause the system to lockup, especially >> if the CPU Frequency was

Re: [PATCH] usb: dwc3: gadget: Correct ISOC DATA PIDs for short packets

2017-12-05 Thread Manu Gautam
Hi Felipe, On 7/19/2017 1:16 PM, Felipe Balbi wrote: > Hi, > > Manu Gautam writes: >>> Manu Gautam writes: > Manu Gautam writes: > diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c >> index

Re: [PATCH v4 72/73] xfs: Convert mru cache to XArray

2017-12-05 Thread Matthew Wilcox
On Tue, Dec 05, 2017 at 08:45:49PM -0800, Matthew Wilcox wrote: > The dquot code is just going to have to live with the fact that there's > additional locking going on that it doesn't need. I'm open to getting > rid of the irqsafety, but we can't give up the spinlock protection > without giving

Re: [PATCH v4 72/73] xfs: Convert mru cache to XArray

2017-12-05 Thread Matthew Wilcox
On Wed, Dec 06, 2017 at 02:14:56PM +1100, Dave Chinner wrote: > > The other conversions use the normal API instead of the advanced API, so > > all of this gets hidden away. For example, the inode cache does this: > > Ah, OK, that's not obvious from the code changes. :/ Yeah, it's a lot easier

Re: [PATCH v4 72/73] xfs: Convert mru cache to XArray

2017-12-05 Thread Dave Chinner
On Tue, Dec 05, 2017 at 06:02:08PM -0800, Matthew Wilcox wrote: > On Wed, Dec 06, 2017 at 12:36:48PM +1100, Dave Chinner wrote: > > > - if (radix_tree_preload(GFP_NOFS)) > > > - return -ENOMEM; > > > - > > > INIT_LIST_HEAD(>list_node); > > > elem->key = key; > > > > > > -

Re: [PATCH v4 00/73] XArray version 4

2017-12-05 Thread Dave Chinner
On Tue, Dec 05, 2017 at 06:05:15PM -0800, Matthew Wilcox wrote: > On Wed, Dec 06, 2017 at 12:45:49PM +1100, Dave Chinner wrote: > > On Tue, Dec 05, 2017 at 04:40:46PM -0800, Matthew Wilcox wrote: > > > From: Matthew Wilcox > > > > > > I looked through some notes and

Re: [PATCH v4 00/73] XArray version 4

2017-12-05 Thread Matthew Wilcox
On Wed, Dec 06, 2017 at 01:17:52PM +1100, Dave Chinner wrote: > On Wed, Dec 06, 2017 at 01:53:41AM +, Matthew Wilcox wrote: > > Huh, you've caught a couple of problems that 0day hasn't sent me yet. Try > > turning on DAX or TRANSPARENT_HUGEPAGE. Thanks! > > Dax is turned on,

Re: [PATCH v4 00/73] XArray version 4

2017-12-05 Thread Dave Chinner
On Wed, Dec 06, 2017 at 01:53:41AM +, Matthew Wilcox wrote: > Huh, you've caught a couple of problems that 0day hasn't sent me yet. Try > turning on DAX or TRANSPARENT_HUGEPAGE. Thanks! Dax is turned on, CONFIG_TRANSPARENT_HUGEPAGE is not. Looks like nothing is setting

Re: [PATCH v4 00/73] XArray version 4

2017-12-05 Thread Matthew Wilcox
On Wed, Dec 06, 2017 at 12:45:49PM +1100, Dave Chinner wrote: > On Tue, Dec 05, 2017 at 04:40:46PM -0800, Matthew Wilcox wrote: > > From: Matthew Wilcox > > > > I looked through some notes and decided this was version 4 of the XArray. > > Last posted two weeks ago, this

Re: [PATCH v4 72/73] xfs: Convert mru cache to XArray

2017-12-05 Thread Matthew Wilcox
On Wed, Dec 06, 2017 at 12:36:48PM +1100, Dave Chinner wrote: > > - if (radix_tree_preload(GFP_NOFS)) > > - return -ENOMEM; > > - > > INIT_LIST_HEAD(>list_node); > > elem->key = key; > > > > - spin_lock(>lock); > > - error = radix_tree_insert(>store, key, elem); > > -

RE: [PATCH v4 00/73] XArray version 4

2017-12-05 Thread Matthew Wilcox
Huh, you've caught a couple of problems that 0day hasn't sent me yet. Try turning on DAX or TRANSPARENT_HUGEPAGE. Thanks! > -Original Message- > From: Dave Chinner [mailto:da...@fromorbit.com] > Sent: Tuesday, December 5, 2017 8:51 PM > To: Matthew Wilcox > Cc:

Re: [PATCH v4 00/73] XArray version 4

2017-12-05 Thread Dave Chinner
On Wed, Dec 06, 2017 at 12:45:49PM +1100, Dave Chinner wrote: > On Tue, Dec 05, 2017 at 04:40:46PM -0800, Matthew Wilcox wrote: > > From: Matthew Wilcox > > > > I looked through some notes and decided this was version 4 of the XArray. > > Last posted two weeks ago, this

Re: [PATCH v4 00/73] XArray version 4

2017-12-05 Thread Dave Chinner
On Tue, Dec 05, 2017 at 04:40:46PM -0800, Matthew Wilcox wrote: > From: Matthew Wilcox > > I looked through some notes and decided this was version 4 of the XArray. > Last posted two weeks ago, this version includes a *lot* of changes. > I'd like to thank Dave Chinner for

Re: [PATCH v4 72/73] xfs: Convert mru cache to XArray

2017-12-05 Thread Dave Chinner
On Tue, Dec 05, 2017 at 04:41:58PM -0800, Matthew Wilcox wrote: > From: Matthew Wilcox > > This eliminates a call to radix_tree_preload(). . > void > @@ -431,24 +424,24 @@ xfs_mru_cache_insert( > unsigned long key, > struct xfs_mru_cache_elem

[PATCH v4 07/73] xarray: Define struct xa_node

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox This is a direct replacement for struct radix_tree_node. Use a #define so that radix tree users continue to work without change. Signed-off-by: Matthew Wilcox --- include/linux/radix-tree.h | 29

[PATCH v4 10/73] xarray: Add xa_get_tag, xa_set_tag and xa_clear_tag

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

[PATCH v4 02/73] xarray: Add the xa_lock to the radix_tree_root

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox This results in no change in structure size on 64-bit x86 as it fits in the padding between the gfp_t and the void *. Signed-off-by: Matthew Wilcox --- fs/f2fs/gc.c | 2 +- include/linux/idr.h|

[PATCH v4 20/73] idr: Convert to XArray

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox The IDR distinguishes between unallocated entries (read as NULL) and entries where the user has chosen to store NULL. The radix tree was modified to consider NULL entries which had tag 0 _clear_ as being allocated, but it added a lot of complexity.

[PATCH v4 09/73] xarray: Add xa_load

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox This first function in the XArray API brings with it a lot of support infrastructure. The advanced API is based around the xa_state which is a more capable version of the radix_tree_iter. As the test-suite demonstrates, it is possible to use the

[PATCH v4 17/73] xarray: Add xas_next and xas_prev

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

[PATCH v4 24/73] page cache: Add and replace pages using the XArray

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox Use the XArray APIs to add and replace pages in the page cache. This removes two uses of the radix tree preload API and is significantly shorter code. Signed-off-by: Matthew Wilcox --- mm/filemap.c | 142

[PATCH v4 13/73] xarray: Add xa_for_each

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox This iterator allows the user to efficiently walk a range of the array, executing the loop body once for each non-NULL entry in that range. This commit also includes xa_find() and xa_next() which are helper functions for xa_for_each() but may also be

[PATCH v4 11/73] xarray: Add xa_store

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox xa_store() differs from radix_tree_insert() in that it will overwrite an existing element in the array rather than returning an error. This is the behaviour which most users want, and those that want more complex behaviour generally want to use the

[PATCH v4 19/73] xarray: Add MAINTAINERS entry

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox Add myself as XArray and IDR maintainer. Signed-off-by: Matthew Wilcox --- MAINTAINERS | 12 1 file changed, 12 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index d4fdcb12616c..b2f8d606756b 100644 ---

[PATCH v4 06/73] xarray: Add definition of struct xarray

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox This is a direct replacement for struct radix_tree_root. Some of the struct members have changed name; convert those, and use a #define so that radix_tree users continue to work without change. Signed-off-by: Matthew Wilcox

[PATCH v4 08/73] xarray: Add documentation

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox This is documentation on how to use the XArray, not details about its internal implementation. Signed-off-by: Matthew Wilcox --- Documentation/core-api/index.rst | 1 + Documentation/core-api/xarray.rst | 281

[PATCH v4 00/73] XArray version 4

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox I looked through some notes and decided this was version 4 of the XArray. Last posted two weeks ago, this version includes a *lot* of changes. I'd like to thank Dave Chinner for his feedback, encouragement and distracting ideas for improvement, which

[PATCH v4 30/73] mm: Convert workingset to XArray

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

[PATCH v4 31/73] mm: Convert truncate to XArray

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

[PATCH v4 27/73] page cache: Convert delete_batch to XArray

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox Rename the function from page_cache_tree_delete_batch to just page_cache_delete_batch. Signed-off-by: Matthew Wilcox --- mm/filemap.c | 21 +++-- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git

[PATCH v4 26/73] page cache: Convert page cache lookups to XArray

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox Introduce page_cache_pin() to factor out the common logic between the various lookup routines: find_get_entry find_get_entries find_get_pages_range find_get_pages_contig find_get_pages_range_tag find_get_entries_tag filemap_map_pages By using the

[PATCH v4 32/73] mm: Convert add_to_swap_cache to XArray

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox Combine __add_to_swap_cache and add_to_swap_cache into one function since there is no more need to preload. Signed-off-by: Matthew Wilcox --- mm/swap_state.c | 93 ++--- 1

[PATCH v4 29/73] mm: Convert page-writeback to XArray

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox Includes moving mapping_tagged() to fs.h as a static inline, and changing it to return bool. Signed-off-by: Matthew Wilcox --- include/linux/fs.h | 17 +-- mm/page-writeback.c | 62

[PATCH v4 03/73] page cache: Use xa_lock

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox Remove the address_space ->tree_lock and use the xa_lock newly added to the radix_tree_root. Rename the address_space ->page_tree to ->pages, since we don't really care that it's a tree. Take the opportunity to rearrange the elements of

[PATCH v4 04/73] xarray: Replace exceptional entries

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

[PATCH v4 14/73] xarray: Add xas_for_each_tag

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox This iterator operates across each tagged entry in the specified range. We do not yet have a user for an xa_for_each_tag iterator, but it would be straight-forward to add one if needed. This commit also includes xas_find_tag() and xas_next_tag().

[PATCH v4 16/73] xarray: Add xa_destroy

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox This function frees all the internal memory allocated to the xarray and reinitialises it to be empty. Signed-off-by: Matthew Wilcox --- include/linux/xarray.h | 1 + lib/xarray.c | 26 ++ 2

[PATCH v4 05/73] xarray: Change definition of sibling entries

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox Instead of storing a pointer to the slot containing the canonical entry, store the offset of the slot. Produces slightly more efficient code (~300 bytes) and simplifies the implementation. Signed-off-by: Matthew Wilcox ---

[PATCH v4 25/73] page cache: Convert page deletion to XArray

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox The code is slightly shorter and simpler. Signed-off-by: Matthew Wilcox --- mm/filemap.c | 26 -- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/mm/filemap.c b/mm/filemap.c index

[PATCH v4 23/73] page cache: Add page_cache_range_empty function

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox btrfs has its own custom function for determining whether the page cache has any pages in a particular range. Move this functionality to the page cache, and call it from btrfs. Signed-off-by: Matthew Wilcox ---

[PATCH v4 01/73] xfs: Rename xa_ elements to ail_

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox This is a simple rename, except that xa_ail becomes ail_head. Signed-off-by: Matthew Wilcox --- fs/xfs/xfs_buf_item.c| 10 ++-- fs/xfs/xfs_dquot.c | 4 +- fs/xfs/xfs_dquot_item.c | 11 ++--

[PATCH v4 21/73] ida: Convert to XArray

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox Use the xarray infrstructure like we used the radix tree infrastructure. This lets us get rid of idr_get_free() from the radix tree code. Signed-off-by: Matthew Wilcox --- include/linux/idr.h| 8 +-

[PATCH v4 38/73] mm: Convert collapse_shmem to XArray

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

[PATCH v4 35/73] mm: Convert __do_page_cache_readahead to XArray

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox This one is trivial. Signed-off-by: Matthew Wilcox --- mm/readahead.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/mm/readahead.c b/mm/readahead.c index f64b31b3a84a..66bcaffd47f0 100644 ---

[PATCH v4 34/73] mm: Convert cgroup writeback to XArray

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox This is a fairly naive conversion, leaving in place the GFP_ATOMIC allocation. By switching the locking around, we could use GFP_KERNEL and probably simplify the error handling. Signed-off-by: Matthew Wilcox ---

[PATCH v4 47/73] shmem: Convert shmem_alloc_hugepage to XArray

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox xa_find() is a slightly easier API to use than radix_tree_gang_lookup_slot() because it contains its own RCU locking. Signed-off-by: Matthew Wilcox --- mm/shmem.c | 13 +++-- 1 file changed, 3 insertions(+), 10

[PATCH v4 51/73] btrfs: Convert page cache to XArray

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox Signed-off-by: Matthew Wilcox --- fs/btrfs/compression.c | 4 +--- fs/btrfs/extent_io.c | 6 ++ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c index

[PATCH v4 33/73] mm: Convert delete_from_swap_cache to XArray

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

[PATCH v4 45/73] shmem: Convert shmem_wait_for_pins to XArray

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox As with shmem_tag_pins(), hold the lock around the entire loop instead of acquiring & dropping it for each entry we're going to untag. Signed-off-by: Matthew Wilcox --- mm/shmem.c | 59

[PATCH v4 42/73] shmem: Convert shmem_confirm_swap to XArray

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox xa_load has its own RCU locking, so we can eliminate it here. Signed-off-by: Matthew Wilcox --- mm/shmem.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/mm/shmem.c b/mm/shmem.c index

[PATCH v4 46/73] shmem: Convert shmem_add_to_page_cache to XArray

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

[PATCH v4 28/73] page cache: Remove stray radix comment

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox Signed-off-by: Matthew Wilcox --- mm/filemap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/filemap.c b/mm/filemap.c index 9e6158cfbaeb..79d0731b8762 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@

[PATCH v4 44/73] shmem: Convert shmem_tag_pins to XArray

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox Simplify the locking by taking the spinlock while we walk the tree on the assumption that many acquires and releases of the lock will be worse than holding the lock for a (potentially) long time. We could replicate the same locking behaviour with the

[PATCH v4 41/73] shmem: Convert replace to XArray

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox shmem_radix_tree_replace() is renamed to shmem_xa_replace() and converted to use the XArray API. Signed-off-by: Matthew Wilcox --- mm/shmem.c | 22 -- 1 file changed, 8 insertions(+), 14 deletions(-)

[PATCH v4 40/73] pagevec: Use xa_tag_t

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox Removes sparse warnings. Signed-off-by: Matthew Wilcox --- fs/btrfs/extent_io.c| 4 ++-- fs/ext4/inode.c | 2 +- fs/f2fs/data.c | 2 +- fs/gfs2/aops.c | 2 +- include/linux/pagevec.h | 8

[PATCH v4 37/73] mm: Convert huge_memory to XArray

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox Quite a straightforward conversion. Signed-off-by: Matthew Wilcox --- mm/huge_memory.c | 19 --- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/mm/huge_memory.c b/mm/huge_memory.c index

[PATCH v4 36/73] mm: Convert page migration to XArray

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox Signed-off-by: Matthew Wilcox --- mm/migrate.c | 40 1 file changed, 16 insertions(+), 24 deletions(-) diff --git a/mm/migrate.c b/mm/migrate.c index 59f18c571120..7122fec9b075 100644

[PATCH v4 39/73] mm: Convert khugepaged_scan_shmem to XArray

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox Slightly shorter and easier to read code. Signed-off-by: Matthew Wilcox --- mm/khugepaged.c | 17 + 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/mm/khugepaged.c b/mm/khugepaged.c index

[PATCH v4 43/73] shmem: Convert find_swap_entry to XArray

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox This is a 1:1 conversion. Signed-off-by: Matthew Wilcox --- mm/shmem.c | 23 +++ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/mm/shmem.c b/mm/shmem.c index 654f367aca90..ce285ae635ea

[PATCH v4 50/73] shmem: Comment fixups

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox Remove the last mentions of radix tree from various comments. Signed-off-by: Matthew Wilcox --- mm/shmem.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/mm/shmem.c b/mm/shmem.c index

[PATCH v4 49/73] shmem: Convert shmem_partial_swap_usage to XArray

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox Simpler code because the xarray takes care of things like the limit and dereferencing the slot. Signed-off-by: Matthew Wilcox --- mm/shmem.c | 18 +++--- 1 file changed, 3 insertions(+), 15 deletions(-) diff

[PATCH v4 48/73] shmem: Convert shmem_free_swap to XArray

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

[PATCH v4 18/73] xarray: Add xas_create_range

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox This hopefully temporary function is useful for users who have not yet been converted to multi-index entries. Signed-off-by: Matthew Wilcox --- include/linux/xarray.h | 2 ++ lib/xarray.c | 22

[PATCH v4 52/73] fs: Convert buffer to XArray

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox Mostly comment fixes, but one use of __xa_set_tag. Signed-off-by: Matthew Wilcox --- fs/buffer.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/fs/buffer.c b/fs/buffer.c index

[PATCH v4 15/73] xarray: Add xa_get_entries, xa_get_tagged and xa_get_maybe_tag

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox These functions allow a range of xarray entries to be extracted into a compact normal array. Signed-off-by: Matthew Wilcox --- include/linux/xarray.h | 27 lib/xarray.c | 88

[PATCH v4 57/73] dax: Convert dax_unlock_mapping_entry to XArray

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox Replace slot_locked() with dax_locked() and inline unlock_slot() into its only caller. Signed-off-by: Matthew Wilcox --- fs/dax.c | 50 -- 1 file changed, 16 insertions(+), 34

[PATCH v4 53/73] fs: Convert writeback to XArray

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox A couple of short loops. Signed-off-by: Matthew Wilcox --- fs/fs-writeback.c | 27 ++- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index

[PATCH v4 58/73] dax: Convert lock_slot to XArray

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox Signed-off-by: Matthew Wilcox --- fs/dax.c | 25 + 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/fs/dax.c b/fs/dax.c index 03bfa599f75c..d2007a17d257 100644 --- a/fs/dax.c +++

[PATCH v4 55/73] f2fs: Convert to XArray

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox This is a straightforward conversion. Signed-off-by: Matthew Wilcox --- fs/f2fs/data.c | 3 +-- fs/f2fs/dir.c| 5 + fs/f2fs/inline.c | 6 +- fs/f2fs/node.c | 10 ++ 4 files changed, 5

[PATCH v4 56/73] lustre: Convert to XArray

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox Signed-off-by: Matthew Wilcox --- drivers/staging/lustre/lustre/llite/glimpse.c | 12 +--- drivers/staging/lustre/lustre/mdc/mdc_request.c | 16 2 files changed, 13 insertions(+), 15 deletions(-)

[PATCH v4 72/73] xfs: Convert mru cache to XArray

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox This eliminates a call to radix_tree_preload(). Signed-off-by: Matthew Wilcox --- fs/xfs/xfs_mru_cache.c | 72 +++--- 1 file changed, 33 insertions(+), 39 deletions(-) diff --git

[PATCH v4 63/73] dax: Convert dax_insert_mapping_entry to XArray

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox Signed-off-by: Matthew Wilcox --- fs/dax.c | 18 ++ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/fs/dax.c b/fs/dax.c index 619aff70583f..de85ce87d333 100644 --- a/fs/dax.c +++ b/fs/dax.c @@

[PATCH v4 71/73] xfs: Convert xfs dquot to XArray

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox This is a pretty straight-forward conversion. Signed-off-by: Matthew Wilcox --- fs/xfs/xfs_dquot.c | 33 + fs/xfs/xfs_qm.c| 32 fs/xfs/xfs_qm.h| 18

[PATCH v4 73/73] usb: Convert xhci-mem to XArray

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox The XArray API is a slightly better fit for xhci_insert_segment_mapping() than the radix tree API was. Signed-off-by: Matthew Wilcox --- drivers/usb/host/xhci-mem.c | 70 +

[PATCH v4 66/73] page cache: Finish XArray conversion

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox With no more radix tree API users left, we can drop the GFP flags and use xa_init() instead of INIT_RADIX_TREE(). Signed-off-by: Matthew Wilcox --- fs/inode.c | 2 +- include/linux/fs.h | 2 +- mm/swap_state.c| 2

[PATCH v4 65/73] dax: Fix sparse warning

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox sparse doesn't know that follow_pte_pmd conditionally acquires the ptl, so add an annotation to let it know what's going on. Signed-off-by: Matthew Wilcox --- fs/dax.c | 1 + 1 file changed, 1 insertion(+) diff --git

[PATCH v4 69/73] xfs: Convert m_perag_tree to XArray

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox Getting rid of the m_perag_lock lets us also get rid of the call to radix_tree_preload(). This is a relatively naive conversion; we could improve performance over the radix tree implementation by passing around xa_state pointers instead of indices,

[PATCH v4 22/73] page cache: Convert hole search to XArray

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox The page cache offers the ability to search for a miss in the previous or next N locations. Rather than teach the XArray about the page cache's definition of a miss, use xas_prev() and xas_next() to search the page array. This should be more

[PATCH v4 67/73] vmalloc: Convert to XArray

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox The radix tree of vmap blocks is simpler to express as an XArray. Saves a couple of hundred bytes of text and eliminates a user of the radix tree preload API. Signed-off-by: Matthew Wilcox --- mm/vmalloc.c | 39

[PATCH v4 61/73] dax: Convert dax_writeback_one to XArray

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox Likewise easy Signed-off-by: Matthew Wilcox --- fs/dax.c | 17 +++-- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/fs/dax.c b/fs/dax.c index 66f6c4ea18f7..7bd94f1b61d0 100644 --- a/fs/dax.c +++

[PATCH v4 68/73] brd: Convert to XArray

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox Convert brd_pages from a radix tree to an XArray. Simpler and smaller code; in particular another user of radix_tree_preload is eliminated. Signed-off-by: Matthew Wilcox --- drivers/block/brd.c | 87

[PATCH v4 54/73] nilfs2: Convert to XArray

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

[PATCH v4 59/73] dax: More XArray conversion

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox This time, we want to convert get_unlocked_mapping_entry() to use the XArray. That has a ripple effect, causing us to change the waitqueues to hash on the address of the xarray rather than the address of the mapping (functionally equivalent), and

[PATCH v4 64/73] dax: Convert grab_mapping_entry to XArray

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox Signed-off-by: Matthew Wilcox --- fs/dax.c | 98 +--- 1 file changed, 26 insertions(+), 72 deletions(-) diff --git a/fs/dax.c b/fs/dax.c index

[PATCH v4 70/73] xfs: Convert pag_ici_root to XArray

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox Rename pag_ici_root to pag_ici_xa and use XArray APIs instead of radix tree APIs. Shorter code, typechecking on tag numbers, better error checking in xfs_reclaim_inode(), and eliminates a call to radix_tree_preload(). Signed-off-by: Matthew Wilcox

[PATCH v4 60/73] dax: Convert __dax_invalidate_mapping_entry to XArray

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox Simple now that we already have an xa_state! Signed-off-by: Matthew Wilcox --- fs/dax.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/dax.c b/fs/dax.c index ad984dece12e..66f6c4ea18f7

[PATCH v4 62/73] dax: Convert dax_insert_pfn_mkwrite to XArray

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox Signed-off-by: Matthew Wilcox --- fs/dax.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/dax.c b/fs/dax.c index 7bd94f1b61d0..619aff70583f 100644 --- a/fs/dax.c +++ b/fs/dax.c @@ -1498,21

[PATCH v4 12/73] xarray: Add xa_cmpxchg

2017-12-05 Thread Matthew Wilcox
From: Matthew Wilcox This works like doing cmpxchg() on an array entry. Code which wants the radix_tree_insert() semantic of not overwriting an existing entry can cmpxchg() with NULL and get the action it wants. Plus, instead of having an error returned, they get the

Re: [PATCH v4] usb: xhci: allow imod-interval to be configurable

2017-12-05 Thread Adam Wallis
Rob, On 12/5/2017 3:48 AM, Mathias Nyman wrote: > On 05.12.2017 04:54, Adam Wallis wrote: >> On 12/4/2017 9:15 PM, Chunfeng Yun wrote: >>> On Mon, 2017-12-04 at 09:27 -0500, Adam Wallis wrote: The xHCI driver currently has the IMOD set to 160, which [..] > > If Rob Acks this version I'll

[PATCH] USB: uas and storage: Add US_FL_BROKEN_FUA for another JMicron JMS567 ID

2017-12-05 Thread David Kozub
There is another JMS567-based USB3 UAS enclosure (152d:0578) that fails with the following error: [sda] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE [sda] tag#0 Sense Key : Illegal Request [current] [sda] tag#0 Add. Sense: Invalid field in cdb The issue occurs both with UAS

Re: [PATCH 2/2] usbip: Use common error handling code in stub_recv_cmd_submit()

2017-12-05 Thread Shuah Khan
On 12/05/2017 02:52 PM, SF Markus Elfring wrote: > From: Markus Elfring > Date: Tue, 5 Dec 2017 22:40:30 +0100 > > Add a jump target so that a bit of exception handling can be better reused > at the end of this function. > > Signed-off-by: Markus Elfring

Re: [PATCH 1/2] usbip: Delete an error message for a failed memory allocation in two functions

2017-12-05 Thread Shuah Khan
On 12/05/2017 02:49 PM, SF Markus Elfring wrote: > From: Markus Elfring > Date: Tue, 5 Dec 2017 22:25:38 +0100 > > Omit an extra message for a memory allocation failure in these functions. > > This issue was detected by using the Coccinelle software. Please

  1   2   >