[PATCH v4 1/4] net: macb: Add support for PTP timestamps in DMA descriptors

2017-06-29 Thread Rafal Ozieblo
This patch adds support for PTP timestamps in DMA buffer descriptors. It checks capability at runtime and uses appropriate buffer descriptor. Signed-off-by: Rafal Ozieblo --- drivers/net/ethernet/cadence/Kconfig | 10 ++- drivers/net/ethernet/cadence/macb.c | 117

KVM: BUG during OOM on host

2017-06-29 Thread Wanpeng Li
Hi all, When the OOM-Killer kills the guest which is running memory hog processes, there is tons of splatting as below: the page count reaches 0 before drop_spte. The splatting will disappear when disables THP on host. [ cut here ] WARNING: CPU: 4 PID: 28317 at

Re: [PATCH] cma: fix calculation of aligned offset

2017-06-29 Thread Gregory Fong
On Wed, Jun 28, 2017 at 10:07 AM, Doug Berger wrote: > The align_offset parameter is used by bitmap_find_next_zero_area_off() > to represent the offset of map's base from the previous alignment > boundary; the function ensures that the returned index, plus the > align_offset,

[PATCH v4 0/4] PTP support for macb driver

2017-06-29 Thread Rafal Ozieblo
This patch series adds support for PTP synchronization protocol in Cadence GEM driver based on PHC. v2 changes: * removed alarm's support * removed external time stamp support * removed PTP event interrupt handling * removed ptp_hw_support flag * removed all extra sanity checks * removed

[PATCH v4 4/4] net: macb: Add hardware PTP support

2017-06-29 Thread Rafal Ozieblo
This patch is based on original Harini's patch and Andrei's patch, implemented in a separate file to ease the review/maintanance and integration with other platforms. This driver supports GEM-GXL: - Register ptp clock framework - Initialize PTP related registers - HW time stamp on the PTP

[PATCH v4 2/4] net: macb: Add tsu_clk to device tree

2017-06-29 Thread Rafal Ozieblo
Signed-off-by: Rafal Ozieblo Acked-by: Rob Herring --- Documentation/devicetree/bindings/net/macb.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/net/macb.txt b/Documentation/devicetree/bindings/net/macb.txt index

[PATCH v7 1/4] pinctrl: qcom: Add ipq8074 pinctrl driver

2017-06-29 Thread Varadarajan Narayanan
Add initial pinctrl driver to support pin configuration with pinctrl framework for ipq8074. Acked-by: Rob Herring (bindings) Acked-by: Bjorn Andersson Signed-off-by: Manoharan Vijaya Raghavan Signed-off-by: Varadarajan

[PATCH v7 2/4] dt-bindings: qcom: Add ipq8074 bindings

2017-06-29 Thread Varadarajan Narayanan
Acked-by: Rob Herring Signed-off-by: Varadarajan Narayanan --- Documentation/devicetree/bindings/arm/qcom.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/arm/qcom.txt

[PATCH v7 0/4] Add minimal boot support for IPQ8074

2017-06-29 Thread Varadarajan Narayanan
v7: Remove the following clk related patches (Stephen Boyd has picked them) Incorporate Bjorn's comment in arm64: dts: Add ipq8074 SoC and HK01 board support Included Bjorn's and Rob's Ack for rest of the patches. v6: * Include Rob's Ack to the first patch. v5: *

[PATCH v7 3/4] arm64: dts: Add ipq8074 SoC and HK01 board support

2017-06-29 Thread Varadarajan Narayanan
Add initial device tree support for the Qualcomm IPQ8074 SoC and HK01 evaluation board. Acked-by: Bjorn Andersson Signed-off-by: Manoharan Vijaya Raghavan Signed-off-by: Abhishek Sahu Signed-off-by: Varadarajan

Re: [linux-next][PATCH] usb: dwc3: omap: remove IRQ_NOAUTOEN used with shared irq

2017-06-29 Thread Tony Lindgren
* Vignesh R [170628 21:21]: > > > On Thursday 29 June 2017 05:01 AM, Strashko, Grygorii wrote: > > IRQ_NOAUTOEN can't be used with shared IRQs and Kernel now will triggers > > warning if it happns, since commit 04c848d39879 ("genirq: Warn when > > IRQ_NOAUTOEN is used with

[PATCH v7 4/4] arm64: defconfig: Enable qcom ipq8074 clock and pinctrl

2017-06-29 Thread Varadarajan Narayanan
From: Abhishek Sahu These configs are required for booting kernel in qcom ipq8074 boards. Acked-by: Bjorn Andersson Signed-off-by: Abhishek Sahu Signed-off-by: Varadarajan Narayanan ---

[PATCH] leds: lp55xx: make various arrays static const

2017-06-29 Thread Colin King
From: Colin Ian King Several arrays are currently on-stack and instead should be made static const. Signed-off-by: Colin Ian King --- drivers/leds/leds-lp5523.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git

Re: [PATCH] ARM: ensure memblock-limit is pmd-aligned

