25 Dec, 2016
1 commit
-
This was entirely automated, using the script by Al:
PATT='^[[:blank:]]*#[[:blank:]]*include[[:blank:]]*'
sed -i -e "s!$PATT!#include !" \
$(git grep -l "$PATT"|grep -v ^include/linux/uaccess.h)to do the replacement at the end of the merge window.
Requested-by: Al Viro
Signed-off-by: Linus Torvalds
15 Dec, 2016
1 commit
-
Pull dmaengine updates from Vinod Koul:
"Fairly routine update this time around with all changes specific to
drivers:- New driver for STMicroelectronics FDMA
- Memory-to-memory transfers on dw dmac
- Support for slave maps on pl08x devices
- Bunch of driver fixes to use dma_pool_zalloc
- Bunch of compile and warning fixes spread across drivers"[ The ST FDMA driver already came in earlier through the remoteproc tree ]
* tag 'dmaengine-4.10-rc1' of git://git.infradead.org/users/vkoul/slave-dma: (68 commits)
dmaengine: sirf-dma: remove unused ‘sdesc’
dmaengine: pl330: remove unused ‘regs’
dmaengine: s3c24xx: remove unused ‘cdata’
dmaengine: stm32-dma: remove unused ‘src_addr’
dmaengine: stm32-dma: remove unused ‘dst_addr’
dmaengine: stm32-dma: remove unused ‘sfcr’
dmaengine: pch_dma: remove unused ‘cookie’
dmaengine: mic_x100_dma: remove unused ‘data’
dmaengine: img-mdc: remove unused ‘prev_phys’
dmaengine: usb-dmac: remove unused ‘uchan’
dmaengine: ioat: remove unused ‘res’
dmaengine: ioat: remove unused ‘ioat_dma’
dmaengine: ioat: remove unused ‘is_raid_device’
dmaengine: pl330: do not generate unaligned access
dmaengine: k3dma: move to dma_pool_zalloc
dmaengine: at_hdmac: move to dma_pool_zalloc
dmaengine: at_xdmac: don't restore unsaved status
dmaengine: ioat: set error code on failures
dmaengine: ioat: set error code on failures
dmaengine: DW DMAC: add multi-block property to device tree
...
14 Dec, 2016
2 commits
-
Pull workqueue updates from Tejun Heo:
"Mostly patches to initialize workqueue subsystem earlier and get rid
of keventd_up().The patches were headed for the last merge cycle but got delayed due
to a bug found late minute, which is fixed now.Also, to help debugging, destroy_workqueue() is more chatty now on a
sanity check failure."* 'for-4.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq:
workqueue: move wq_numa_init() to workqueue_init()
workqueue: remove keventd_up()
debugobj, workqueue: remove keventd_up() usage
slab, workqueue: remove keventd_up() usage
power, workqueue: remove keventd_up() usage
tty, workqueue: remove keventd_up() usage
mce, workqueue: remove keventd_up() usage
workqueue: make workqueue available early during boot
workqueue: dump workqueue state on sanity check failures in destroy_workqueue() -
Pull tty/serial updates from Greg KH:
"Here's the tty/serial patchset for 4.10-rc1.It's been a quiet kernel cycle for this subsystem, just a small number
of changes. A few new serial drivers, and some cleanups to the old
vgacon logic, and other minor serial driver changes as well.All of these have been in linux-next for a while with no reported
issues"* tag 'tty-4.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (54 commits)
serial: 8250_mid fix calltrace when hotplug 8250 serial controller
console: Move userspace I/O out of console_lock to fix lockdep warning
tty: nozomi: avoid sprintf buffer overflow
serial: 8250_pci: Detach low-level driver during PCI error recovery
serial: core: don't check port twice in a row
mxs-auart: count FIFO overrun errors
serial: 8250_dw: Add support for IrDA SIR mode
serial: 8250: Expose set_ldisc function
serial: 8250: Add IrDA to UART capabilities
serial: 8250_dma: power off device after TX is done
serial: 8250_port: export serial8250_rpm_{get|put}_tx()
serial: sunsu: Free memory when probe fails
serial: sunhv: Free memory when remove() is called
vt: fix Scroll Lock LED trigger name
tty: typo in comments in drivers/tty/vt/keyboard.c
tty: amba-pl011: Add earlycon support for SBSA UART
tty: nozomi: use permission-specific DEVICE_ATTR variants
tty: serial: Make the STM32 serial port depend on it's arch
serial: ifx6x60: Free memory when probe fails
serial: ioc4_serial: Free memory when kzalloc fails during probe
...
13 Dec, 2016
1 commit
-
Pull CRIS updates from Jesper Nilsson:
"Three patches for minor issues"* tag 'cris-for-4.10' of git://git.kernel.org/pub/scm/linux/kernel/git/jesper/cris:
cris: No need to append -O2 and $(LINUXINCLUDE)
tty: serial: make crisv10 explicitly non-modular
cris: Only build flash rescue image if CONFIG_ETRAX_AXISFLASHMAP is selected
30 Nov, 2016
5 commits
-
Fix the following Calltrace:
[ 77.768221] WARNING: CPU: 5 PID: 645 at drivers/dma/dmaengine.c:1069 dma_async_device_unregister+0xe2/0xf0
[ 77.775058] dma_async_device_unregister called while 1 clients hold a reference
[ 77.825048] CPU: 5 PID: 645 Comm: sh Not tainted 4.8.8-WR9.0.0.0_standard+ #3
[ 77.832550] Hardware name: Intel Corp. Aspen Cove/Server, BIOS HAVLCRB1.X64.0012.D58.1604140405 04/14/2016
[ 77.840396] 0000000000000000 ffffc90008adbc80 ffffffff81403456 ffffc90008adbcd0
[ 77.848245] 0000000000000000 ffffc90008adbcc0 ffffffff8105e2e1 0000042d08adbf20
[ 77.855934] ffff88046a861c18 ffff88046a85c420 ffffffff820d4200 ffff88046ae92318
[ 77.863601] Call Trace:
[ 77.871113] [] dump_stack+0x4f/0x69
[ 77.878655] [] __warn+0xd1/0xf0
[ 77.886102] [] warn_slowpath_fmt+0x4f/0x60
[ 77.893508] [] ? find_next_bit+0x19/0x20
[ 77.900730] [] ? dma_channel_rebalance+0x23e/0x270
[ 77.907814] [] dma_async_device_unregister+0xe2/0xf0
[ 77.914992] [] hsu_dma_remove+0x1a/0x60
[ 77.921977] [] dnv_exit+0x1c/0x20
[ 77.928752] [] mid8250_remove+0x26/0x40
[ 77.935607] [] pci_device_remove+0x39/0xc0
[ 77.942292] [] __device_release_driver+0x9a/0x140
[ 77.948836] [] device_release_driver+0x23/0x30
[ 77.955364] [] pci_stop_bus_device+0x8c/0xa0
[ 77.961769] [] pci_stop_and_remove_bus_device_locked+0x1a/0x30
[ 77.968113] [] remove_store+0x5e/0x70
[ 77.974267] [] dev_attr_store+0x18/0x30
[ 77.980243] [] sysfs_kf_write+0x3a/0x50
[ 77.986180] [] kernfs_fop_write+0x10b/0x190
[ 77.992118] [] __vfs_write+0x18/0x40
[ 77.998032] [] vfs_write+0xae/0x190
[ 78.003747] [] SyS_write+0x46/0xb0
[ 78.009234] [] entry_SYSCALL_64_fastpath+0x13/0x8f
[ 78.014809] ---[ end trace 0c36dd73b7408eb2 ]---This happens when the 8250 serial controller is hotplugged as follows:
echo 1 > /sys/bus/pci/devices/0000:00:1a.0/removeThis trace happens due to the serial port still holding a reference when
the dma device is unregistered.
The dma unregister routine will check if there is still a reference exist,
if so it will give the WARNING(here serial port still was not unregister).To fix this, We need to unregister the serial port first, then do DMA
device unregister to make sure there is no reference when to DMA routine.Signed-off-by: Liwei Song
Signed-off-by: Greg Kroah-Hartman -
Several versions of DW DMAC have multi block transfers hardware
support. Hardware support of multi block transfers is disabled
by default if we use DT to configure DMAC and software emulation
of multi block transfers used instead.
Add multi-block property, so it is possible to enable hardware
multi block transfers (if present) via DT.Switch from per device is_nollp variable to multi_block array
to be able enable/disable multi block transfers separately per
channel.Acked-by: Andy Shevchenko
Signed-off-by: Eugeniy Paltsev
Signed-off-by: Vinod Koul -
When running certain workload on a debug kernel with lockdep turned on,
a ppc64 kvm guest could sometimes hit the following lockdep warning:[ INFO: possible circular locking dependency detected ]
Possible unsafe locking scenario:CPU0 CPU1
---- ----
lock(&mm->mmap_sem);
lock(console_lock);
lock(&mm->mmap_sem);
lock(cpu_hotplug.lock);*** DEADLOCK ***
Looking at the console code, the console_lock-->mmap_sem scenario will
only happen when reading or writing the console unicode map leading to
a page fault.To break this circular locking dependency, all the userspace I/O
operations in consolemap.c are now moved outside of the console_lock
critical sections so that the mmap_sem won't be acquired when holding
the console_lock.Signed-off-by: Waiman Long
Signed-off-by: Greg Kroah-Hartman -
Testing with a gcc-7 snapshot produced an internal compiler error
for this file:drivers/tty/nozomi.c: In function 'receive_flow_control':
drivers/tty/nozomi.c:919:12: internal compiler error: in get_substring_ranges_for_loc, at input.c:1388
static int receive_flow_control(struct nozomi *dc)I've reported this at https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78569
but also noticed that the code line contains a stack overflow, as it prints
a string into a slightly shorter fixed-length 'tmp' variable.A lot of the code here is unnecessary and can be expressed in a simpler
way, relying on the fact that removing the 'DEBUG' macro will also get
rid of all pr_debug() calls. This change should not change any of the
output but avoids both the stack overflow and the gcc crash.The stack overflow will not happen unless a module load parameter is
also set to enable the debug messages.Signed-off-by: Arnd Bergmann
Signed-off-by: Greg Kroah-Hartman -
During a PCI error recovery, like the ones provoked by EEH in the ppc64
platform, all IO to the device must be blocked while the recovery is
completed. Current 8250_pci implementation only suspends the port
instead of detaching it, which doesn't prevent incoming accesses like
TIOCMGET and TIOCMSET calls from reaching the device. Those end up
racing with the EEH recovery, crashing it. Similar races were also
observed when opening the device and when shutting it down during
recovery.This patch implements a more robust IO blockage for the 8250_pci
recovery by unregistering the port at the beginning of the procedure and
re-adding it afterwards. Since the port is detached from the uart
layer, we can be sure that no request will make through to the device
during recovery. This is similar to the solution used by the JSM serial
driver.I thank Peter Hurley for valuable input on
this one over one year ago.Signed-off-by: Gabriel Krisman Bertazi
Signed-off-by: Greg Kroah-Hartman
28 Nov, 2016
1 commit
-
There is no need to check port for NULL in uart_port_deref() since we call it
only when port is defined.There are few places that violate this. Fix them here as well.
Signed-off-by: Andy Shevchenko
Signed-off-by: Greg Kroah-Hartman
17 Nov, 2016
1 commit
-
The mxs-auart driver does not count FIFO overrun errors. These errors never
appear in /proc/tty/driver/ttyAPP. This is because the OERR status bit is
masked by read_status_mask in the rx interrupt function, but the
AUART_STAT_OERR bit is never set in read_status_mask. The patch enables the
counting of overrun errors.Signed-off-by: Wolfgang Ocker
Reviewed-by: Fabio Estevam
Signed-off-by: Greg Kroah-Hartman
16 Nov, 2016
8 commits
-
Add a set_ldisc function to enable/disable IrDA SIR mode according to
the new line discipline, if IrDA SIR mode is supported by the hardware
configuration.Signed-off-by: Ed Blake
Signed-off-by: Greg Kroah-Hartman -
Expose set_ldisc() function so that it can be overridden with a
platform specific implementation.Signed-off-by: Ed Blake
Signed-off-by: Greg Kroah-Hartman -
Add an IrDA UART capability flag and change the type of
uart_8250_port.capabilities to be u32 rather than unsigned short to
accommodate the additional flag.Signed-off-by: Ed Blake
Signed-off-by: Greg Kroah-Hartman -
When any 8250 based driver sets up DMA and has UART_CAP_RPM capability enabled
the device is left powered on after transfer is done. We need to schedule a
device suspend operation when DMA completes the transfer.The patch is based on the work done by the reporter.
Reported-by: Huiquan Zhong
Signed-off-by: Andy Shevchenko
Signed-off-by: Greg Kroah-Hartman -
The following fix of runtime PM use in DMA mode requires at least
serial8250_rpm_put_tx() to be available. Export both calls.Signed-off-by: Andy Shevchenko
Signed-off-by: Greg Kroah-Hartman -
When su_probe() fails it doesn't free *up and we may have a memory
leak. Fix this by freeing *up before return.Signed-off-by: Souptick joarder
Signed-off-by: Greg Kroah-Hartman -
In each call to hv_remove(), con_read_page and con_write_page is not
getting freed and lead to memory leakage. Fix this by freeing both
pointers in hv_remove().Signed-off-by: Souptick joarder
Signed-off-by: Greg Kroah-Hartman -
There is a disagreement between drivers/tty/vt/keyboard.c and
drivers/input/input-leds.c with regard to what is a Scroll Lock LED
trigger name: input calls it "kbd-scrolllock", but vt calls it
"kbd-scrollock" (two l's).
This prevents Scroll Lock LED trigger from binding to this LED by default.Since it is a scroLL Lock LED, this interface was introduced only about a
year ago and in an Internet search people seem to reference this trigger
only to set it to this LED let's simply rename it to "kbd-scrolllock".Also, it looks like this was supposed to be changed before this code was
merged: https://lkml.org/lkml/2015/6/9/697 but it was done only on
the input side.Signed-off-by: Maciej S. Szmigiero
Acked-by: Samuel Thibault
Cc: stable # 4.2+
Signed-off-by: Greg Kroah-Hartman
10 Nov, 2016
17 commits
-
Fixed typo in comments in drivers/tty/vt/keyboard.c
Signed-off-by: Askar Safin
Signed-off-by: Greg Kroah-Hartman -
Declare an OF early console for SBSA UART so that the early console device
can be specified via the "stdout-path" property in device-tree.Cc: Russell King
Cc: Greg Kroah-Hartman
Signed-off-by: Kefeng Wang
Signed-off-by: Greg Kroah-Hartman -
Use DEVICE_ATTR_RO for read only attributes. This simplifies the
source code, improves readbility, and reduces the chance of
inconsistencies.The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)//
@ro@
declarer name DEVICE_ATTR;
identifier x,x_show;
@@DEVICE_ATTR(x, \(0444\|S_IRUGO\), x_show, NULL);
@script:ocaml@
x << ro.x;
x_show << ro.x_show;
@@if not (x^"_show" = x_show) then Coccilib.include_match false
@@
declarer name DEVICE_ATTR_RO;
identifier ro.x,ro.x_show;
@@- DEVICE_ATTR(x, \(0444\|S_IRUGO\), x_show, NULL);
+ DEVICE_ATTR_RO(x);
//Signed-off-by: Julia Lawall
Signed-off-by: Greg Kroah-Hartman -
The STM32 serial port is SoC specific so no point enabling it
without the architecture enabled.Signed-off-by: Peter Robinson
Signed-off-by: Greg Kroah-Hartman -
When spi_setup() fails it doesn't free ifx_dev and we have a memory
leak. Fix this by freeing ifx_dev before the return.Signed-off-by: Souptick joarder
Signed-off-by: Greg Kroah-Hartman -
Inside ioc4_attach_local() 4 memory was allocated using kzalloc and
assign it to ports[] within loop. When kzalloc fails inside loop,
it returns error without freeing previously allocated memory and we
may have memory leak. Fix this by freeing ports[] before return.Signed-off-by: Souptick joarder
Signed-off-by: Greg Kroah-Hartman -
The fresh new serial driver for pxa produces warnings when
CONFIG_PM_SLEEP is disabled:drivers/tty/serial/8250/8250_pxa.c:50:12: error: 'serial_pxa_resume' defined but not used [-Werror=unused-function]
drivers/tty/serial/8250/8250_pxa.c:41:12: error: 'serial_pxa_suspend' defined but not used [-Werror=unused-function]This removes the #ifdef around the two functions and instead marks both
as __maybe_unused, which is more robust and avoids the warning.Fixes: ab28f51c77cd ("serial: rewrite pxa2xx-uart to use 8250_core")
Signed-off-by: Arnd Bergmann
Acked-by: Robert Jarzmik
Signed-off-by: Greg Kroah-Hartman -
An otherwise very nice cleanup of the pxa2xx uart support marked the
init function of this driver as __deprecated:drivers/tty/serial/pxa.c:944:1: error: 'serial_pxa_init' is deprecated [-Werror=deprecated-declarations]
This seems unhelpful to me, as we now warn for every allmodconfig build,
which is otherwise free of warnings on most architectures. Let's
remove the annotation again.Fixes: ab28f51c77cd ("serial: rewrite pxa2xx-uart to use 8250_core")
Signed-off-by: Arnd Bergmann
Signed-off-by: Greg Kroah-Hartman -
Drop invalid user-pointer check from TIOCGSERIAL handler.
A NULL-pointer can be valid in user space and copy_to_user() takes care
of sanity checking.Cc: Mikael Starvik
Cc: linux-cris-kernel@axis.com
Signed-off-by: Johan Hovold
Acked-by: Jesper Nilsson
Signed-off-by: Greg Kroah-Hartman -
Drop invalid user-pointer checks from custom ioctl handlers.
A NULL-pointer can be valid in user space and copy_to_user() takes care
of sanity checking.Signed-off-by: Johan Hovold
Signed-off-by: Greg Kroah-Hartman -
Drop invalid user-pointer check from TIOCGSERIAL handler.
A NULL-pointer can be valid in user space and copy_to_user() takes care
of sanity checking.Signed-off-by: Johan Hovold
Signed-off-by: Greg Kroah-Hartman -
Hi,
below patch to fix Fourth port offset of Percom PI7C9X7954 boards.I had a problem using Fourth port on a pci express serial board based on Pericom
PI7C9X7954. Reading datasheet I notice a "special" offset assign to this port
when used in I/O mode.Offset 0x0 -> UART 0
Offset 0x8 -> UART 1
Offset 0x10 -> UART 2
Offset 0x38 -> UART 3 <
Signed-off-by: Greg Kroah-Hartman -
While spin is already locked, serial output request causes the deadlock,
because serial output process also tries to lock the spin.
This patch removes serial output with spin locked.Signed-off-by: Takatoshi Akiyama
Signed-off-by: Takeshi Kihara
Signed-off-by: Simon Horman
Reviewed-by: Geert Uytterhoeven
Acked-by: Wolfram Sang
Signed-off-by: Greg Kroah-Hartman -
The Kconfig currently controlling compilation of this code is:
arch/cris/arch-v10/drivers/Kconfig:config ETRAX_SERIAL
arch/cris/arch-v10/drivers/Kconfig: bool "Serial-port support"...meaning that it currently is not being built as a module by anyone.
Lets remove the couple traces of modular infrastructure use, so that
when reading the driver there is no doubt it is builtin-only.Since module_init translates to device_initcall in the non-modular
case, the init ordering remains unchanged with this commit.We don't replace module.h with init.h since the file already has that.
Cc: Mikael Starvik
Cc: Jesper Nilsson
Cc: Jiri Slaby
Cc: linux-cris-kernel@axis.com
Cc: linux-serial@vger.kernel.org
Signed-off-by: Paul Gortmaker
Signed-off-by: Greg Kroah-Hartman -
The newly added pxa glue driver for 8250 supports console output, but
fails to build if the 8250 console is disabled:drivers/tty/serial/8250/8250_pxa.o: In function `early_serial_pxa_setup':
8250_pxa.c:(.init.text+0x50): undefined reference to `early_serial8250_setup'This adds an #ifdef like the other glue drivers have it.
Signed-off-by: Arnd Bergmann
Acked-by: Robert Jarzmik
Signed-off-by: Greg Kroah-Hartman -
The hardware book says, the FCR is combined with a register called
CHAR (it will trigger interrupt when a specific character is
received). At first, I used lock/read/modify/write/unlock dance for
the FCR to not affect the upper bits, but the CHAR is actually never
used. It should not hurt to always clear the CHAR and to handle the
FCR as a normal case. It can save the costly locking.Signed-off-by: Masahiro Yamada
Suggested-by: Denys Vlasenko
Signed-off-by: Greg Kroah-Hartman -
For this driver, uart_port::regshift is always 2. Hardcode the
shift value instead of reading ->regshift to get an already known
value. (pointed out by Denys Vlasenko)Furthermore, I am using register macros that are already shifted,
which will save code a bit.Signed-off-by: Masahiro Yamada
Signed-off-by: Greg Kroah-Hartman
07 Nov, 2016
1 commit
-
The Kconfig currently controlling compilation of this code is:
arch/cris/arch-v10/drivers/Kconfig:config ETRAX_SERIAL
arch/cris/arch-v10/drivers/Kconfig: bool "Serial-port support"...meaning that it currently is not being built as a module by anyone.
Lets remove the couple traces of modular infrastructure use, so that
when reading the driver there is no doubt it is builtin-only.Since module_init translates to device_initcall in the non-modular
case, the init ordering remains unchanged with this commit.We don't replace module.h with init.h since the file already has that.
Cc: Mikael Starvik
Cc: Jesper Nilsson
Cc: Greg Kroah-Hartman
Cc: Jiri Slaby
Cc: linux-cris-kernel@axis.com
Cc: linux-serial@vger.kernel.org
Signed-off-by: Paul Gortmaker
Signed-off-by: Jesper Nilsson
31 Oct, 2016
1 commit
-
Mostly simple overlapping changes.
For example, David Ahern's adjacency list revamp in 'net-next'
conflicted with an adjacency list traversal bug fix in 'net'.Signed-off-by: David S. Miller
30 Oct, 2016
1 commit
-
We want the serial/tty fixes in here as well.
Signed-off-by: Greg Kroah-Hartman