Commit graph

767878 commits

Author SHA1 Message Date
Stephen Hemminger 7ceb1c3753 Drivers: hv: vmbus: add numa_node to sysfs
Being able to find the numa_node for a device is useful for userspace
drivers (DPDK) and also for diagnosing performance issues.  This makes
vmbus similar to pci.

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-29 08:09:56 +02:00
Sunil Muthuswamy 9d9c965687 Drivers: hv: vmbus: Get rid of MSR access from vmbus_drv.c
Get rid of ISA specific code from vmus_drv.c which is common code.

Fixes: 81b18bce48 ("Drivers: HV: Send one page worth of kmsg dump over Hyper-V during panic")

Signed-off-by: Sunil Muthuswamy <sunilmut@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-29 08:09:56 +02:00
Sunil Muthuswamy 8afc06dd75 Drivers: hv: vmbus: Fix the issue with freeing up hv_ctl_table_hdr
The check to free the Hyper-V control table header was reversed. This
fixes it.

Fixes: 81b18bce48 ("Drivers: HV: Send one page worth of kmsg dump over Hyper-V during panic")

Signed-off-by: Sunil Muthuswamy <sunilmut@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-29 08:09:56 +02:00
Sunil Muthuswamy ddcaf3ca4c Drivers: hv: vmus: Fix the check for return value from kmsg get dump buffer
The code to support panic control message was checking the return was
checking the return value from kmsg_dump_get_buffer as error value, which
is not what the routine returns. This fixes it.

Fixes: 81b18bce48 ("Drivers: HV: Send one page worth of kmsg dump over Hyper-V during panic")

Signed-off-by: Sunil Muthuswamy <sunilmut@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-29 08:09:56 +02:00
Greg Kroah-Hartman 2d8bc61952 Last round of FSI updates for 4.19
This adds a few fixes for things reported since the last merge,
 and the latch batch of changes pending for FSI for 4.19.
 
 That batch is a rather mechanical conversion of the misc devices
 into proper char devices.
 
 The misc devices were ill suited, the minor space for them is
 limited and we can have a lot of chips in a system creating FSI
 devices.
 
 This also allows us to better control (and fix) object lifetime
 getting rid of the bad devm_kzalloc() of the structures containing
 the devices etc...
 
 Finally, we add a chardev to the core FSI that provides raw CFAM
 access to FSI slaves as a replacement for the current "raw" binary
 sysfs file which will be ultimately deprecated and removed.
 -----BEGIN PGP SIGNATURE-----
 
 iQIcBAABAgAGBQJbWmGjAAoJEHM62YSLdExeJs4P/jcy6NQJmEeFtzd2qKK+4ciQ
 dcZMaymLTPDWFAbhtWc8bv723NsEfMxcd91rIQdcL2331fdcxSmXpKAICCgZn73a
 9p2slsgPwOPKB4NNfIGE373K8TfqmRhhDvyNfaAD/eq6T+8vj1l5eJejvt9wCL2v
 koa98FOv7Urp4rZWlGySAkDEvfeN06VZ8jdYN80S7Vd6fy3s5wtdzCKK66wGsESz
 TU+Dijaj2i4cNUGlChHD0a6ZYYhG54KeT8k/oaqjnPBfIwQJtReSn7ad6nVEHt2Q
 fqAEn0sPnffpwO3Ao3Z0jPTN5lyDUtNTqggT9iPUUnyLSLBe9Ab8opTzsv+xVscr
 D6SsVPn3I5YiN22Dxcvv7KFJ5OX4Dv4Ul/SzXb17tt95OEckJkFoH49mmpTOefdv
 thEiIt8PbksBjyOKpmSHdrV3rppkd9zmJUnPOA/Rj6da+ngF706VOSYASxUd6s6y
 VtImTCxihYzwG5MSSYVmBi+gp5T91IOFlbw8XXjad8Cf4tydzJjm5dAl920SVUzS
 gxN04LhIQtDL+GrAjmxDOvPC25Skcd0rRdgeDT9RHfXGHZP95uhgIsZPPGGg73i7
 52AQPSJDjzeBF5EDizQlDw5RW1TDRxGlDNbgnSMd969dhoVDo8uM6KwDmq4iWPKC
 QTObqJg5JGtxjmfgYhPH
 =ho3P
 -----END PGP SIGNATURE-----