2017-06-29 Thread Doug Berger
On 06/29/2017 04:16 AM, Mark Rutland wrote: > On Tue, Jun 27, 2017 at 10:33:29AM -0700, Doug Berger wrote: >> The pmd containing memblock_limit is cleared by prepare_page_table() >> which creates the opportunity for early_alloc() to allocate unmapped >> memory if memblock_limit is not pmd aligned

Re: [kernel-hardening] Re: [PATCH v2] mm: Add SLUB free list pointer obfuscation

2017-06-29 Thread Tycho Andersen
On Thu, Jun 29, 2017 at 01:54:13PM -0400, Rik van Riel wrote: > On Thu, 2017-06-29 at 10:47 -0700, Kees Cook wrote: > > On Thu, Jun 29, 2017 at 10:05 AM, Christoph Lameter > > wrote: > > > On Sun, 25 Jun 2017, Kees Cook wrote: > > > > > > > The difference gets lost in the noise,

[PATCH v4 05/16] dm: add ->flush() dax operation support

2017-06-29 Thread Dan Williams
Allow device-mapper to route flush operations to the per-target implementation. In order for the device stacking to work we need a dax_dev and a pgoff relative to that device. This gives each layer of the stack the information it needs to look up the operation pointer for the next level. This

[PATCH v4 07/16] x86, dax: replace clear_pmem() with open coded memset + dax_ops->flush

2017-06-29 Thread Dan Williams
The clear_pmem() helper simply combines a memset() plus a cache flush. Now that the flush routine is optionally provided by the dax device driver we can avoid unnecessary cache management on dax devices fronting volatile memory. With clear_pmem() gone we can follow on with a patch to make pmem

Re: [PATCH V5] powerpc/powernv : Add support for OPAL-OCC command/response interface

2017-06-29 Thread Shilpasri G Bhat
On 06/27/2017 10:05 AM, Cyril Bur wrote: > On Mon, 2017-06-26 at 11:02 +0530, Shilpasri G Bhat wrote: >> In P9, OCC (On-Chip-Controller) supports shared memory based >> commad-response interface. Within the shared memory there is an OPAL >> command buffer and OCC response buffer that can be used

[PATCH 07/37] binder: move binder_alloc to separate file

2017-06-29 Thread Todd Kjos
Move the binder allocator functionality to its own file Continuation of splitting the binder allocator from the binder driver. Split binder_alloc functions from normal binder functions. Add kernel doc comments to functions declared extern in binder_alloc.h Signed-off-by: Todd Kjos

[PATCH 36/37] binder: fix death race conditions

2017-06-29 Thread Todd Kjos
From: Martijn Coenen A race existed where one thread could register a death notification for a node, while another thread was cleaning up that node and sending out death notifications for its references, causing simultaneous access to ref->death because different locks were

[PATCH 13/37] binder: refactor queue management in binder_thread_read

2017-06-29 Thread Todd Kjos
In binder_thread_read, the BINDER_WORK_NODE command is used to communicate the references on the node to userspace. It can take a couple of iterations in the loop to construct the list of commands for user space. When locking is added, the lock would need to be release on each iteration which

[PATCH 10/37] binder: change binder_stats to atomics

2017-06-29 Thread Todd Kjos
From: Badhri Jagan Sridharan Use atomics for stats to avoid needing to lock for increments/decrements Signed-off-by: Todd Kjos --- drivers/android/binder.c | 48 1 file changed, 28 insertions(+), 20

[PATCH 33/37] binder: use inner lock to protect thread accounting

2017-06-29 Thread Todd Kjos
Use the inner lock to protect thread accounting fields in proc structure: max_threads, requested_threads, requested_threads_started and ready_threads. Signed-off-by: Todd Kjos --- drivers/android/binder.c | 28 +++- 1 file changed, 23 insertions(+), 5

[PATCH 35/37] binder: protect against stale pointers in print_binder_transaction

2017-06-29 Thread Todd Kjos
When printing transactions there were several race conditions that could cause a stale pointer to be deferenced. Fixed by reading the pointer once and using it if valid (which is safe). The transaction buffer also needed protection via proc lock, so it is only printed if we are holding the correct

Re: [BISECTED, REGRESSION] v4.12-rc: omapdrm fails to probe on Nokia N900

2017-06-29 Thread Aaro Koskinen
Hi, On Thu, Jun 29, 2017 at 09:50:13PM +0300, Aaro Koskinen wrote: > On Thu, Jun 15, 2017 at 09:51:06AM +0300, Tomi Valkeinen wrote: > > On 15/06/17 01:11, Aaro Koskinen wrote: > > > When booting v4.12-rc5 on Nokia N900, omapdrm fails to probe and there > > > is no display. > > > > Are you sure

Re: [PATCH v2 1/1] gpio: gpio-wcove: Fix GPIO control register offset calculation

2017-06-29 Thread sathyanarayanan kuppuswamy
Hi Andy, On 06/29/2017 05:30 AM, Andy Shevchenko wrote: +Cc: Hans On Mon, Jun 26, 2017 at 8:37 PM, wrote: From: Kuppuswamy Sathyanarayanan According to Whiskey Cove PMIC GPIO controller specification,

