[PATCH v4 01/22] timer: Allow to check when the timer callback has not finished yet

2016-01-25 Thread Petr Mladek
timer_pending() checks whether the list of callbacks is empty. Each callback is removed from the list before it is called, see call_timer_fn() in __run_timers(). Sometimes we need to make sure that the callback has finished. For example, if we want to free some resources that are accessed by the c

[PATCH v4 06/22] kthread: Add destroy_kthread_worker()

2016-01-25 Thread Petr Mladek
The current kthread worker users call flush() and stop() explicitly. This function drains the worker, stops it, and frees the kthread_worker struct in one call. It is supposed to be used together with create_kthread_worker*() that allocates struct kthread_worker. Also note that drain() correctly

[PATCH v4 13/22] mm/huge_page: Convert khugepaged() into kthread worker API

2016-01-25 Thread Petr Mladek
Kthreads are currently implemented as an infinite loop. Each has its own variant of checks for terminating, freezing, awakening. In many cases it is unclear to say in which state it is and sometimes it is done a wrong way. The plan is to convert kthreads into kthread_worker or workqueues API. It a

[PATCH v4 19/22] memstick/r592: Better synchronize debug messages in r592_io kthread

2016-01-25 Thread Petr Mladek
There is an attempt to print debug messages when the kthread is waken and when it goes into sleep. It does not work well because the spin lock does not guard all manipulations with the thread state. I did not find a way how to print a message when the kthread really goes into sleep. Instead, I add

[PATCH v4 17/22] ipmi: Convert kipmi kthread into kthread worker API

2016-01-25 Thread Petr Mladek
Kthreads are currently implemented as an infinite loop. Each has its own variant of checks for terminating, freezing, awakening. In many cases it is unclear to say in which state it is and sometimes it is done a wrong way. The plan is to convert kthreads into kthread_worker or workqueues API. It a

[PATCH v4 10/22] kthread: Allow to modify delayed kthread work

2016-01-25 Thread Petr Mladek
There are situations when we need to modify the delay of a delayed kthread work. For example, when the work depends on an event and the initial delay means a timeout. Then we want to queue the work immediately when the event happens. This patch implements mod_delayed_kthread_work() as inspired wor

[PATCH v4 03/22] kthread: Allow to call __kthread_create_on_node() with va_list args

2016-01-25 Thread Petr Mladek
kthread_create_on_node() implements a bunch of logic to create the kthread. It is already called by kthread_create_on_cpu(). We are going to extend the kthread worker API and will need to call kthread_create_on_node() with va_list args there. This patch does only a refactoring and does not modify

[PATCH v4 12/22] kthread: Use try_lock_kthread_work() in flush_kthread_work()

2016-01-25 Thread Petr Mladek
Remove code duplication and use the new try_lock_kthread_work() function in flush_kthread_work() as well. Signed-off-by: Petr Mladek --- kernel/kthread.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/kernel/kthread.c b/kernel/kthread.c index 53c4d5a7c723..71935

[PATCH v4 22/22] thermal/intel_powerclamp: Convert the kthread to kthread worker API

2016-01-25 Thread Petr Mladek
Kthreads are currently implemented as an infinite loop. Each has its own variant of checks for terminating, freezing, awakening. In many cases it is unclear to say in which state it is and sometimes it is done a wrong way. The plan is to convert kthreads into kthread_worker or workqueues API. It a

[PATCH v4 21/22] thermal/intel_powerclamp: Remove duplicated code that starts the kthread

2016-01-25 Thread Petr Mladek
This patch removes a code duplication. It does not modify the functionality. Signed-off-by: Petr Mladek CC: Zhang Rui CC: Eduardo Valentin CC: Jacob Pan CC: linux...@vger.kernel.org --- drivers/thermal/intel_powerclamp.c | 45 +- 1 file changed, 20 insertio

[PATCH v6 1/3] Documentation: tps65086: Add DT bindings for the TPS65086 PMIC

2016-01-25 Thread Andrew F. Davis
The TPS65086 PMIC contains several regulators and a GPO controller. Add bindings for the TPS65086 PMIC. Signed-off-by: Andrew F. Davis Acked-by: Rob Herring --- Documentation/devicetree/bindings/mfd/tps65086.txt | 55 ++ 1 file changed, 55 insertions(+) create mode 100644 D

[PATCH v6 0/3] Add support for the TI TPS65086 PMIC

2016-01-25 Thread Andrew F. Davis
This series adds support for the TPS65086 PMIC. It is a MFD with an I2C interface, several regulators and load switches, and a GPO controller. v1 can be found here: [1] v2: [2] v3: [3] v4: [4] v5: [5] Changes from v5: - Now complies with gpiolib changes - Rebase on v4.5-rc1 Changes from v4: -

[PATCH] power: APM_EMULATION does not depend on PM

