Re: [RFC 0/4] Virtio uses DMA API for all devices

2018-09-09 Thread Christoph Hellwig
On Thu, Sep 06, 2018 at 07:09:09PM -0500, Jiandi An wrote: > For virtio device we have to pass in iommu_platform=true flag for > this to set the VIRTIO_F_IOMMU_PLATFORM flag. But for example > QEMU has the use of iommu_platform attribute disabled for virtio-gpu > device. So would also like to move

[PATCH] powerpc: fix csum_ipv6_magic() on little endian platforms

2018-09-09 Thread Christophe Leroy
On little endian platforms, csum_ipv6_magic() keeps len and proto in CPU byte order. This generates a bad results leading to ICMPv6 packets from other hosts being dropped by powerpc64le platforms. In order to fix this, len and proto should be converted to network byte order ie bigendian byte order

Re: [RFC PATCH v1 00/17] ban the use of _PAGE_XXX flags outside platform specific code

2018-09-09 Thread Aneesh Kumar K.V
Christophe Leroy writes: > On 09/06/2018 09:58 AM, Aneesh Kumar K.V wrote: >> Christophe Leroy writes: >> >>> Today flags like for instance _PAGE_RW or _PAGE_USER are used through >>> common parts of code. >>> Using those directly in common parts of code have proven to lead to >>> mistakes or m

Re: [PATCH] powerpc/powernv: Make possible for user to force a full ipl cec reboot

2018-09-09 Thread Vaibhav Jain
Thanks for looking into this patch Stewart Stewart Smith writes: > We're about to introduce an MPIPL reboot type (to take a firmware > assisted kdump style thing), and we maybe should have a reboot type to > force attempting a fast-reboot, and this makes me think if we should add > those in now?

[PATCH] powerpc: Avoid code patching freed init sections

2018-09-09 Thread Michael Neuling
This stops us from doing code patching in init sections after they've been freed. In this chain: kvm_guest_init() -> kvm_use_magic_page() -> fault_in_pages_readable() -> __get_user() -> __get_user_nocheck() -> barrier_nospec(); We have a code patching

Re: MPC83xx reset status register (RSR, offset 0x910)

2018-09-09 Thread Christophe LEROY
Hi, Le 10/09/2018 à 01:13, Radu Rendec a écrit : Hi, On Fri, 2018-08-24 at 16:20 +, Christophe Leroy wrote: On 08/03/2018 04:36 PM, Radu Rendec wrote: Is there any kernel code that handles the "reset status register" (RSR) on MPC83xx? I looked at arch/powerpc/platforms/83xx/misc.c, but it

Re: [PATCH 0/5] introduce setbits32/clrbits32/clrsetbits32/setbits64/clrbits64/clrsetbits64 functions