Re: [PATCH 1/2] tpm: use tpm_buf functions in tpm2_pcr_read()

2017-06-29 Thread Jarkko Sakkinen
On Thu, Jun 29, 2017 at 01:18:58AM +0300, Jarkko Sakkinen wrote: > On Fri, Jun 23, 2017 at 03:41:56PM +0200, Roberto Sassu wrote: > > tpm2_pcr_read() now builds the PCR read command buffer with tpm_buf > > functions. This solution is preferred to using a tpm2_cmd structure, > > as tpm_buf

Re: [PATCH net] net: handle NAPI_GRO_FREE_STOLEN_HEAD case also in napi_frags_finish()

2017-06-29 Thread David Miller
From: Michal Kubecek Date: Thu, 29 Jun 2017 11:13:36 +0200 (CEST) > Recently I started seeing warnings about pages with refcount -1. The > problem was traced to packets being reused after their head was merged into > a GRO packet by skb_gro_receive(). While bisecting the issue

[PATCH v4 01/16] x86, uaccess: introduce copy_from_iter_flushcache for pmem / cache-bypass operations

2017-06-29 Thread Dan Williams
The pmem driver has a need to transfer data with a persistent memory destination and be able to rely on the fact that the destination writes are not cached. It is sufficient for the writes to be flushed to a cpu-store-buffer (non-temporal / "movnt" in x86 terms), as we expect userspace to call

[PATCH v4 02/16] dm: add ->copy_from_iter() dax operation support

2017-06-29 Thread Dan Williams
Allow device-mapper to route copy_from_iter operations to the per-target implementation. In order for the device stacking to work we need a dax_dev and a pgoff relative to that device. This gives each layer of the stack the information it needs to look up the operation pointer for the next level.

[PATCH v4 03/16] filesystem-dax: convert to dax_copy_from_iter()

2017-06-29 Thread Dan Williams
Now that all possible providers of the dax_operations copy_from_iter method are implemented, switch filesytem-dax to call the driver rather than copy_to_iter_pmem. Reviewed-by: Jan Kara Signed-off-by: Dan Williams --- arch/x86/include/asm/pmem.h | 50

[PATCH v4 06/16] filesystem-dax: convert to dax_flush()

2017-06-29 Thread Dan Williams
Filesystem-DAX flushes caches whenever it writes to the address returned through dax_direct_access() and when writing back dirty radix entries. That flushing is only required in the pmem case, so the dax_flush() helper skips cache management work when the underlying driver does not specify a flush

Re: [GIT PULL rcu/next] RCU commits for 4.13