Merge tag 'fsi-updates-2018-07-27' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/linux-fsi into char-misc-next

Ben writes:

Last round of FSI updates for 4.19

This adds a few fixes for things reported since the last merge,
and the latch batch of changes pending for FSI for 4.19.

That batch is a rather mechanical conversion of the misc devices
into proper char devices.

The misc devices were ill suited, the minor space for them is
limited and we can have a lot of chips in a system creating FSI
devices.

This also allows us to better control (and fix) object lifetime
getting rid of the bad devm_kzalloc() of the structures containing
the devices etc...

Finally, we add a chardev to the core FSI that provides raw CFAM
access to FSI slaves as a replacement for the current "raw" binary
sysfs file which will be ultimately deprecated and removed.
2018-07-27 10:37:08 +02:00
Benjamin Herrenschmidt 9840fcd8cc fsi: Prevent multiple concurrent rescans
The bus scanning process isn't terribly good at parallel attempts
at rescanning the same bus. Let's have a per-master mutex protecting
the scanning process.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2018-07-27 09:58:12 +10:00
Benjamin Herrenschmidt d1dcd67825 fsi: Add cfam char devices
This aims to deprecate the "raw" sysfs file used for directly
accessing the CFAM and instead use a char device like the
other sub drivers.

Since it reworks the slave creation code and adds a cfam device
type, we also use the opportunity to convert the attributes
to attribute groups and add a couple more.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2018-07-27 09:58:05 +10:00
Benjamin Herrenschmidt d8f4587655 fsi: scom: Convert to use the new chardev
This converts FSI scom to use the new fsi-core controlled
chardev allocator and use a real cdev instead of a miscdev.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2018-07-27 09:57:55 +10:00
Benjamin Herrenschmidt 8b052dd64f fsi: sbefifo: Convert to use the new chardev
This converts FSI sbefifo to use the new fsi-core controlled
chardev allocator and use a real cdev instead of a miscdev.

One side effect is to fix the object lifetime by removing
the use of devm_kzalloc() for something that contains kobjects,
and using proper reference counting.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2018-07-27 09:57:31 +10:00
Benjamin Herrenschmidt 0ab5fe5374 fsi: Add new central chardev support
The various FSI devices (sbefifo, occ, scom, more to come)
currently use misc devices.

This is problematic as the minor device space for misc is
limited and there can be a lot of them. Also it limits our
ability to move them to a dedicated /dev/fsi directory or
to be smart about device naming and numbering.

It also means we have IDAs on every single of these drivers

This creates a common fsi "device_type" for the optional
/dev/fsi grouping and a dev_t allocator for all FSI devices.

"Legacy" devices get to use a backward compatible numbering
scheme (as long as chip id <16 and there's only one copy
of a given unit type per chip).

A single major number and a single IDA are shared for all
FSI devices.

This doesn't convert the FSI device drivers to use the new
scheme yet, they will be converted individually.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2018-07-27 09:57:23 +10:00
Benjamin Herrenschmidt 537052df22 fsi: master-ast-cf: Rename dump_trace() to avoid name collision
s390 defines a global dump_trace() symbol. Rename ours to
dump_ucode_trace() to avoid a collision in build tests.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2018-07-26 14:49:50 +10:00
Gustavo A. R. Silva 502defbb47 fsi: master-ast-cf: Fix memory leak
In case memory resources for *fw* were allocated, release them
before return.

Addresses-Coverity-ID: 1472044 ("Resource leak")
Fixes: 6a794a27da ("fsi: master-ast-cf: Add new FSI master using Aspeed ColdFire")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2018-07-26 09:56:17 +10:00
Mika Westerberg 2d8ff0b586 thunderbolt: Add support for runtime PM
When Thunderbolt host controller is set to RTD3 mode (Runtime D3) it is
present all the time. Because of this it is important to runtime suspend
the controller whenever possible. In case of ICM we have following rules
which all needs to be true before the host controller can be put to D3:

  - The controller firmware reports to support RTD3
  - All the connected devices announce support for RTD3
  - There is no active XDomain connection

Implement this using standard Linux runtime PM APIs so that when all the
children devices are runtime suspended, the Thunderbolt host controller
PCI device is runtime suspended as well. The ICM firmware then starts
powering down power domains towards RTD3 but it can prevent this if it
detects that there is an active Display Port stream (this is not visible
to the software, though).

