i915: enum intel_dpll_id cast

2017-11-22 Thread Kees Cook
Hi, While doing Clang test builds, this was reported: drivers/gpu/drm/i915/intel_ddi.c:1481:30: warning: implicit conversion from enumeration type 'enum port' to different enumeration type 'enum intel_dpll_id' [-Wenum-conversion] enum intel_dpll_id pll_id = port;

[PATCH] checkpatch: Add a warning for log messages that don't end in a line feed

2017-11-22 Thread Logan Gunthorpe
Check for lines with a log function using a $logLineFeedFunctions expression which is similar to the existing $logFunctions expression except we don't include MODULE and seq_ functions. Once an appropriate log function is found, mark that we are in a log function (for multiline calls). The mark is

[PATCH] genirq: Make - vs ?: precedence explicit

2017-11-22 Thread Kees Cook
Noticed with a Clang build. This improves the readability of the ?: expression, as it has lower precedence than the - expression. Show explicitly that - is evaluated first. Cc: Thomas Gleixner Signed-off-by: Kees Cook --- kernel/irq/matrix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH 5/5] ASoC: qcom: apq8016-sbc: Map BTN_0 to KEY_PLAYPAUSE

2017-11-22 Thread Benson Leung
The Android 3.5mm Headset jack specification mentions that BTN_0 should be mapped to KEY_MEDIA, but this is less logical than KEY_PLAYPAUSE, which has much broader userspace support. For example, the Chrome OS userspace now supports KEY_PLAYPAUSE to toggle play/pause of videos and audio, but does

[PATCH 3/5] ASoC: ts3a227e: Map BTN_0 to KEY_PLAYPAUSE

2017-11-22 Thread Benson Leung
The Android 3.5mm Headset jack specification mentions that BTN_0 should be mapped to KEY_MEDIA, but this is less logical than KEY_PLAYPAUSE, which has much broader userspace support. For example, the Chrome OS userspace now supports KEY_PLAYPAUSE to toggle play/pause of videos and audio, but does

[PATCH 4/5] ASoC: rk3399_gru_sound: Map BTN_0 to KEY_PLAYPAUSE

2017-11-22 Thread Benson Leung
The Android 3.5mm Headset jack specification mentions that BTN_0 should be mapped to KEY_MEDIA, but this is less logical than KEY_PLAYPAUSE, which has much broader userspace support. For example, the Chrome OS userspace now supports KEY_PLAYPAUSE to toggle play/pause of videos and audio, but does

[PATCH] staging/irda/net: Drop extraneous parentheses around test

2017-11-22 Thread Kees Cook
Noticed during Clang builds. This drops the redundant parentheses. Cc: Samuel Ortiz Cc: Greg Kroah-Hartman Cc: de...@driverdev.osuosl.org Signed-off-by: Kees Cook --- drivers/staging/irda/net/irlmp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/irda/n

[PATCH 1/5] ASoC: Intel: kbl_rt5663_rt5514_max98927: Map BTN_0 to KEY_PLAYPAUSE

2017-11-22 Thread Benson Leung
The Android 3.5mm Headset jack specification mentions that BTN_0 should be mapped to KEY_MEDIA, but this is less logical than KEY_PLAYPAUSE, which has much broader userspace support. For example, the Chrome OS userspace now supports KEY_PLAYPAUSE to toggle play/pause of videos and audio, but does

[PATCH 0/5] ASoC: Map BTN_0 for Android Headsets to KEY_PLAYPAUSE

2017-11-22 Thread Benson Leung
The Android 3.5mm Headset jack specification mentions that BTN_0 should be mapped to KEY_MEDIA, but this is less logical than KEY_PLAYPAUSE, which has much broader userspace support.

[PATCH 2/5] ASoC: Intel: kbl_rt5663_max98927: Map BTN_0 to KEY_PLAYPAUSE

2017-11-22 Thread Benson Leung
The Android 3.5mm Headset jack specification mentions that BTN_0 should be mapped to KEY_MEDIA, but this is less logical than KEY_PLAYPAUSE, which has much broader userspace support. For example, the Chrome OS userspace now supports KEY_PLAYPAUSE to toggle play/pause of videos and audio, but does