2017-06-29 Thread Paul E. McKenney
On Thu, Jun 29, 2017 at 11:59:27AM -0400, Alan Stern wrote: > On Thu, 29 Jun 2017, Will Deacon wrote: > > > [turns out I've not been on cc for this thread, but Jade pointed me to it > > and I see my name came up at some point!] > > > > On Wed, Jun 28, 2017 at 05:05:46PM -0700, Linus Torvalds

[PATCH] trace-cmd: use the standard PATH_MAX macro

2017-06-29 Thread Baruch Siach
Having both local MAX_PATH and standard PATH_MAX macros in the code is confusing. The fact that the MAX_PATH value varies doesn't help. Use the POSIX standard PATH_MAX everywhere. Signed-off-by: Baruch Siach --- trace-listen.c | 6 ++ trace-record.c | 8

RE: [PATCH 12/16] switchtec_ntb: add link management

2017-06-29 Thread Allen Hubbe
From: Logan Gunthorpe > switchtec_ntb checks for a link by looking at the shared memory > window. If the magic number is correct and the otherside indicates > their link is enabled then we take the link to be up. > > Whenever we change our local link status we send a msg to the > otherside to

RE: [PATCH 14/16] switchtec_ntb: implement scratchpad registers

2017-06-29 Thread Allen Hubbe
From: Logan Gunthorpe > Seeing there is no dedicated hardware for this, we simply add > these as entries in the shared memory window. Thus, we could support > any number of them but 128 seems like enough, for now. Scratchpads are not natively supported by this hardware, - but the hardware does

Re: [PATCH 00/17] v2 net generic subsystem refcount conversions

2017-06-29 Thread David Miller
From: Elena Reshetova Date: Wed, 28 Jun 2017 14:54:49 +0300 > If there are no objections to the patches, please merge them via > respective trees. This doesn't apply cleanly to the net-next tree, please respin.

Re: [PATCH 14/16] switchtec_ntb: implement scratchpad registers

2017-06-29 Thread Logan Gunthorpe
On 6/29/2017 12:11 PM, Allen Hubbe wrote: This could get in the way of letting the driver support more than two ports later on. Is there already a plan to change this to support more than two ports? Well, as I mentioned this patchset is only to support 2 ports. Future work will expand this

Re: [PATCH 2/4] swait: add the missing killable swaits

2017-06-29 Thread Davidlohr Bueso
On Thu, 29 Jun 2017, Linus Torvalds wrote: So without some very compelling reason, I'd not want to add yet another wait-queue. Yes, I was expecting this and very much agree. I'll actually take a look at wake_q for wake_up_all() and co. to see if we can reduce the spinlock hold times. Of

Re: [PATCHv3 4/4] hwmon: da9052: add support for TSI channel

2017-06-29 Thread Dmitry Torokhov
Hi Sebastian, On Thu, Jun 29, 2017 at 02:43:46PM +0200, Sebastian Reichel wrote: > @@ -238,6 +239,14 @@ static int da9052_ts_probe(struct platform_device *pdev) > if (!da9052) > return -EINVAL; > > + /* > + * Check if touchscreen pins are used are analogue input

Re: [PATCH] fs: ext4: inode->i_generation not assigned 0.

2017-06-29 Thread J. Bruce Fields
On Thu, Jun 29, 2017 at 02:30:53PM -0400, J. Bruce Fields wrote: > On Thu, Jun 29, 2017 at 10:25:28AM -0700, Darrick J. Wong wrote: > > Was there ever a version of NFS (or more generally callers of the > > exportfs code) that couldn't deal with i_generation in the file handle, > > and therefore we

Re: [PATCH v2 6/8] x86/entry: add unwind hint annotations

2017-06-29 Thread Andy Lutomirski
On Thu, Jun 29, 2017 at 10:53 AM, Josh Poimboeuf wrote: > There's a bug here that will need a small change to the entry code. > > Mike Galbraith reported: > > WARNING: can't dereference registers at c900089d7e08 for ip > 81740bbb > > After some looking I found

Re: [PATCH v2 5/7] input: goldfish: Fix multitouch event handling

2017-06-29 Thread Dmitry Torokhov
On Wed, Jun 28, 2017 at 05:56:29PM +0200, Aleksandar Markovic wrote: > From: Lingfeng Yang > > Register Goldfish Events device properly as a multitouch device, > and send SYN_REPORT event in appropriate cases only. > > If SYN_REPORT is sent on every single multitouch event, it

Re: [PATCH 2/4] swait: add the missing killable swaits

2017-06-29 Thread Linus Torvalds
On Thu, Jun 29, 2017 at 11:33 AM, Davidlohr Bueso wrote: > On Thu, 29 Jun 2017, Linus Torvalds wrote: > >> I actually think swait is pure garbage. Most users only wake up one >> process anyway, and using swait for that is stupid. If you only wake >> up one, you might as well

Re: [PATCH 06/16] ntb: add check and comment for link up to mw_count and mw_get_align

2017-06-29 Thread Logan Gunthorpe
On 6/29/2017 12:11 PM, Allen Hubbe wrote: Nak. This breaks a work around for stability issues on some hardware. I am ok with changing the comment to say, this is only supported when called after link up. I would still like to allow these to be called at any time. Specific hardware drivers

[PATCH 34/37] binder: protect binder_ref with outer lock

2017-06-29 Thread Todd Kjos
Use proc->outer_lock to protect the binder_ref structure. The outer lock allows functions operating on the binder_ref to do nested acquires of node and inner locks as necessary to attach refs to nodes atomically. Binder refs must never be accesssed without holding the outer lock. Signed-off-by:

[PATCH 29/37] binder: add spinlock to protect binder_node

2017-06-29 Thread Todd Kjos
node->node_lock is used to protect elements of node. No need to acquire for fields that are invariant: debug_id, ptr, cookie. Signed-off-by: Todd Kjos --- drivers/android/binder.c | 220 +++ 1 file changed, 165 insertions(+), 55

[PATCH 31/37] binder: protect proc->threads with inner_lock

2017-06-29 Thread Todd Kjos
proc->threads will need to be accessed with higher locks of other processes held so use proc->inner_lock to protect it. proc->tmp_ref now needs to be protected by proc->inner_lock. Signed-off-by: Todd Kjos --- drivers/android/binder.c | 87

[PATCH 32/37] binder: protect transaction_stack with inner lock.

2017-06-29 Thread Todd Kjos
From: Martijn Coenen This makes future changes to priority inheritance easier, since we want to be able to look at a thread's transaction stack when selecting a thread to inherit priority for. It also allows us to take just a single lock in a few paths, where we used to take

[PATCH 24/37] binder: refactor binder ref inc/dec for thread safety

2017-06-29 Thread Todd Kjos
Once locks are added, binder_ref's will only be accessed safely with the proc lock held. Refactor the inc/dec paths to make them atomic with the binder_get_ref* paths and node inc/dec. For example, instead of: ref = binder_get_ref(proc, handle, strong); ... binder_dec_ref(ref, strong); we

[PATCH 28/37] binder: add spinlocks to protect todo lists

2017-06-29 Thread Todd Kjos
The todo lists in the proc, thread, and node structures are accessed by other procs/threads to place work items on the queue. The todo lists are protected by the new proc->inner_lock. No locks should ever be nested under these locks. As the name suggests, an outer lock will be introduced in a

[PATCH 37/37] binder: remove global binder lock

2017-06-29 Thread Todd Kjos
Remove global mutex and rely on fine-grained locking Signed-off-by: Todd Kjos --- drivers/android/binder.c | 46 +++--- 1 file changed, 3 insertions(+), 43 deletions(-) diff --git a/drivers/android/binder.c b/drivers/android/binder.c

Re: [PATCH v2 0/8] x86: undwarf unwinder

2017-06-29 Thread Josh Poimboeuf
On Thu, Jun 29, 2017 at 09:12:56AM -0500, Josh Poimboeuf wrote: > > > I'm not tied to the 'undwarf' name, other naming ideas are welcome. > > > > Ha, a new bike shed painting job! ;-) > > > > I think 'undwarf' isn't a bad name, it's short, catchy and describes the > > purpose > > of the

Re: [PATCH v2 1/1] gpio: gpio-wcove: Fix GPIO control register offset calculation

2017-06-29 Thread sathyanarayanan kuppuswamy
Hi Linus, On 06/29/2017 05:17 AM, Linus Walleij wrote: On Mon, Jun 26, 2017 at 7:37 PM, wrote: From: Kuppuswamy Sathyanarayanan According to Whiskey Cove PMIC GPIO controller specification, for GPIO

Re: [RFC v2 7/9] Trampoline emulation

2017-06-29 Thread Salvatore Mesoraca
2017-06-28 1:13 GMT+02:00 Kees Cook : > On Thu, Jun 15, 2017 at 9:42 AM, Salvatore Mesoraca > wrote: >> Some programs need to generate part of their code at runtime. Luckily >> enough, in some cases they only generate well-known code sequences (the

Re: linux-next: manual merge of the akpm-current tree with the kselftest tree

2017-06-29 Thread Andrew Morton
On Wed, 28 Jun 2017 18:31:11 +1000 Stephen Rothwell wrote: > Hi all, > > Today's linux-next merge of the akpm-current tree got conflicts in: > > tools/testing/selftests/sysctl/common_tests > tools/testing/selftests/sysctl/run_numerictests >

[tip:x86/urgent] perf/x86/intel/uncore: Fix wrong box pointer check

2017-06-29 Thread tip-bot for Kan Liang
Commit-ID: 80c65fdb4c6920e332a9781a3de5877594b07522 Gitweb: http://git.kernel.org/tip/80c65fdb4c6920e332a9781a3de5877594b07522 Author: Kan Liang AuthorDate: Thu, 29 Jun 2017 12:09:26 -0700 Committer: Thomas Gleixner CommitDate: Thu, 29 Jun 2017

[PATCH v2 1/4] lib: Add xxhash module

2017-06-29 Thread Nick Terrell
Adds xxhash kernel module with xxh32 and xxh64 hashes. xxhash is an extremely fast non-cryptographic hash algorithm for checksumming. The zstd compression and decompression modules added in the next patch require xxhash. I extracted it out from zstd since it is useful on its own. I copied the code

Re: [tpmdd-devel] [PATCH 2/2] tpm: use tpm2_pcr_read() in tpm2_do_selftest()

2017-06-29 Thread Jarkko Sakkinen
On Thu, Jun 29, 2017 at 01:19:35AM +0300, Jarkko Sakkinen wrote: > On Fri, Jun 23, 2017 at 03:41:57PM +0200, Roberto Sassu wrote: > > tpm2_do_selftest() performs a PCR read during the TPM initialization phase. > > This patch replaces the PCR read code with a call to tpm2_pcr_read(). > > > >

[PATCH v2 4/4] squashfs: Add zstd support

2017-06-29 Thread Nick Terrell
Add zstd compression and decompression support to SquashFS. zstd is a great fit for SquashFS because it can compress at ratios approaching xz, while decompressing twice as fast as zlib. For SquashFS in particular, it can decompress as fast as lzo and lz4. It also has the flexibility to turn down

Re: [PATCH 1/6] net: stmmac: support future possible different internal phy mode

2017-06-29 Thread David Miller
From: Corentin Labbe Date: Thu, 29 Jun 2017 19:02:38 +0200 > On Thu, Jun 29, 2017 at 12:23:49PM -0400, David Miller wrote: >> From: Corentin Labbe >> Date: Tue, 27 Jun 2017 11:28:01 +0200 >> >> > The current way to find if the phy is

Re: BUG: Dentry ffff9f795a08fe60{i=af565f,n=lo} still in use (1) [unmount of proc proc]

2017-06-29 Thread Andrei Vagin
On Thu, Jun 29, 2017 at 12:06 PM, Eric W. Biederman wrote: > Andrei Vagin writes: > >> Hello, >> >> We run CRIU tests on linus' tree and today we found this issue. >> >> CRIU tests are the set of small programs to check checkpoint/restore >> of different

Re: [PATCH v2] mm: Add SLUB free list pointer obfuscation

2017-06-29 Thread Rik van Riel
On Thu, 2017-06-29 at 10:47 -0700, Kees Cook wrote: > On Thu, Jun 29, 2017 at 10:05 AM, Christoph Lameter > wrote: > > On Sun, 25 Jun 2017, Kees Cook wrote: > > > > > The difference gets lost in the noise, but if the above is > > > sensible, > > > it's 0.07% slower. ;) > > > >

RE: [PATCH 06/16] ntb: add check and comment for link up to mw_count and mw_get_align

2017-06-29 Thread Allen Hubbe
From: Logan Gunthorpe > This patch adds a comment and a check to the ntb_mw_get_align and > ntb_mw_count functions so that they always fail if the function is > called before the link is up. > > This is to prevent accidental mis-use in clients that are testing > on hardware that this doesn't

RE: [PATCH 05/16] ntb: ensure ntb_mw_get_align is only called when the link is up

2017-06-29 Thread Allen Hubbe
From: Logan Gunthorpe > With switchtec hardware it's impossible to get the alignment parameters > for a peer's memory window until the peer's driver has configured it's > windows. Strictly speaking, the link doesn't have to be up for this, > but the link being up is the only way the client can

[PATCH] mmc: rtsx_usb_sdmmc: make array 'width' static const

2017-06-29 Thread Colin King
From: Colin Ian King array width is on-stack and not modified and should be made static const. Signed-off-by: Colin Ian King --- drivers/mmc/host/rtsx_usb_sdmmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH V6] powerpc/powernv : Add support for OPAL-OCC command/response interface

2017-06-29 Thread Shilpasri G Bhat
Hi, On 06/30/2017 12:02 AM, Shilpasri G Bhat wrote: > In P9, OCC (On-Chip-Controller) supports shared memory based > commad-response interface. Within the shared memory there is an OPAL > command buffer and OCC response buffer that can be used to send > inband commands to OCC. This patch adds a

Re: [PATCH 12/16] switchtec_ntb: add link management

2017-06-29 Thread Logan Gunthorpe
On 6/29/2017 12:11 PM, Allen Hubbe wrote: Should we only set self_partition? I think each peer should be able to set preferred speed, and negotiate down. As written here, the last peer to set the speed overrides the setting on the peer, and even that is not atomic if they race. This

Re: [GIT PULL rcu/next] RCU commits for 4.13

2017-06-29 Thread Paul E. McKenney
On Thu, Jun 29, 2017 at 11:17:26AM +0800, Boqun Feng wrote: > On Wed, Jun 28, 2017 at 05:45:56PM -0700, Paul E. McKenney wrote: > > On Wed, Jun 28, 2017 at 05:05:46PM -0700, Linus Torvalds wrote: > > > On Wed, Jun 28, 2017 at 4:54 PM, Paul E. McKenney > > > wrote: > >

Re: [v3 1/6] mm, oom: use oom_victims counter to synchronize oom victim selection

2017-06-29 Thread Roman Gushchin
On Fri, Jun 23, 2017 at 06:52:20AM +0900, Tetsuo Handa wrote: > Tetsuo Handa wrote: > > Roman Gushchin wrote: > > > On Thu, Jun 22, 2017 at 09:40:28AM +0900, Tetsuo Handa wrote: > > > > Roman Gushchin wrote: > > > > > --- a/mm/oom_kill.c > > > > > +++ b/mm/oom_kill.c > > > > > @@ -992,6 +992,13 @@

Re: [PATCH v2] mfd: Add driver for RAVE Supervisory Processor

2017-06-29 Thread Andrey Smirnov
On Fri, Jun 23, 2017 at 8:28 AM, Andrey Smirnov wrote: > On Tue, Jun 20, 2017 at 1:19 AM, Lee Jones wrote: >> On Mon, 12 Jun 2017, Andrey Smirnov wrote: >> >>> Add a driver for RAVE Supervisory Processor, an MCU implementing >>> varoius bits of

Re: [PATCH v2 11/51] md: raid1: initialize bvec table via bio_add_page()

2017-06-29 Thread Shaohua Li
On Wed, Jun 28, 2017 at 12:22:51AM +0800, Ming Lei wrote: > On Tue, Jun 27, 2017 at 05:36:39PM +0800, Guoqing Jiang wrote: > > > > > > On 06/26/2017 08:09 PM, Ming Lei wrote: > > > We will support multipage bvec soon, so initialize bvec > > > table using the standardy way instead of writing the

[PATCH 18/37] binder: add more debug info when allocation fails.

2017-06-29 Thread Todd Kjos
From: Martijn Coenen Display information about allocated/free space whenever binder buffer allocation fails on synchronous transactions. Signed-off-by: Martijn Coenen Signed-off-by: Siqi Lin --- drivers/android/binder_alloc.c | 31

[PATCH 25/37] binder: use node->tmp_refs to ensure node safety

2017-06-29 Thread Todd Kjos
When obtaining a node via binder_get_node(), binder_get_node_from_ref() or binder_new_node(), increment node->tmp_refs to take a temporary reference on the node to ensure the node persists while being used. binder_put_node() must be called to remove the temporary reference. Signed-off-by: Todd

[PATCH 15/37] binder: don't modify thread->looper from other threads

2017-06-29 Thread Todd Kjos
The looper member of struct binder_thread is a bitmask of control bits. All of the existing bits are modified by the affected thread except for BINDER_LOOPER_STATE_NEED_RETURN which can be modified in binder_deferred_flush() by another thread. To avoid adding a spinlock around all read-mod-writes

[PATCH 20/37] binder: refactor binder_pop_transaction

2017-06-29 Thread Todd Kjos
binder_pop_transaction needs to be split into 2 pieces to to allow the proc lock to be held on entry to dequeue the transaction stack, but no lock when kfree'ing the transaction. Split into binder_pop_transaction_locked and binder_free_transaction (the actual locks are still to be added).

Re: [PATCH v4 12/16] libnvdimm, nfit: enable support for volatile ranges

2017-06-29 Thread Linda Knippers
On 06/29/2017 01:54 PM, Dan Williams wrote: > Allow volatile nfit ranges to participate in all the same infrastructure > provided for persistent memory regions. This seems to be a bit more than "other rework". > A resulting resulting namespace > device will still be called "pmem", but the

Re: [PATCH fixes v3] pinctrl: Really force states during suspend/resume

2017-06-29 Thread Florian Fainelli
On 06/29/2017 02:17 AM, Linus Walleij wrote: > Sorry for slowness... > > On Wed, Jun 21, 2017 at 11:23 PM, Florian Fainelli > wrote: >> On 03/16/2017 07:08 AM, Linus Walleij wrote: > >>> I guess then it is better to assume we will loose the state, or >>> push for more

Re: spin_unlock_wait() in ata_scsi_cmd_error_handler()?

2017-06-29 Thread Tejun Heo
Hello, Paul. On Thu, Jun 29, 2017 at 11:10:57AM -0700, Paul E. McKenney wrote: > If this code fragment doesn't deadlock, then CPU 0's spin_unlock_wait() > must have executed before CPU 1's spin_lock(). However, even on x86, > CPU 0's prior writes can be reordered with its subsequent reads, which

Re: [PATCH 1/6] dt-bindings: Add RDA Micro vendor prefix

2017-06-29 Thread Rob Herring
On Tue, Jun 27, 2017 at 02:55:15AM +0200, Andreas Färber wrote: > RDA Microelectronics is a Chinese SoC manufacturer. > > Cc: serv...@rdamicro.com > Signed-off-by: Andreas Färber > --- > Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + > 1 file changed, 1

Re: [PATCH 2/6] dt-bindings: arm: Document RDA8810PL and Orange Pi 2G-IoT

2017-06-29 Thread Rob Herring
On Tue, Jun 27, 2017 at 02:55:16AM +0200, Andreas Färber wrote: > Add bindings for RDA Micro RDA8810PL SoC and Orange Pi 2G-IoT board. > > Cc: serv...@rdamicro.com > Cc: zhao_ste...@263.net > Signed-off-by: Andreas Färber > --- > Documentation/devicetree/bindings/arm/rda.txt |

Re: spin_unlock_wait() in ata_scsi_cmd_error_handler()?

2017-06-29 Thread Tejun Heo
Hello, On Thu, Jun 29, 2017 at 01:14:43PM -0700, Paul E. McKenney wrote: > On Thu, Jun 29, 2017 at 03:53:22PM -0400, Tejun Heo wrote: > > Hello, Paul. > > > > On Thu, Jun 29, 2017 at 11:10:57AM -0700, Paul E. McKenney wrote: > > > If this code fragment doesn't deadlock, then CPU 0's

Re: [PATCH 2/4] swait: add the missing killable swaits

2017-06-29 Thread Davidlohr Bueso
On Thu, 29 Jun 2017, Linus Torvalds wrote: Well, I'd actually say it the other way around: swait should not be used in general, only in _very_ particular pieces of code that actually explicitly need the odd swait semantics. swait uses special locking and has odd semantics that are not at all

Re: [PATCH v2 6/8] x86/entry: add unwind hint annotations

2017-06-29 Thread Josh Poimboeuf
There's a bug here that will need a small change to the entry code. Mike Galbraith reported: WARNING: can't dereference registers at c900089d7e08 for ip 81740bbb After some looking I found that it's caused by the following code snippet in the 'interrupt' macro in entry_64.S:

[PATCH v4 15/16] libnvdimm, pmem, dax: export a cache control attribute

2017-06-29 Thread Dan Williams
The dax_flush() operation can be turned into a nop on platforms where firmware arranges for cpu caches to be flushed on a power-fail event. The ACPI 6.2 specification defines a mechanism for the platform to indicate this capability so the kernel can select the proper default. However, for other

[PATCH v4 12/16] libnvdimm, nfit: enable support for volatile ranges

2017-06-29 Thread Dan Williams
Allow volatile nfit ranges to participate in all the same infrastructure provided for persistent memory regions. A resulting resulting namespace device will still be called "pmem", but the parent region type will be "nd_volatile". This is in preparation for disabling the dax ->flush() operation in

[PATCH v4 16/16] libnvdimm, pmem: disable dax flushing when pmem is fronting a volatile region

2017-06-29 Thread Dan Williams
The pmem driver attaches to both persistent and volatile memory ranges advertised by the ACPI NFIT. When the region is volatile it is redundant to spend cycles flushing caches at fsync(). Check if the hosting region is volatile and do not set dax_write_cache() if it is. Cc: Jan Kara

Re: [PATCH v2 3/5] i2c: i2c-stm32f7: add driver

2017-06-29 Thread Uwe Kleine-König
Hello, On Thu, Jun 29, 2017 at 02:40:44PM +, Pierre Yves MORDRET wrote: > >> + /* Arbitration loss */ > >> + if (status & STM32F7_I2C_ISR_ARLO) { > >> + dev_err(dev, "<%s>: Arbitration loss\n", __func__); > > > > Drop this. Arbitration loss is not an error and it shouldn't pollute

[PATCH v4 14/16] dax: convert to bitmask for flags

2017-06-29 Thread Dan Williams
In preparation for adding more flags, convert the existing flag to a bit-flag. Signed-off-by: Dan Williams --- drivers/dax/super.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/drivers/dax/super.c b/drivers/dax/super.c index

[PATCH] PM / Domains: defer dev_pm_domain_set() until genpd->attach_dev succeeds if present

2017-06-29 Thread Sudeep Holla
If the genpd->attach_dev or genpd->power_on fails, genpd_dev_pm_attach may return -EPROBE_DEFER initially. However genpd_alloc_dev_data sets the PM domain for the device unconditionally. When subsequent attempts are made to call genpd_dev_pm_attach, it may return -EEXISTS checking dev->pm_domain

[PATCH] sched/cputime: code refactoring in cputime_adjust()

2017-06-29 Thread Gustavo A. R. Silva
Value assigned to variable utime at line 619:utime = rtime; is overwritten at line 642:utime = rtime - stime; before it can be used. This makes such variable assignment useless. Remove this variable assignment and refactor the code related. Addresses-Coverity-ID: 1371643 Cc: Frans Klaver

Re: [PATCH v1] xen/input: add multi-touch support

2017-06-29 Thread Oleksandr Andrushchenko
Hi, Dmitry! First of all thank you for both the comments and the patch On 06/29/2017 11:17 AM, Dmitry Torokhov wrote: Hi Oleksandr, On Fri, Jun 23, 2017 at 09:09:55AM +0300, Oleksandr Andrushchenko wrote: + switch (event->mtouch.event_type) { +

[PATCH 00/37] fine-grained locking in binder driver

2017-06-29 Thread Todd Kjos
The binder driver uses a global mutex to serialize access to state in a multi-threaded environment. This global lock has been increasingly problematic as Android devices have scaled to more cores. The problem is not so much contention for the global lock which still remains relatively low, but the

Re: [PATCH 0/1] expand_downwards: don't require the gap if !vm_prev

2017-06-29 Thread Linus Torvalds
On Thu, Jun 29, 2017 at 11:55 AM, Oleg Nesterov wrote: > > I didn't ;) I moved it up, right above VM_GROWSDOWN check. I think I will just need to take a long nap, I'm clearly not tracking the patches very well. Linus

[PATCH 23/37] binder: make sure accesses to proc/thread are safe

2017-06-29 Thread Todd Kjos
binder_thread and binder_proc may be accessed by other threads when processing transaction. Therefore they must be prevented from being freed while a transaction is in progress that references them. This is done by introducing a temporary reference counter for threads and procs that indicates

Re: [PATCH v2 6/8] x86/entry: add unwind hint annotations

2017-06-29 Thread Josh Poimboeuf
On Thu, Jun 29, 2017 at 11:50:18AM -0700, Andy Lutomirski wrote: > On Thu, Jun 29, 2017 at 10:53 AM, Josh Poimboeuf wrote: > > There's a bug here that will need a small change to the entry code. > > > > Mike Galbraith reported: > > > > WARNING: can't dereference registers

[PATCH 27/37] binder: use inner lock to sync work dq and node counts

2017-06-29 Thread Todd Kjos
For correct behavior we need to hold the inner lock when dequeuing and processing node work in binder_thread_read. We now hold the inner lock when we enter the switch statement and release it after processing anything that might be affected by other threads. We also need to hold the inner lock to

[PATCH 30/37] binder: protect proc->nodes with inner lock

2017-06-29 Thread Todd Kjos
When locks for binder_ref handling are added, proc->nodes will need to be modified while holding the outer lock Signed-off-by: Todd Kjos --- drivers/android/binder.c | 112 +-- 1 file changed, 89 insertions(+), 23 deletions(-) diff

[PATCH 26/37] binder: introduce locking helper functions

2017-06-29 Thread Todd Kjos
There are 3 main spinlocks which must be acquired in this order: 1) proc->outer_lock : protects most fields of binder_proc, binder_thread, and binder_ref structures. binder_proc_lock() and binder_proc_unlock() are used to acq/rel. 2) node->lock : protects most fields of

[PATCH 22/37] binder: make sure target_node has strong ref

2017-06-29 Thread Todd Kjos
When initiating a transaction, the target_node must have a strong ref on it. Then we take a second strong ref to make sure the node survives until the transaction is complete. Signed-off-by: Todd Kjos --- drivers/android/binder.c | 22 +- 1 file changed, 17

  1   2   3   4   5   6   7   8   9   10   >