The Thunderbolt host controller will be runtime resumed either when
there is a remote wake event (device is connected or disconnected), or
when there is access from userspace that requires hardware access.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-25 10:55:29 +02:00
Colin Ian King fa3af1cb1e thunderbolt: Remove redundant variable 'approved'
Variable 'approved' is being assigned but is never used hence it is
redundant and can be removed.

Cleans up clang warning:
warning: variable 'approved' set but not used [-Wunused-but-set-variable]

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-25 10:15:46 +02:00
Mika Westerberg d04522fa08 thunderbolt: Use correct ICM commands in system suspend
The correct way to put the ICM into suspend state is to send it
NHI_MAILBOX_DRV_UNLOADS mailbox command. NHI_MAILBOX_SAVE_DEVS is not
needed on Intel Titan Ridge so we can skip it.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-25 10:15:24 +02:00
Mika Westerberg 84db685876 thunderbolt: No need to take tb->lock in domain suspend/complete
If the connection manager implementation needs to touch the domain
structures it ought to take the lock itself. Currently only ICM
implements these hooks and it does not need the lock because we there
will be no notifications before driver ready message is sent to it.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-25 10:15:24 +02:00
Mika Westerberg fdd92e89a4 thunderbolt: Do not unnecessarily call ICM get route
This command is not really fast and can make resume time slower. We only
need to get route again if the link was changed and during initial
device connected message.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-25 10:15:24 +02:00
Mika Westerberg dba3caf621 thunderbolt: Use 64-bit DMA mask if supported by the platform
PCI defaults to 32-bit DMA mask but this device is capable of full
64-bit addressing, so make sure we first try 64-bit DMA mask before
falling back to the default 32-bit.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-25 10:15:24 +02:00
Nathan Ciobanu c356915ebc thunderbolt: Fix small typo in variable name
Fixes small variable name typo and the associated
checkpatch spelling warning.

Signed-off-by: Nathan Ciobanu <nathan.d.ciobanu@linux.intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-25 10:15:24 +02:00
Benjamin Herrenschmidt 375cac7010 fsi: master-ast-cf: Mask unused bits in RTAG/RCRC
Then reading the RTAG/RCRC "registers" from the coprocessor after
a command is complete, mask out the top bits, only keep the relevant
bits. Microcode v5 will leave garbage in those top bits as a
result of a performance optimization.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
2018-07-25 16:04:53 +10:00
Guenter Roeck f371a7c17a android: binder: Include asm/cacheflush.h after linux/ include files
If asm/cacheflush.h is included first, the following build warnings are
seen with sparc32 builds.

In file included from arch/sparc/include/asm/cacheflush.h:11:0,
        from drivers/android/binder.c:54:
arch/sparc/include/asm/cacheflush_32.h:40:37: warning:
	'struct page' declared inside parameter list will not be visible
	outside of this definition or declaration

Moving the asm/ include after linux/ includes solves the problem.

Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-24 14:23:00 +02:00
Guenter Roeck 1e81c57b59 android: binder_alloc: Include asm/cacheflush.h after linux/ include files
If asm/cacheflush.h is included first, the following build warnings are
seen with sparc32 builds.

In file included from ./arch/sparc/include/asm/cacheflush.h:11:0,
	from drivers/android/binder_alloc.c:20:
./arch/sparc/include/asm/cacheflush_32.h:40:37: warning:
	'struct page' declared inside parameter list

