Re: [PATCH 2/3] mtd: atmel nand: fix build warning on 64-bit

2018-07-17 Thread Miquel Raynal
Hi Boris, Boris Brezillon wrote on Tue, 17 Jul 2018 23:08:39 +0200: > On Tue, 17 Jul 2018 23:05:23 +0200 > Miquel Raynal wrote: > > > Hi Arnd, > > > > Arnd Bergmann wrote on Fri, 13 Jul 2018 12:16:09 +0200: > > > > > On Fri, Jul 13, 2018 at 11:56 AM, Tudor Ambarus > > > wrote: > > >

[PATCH v8 5/7] thermal: tsens: Rename tsens-8996 to tsens-v2 for reuse

2018-07-17 Thread Amit Kucheria
The TSENS block inside the 8996 is internally classified as version 2 of the IP. Several other SoC families use this block and can share this code. We rename get_temp() to reflect that it can be used across the v2 family. Signed-off-by: Amit Kucheria Reviewed-by: Bjorn Andersson Tested-by: Matt

[PATCH v8 7/7] arm64: dts: sdm845: Add tsens nodes

2018-07-17 Thread Amit Kucheria
SDM845 has two tsens blocks, one with 13 sensors and the other with 8 sensors. It uses version 2 of the TSENS IP, so use the fallback property to allow more common code. Signed-off-by: Amit Kucheria Reviewed-by: Bjorn Andersson Tested-by: Matthias Kaehlcke Reviewed-by: Matthias Kaehlcke Review

[PATCH v8 6/7] thermal: tsens: Add generic support for TSENS v2 IP

2018-07-17 Thread Amit Kucheria
SDM845 uses v2 of the TSENS IP block but the get_temp() function appears to be identical across v2.x.y in code seen so far. We use the generic get_temp() function defined as part of ops_generic_v2. Signed-off-by: Amit Kucheria Reviewed-by: Bjorn Andersson Tested-by: Matthias Kaehlcke Reviewed-b

[PATCH v8 4/7] arm64: dts: msm8996: thermal: Initialise via DT and add second controller

2018-07-17 Thread Amit Kucheria
We also split up the regmap address space into two, for the TM and SROT registers. This was required to deal with different address offsets for the TM and SROT registers across different SoC families. 8996 has two TSENS IP blocks, initialise the second one too. Since tsens-common.c/init_common()

[PATCH v8 2/7] dt: thermal: tsens: Document the fallback DT property for v2 of TSENS IP

2018-07-17 Thread Amit Kucheria
We want to create common code for v2 of the TSENS IP block that is used in a large number of Qualcomm SoCs. "qcom,tsens-v2" should be able to handle most of the common functionality start with a common get_temp() function. It is also necessary to split out the memory regions for the TM and SROT re

[PATCH v8 3/7] thermal: tsens: Add support to split up register address space into two

2018-07-17 Thread Amit Kucheria
There are two banks of registers for v2 TSENS IPs: SROT and TM. On older SoCs these were contiguous, leading to DTs mapping them as one register address space of size 0x2000. In newer SoCs, these two banks are not contiguous anymore. Add logic to init_common() to differentiate between old and new

[PATCH v8 0/7] thermal: tsens: Refactoring for TSENSv2 IP

2018-07-17 Thread Amit Kucheria
Here is a repost of the series. There have been no code changes since v6, just improving comments, patch descriptions, documentation. The series does the following: - Some code moves to allow code sharing between different SoCs with v2 of the TSENS IP, - a generic qcom,tsens-v2 property as a fall

Re: [PATCH v7 5/7] dt: thermal: tsens: Document the fallback DT property for v2 of TSENS IP

2018-07-17 Thread Amit Kucheria
On Wed, Jul 18, 2018 at 5:39 AM, Matthias Kaehlcke wrote: > On Thu, Jul 12, 2018 at 02:09:06PM +0530, Amit Kucheria wrote: >> We want to create common code for v2 of the TSENS IP block that is used in >> a large number of Qualcomm SoCs. "qcom,tsens-v2" should be able to handle >> most of the commo

[PATCH v8 1/7] thermal: tsens: Get rid of unused fields in structure

2018-07-17 Thread Amit Kucheria
status_field and trdy are unused in any of the tsens drivers. Remove them. Signed-off-by: Amit Kucheria Reviewed-by: Bjorn Andersson Acked-by: Rajendra Nayak Tested-by: Matthias Kaehlcke --- drivers/thermal/qcom/tsens.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/thermal/qcom

WARNING: kmalloc bug in vfs_getxattr_alloc

2018-07-17 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:1dcbe5f2c615 Add linux-next specific files for 20180717 git tree: linux-next console output: https://syzkaller.appspot.com/x/log.txt?x=12158f7040 kernel config: https://syzkaller.appspot.com/x/.config?x=ea5926dddb0db97a

Re: [PATCH 4.17 0/1] 4.17.8-stable review

2018-07-17 Thread Greg Kroah-Hartman
On Tue, Jul 17, 2018 at 08:50:11AM -0700, Guenter Roeck wrote: > On Tue, Jul 17, 2018 at 01:47:59PM +0200, Greg Kroah-Hartman wrote: > > This is the start of the stable review cycle for the 4.17.8 release. > > There are 1 patches in this series, all will be posted as a response > > to this one. If

Re: [PATCH] Revert "ata: ahci_platform: convert kcalloc to devm_kcalloc"

