[PATCH] serial: Do not treat the IIR register as a bitfield

2017-03-29 Thread Olliver Schinagl
It seems that at some point, someone made the assumption that the UART Interrupt ID Register was a bitfield and started to check if certain bits where set. Actually however the register contains interrupt ID's where only the MSB seems to be used singular and the rest share at least one bit. Thus d

Re: [PATCH] serial: 8250_dw: Minor code cleanup

2017-03-29 Thread Doug Anderson
Hi, On Wed, Mar 29, 2017 at 10:10 AM, Olliver Schinagl wrote: > Hey Doug, > > On 29-03-17 17:50, Doug Anderson wrote: >> >> Hi, >> >> On Wed, Mar 29, 2017 at 3:04 AM, Olliver Schinagl >> wrote: >>> >>> Commit 424d79183af0 ("serial: 8250_dw: Avoid "too much work" from bogus >>> rx timeout interru

[PATCHv2] serial: 8250_dw: Minor code cleanup

2017-03-29 Thread Olliver Schinagl
Some very minor code cleanups, such as including the bitops header for DW_UART_MCR_SIRE, use the BIT() macro as suggested by checkpatch and removed a white space to match other invocations. Signed-off-by: Olliver Schinagl --- Changes since v1: Split up these non-code changing changes into a sep

Re: [PATCH][V2] VSOCK: remove unnecessary ternary operator on return value

2017-03-29 Thread Stefan Hajnoczi
On Wed, Mar 29, 2017 at 04:33:55PM +0100, Colin King wrote: > From: Colin Ian King > > Rather than assign the positive errno values to ret and then > checking if it is positive and flip the sign, just return the > errno value. > > Detected by CoverityScan, CID#986649 ("Logically Dead Code") > >

[PATCH] staging: rtl8712: fixed multiple line derefence issue

2017-03-29 Thread Prasant Jalan
Checkpatch emits WARNING: Avoid multiple line dereference. Trivial indentation improvement helps fix the checkpatch warning. Signed-off-by: Prasant Jalan --- drivers/staging/rtl8712/rtl871x_xmit.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/r

Re: [PATCH] leds: pca9532: Extend pca9532 device tree support

2017-03-29 Thread Jacek Anaszewski
Hi Felix, On 03/29/2017 04:26 PM, Felix Brack wrote: > Hello Jacek, > > On 08.02.2017 20:42, Jacek Anaszewski wrote: >> Hi Felix, >> >> On 02/08/2017 05:12 PM, Felix Brack wrote: >>> Hello Jacek, >>> >>> On 07.02.2017 21:45, Jacek Anaszewski wrote: Hi Felix, Thanks for the patch. >

[PATCH] Input: silead - list all supported compatible strings in binding document

2017-03-29 Thread Javier Martinez Canillas
The driver contains compatible strings for different models, but the DT binding doc only lists one of them. Add the remaining to the document. Signed-off-by: Javier Martinez Canillas --- .../devicetree/bindings/input/touchscreen/silead_gsl1680.txt | 7 ++- 1 file changed, 6 insertions

Re: [RFC v2][PATCH 01/11] Introduce rare_write() infrastructure

2017-03-29 Thread Kees Cook
On Wed, Mar 29, 2017 at 11:15 AM, Kees Cook wrote: > +/* > + * Build "write rarely" infrastructure for flipping memory r/w > + * on a per-CPU basis. > + */ > +#ifndef CONFIG_HAVE_ARCH_RARE_WRITE > +# define __wr_rare > +# define __wr_rare_type > +# define __rare_write(__var, __val)(__var = (__

[RFC v2][PATCH 04/11] x86: Implement __arch_rare_write_begin/unmap()

2017-03-29 Thread Kees Cook
Based on PaX's x86 pax_{open,close}_kernel() implementation, this allows HAVE_ARCH_RARE_WRITE to work on x86. There is missing work to sort out some header file issues where preempt.h is missing, though it can't be included in pg_table.h unconditionally... some other solution will be needed, perha

[RFC v2][PATCH 05/11] ARM: mm: dump: Add domain to output

2017-03-29 Thread Kees Cook
This adds the memory domain (on non-LPAE) to the PMD and PTE dumps. This isn't in the regular PMD bits because I couldn't find a clean way to fall back to retain some of the PMD bits when reporting PTE. So this is special-cased currently. New output example: ---[ Modules ]--- 0x7f00-0x7f0

[RFC v2][PATCH 02/11] lkdtm: add test for rare_write() infrastructure

2017-03-29 Thread Kees Cook
This adds the WRITE_RARE_WRITE test to validate variables marked with __wr_rare. Signed-off-by: Kees Cook --- drivers/misc/lkdtm.h | 1 + drivers/misc/lkdtm_core.c | 1 + drivers/misc/lkdtm_perms.c | 19 ++- 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/

[RFC v2][PATCH 09/11] list: add rare_write() list helpers

2017-03-29 Thread Kees Cook
Some structures that are intended to be made write-rarely are designed to be linked by lists. As a result, there need to be rare_write()-supported linked list primitives. As found in PaX, this adds list management helpers for doing updates to rarely-changed lists. Signed-off-by: Kees Cook --- i

[RFC v2][PATCH 08/11] ARM: Implement __arch_rare_write_begin/end()

2017-03-29 Thread Kees Cook
Based on grsecurity's ARM pax_{open,close}_kernel() implementation, this allows HAVE_ARCH_RARE_WRITE to work on ARM. Signed-off-by: Kees Cook --- arch/arm/Kconfig | 1 + arch/arm/include/asm/domain.h | 3 ++- arch/arm/include/asm/pgtable.h | 27 +++ 3 fil

[RFC v2][PATCH 07/11] ARM: mm: set DOMAIN_WR_RARE for rodata

2017-03-29 Thread Kees Cook
This creates DOMAIN_WR_RARE for the kernel's .rodata section, separate from DOMAIN_KERNEL to avoid predictive fetching in device memory during a DOMAIN_MANAGER transition. TODO: handle kernel module vmalloc memory, which needs to be marked as DOMAIN_WR_RARE too, for module .rodata sections. Signe

[RFC v2][PATCH 11/11] cgroups: force all struct cftype const

2017-03-29 Thread Kees Cook
As found in PaX, mark struct cftype with __do_const and add helpers to deal with rare writes. This is a more complex example of a write-rarely structure, which needs to use list helpers and blocks of begin/end pairs to perform the needed updates. With this change and the constify plugin enabled, t

[RFC v2][PATCH 10/11] gcc-plugins: Add constify plugin

2017-03-29 Thread Kees Cook
This is a port of the PaX/grsecurity constify plugin. However, it has the automatic function-pointer struct detection temporarily disabled. As a result, this will only recognize the __do_const annotation, which makes all instances of a marked structure read-only. The rare_write() infrastructure can

[RFC v2][PATCH 01/11] Introduce rare_write() infrastructure

2017-03-29 Thread Kees Cook
Several types of data storage exist in the kernel: read-write data (.data, .bss), read-only data (.rodata), and RO-after-init. This introduces the infrastructure for another type: write-rarely, which is intended for data that is either only rarely modified or especially security-sensitive. The goal

[RFC v2] Introduce rare_write() infrastructure

2017-03-29 Thread Kees Cook
This is take 2 of an RFC series to demonstrate a possible infrastructure for the "write rarely" memory storage type in the kernel (patch 1). The intent is to further reduce the internal attack surface of the kernel by making more variables read-only while "at rest". This is heavily based on the "__

Re: [PATCH v2 7/8] bus: brcmstb_gisb: add notifier handling

2017-03-29 Thread Mark Rutland
On Wed, Mar 29, 2017 at 10:39:11AM -0700, Doug Berger wrote: > On 03/29/2017 03:13 AM, Mark Rutland wrote: > >> +static int dump_gisb_error(struct notifier_block *self, unsigned long v, > >> + void *p) > >> + return 0; > > > > I think this should be NOTIFY_OK. > > > I used

[RFC v2][PATCH 03/11] net: switch sock_diag handlers to rare_write()

2017-03-29 Thread Kees Cook
This is a simple example a register/unregister case for __wr_rare markings, which only needs a simple rare_write() call to make updates. Signed-off-by: Kees Cook --- net/core/sock_diag.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/core/sock_diag.c b/net/core/soc

[PATCH v2 1/2] mmc: sdhci-acpi: Set MMC_CAP_AGGRESSIVE_PM for BYT-related Intel controllers

2017-03-29 Thread Azhar Shaikh
Set MMC_CAP_AGGRESSIVE_PM for BYT-related Intel SD card controllers. Signed-off-by: Azhar Shaikh --- Changes in v2: - Rebased the patch on top of 'next' branch. - No code change. drivers/mmc/host/sdhci-acpi.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/

[PATCH] firmware: arm_scpi: reinit completion instead of full init_completion()

2017-03-29 Thread Alexey Klimov
Instead of performing full initialization of the completion structure on each transfer in scpi_send_message(), we initialize it at boot time (more specifically, in the relevant probe() function) and use reinit_completion() to reset ->done counter on each message transfer thus saving a little bit of

[PATCH v2 2/2] mmc: sdhci-pci: Set MMC_CAP_AGGRESSIVE_PM for BYT-related Intel controllers

2017-03-29 Thread Azhar Shaikh
Set MMC_CAP_AGGRESSIVE_PM for BYT-related Intel SD card controllers. Signed-off-by: Azhar Shaikh --- Changes in v2: - Rebased the patch on top of 'next' branch. - No code change. drivers/mmc/host/sdhci-pci-core.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/dri

[RFC v2][PATCH 06/11] ARM: domains: Extract common USER domain init

2017-03-29 Thread Kees Cook
Everything but the USER domain is the same with CONFIG_CPU_SW_DOMAIN_PAN or not. This extracts the differences for a common DACR_INIT macro so it is easier to make future changes (like adding the WR_RARE domain). Signed-off-by: Kees Cook --- arch/arm/include/asm/domain.h | 14 +++--- 1 f

[PATCH] ALSA: oxygen - Fix snd_oxygen module not loading for some (new?) Xonar DG SI cards.

2017-03-29 Thread Eugene Ganeev
My Xonar DG SI card is showing up in lspci but no module is loaded for it. The patch just adds a new value with card's PCI ID to oxygen_ids array. Signed-off-by: Eugene Ganeev --- sound/pci/oxygen/oxygen.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/pci/oxygen/oxygen.c b/sound/pci

Re: in_irq_or_nmi()

2017-03-29 Thread Matthew Wilcox
On Wed, Mar 29, 2017 at 11:19:49AM +0200, Peter Zijlstra wrote: > On Wed, Mar 29, 2017 at 10:59:28AM +0200, Jesper Dangaard Brouer wrote: > > On Wed, 29 Mar 2017 10:12:19 +0200 > > Peter Zijlstra wrote: > > > No, that's horrible. Also, wth is this about? A memory allocator that > > > needs in_nmi(

Re: Impact of CONFIG_PARAVIRT=y / mmap benchmark

2017-03-29 Thread Ingo Molnar
* Randy Dunlap wrote: > On 03/28/17 10:17, Radu Rendec wrote: > > Hi, > > > > I'm trying to assess the performance impact of enabling PARAVIRT (and > > XEN) in a custom kernel configuration. I came across a very old thread > > (https://lkml.org/lkml/2009/5/13/449) on this topic and the conclusi

Re: [PATCH] mailbox: fix completion order for blocking requests

2017-03-29 Thread Sudeep Holla
On 29/03/17 18:43, Jassi Brar wrote: > Currently two threads, wait on blocking requests, could wake up for > completion of request of each other as ... > > Thread#1(T1) Thread#2(T2) > mbox_send_message mbox_send_message > |

Re: [RFC PATCH v1 00/30] fs: inode->i_version rework and optimization

2017-03-29 Thread Jeff Layton
On Wed, 2017-03-29 at 13:15 +0200, Jan Kara wrote: > On Tue 21-03-17 14:46:53, Jeff Layton wrote: > > On Tue, 2017-03-21 at 14:30 -0400, J. Bruce Fields wrote: > > > On Tue, Mar 21, 2017 at 01:23:24PM -0400, Jeff Layton wrote: > > > > On Tue, 2017-03-21 at 12:30 -0400, J. Bruce Fields wrote: > > >

[PATCH v4 02/23] drivers/fsi: Add slave definition

2017-03-29 Thread Christopher Bostic
From: Jeremy Kerr Add the initial fsi slave device, which is private to the core code. This will be a child of the master, and parent to endpoint devices. Signed-off-by: Jeremy Kerr Signed-off-by: Chris Bostic Signed-off-by: Joel Stanley --- drivers/fsi/fsi-core.c | 10 ++ 1 file cha

[PATCH v4 03/23] drivers/fsi: Add empty master scan

2017-03-29 Thread Christopher Bostic
From: Jeremy Kerr When a new fsi master is added, we will need to scan its links, and slaves attached to those links. This change introduces a little shell to iterate the links, which we will populate with the actual slave scan in a later change. Signed-off-by: Jeremy Kerr Signed-off-by: Chris

[PATCH v4 04/23] drivers/fsi: Add crc4 helpers

2017-03-29 Thread Christopher Bostic
From: Jeremy Kerr Add some helpers for the crc checks for the slave configuration table. This works 4-bits-at-a-time, using a simple table approach. We will need this in the FSI core code, as well as any master implementations that need to calculate CRCs in software. We add this to the fsi code

[PATCH v4 01/23] drivers/fsi: Add fsi master definition

2017-03-29 Thread Christopher Bostic
From: Jeremy Kerr Add a `struct fsi_master` to represent a FSI master controller. FSI master drivers register one of these structs to provide device-specific of the standard operations: read/write/term/break and link control. Includes changes from Edward A. James & Jeremy Kerr . Signed-off-by

[PATCH v4 14/23] drivers/fsi: Add sysfs files for FSI master & slave accesses

2017-03-29 Thread Christopher Bostic
From: Jeremy Kerr This change adds a 'raw' file for reads & writes, and a 'term' file for the TERM command, and a 'break' file for issuing a BREAK. Signed-off-by: Jeremy Kerr Signed-off-by: Joel Stanley Signed-off-by: Chris Bostic --- drivers/fsi/fsi-core.c | 116

Re: [PATCH] irq/affinity: Assign all CPUs a vector

2017-03-29 Thread Sagi Grimberg
Sure, I have a 2-socket server with 16 threads each. I take one CPU offline in socket 2, so I've 16 threads on socket 1, 15 in socket 2. In total, 31 threads so requesting 31 vectors. Currently, vecs_per_node is calculated in the first iteration as 31 / 2, so 15. ncpus of socket 1 is 16. cpus_

[PATCH v4 08/23] drivers/fsi: Set slave SMODE to init communication

2017-03-29 Thread Christopher Bostic
From: Chris Bostic Set CFAM to appropriate ID so that the controlling master can manage link memory ranges. Add slave engine register definitions. Includes changes from Jeremy Kerr . Signed-off-by: Jeremy Kerr Signed-off-by: Chris Bostic Signed-off-by: Joel Stanley --- drivers/fsi/fsi-core

Re: [PATCH kernel v8 3/4] mm: add inerface to offer info about unused pages

2017-03-29 Thread Michael S. Tsirkin
On Fri, Mar 17, 2017 at 02:55:33PM +0800, Wei Wang wrote: > On 03/17/2017 05:28 AM, Andrew Morton wrote: > > On Thu, 16 Mar 2017 15:08:46 +0800 Wei Wang wrote: > > > > > From: Liang Li > > > > > > This patch adds a function to provides a snapshot of the present system > > > unused pages. An imp

[PATCH v4 10/23] drivers/fsi: Add device read/write/peek API

2017-03-29 Thread Christopher Bostic
From: Jeremy Kerr This change introduces the fsi device API: simple read, write and peek accessors for the devices' address spaces. Includes contributions from Chris Bostic and Edward A. James . Signed-off-by: Edward A. James Signed-off-by: Jeremy Kerr Signed-off-by: Chris Bostic Signed-off

[PATCH v4 06/23] drivers/fsi: Set up links for slave communication

2017-03-29 Thread Christopher Bostic
From: Chris Bostic Enable each link and send a break command, and try to detect a slave by reading from the SMODE register. Signed-off-by: Chris Bostic Signed-off-by: Joel Stanley --- drivers/fsi/fsi-core.c | 37 +++-- 1 file changed, 35 insertions(+), 2 deleti

[PATCH v4 09/23] drivers/fsi: scan slaves & register devices

2017-03-29 Thread Christopher Bostic
From: Jeremy Kerr Now that we have fsi_slave devices, scan each for endpoints, and register them on the fsi bus. Includes contributions from Chris Bostic Signed-off-by: Jeremy Kerr Signed-off-by: Chris Bostic Signed-off-by: Joel Stanley --- drivers/fsi/fsi-core.c | 127

[PATCH v4 07/23] drivers/fsi: Implement slave initialisation

2017-03-29 Thread Christopher Bostic
From: Jeremy Kerr Implement fsi_slave_init: if we can read a chip ID, create fsi_slave devices and register with the driver core. Includes changes from Chris Bostic . Signed-off-by: Jeremy Kerr Signed-off-by: Chris Bostic Signed-off-by: Joel Stanley --- drivers/fsi/fsi-core.c | 66 +

[PATCH v4 11/23] drivers/fsi: Add master unscan

2017-03-29 Thread Christopher Bostic
From: Chris Bostic Allow a master to undo a previous scan. Should a master scan a bus twice it will need to ensure it doesn't double register any previously detected device. Signed-off-by: Chris Bostic Signed-off-by: Joel Stanley --- drivers/fsi/fsi-core.c | 40 ++

Re: [PATCH] kvm: pass the virtual SEI syndrome to guest OS

2017-03-29 Thread Christoffer Dall
On Wed, Mar 29, 2017 at 05:37:49PM +0200, Laszlo Ersek wrote: > On 03/29/17 16:48, Christoffer Dall wrote: > > On Wed, Mar 29, 2017 at 10:36:51PM +0800, gengdongjiu wrote: > >> 2017-03-29 18:36 GMT+08:00, Achin Gupta : > > >>> Qemu is essentially fulfilling the role of secure firmware at the > >>>

[PATCH v4 12/23] drivers/fsi: Add documentation for GPIO bindings

2017-03-29 Thread Christopher Bostic
From: Chris Bostic Add fsi master gpio device tree binding documentation Signed-off-by: Chris Bostic Signed-off-by: Joel Stanley --- .../devicetree/bindings/fsi/fsi-master-gpio.txt| 24 ++ 1 file changed, 24 insertions(+) create mode 100644 Documentation/devicetree/bi

[PATCH v4 16/23] drivers/fsi: Add tracepoints for low-level operations

2017-03-29 Thread Christopher Bostic
From: Jeremy Kerr Signed-off-by: Jeremy Kerr Signed-off-by: Joel Stanley Signed-off-by: Chris Bostic --- drivers/fsi/fsi-core.c | 27 +++--- include/trace/events/fsi.h | 127 + 2 files changed, 148 insertions(+), 6 deletions(-) create mode

[PATCH v4 14/23] drivers/fsi: Add sysfs files for FSI master & slave accesses

2017-03-29 Thread Christopher Bostic
From: Jeremy Kerr This change adds a 'raw' file for reads & writes, and a 'term' file for the TERM command, and a 'break' file for issuing a BREAK. Signed-off-by: Jeremy Kerr Signed-off-by: Joel Stanley Signed-off-by: Chris Bostic --- drivers/fsi/fsi-core.c | 116

[PATCH v4 17/23] drivers/fsi: Add error handling for slave communication errors

2017-03-29 Thread Christopher Bostic
From: Jeremy Kerr This change implements error handling in the FSI core, by cleaning up and retrying failed operations, using the SISC, TERM and BREAK facilities. Signed-off-by: Jeremy Kerr Signed-off-by: Chris Bostic --- drivers/fsi/fsi-core.c | 121 ++

[PATCH v4 19/23] drivers/fsi: Add GPIO based FSI master

2017-03-29 Thread Christopher Bostic
From: Chris Bostic Implement a FSI master using GPIO. Will generate FSI protocol for read and write commands to particular addresses. Sends master command and waits for and decodes a slave response. Includes changes from Edward A. James and Jeremy Kerr . Signed-off-by: Edward A. James Signe

Re: [PATCH 1/3] mailbox: always wait in mbox_send_message for blocking Tx mode

2017-03-29 Thread Jassi Brar
On Wed, Mar 29, 2017 at 5:04 PM, Sudeep Holla wrote: > > On 28/03/17 19:20, Jassi Brar wrote: >> Hi Sudeep, >> >> On Tue, Mar 21, 2017 at 5:00 PM, Sudeep Holla wrote: >>> There exists a race when msg_submit return immediately as there was an >>> active request being processed which may have compl

Re: [PATCH] irq/affinity: Assign all CPUs a vector

2017-03-29 Thread Keith Busch
On Wed, Mar 29, 2017 at 08:15:50PM +0300, Sagi Grimberg wrote: > > > The number of vectors to assign needs to be adjusted for each node such > > that it doesn't exceed the number of CPUs in that node. This patch > > recalculates the vector assignment per-node so that we don't try to > > assign mor

[PATCH v4 18/23] drivers/fsi: Document FSI master sysfs files in ABI

2017-03-29 Thread Christopher Bostic
From: Chris Bostic Add info for sysfs scan file in Documentaiton ABI/testing Signed-off-by: Chris Bostic --- Documentation/ABI/testing/sysfs-bus-fsi | 6 ++ 1 file changed, 6 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-bus-fsi diff --git a/Documentation/ABI/testing/s

[PATCH v4 21/23] drivers/fsi: Add SCOM FSI client device driver

2017-03-29 Thread Christopher Bostic
From: Chris Bostic Create a simple SCOM engine device driver that reads and writes its control registers via an FSI bus. Includes changes from Edward A. James . Signed-off-by: Chris Bostic Signed-off-by: Joel Stanley Signed-off-by: Edward A. James Signed-off-by: Jeremy Kerr --- drivers/fsi

[PATCH v4 23/23] drivers/fsi: Use asynchronous slave mode

2017-03-29 Thread Christopher Bostic
From: Jeremy Kerr For slaves that are behind a software-clocked master, we want FSI CFAMs to run asynchronously to the FSI clock, so set up our slaves to be in async mode. Signed-off-by: Jeremy Kerr Signed-off-by: Chris Bostic --- drivers/fsi/fsi-core.c| 22 +- dri

[PATCH v4 22/23] drivers/fsi: Add hub master support

2017-03-29 Thread Christopher Bostic
From: Chris Bostic Add an engine driver to expose a "hub" FSI master - which has a set of control registers in the engine address space, and uses a chunk of the slave address space for actual FSI communication. Additional changes from Jeremy Kerr . Signed-off-by: Chris Bostic Signed-off-by: Je

Re: [PATCH] mm,hugetlb: compute page_size_log properly

2017-03-29 Thread Andi Kleen
On Wed, Mar 29, 2017 at 10:06:25AM +0200, Michal Hocko wrote: > On Tue 28-03-17 10:54:08, Matthew Wilcox wrote: > > On Tue, Mar 28, 2017 at 09:55:13AM -0700, Davidlohr Bueso wrote: > > > Do we have any consensus here? Keeping SHM_HUGE_* is currently > > > winning 2-1. If there are in fact users out

[PATCH v4 20/23] drivers/fsi/gpio: Add tracepoints for GPIO master

2017-03-29 Thread Christopher Bostic
From: Jeremy Kerr Add trace points for key GPIO operations of the GPIO based FSI master. Signed-off-by: Jeremy Kerr Signed-off-by: Chris Bostic --- drivers/fsi/fsi-master-gpio.c | 9 + include/trace/events/fsi_master_gpio.h | 68 ++ 2 files change

[PATCH v4 00/23] FSI device driver implementation

2017-03-29 Thread Christopher Bostic
Implementation of the IBM 'Flexible Support Interface' (FSI) bus device driver. FSI is a high fan out serial bus consisting of a clock and a serial data line capable of running at speeds up to 166 MHz. This set provides the basic framework to add FSI extensions to the Linux bus and device models.

[PATCH v4 05/23] drivers/fsi: Add slave & master read/write APIs

2017-03-29 Thread Christopher Bostic
From: Jeremy Kerr Introduce functions to perform reads/writes on the slave address space; these simply pass the request on the slave's master with the correct link and slave ID. We implement these on top of similar helpers for the master. Signed-off-by: Jeremy Kerr Signed-off-by: Joel Stanley

[PATCH v4 13/23] drivers/fsi: Add client driver register utilities

2017-03-29 Thread Christopher Bostic
From: Chris Bostic Add driver_register and driver_unregister wrappers for FSI. Signed-off-by: Chris Bostic Signed-off-by: Joel Stanley --- drivers/fsi/fsi-core.c | 17 + include/linux/fsi.h| 12 2 files changed, 29 insertions(+) diff --git a/drivers/fsi/fsi-c

[PATCH v4 15/23] drivers/fsi: expose direct-access slave API

2017-03-29 Thread Christopher Bostic
From: Jeremy Kerr Allow drivers to access the slave address ranges. Signed-off-by: Jeremy Kerr Signed-off-by: Joel Stanley Signed-off-by: Chris Bostic --- drivers/fsi/fsi-core.c | 26 -- include/linux/fsi.h| 12 2 files changed, 32 insertions(+), 6 de

[PATCH] mailbox: fix completion order for blocking requests

2017-03-29 Thread Jassi Brar
Currently two threads, wait on blocking requests, could wake up for completion of request of each other as ... Thread#1(T1) Thread#2(T2) mbox_send_message mbox_send_message | | V |

[PATCH v2] virtio_net: fix support for small rings

2017-03-29 Thread Michael S. Tsirkin
When ring size is small (<32 entries) making buffers smaller means a full ring might not be able to hold enough buffers to fit a single large packet. Make sure a ring full of buffers is large enough to allow at least one packet of max size. Fixes: 2613af0ed18a ("virtio_net: migrate mergeable rx b

Re: [PATCH v2 7/8] bus: brcmstb_gisb: add notifier handling

2017-03-29 Thread Doug Berger
On 03/29/2017 03:13 AM, Mark Rutland wrote: snip >> +/* >> + * Dump out gisb errors on die or panic. >> + */ >> +static int dump_gisb_error(struct notifier_block *self, unsigned long v, >> + void *p) >> +{ >> +struct brcmstb_gisb_arb_device *gdev; >> + >> +/* iterate

[PATCH] HID: wacom: Don't add ghost interface as shared data

2017-03-29 Thread Aaron Armstrong Skomra
A previous commit (below) adds a check for already probed interfaces to Wacom's matching heuristic. Unfortunately this causes the Bamboo Pen (CTL-460) to match itself to its 'ghost' touch interface. After subsequent changes to the driver this match to the ghost causes the kernel to crash. This patc

Re: [PATCH] virtio_net: fix support for small rings

2017-03-29 Thread Michael S. Tsirkin
On Wed, Mar 29, 2017 at 08:15:04PM +0300, Michael S. Tsirkin wrote: > When ring size is small (<32 entries) making buffers smaller means a > full ring might not be able to hold enough buffers to fit a single large > packet. > > Make sure a ring full of buffers is large enough to allow at least one

Re: [PATCH v9 10/15] ACPI: platform-msi: retrieve dev id from IORT

2017-03-29 Thread Lorenzo Pieralisi
On Wed, Mar 29, 2017 at 05:13:54PM +0100, Lorenzo Pieralisi wrote: > On Wed, Mar 29, 2017 at 03:52:47PM +0100, Marc Zyngier wrote: > > On 29/03/17 14:00, Hanjun Guo wrote: > > > On 03/29/2017 08:38 PM, Lorenzo Pieralisi wrote: > > >> On Wed, Mar 29, 2017 at 07:52:48PM +0800, Hanjun Guo wrote: > > >

Re: [PATCH v2] staging: media: atomisp: Fix style. remove space before ',' and convert to tabs.

2017-03-29 Thread Alan Cox
On Wed, 2017-03-29 at 09:57 -0700, Daniel Cashman wrote: > From: Dan Cashman > > Signed-off-by: Dan Cashman As the TODO asks - please no whitespace cleanups yet. They make it harder to keep other cleanups that fix (or mostly remove) code applying. Nothing wrong with the patch otherwise - but

Re: [PATCH 0/2] mtd: spi-nor: add stm32 qspi driver

2017-03-29 Thread Cyrille Pitchen
Hi Ludovic, Le 27/03/2017 à 14:54, Ludovic Barre a écrit : > From: Ludovic Barre > > This patch set adds a SPI-NOR driver for stm32 QSPI controller. > It is a specialized SPI interface for serial Flash devices. > It supports 1 or 2 Flash device with single, dual and quad SPI Flash memories. > >

Re: [Outreachy kernel] [PATCH 1/4] iio: common: st_sensors: Replace ternary operator with min macro

2017-03-29 Thread SIMRAN SINGHAL
On Wed, Mar 29, 2017 at 9:46 PM, Daniel Baluta wrote: > On Wed, Mar 29, 2017 at 3:33 PM, simran singhal > wrote: >> Use macro min() to get the minimum of two values for brevity and >> readability. >> >> Signed-off-by: simran singhal >> --- >> drivers/iio/common/st_sensors/st_sensors_i2c.c | 2 +

Re: [PATCH v5 0/6] mtd: spi-nor: parse SFDP tables to setup (Q)SPI memories

2017-03-29 Thread Cyrille Pitchen
Hi all, Le 23/03/2017 à 00:33, Cyrille Pitchen a écrit : > Hi all, > > based on git-hub/spi-nor and likely applicable on linux-next within the > next few days. > > > This new series of patchs aims to upgrade to spi-nor framework. We need to > take into account latest SPI memories which cannot b

Re: [PATCH] serial: 8250_dw: Minor code cleanup

2017-03-29 Thread Olliver Schinagl
Hey Doug, On 29-03-17 19:10, Olliver Schinagl wrote: Hey Doug, On 29-03-17 17:50, Doug Anderson wrote: Hi, On Wed, Mar 29, 2017 at 3:04 AM, Olliver Schinagl wrote: Commit 424d79183af0 ("serial: 8250_dw: Avoid "too much work" from bogus rx timeout interrupt") added a bit check with quite a w

Re: [RFC PATCH tip/master 2/3] kprobes: Allocate kretprobe instance if its free list is empty

2017-03-29 Thread Josh Stone
On 03/29/2017 01:25 AM, Masami Hiramatsu wrote: > On Wed, 29 Mar 2017 08:30:05 +0200 > Ingo Molnar wrote: >> >> * Masami Hiramatsu wrote: >> >>> @@ -1824,6 +1823,30 @@ void unregister_jprobes(struct jprobe **jps, int num) >>> EXPORT_SYMBOL_GPL(unregister_jprobes); >>> >>> #ifdef CONFIG_KRETPR

Re: [PATCH][bluetooth-next][V2] ieee802154: ca8210: Add checks for kmalloc allocation failures

2017-03-29 Thread David Miller
From: Colin King Date: Wed, 29 Mar 2017 18:05:40 +0100 > drivers/net/ieee802154/ca8210.c | 18 ++ This file doesn't exist in any of my trees.

Re: syscall_get_error() && TS_ checks

2017-03-29 Thread Linus Torvalds
On Wed, Mar 29, 2017 at 10:04 AM, Oleg Nesterov wrote: > > Oh, I agree, and let me repeat the 3rd time that I suggest to kill this > helper and use syscall_get_return_value() in arch/x86/kernel/signal.c, > it has no other callers. That is probably fine, I'm just arguing against the suggested chan

Re: [PATCH -mm -v7 9/9] mm, THP, swap: Delay splitting THP during swap out

2017-03-29 Thread Johannes Weiner
On Tue, Mar 28, 2017 at 01:32:09PM +0800, Huang, Ying wrote: > @@ -183,12 +184,53 @@ void __delete_from_swap_cache(struct page *page) > ADD_CACHE_INFO(del_total, nr); > } > > +#ifdef CONFIG_THP_SWAP_CLUSTER > +int add_to_swap_trans_huge(struct page *page, struct list_head *list) > +{ > +

Re: [PATCH] irq/affinity: Assign all CPUs a vector

2017-03-29 Thread Sagi Grimberg
The number of vectors to assign needs to be adjusted for each node such that it doesn't exceed the number of CPUs in that node. This patch recalculates the vector assignment per-node so that we don't try to assign more vectors than there are CPUs. When that previously happened, the cpus_per_vec

Re: [PATCH 4/8] asm-generic: add atomic-instrumented.h

2017-03-29 Thread Mark Rutland
Hi, On Tue, Mar 28, 2017 at 06:15:41PM +0200, Dmitry Vyukov wrote: > The new header allows to wrap per-arch atomic operations > and add common functionality to all of them. I had a quick look at what it would take to have arm64 use this, and I have a couple of thoughts. > +static __always_inline

Re: [PATCH] serial: 8250_dw: Minor code cleanup

2017-03-29 Thread Olliver Schinagl
Hey Doug, On 29-03-17 17:50, Doug Anderson wrote: Hi, On Wed, Mar 29, 2017 at 3:04 AM, Olliver Schinagl wrote: Commit 424d79183af0 ("serial: 8250_dw: Avoid "too much work" from bogus rx timeout interrupt") added a bit check with quite a wide mask. To be concise with the other similar calls i

[PATCH] virtio_net: fix support for small rings

2017-03-29 Thread Michael S. Tsirkin
When ring size is small (<32 entries) making buffers smaller means a full ring might not be able to hold enough buffers to fit a single large packet. Make sure a ring full of buffers is large enough to allow at least one packet of max size. Fixes: 2613af0ed18a ("virtio_net: migrate mergeable rx b

[PATCH 2/2] virtio_net: clear MTU when out of range

2017-03-29 Thread Michael S. Tsirkin
virtio attempts to clear the MTU feature bit if the value is out of the supported range, but this has no real effect since FEATURES_OK has already been set. Fix this up by checking the MTU in the new validate callback. Fixes: 14de9d114a82 ("virtio-net: Add initial MTU advice feature") Signed-off-

[PATCH 1/2] virtio: allow drivers to validate features

2017-03-29 Thread Michael S. Tsirkin
Some drivers can't support all features in all configurations. At the moment we blindly set FEATURES_OK and later FAILED. Support this better by adding a callback drivers can use to do some early checks. Signed-off-by: Michael S. Tsirkin --- drivers/virtio/virtio.c | 6 ++ include/linux/vi

Re: [PATCH 0/8] ARM: OMAP2+: AM33XX/AM43XX: Add suspend-resume support

2017-03-29 Thread Tony Lindgren
* Dave Gerlach [170328 19:00]: > Hi, > This series contains the remaining code to enable suspend to mem and standby > on > am335x and am437x platforms. It depends on the ti-emif-sram series sent here > [1]. Looks good to me in general. To remove the dependency, can some of this be merged separa

Re: [RFC PATCH v2 18/32] kvm: svm: Use the hardware provided GPA instead of page walk

2017-03-29 Thread Brijesh Singh
Hi Boris, On 03/29/2017 10:14 AM, Borislav Petkov wrote: On Thu, Mar 02, 2017 at 10:16:05AM -0500, Brijesh Singh wrote: From: Tom Lendacky When a guest causes a NPF which requires emulation, KVM sometimes walks the guest page tables to translate the GVA to a GPA. This is unnecessary most of t

Re: [PATCH -mm -v7 4/9] mm, THP, swap: Add get_huge_swap_page()

2017-03-29 Thread Johannes Weiner
On Tue, Mar 28, 2017 at 01:32:04PM +0800, Huang, Ying wrote: > @@ -527,6 +527,23 @@ static inline swp_entry_t get_swap_page(void) > > #endif /* CONFIG_SWAP */ > > +#ifdef CONFIG_THP_SWAP_CLUSTER > +static inline swp_entry_t get_huge_swap_page(void) > +{ > + swp_entry_t entry; > + > + i

[PATCH][bluetooth-next][V2] ieee802154: ca8210: Add checks for kmalloc allocation failures

2017-03-29 Thread Colin King
From: Colin Ian King Ensure we don't end up with a null pointer dereferences by checking for for allocation failures. Allocate by sizeof(*ptr) rather than the type to fix checkpack warnings. Also merge multiple lines into one line for the kmalloc call. Detected by CoverityScan, CID#1422435 ("D

Re: syscall_get_error() && TS_ checks

2017-03-29 Thread Oleg Nesterov
On 03/29, Linus Torvalds wrote: > > On Wed, Mar 29, 2017 at 9:55 AM, Oleg Nesterov wrote: > > > > Once again, it is only used in arch/x86/kernel/signal.c by do_signal() and > > handle_signal(). We do not care if mmap() returns a valid pointer with the > > high bit set, regs-ax can't be confused wi

Re: [PATCH 1/1] get_nr_restart_syscall() should return __NR_ia32_restart_syscall if __USER32_CS

2017-03-29 Thread Andy Lutomirski
On Wed, Mar 29, 2017 at 8:05 AM, Oleg Nesterov wrote: > On 03/28, Oleg Nesterov wrote: >> >> On 03/28, Andy Lutomirski wrote: >> > >> > How about we store the syscall arch to be restored in task_struct >> > along with restart_block? >> >> Yes, perhaps we will have to finally do this. Not really ni

Re: syscall_get_error() && TS_ checks

2017-03-29 Thread Linus Torvalds
On Wed, Mar 29, 2017 at 9:55 AM, Oleg Nesterov wrote: > > Once again, it is only used in arch/x86/kernel/signal.c by do_signal() and > handle_signal(). We do not care if mmap() returns a valid pointer with the > high bit set, regs-ax can't be confused with -ERESTART code. Immaterial. If the funct

[PATCH v2] staging: media: atomisp: Fix style. remove space before ',' and convert to tabs.

2017-03-29 Thread Daniel Cashman
From: Dan Cashman Signed-off-by: Dan Cashman --- drivers/staging/media/atomisp/i2c/ap1302.c | 4 ++-- drivers/staging/media/atomisp/i2c/gc0310.c | 2 +- drivers/staging/media/atomisp/i2c/gc2235.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/media/atomis

Re: [PATCH -mm -v7 2/9] mm, memcg: Support to charge/uncharge multiple swap entries

2017-03-29 Thread Johannes Weiner
On Tue, Mar 28, 2017 at 01:32:02PM +0800, Huang, Ying wrote: > @@ -5908,16 +5907,19 @@ void mem_cgroup_swapout(struct page *page, > swp_entry_t entry) > css_put(&memcg->css); > } > > -/* > - * mem_cgroup_try_charge_swap - try charging a swap entry > +/** > + * mem_cgroup_try_charg

Re: syscall_get_error() && TS_ checks

2017-03-29 Thread Andy Lutomirski
On Wed, Mar 29, 2017 at 9:45 AM, Linus Torvalds wrote: > On Wed, Mar 29, 2017 at 9:33 AM, Oleg Nesterov wrote: >> >> Firstly, why do we need the IS_ERR_VALUE() check? This is only used by >> do_signal/handle_signal, we do not care if it returns non-zero as long >> as the value can't be confused w

Re: syscall_get_error() && TS_ checks

2017-03-29 Thread Oleg Nesterov
On 03/29, Linus Torvalds wrote: > > On Wed, Mar 29, 2017 at 9:33 AM, Oleg Nesterov wrote: > > > > Firstly, why do we need the IS_ERR_VALUE() check? This is only used by > > do_signal/handle_signal, we do not care if it returns non-zero as long > > as the value can't be confused with -ERESTART.* co

Re: [PATCH v5 6/9] coresight: add support for CPU debug module

2017-03-29 Thread Mathieu Poirier
On Wed, Mar 29, 2017 at 09:54:23AM +0800, Leo Yan wrote: > Hi Mathieu, > > On Tue, Mar 28, 2017 at 10:50:10AM -0600, Mathieu Poirier wrote: > > On Sun, Mar 26, 2017 at 02:23:14AM +0800, Leo Yan wrote: > > [...] > > > > +static void debug_force_cpu_powered_up(struct debug_drvdata *drvdata) > > >

Re: [PATCH -mm -v7 1/9] mm, swap: Make swap cluster size same of THP size on x86_64

2017-03-29 Thread Johannes Weiner
On Tue, Mar 28, 2017 at 01:32:01PM +0800, Huang, Ying wrote: > @@ -499,6 +499,19 @@ config FRONTSWAP > > If unsure, say Y to enable frontswap. > > +config ARCH_USES_THP_SWAP_CLUSTER > + bool > + default n This is fine. > +config THP_SWAP_CLUSTER > + bool > + depends on

[PATCH v2 1/2] x86/boot/32: Delete cpuinfo_x86::wp_works_ok

2017-03-29 Thread Andy Lutomirski
Linux refuses to boot if WP doesn't work okay, so tracking whether it works serves no purpose. The only use I can see at all for wp_works_ok is that it lets Xen bypass test_wp_bit(). If this is truly needed, it could be more cleanly handled using X86_FEATURE_XENPV, but it looks like Xen can handl

[PATCH v2 0/2] wp_works_ok cleanups again

2017-03-29 Thread Andy Lutomirski
Hi Ingo- Here it is rebased and split up. --Andy Andy Lutomirski (2): x86/boot/32: Delete cpuinfo_x86::wp_works_ok x86/boot/32: Rewrite test_wp_bit() arch/x86/include/asm/processor.h | 2 -- arch/x86/kernel/cpu/proc.c | 5 ++--- arch/x86/kernel/setup.c | 2 -- arch/x86/mm

[PATCH v2 2/2] x86/boot/32: Rewrite test_wp_bit()

2017-03-29 Thread Andy Lutomirski
This code seems to be very old and has gotten only minor updates. It's overcomplicated and has a bunch of comments that are, at best, of purely historical interest. Nowadays we have a shiny function probe_kernel_write() that does more or less exactly what we need. Use it. I switched the page that

Re: [PATCH] arch:x86/boot/compressed/error: Add declaration for necessary head file

2017-03-29 Thread Kees Cook
On Wed, Mar 29, 2017 at 12:00 AM, Zhengyi Shen wrote: > Add declaration for the error.h file to correct the sparse warnings. > > Sparse warnings: > arch/x86/boot/compressed/error.c:8:6: > warning: symbol 'warn' was not declared. Should it be static? > arch/x86/boot/compressed/error.c:15:6:

Re: [PATCH] ACPI / gpio: do not fall back to parsing _CRS when we get a deferral

2017-03-29 Thread Andy Shevchenko
On Wed, 2017-03-29 at 18:33 +0200, Hans de Goede wrote: > HI, > > On 28-03-17 17:04, Andy Shevchenko wrote: > > On Thu, 2017-03-23 at 13:21 -0700, Dmitry Torokhov wrote: > > > If, while locating GPIOs by name, we get probe deferral, we should > > > immediately report it to caller rather than tryin

Re: [PATCH v22 09/11] acpi/arm64: Add memory-mapped timer support in GTDT driver

2017-03-29 Thread Lorenzo Pieralisi
On Wed, Mar 22, 2017 at 12:31:20AM +0800, fu@linaro.org wrote: > From: Fu Wei > > On platforms booting with ACPI, architected memory-mapped timers' > configuration data is provided by firmware through the ACPI GTDT > static table. > > The clocksource architected timer kernel driver requires

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