Moving the asm/ include after linux/ includes fixes the problem.

Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-24 14:23:00 +02:00
Tomas Winkler a1c4d08b6b mei: add mei_msg_hdr_init wrapper.
Wrap the mei header boilerplate initialization code in
mei_msg_hdr_init function. On the way remove 'completed'
field from mei_cl_cb structure as this information
is already included in the header and is local to particular
fragment.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-24 14:16:57 +02:00
Tomas Winkler 8c8d964ce9 mei: move hbuf_depth from the mei device to the hw modules
The host buffer depth is hardware specific so it's better to
handle it inside the me and txe hw modules. In me the depth
is read from register in txe it's a constant number.
The value is now retrieved via mei_hbuf_depth accessor,
while it replaces mei_hbuf_max_len.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-24 14:16:57 +02:00
Tomas Winkler 9fc5f0f8ad mei: cleanup slots to data conversions
Cleanup conversions between slots and data.
Define MEI_SLOT_SIZE instead of using 4 or sizeof(u32) across
the source code.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-24 14:16:57 +02:00
Benjamin Herrenschmidt d0cff240b8 fsi: master-ast-cf: Fix build warnings on 64-bit platforms
A couple of places forgot the 'z' qualifier for dev_dbg
when printing a size_t

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2018-07-24 16:35:03 +10:00
Greg Kroah-Hartman 670d198b61 This adds support for offloading the FSI low level bitbanging to the
ColdFire coprocessor of the Aspeed SoCs. All the pre-requisites have
 already been merged, this is the final piece in the puzzle.
 
 This branch also pull gpio/ib-aspeed which is a topic branch already
 in gpio/for-next (and thus in next) whic contains pre-requisites.
 
 Finally, there's also a bug fix to the sbefifo driver for some
 inconsistent use of a mutex in the error handling code.
 -----BEGIN PGP SIGNATURE-----
 
 iQIcBAABAgAGBQJbVqMzAAoJEHM62YSLdExe+aUP/12vNZdYfZLKdEuQRztjUtpO
 k1E/jNLnH97GvP6553zcebVrDl/xKzaYlxRrk3d8BovM4VlDv20QPWwc08IjXFPA
 +ikIBtWwAevXMuV69hpc253wOutYG7tdrrTKKc6o4rBAR+3DXMLBQ5bbb7SzEypB
 JpavulJvFwaxVb2UioQ6AaQ5dWdOjgYyXZicx9bNrTaj8FaY2rIohMXSqeXDqqhX
 hxQdRYo/YQWxxCTOSGdUQp9Yyuni1gP4NeHYMZGloFhjGZglo3oTL7aiCtxcFQAQ
 KcYY49ESlqIhjdFAFVa0WFStVMFSo7PmIMIFm9tS69av3TKTbZjbnQfjjOcfi05G
 0hc4x/st3VJyQmQHhOlOwA/F4KBk0JZWtq3fOoyT297x1Nah+3iuO/8diLcqvkAy
 tXepEKj9cJ5igQ0Lvv0QQnwwmDkzMyat3U6GYA5ELwuMtUeifzp1HlXdKDEttSP3
 QFG4CgUjG82RHKiFPGB+sEIaZ8CGQR0MsrlQFihI902PM8spw8LoQmGKReEP2qaF
 WYERVLZ3r3C0kAIX2+HLInm1YL3bpBFbGJj/LJwnylmOLucCcqd3PlfzykzMZ5hN
 +21c8NXs7rRiP1n20NwpXtGGfAV1BgvnkikZ18zbv3uDD66PG2twklsCrEv4sedZ
 RzQTFdfwqB83g+ZKgiLi
 =C4C6
 -----END PGP SIGNATURE-----

Merge tag 'fsi-updates-2018-07-24' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/linux-fsi into char-misc-testing

Ben writes:

This adds support for offloading the FSI low level bitbanging to the
ColdFire coprocessor of the Aspeed SoCs. All the pre-requisites have
already been merged, this is the final piece in the puzzle.

This branch also pull gpio/ib-aspeed which is a topic branch already
in gpio/for-next (and thus in next) whic contains pre-requisites.

Finally, there's also a bug fix to the sbefifo driver for some
inconsistent use of a mutex in the error handling code.
2018-07-24 08:00:13 +02:00
Benjamin Herrenschmidt 0a213777d1 fsi: Add support for device-tree provided chip IDs
They get retrieved from the device-tree and exposed
as an attribute in sysfs

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2018-07-23 16:27:32 +10:00
Benjamin Herrenschmidt e13c542d52 dt-bindings: fsi: Add optional chip-id to CFAMs
This represents a physical chip in the system and allows
a stable numbering scheme to be passed to udev for userspace
to recognize which chip is which.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Rob Herring <robh@kernel.org>
2018-07-23 16:27:32 +10:00
Benjamin Herrenschmidt 4fcdc2d1b0 fsi: sbefifo: Fix inconsistent use of ffdc mutex
Some of the exit path missed the unlock. Move the mutex to
an outer function to avoid the problem completely

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2018-07-23 16:27:32 +10:00
Benjamin Herrenschmidt 6a794a27da fsi: master-ast-cf: Add new FSI master using Aspeed ColdFire
The Aspeed AST2x00 can contain a ColdFire v1 coprocessor which
is currently unused on OpenPower systems.