2016-01-25 Thread Arnd Bergmann
The APM emulation code does multiple things, and some of them depend on PM_SLEEP, while the battery management does not. However, selecting the symbol like SHARPSL_PM does causes a Kconfig warning: warning: (SHARPSL_PM && PMAC_APM_EMU) selects APM_EMULATION which has unmet direct dependencies (PM

[PATCH v4 18/22] IB/fmr_pool: Convert the cleanup thread into kthread worker API

2016-01-25 Thread Petr Mladek
Kthreads are currently implemented as an infinite loop. Each has its own variant of checks for terminating, freezing, awakening. In many cases it is unclear to say in which state it is and sometimes it is done a wrong way. The plan is to convert kthreads into kthread_worker or workqueues API. It a

[PATCH v4 20/22] memstick/r592: convert r592_io kthread into kthread worker API

2016-01-25 Thread Petr Mladek
Kthreads are currently implemented as an infinite loop. Each has its own variant of checks for terminating, freezing, awakening. In many cases it is unclear to say in which state it is and sometimes it is done a wrong way. The plan is to convert kthreads into kthread_worker or workqueues API. It a

[PATCH] mmc: omap_hsmmc: don't print uninitialized variables

2016-01-25 Thread Arnd Bergmann
When DT based probing is used but the DMA request fails, the driver will print uninitialized stack data from the rx_req and tx_req variables, as indicated by this warning: drivers/mmc/host/omap_hsmmc.c: In function 'omap_hsmmc_probe': drivers/mmc/host/omap_hsmmc.c:2162:3: warning: 'rx_req' may be

[PATCH v6 2/3] mfd: tps65086: Add driver for the TPS65086 PMIC

2016-01-25 Thread Andrew F. Davis
Add support for the TPS65912 device. It provides communication through I2C and contains the following components: - Regulators - Load switches - GPO controller Signed-off-by: Andrew F. Davis Acked-by: Lee Jones --- drivers/mfd/Kconfig | 13 drivers/mfd/Makefile | 1

[PATCH v6 3/3] gpio: tps65086: Add GPO driver for the TPS65086 PMIC

2016-01-25 Thread Andrew F. Davis
Add support for the TPS65086 PMIC GPOs. TPS65086 has four configurable GPOs that can be used for several purposes. These are output only. Signed-off-by: Andrew F. Davis --- drivers/gpio/Kconfig | 6 ++ drivers/gpio/Makefile| 1 + drivers/gpio/gpio-tps65086.c | 144 ++

Re: [PATCH v3 13/17] ARM: Xen: Document UEFI support on Xen ARM virtual platforms

2016-01-25 Thread Stefano Stabellini
On Sat, 23 Jan 2016, Shannon Zhao wrote: > From: Shannon Zhao > > Add a "uefi" node under /hypervisor node in FDT, then Linux kernel could > scan this to get the UEFI information. > > Signed-off-by: Shannon Zhao > Acked-by: Rob Herring > --- > CC: Rob Herring > --- > Documentation/devicetree

[PATCH v4 15/22] hung_task: Convert hungtaskd into kthread worker API

2016-01-25 Thread Petr Mladek
Kthreads are currently implemented as an infinite loop. Each has its own variant of checks for terminating, freezing, awakening. In many cases it is unclear to say in which state it is and sometimes it is done a wrong way. The plan is to convert kthreads into kthread_worker or workqueues API. It a

[PATCH] signals: work around random wakeups in sigsuspend()

2016-01-25 Thread Sasha Levin
A random wakeup can get us out of sigsuspend() without TIF_SIGPENDING being set. Avoid that by making sure we were signaled, like sys_pause() does. Signed-off-by: Sasha Levin --- kernel/signal.c |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/kernel/signal.c b/kerne

[PATCH v4 16/22] kmemleak: Convert kmemleak kthread into kthread worker API

2016-01-25 Thread Petr Mladek
Kthreads are currently implemented as an infinite loop. Each has its own variant of checks for terminating, freezing, awakening. In many cases it is unclear to say in which state it is and sometimes it is done a wrong way. The plan is to convert kthreads into kthread_worker or workqueues API. It a

[PATCH v8 5/5] gpio: tps65912: Add GPIO driver for the TPS65912 PMIC

2016-01-25 Thread Andrew F. Davis
This patch adds support for the TPS65912 PMIC GPIOs. TPS65912 has five configurable GPIOs that can be used for several purposes. Signed-off-by: Andrew F. Davis Reviewed-by: Linus Walleij --- drivers/gpio/Kconfig | 6 ++ drivers/gpio/Makefile| 1 + drivers/gpio/gpio-tps65912

[PATCH] staging: iio: ad5933: avoid uninitialized variable in error case

2016-01-25 Thread Arnd Bergmann
The ad5933_i2c_read function returns an error code to indicate whether it could read data or not. However ad5933_work() ignores this return code and just accesses the data unconditionally, which gets detected by gcc as a possible bug: drivers/staging/iio/impedance-analyzer/ad5933.c: In function 'a

[PATCH] iio: ade7753: avoid uninitialized data

2016-01-25 Thread Arnd Bergmann
The ade7753_spi_read_reg_16() will either successfully read a value from SPI, or return a failure code without delivering data. However, the ade7753_stop_device() and ade7753_reset() functions use the returned data without checking for an error condition first. Gcc detects this as a possible bug an

[PATCH v2 01/21] arm/arm64: Add new is_kernel_in_hyp_mode predicate

2016-01-25 Thread Marc Zyngier
With ARMv8.1 VHE extension, it will be possible to run the kernel at EL2 (aka HYP mode). In order for the kernel to easily find out where it is running, add a new predicate that returns whether or not the kernel is in HYP mode. For completeness, the 32bit code also get such a predicate (always ret

[PATCH v2 16/21] arm64: KVM: VHE: Add fpsimd enabling on guest access

2016-01-25 Thread Marc Zyngier
Despite the fact that a VHE enabled kernel runs at EL2, it uses CPACR_EL1 to trap FPSIMD access. Add the required alternative code to re-enable guest FPSIMD access when it has trapped to EL2. Signed-off-by: Marc Zyngier --- arch/arm64/kvm/hyp/entry.S | 6 ++ 1 file changed, 6 insertions(+)

[PATCH v2 12/21] arm64: KVM: VHE: Enable minimal sysreg save/restore

2016-01-25 Thread Marc Zyngier
We're now in a position where we can introduce VHE's minimal save/restore, which is limited to the handful of shared sysregs. Add the required alternative function calls that result in a "do nothing" call on VHE, and the normal save/restore for non-VHE. Signed-off-by: Marc Zyngier --- arch/arm6

[PATCH v2 21/21] arm64: Panic when VHE and non VHE CPUs coexist

2016-01-25 Thread Marc Zyngier
Having both VHE and non-VHE capable CPUs in the same system is likely to be a recipe for disaster. If the boot CPU has VHE, but a secondary is not, we won't be able to downgrade and run the kernel at EL1. Add CPU hotplug to the mix, and this produces a terrifying mess. Let's solve the problem onc

[PATCH v2 09/21] arm64: KVM: VHE: Differenciate host/guest sysreg save/restore

2016-01-25 Thread Marc Zyngier
With ARMv8, host and guest share the same system register file, making the save/restore procedure completely symetrical. With VHE, host and guest now have different requirements, as they use different sysregs. In order to prepare for this, add split sysreg save/restore functions for both host and

[PATCH v2 20/21] arm64: VHE: Add support for running Linux in EL2 mode

2016-01-25 Thread Marc Zyngier
With ARMv8.1 VHE, the architecture is able to (almost) transparently run the kernel at EL2, despite being written for EL1. This patch takes care of the "almost" part, mostly preventing the kernel from dropping from EL2 to EL1, and setting up the HYP configuration. Signed-off-by: Marc Zyngier ---

[PATCH v2 05/21] arm64: KVM: VHE: Turn VTCR_EL2 setup into a reusable macro

2016-01-25 Thread Marc Zyngier
On a VHE-capable system, there is no point in setting VTCR_EL2 at KVM init time. We can perfectly set it up when the kernel boots, removing the need for a more complicated configuration. In order to allow this, turn VTCR_EL2 setup into a macro that we'll be able to reuse at boot time. Signed-off-

[PATCH v2 19/21] arm64: KVM: Move most of the fault decoding to C

2016-01-25 Thread Marc Zyngier
The fault decoding process (including computing the IPA in the case of a permission fault) would be much better done in C code, as we have a reasonable infrastructure to deal with the VHE/non-VHE differences. Let's move the whole thing to C, including the workaround for erratum 834220, and just pa

[PATCH v2 10/21] arm64: KVM: VHE: Split save/restore of sysregs shared between EL1 and EL2

2016-01-25 Thread Marc Zyngier
A handful of system registers are still shared between EL1 and EL2, even while using VHE. These are tpidr*_el[01], actlr_el1, sp0, elr, and spsr. In order to facilitate the introduction of a VHE-specific sysreg save/restore, make move the access to these registers to their own save/restore functio

[PATCH] clk: st: avoid uninitialized variable use

2016-01-25 Thread Arnd Bergmann
My previous patch fixed some warnings about printing a couple of variables that are always uninitialized in quadfs_pll_fs660c32_set_rate(), but I now got a warning that only shows up in some configurations (i.e. without gcc -Os) about the params.ndiv being used uninitialized in the error case: dri

[PATCH v2 15/21] arm64: KVM: VHE: Use unified sysreg accessors for timer

2016-01-25 Thread Marc Zyngier
Switch the timer code to the unified sysreg accessors. Signed-off-by: Marc Zyngier --- arch/arm64/kvm/hyp/timer-sr.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/arm64/kvm/hyp/timer-sr.c b/arch/arm64/kvm/hyp/timer-sr.c index 1051e5d..f276d9e 100644 --- a/ar

[PATCH v2 18/21] arm64: KVM: Introduce hyp_alternate_value helper

2016-01-25 Thread Marc Zyngier
We already have hyp_alternate_select() to define a function pointer that gets changed by a kernel feature or workaround. It would be useful to have a similar feature that resolves in a direct value, without requiring a function call. For this purpose, introduce hyp_alternate_value(), which returns

[PATCH v2 06/21] arm64: KVM: VHE: Patch out use of HVC

2016-01-25 Thread Marc Zyngier
With VHE, the host never issues an HVC instruction to get into the KVM code, as we can simply branch there. Use runtime code patching to simplify things a bit. Signed-off-by: Marc Zyngier --- arch/arm64/kvm/hyp.S | 7 +++ arch/arm64/kvm/hyp/hyp-entry.S | 38 ++

[PATCH] regulator: return NULL for dummy bulk_get operation

2016-01-25 Thread Arnd Bergmann
Drivers that call regulator_bulk_get or devm_regulator_bulk_get when CONFIG_REGULATOR is disabled see the function return successfully, but cannot use the "consumer" pointers that are meant to be returned from the functions, as the values are uninitialized. Gcc warns about this: drivers/usb/phy/ph

net/irda: use-after-free in ircomm_param_request

2016-01-25 Thread Dmitry Vyukov
Hello, I've hit the following use-after-free report while running syzkaller fuzzer: == BUG: KASAN: use-after-free in ircomm_param_request+0x514/0x570 at addr 880035732c78 Read of size 4 by task syz-executor/10736

[PATCH] irqchip: s3c24xx: mark init_eint as __maybe_unused

2016-01-25 Thread Arnd Bergmann
The init_eint array in the s3c24xx irqchip driver is used by every individual chip variant, but Kconfig allows building the driver when they are all disabled, and that leads to a harmless compile-time warning: drivers/irqchip/irq-s3c24xx.c:608:28: error: 'init_eint' defined but not used [-Werror=

[PATCH] pcmcia: badge4: avoid unused function warning

2016-01-25 Thread Arnd Bergmann
The pcmv_setup is only used when the badge4 driver is built-in, but not when it is a loadable module: drivers/pcmcia/sa_badge4.c:153:122: error: 'pcmv_setup' defined but not used [-Werror=unused-function] This adds an #ifdef to avoid the definition of the unused function in the modular case.

Re: BUG: Asus laptop, null pointer dereference

2016-01-25 Thread Heinz Diehl
On 25.01.2016, Heinz Diehl wrote: > [4.056862] asus_laptop:model detected > [4.058731] BUG: unable to handle kernel NULL pointer dereference at > 0e20 > [4.060018] IP: [] asus_sysfs_is_visible+0x13/0x1d0 > [asus_laptop] > [4.061346] PGD 0 > [4.062629] Oops:

[PATCH] stm: add proper dependencies on the subsystem

2016-01-25 Thread Arnd Bergmann
As several people have pointed out, the Kconfig dependencies for stm are confusing, because you can enable the individual features even when the subsystem itself is disabled. It turns out that randconfig tests even show the a build-time bug because of this: drivers/hwtracing/stm/built-in.o: In fu

[PATCH] pinctrl: nomadik: hide unused functions

2016-01-25 Thread Arnd Bergmann
The nomadik pinctrl driver has two functions that are only used for debugfs output and are otherwise unused: drivers/pinctrl/nomadik/pinctrl-abx500.c:194:12: error: 'abx500_get_pull_updown' defined but not used drivers/pinctrl/nomadik/pinctrl-abx500.c:471:12: error: 'abx500_get_mode' defined but

Re: [PATCH v3 13/17] ARM: Xen: Document UEFI support on Xen ARM virtual platforms

2016-01-25 Thread Mark Rutland
On Mon, Jan 25, 2016 at 03:50:52PM +, Stefano Stabellini wrote: > On Sat, 23 Jan 2016, Shannon Zhao wrote: > > From: Shannon Zhao > > > > Add a "uefi" node under /hypervisor node in FDT, then Linux kernel could > > scan this to get the UEFI information. > > > > Signed-off-by: Shannon Zhao >

[PATCH] ubsan: fix tree-wide -Wmaybe-uninitialized false positives

2016-01-25 Thread Andrey Ryabinin
-fsanitize=* options makes GCC less smart than usual and increase number of 'maybe-uninitialized' false-positives. So this patch does two things: * Add -Wno-maybe-uninitialized to CFLAGS_UBSAN which will disable all such warnings for instrumented files. * Remove CONFIG_UBSAN_SANITIZE_ALL from

[PATCH v2 17/21] arm64: KVM: VHE: Add alternative panic handling

2016-01-25 Thread Marc Zyngier
As the kernel fully runs in HYP when VHE is enabled, we can directly branch to the kernel's panic() implementation, and not perform an exception return. Add the alternative code to deal with this. Signed-off-by: Marc Zyngier --- arch/arm64/kvm/hyp/switch.c | 35 +++--

Re: [PATCH] brcmfmac: sdio: Increase the default timeouts a bit

2016-01-25 Thread Sjoerd Simons
On Mon, 2016-01-25 at 16:36 +0100, Arend van Spriel wrote: > On 25-01-16 11:47, Sjoerd Simons wrote: > > On a Radxa Rock2 board with a Ampak AP6335 (Broadcom 4339 core) it > > seems > > the card responds very quickly most of the time, unfortunately > > during > > initialisation it sometimes seems t

[PATCH v4 14/22] ring_buffer: Convert benchmark kthreads into kthread worker API

2016-01-25 Thread Petr Mladek
Kthreads are currently implemented as an infinite loop. Each has its own variant of checks for terminating, freezing, awakening. In many cases it is unclear to say in which state it is and sometimes it is done a wrong way. The plan is to convert kthreads into kthread_worker or workqueues API. It a

[PATCH] char: nwbutton: avoid unused variable warning

2016-01-25 Thread Arnd Bergmann
When CONFIG_NWBUTTON_REBOOT is disabled, we get a warning about an unused variable: drivers/char/nwbutton.c:37:12: warning: 'reboot_count' defined but not used [-Wunused-variable] static int reboot_count = NUM_PRESSES_REBOOT; /* Number of presses to reboot */ Using if(IS_ENABLED()) instead of #

[PATCH v2 14/21] arm64: KVM: VHE: Implement VHE activate/deactivate_traps

2016-01-25 Thread Marc Zyngier
Running the kernel in HYP mode requires the HCR_E2H bit to be set at all times, and the HCR_TGE bit to be set when running as a host (and cleared when running as a guest). At the same time, the vector must be set to the current role of the kernel (either host or hypervisor), and a couple of system

Re: Regression in v4.5-rc1, bisected to commit 39bfcd5235e0 ("drm/i915: more virtual south bridge detection")

2016-01-25 Thread Bruno Wolff III
On Mon, Jan 25, 2016 at 03:52:25 +0100, Bjørn Mork wrote: Hello, my oldish Thinkpad X301 only wanted to show a blank screen in v4.5-rc1. Bisecting resulted in: drm/i915: more virtual south bridge detection I am likely seeing the same problem on a Dell laptop. I haven't finished my bisec

[PATCH v2 13/21] arm64: KVM: VHE: Make __fpsimd_enabled VHE aware

2016-01-25 Thread Marc Zyngier
As non-VHE and VHE have different ways to express the trapping of FPSIMD registers to EL2, make __fpsimd_enabled a patchable predicate and provide a VHE implementation. Signed-off-by: Marc Zyngier --- arch/arm64/kvm/hyp/hyp.h| 5 + arch/arm64/kvm/hyp/switch.c | 19 +++ 2

[PATCH] kprobes: make wait_for_kprobe_optimizer as __maybe_unused

2016-01-25 Thread Arnd Bergmann
wait_for_kprobe_optimizer is only used when CONFIG_SYSCTL or CONFIG_DEBUG_FS is enabled, otherwise we get a build warning kernel/kprobes.c:566:13: error: 'wait_for_kprobe_optimizer' defined but not used [-Werror=unused-function] This marks the function as __maybe_unused to shut up that warning.

[PATCH v2 07/21] arm64: KVM: VHE: Patch out kern_hyp_va

2016-01-25 Thread Marc Zyngier
The kern_hyp_va macro is pretty meaninless with VHE, as there is only one mapping - the kernel one. In order to keep the code readable and efficient, use runtime patching to replace the 'and' instruction used to compute the VA with a 'nop'. Signed-off-by: Marc Zyngier --- arch/arm64/include/asm

Re: [PATCH v7 05/10] mfd: axp20x: Split the driver into core and i2c bits

2016-01-25 Thread Lee Jones
On Wed, 13 Jan 2016, Chen-Yu Tsai wrote: > The axp20x driver assumes the device is i2c based. This is not the > case with later chips, which use a proprietary 2 wire serial bus > by Allwinner called "Reduced Serial Bus". > > This patch follows the example of mfd/wm831x and splits it into > an int

[PATCH v2 08/21] arm64: KVM: VHE: Introduce unified system register accessors

2016-01-25 Thread Marc Zyngier
VHE brings its own bag of new system registers, or rather system register accessors, as it define new ways to access both guest and host system registers. For example, from the host: - The host TCR_EL2 register is accessed using the TCR_EL1 accessor - The guest TCR_EL1 register is accessed using t

[PATCH 1/2] memory: tegra: mc: Add missing of_node_put

2016-01-25 Thread Amitoj Kaur Chawla
for_each_child_of_node performs an of_node_get on each iteration, so to break out of the loop an of_node_put is required. Found using Coccinelle. The semantic patch used for this is as follows: // @@ expression e; local idexpression n; @@ for_each_child_of_node(..., n) { ... when != of_node

[PATCH] mfd: db8500: avoid uninitialized variable reference

2016-01-25 Thread Arnd Bergmann
The prcmu_config_clkout() function ensures that the 'clkout' argument can only be '0' or '1' using an appropriate BUG_ON(), so the compiler should know that the div_mask, mask, and bits variables are always initialized later on. However, it doesn't understand this in gcc-5.2 and produces a false po

Re: [PATCH v7 07/10] mfd: axp20x: Add support for RSB based AXP223 PMIC

2016-01-25 Thread Lee Jones
On Wed, 13 Jan 2016, Chen-Yu Tsai wrote: > The AXP223 is a new PMIC commonly paired with Allwinner A23/A33 SoCs. > It is functionally identical to AXP221; only the regulator default > voltage/status and the external host interface are different. > > Signed-off-by: Chen-Yu Tsai > --- > > Changes

[PATCH] clocksource: select CLKSRC_MMIO where needed

2016-01-25 Thread Arnd Bergmann
The Tegra clocksource implementation uses the clocksource_mmio helper functions, but currently can be configured without them, which fails: drivers/clocksource/built-in.o: In function `tegra20_init_timer': :(.init.text+0xac): undefined reference to `clocksource_mmio_init' :(.init.text+0x140): unde

[PATCH v2 00/21] arm64: Virtualization Host Extension support

2016-01-25 Thread Marc Zyngier
ARMv8.1 comes with the "Virtualization Host Extension" (VHE for short), which enables simpler support of Type-2 hypervisors. This extension allows the kernel to directly run at EL2, and significantly reduces the number of system registers shared between host and guest, reducing the overhead of vir

[PATCH v2 04/21] arm64: KVM: Skip HYP setup when already running in HYP

2016-01-25 Thread Marc Zyngier
With the kernel running at EL2, there is no point trying to configure page tables for HYP, as the kernel is already mapped. Take this opportunity to refactor the whole init a bit, allowing the various parts of the hypervisor bringup to be split across multiple functions. Signed-off-by: Marc Zyngi

3.14 stable regression don't remove from shrink list in select_collect()

2016-01-25 Thread Shawn Bohrer
I recently updated some machines to 3.14.58 and they reliably get soft lockups. Sometimes the soft lockup recovers and some times it does not. I've bisected this on the 3.14 stable branch and arrived at: c214cb82cdc744225d85899fc138251527f75fff don't remove from shrink list in select_collect()

[PATCH] watchdog: imgdpc: select WATCHDOG_CORE

2016-01-25 Thread Arnd Bergmann
The imgpdc_wdt driver can be built on all architectures with CONFIG_COMPILE_TEST, but fails if no other watchdog driver is enabled: drivers/watchdog/built-in.o: In function `pdc_wdt_remove': imgpdc_wdt.c:(.text+0x74): undefined reference to `watchdog_unregister_device' This adds the normal 'selec

[PATCH 2/2] memory: tegra: tegra124-emc: Add missing of_node_put

2016-01-25 Thread Amitoj Kaur Chawla
for_each_child_of_node performs an of_node_get on each iteration, so to break out of the loop an of_node_put is required. Found using Coccinelle. The semantic patch used for this is as follows: // @@ expression e; local idexpression n; @@ for_each_child_of_node(..., n) { ... when != of_node

[PATCH v2 03/21] arm64: Add ARM64_HAS_VIRT_HOST_EXTN feature

2016-01-25 Thread Marc Zyngier
Add a new ARM64_HAS_VIRT_HOST_EXTN features to indicate that the CPU has the ARMv8.1 VHE capability. This will be used to trigger kernel patching in KVM. Signed-off-by: Marc Zyngier --- arch/arm64/include/asm/cpufeature.h | 3 ++- arch/arm64/kernel/cpufeature.c | 15 +-- 2 fil

[PATCH v2 11/21] arm64: KVM: VHE: Use unified system register accessors

2016-01-25 Thread Marc Zyngier
Use the recently introduced unified system register accessors for those sysregs that behave differently depending on VHE being in use or not. Signed-off-by: Marc Zyngier --- arch/arm64/kvm/hyp/sysreg-sr.c | 84 +- 1 file changed, 42 insertions(+), 42 delet

Re: [PATCH v2 3/4] mfd: menf21bmc: Add additional sysfs entries for BMC status information

2016-01-25 Thread Lee Jones
On Mon, 11 Jan 2016, Andreas Werner wrote: > This patch adds additional sysfs entries to provide status > information to the userland. > > The following informations are now provided: > - Get operation hours counter > - Get board slot address > - Get powercycle counter >

[PATCH v4 11/22] kthread: Better support freezable kthread workers

2016-01-25 Thread Petr Mladek
This patch allows to make kthread worker freezable via a new @flags parameter. It will allow to avoid an init work in some kthreads. It currently does not affect the function of kthread_worker_fn() but it might help to do some optimization or fixes eventually. I currently do not know about any ot

[PATCH v4 04/22] kthread: Add create_kthread_worker*()

2016-01-25 Thread Petr Mladek
Kthread workers are currently created using the classic kthread API, namely kthread_run(). kthread_worker_fn() is passed as the @threadfn parameter. This patch defines create_kthread_worker() and create_kthread_worker_on_cpu() functions that hide implementation details. They enforce using kthread

Re: [PATCH 2/3] mfd: lpc_ich: use a correct mask for the GPIO base address

2016-01-25 Thread Peter Tyser
On Mon, 2016-01-25 at 12:44 +, Lee Jones wrote: > On Sat, 23 Jan 2016, Antoine Tenart wrote: > > > The GPIO base address is read from the GPIOBASE register. The first > > bit must be cleared as it can be hardwired to 1 to represent the i/o > > space. Other bits are either containing the base

Re: [PATCH v1 04/12] xen/hvmlite: Bootstrap HVMlite guest

2016-01-25 Thread Boris Ostrovsky
On 01/22/2016 06:32 PM, Luis R. Rodriguez wrote: On Fri, Jan 22, 2016 at 04:35:50PM -0500, Boris Ostrovsky wrote: +/* + * This routine (and those that it might call) should not use + * anything that lives in .bss since that segment will be cleared later + */ +void __init xen_prepare_hvmlite(voi

[PATCH v4 02/22] kthread/smpboot: Do not park in kthread_create_on_cpu()

2016-01-25 Thread Petr Mladek
kthread_create_on_cpu() was added by the commit 2a1d446019f9a5983e ("kthread: Implement park/unpark facility"). It is currently used only when enabling new CPU. For this purpose, the newly created kthread has to be parked. The CPU binding is a bit tricky. The kthread is parked when the CPU has not

[PATCH v4 09/22] kthread: Allow to cancel kthread work

2016-01-25 Thread Petr Mladek
We are going to use kthread workers more widely and sometimes we will need to make sure that the work is neither pending nor running. This patch implements cancel_*_sync() operations as inspired by workqueues. Well, we are synchronized against the other operations via the worker lock, we use del_t

Re: [PATCH v2 1/4] mfd: menf21bmc: Remove auto exiting of production mode and add sysfs interface

2016-01-25 Thread Lee Jones
On Mon, 11 Jan 2016, Andreas Werner wrote: > Changed "exit production mode" from automatic exiting to > manually using the sysfs interface. > > If the driver exit the production mode automatically, the board will > not start anymore if the bootloader does not already have the "BIOS life sign" > f

[PATCH v4 05/22] kthread: Add drain_kthread_worker()

2016-01-25 Thread Petr Mladek
flush_kthread_worker() returns when the currently queued works are proceed. But some other works might have been queued in the meantime. This patch adds drain_kthread_work() that is inspired by drain_workqueue(). It returns when the queue is completely empty and warns when it takes too long. The

Re: [PATCH 0/3] ACPI: parse the SPCR table

2016-01-25 Thread Peter Hurley
On 01/25/2016 03:45 AM, Aleksey Makarov wrote: > This patchset is based on the patchset by Leif Lindholm [1] > > 'ARM Server Base Boot Requirements' [2] mention SPCR > (Serial Port Console Redirection Table) [3] as a mandatory > ACPI table that specifies the configuration of serial console. > >

[PATCH v4 07/22] kthread: Detect when a kthread work is used by more workers

2016-01-25 Thread Petr Mladek
Nothing currently prevents a work from queuing for a kthread worker when it is already running on another one. This means that the work might run in parallel on more workers. Also some operations, e.g. flush or drain are not reliable. This problem will be even more visible after we add cancel_kthr

[PATCH v4 08/22] kthread: Initial support for delayed kthread work

2016-01-25 Thread Petr Mladek
We are going to use kthread_worker more widely and delayed works will be pretty useful. The implementation is inspired by workqueues. It uses a timer to queue the work after the requested delay. If the delay is zero, the work is queued immediately. In compare with workqueues, each work is associa

Re: tty: kmalloc size WARNING in vc_do_resize

2016-01-25 Thread One Thousand Gnomes
> I think that either the kmalloc should use __GFP_NOWARN or > vc_do_resize should do stricter size check. vc_do_resize doesn't know enough to do a stricter size check. There are not many methods it calls but those are: vgacon_resize doesn't error when stupid things happen because of a silly hack

[PATCH net-next] hv_netvsc: Fix book keeping of skb during batching process

2016-01-25 Thread Haiyang Zhang
Since eliminating send_completion_tid from struct hv_netvsc_packet, we haven't add proper book keeping for the skb of the batched packet. This patch fixes this issue and allows the previous skb is properly freed. Otherwise, a panic may happen. Thanks to Simon Xiao for bisecting and analysis. Sign

[PATCH v2] gpio: Add driver for TI TPIC2810

2016-01-25 Thread Andrew F. Davis
Add driver for TI TPIC2810 8-Bit LED Driver with I2C Interface. The TPIC2810 has 8 open-drain outputs that can but used to drive LEDs and other low-side switched resistive loads. Signed-off-by: Andrew F. Davis --- Changes from v1: - Added OF match table at Javier Martinez Canillas request dri

Re: [PATCH v3 2/4] KVM: x86: Use vector-hashing to deliver lowest-priority interrupts

2016-01-25 Thread Paolo Bonzini
On 25/01/2016 16:20, Radim Krcmár wrote: > 2016-01-25 13:25+0100, Paolo Bonzini: >> On 22/01/2016 15:01, Radim Krcmár wrote: for (i = 0; i <= mod; i++) { idx = find_next_bit(bitmap, bitmap_size, idx + 1); BUG_ON(idx == bitmap_size);

[PATCH] mm/memcontrol: avoid a spurious gcc warning

2016-01-25 Thread Arnd Bergmann
When CONFIG_DEBUG_VM is set, the various VM_BUG_ON() confuse gcc to the point where it cannot remember that 'memcg' is known to be initialized: mm/memcontrol.c: In function 'mem_cgroup_can_attach': mm/memcontrol.c:4791:9: warning: 'memcg' may be used uninitialized in this function [-Wmaybe-uninit

Re: [PATCH 1/3] printk: make preferred_console local static bool

2016-01-25 Thread Peter Hurley
On 01/25/2016 05:28 AM, Aleksey Makarov wrote: > > > On 25.01.2016 19:23, Joe Perches wrote: >> On Mon, 2016-01-25 at 18:51 +0600, Aleksey Makarov wrote: >>> >>> On 25.01.2016 18:45, Joe Perches wrote: On Mon, 2016-01-25 at 17:45 +0600, Aleksey Makarov wrote: > The variable preferred_con

Re: net/sctp: out-of-bounds access in sctp_add_bind_addr

2016-01-25 Thread Neil Horman
On Mon, Jan 25, 2016 at 12:48:02PM -0200, Marcelo Ricardo Leitner wrote: > On Mon, Jan 25, 2016 at 03:42:14PM +0100, Dmitry Vyukov wrote: > > On Mon, Jan 25, 2016 at 3:31 PM, Neil Horman wrote: > > > On Mon, Jan 25, 2016 at 03:02:38PM +0100, Dmitry Vyukov wrote: > > >> Hello, > > >> > > >> I've gi

Re: [PATCH v3] perf/x86/amd/power: Add AMD accumulated power reporting mechanism

2016-01-25 Thread Huang Rui
On Mon, Jan 25, 2016 at 12:13:05PM +0100, Peter Zijlstra wrote: > On Mon, Jan 25, 2016 at 04:32:03PM +0800, Huang Rui wrote: > > +struct power_pmu { > > + raw_spinlock_t lock; > > + struct list_headactive_list; > > Maybe a dumb question, but what is that list for? > > You onl

[PATCH] rtc: mt6397: add IRQ domain dependency

2016-01-25 Thread Arnd Bergmann
The mt6397 RTC driver can be built either when the MFD_MT6397 driver is enabled (which selects IRQ_DOMAIN), or when compile testing. The latter however fails without IRQ domains: drivers/rtc/rtc-mt6397.c: In function 'mtk_rtc_probe': drivers/rtc/rtc-mt6397.c:326:13: error: implicit declaration of

Re: [PATCH v3 13/17] ARM: Xen: Document UEFI support on Xen ARM virtual platforms

2016-01-25 Thread Stefano Stabellini
On Mon, 25 Jan 2016, Mark Rutland wrote: > On Mon, Jan 25, 2016 at 03:50:52PM +, Stefano Stabellini wrote: > > On Sat, 23 Jan 2016, Shannon Zhao wrote: > > > From: Shannon Zhao > > > > > > Add a "uefi" node under /hypervisor node in FDT, then Linux kernel could > > > scan this to get the UEFI

[PATCH v2 02/21] arm64: Allow the arch timer to use the HYP timer

2016-01-25 Thread Marc Zyngier
With the ARMv8.1 VHE, the kernel can run in HYP mode, and thus use the HYP timer instead of the normal guest timer in a mostly transparent way, except for the interrupt line. This patch reworks the arch timer code to allow the selection of the HYP PPI, possibly falling back to the guest timer if n

Re: [PATCH] watchdog: imgdpc: select WATCHDOG_CORE

2016-01-25 Thread James Hogan
On Mon, Jan 25, 2016 at 05:06:27PM +0100, Arnd Bergmann wrote: > The imgpdc_wdt driver can be built on all architectures with > CONFIG_COMPILE_TEST, but fails if no other watchdog driver is > enabled: > > drivers/watchdog/built-in.o: In function `pdc_wdt_remove': > imgpdc_wdt.c:(.text+0x74): undef

Re: [PATCH v2 00/21] arm64: Virtualization Host Extension support

2016-01-25 Thread Arnd Bergmann
On Monday 25 January 2016 15:53:34 Marc Zyngier wrote: > host and guest, reducing the overhead of virtualization. > > In order to have the same kernel binary running on all versions of the > architecture, this series makes heavy use of runtime code patching. > > The first 20 patches massage the K

Re: net/sctp: out-of-bounds access in sctp_add_bind_addr

2016-01-25 Thread Marcelo Ricardo Leitner
Something like this. Builds, but UNTESTED. Uses union sizeof where possible but when reading from a buffer that is not aligned to it, like that user supplied one. Then relies on af->sockaddr_len --8<-- --- include/net/sctp/structs.h | 2 +- net/sctp/bind_addr.c | 14 -- net/sc

Re: [PATCH] stm: add proper dependencies on the subsystem

2016-01-25 Thread Alexander Shishkin
Arnd Bergmann writes: > As several people have pointed out, the Kconfig dependencies for > stm are confusing, because you can enable the individual features > even when the subsystem itself is disabled. > > It turns out that randconfig tests even show the a build-time > bug because of this: > > d

Re: [PATCH v15 5/6] fpga: fpga-area and fpga-bus: device tree control for FPGA

2016-01-25 Thread Rob Herring
On Fri, Jan 22, 2016 at 6:07 PM, Moritz Fischer wrote: > On Fri, Jan 22, 2016 at 5:37 PM, atull wrote: >> On Fri, 22 Jan 2016, Moritz Fischer wrote: >> >>> Alan, >>> >>> On Wed, Jan 20, 2016 at 8:24 PM, wrote: >>> >>> > +static int fpga_area_probe(struct platform_device *pdev) >>> > +{ >>> > +

Re: [PATCH 16/26] libceph: Use skcipher

2016-01-25 Thread Ilya Dryomov
On Sun, Jan 24, 2016 at 2:18 PM, Herbert Xu wrote: > This patch replaces uses of blkcipher with skcipher. > > Signed-off-by: Herbert Xu > --- > > net/ceph/crypto.c | 97 > +++--- > 1 file changed, 56 insertions(+), 41 deletions(-) Could you get

Re: [PATCH] irqchip: s3c24xx: mark init_eint as __maybe_unused

2016-01-25 Thread Marc Zyngier
On 25/01/16 15:58, Arnd Bergmann wrote: > The init_eint array in the s3c24xx irqchip driver is used by > every individual chip variant, but Kconfig allows building > the driver when they are all disabled, and that leads to > a harmless compile-time warning: > > drivers/irqchip/irq-s3c24xx.c:608:28

Re: Dependency issue through subdir's

2016-01-25 Thread Kieran Bingham
Hi Michal, Thanks for your fast response! On 25/01/16 13:22, Michal Marek wrote: > On 2016-01-25 12:33, Kieran Bingham wrote: >> This is functional on a make -j1 build, however at -j2 and above (from a >> clean build), kbuild attempts to generate my file before >> include/generated/timeconst.h re

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