Re: [PATCH v2] net/mlx5e: Use refcount_t for refcount

2019-08-04 Thread Chuhong Yuan
On Mon, Aug 5, 2019 at 2:13 PM Leon Romanovsky wrote: > > On Sun, Aug 04, 2019 at 10:44:47PM +0800, Chuhong Yuan wrote: > > On Sun, Aug 4, 2019 at 8:59 PM Leon Romanovsky wrote: > > > > > > On Sat, Aug 03, 2019 at 12:48:28AM +0800, Chuhong Yuan wrote: > > > > refcount_t is better for reference co

Re: [RFC PATCH v2 07/19] RISC-V: KVM: Implement KVM_GET_ONE_REG/KVM_SET_ONE_REG ioctls

2019-08-04 Thread Anup Patel
On Fri, Aug 2, 2019 at 2:33 PM Paolo Bonzini wrote: > > On 02/08/19 09:47, Anup Patel wrote: > > + if (reg_num == KVM_REG_RISCV_CSR_REG(sip)) > > + kvm_riscv_vcpu_flush_interrupts(vcpu, false); > > Not updating the vsip CSR here can cause an interrupt to be lost, if the > next call

Re: [PATCH v3 6/7] thermal/drivers/cpu_cooling: Introduce the cpu idle cooling driver

2019-08-04 Thread Martin Kepplinger
On 05.08.19 07:11, Martin Kepplinger wrote: > --- > > On 05-04-18, 18:16, Daniel Lezcano wrote: >> The cpu idle cooling driver performs synchronized idle injection across all >> cpus belonging to the same cluster and offers a new method to cool down a >> SoC. >> >> Each cluster has its own idle c

Re: [PATCH v3] nvme-pci: Support shared tags across queues for Apple 2018 controllers

2019-08-04 Thread Benjamin Herrenschmidt
On Tue, 2019-07-30 at 13:28 -0700, Benjamin Herrenschmidt wrote: > > One problem is that we've an nvme parameter, io_queue_depth, that a user > > could set to something less than 32, and then you won't be able to do > > any IO. I'd recommend enforce the admin queue to QD1 for this device so > > tha

[PATCH v4 02/10] powerpc: move memstart_addr and kernstart_addr to init-common.c

2019-08-04 Thread Jason Yan
These two variables are both defined in init_32.c and init_64.c. Move them to init-common.c. Signed-off-by: Jason Yan Cc: Diana Craciun Cc: Michael Ellerman Cc: Christophe Leroy Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Nicholas Piggin Cc: Kees Cook Reviewed-by: Christophe Leroy R

Re: [PATCH 5/6] mtd: spi-nor: Add s3an_post_sfdp_fixups()

2019-08-04 Thread Tudor.Ambarus
On 08/01/2019 09:42 AM, Boris Brezillon wrote: > Almost all of this (except the s3an specific bits) should be done in > the previous patch. So I'll put a condition on the R-b I placed on patch > 4: some of this code should be moved there. You're right, will do. Cheers, ta

Re: [PATCH V2 7/9] vhost: do not use RCU to synchronize MMU notifier with worker

2019-08-04 Thread Michael S. Tsirkin
On Mon, Aug 05, 2019 at 12:41:45PM +0800, Jason Wang wrote: > > On 2019/8/5 下午12:36, Jason Wang wrote: > > > > On 2019/8/2 下午10:27, Michael S. Tsirkin wrote: > > > On Fri, Aug 02, 2019 at 09:46:13AM -0300, Jason Gunthorpe wrote: > > > > On Fri, Aug 02, 2019 at 05:40:07PM +0800, Jason Wang wrote:

Re: [PATCH] mtd: spi-nor: Fix the disabling of write protection at init

2019-08-04 Thread Vignesh Raghavendra
On 31/07/19 2:16 PM, tudor.amba...@microchip.com wrote: > From: Tudor Ambarus > > spi_nor_spansion_clear_sr_bp() depends on spansion_quad_enable(). > While spansion_quad_enable() is selected as default when > initializing the flash parameters, the nor->quad_enable() method > can be overwritten

Re: [PATCH net-next v3] net: phy: broadcom: add 1000Base-X support for BCM54616S

2019-08-04 Thread Tao Ren
Hi Andrew, On 8/4/19 7:51 AM, Andrew Lunn wrote: >>> The patchset looks better now. But is it ok, I wonder, to keep >>> PHY_BCM_FLAGS_MODE_1000BX in phydev->dev_flags, considering that >>> phy_attach_direct is overwriting it? >> > >> I checked ftgmac100 driver (used on my machine) and it calls >>

[PATCH v2 3/3] bfq: Add per-device weight

2019-08-04 Thread Fam Zheng
Signed-off-by: Fam Zheng --- block/bfq-cgroup.c | 95 ++--- block/bfq-iosched.h | 3 ++ 2 files changed, 87 insertions(+), 11 deletions(-) diff --git a/block/bfq-cgroup.c b/block/bfq-cgroup.c index 28e5a9241237..de4fd8b725aa 100644 --- a/block/bf

[PATCH v2 0/3] Implement BFQ per-device weight interface

2019-08-04 Thread Fam Zheng
(Revision starting from v2 since v1 was used off-list) Hi Paolo and others, This adds to BFQ the missing per-device weight interfaces: blkio.bfq.weight_device on legacy and io.bfq.weight on unified. The implementation pretty closely resembles what we had in CFQ and the parsing code is basically r

Re: [PATCH 4/6] mtd: spi_nor: Add nor->setup() method