This adds an alternative to the fsi-master-gpio driver that
uses that coprocessor instead of bit banging from the ARM
core itself. The end result is about 4 times faster.

The firmware for the coprocessor and its source code can be
found at https://github.com/ozbenh/cf-fsi and is system specific.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2018-07-23 15:22:52 +10:00
Benjamin Herrenschmidt 2be5263c5d dt-bindings: fsi: Document binding for the fsi-master-ast-cf "device"
This isn't per-se a real device, it's a pseudo-device that
represents the use of the Aspeed built-in ColdFire to
implement the FSI protocol by bitbanging the GPIOs instead
of doing it from the ARM core.

Thus it's a drop-in replacement for the existing
fsi-master-gpio pseudo-device for use on systems based
on the Aspeed chips. It has most of the same properties,
plus some more needed to operate the coprocessor.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Reviewed-by: Rob Herring <robh@kernel.org>
2018-07-23 15:22:45 +10:00
Benjamin Herrenschmidt d5e838275c devres: Add devm_of_iomap()
There are still quite a few cases where a device might want
to get to a different node of the device-tree, obtain the
resources and map them.

We have of_iomap() and of_io_request_and_map() but they both
have shortcomings, such as not returning the size of the
resource found (which can be useful) and not being "managed".

This adds a devm_of_iomap() that provides all of these and
should probably replace uses of the above in most drivers.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Joel Stanley <joel@jms.id.au>
2018-07-23 15:22:39 +10:00
Benjamin Herrenschmidt d5e748ff2b Merge remote-tracking branch 'gpio/ib-aspeed' into upstream-ready
Merge the GPIO tree "ib-aspeed" topic branch which contains pre-requisites
for subsequent changes. This branch is also in gpio "next".
2018-07-23 15:21:39 +10:00
Stephen Hemminger bce5c2ea35 uio: add SPDX license tags
For those without any license text present or short reference
to GPL, add SPDX tag.

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-21 15:41:20 +02:00
Hailong Liu e7de2590f1 uio: fix wrong return value from uio_mmap()
uio_mmap has multiple fail paths to set return value to nonzero then
goto out. However, it always returns *0* from the *out* at end, and
this will mislead callers who check the return value of this function.

Fixes: 57c5f4df0a ("uio: fix crash after the device is unregistered")
CC: Xiubo Li <xiubli@redhat.com>
Signed-off-by: Hailong Liu <liu.hailong6@zte.com.cn>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Jiang Biao <jiang.biao2@zte.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-21 08:45:24 +02:00
Stephen Hemminger fbb5858c14 uio: add SPDX license tag
Replace short statement in comment with proper SPDX
license tag.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-21 08:44:08 +02:00
Greg Kroah-Hartman 64ce7e9de7 Update extcon for 4.19
Detailed description for this pull request:
 1. Release locking when sending the connector state in extcon_sync()
 -  Previously, extcon used the spinlock before calling the notifier_call_chain
 to prevent the scheduled out of task and to prevent the notification delay.
 When spinlock is locked for sending the notification, deadlock issue
 occured on the side of extcon consumer device. To fix this issue on extcon
 consumer device, release locking when sending the connector state.
 
 2. Fix minor issues of extcon provider driver
 - extcon-intel-int3496.c uses 'linux/gpio/consumer.h' instead of 'linux/gpio.h'
 - extcon-usbc-cors-ec.c adds SPDX license and fix the wrong license information
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJbT9aFAAoJEJzN3yze689TAiwP/iKiT9KNe8z2u91XxZfq7hDS
 EfaGh1heo98+iLWq/rQNd/ddbHdUxUAlviX44LEIWhKTODZO3VlnlCqQven08K3o
 E+rBiJgbCYYsjKdSt+tJ78FM90LSINUCSb12gaVyXwZLAX1xL005Pd4BmdFitztw
 TeIK2Zdfsr3tiPX0OLCyx0PXghJADQ7O4PDQSR+RzXZTLKwbyHR59v0QzZyLJUFe
 Hsajp0ozEqfWzkRRCm6okqLA2rQ/ahL8JwAZevXEki10gFOsiLJZmd/xEUGJyIWT
 SerkstmNil5tqcGoVrbhUOP5hdgVqudvvd9ICwjLudwDUD95tQsjNHIc3vlFZEzS
 QWwvajN3RjDvaYXUZlj9POJRDRFYpO3X0UTOBMOURWQSfZam+gfKpVlIRPBxfMFg
 wUfnEsu6OPpLywEIjAw8c4vCEeo2iv9kMqA5QCYnThqwHtgCAa+QrDCdbI1hLKfC
 +/XRK5J8PUoAKzCwQs9IN8LXszOUs3d/wjG2f62Le9fN4ZQj3/vtBEjbDxNp6pSu
 xrckO4o70v4iCx5lf4Rt/r8BUXss5GhCg5NXmTBclU35qCV9AQ3LcnNuTq+ku3Dy
 N+HFomrkc6s74fvf7fHk9eghG2piXqysNcTwlml4F4wcNlv+QdAodENmH+g9DP1Z
 3mV9bUMphpb8LwlbPgMw
 =Iuyb
 -----END PGP SIGNATURE-----