2018-09-09 Thread Christophe LEROY
Le 07/09/2018 à 21:41, Corentin Labbe a écrit : Hello This patchset adds a new set of functions which are open-coded in lot of place. Basicly the pattern is always the same, "read, modify a bit, write" some driver already have thoses pattern them as functions. (like ahci_sunxi.c or dwmac-mes

Re: [PATCH 2/5] include: add setbits32/clrbits32/clrsetbits32/setbits64/clrbits64/clrsetbits64 in linux/setbits.h

2018-09-09 Thread Christophe LEROY
Le 07/09/2018 à 21:41, Corentin Labbe a écrit : This patch adds setbits32/clrbits32/clrsetbits32 and setbits64/clrbits64/clrsetbits64 in linux/setbits.h header. So you changed the name of setbits32() ... to setbits32_be() and now you are adding new functions called setbits32() ... which do

Re: [PATCH 1/5] powerpc: rename setbits32/clrbits32 to setbits32_be/clrbits32_be

2018-09-09 Thread Christophe LEROY
Le 07/09/2018 à 21:41, Corentin Labbe a écrit : Since setbits32/clrbits32 work on be32, it's better to remove ambiguity on the used data type. Wouldn't it be better to call them setbits_be32() / clrbits_be32() to have something looking similar to in_be32() / ou_be32() ? Christophe Sign

Re: [PATCH v2 5/5] PCI/powerpc/eeh: Add pcibios hooks for preparing to rescan

2018-09-09 Thread Sam Bobroff
Hi Sergey, On Thu, Sep 06, 2018 at 02:57:52PM +0300, Sergey Miroshnichenko wrote: > Reading an empty slot returns all ones, which triggers a false > EEH error event on PowerNV. > > New callbacks pcibios_rescan_prepare/done are introduced to > pause/resume the EEH during rescan. If I understand i

Re: [PATCH kernel] KVM: PPC: Remove redundand permission bits removal

2018-09-09 Thread David Gibson
On Thu, Sep 06, 2018 at 07:51:46PM +1000, Alexey Kardashevskiy wrote: > The kvmppc_gpa_to_ua() helper itself takes care of the permission > bits in the TCE and yet every single caller removes them. > > This changes semantics of kvmppc_gpa_to_ua() so it takes TCEs > (which are GPAs + TCE permission

Re: [PATCH v2 2/5] powerpc/pci: Create pci_dn on demand

2018-09-09 Thread Sam Bobroff
Hi Sergey, On Thu, Sep 06, 2018 at 02:57:49PM +0300, Sergey Miroshnichenko wrote: > The pci_dn structures can be created not only from DT, but also > directly from newly discovered PCIe devices, so allocate them > dynamically. > > Signed-off-by: Sergey Miroshnichenko > --- > arch/powerpc/kernel

Re: [PATCH] powerpc/powernv: Make possible for user to force a full ipl cec reboot

2018-09-09 Thread Stewart Smith
Vaibhav Jain writes: > Ever since fast reboot is enabled by default in opal, > opal_cec_reboot() will use fast-reset instead of full IPL to perform > system reboot. This leaves the user with no direct way to force a full > IPL reboot except changing an nvram setting that persistently disables > fa

Re: [PATCH v2 1/5] powerpc/pci: Access PCI config space directly w/o pci_dn

2018-09-09 Thread Sam Bobroff
Hi Sergey, On Thu, Sep 06, 2018 at 02:57:48PM +0300, Sergey Miroshnichenko wrote: > The pci_dn structures are retrieved from a DT, but hot-plugged PCIe > devices don't have them. Don't stop PCIe I/O in absence of pci_dn, so > it is now possible to discover new devices. > > Signed-off-by: Sergey M

RE: [PATCH 3/3] soc: fsl: add RCPM driver

2018-09-09 Thread Ran Wang
Hi Leo, On 2018/9/7 4:51, Yang Li wrote: > > On Fri, Sep 7, 2018 at 4:51 AM Ran Wang wrote: > > > > Hi Leo, > > > > On September 05, 2018 at 11:22 Yang Li wrote: > > > -Original Message- > > > From: Li Yang > > > Sent: Wednesday, September 05, 2018 11:22 > > > To: dongsheng.w...@hxt-sem

RE: [PATCH 1/3] soc: fsl: add Platform PM driver QorIQ platforms

2018-09-09 Thread Ran Wang
Hi Dongsheng, On 2018/9/7 18:16, Dongsheng Wang wrote: > > On 2018/9/7 16:49, Ran Wang wrote: > > Hi Dongsheng > > > >> On 2018/9/5 11:05, Dongsheng Wang wrote: > >> > >> Please change your comments style. > >> > >> On 2018/8/31 11:57, Ran Wang wrote: > >>> This driver is to provide a independent

Re: v4.17 regression: PowerMac G3 won't boot, was Re: [PATCH v5 1/3] of: cache phandle nodes to reduce cost of of_find_node_by_phandle()

2018-09-09 Thread Frank Rowand
On 09/09/18 10:04, Benjamin Herrenschmidt wrote: > On Fri, 2018-08-31 at 14:58 +1000, Benjamin Herrenschmidt wrote: >> >>> A long shot, but something to consider, is that I failed to cover the >>> cases of dynamic devicetree updates (removing nodes that contain a >>> phandle) in ways other than ove

Re: [PATCH v2 6/9] kbuild: consolidate Devicetree dtb build rules

2018-09-09 Thread Masahiro Yamada
2018-09-06 8:53 GMT+09:00 Rob Herring : > There is nothing arch specific about building dtb files other than their > location under /arch/*/boot/dts/. Keeping each arch aligned is a pain. > The dependencies and supported targets are all slightly different. > Also, a cross-compiler for each arch is

Re: MPC83xx reset status register (RSR, offset 0x910)

2018-09-09 Thread Radu Rendec
Hi, On Fri, 2018-08-24 at 16:20 +, Christophe Leroy wrote: > > On 08/03/2018 04:36 PM, Radu Rendec wrote: > > > > Is there any kernel code that handles the "reset status register" (RSR) > > on MPC83xx? I looked at arch/powerpc/platforms/83xx/misc.c, but it seems > > to only map the reset regis

Re: [PATCH] [RFC v2] Drop all 00-INDEX files from Documentation/

2018-09-09 Thread Jonathan Corbet
On Tue, 4 Sep 2018 00:15:23 +0200 Henrik Austad wrote: > I don't really have an opinion to whether or not we /should/ have 00-INDEX, > but the above 00-INDEX should either be removed or be kept up to date. If > we should keep the files, I can try to keep them updated, but I rather not > if we ju

Re: v4.17 regression: PowerMac G3 won't boot, was Re: [PATCH v5 1/3] of: cache phandle nodes to reduce cost of of_find_node_by_phandle()

2018-09-09 Thread Benjamin Herrenschmidt
On Fri, 2018-08-31 at 14:58 +1000, Benjamin Herrenschmidt wrote: > > > A long shot, but something to consider, is that I failed to cover the > > cases of dynamic devicetree updates (removing nodes that contain a > > phandle) in ways other than overlays. Michael Ellerman has reported > > such a pr

Re: [PATCH RFC 3/5] coccinelle: add xxxsetbitsXX converting spatch

2018-09-09 Thread SF Markus Elfring
How do you think about to add any more meta-data for this semantic patch script? * SPDX identifier * Copyright information * Confidence level https://bottest.wiki.kernel.org/coccicheck > +virtual context Further variables will be needed if you would like to use corresponding operation modes (b