2019-08-04 Thread Tudor.Ambarus
On 08/01/2019 09:36 AM, Boris Brezillon wrote: > On Wed, 31 Jul 2019 09:12:14 + > wrote: > > >> static inline bool spi_nor_protocol_is_dtr(enum spi_nor_protocol proto) >> { >> return !!(proto & SNOR_PROTO_IS_DTR); >> @@ -384,6 +522,7 @@ struct flash_info; >> *

Re: [PATCH 1/1] arm64: dts: sdm845: Add device node for Last level cache controller

2019-08-04 Thread Vivek Gautam
Hi Bjorn, On Wed, Jul 10, 2019 at 5:09 PM Vivek Gautam wrote: > > From: Sai Prakash Ranjan > > Last level cache (aka. system cache) controller provides control > over the last level cache present on SDM845. This cache lies after > the memory noc, right before the DDR. > > Signed-off-by: Sai Prak

Re: [PATCH V2 7/9] vhost: do not use RCU to synchronize MMU notifier with worker

2019-08-04 Thread Michael S. Tsirkin
On Mon, Aug 05, 2019 at 12:36:40PM +0800, Jason Wang wrote: > > On 2019/8/2 下午10:27, Michael S. Tsirkin wrote: > > On Fri, Aug 02, 2019 at 09:46:13AM -0300, Jason Gunthorpe wrote: > > > On Fri, Aug 02, 2019 at 05:40:07PM +0800, Jason Wang wrote: > > > > > This must be a proper barrier, like a spin

Re: [PATCH 2/5] mtd: spi-nor: group the code about the write protection at power-up

2019-08-04 Thread Tudor.Ambarus
On 08/05/2019 08:44 AM, Vignesh Raghavendra wrote: >> From: Tudor Ambarus >> >> The write protection at power-up logic was split across functions >> because of a dependency to spansion_quad_enable(). Group the code >> in spi_nor_init() as the pointer to spansion_quad_enable() can be >> retrieved

Re: [PATCH V2 7/9] vhost: do not use RCU to synchronize MMU notifier with worker

2019-08-04 Thread Michael S. Tsirkin
On Mon, Aug 05, 2019 at 12:33:45PM +0800, Jason Wang wrote: > > On 2019/8/2 下午10:03, Michael S. Tsirkin wrote: > > On Fri, Aug 02, 2019 at 05:40:07PM +0800, Jason Wang wrote: > > > Btw, I come up another idea, that is to disable preemption when vhost > > > thread > > > need to access the memory.

[PATCH v4 09/10] powerpc/fsl_booke/kaslr: support nokaslr cmdline parameter

2019-08-04 Thread Jason Yan
One may want to disable kaslr when boot, so provide a cmdline parameter 'nokaslr' to support this. Signed-off-by: Jason Yan Cc: Diana Craciun Cc: Michael Ellerman Cc: Christophe Leroy Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Nicholas Piggin Cc: Kees Cook Reviewed-by: Diana Craciun

[PATCH v4 06/10] powerpc/fsl_booke/32: implement KASLR infrastructure

2019-08-04 Thread Jason Yan
This patch add support to boot kernel from places other than KERNELBASE. Since CONFIG_RELOCATABLE has already supported, what we need to do is map or copy kernel to a proper place and relocate. Freescale Book-E parts expect lowmem to be mapped by fixed TLB entries(TLB1). The TLB1 entries are not su

[PATCH v4 08/10] powerpc/fsl_booke/kaslr: clear the original kernel if randomized

2019-08-04 Thread Jason Yan
The original kernel still exists in the memory, clear it now. Signed-off-by: Jason Yan Cc: Diana Craciun Cc: Michael Ellerman Cc: Christophe Leroy Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Nicholas Piggin Cc: Kees Cook Reviewed-by: Christophe Leroy Reviewed-by: Diana Craciun Test

[PATCH v4 04/10] powerpc/fsl_booke/32: introduce create_tlb_entry() helper

2019-08-04 Thread Jason Yan
Add a new helper create_tlb_entry() to create a tlb entry by the virtual and physical address. This is a preparation to support boot kernel at a randomized address. Signed-off-by: Jason Yan Cc: Diana Craciun Cc: Michael Ellerman Cc: Christophe Leroy Cc: Benjamin Herrenschmidt Cc: Paul Mackerr

[PATCH v4 01/10] powerpc: unify definition of M_IF_NEEDED

2019-08-04 Thread Jason Yan
M_IF_NEEDED is defined too many times. Move it to a common place. Signed-off-by: Jason Yan Cc: Diana Craciun Cc: Michael Ellerman Cc: Christophe Leroy Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Nicholas Piggin Cc: Kees Cook Reviewed-by: Christophe Leroy Reviewed-by: Diana Craciun

[PATCH v4 05/10] powerpc/fsl_booke/32: introduce reloc_kernel_entry() helper

2019-08-04 Thread Jason Yan
Add a new helper reloc_kernel_entry() to jump back to the start of the new kernel. After we put the new kernel in a randomized place we can use this new helper to enter the kernel and begin to relocate again. Signed-off-by: Jason Yan Cc: Diana Craciun Cc: Michael Ellerman Cc: Christophe Leroy

[PATCH v4 03/10] powerpc: introduce kimage_vaddr to store the kernel base

2019-08-04 Thread Jason Yan
Now the kernel base is a fixed value - KERNELBASE. To support KASLR, we need a variable to store the kernel base. Signed-off-by: Jason Yan Cc: Diana Craciun Cc: Michael Ellerman Cc: Christophe Leroy Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Nicholas Piggin Cc: Kees Cook Reviewed-by

[PATCH v4 10/10] powerpc/fsl_booke/kaslr: dump out kernel offset information on panic

2019-08-04 Thread Jason Yan
When kaslr is enabled, the kernel offset is different for every boot. This brings some difficult to debug the kernel. Dump out the kernel offset when panic so that we can easily debug the kernel. Signed-off-by: Jason Yan Cc: Diana Craciun Cc: Michael Ellerman Cc: Christophe Leroy Cc: Benjamin

[PATCH v4 00/10] implement KASLR for powerpc/fsl_booke/32

2019-08-04 Thread Jason Yan
This series implements KASLR for powerpc/fsl_booke/32, as a security feature that deters exploit attempts relying on knowledge of the location of kernel internals. Since CONFIG_RELOCATABLE has already supported, what we need to do is map or copy kernel to a proper place and relocate. Freescale Boo

[PATCH v4 07/10] powerpc/fsl_booke/32: randomize the kernel image offset

2019-08-04 Thread Jason Yan
After we have the basic support of relocate the kernel in some appropriate place, we can start to randomize the offset now. Entropy is derived from the banner and timer, which will change every build and boot. This not so much safe so additionally the bootloader may pass entropy via the /chosen/ka

[PATCH v7 7/7] powerpc: add machine check safe copy_to_user

2019-08-04 Thread Santosh Sivaraj
Use memcpy_mcsafe() implementation to define copy_to_user_mcsafe() Signed-off-by: Santosh Sivaraj --- arch/powerpc/Kconfig | 1 + arch/powerpc/include/asm/uaccess.h | 14 ++ 2 files changed, 15 insertions(+) diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig in

[PATCH v7 6/7] powerpc/mce: Handle UE event for memcpy_mcsafe

2019-08-04 Thread Santosh Sivaraj
If we take a UE on one of the instructions with a fixup entry, set nip to continue execution at the fixup entry. Stop processing the event further or print it. Based-on-patch-by: Reza Arbab Cc: Reza Arbab Cc: Mahesh Salgaonkar Signed-off-by: Santosh Sivaraj --- arch/powerpc/include/asm/mce.h

[PATCH v7 3/7] powerpc/mce: Fix MCE handling for huge pages

2019-08-04 Thread Santosh Sivaraj
From: Balbir Singh The current code would fail on huge pages addresses, since the shift would be incorrect. Use the correct page shift value returned by __find_linux_pte() to get the correct physical address. The code is more generic and can handle both regular and compound pages. Fixes: ba41e1e

[PATCH v7 4/7] extable: Add function to search only kernel exception table

2019-08-04 Thread Santosh Sivaraj
Certain architecture specific operating modes (e.g., in powerpc machine check handler that is unable to access vmalloc memory), the search_exception_tables cannot be called because it also searches the module exception tables if entry is not found in the kernel exception table. Cc: Thomas Gleixner

Re: [PATCH] scsi: 3w-sas: Fix unterminated strncpy

2019-08-04 Thread Chuhong Yuan
On Tue, Jul 30, 2019 at 10:56 PM James Bottomley wrote: > > On Tue, 2019-07-30 at 16:40 +0800, Chuhong Yuan wrote: > > strncpy(dest, src, strlen(src)) leads to unterminated > > dest, which is dangerous. > > I don't buy that. The structure is only used for the > TW_IOCTL_GET_COMPATIBILITY_INFO ioc

[PATCH v7 0/7] powerpc: implement machine check safe memcpy

2019-08-04 Thread Santosh Sivaraj
During a memcpy from a pmem device, if a machine check exception is generated we end up in a panic. In case of fsdax read, this should only result in a -EIO. Avoid MCE by implementing memcpy_mcsafe. Before this patch series: ``` bash-4.4# mount -o dax /dev/pmem0 /mnt/pmem/ [ 7621.714094] Disablin

[PATCH v7 1/7] powerpc/mce: Schedule work from irq_work

2019-08-04 Thread Santosh Sivaraj
schedule_work() cannot be called from MCE exception context as MCE can interrupt even in interrupt disabled context. fixes: 733e4a4c ("powerpc/mce: hookup memory_failure for UE errors") Signed-off-by: Santosh Sivaraj --- arch/powerpc/kernel/mce.c | 8 +--- 1 file changed, 5 insertions(+), 3

[PATCH v7 5/7] powerpc/memcpy: Add memcpy_mcsafe for pmem

2019-08-04 Thread Santosh Sivaraj
From: Balbir Singh The pmem infrastructure uses memcpy_mcsafe in the pmem layer so as to convert machine check exceptions into a return value on failure in case a machine check exception is encountered during the memcpy. The return value is the number of bytes remaining to be copied. This patch

[PATCH v7 2/7] powerpc/mce: Make machine_check_ue_event() static

2019-08-04 Thread Santosh Sivaraj
From: Reza Arbab The function doesn't get used outside this file, so make it static. Signed-off-by: Reza Arbab Signed-off-by: Santosh Sivaraj Reviewed-by: Nicholas Piggin --- arch/powerpc/kernel/mce.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kernel

Re: [PATCH 3/5] mtd: spi-nor: add Global Block Unlock support

2019-08-04 Thread Vignesh Raghavendra
On 17/07/19 2:18 PM, tudor.amba...@microchip.com wrote: > From: Tudor Ambarus > > To avoid inadvertent writes during power-up, some flashes are > write-protected by default after a power-on reset cycle. > A Global Block-Protection Unlock command offers a single > command cycle that unlocks the

Re: [RFC PATCH 1/2] dt-bindings: net: macb: Add new property for PS SGMII only

2019-08-04 Thread Harini Katakam
Hi Andrew, On Sun, Aug 4, 2019 at 8:26 PM Andrew Lunn wrote: > > On Wed, Jul 31, 2019 at 03:10:32PM +0530, Harini Katakam wrote: > > Add a new property to indicate when PS SGMII is used with NO > > external PHY on board. > > Hi Harini > > What exactly is you use case? Are you connecting to a Ethe

Re: [PATCH v2] net/mlx5e: Use refcount_t for refcount

2019-08-04 Thread Leon Romanovsky
On Sun, Aug 04, 2019 at 10:44:47PM +0800, Chuhong Yuan wrote: > On Sun, Aug 4, 2019 at 8:59 PM Leon Romanovsky wrote: > > > > On Sat, Aug 03, 2019 at 12:48:28AM +0800, Chuhong Yuan wrote: > > > refcount_t is better for reference counters since its > > > implementation can prevent overflows. > > >

linux-next: Tree for Aug 5

2019-08-04 Thread Stephen Rothwell
Hi all, Changes since 20190802: The crypto tree gained a build failure for which I applied a patch. Non-merge commits (relative to Linus' tree): 3992 4485 files changed, 238294 insertions(+), 107183 deletions(-) I ha

Re: [PATCH] phy: qualcomm: phy-qcom-qmp: Add of_node_put() before return

2019-08-04 Thread Vivek Gautam
On Sun, Aug 4, 2019 at 9:54 PM Nishka Dasgupta wrote: > > Each iteration of for_each_available_child_of_node puts the previous > node, but in the case of a return from the middle of the loop, there is > no put, thus causing a memory leak. Hence add an of_node_put before the > return in two places.

Re: [PATCH v6 0/3] [v4.9.y] coredump: fix race condition between mmget_not_zero()/get_task_mm() and core dumping

2019-08-04 Thread Greg KH
On Sun, Aug 04, 2019 at 09:29:28AM +0530, Ajay Kaher wrote: > coredump: fix race condition between mmget_not_zero()/get_task_mm() > and core dumping > > [PATCH v5 1/3]: > Backporting of commit 04f5866e41fb70690e28397487d8bd8eea7d712a upstream. > > [PATCH v5 2/3]: > Extension of commit 04f5866e41f

Re: [PATCH 0/3] Use refcount_t for refcount

2019-08-04 Thread Leon Romanovsky
On Sun, Aug 04, 2019 at 10:58:19PM +0800, Chuhong Yuan wrote: > On Sun, Aug 4, 2019 at 8:48 PM Leon Romanovsky wrote: > > > > On Fri, Aug 02, 2019 at 08:10:35PM +0800, Chuhong Yuan wrote: > > > Reference counters are preferred to use refcount_t instead of > > > atomic_t. > > > This is because the

Re: [RFC PATCH v2 04/19] RISC-V: Add initial skeletal KVM support

2019-08-04 Thread Anup Patel
On Fri, Aug 2, 2019 at 2:31 PM Paolo Bonzini wrote: > > On 02/08/19 09:47, Anup Patel wrote: > > +static void kvm_riscv_check_vcpu_requests(struct kvm_vcpu *vcpu) > > +{ > > + if (kvm_request_pending(vcpu)) { > > + /* TODO: */ > > + > > + /* > > + * Clear I

Re: [PATCH 2/5] mtd: spi-nor: group the code about the write protection at power-up

2019-08-04 Thread Vignesh Raghavendra
On 17/07/19 2:18 PM, tudor.amba...@microchip.com wrote: > From: Tudor Ambarus > > The write protection at power-up logic was split across functions > because of a dependency to spansion_quad_enable(). Group the code > in spi_nor_init() as the pointer to spansion_quad_enable() can be > retrieve

Re: [PATCH v3 06/10] powerpc/fsl_booke/32: implement KASLR infrastructure

2019-08-04 Thread Jason Yan
Hi Diana, On 2019/8/2 16:41, Diana Madalina Craciun wrote: diff --git a/arch/powerpc/kernel/fsl_booke_entry_mapping.S b/arch/powerpc/kernel/fsl_booke_entry_mapping.S index de0980945510..6d2967673ac7 100644 --- a/arch/powerpc/kernel/fsl_booke_entry_mapping.S +++ b/arch/powerpc/kernel/fsl_booke_e

Re: linux-next: build failure after merge of the crypto tree

2019-08-04 Thread Chuhong Yuan
On Mon, Aug 5, 2019 at 12:57 PM Stephen Rothwell wrote: > > Hi all, > > After merging the crypto tree, today's linux-next build (sparc64 > defconfig) failed like this: > > drivers/char/hw_random/n2-drv.c: In function 'n2rng_probe': > drivers/char/hw_random/n2-drv.c:771:29: error: 'pdev' undeclared

Re: [PATCH 1/5] mtd: spi-nor: fix description for int (*flash_is_locked)()

2019-08-04 Thread Vignesh Raghavendra
On 17/07/19 2:18 PM, tudor.amba...@microchip.com wrote: > From: Tudor Ambarus > > The description was interleaved. > > Signed-off-by: Tudor Ambarus Reviewed-by: Vignesh Raghavendra > --- > include/linux/mtd/spi-nor.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git

Re: [PATCH 2/2] /proc/kpageflags: do not use uninitialized struct pages

2019-08-04 Thread Toshiki Fukasawa
On 2019/07/26 16:06, Michal Hocko wrote: > On Fri 26-07-19 06:25:49, Toshiki Fukasawa wrote: >> >> >> On 2019/07/25 18:03, Michal Hocko wrote: >>> On Thu 25-07-19 02:31:18, Toshiki Fukasawa wrote: A kernel panic was observed during reading /proc/kpageflags for first few pfns allocated by

[PATCH v4 10/10] rtc: Add support for the MediaTek MT6358 RTC

2019-08-04 Thread Hsin-Hsiung Wang
From: Ran Bi This add support for the MediaTek MT6358 RTC. Driver using compatible data to store different RTC_WRTGR address offset. Review-by: Yingjoe Chen Signed-off-by: Ran Bi --- drivers/rtc/rtc-mt6397.c | 43 +++ 1 file changed, 35 insertions(+), 8

[PATCH v4 01/10] mfd: mt6397: clean up code

2019-08-04 Thread Hsin-Hsiung Wang
refine some variable name for more readable Acked-for-mfd-by: Lee Jones Signed-off-by: Hsin-Hsiung Wang --- drivers/mfd/mt6397-core.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/mfd/mt6397-core.c b/drivers/mfd/mt6397-core.c index 337bccc..c070862

[PATCH v4 03/10] mfd: mt6397: modify suspend/resume behavior

2019-08-04 Thread Hsin-Hsiung Wang
Some pmics don't need backup interrupt settings, so we change to use pm notifier for the pmics which are necessary to store settings. Signed-off-by: Hsin-Hsiung Wang --- drivers/mfd/mt6397-core.c | 89 + drivers/mfd/mt6397-irq.c| 33 +

[PATCH v4 09/10] rtc: mt6397: fix alarm register overwrite

2019-08-04 Thread Hsin-Hsiung Wang
From: Ran Bi Alarm registers high byte was reserved for other functions. This add mask in alarm registers operation functions. This also fix error condition in interrupt handler. Fixes: fc2979118f3f ("rtc: mediatek: Add MT6397 RTC driver") Signed-off-by: Ran Bi --- drivers/rtc/rtc-mt6397.c |

[PATCH v4 02/10] mfd: mt6397: extract irq related code from core driver

2019-08-04 Thread Hsin-Hsiung Wang
In order to support different types of irq design, we decide to add separate irq drivers for different design and keep mt6397 mfd core simple and reusable to all generations of PMICs so far. Signed-off-by: Hsin-Hsiung Wang --- drivers/mfd/Makefile| 3 +- drivers/mfd/mt6397-core.c

[PATCH v4 00/10] Add Support for MediaTek PMIC MT6358

2019-08-04 Thread Hsin-Hsiung Wang
This patchset including refactoring interrupt add support to MT6358 PMIC. MT6358 is the primary PMIC for MT8183 platform. changes since v3: - refine some coding style in the mt6358 interrupt setting for better code quality. - refine some coding style in the mt6358 regulstor for better code qua

[PATCH v4 08/10] arm64: dts: mt6358: add PMIC MT6358 related nodes

2019-08-04 Thread Hsin-Hsiung Wang
add PMIC MT6358 related nodes which is for MT8183 platform Signed-off-by: Hsin-Hsiung Wang --- arch/arm64/boot/dts/mediatek/mt6358.dtsi | 362 +++ 1 file changed, 362 insertions(+) create mode 100644 arch/arm64/boot/dts/mediatek/mt6358.dtsi diff --git a/arch/arm64/b

[PATCH v4 07/10] regulator: mt6358: Add support for MT6358 regulator

2019-08-04 Thread Hsin-Hsiung Wang
The MT6358 is a regulator found on boards based on MediaTek MT8183 and probably other SoCs. It is a so called pmic and connects as a slave to SoC using SPI, wrapped inside the pmic-wrapper. Signed-off-by: Hsin-Hsiung Wang --- drivers/regulator/Kconfig | 9 + drivers/regulator/

[PATCH v4 04/10] dt-bindings: mfd: Add compatible for the MediaTek MT6358 PMIC

2019-08-04 Thread Hsin-Hsiung Wang
This adds compatible for the MediaTek MT6358 PMIC. Acked-for-mfd-by: Lee Jones Reviewed-by: Rob Herring Signed-off-by: Hsin-Hsiung Wang --- Documentation/devicetree/bindings/mfd/mt6397.txt | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/

[PATCH v4 06/10] mfd: Add support for the MediaTek MT6358 PMIC

2019-08-04 Thread Hsin-Hsiung Wang
This adds support for the MediaTek MT6358 PMIC. This is a multifunction device with the following sub modules: - Regulator - RTC - Codec - Interrupt It is interfaced to the host controller using SPI interface by a proprietary hardware called PMIC wrapper or pwrap. MT6358 MFD is a child device of

[PATCH v4 05/10] regulator: Add document for MT6358 regulator

2019-08-04 Thread Hsin-Hsiung Wang
add dt-binding document for MediaTek MT6358 PMIC Reviewed-by: Rob Herring Signed-off-by: Hsin-Hsiung Wang --- .../bindings/regulator/mt6358-regulator.txt| 358 + 1 file changed, 358 insertions(+) create mode 100644 Documentation/devicetree/bindings/regulator/mt6358

[RESEND PATCH v5 2/4] mailbox: imx: Clear the right interrupts at shutdown

2019-08-04 Thread Richard Zhu
From: Daniel Baluta Make sure to only clear enabled interrupts keeping count of the connection type. Suggested-by: Oleksij Rempel Signed-off-by: Daniel Baluta Signed-off-by: Richard Zhu Reviewed-by: Dong Aisheng --- drivers/mailbox/imx-mailbox.c | 15 +-- 1 file changed, 13 inse

[RESEND PATCH v5 3/4] dt-bindings: mailbox: imx-mu: add imx7ulp MU support

2019-08-04 Thread Richard Zhu
There is a version 1.0 MU on imx7ulp, use "fsl,imx7ulp-mu" compatible to support it. Signed-off-by: Richard Zhu Reviewed-by: Dong Aisheng --- Documentation/devicetree/bindings/mailbox/fsl,mu.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/mailbox/fsl,

[RESEND PATCH v5 4/4] mailbox: imx: add support for imx v1 mu

2019-08-04 Thread Richard Zhu
There is a version 1.0 MU on i.MX7ULP platform. One new version ID register is added, and it's offset is 0. TRn registers are defined at the offset 0x20 ~ 0x2C. RRn registers are defined at the offset 0x40 ~ 0x4C. SR/CR registers are defined at 0x60/0x64. Extend this driver to support it. Signed-o

[RESEND PATCH v5 1/4] mailbox: imx: Fix Tx doorbell shutdown path

2019-08-04 Thread Richard Zhu
From: Daniel Baluta Tx doorbell is handled by txdb_tasklet and doesn't have an associated IRQ. Anyhow, imx_mu_shutdown ignores this and tries to free an IRQ that wasn't requested for Tx DB resulting in the following warning: [1.967644] Trying to free already-free IRQ 26 [1.972108] WARNI

[PATCH v5 0/4] mailbox: imx: bug fix and add support for imx v1 mu

2019-08-04 Thread Richard Zhu
Change logs: v4 --> v5: - Include Daniel's patch-set into this one. v3 --> v4: - Change "version1.0" to "version 1.0" in the commit log. - Update the devicetree binding document to support the imx7ulp mu. - Rebase the patch refer to the following bug-fixs patch-set issued by Daniel Balut

Re: [PATCH 6/6] mtd: spi-nor: Add the SPI_NOR_XSR_RDY flag

2019-08-04 Thread Vignesh Raghavendra
On 31/07/19 2:42 PM, tudor.amba...@microchip.com wrote: > From: Boris Brezillon > > S3AN flashes use a specific opcode to read the status register. > We currently use the SPI_S3AN flag to decide whether this specific > SR read opcode should be used, but SPI_S3AN is about to disappear, so > let

Re: [PATCH v3 6/7] thermal/drivers/cpu_cooling: Introduce the cpu idle cooling driver

2019-08-04 Thread Martin Kepplinger
--- On 05-04-18, 18:16, Daniel Lezcano wrote: > The cpu idle cooling driver performs synchronized idle injection across all > cpus belonging to the same cluster and offers a new method to cool down a SoC. > > Each cluster has its own idle cooling device, each core has its own idle > injection thr

RE: [PATCH v5 1/4] mailbox: imx: Fix Tx doorbell shutdown path

2019-08-04 Thread Richard Zhu
> -Original Message- > From: Aisheng Dong > Sent: 2019年8月5日 12:38 > To: Richard Zhu ; jassisinghb...@gmail.com; > o.rem...@pengutronix.de; Daniel Baluta > Cc: dl-linux-imx ; linux-kernel@vger.kernel.org; > linux-arm-ker...@lists.infradead.org; Richard Zhu > Subject: RE: [PATCH v5 1/4] ma

Re: drivers/infiniband/core/.tmp_gl_uverbs_main.o:undefined reference to `__user_bad'

2019-08-04 Thread Leon Romanovsky
On Sun, Aug 04, 2019 at 09:50:50PM -0700, Randy Dunlap wrote: > On 4/2/19 7:38 PM, Randy Dunlap wrote: > > On 2/28/19 1:03 AM, kbuild test robot wrote: > >> Hi Jason, > >> > >> FYI, the error/warning still remains. > >> > >> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

linux-next: build failure after merge of the crypto tree

2019-08-04 Thread Stephen Rothwell
Hi all, After merging the crypto tree, today's linux-next build (sparc64 defconfig) failed like this: drivers/char/hw_random/n2-drv.c: In function 'n2rng_probe': drivers/char/hw_random/n2-drv.c:771:29: error: 'pdev' undeclared (first use in this function); did you mean 'cdev'? err = devm_hwrng

Re: linux-next: build warning after merge of the driver-core tree

2019-08-04 Thread Stephen Rothwell
Hi all, On Mon, 5 Aug 2019 13:04:03 +1000 Stephen Rothwell wrote: > > After merging the driver-core tree, today's linux-next build (powerpc > ppc64_defconfig) produced this warning: > > drivers/of/platform.c:674:12: warning: 'of_link_to_suppliers' defined but not > used [-Wunused-function] >

Re: [PATCH] cpufreq: schedutil: fix equation in comment

2019-08-04 Thread Viresh Kumar
On 02-08-19, 11:46, Qais Yousef wrote: > scale_irq_capacity() call in schedutil_cpu_util() does > > util *= (max - irq) > util /= max > > But the comment says > > util *= (1 - irq) > util /= max > > Fix the comment to match what the scaling function does. > > Signed-off

Re: drivers/infiniband/core/.tmp_gl_uverbs_main.o:undefined reference to `__user_bad'

2019-08-04 Thread Randy Dunlap
On 4/2/19 7:38 PM, Randy Dunlap wrote: > On 2/28/19 1:03 AM, kbuild test robot wrote: >> Hi Jason, >> >> FYI, the error/warning still remains. >> >> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git >> master >> head: 7d762d69145a54d169f58e56d6dac57a5508debc >> commit: 3

RE: [PATCH v5 3/4] dt-bindings: mailbox: imx-mu: add imx7ulp MU support

2019-08-04 Thread Aisheng Dong
> From: Richard Zhu > Sent: Monday, August 5, 2019 10:52 AM > > There is a version 1.0 MU on imx7ulp, use "fsl,imx7ulp-mu" compatible to > support it. > > Signed-off-by: Richard Zhu Reviewed-by: Dong Aisheng Regards Aisheng

RE: [PATCH v5 2/4] mailbox: imx: Clear the right interrupts at shutdown

2019-08-04 Thread Aisheng Dong
> From: Richard Zhu > Sent: Monday, August 5, 2019 10:51 AM > > Make sure to only clear enabled interrupts keeping count of the connection > type. > > Suggested-by: Oleksij Rempel > Signed-off-by: Daniel Baluta > Signed-off-by: Richard Zhu Keep original author if any. Otherwise: Reviewed-by:

Re: [PATCH V2 7/9] vhost: do not use RCU to synchronize MMU notifier with worker

2019-08-04 Thread Jason Wang
On 2019/8/5 下午12:36, Jason Wang wrote: On 2019/8/2 下午10:27, Michael S. Tsirkin wrote: On Fri, Aug 02, 2019 at 09:46:13AM -0300, Jason Gunthorpe wrote: On Fri, Aug 02, 2019 at 05:40:07PM +0800, Jason Wang wrote: This must be a proper barrier, like a spinlock, mutex, or synchronize_rcu. I s

Re: [PATCH] drivers:staging:isdn:hysdn brace same line if

2019-08-04 Thread Greg KH
A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? A: No. Q: Should I include quotations after my reply? http://daringfireball.net/2007/07/on_top On Sun, Aug 04, 2019 at 10:

Re: [PATCH V2 7/9] vhost: do not use RCU to synchronize MMU notifier with worker

2019-08-04 Thread Jason Wang
On 2019/8/4 下午4:07, Michael S. Tsirkin wrote: On Sat, Aug 03, 2019 at 09:14:00PM -0300, Jason Gunthorpe wrote: On Sat, Aug 03, 2019 at 05:36:13PM -0400, Michael S. Tsirkin wrote: On Fri, Aug 02, 2019 at 02:24:18PM -0300, Jason Gunthorpe wrote: On Fri, Aug 02, 2019 at 10:27:21AM -0400, Michae

RE: [PATCH v5 1/4] mailbox: imx: Fix Tx doorbell shutdown path

2019-08-04 Thread Aisheng Dong
> From: Richard Zhu > Sent: Monday, August 5, 2019 10:51 AM > > Tx doorbell is handled by txdb_tasklet and doesn't have an associated IRQ. > > Anyhow, imx_mu_shutdown ignores this and tries to free an IRQ that wasn't > requested for Tx DB resulting in the following warning: > > [1.967644] T

Re: [PATCH V2 7/9] vhost: do not use RCU to synchronize MMU notifier with worker

2019-08-04 Thread Jason Wang
On 2019/8/2 下午10:27, Michael S. Tsirkin wrote: On Fri, Aug 02, 2019 at 09:46:13AM -0300, Jason Gunthorpe wrote: On Fri, Aug 02, 2019 at 05:40:07PM +0800, Jason Wang wrote: This must be a proper barrier, like a spinlock, mutex, or synchronize_rcu. I start with synchronize_rcu() but both you

Re: [RFC] mm/pgtable/debug: Add test validating architecture page table helpers

2019-08-04 Thread Anshuman Khandual
On 07/30/2019 10:33 PM, Matthew Wilcox wrote: > On Mon, Jul 29, 2019 at 02:02:52PM +0530, Anshuman Khandual wrote: >> On 07/27/2019 01:24 AM, Matthew Wilcox wrote: >>> On Fri, Jul 26, 2019 at 10:17:11AM +0530, Anshuman Khandual wrote: > But 'page' isn't necessarily PMD-aligned. I don't thin

Re: [PATCH V2 7/9] vhost: do not use RCU to synchronize MMU notifier with worker

2019-08-04 Thread Jason Wang
On 2019/8/2 下午10:03, Michael S. Tsirkin wrote: On Fri, Aug 02, 2019 at 05:40:07PM +0800, Jason Wang wrote: Btw, I come up another idea, that is to disable preemption when vhost thread need to access the memory. Then register preempt notifier and if vhost thread is preempted, we're sure no one

Re: [PATCH 2/2] mm/zsmalloc.c: Fix race condition in zs_destroy_pool

2019-08-04 Thread Minchan Kim
Hi Henry, On Thu, Aug 01, 2019 at 06:53:32PM -0700, Henry Burns wrote: > In zs_destroy_pool() we call flush_work(&pool->free_work). However, we > have no guarantee that migration isn't happening in the background > at that time. > > Since migration can't directly free pages, it relies on free_wor

[PATCH] seq_file: fix problem when seeking mid-record.

2019-08-04 Thread NeilBrown
If you use lseek or similar (e.g. pread) to access a location in a seq_file file that is within a record, rather than at a record boundary, then the first read will return the remainder of the record, and the second read will return the whole of that same record (instead of the next record). Whnn

Re: [PATCH V2 7/9] vhost: do not use RCU to synchronize MMU notifier with worker

2019-08-04 Thread Jason Wang
On 2019/8/2 下午8:46, Jason Gunthorpe wrote: On Fri, Aug 02, 2019 at 05:40:07PM +0800, Jason Wang wrote: This must be a proper barrier, like a spinlock, mutex, or synchronize_rcu. I start with synchronize_rcu() but both you and Michael raise some concern. I've also idly wondered if calling sy

Re: [PATCH RFC tip/core/rcu 14/14] rcu/nohz: Make multi_cpu_stop() enable tick on all online CPUs

2019-08-04 Thread Paul E. McKenney
On Sun, Aug 04, 2019 at 01:24:46PM -0700, Paul E. McKenney wrote: > On Sun, Aug 04, 2019 at 11:41:59AM -0700, Paul E. McKenney wrote: > > On Sun, Aug 04, 2019 at 04:48:35PM +0200, Peter Zijlstra wrote: > > > On Sun, Aug 04, 2019 at 04:43:17PM +0200, Peter Zijlstra wrote: > > > > On Fri, Aug 02, 201

Re: [PATCH 4.19 21/32] vhost_net: fix possible infinite loop

2019-08-04 Thread Jason Wang
On 2019/8/4 上午5:49, Pavel Machek wrote: Hi! This makes it possible to trigger a infinite while..continue loop through the co-opreation of two VMs like: 1) Malicious VM1 allocate 1 byte rx buffer and try to slow down the vhost process as much as possible e.g using indirect descriptors or

Re: [PATCH 1/2] mm/zsmalloc.c: Migration can leave pages in ZS_EMPTY indefinitely

2019-08-04 Thread Minchan Kim
On Thu, Aug 01, 2019 at 06:53:31PM -0700, Henry Burns wrote: > In zs_page_migrate() we call putback_zspage() after we have finished > migrating all pages in this zspage. However, the return value is ignored. > If a zs_free() races in between zs_page_isolate() and zs_page_migrate(), > freeing the la

Re: [PATCH v2 20/34] xen: convert put_page() to put_user_page*()

2019-08-04 Thread Juergen Gross
On 05.08.19 00:49, john.hubb...@gmail.com wrote: From: John Hubbard For pages that were retained via get_user_pages*(), release those pages via the new put_user_page*() routines, instead of via put_page() or release_pages(). This is part a tree-wide conversion, as described in commit fc1d8e7cc

[PATCHv2 1/3] dt-bindings: pci: layerscape-pci: add compatible strings "fsl,ls1028a-pcie"

2019-08-04 Thread Xiaowei Bao
Add the PCIe compatible string for LS1028A Signed-off-by: Xiaowei Bao --- v2: - no change. Documentation/devicetree/bindings/pci/layerscape-pci.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/pci/layerscape-pci.txt b/Documentation/devicetree/bindings/

[PATCHv2 3/3] PCI: layerscape: Add LS1028a support

2019-08-04 Thread Xiaowei Bao
Add support for the LS1028a PCIe controller. Signed-off-by: Xiaowei Bao --- v2: - no change. drivers/pci/controller/dwc/pci-layerscape.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/pci/controller/dwc/pci-layerscape.c b/drivers/pci/controller/dwc/pci-layerscape.c index

[PATCHv2 2/3] arm64: dts: ls1028a: Add PCIe controller DT nodes

2019-08-04 Thread Xiaowei Bao
LS1028a implements 2 PCIe 3.0 controllers. Signed-off-by: Xiaowei Bao --- v2: - Fix up the legacy INTx allocate failed issue. arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi | 52 ++ 1 file changed, 52 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1028a

Re: [PATCH v6 02/57] bus: sunxi-rsb: Remove dev_err() usage after platform_get_irq()

2019-08-04 Thread Chen-Yu Tsai
Hi, On Wed, Jul 31, 2019 at 2:16 AM Stephen Boyd wrote: > > We don't need dev_err() messages when platform_get_irq() fails now that > platform_get_irq() prints an error message itself when something goes > wrong. Let's remove these prints with a simple semantic patch. > > // > @@ > expression re

Re: [PATCH] sh: Drop -Werror from kernel Makefile

2019-08-04 Thread Rich Felker
On Sun, Aug 04, 2019 at 07:14:23PM -0700, Guenter Roeck wrote: > Since commit a035d552a93b ("Makefile: Globally enable fall-through > warning"), all sh builds fail with errors such as > > arch/sh/kernel/disassemble.c: In function 'print_sh_insn': > arch/sh/kernel/disassemble.c:478:8: error: this s

[PATCH v5 0/4] mailbox: imx: bug fix and add support for imx v1 mu

2019-08-04 Thread Richard Zhu
Change logs: v4 --> v5: - Include Daniel's patch-set into this one. v3 --> v4: - Change "version1.0" to "version 1.0" in the commit log. - Update the devicetree binding document to support the imx7ulp mu. - Rebase the patch refer to the following bug-fixs patch-set issued by Daniel Balut

[PATCH v5 4/4] mailbox: imx: add support for imx v1 mu

2019-08-04 Thread Richard Zhu
There is a version 1.0 MU on i.MX7ULP platform. One new version ID register is added, and it's offset is 0. TRn registers are defined at the offset 0x20 ~ 0x2C. RRn registers are defined at the offset 0x40 ~ 0x4C. SR/CR registers are defined at 0x60/0x64. Extend this driver to support it. Signed-o

[PATCH v5 3/4] dt-bindings: mailbox: imx-mu: add imx7ulp MU support

2019-08-04 Thread Richard Zhu
There is a version 1.0 MU on imx7ulp, use "fsl,imx7ulp-mu" compatible to support it. Signed-off-by: Richard Zhu --- Documentation/devicetree/bindings/mailbox/fsl,mu.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/mailbox/fsl,mu.txt b/Documentation/dev

[PATCH v5 2/4] mailbox: imx: Clear the right interrupts at shutdown

2019-08-04 Thread Richard Zhu
Make sure to only clear enabled interrupts keeping count of the connection type. Suggested-by: Oleksij Rempel Signed-off-by: Daniel Baluta Signed-off-by: Richard Zhu --- drivers/mailbox/imx-mailbox.c | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/drivers/m

[PATCH v5 1/4] mailbox: imx: Fix Tx doorbell shutdown path

2019-08-04 Thread Richard Zhu
Tx doorbell is handled by txdb_tasklet and doesn't have an associated IRQ. Anyhow, imx_mu_shutdown ignores this and tries to free an IRQ that wasn't requested for Tx DB resulting in the following warning: [1.967644] Trying to free already-free IRQ 26 [1.972108] WARNING: CPU: 2 PID: 157 at

Linux Kernel 5.1.21

2019-08-04 Thread Nathaniel Russell
I'm getting an error message when the uvcvideo module is loaded into the kernel. Can somebody help me figure this out please? [0.00] Linux version 5.1.21 (r...@dad.example.net) (gcc version 9.1.0 (GCC)) #3 SMP Sun Aug 4 14:54:49 CDT 2019 [0.00] Command line: BOOT_IMAGE=/bzImage roo

Re: [Ocfs2-devel] [PATCH 1/3 v2] fs: ocfs2: Fix possible null-pointer dereferences in ocfs2_xa_prepare_entry()

2019-08-04 Thread Changwei Ge
Hi Jia-Ju, Please checkout my comments inline. On 2019/7/27 8:49 上午, Joseph Qi wrote: On 19/7/26 18:14, Jia-Ju Bai wrote: In ocfs2_xa_prepare_entry(), there is an if statement on line 2136 to check whether loc->xl_entry is NULL: if (loc->xl_entry) When loc->xl_entry is NULL, it is use

  1   2   3   >