Merge tag 'extcon-next-for-4.19' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon into char-misc-next

Chanwoo writes:

Update extcon for 4.19

Detailed description for this pull request:
1. Release locking when sending the connector state in extcon_sync()
-  Previously, extcon used the spinlock before calling the notifier_call_chain
to prevent the scheduled out of task and to prevent the notification delay.
When spinlock is locked for sending the notification, deadlock issue
occured on the side of extcon consumer device. To fix this issue on extcon
consumer device, release locking when sending the connector state.

2. Fix minor issues of extcon provider driver
- extcon-intel-int3496.c uses 'linux/gpio/consumer.h' instead of 'linux/gpio.h'
- extcon-usbc-cors-ec.c adds SPDX license and fix the wrong license information
2018-07-21 08:13:02 +02:00
Sudeep Holla 555e7943f2 misc: vexpress/syscfg: Use devm_ioremap_resource() to map memory
Instead of checking the return value of platform_get_resource(), we can
use devm_ioremap_resource() which has the NULL pointer check and the
memory region requesting. devm_ioremap_resource is designed to replace
calls to devm_request_mem_region followed by devm_ioremap, so let's use
the same.

Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Acked-by: Liviu Dudau <liviu.dudau@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-16 13:32:08 +02:00
Robert Lippert 3772e5da44 drivers/misc: Aspeed LPC snoop output using misc chardev
Provides the data bytes snooped over the LPC snoop bus to userspace
as a (blocking) misc character device.

Bytes output from the host using LPC I/O transactions to the snooped port
can be watched or retrieved from the character device using a simple
command like this:
~#  od -w1 -A n -t x1 /dev/aspeed-lpc-snoop0
 10
 de
 ad
 c0
 ff
 ee

Signed-off-by: Robert Lippert <rlippert@google.com>
Signed-off-by: Patrick Venture <venture@google.com>
Signed-off-by: Benjamin Fair <benjaminfair@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-16 13:30:47 +02:00
Tomas Winkler 7f3838fb8c mei: bus: suppress sign-compare warnings
Comparison between signed and unsigned warnings
and associated type promotion may cause error
condition not be detected.
The type promotion issue in mei bus was addressed by two patches:
commit b40b3e9358 ("mei: bus: type promotion bug in mei_nfc_if_version()")
commit cf1ed2c59b ("mei: bus: type promotion bug in mei_fwver()")
Now it is possible to suppress the warning, by adding proper
casting to move out of radar.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-16 13:29:35 +02:00
Dan Carpenter d9995a0fab gnss: fix potential error pointer dereference
The gnss_allocate_device() function returns a mix of NULL and error
pointers on error.  It should only return one or the other.  Since the
callers both check for NULL, I've modified it to return NULL on error.

Fixes: 2b6a440351 ("gnss: add GNSS receiver subsystem")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-16 12:48:07 +02:00
Colin Ian King 55570f1a44 gnss: ubx: make struct ubx_gserial_ops static
The structure ubx_gserial_ops is local to the source and does not need
to be in global scope, so make it static.

Cleans up sparse warning:
symbol 'ubx_gserial_ops' was not declared. Should it be static?

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-16 12:48:07 +02:00
Tuomas Tynkkynen 8d62fe9499 virtio: virtconsole: Use seq_file for debugfs operations
Simplifies the code and is more conventional to what's used in the rest
of the kernel for debugfs ops.