[PATCH] 4.15 vmgfx boot warning

2017-11-22 Thread Woody Suwalski
The 4.15 vmwgfx driver shows a warning during boot (32 bit x86) It is caused by a mismatch between the result of vmw_enable_vblank() and what the drm_atomic_helper expects:    /...    ret = drm_crtc_vblank_get(crtc);    WARN_ONCE(ret != -EINVAL, "driver forgot to call drm_crtc_vblank_off()\n");

[PATCH 03/62] radix tree test suite: Check reclaim bit

2017-11-22 Thread Matthew Wilcox
From: Matthew Wilcox In order to test the memory allocation failure paths, the radix tree test suite fails allocations if __GFP_NOWARN is set. That happens to work for the radix tree implementation, but the semantics we really want are that we want to fail allocations which are not GFP_KERNEL.

[PATCH 04/62] idr test suite: Fix ida_test_random()

2017-11-22 Thread Matthew Wilcox
From: Matthew Wilcox The test was checking the wrong errno; ida_get_new_above() returns EAGAIN, not ENOMEM on memory allocation failure. Double the number of threads to increase the chance that we actually exercise this path during the test suite (it was a bit sporadic before). Signed-off-by: M

[PATCH 13/62] fscache: Use appropriate radix tree accessors

2017-11-22 Thread Matthew Wilcox
From: Matthew Wilcox Don't open-code accesses to data structure internals. Signed-off-by: Matthew Wilcox --- fs/fscache/cookie.c | 2 +- fs/fscache/object.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/fscache/cookie.c b/fs/fscache/cookie.c index ff84258132bb..e905

[PATCH 62/62] mm: Convert page-writeback to XArray

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

[PATCH 11/62] Export __set_page_dirty

2017-11-22 Thread Matthew Wilcox
From: Matthew Wilcox XFS currently contains a copy-and-paste of __set_page_dirty(). Export it from buffer.c instead. Signed-off-by: Matthew Wilcox --- fs/buffer.c| 3 ++- fs/xfs/xfs_aops.c | 15 ++- include/linux/mm.h | 1 + 3 files changed, 5 insertions(+), 14 deletion

[PATCH 60/62] drm: Replace vmwgfx IDRs with IDAs

2017-11-22 Thread Matthew Wilcox
From: Matthew Wilcox These IDRs were only being used to allocate unique numbers, not to look up pointers, so they can use the more space-efficient IDA instead. Signed-off-by: Matthew Wilcox --- drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 6 +++--- drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 2

[PATCH 09/62] arm64: Turn flush_dcache_mmap_lock into a no-op

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

[PATCH 58/62] drm: Remove qxl driver IDR locks

2017-11-22 Thread Matthew Wilcox
From: Matthew Wilcox By switching to the internal IDR lock, we can get rid of the idr_preload calls. Signed-off-by: Matthew Wilcox --- drivers/gpu/drm/qxl/qxl_cmd.c | 26 +++--- drivers/gpu/drm/qxl/qxl_drv.h | 2 -- drivers/gpu/drm/qxl/qxl_kms.c | 2 -- driver

[PATCH 48/62] block: Remove IDR preloading

2017-11-22 Thread Matthew Wilcox
From: Matthew Wilcox The IDR now handles its own locking, so if we remove the locking in genhd, we can also remove the memory preloading. The genhd needs to protect the object retrieved from the IDR against removal until its refcount has been elevated, so hold the IDR's lock during lookup. Sign

[PATCH 61/62] net: Redesign act_api use of IDR

2017-11-22 Thread Matthew Wilcox
From: Matthew Wilcox The IDR now has its own internal locking, so remove the idrinfo->lock. Use the IDR's lock to protect the walks that were formerly protected by our own lock. Remove the preloading as it is no longer necessary with the internal locking. Then embed the action_idr in the struct

[PATCH 59/62] drm: Replace virtio IDRs with IDAs