2018-07-17 Thread Marcel Ziswiler
On Tue, 2018-07-17 at 13:57 +0300, Mikko Perttunen wrote: > Thanks! Yes, that fixes Apalis TK1 crashing as of late as well. > Reviewed-by: Mikko Perttunen Tested-by: Marcel Ziswiler > On 17.07.2018 13:49, Corentin Labbe wrote: > > Since ahci_platform_put_resources() use target_pwrs after "dev

Re: Linux 4.17.8

2018-07-17 Thread Greg KH
diff --git a/Makefile b/Makefile index 5c9f331f29c0..7cc36fe18dbb 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 4 PATCHLEVEL = 17 -SUBLEVEL = 7 +SUBLEVEL = 8 EXTRAVERSION = NAME = Merciless Moray diff --git a/include/linux/mm.h b/include/li

Linux 4.17.8

2018-07-17 Thread Greg KH
I'm announcing the release of the 4.17.8 kernel. This is to fix the i386 issue that was in the 4.17.7 release. All should be fine now. The updated 4.17.y git tree can be found at: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.17.y and can be browsed at th

[v9fs] Pull request for linux-next

2018-07-17 Thread Dominique Martinet
I'd like to request that you add the following tree to linux-next: git://github.com/martinetd/linux 9p-next 9p has seen some renewal of interest recently and I'd like to help take a bit of the burden off Andrew, who suggested getting this included in linux-next here[1]. This branch contains 9p

[PATCH v2 2/2] pinctrl: berlin: add the as370 SoC pinctrl driver

2018-07-17 Thread Jisheng Zhang
Add the pin-controller driver for Synaptics AS370 SoC, with definition of its groups and functions. This uses the core Berlin pinctrl driver. Signed-off-by: Jisheng Zhang --- drivers/pinctrl/berlin/Kconfig | 5 + drivers/pinctrl/berlin/Makefile| 1 + drivers/pinctrl/berlin/pi

Re: [PATCH 1/5] thermal: exynos: enable core tmu clk on exynos platform

2018-07-17 Thread Krzysztof Kozlowski
On 17 July 2018 at 22:23, Anand Moon wrote: > Hi Krzysztof > > On 17 July 2018 at 17:50, Krzysztof Kozlowski wrote: >> Hi Anand, >> >> Thanks for patch. >> >> On 17 July 2018 at 12:12, Anand Moon wrote: >>> clk_summary do not show tmu_apbif clk enable, so replace >>> the clk_prepare with clk_pre

Re: [PATCH] power: supply: max77693_charger: fix unintentional fall-through