Signed-off-by: Tuomas Tynkkynen <tuomas@tuxera.com>
Reviewed-by: Amit Shah <amit@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-16 12:03:53 +02:00
Colin Ian King 566208494e vme: ca91cx42: remove redundant variable i
Variable i is being assigned but is never used hence it is redundant
and can be removed.

Cleans up clang warning:
warning: variable 'i' set but not used [-Wunused-but-set-variable]

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Martyn Welch <martyn@welchs.me.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-16 12:03:53 +02:00
Greg Kroah-Hartman 83cf9cd6d5 Merge 4.18-rc5 into char-misc-next
We want the char-misc fixes in here as well.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-16 09:04:54 +02:00
Linus Torvalds 9d3cce1e8b Linux 4.18-rc5 2018-07-15 12:49:31 -07:00
Linus Torvalds 41b55d23ee ARM: SoC fixes for 4.18-rc
- A fix for OMAP5 and DRA7 to make the branch predictor hardening
    settings take proper effect on secondary cores
  - Disable USB OTG on am3517 since current driver isn't working
  - Fix thermal sensor register settings on Armada 38x
  - Fix suspend/resume IRQs on pxa3xx
 -----BEGIN PGP SIGNATURE-----
 
 iQJDBAABCAAtFiEElf+HevZ4QCAJmMQ+jBrnPN6EHHcFAltK4qkPHG9sb2ZAbGl4
 b20ubmV0AAoJEIwa5zzehBx3pS0P/i4cTb8pESaYltSiVXePn8Ii6LJa0zxKZ4SK
 Yb2jBAFliG319HX2uFNsu42DfhgfdjBlhjkK/5pyOmMyo/t6YLDmC+qmeMhSCwbi
 913eZav3UxdegJWFauU8P/khyxPD2nCeDqETzhANuzEB6+ayhi+cgIjpnx+8JLyK
 0q5cifBEdRbZO9UGG+IFqt3TLpeAuCIbWLzTCOmdEQ706Zw2TPzzR6RTBt+kfupA
 j7Z0pg1yzK40TWyv1ZOyYC7yw2S+9cuT4gdXE/DUgyT4dGlE/deE9iT9D/s8fgAL
 Fser9jLbC5rbNQ1MnLRuGtbidvpiq2iCyf7G/FTJD3eoe1AGeaVooa+Jsz9LgEN6
 JFJ/sxD8c6PSAJ8t9Dmv9eFOhia0V8XzjtEinWJ2E8F0cgMLxG1y4Ek0cnvaRgZG
 2VMfNLIN0iQvYj1FHLJEYkOFEJ+3szJYC8Ejr5RdMUAShUHzqTw1XB4D9IPljJm9
 fvrk20LmHRosvcrtqgUNRtMdfEvnTaUMB427ywYyH6Mz75L30CyE7FWohtoL+Qm3
 mjB/qQ+c4dWj0YHKLSRhG40hP4Bzo/ljeuzgLs3/crRh12qBHxhE73rUvCpctCyA
 VBrU4F+I/a8cJPDqLYtwK8RuMFcYQTWogF3OVWIa+xlWRINYFO8hTgHETSHUtkQY
 TGpglcH0
 =lmky
 -----END PGP SIGNATURE-----

Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull ARM SoC fixes from Olof Johansson:

 - A fix for OMAP5 and DRA7 to make the branch predictor hardening
   settings take proper effect on secondary cores

 - Disable USB OTG on am3517 since current driver isn't working

 - Fix thermal sensor register settings on Armada 38x

 - Fix suspend/resume IRQs on pxa3xx

* tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
  ARM: dts: am3517.dtsi:  Disable reference to OMAP3 OTG controller
  ARM: DRA7/OMAP5: Enable ACTLR[0] (Enable invalidates of BTB) for secondary cores
  ARM: pxa: irq: fix handling of ICMR registers in suspend/resume
  ARM: dts: armada-38x: use the new thermal binding
2018-07-15 09:49:21 -07:00
Gustavo A. R. Silva 34bcfdac8c parport: ieee1284: mark expected switch fall-throughs
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-15 14:13:00 +02:00
Julia Lawall faa1a47388 parport: sunbpp: fix error return code
Return an error code on failure.  Change leading spaces to tab on the
first if.

Problem found using Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-15 14:13:00 +02:00