2017-11-22 Thread Matthew Wilcox
From: Matthew Wilcox These IDRs were only being used to allocate unique numbers, not to look up pointers, so they can use the more space-efficient IDA instead. Signed-off-by: Matthew Wilcox --- drivers/gpu/drm/virtio/virtgpu_drv.h | 6 ++ drivers/gpu/drm/virtio/virtgpu_kms.c | 18

[PATCH 54/62] scsi: Remove idr_preload in st driver

2017-11-22 Thread Matthew Wilcox
From: Matthew Wilcox The IDR now has its own locking, so remove the driver's private lock and calls to idr_preload. Signed-off-by: Matthew Wilcox --- drivers/scsi/st.c | 18 +- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c

[PATCH 57/62] drm: Remove drm_syncobj_fd_to_handle

2017-11-22 Thread Matthew Wilcox
From: Matthew Wilcox Now that the IDR handles its own locking, by removing our own lock, we can also remove the idr_preload calls. Also add a missing put call in a failure path. Signed-off-by: Matthew Wilcox --- drivers/gpu/drm/drm_syncobj.c | 23 +-- include/drm/drm_file.

[PATCH 56/62] drm: Remove drm_minor_lock and idr_preload

2017-11-22 Thread Matthew Wilcox
From: Matthew Wilcox The IDR now has its own lock; use it to protect the lookup too. Signed-off-by: Matthew Wilcox --- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 8 drivers/gpu/drm/drm_drv.c| 25 +++-- drivers/gpu/drm/drm_gem.c

[PATCH 47/62] xfs: Convert mru cache to XArray

2017-11-22 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 | 71 +- 1 file changed, 35 insertions(+), 36 deletions(-) diff --git a/fs/xfs/xfs_mru_cache.c b/fs/xfs/xfs_mru_cache.c

[PATCH 55/62] firewire: Remove call to idr_preload

2017-11-22 Thread Matthew Wilcox
From: Matthew Wilcox core-cdev uses a spinlock to protect several elements, including the IDR. Rather than reusing the IDR's spinlock for all of this, preallocate the necessary memory by allocating a NULL pointer and then replace it with the resource pointer once we have the spinlock. Signed-off

[PATCH 51/62] dca: Remove idr_preload calls