2018-07-17 Thread Krzysztof Kozlowski
On 17 July 2018 at 23:47, Gustavo A. R. Silva wrote: > It seems that a *break* is missing in order to avoid a fall-through. > Otherwise, the calculation of *data* makes no sense. > > Addresses-Coverity-ID: 1271172 ("Missing break in switch") > Fixes: 87c2d9067893 ("power: max77693: Add charger dri

[PATCH] KVM/MMU: Simplify __kvm_sync_page() function

2018-07-17 Thread Tianyu Lan
Merge check of "sp->role.cr4_pae != !!is_pae(vcpu))" and "vcpu-> arch.mmu.sync_page(vcpu, sp) == 0". kvm_mmu_prepare_zap_page() is called under both these conditions. Signed-off-by: Lan Tianyu --- arch/x86/kvm/mmu.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/arch

Re: [PATCH 14/15] arm: dts: qcom: Add missing OPP properties for CPUs

2018-07-17 Thread Viresh Kumar
On 25-05-18, 16:02, Viresh Kumar wrote: > The OPP properties, like "operating-points", should either be present > for all the CPUs of a cluster or none. If these are present only for a > subset of CPUs of a cluster then things will start falling apart as soon > as the CPUs are brought online in a d

Re: [PATCH v3 3/4] PCI: mediatek: Add system pm support for MT2712 and MT7622

2018-07-17 Thread Honghui Zhang
On Tue, 2018-07-17 at 18:15 +0100, Lorenzo Pieralisi wrote: > [+Rafael, Kevin, Ulf] > > On Mon, Jul 02, 2018 at 03:57:43PM +0800, honghui.zh...@mediatek.com wrote: > > From: Honghui Zhang > > > > The MTCMOS of PCIe Host for MT2712 and MT7622 will be off when system > > suspend, and all the inter

[PATCH v2 1/2] dt-binding: pinctrl: berlin: document AS370 SoC pinctrl

2018-07-17 Thread Jisheng Zhang
Add as370 to existing berlin pinctrl device tree binding. Signed-off-by: Jisheng Zhang --- Documentation/devicetree/bindings/pinctrl/berlin,pinctrl.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/pinctrl/berlin,pinctrl.txt b/Documentat

[PATCH v2 0/2] pinctrl: berlin: add as370 SoC support

2018-07-17 Thread Jisheng Zhang
This series is to add the Synaptics AS370 SoC pinctrl driver. since v1: - remove MODULE_DEVICE_TABLE since the driver is non-modular. Thank kbuild test robot to report this issue. Jisheng Zhang (2): dt-binding: pinctrl: berlin: document AS370 SoC pinctrl pinctrl: berlin: add the as370 SoC

Re: [PATCH 3/6] arm64: dts: hisilicon: Add missing cooling device properties for CPUs

2018-07-17 Thread Viresh Kumar
On 26-05-18, 19:21, Wei Xu wrote: > Hi Viresh, > > On 2018/5/26 19:00, Wei Xu wrote: > > Hi Viresh, > > > > On 2018/5/25 6:40, Viresh Kumar wrote: > >> The cooling device properties, like "#cooling-cells" and > >> "dynamic-power-coefficient", should either be present for all the CPUs > >> of a cl

Re: [PATCH V3 11/16] cpufreq: dt: Pass regulator name to the OPP core

2018-07-17 Thread Viresh Kumar
On 17-07-18, 09:46, Geert Uytterhoeven wrote: > Hi Viresh, > > CC device-tree folks > > Replying to an old email, because that's the most accurate reference I > could find. > > On Tue, Feb 9, 2016 at 6:06 AM Viresh Kumar wrote: > > OPP core can handle the regulators by itself, and but it needs

Re: [PATCH v6 2/2] cpufreq: qcom-hw: Add support for QCOM cpufreq HW driver

2018-07-17 Thread Viresh Kumar
On 18-07-18, 11:07, Taniya Das wrote: > +static int qcom_cpu_resources_init(struct platform_device *pdev, > +struct device_node *np, unsigned int cpu, > +unsigned long xo_rate) > +{ > + struct cpufreq_qcom *c; > + struct resour

Re: [PATCH] x86/boot: Fix if_changed build flip/flop

2018-07-17 Thread Masahiro Yamada
2018-07-16 7:58 GMT+09:00 Ingo Molnar : > > * Kees Cook wrote: > >> The if_changed kbuild function can only be used once per target. If not >> it will effectively always trigger, flipping back and forth between the >> two commands getting recorded. Instead, merge the two commands into a >> single

[PATCH v6 2/2] cpufreq: qcom-hw: Add support for QCOM cpufreq HW driver

2018-07-17 Thread Taniya Das
The CPUfreq HW present in some QCOM chipsets offloads the steps necessary for changing the frequency of CPUs. The driver implements the cpufreq driver interface for this hardware engine. Signed-off-by: Saravana Kannan Signed-off-by: Taniya Das --- drivers/cpufreq/Kconfig.arm | 11 ++ dri

[PATCH v6 0/2] cpufreq: qcom-hw: Add support for QCOM cpufreq HW driver

2018-07-17 Thread Taniya Das
[v6] * Renamed match table 'qcom_cpufreq_hw_match'. * Renamed 'qcom_read_lut' to 'qcom_cpufreq_hw_read_lut'. * Updated the logic to check for related CPUs at the beginning of the 'qcom_cpu_resources_init'. * Use devm_ioremap_resource instead of devm_ioremap. * Update the use of of_node_put

[PATCH v6 1/2] dt-bindings: cpufreq: Introduce QCOM CPUFREQ Firmware bindings

2018-07-17 Thread Taniya Das
Add QCOM cpufreq firmware device bindings for Qualcomm Technology Inc's SoCs. This is required for managing the cpu frequency transitions which are controlled by the hardware engine. Signed-off-by: Taniya Das --- .../bindings/cpufreq/cpufreq-qcom-hw.txt | 172 + 1 f

Re: [PATCH v5 2/2] cpufreq: qcom-hw: Add support for QCOM cpufreq HW driver

2018-07-17 Thread Taniya Das
Hello Stephen, Thanks for the review comments. On 7/13/2018 5:14 AM, Stephen Boyd wrote: Quoting Taniya Das (2018-07-12 11:05:45) The CPUfreq HW present in some QCOM chipsets offloads the steps necessary for changing the frequency of CPUs. The driver implements the cpufreq driver interface for

Re: [PATCH 05/14] dmaengine: dma-jz4780: Add support for the JZ4740 SoC

2018-07-17 Thread Vinod
On 17-07-18, 11:40, Rob Herring wrote: > On Tue, Jul 17, 2018 at 9:34 AM Vinod wrote: > > > > On 16-07-18, 15:33, Rob Herring wrote: > > > On Mon, Jul 09, 2018 at 10:42:26PM +0530, Vinod wrote: > > > > On 03-07-18, 14:32, Paul Cercueil wrote: > > > > > > > > > enum jz_version { > > > > > + ID_JZ4

Re: 4.18.0-rc1-next-20180619 boot failed on beagle board x15

2018-07-17 Thread Keerthy
On Tuesday 17 July 2018 01:33 PM, Tony Lindgren wrote: > * Stephen Rothwell [180717 08:03]: >> Hi Tony, >> >> On Mon, 16 Jul 2018 23:08:08 -0700 Tony Lindgren wrote: >>> >>> The following regression is still pending in next, see below. >>> >>> * Samuel Morris [180702 13:35]: On Mon, Jul

Re: [PATCH] cpufreq: qcom-kryo: Silently error out on EPROBE_DEFER

2018-07-17 Thread Viresh Kumar
On 17-07-18, 22:48, Niklas Cassel wrote: > If of_nvmem_cell_get() fails due to probe deferal, we shouldn't print an > error message. Just be silent in this case. > > Signed-off-by: Niklas Cassel > --- > drivers/cpufreq/qcom-cpufreq-kryo.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions

BUG: unable to handle kernel NULL pointer dereference in corrupted (2)

2018-07-17 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:dc989d2ce2c2 tools: bpftool: don't pass FEATURES_DUMP to l.. git tree: bpf-next console output: https://syzkaller.appspot.com/x/log.txt?x=10a9a97840 kernel config: https://syzkaller.appspot.com/x/.config?x=89129667b46496c3 da

KASAN: slab-out-of-bounds Read in corrupted

2018-07-17 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:dc989d2ce2c2 tools: bpftool: don't pass FEATURES_DUMP to l.. git tree: bpf-next console output: https://syzkaller.appspot.com/x/log.txt?x=1428957840 kernel config: https://syzkaller.appspot.com/x/.config?x=89129667b46496c3 da

Re: [PATCH] security: export security_kernel_load_data function

2018-07-17 Thread James Morris
On Tue, 17 Jul 2018, Arnd Bergmann wrote: > The firmware_loader can be built as a loadable module, which now > fails when CONFIG_SECURITY is enabled, because a call to the > security_kernel_load_data() function got added, and this is > not exported to modules: > > ERROR: "security_kernel_load_dat

Re: [PATCH v5 05/11] clk: mediatek: add mt6765 clock IDs

2018-07-17 Thread Mars Cheng
Hi Matthias On Tue, 2018-07-17 at 12:24 +0200, Matthias Brugger wrote: > > On 17/07/18 10:52, Mars Cheng wrote: > > Signed-off-by: Mars Cheng > > Signed-off-by: Owen Chen > > Please provide a commit message. > > Thanks, > Matthias Got it, it is my bad, will add it. Thanks. > > > --- > > i

Re: [PATCH] drivers: fpga: fix two trivial spelling mistakes

2018-07-17 Thread Wu Hao
On Tue, Jul 17, 2018 at 10:21:38AM +0100, Colin King wrote: > From: Colin Ian King > > Trival fix to two spellling mistakes Thank you very much for this fixing. Only one minor thing here. s/Trival/Trivial/ s/spellling/spelling/ Thanks Hao > "execeeded" -> "exceeded" > "Invaild" -> "Invalid" >

Re: Showing /sys/fs/cgroup/memory/memory.stat very slow on some machines

2018-07-17 Thread Andrew Morton
(cc linux-mm) On Tue, 3 Jul 2018 08:43:23 +0200 Bruce Merry wrote: > Hi > > I've run into an odd performance issue in the kernel, and not being a > kernel dev or knowing terribly much about cgroups, am looking for > advice on diagnosing the problem further (I discovered this while > trying to p

Re: [PATCH -next] ipc/sem: prevent queue.status tearing in semop

2018-07-17 Thread Manfred Spraul
Hello Davidlohr, On 07/17/2018 07:26 AM, Davidlohr Bueso wrote: In order for load/store tearing to work, _all_ accesses to the variable in question need to be done around READ and WRITE_ONCE() macros. Ensure everyone does so for q->status variable for semtimedop(). What is the background of the

Re: [PATCH v7 01/10] counter: Introduce the Generic Counter interface

2018-07-17 Thread Andrew Morton
On Thu, 21 Jun 2018 17:07:08 -0400 William Breathitt Gray wrote: > This patch introduces the Generic Counter interface for supporting > counter devices. > +EXPORT_SYMBOL(count_direction_str); +EXPORT_SYMBOL(count_mode_str); +EXPORT_SYMBOL(counter_signal_enum_read); +EXPORT_SYMBOL(counter_signa

Re: [PATCH] net/9p/trans_virtio.c: fix some spell mistakes in comments

2018-07-17 Thread Dominique Martinet
piaojun wrote on Wed, Jul 18, 2018: > Fix spelling mistake in comments of p9_virtio_zc_request(). > > Signed-off-by: Jun Piao Thanks, queued it. > --- > net/9p/trans_virtio.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virt

[PATCH] net/9p/trans_virtio.c: fix some spell mistakes in comments

2018-07-17 Thread piaojun
Fix spelling mistake in comments of p9_virtio_zc_request(). Signed-off-by: Jun Piao --- net/9p/trans_virtio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c index c9f2717..86077f7 100644 --- a/net/9p/trans_virtio.c +++ b/net/

Re: [PATCH v7 2/7] thermal: tsens: Add support to split up register address space into two

2018-07-17 Thread Amit Kucheria
On Wed, Jul 18, 2018 at 4:59 AM Matthias Kaehlcke wrote: > > On Thu, Jul 12, 2018 at 02:09:03PM +0530, Amit Kucheria wrote: > > There are two banks of registers for v2 TSENS IPs: SROT and TM. On older > > SoCs these were contiguous, leading to DTs mapping them as one register > > address space of

Re: [PATCH v2 2/7] proc/kcore: replace kclist_lock rwlock with rwsem

2018-07-17 Thread Omar Sandoval
On Tue, Jul 17, 2018 at 08:27:53PM -0700, Andrew Morton wrote: > On Tue, 17 Jul 2018 20:24:05 -0700 Omar Sandoval wrote: > > > > > --- a/fs/proc/kcore.c > > > > +++ b/fs/proc/kcore.c > > > > @@ -59,8 +59,8 @@ struct memelfnote > > > > }; > > > > > > > > static LIST_HEAD(kclist_head); > > > >

Re: vfs / overlayfs conflict resolution for linux-next

2018-07-17 Thread Stephen Rothwell
Hi Al, On Wed, 18 Jul 2018 03:56:37 +0100 Al Viro wrote: > > ... and now it even builds. Said that, I would really like to hear something > from you - I can duplicate the entire overlayfs-next and merge it into > my #for-next and ask Steven to use that instead of your tree, but I very > much dis

Re: [PATCH v2 7/7] proc/kcore: add vmcoreinfo note to /proc/kcore

2018-07-17 Thread Omar Sandoval
On Tue, Jul 17, 2018 at 07:44:21PM -0700, Andrew Morton wrote: > On Thu, 12 Jul 2018 17:09:39 -0700 Omar Sandoval wrote: > > > From: Omar Sandoval > > > > The vmcoreinfo information is useful for runtime debugging tools, not > > just for crash dumps. A lot of this information can be determined

[PATCH net-next v2 2/2] docs: networking: Convert bridge.txt to rst

2018-07-17 Thread Tobin C. Harding
The kernel documentation is now restructured text. Convert the Ethernet Bridge documentation and include it in the toplevel kernel documentation. - Fix heading adornments. - Add license identifier. Signed-off-by: Tobin C. Harding --- Documentation/networking/{bridge.txt => bridge.rst} | 6 +++

[PATCH net-next v2 1/2] docs: networking: Convert alias.txt to rst

2018-07-17 Thread Tobin C. Harding
The kernel documentation is now restructured text. Convert the IP aliasing documentation and include it in the toplevel kernel documentation. - Fix heading adornments. - Correctly indent code snippets. - Limit line length to 72 characters inline with kernel documentation standards. - Add li

Re: [PATCH v2 2/7] proc/kcore: replace kclist_lock rwlock with rwsem

2018-07-17 Thread Andrew Morton
On Tue, 17 Jul 2018 20:24:05 -0700 Omar Sandoval wrote: > > > --- a/fs/proc/kcore.c > > > +++ b/fs/proc/kcore.c > > > @@ -59,8 +59,8 @@ struct memelfnote > > > }; > > > > > > static LIST_HEAD(kclist_head); > > > -static DEFINE_RWLOCK(kclist_lock); > > > -static int kcore_need_update = 1; > >

Re: [PATCH v2 2/7] mm/swapfile.c: Replace some #ifdef with IS_ENABLED()

2018-07-17 Thread Huang, Ying
Dave Hansen writes: >> @@ -878,6 +877,11 @@ static int swap_alloc_cluster(struct swap_info_struct >> *si, swp_entry_t *slot) >> unsigned long offset, i; >> unsigned char *map; >> >> +if (!IS_ENABLED(CONFIG_THP_SWAP)) { >> +VM_WARN_ON_ONCE(1); >> +return 0;

Re: [PATCH v2 2/7] proc/kcore: replace kclist_lock rwlock with rwsem

2018-07-17 Thread Omar Sandoval
On Tue, Jul 17, 2018 at 07:38:41PM -0700, Andrew Morton wrote: > On Thu, 12 Jul 2018 17:09:34 -0700 Omar Sandoval wrote: > > > From: Omar Sandoval > > > > Now we only need kclist_lock from user context and at fs init time, and > > the following changes need to sleep while holding the kclist_loc

Re: [PATCH v2 1/7] proc/kcore: don't grab lock for kclist_add()

2018-07-17 Thread Omar Sandoval
On Tue, Jul 17, 2018 at 07:35:04PM -0700, Andrew Morton wrote: > On Thu, 12 Jul 2018 17:09:33 -0700 Omar Sandoval wrote: > > > From: Omar Sandoval > > > > kclist_add() is only called at init time, so there's no point in > > grabbing any locks. We're also going to replace the rwlock with a rwsem

Re: [PATCH 0/3] use unicode for vt mouse paste

2018-07-17 Thread Nicolas Pitre
On Wed, 18 Jul 2018, Adam Borowski wrote: > Hi! > Based on Nicolas' nice work (in tty-next), let's avoid corrupting characters > that have been copy+pasted via mouse selection. The uniscr array holds > their original identity even if they got mangled by glyph conversion. > The glyph conversion lo

Re: [PATCH v2 1/7] swap: Add comments to lock_cluster_or_swap_info()

2018-07-17 Thread Huang, Ying
Dave Hansen writes: > On 07/16/2018 05:55 PM, Huang, Ying wrote: >> +/* >> + * For non-HDD swap devices, the fine grained cluster lock is used to >> + * protect si->swap_map. But cluster and cluster locks isn't >> + * available for HDD, so coarse grained si->lock will be used instead >> + * for

[PATCH 3/6] vt: let \e[100m use bright background if unblinking

2018-07-17 Thread Adam Borowski
Let's keep \e[5m setting this bit, it's a nice way to convey the information, and it preserves old behaviour. Some other terminals that can't or don't want to blink do so as well. Signed-off-by: Adam Borowski --- drivers/tty/vt/vt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/

[PATCH 1/6] vt: drop unused struct vt_struct

2018-07-17 Thread Adam Borowski
Hasn't been ever used within historic (ie, git) times. Signed-off-by: Adam Borowski --- include/linux/console_struct.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/linux/console_struct.h b/include/linux/console_struct.h index 2c8d3239899b..fea64f2692a0 100644 ---

[PATCH 2/6] vt: add console flag "unblinking"

2018-07-17 Thread Adam Borowski
Marks consoles that interpret the blink bit by showing bright background instead. Doesn't matter if the console can't do either. For now, turn it on for fbcon when in color mode. Vgacon can also do so but requires setting appropriate VGA register (bit 3 of AMCR). I don't know other consoles: ne

[PATCH 5/6] vt: compensate for brightening the 256-color palette

2018-07-17 Thread Adam Borowski
The algorithm for 256-to-16 conversion was designed with wrong input palette but actually tuned on mainstream GUI terminals. This resulted in something that works well only for data we convert ourselves (ie, 256 not 24-bit). As the change is non-linear, I did not bother replicating it exactly, th

[PATCH 4/6] vt: change 256-color palette to match all(?) modern terminals

2018-07-17 Thread Adam Borowski
Turns out that osso-xterm which I based upon uses something a lot different from apparently any other terminal -- they all use identical shades, much brighter than what I copied: Old: 00 2a 55 7f aa d4 New: 00 5f 87 af d7 ff This did hardly matter as we immediately shoehorn the colors int

[PATCH 6/6] vt: support bright backgrounds for \e[48m if unblinking

2018-07-17 Thread Adam Borowski
This improves schemes used by fancy new programs. For example, it lets bright powerline segments match, and fixes images shown by catimg being striped to the point of unreadability. Handling of 8-color backgrounds uses stripped 16-color value instead of a dedicated formula; this works worse for d

[PATCH 0/6] vt: no blinking on console, 256/24-bit color improvements

2018-07-17 Thread Adam Borowski
Hi! Here's a patchset with two entangled improvements: * it'd be good to get rid of blinking where possible. Even CGA (thus VGA) allows disabling it, rendering such characters with a bright background instead. * due to my error, 256-color mode uses a much darker palette for conversion, resu

Re: [PATCH v3 0/6] KVM: X86: Implement PV IPIs support

2018-07-17 Thread Wanpeng Li
Gentle ping, hope this series can catch up with the next merge window. :) On Tue, 3 Jul 2018 at 14:21, Wanpeng Li wrote: > > Using hypercall to send IPIs by one vmexit instead of one by one for > xAPIC/x2APIC physical mode and one vmexit per-cluster for x2APIC cluster > mode. Intel guest can enter

Re: [PATCH v2 0/7] swap: THP optimizing refactoring

2018-07-17 Thread Huang, Ying
Daniel Jordan writes: > On Tue, Jul 17, 2018 at 08:55:49AM +0800, Huang, Ying wrote: >> This patchset is based on 2018-07-13 head of mmotm tree. > > Looks good. > > Still think patch 7 would be easier to review if split into two logical > changes. Either way, though. > > For the series, > Review

Re: [PATCH v2 7/7] swap, put_swap_page: Share more between huge/normal code path

2018-07-17 Thread Huang, Ying
Dave Hansen writes: > On 07/16/2018 05:55 PM, Huang, Ying wrote: >> text data bss dec hex filename >> base: 24215 2028 340 2658367d7 mm/swapfile.o >> unified: 245772028 340 269456941 mm/swapfile.o > > That's a bit mo

Re: vfs / overlayfs conflict resolution for linux-next

2018-07-17 Thread Al Viro
On Thu, Jul 12, 2018 at 04:53:37PM +0100, Al Viro wrote: > On Thu, Jul 12, 2018 at 08:05:26AM -0700, Linus Torvalds wrote: > > On Thu, Jul 12, 2018 at 5:43 AM Al Viro wrote: > > > > > > A question regarding the customs in such situations - are previous > > > Reviewed-by/Acked-by normally kept acro

Re: [PATCH 1/3] vt: avoid a VLA in the unicode screen scroll function

2018-07-17 Thread Nicolas Pitre
On Wed, 18 Jul 2018, Adam Borowski wrote: > On Tue, Jul 17, 2018 at 09:02:40PM -0400, Nicolas Pitre wrote: > > The nr argument is typically small: most often nr == 1. However this > > could be abused with a very large explicit scroll in a resized screen. > > Make the code scroll lines one at a tim

Re: [PATCH v2 7/7] proc/kcore: add vmcoreinfo note to /proc/kcore

2018-07-17 Thread Andrew Morton
On Thu, 12 Jul 2018 17:09:39 -0700 Omar Sandoval wrote: > From: Omar Sandoval > > The vmcoreinfo information is useful for runtime debugging tools, not > just for crash dumps. A lot of this information can be determined by > other means, but this is much more convenient. > What effect does th

Re: [PATCH] tpm: Add module parameter for hwrng quality.

2018-07-17 Thread David R. Bild
On Wed, Jul 4, 2018 at 2:54 AM, Louis Collard wrote: > On Fri, Jun 29, 2018 at 9:03 PM, David R. Bild wrote: >> As a point of clarification (and correct me if I'm wrong), the TPM is >> always ready used to seed the rng. It just doesn't update the entropy >> pool estimate. > > Good point. > >> >>

Re: [PATCH v2 2/7] proc/kcore: replace kclist_lock rwlock with rwsem

2018-07-17 Thread Andrew Morton
On Thu, 12 Jul 2018 17:09:34 -0700 Omar Sandoval wrote: > From: Omar Sandoval > > Now we only need kclist_lock from user context and at fs init time, and > the following changes need to sleep while holding the kclist_lock. > > ... > > --- a/fs/proc/kcore.c > +++ b/fs/proc/kcore.c > @@ -59,8 +5

Re: [PATCH v2 1/2] mm: fix race on soft-offlining free huge pages

2018-07-17 Thread Mike Kravetz
On 07/17/2018 06:28 PM, Naoya Horiguchi wrote: > On Tue, Jul 17, 2018 at 01:10:39PM -0700, Mike Kravetz wrote: >> It seems that soft_offline_free_page can be called for in use pages. >> Certainly, that is the case in the first workflow above. With the >> suggested changes, I think this is OK for h

Re: [PATCH v2 1/7] proc/kcore: don't grab lock for kclist_add()

2018-07-17 Thread Andrew Morton
On Thu, 12 Jul 2018 17:09:33 -0700 Omar Sandoval wrote: > From: Omar Sandoval > > kclist_add() is only called at init time, so there's no point in > grabbing any locks. We're also going to replace the rwlock with a rwsem, > which we don't want to try grabbing during early boot. > > ... > > ---

[PATCH v14 10/25] x86: initialize static branching early

2018-07-17 Thread Pavel Tatashin
static branching is useful to hot-patch branches that are used in hot path, but are infrequently changed. x86 clock framework is one example that uses static branches to setup the best clock during boot and never change it again. Since we plan to enable clock early, we need static branching funct

[PATCH v14 13/25] x86/xen/time: initialize pv xen time in init_hypervisor_platform

2018-07-17 Thread Pavel Tatashin
In every hypervisor except for xen pv time ops are initialized in init_hypervisor_platform(). Xen PV domains initialize time ops in x86_init.paging.pagetable_init(), by calling xen_setup_shared_info() which is a poor design, as time is needed prior to memory allocator. xen_setup_shared_info() is

[PATCH v14 22/25] x86/tsc: use tsc early

2018-07-17 Thread Pavel Tatashin
get timestamps and high resultion clock available to us as early as possible. native_sched_clock() outputs time based either on tsc after tsc_init() is called later in boot, or using jiffies when clock interrupts are enabled, which is also happens later in boot. On the other hand, tsc frequency i

[PATCH v14 16/25] time: replace read_boot_clock64() with read_persistent_wall_and_boot_offset()

2018-07-17 Thread Pavel Tatashin
If architecture does not support exact boot time, it is challenging to estimate boot time without having a reference to the current persistent clock value. Yet, it cannot read the persistent clock time again, because this may lead to math discrepancies with the caller of read_boot_clock64() who hav

[PATCH v14 18/25] s390/time: remove read_boot_clock64()

2018-07-17 Thread Pavel Tatashin
read_boot_clock64() was replaced by read_persistent_wall_and_boot_offset() so remove it. Signed-off-by: Pavel Tatashin --- arch/s390/kernel/time.c | 13 - 1 file changed, 13 deletions(-) diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c index d1f5447d5687..e8766beee5ad

[PATCH v14 11/25] x86/CPU: Call detect_nopl() only on the BSP

2018-07-17 Thread Pavel Tatashin
From: Borislav Petkov Make it use the setup_* variants and have it be called only on the BSP and drop the call in generic_identify() - X86_FEATURE_NOPL will be replicated to the APs through the forced caps. Helps keep the mess at a manageable level. Signed-off-by: Borislav Petkov Signed-off-by:

[PATCH v14 23/25] sched: move sched clock initialization and merge with generic clock

2018-07-17 Thread Pavel Tatashin
sched_clock_postinit() initializes a generic clock on systems where no other clock is porvided. This function may be called only after timekeeping_init(). Rename sched_clock_postinit to generic_clock_inti() and call it from sched_clock_init(). Move the call for sched_clock_init() until after time_

[PATCH v14 21/25] x86/tsc: initialize cyc2ns when tsc freq. is determined

2018-07-17 Thread Pavel Tatashin
cyc2ns converts tsc to nanoseconds, and it is handled in a per-cpu data structure. Currently, the setup code for c2ns data for every possible CPU goes through the same sequence of calculations as for the boot CPU, but is based on the same tsc frequency as the boot CPU, and thus this is not necessa

[PATCH v14 24/25] sched: early boot clock

2018-07-17 Thread Pavel Tatashin
Allow sched_clock() to be used before schec_clock_init() is called. This provides with a way to get early boot timestamps on machines with unstable clocks. Signed-off-by: Pavel Tatashin --- init/main.c | 2 +- kernel/sched/clock.c | 10 +- 2 files changed, 10 insertions(+), 2 d

[PATCH v14 19/25] ARM/time: remove read_boot_clock64()

2018-07-17 Thread Pavel Tatashin
read_boot_clock64() is deleted, and replaced with read_persistent_wall_and_boot_offset(). The default implementation of read_persistent_wall_and_boot_offset() provides a better fallback than the current stubs for read_boot_clock64() that arm has with no users, so remove the old code. Signed-off-b

[PATCH v14 20/25] x86/tsc: calibrate tsc only once

2018-07-17 Thread Pavel Tatashin
During boot tsc is calibrated twice: once in tsc_early_delay_calibrate(), and the second time in tsc_init(). Rename tsc_early_delay_calibrate() to tsc_early_init(), and rework it so the calibration is done only early, and make tsc_init() to use the values already determined in tsc_early_init(). S

[PATCH v14 06/25] x86/kvmclock: Move kvmclock vsyscall param and init to kvmclock

2018-07-17 Thread Pavel Tatashin
From: Thomas Gleixner There is no point to have this in the kvm code itself and call it from there. This can be called from an initcall and the parameter is cleared when the hypervisor is not KVM. Signed-off-by: Thomas Gleixner Signed-off-by: Pavel Tatashin Acked-by: Paolo Bonzini --- arch/x

[PATCH v14 17/25] time: default boot time offset to local_clock()

2018-07-17 Thread Pavel Tatashin
read_persistent_wall_and_boot_offset() is called during boot to read both the persistent clock and also return the offset between the boot time and the value of persistent clock. Change the default boot_offset from zero to local_clock() so architectures, that do not have a dedicated boot_clock but

[PATCH v14 05/25] x86/kvmclock: Mark variables __initdata and __ro_after_init

2018-07-17 Thread Pavel Tatashin
From: Thomas Gleixner The kvmclock parameter is init data and the other variables are not modified after init. Signed-off-by: Thomas Gleixner Signed-off-by: Pavel Tatashin Acked-by: Paolo Bonzini --- arch/x86/kernel/kvmclock.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-)

[PATCH v14 04/25] x86/kvmclock: Cleanup the code

2018-07-17 Thread Pavel Tatashin
From: Thomas Gleixner - Cleanup the mrs write for wall clock. The type casts to (int) are sloppy because the wrmsr parameters are u32 and aside of that wrmsrl() already provides the high/low split for free. - Remove the pointless get_cpu()/put_cpu() dance from various functions. Either the

[PATCH v14 14/25] x86/xen/time: output xen sched_clock time from 0

2018-07-17 Thread Pavel Tatashin
It is expected for sched_clock() to output data from 0, when system boots. Add an offset xen_sched_clock_offset (similarly how it is done in other hypervisors i.e. kvm_sched_clock_offset) to count sched_clock() from 0, when time is first initialized. Signed-off-by: Pavel Tatashin --- arch/x86/xe

[PATCH v14 12/25] x86/tsc: redefine notsc to behave as tsc=unstable

2018-07-17 Thread Pavel Tatashin
Currently, notsc kernel parameter disables the use of tsc register by sched_clock(). However, this parameter does not prevent linux from accessing tsc in other places in kernel. The only rational to boot with notsc is to avoid timing discrepancies on multi-socket systems where different tsc freque

[PATCH v14 09/25] x86: text_poke() may access uninitialized struct pages

2018-07-17 Thread Pavel Tatashin
It supposed to be safe to modify static branches after jump_label_init(). But, because static key modifying code eventually calls text_poke() we may end up with accessing struct page that have not been initialized. Here is how to quickly reproduce the problem. Insert code like this into init/main.

[PATCH v14 07/25] x86/kvmclock: Switch kvmclock data to a PER_CPU variable

2018-07-17 Thread Pavel Tatashin
From: Thomas Gleixner The previous removal of the memblock dependency from kvmclock introduced a static data array sized 64bytes * CONFIG_NR_CPUS. That's wasteful on large systems when kvmclock is not used. Replace it with: - A static page sized array of pvclock data. It's page sized because t

[PATCH v14 15/25] s390/time: add read_persistent_wall_and_boot_offset()

2018-07-17 Thread Pavel Tatashin
read_persistent_wall_and_boot_offset() will replace read_boot_clock64() because on some architectures it is more convenient to read both sources as one may depend on the other. For s390, implementation is the same as read_boot_clock64() but also calling and returning value of read_persistent_clock6

[PATCH v14 08/25] x86/kvmclock: Avoid TSC recalibration

2018-07-17 Thread Pavel Tatashin
From: Peter Zijlstra If the host gives us a TSC rate, assume it is good and don't try and recalibrate things against virtual timer hardware. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Pavel Tatashin --- arch/x86/kernel/kvmclock.c | 11 ++- 1 file changed, 10 insertions(+), 1

[PATCH v14 01/25] x86/kvmclock: Remove memblock dependency

2018-07-17 Thread Pavel Tatashin
KVM clock is initialized later compared to other hypervisor clocks because it has a dependency on the memblock allocator. Bring it in line with other hypervisors by using memory from the BSS instead of allocating it. The benefits: - Remove ifdef from common code - Earlier availability of the

[PATCH v14 25/25] sched: use static key for sched_clock_running

2018-07-17 Thread Pavel Tatashin
sched_clock_running may be read every time sched_clock_cpu() is called. Yet, this variable is updated only twice during boot, and never changes again, therefore it is better to make it a static key. Signed-off-by: Pavel Tatashin --- kernel/sched/clock.c | 16 kernel/sched/debug.

[PATCH v14 00/25] Early boot time stamps

2018-07-17 Thread Pavel Tatashin
changelog - v14 - v13 - Included Thomas' KVM clock series, addressed comments from reviewers. http://lkml.kernel.org/r/20180706161307.77...@linutronix.de - Fixed xen hvm panic reported by Boris - Fixed build issue on microblaze v13 - v12

[PATCH v14 03/25] x86/kvmclock: Decrapify kvm_register_clock()

2018-07-17 Thread Pavel Tatashin
From: Thomas Gleixner The return value is pointless because the wrmsr cannot fail if KVM_FEATURE_CLOCKSOURCE or KVM_FEATURE_CLOCKSOURCE2 are set. kvm_register_clock() is only called locally so wants to be static. Signed-off-by: Thomas Gleixner Signed-off-by: Pavel Tatashin Acked-by: Paolo Bon

[PATCH v14 02/25] x86/kvmclock: Remove page size requirement from wall_clock

2018-07-17 Thread Pavel Tatashin
From: Thomas Gleixner There is no requirement for wall_clock data to be page aligned or page sized. Signed-off-by: Thomas Gleixner Signed-off-by: Pavel Tatashin Acked-by: Paolo Bonzini --- arch/x86/kernel/kvmclock.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --g

  1   2   3   4   5   6   7   8   9   10   >