2017-11-22 Thread Matthew Wilcox
From: Matthew Wilcox The IDR now has its own locking, so remove the dca lock and calls to idr_preload. Also, there is no need to call idr_destroy on a freshly initialised IDR. Signed-off-by: Matthew Wilcox --- drivers/dca/dca-sysfs.c | 22 -- 1 file changed, 4 insertions(+

[PATCH 50/62] cgroup: Remove IDR wrappers

2017-11-22 Thread Matthew Wilcox
From: Matthew Wilcox The IDR now behaves the way the cgroup wrappers made the IDR behave, so the wrappers are no longer needed. Signed-off-by: Matthew Wilcox --- kernel/cgroup/cgroup.c | 59 ++ 1 file changed, 11 insertions(+), 48 deletions(-) d

[PATCH 52/62] ipc: Remove call to idr_preload

2017-11-22 Thread Matthew Wilcox
From: Matthew Wilcox The ipc code follows a different pattern to most IDR preload users; the lock that it is holding is embedded in the object, not protecting the IDR (the IDR is protected by an rwsem). Instead of dropping the lock, allocating memory and retrying, we reserve a slot in the tree b

[PATCH 53/62] irq: Remove call to idr_preload

2017-11-22 Thread Matthew Wilcox
From: Matthew Wilcox Not entirely clear why the preload was there with no locking. Maybe at one time there was a lock, and the preload was never removed? Signed-off-by: Matthew Wilcox --- kernel/irq/timings.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/kernel/irq/ti

[PATCH 44/62] xfs: Convert m_perag_tree to XArray

2017-11-22 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, possibly at the expense of

[PATCH 49/62] rxrpc: Remove IDR preloading

2017-11-22 Thread Matthew Wilcox
From: Matthew Wilcox The IDR now handles its own locking, so if we remove the locking in rxrpc, we can also remove the memory preloading. Signed-off-by: Matthew Wilcox --- net/rxrpc/conn_client.c | 9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/net/rxrpc/conn_client.

[PATCH 45/62] xfs: Convert pag_ici_root to XArray

2017-11-22 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 --- fs/xfs/libxfs/xfs_sb

[PATCH 46/62] xfs: Convert xfs dquot to XArray

2017-11-22 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 +- 3 files changed, 42 insertions(+

[PATCH 43/62] brd: Convert to XArray

2017-11-22 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 ++--- 1 file changed, 23

[PATCH 34/62] page cache: Use xarray for adding pages

2017-11-22 Thread Matthew Wilcox
From: Matthew Wilcox Use the XArray APIs to add and replace pages in the page cache. This removes two uses of the radix tree preload API and is significantly shorter code. Signed-off-by: Matthew Wilcox --- include/linux/xarray.h | 13 + mm/filemap.c | 131 +-

[PATCH 35/62] page cache: Convert page_cache_tree_delete to xarray

2017-11-22 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 1d520748789b..f60f22867a1a 100644 --- a/mm/filemap.c

[PATCH 36/62] page cache: Convert find_get_entry to xarray

2017-11-22 Thread Matthew Wilcox
From: Matthew Wilcox Slightly simpler and shorter code. Signed-off-by: Matthew Wilcox --- mm/filemap.c | 56 +--- 1 file changed, 21 insertions(+), 35 deletions(-) diff --git a/mm/filemap.c b/mm/filemap.c index f60f22867a1a..2172c9f9efb9 100

[PATCH 37/62] shmem: Convert replace to xarray

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

[PATCH 38/62] shmem: Convert shmem_confirm_swap to XArray

2017-11-22 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 f16afa03cfb0..98944cff6319 100644 --- a/mm/shmem.c +++ b/mm/sh

[PATCH 40/62] shmem: Convert shmem_tag_pins to XArray

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

[PATCH 39/62] shmem: Convert find_swap_entry to XArray

2017-11-22 Thread Matthew Wilcox
From: Matthew Wilcox This is a 1:1 conversion. Signed-off-by: Matthew Wilcox --- mm/shmem.c | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/mm/shmem.c b/mm/shmem.c index 98944cff6319..b6f7fc283aad 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -1076,28

[PATCH 41/62] shmem: Convert shmem_wait_for_pins to XArray

2017-11-22 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 +-- 1 file changed, 25 insertio

[PATCH 42/62] vmalloc: Convert to xarray

2017-11-22 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 | 37 - 1 file changed, 12 inse

[PATCH 10/62] unicore32: Turn flush_dcache_mmap_lock into a no-op

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

[PATCH 32/62] ida: Convert to using xarray

2017-11-22 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 +- include/linux/radix-tree.h | 4 - lib/idr.c |

Re: new patchset to eliminate DM's use of BIOSET_NEED_RESCUER

2017-11-22 Thread Mike Snitzer
On Tue, Nov 21 2017 at 11:28pm -0500, Mike Snitzer wrote: > > I'll work through your patches tomorrow. Please see the top 3 patches on this branch: https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git/log/?h=dm-4.16 This rebased dm-4.16 branch seems to be working well so

[PATCH 30/62] xarray: Add xas_find_any / xas_next_any

2017-11-22 Thread Matthew Wilcox
From: Matthew Wilcox These variations will find any entry (whether it be NULL or an internal entry). The only thing they won't return is a node pointer (because it will walk down the tree). xas_next_any() is an inline version of xas_find_any() which avoids making a function call for the common

[PATCH 31/62] Convert IDR to use xarray

2017-11-22 Thread Matthew Wilcox
From: Matthew Wilcox The one thing the IDR can do which the XArray cannot is allocate an entry and store a NULL pointer there. The radix tree was modified to have this ability, but it added a lot of complexity. Instead, we introduce the 'Skip entry', which will read back from the XArray as NULL

[PATCH 33/62] page cache: Convert page_cache_next_hole to XArray

2017-11-22 Thread Matthew Wilcox
From: Matthew Wilcox Use xas_find_any() to scan the entries instead of doing a lookup from the top of the tree each time. Signed-off-by: Matthew Wilcox --- mm/filemap.c | 15 +-- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/mm/filemap.c b/mm/filemap.c index 1c03b0

Re: [PATCH 00/18] arm64: Unmap the kernel whilst running in userspace (KAISER)

2017-11-22 Thread Ard Biesheuvel
On 22 November 2017 at 16:19, Pavel Machek wrote: > Hi! > >> This patch series implements something along the lines of KAISER for arm64: >> >> https://gruss.cc/files/kaiser.pdf >> >> although I wrote this from scratch because the paper has some funny >> assumptions about how the architecture wor

[PATCH 27/62] xarray: Add xa_get_entries and xa_get_tagged

2017-11-22 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 | 4 +++ lib/xarray.c | 69 ++ 2 files changed, 73 insertions(+)

[PATCH 28/62] xarray: Add xa_destroy

2017-11-22 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 files changed, 27 insertions(+) diff --git a/in

[PATCH 29/62] xarray: Add xas_prev_any

2017-11-22 Thread Matthew Wilcox
From: Matthew Wilcox The page cache wants to search backwards to find the first hole. Its definition of a hole doesn't make sense for the xarray, so introduce a function called xas_prev_any() which will return any kind of entry, including NULL or internal entries. Signed-off-by: Matthew Wilcox

[PATCH 26/62] xarray: Add xas_for_each_tag

2017-11-22 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(). Signed-off-by: Matthew Wilc

[PATCH 25/62] xarray: Add xa_init

2017-11-22 Thread Matthew Wilcox
From: Matthew Wilcox For initialising xarrays in code rather than data. Signed-off-by: Matthew Wilcox --- include/linux/xarray.h | 13 + lib/xarray.c | 15 +++ 2 files changed, 28 insertions(+) diff --git a/include/linux/xarray.h b/include/linux/xarray.h inde

Re: [Outreachy kernel] Re: [PATCH] net: usb: hso.c: remove unneeded DRIVER_LICENSE #define

2017-11-22 Thread Julia Lawall
On Wed, 22 Nov 2017, Joe Perches wrote: > On Fri, 2017-11-17 at 15:19 +0100, Greg Kroah-Hartman wrote: > > There is no need to #define the license of the driver, just put it in > > the MODULE_LICENSE() line directly as a text string. > > > > This allows tools that check that the module license m

[PATCH 23/62] xarray: Add xa_cmpxchg

2017-11-22 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 value currently stored in t

[PATCH 24/62] xarray: Add xa_for_each

2017-11-22 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 useful in their own right

[PATCH 0/2] ASoC: cs42l52: Adjustments for cs42l52_i2c_probe()

2017-11-22 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 22 Nov 2017 22:15:43 +0100 Two update suggestions were taken into account from static source code analysis. Markus Elfring (2): Delete an error message for a failed memory allocation Improve two size determinations sound/soc/codecs/cs42l52.c | 13 +--

[PATCH 19/62] xarray: Define struct xa_node

2017-11-22 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 +++-- include/linux/xarray.h | 24 ++

[PATCH 18/62] xarray: Add definition of struct xarray

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

[PATCH 17/62] xarray: Change definition of sibling entries

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

[PATCH 1/2] ASoC: cs42l52: Delete an error message for a failed memory allocation in cs42l52_i2c_probe()

2017-11-22 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 22 Nov 2017 22:08:06 +0100 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- sound/soc/codecs/cs42l52.c | 5 ++--- 1 file changed, 2 insertions(+),

Re: x86/insn-eval: negative return value?

2017-11-22 Thread Borislav Petkov
On Wed, Nov 22, 2017 at 12:45:17PM -0800, Kees Cook wrote: > Hi, > > While doing some Clang test builds, this was reported: > > arch/x86/lib/insn-eval.c:780:10: warning: implicit conversion from > 'int' to 'char' changes value from 132 to -124 [-Wconstant-conversion] > return INSN

[PATCH v7 3/5] bpf: add a bpf_override_function helper

2017-11-22 Thread Josef Bacik
From: Josef Bacik Error injection is sloppy and very ad-hoc. BPF could fill this niche perfectly with it's kprobe functionality. We could make sure errors are only triggered in specific call chains that we care about with very specific situations. Accomplish this with the bpf_override_funciton

[PATCH 20/62] xarray: Add xa_load

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

Re: [PATCH v2 6/6] iommu/vt-d: Add debugfs support for Intel IOMMU Interrupt remapping

2017-11-22 Thread Andy Shevchenko
On Wed, 2017-11-22 at 11:25 -0800, Sohil Mehta wrote: > Debugfs extension for Intel IOMMU to dump Interrupt remapping table > entries for Interrupt remapping and Interrupt posting. > +static int intel_iommu_ir_open(struct inode *inode, struct file > *file) > +{ > + return single_open(file, int

Re: [PATCH v2 4/6] iommu/vt-d: Add debugfs extension to show register contents

2017-11-22 Thread Andy Shevchenko
On Wed, 2017-11-22 at 11:25 -0800, Sohil Mehta wrote: > From: Gayatri Kammela > +static int intel_iommu_regs_open(struct inode *inode, struct file > *file) > +{ > + return single_open(file, intel_iommu_debugfs_regs_show, > +inode->i_private); > +} > + > +static const

[PATCH v7 1/5] add infrastructure for tagging functions as error injectable

2017-11-22 Thread Josef Bacik
From: Josef Bacik Using BPF we can override kprob'ed functions and return arbitrary values. Obviously this can be a bit unsafe, so make this feature opt-in for functions. Simply tag a function with KPROBE_ERROR_INJECT_SYMBOL in order to give BPF access to that function for error injection purpo

[PATCH v7 2/5] btrfs: make open_ctree error injectable

2017-11-22 Thread Josef Bacik
From: Josef Bacik This allows us to do error injection with BPF for open_ctree. Signed-off-by: Josef Bacik Acked-by: Ingo Molnar --- fs/btrfs/disk-io.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index dfdab849037b..69d17a640b94 100644 --- a/f

[PATCH 2/2] ASoC: cs42l52: Improve two size determinations in cs42l52_i2c_probe()

2017-11-22 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 22 Nov 2017 22:11:30 +0100 Replace the specification of two data structures by pointer dereferences as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. This issue was d

[PATCH v7 5/5] btrfs: allow us to inject errors at io_ctl_init

2017-11-22 Thread Josef Bacik
From: Josef Bacik This was instrumental in reproducing a space cache bug. Signed-off-by: Josef Bacik Acked-by: Ingo Molnar --- fs/btrfs/free-space-cache.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c index cdc9f4015ec3..daa98d

[PATCH v7 4/5] samples/bpf: add a test for bpf_override_return

2017-11-22 Thread Josef Bacik
From: Josef Bacik This adds a basic test for bpf_override_return to verify it works. We override the main function for mounting a btrfs fs so it'll return -ENOMEM and then make sure that trying to mount a btrfs fs will fail. Acked-by: Alexei Starovoitov Acked-by: Ingo Molnar Signed-off-by: Jo

[PATCH 02/11] net: ethernet: ti: cpsw: use proper io apis

2017-11-22 Thread Grygorii Strashko
Switch to use writel_relaxed/readl_relaxed() IO API instead of raw version as it is recommended. Signed-off-by: Grygorii Strashko --- drivers/net/ethernet/ti/cpsw.c | 36 ++-- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/drivers/net/ethernet/ti/

[PATCH 09/11] net: ethernet: ti: ale: move static initialization in cpsw_ale_create()

2017-11-22 Thread Grygorii Strashko
Move static initialization from cpsw_ale_start() to cpsw_ale_create() as it does not make much sence to perform static initializtion in cpsw_ale_start() which is called everytime netif[s] is opened. Signed-off-by: Grygorii Strashko --- drivers/net/ethernet/ti/cpsw_ale.c | 57 +++-

[PATCH 10/11] net: ethernet: ti: ale: use devm_kzalloc in cpsw_ale_create()

2017-11-22 Thread Grygorii Strashko
Use cpsw_ale_create in cpsw_ale_create(). This also makes cpsw_ale_destroy() function nop, so remove it. Signed-off-by: Grygorii Strashko --- drivers/net/ethernet/ti/cpsw.c| 17 +++-- drivers/net/ethernet/ti/cpsw_ale.c| 11 +-- drivers/net/ethernet/ti/cpsw_ale.h

[PATCH 08/11] net: ethernet: ti: ale: optimize ale entry mask bits configuartion

2017-11-22 Thread Grygorii Strashko
The ale->params.ale_ports parameter can be used to deriver values for all ale entry mask bits: port_mask_bits, port_mask_bits, port_num_bits. Hence, calculate above values and drop all hardcoded values. For port_num_bits calcualtion use order_base_2() API. Signed-off-by: Grygorii Strashko --- dr

[PATCH 07/11] net: ethernet: ti: ale: disable ale from stop()

2017-11-22 Thread Grygorii Strashko
ALE is enabled from cpsw_ale_start() now, but disabled only from cpsw_ale_destroy() which introduces inconsitance as cpsw_ale_start() is called when netif[s] is opened, but cpsw_ale_destroy() is called when driver is removed. Hence, move ALE disabling in cpsw_ale_stop(). Signed-off-by: Grygorii St

[PATCH 11/11] net: ethernet: ti: ale: fix port check in cpsw_ale_control_set/get

2017-11-22 Thread Grygorii Strashko
ALE ports number includes the Host port and ext Ports, and ALE ports numbering starts from 0, so correct corresponding port checks in cpsw_ale_control_set/get(). Signed-off-by: Grygorii Strashko --- drivers/net/ethernet/ti/cpsw_ale.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) dif

[PATCH 06/11] net: ethernet: ti: ale: use proper io apis

2017-11-22 Thread Grygorii Strashko
Switch to use writel_relaxed/readl_relaxed() IO API instead of raw version as it is recommended. Signed-off-by: Grygorii Strashko --- drivers/net/ethernet/ti/cpsw_ale.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/net/ethernet/ti/cpsw_a

[PATCH 00/11] net: ethernet: ti: cpsw/ale clean up and optimization

2017-11-22 Thread Grygorii Strashko
This is set of non critical clean ups and optimizations for TI CPSW and ALE drivers. Grygorii Strashko (11): net: ethernet: ti: cpsw: drop unused var poll from cpsw_update_channels_res net: ethernet: ti: cpsw: use proper io apis net: ethernet: ti: cpsw: move platform data struct to .c fi

[PATCH 01/11] net: ethernet: ti: cpsw: drop unused var poll from cpsw_update_channels_res

2017-11-22 Thread Grygorii Strashko
Drop unused variable "poll" from cpsw_update_channels_res(). Signed-off-by: Grygorii Strashko --- drivers/net/ethernet/ti/cpsw.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index 0c7c7a1..9235b9e 100644 --- a/drivers/net/e

[PATCH 04/11] net: ethernet: ti: cpsw: move mac_hi/lo defines in cpsw.h

2017-11-22 Thread Grygorii Strashko
Move mac_hi/lo defines in common header cpsw.h and re-use them for netcp_ethss.c. Signed-off-by: Grygorii Strashko --- drivers/net/ethernet/ti/cpsw.c| 4 drivers/net/ethernet/ti/cpsw.h| 4 drivers/net/ethernet/ti/netcp_ethss.c | 5 + 3 files changed, 5 insertions(+)

[PATCH 03/11] net: ethernet: ti: cpsw: move platform data struct to .c file

2017-11-22 Thread Grygorii Strashko
CPSW platform data struct cpsw_platform_data and struct cpsw_slave_data are used only incide cpsw.c module, so move these definitions there. Signed-off-by: Grygorii Strashko --- drivers/net/ethernet/ti/cpsw.c | 21 + drivers/net/ethernet/ti/cpsw.h | 21 -

Re: [PATCH 05/62] radix tree: Add a missing cast to gfp_t

2017-11-22 Thread Luc Van Oostenryck
On Wed, Nov 22, 2017 at 01:06:42PM -0800, Matthew Wilcox wrote: > From: Matthew Wilcox > > sparse complains about an invalid type assignment. > > Signed-off-by: Matthew Wilcox > --- > lib/radix-tree.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/radix-tree.c b/

Re: [PATCH 5/5] crypto: chacha20 - Fix keystream alignment for chacha20_block()

2017-11-22 Thread Eric Biggers
On Wed, Nov 22, 2017 at 08:51:57PM +, Ard Biesheuvel wrote: > On 22 November 2017 at 19:51, Eric Biggers wrote: > > From: Eric Biggers > > > > When chacha20_block() outputs the keystream block, it uses 'u32' stores > > directly. However, the callers (crypto/chacha20_generic.c and > > drivers

[PATCH 05/11] net: ethernet: ti: cpsw: fix ale port numbers

2017-11-22 Thread Grygorii Strashko
TI OMAP/Sitara SoCs have fixed number of ALE ports 3, which includes Host port also. Hence, use fixed value instead of value calcualted from DT, which can be set by user and might not reflect actual HW configuration. Signed-off-by: Grygorii Strashko --- drivers/net/ethernet/ti/cpsw.c | 3 ++- 1

[PATCH v7 0/4] Add the ability to do BPF directed error injection

2017-11-22 Thread Josef Bacik
This is hopefully the final version, I've addressed the comment by Igno and added his Acks. v6->v7: - moved the opt-in macro to bpf.h out of kprobes.h. v5->v6: - add BPF_ALLOW_ERROR_INJECTION() tagging for functions that will support this feature. This way only functions that opt-in will be al

[PATCH 21/62] xarray: Add xa_get_tag, xa_set_tag and xa_clear_tag

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

[PATCH 22/62] xarray: Add xa_store

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

[PATCH 14/62] xarray: Add the xa_lock to the radix_tree_root

2017-11-22 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| 12 ++-- include/linux/radix-tree.h

Re: [PATCH 3.18 00/12] 3.18.84-stable review

2017-11-22 Thread Guenter Roeck
On Wed, Nov 22, 2017 at 11:11:43AM +0100, Greg Kroah-Hartman wrote: > This is the start of the stable review cycle for the 3.18.84 release. > There are 12 patches in this series, all will be posted as a response > to this one. If anyone has any issues with these being applied, please > let me know

[PATCH 16/62] xarray: Replace exceptional entries

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

[PATCH 15/62] page cache: Use xa_lock

2017-11-22 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 address_space to pack them better on

Re: [PATCH 4.4 00/16] 4.4.101-stable review

2017-11-22 Thread Guenter Roeck
On Wed, Nov 22, 2017 at 11:11:53AM +0100, Greg Kroah-Hartman wrote: > This is the start of the stable review cycle for the 4.4.101 release. > There are 16 patches in this series, all will be posted as a response > to this one. If anyone has any issues with these being applied, please > let me know

Re: [PATCH 4.9 00/25] 4.9.65-stable review

2017-11-22 Thread Guenter Roeck
On Wed, Nov 22, 2017 at 11:11:52AM +0100, Greg Kroah-Hartman wrote: > This is the start of the stable review cycle for the 4.9.65 release. > There are 25 patches in this series, all will be posted as a response > to this one. If anyone has any issues with these being applied, please > let me know.

Re: [PATCH 4.13 00/35] 4.13.16-stable review

2017-11-22 Thread Guenter Roeck
On Wed, Nov 22, 2017 at 11:11:54AM +0100, Greg Kroah-Hartman wrote: > This is the start of the stable review cycle for the 4.13.16 release. > There are 35 patches in this series, all will be posted as a response > to this one. If anyone has any issues with these being applied, please > let me know

[PATCH 08/62] Explicitly include radix-tree.h

2017-11-22 Thread Matthew Wilcox
From: Matthew Wilcox These three files use the radix tree, but rely on an implicit include of radix-tree.h through fs.h. Signed-off-by: Matthew Wilcox --- drivers/usb/host/xhci.h | 1 + include/linux/fscache.h | 1 + lib/dma-debug.c | 1 + 3 files changed, 3 insertions(+) diff --git a

<    1   2   3   4   5   6   7   8   9   10   >