Re: [PATCH v2] cxl: Wrap iterations over afu slices inside 'afu_list_lock'

2019-01-28 Thread Frederic Barrat
Hi Vaibhav, 2 comments below (one of which I missed on the previous iteration, sorry). Le 26/01/2019 à 12:46, Vaibhav Jain a écrit : Within cxl module, iteration over array 'adapter->slices' may be racy at few points as it might be simultaneously read during an EEH and its contents being set

Re: [PATCH v4] kbuild: Add support for DT binding schema checks

2019-01-28 Thread Geert Uytterhoeven
Hi Rob, On Sun, Jan 27, 2019 at 4:00 AM Rob Herring wrote: > On Wed, Jan 23, 2019 at 9:33 AM Geert Uytterhoeven > wrote: > > On Tue, Dec 11, 2018 at 9:24 PM Rob Herring wrote: > > > This adds the build infrastructure for checking DT binding schema > > > documents and validating dts files

Re: [RFC PATCH 2/2] cxl: Force a CAPP reset when unloading CXL module

2019-01-28 Thread Frederic Barrat
Le 25/01/2019 à 06:11, Vaibhav Jain a écrit : This patch forces shutdown of CAPP when CXL module is unloaded. This is accomplished via a call to pnv_phb_to_cxl_mode() with mode == OPAL_PHB_CAPI_MODE_PCIE. Signed-off-by: Vaibhav Jain --- drivers/misc/cxl/cxl.h | 1 +

Re: [PATCH 00/11] Refactor exception entry on 40x/6xx/8xx

2019-01-28 Thread Christoph Hellwig
On Mon, Jan 28, 2019 at 11:11:10AM +, Christophe Leroy wrote: > This serie refactors exception entry macros for 40x, 6xx and 8xx > > This serie will benefit to the implementation of CONFIG_VMAP, and also > to Ben's serie on MSR_EE. We don't have a CONFIG_VMAP. Do you mean CONFIG_VMAP_STACK

Re: [PATCH v4] kbuild: Add support for DT binding schema checks

2019-01-28 Thread Geert Uytterhoeven
Hi Rob, On Mon, Jan 28, 2019 at 4:35 PM Rob Herring wrote: > On Mon, Jan 28, 2019 at 3:43 AM Geert Uytterhoeven > wrote: > > On Tue, Dec 11, 2018 at 9:24 PM Rob Herring wrote: > > > This adds the build infrastructure for checking DT binding schema > > > documents and validating dts files

[PATCH AUTOSEL 4.20 253/304] powerpc/mm: Fix reporting of kernel execute faults on the 8xx

2019-01-28 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit ffca395b11c4a5a6df6d6345f794b0e3d578e2d0 ] On the 8xx, no-execute is set via PPP bits in the PTE. Therefore a no-exec fault generates DSISR_PROTFAULT error bits, not DSISR_NOEXEC_OR_G. This patch adds DSISR_PROTFAULT in the test mask. Fixes:

[PATCH AUTOSEL 4.20 286/304] block/swim3: Fix -EBUSY error when re-opening device after unmount

2019-01-28 Thread Sasha Levin
From: Finn Thain [ Upstream commit 296dcc40f2f2e402facf7cd26cf3f2c8f4b17d47 ] When the block device is opened with FMODE_EXCL, ref_count is set to -1. This value doesn't get reset when the device is closed which means the device cannot be opened again. Fix this by checking for refcount <= 0 in

Re: [RFC PATCH 1/2] powerpc/powernv: Add support for CXL mode switch that need PHB reset

2019-01-28 Thread Frederic Barrat
Le 25/01/2019 à 06:11, Vaibhav Jain a écrit : Recent updates to OPAL [1] have provided support for new CXL modes on PHB that need to force a cold reset on the bridge (CRESET). However PHB CRESET is a multi step process and cannot be completed synchronously as expected by current kernel

[PATCH AUTOSEL 4.20 078/304] powerpc/32: Add .data..Lubsan_data*/.data..Lubsan_type* sections explicitly

2019-01-28 Thread Sasha Levin
From: Mathieu Malaterre [ Upstream commit beba24ac59133cb36ecd03f9af9ccb11971ee20e ] When both `CONFIG_LD_DEAD_CODE_DATA_ELIMINATION=y` and `CONFIG_UBSAN=y` are set, link step typically produce numberous warnings about orphan section: + powerpc-linux-gnu-ld -EB -m elf32ppc -Bstatic

[PATCH AUTOSEL 4.20 258/304] powerpc/fadump: Do not allow hot-remove memory from fadump reserved area.

2019-01-28 Thread Sasha Levin
From: Mahesh Salgaonkar [ Upstream commit 0db6896ff6332ba694f1e61b93ae3b2640317633 ] For fadump to work successfully there should not be any holes in reserved memory ranges where kernel has asked firmware to move the content of old kernel memory in event of crash. Now that fadump uses CMA for

[PATCH AUTOSEL 4.20 291/304] block/swim3: Fix regression on PowerBook G3

2019-01-28 Thread Sasha Levin
From: Finn Thain [ Upstream commit 427c5ce4417cba0801fbf79c8525d1330704759c ] As of v4.20, the swim3 driver crashes when loaded on a PowerBook G3 (Wallstreet). MacIO PCI driver attached to Gatwick chipset MacIO PCI driver attached to Heathrow chipset swim3 0.00015000:floppy: [fd0] SWIM3 floppy

Re: [PATCH] powerpc/pseries: Perform full re-add of CPU for topology update post-migration

2019-01-28 Thread Michael Bringmann
On 10/29/18 1:43 PM, Nathan Fontenot wrote: > On pseries systems, performing a partition migration can result in > altering the nodes a CPU is assigned to on the destination system. For > exampl, pre-migration on the source system CPUs are in node 1 and 3, > post-migration on the destination

[PATCH AUTOSEL 4.20 222/304] powerpc/uaccess: fix warning/error with access_ok()

2019-01-28 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit 05a4ab823983d9136a460b7b5e0d49ee709a6f86 ] With the following piece of code, the following compilation warning is encountered: if (_IOC_DIR(ioc) != _IOC_NONE) { int verify = _IOC_DIR(ioc) & _IOC_READ ? VERIFY_WRITE :

[PATCH AUTOSEL 4.19 023/258] powerpc/pseries: add of_node_put() in dlpar_detach_node()

2019-01-28 Thread Sasha Levin
From: Frank Rowand [ Upstream commit 5b3f5c408d8cc59b87e47f1ab9803dbd006e4a91 ] The previous commit, "of: overlay: add missing of_node_get() in __of_attach_node_sysfs" added a missing of_node_get() to __of_attach_node_sysfs(). This results in a refcount imbalance for nodes attached with

[PATCH AUTOSEL 4.20 027/304] powerpc/pseries: add of_node_put() in dlpar_detach_node()

2019-01-28 Thread Sasha Levin
From: Frank Rowand [ Upstream commit 5b3f5c408d8cc59b87e47f1ab9803dbd006e4a91 ] The previous commit, "of: overlay: add missing of_node_get() in __of_attach_node_sysfs" added a missing of_node_get() to __of_attach_node_sysfs(). This results in a refcount imbalance for nodes attached with

[PATCH AUTOSEL 4.20 181/304] KVM: PPC: Book3S: Only report KVM_CAP_SPAPR_TCE_VFIO on powernv machines

2019-01-28 Thread Sasha Levin
From: Suraj Jitindar Singh [ Upstream commit 693ac10a88a2219bde553b2e8460dbec97e594e6 ] The kvm capability KVM_CAP_SPAPR_TCE_VFIO is used to indicate the availability of in kernel tce acceleration for vfio. However it is currently the case that this is only available on a powernv machine, not

[PATCH AUTOSEL 4.20 233/304] powerpc/perf: Fix thresholding counter data for unknown type

2019-01-28 Thread Sasha Levin
From: Madhavan Srinivasan [ Upstream commit 17cfccc91545682513541924245abb876d296063 ] MMCRA[34:36] and MMCRA[38:44] expose the thresholding counter value. Thresholding counter can be used to count latency cycles such as load miss to reload. But threshold counter value is not relevant when the

Re: [RFC PATCH 0/2] cxl: Add support for disabling CAPP when unloading CXL

2019-01-28 Thread Frederic Barrat
Hi Vaibhav, I think there's value in there, as I'm hearing Mellanox would prefer to start from a "clean" state, as in pci mode, when they load their driver after a card FW update. However, I'm pretty reluctant to make it the default behaviour. It's not like we haven't had our share of

Re: [PATCH v4] kbuild: Add support for DT binding schema checks

2019-01-28 Thread Rob Herring
On Mon, Jan 28, 2019 at 3:43 AM Geert Uytterhoeven wrote: > > Hi Rob, > > On Tue, Dec 11, 2018 at 9:24 PM Rob Herring wrote: > > This adds the build infrastructure for checking DT binding schema > > documents and validating dts files using the binding schema. > > > > Check DT binding schema

Re: [PATCH] ucc_geth: Reset BQL queue when stopping device

2019-01-28 Thread Mathias Thore
Hi, This is what we observed: there was a storm on the medium so that our controller could not do its TX, resulting in timeout. When timeout occurs, the driver clears all descriptors from the TX queue. The function called in this patch is used to reflect this clearing also in the BQL layer.

Re: [PATCH 00/11] Refactor exception entry on 40x/6xx/8xx

2019-01-28 Thread Christophe Leroy
Le 28/01/2019 à 15:15, Christoph Hellwig a écrit : On Mon, Jan 28, 2019 at 11:11:10AM +, Christophe Leroy wrote: This serie refactors exception entry macros for 40x, 6xx and 8xx This serie will benefit to the implementation of CONFIG_VMAP, and also to Ben's serie on MSR_EE. We don't

Re: [REPOST PATCH v08 0/5] powerpc/hotplug: Update affinity for migrated CPUs

2019-01-28 Thread Michael Bringmann
On 8/21/18 10:33 AM, m...@linux.vnet.ibm.com wrote: > The migration of LPARs across Power systems affects many attributes > including that of the associativity of CPUs. The patches in this > set execute when a system is coming up fresh upon a migration target. > They are intended to, > > *

Re: [PATCH v4] kbuild: Add support for DT binding schema checks

2019-01-28 Thread Rob Herring
On Mon, Jan 28, 2019 at 2:59 AM Geert Uytterhoeven wrote: > > Hi Rob, > > On Sun, Jan 27, 2019 at 4:00 AM Rob Herring wrote: > > On Wed, Jan 23, 2019 at 9:33 AM Geert Uytterhoeven > > wrote: > > > On Tue, Dec 11, 2018 at 9:24 PM Rob Herring wrote: > > > > This adds the build infrastructure

[PATCH AUTOSEL 4.20 235/304] powerpc/powernv/ioda: Allocate indirect TCE levels of cached userspace addresses on demand

2019-01-28 Thread Sasha Levin
From: Alexey Kardashevskiy [ Upstream commit bdbf649efe21173cae63b4b71db84176420f9039 ] The powernv platform maintains 2 TCE tables for VFIO - a hardware TCE table and a table with userspace addresses; the latter is used for marking pages dirty when corresponging TCEs are unmapped from the

[PATCH AUTOSEL 4.19 150/258] KVM: PPC: Book3S: Only report KVM_CAP_SPAPR_TCE_VFIO on powernv machines

2019-01-28 Thread Sasha Levin
From: Suraj Jitindar Singh [ Upstream commit 693ac10a88a2219bde553b2e8460dbec97e594e6 ] The kvm capability KVM_CAP_SPAPR_TCE_VFIO is used to indicate the availability of in kernel tce acceleration for vfio. However it is currently the case that this is only available on a powernv machine, not

[PATCH AUTOSEL 4.19 195/258] powerpc/perf: Fix thresholding counter data for unknown type

2019-01-28 Thread Sasha Levin
From: Madhavan Srinivasan [ Upstream commit 17cfccc91545682513541924245abb876d296063 ] MMCRA[34:36] and MMCRA[38:44] expose the thresholding counter value. Thresholding counter can be used to count latency cycles such as load miss to reload. But threshold counter value is not relevant when the

[PATCH AUTOSEL 4.9 064/107] powerpc/uaccess: fix warning/error with access_ok()

2019-01-28 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit 05a4ab823983d9136a460b7b5e0d49ee709a6f86 ] With the following piece of code, the following compilation warning is encountered: if (_IOC_DIR(ioc) != _IOC_NONE) { int verify = _IOC_DIR(ioc) & _IOC_READ ? VERIFY_WRITE :

[PATCH AUTOSEL 3.18 07/61] powerpc/pseries: add of_node_put() in dlpar_detach_node()

2019-01-28 Thread Sasha Levin
From: Frank Rowand [ Upstream commit 5b3f5c408d8cc59b87e47f1ab9803dbd006e4a91 ] The previous commit, "of: overlay: add missing of_node_get() in __of_attach_node_sysfs" added a missing of_node_get() to __of_attach_node_sysfs(). This results in a refcount imbalance for nodes attached with

[PATCH] powerpc/mm: Add _PAGE_SAO to _PAGE_CACHE_CTL mask

2019-01-28 Thread Reza Arbab
In htab_convert_pte_flags(), _PAGE_CACHE_CTL is used to check for the _PAGE_SAO flag: else if ((pteflags & _PAGE_CACHE_CTL) == _PAGE_SAO) rflags |= (HPTE_R_W | HPTE_R_I | HPTE_R_M); But, it isn't defined to include that flag: #define _PAGE_CACHE_CTL (_PAGE_NON_IDEMPOTENT |

Re: [RFC 1/6] powerpc:/drc Define interface to acquire arch-specific drc info

2019-01-28 Thread Michael Bringmann
On 1/25/19 10:09 AM, Michael Bringmann wrote: > Adding Nathan Lynch > > On 1/24/19 6:04 PM, Tyrel Datwyler wrote: >> On 12/14/2018 12:50 PM, Michael Bringmann wrote: >>> Define interface to acquire arch-specific drc info to match against >>> hotpluggable devices. The current implementation

Re: What is CONFIG_RTAS ? Which CPUs are concerned

2019-01-28 Thread Segher Boessenkool
On Mon, Jan 28, 2019 at 07:20:43PM +0100, Christophe Leroy wrote: > I'm wondering what CONFIG_RTAS is. It makes use of one of the SPRN_SPRG, > ie SPRN_SPRG2. > > What are the CPUs concerned by RTAS ? Is there any of the old CPUs which > have only 4 SPRGs (eg the 601), or could we use one in

[PATCH AUTOSEL 4.19 065/258] powerpc/32: Add .data..Lubsan_data*/.data..Lubsan_type* sections explicitly

2019-01-28 Thread Sasha Levin
From: Mathieu Malaterre [ Upstream commit beba24ac59133cb36ecd03f9af9ccb11971ee20e ] When both `CONFIG_LD_DEAD_CODE_DATA_ELIMINATION=y` and `CONFIG_UBSAN=y` are set, link step typically produce numberous warnings about orphan section: + powerpc-linux-gnu-ld -EB -m elf32ppc -Bstatic

[PATCH AUTOSEL 4.19 212/258] powerpc/mm: Fix reporting of kernel execute faults on the 8xx

2019-01-28 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit ffca395b11c4a5a6df6d6345f794b0e3d578e2d0 ] On the 8xx, no-execute is set via PPP bits in the PTE. Therefore a no-exec fault generates DSISR_PROTFAULT error bits, not DSISR_NOEXEC_OR_G. This patch adds DSISR_PROTFAULT in the test mask. Fixes:

[PATCH AUTOSEL 4.19 243/258] block/swim3: Fix -EBUSY error when re-opening device after unmount

2019-01-28 Thread Sasha Levin
From: Finn Thain [ Upstream commit 296dcc40f2f2e402facf7cd26cf3f2c8f4b17d47 ] When the block device is opened with FMODE_EXCL, ref_count is set to -1. This value doesn't get reset when the device is closed which means the device cannot be opened again. Fix this by checking for refcount <= 0 in

[PATCH AUTOSEL 4.14 098/170] KVM: PPC: Book3S: Only report KVM_CAP_SPAPR_TCE_VFIO on powernv machines

2019-01-28 Thread Sasha Levin
From: Suraj Jitindar Singh [ Upstream commit 693ac10a88a2219bde553b2e8460dbec97e594e6 ] The kvm capability KVM_CAP_SPAPR_TCE_VFIO is used to indicate the availability of in kernel tce acceleration for vfio. However it is currently the case that this is only available on a powernv machine, not

[PATCH AUTOSEL 4.19 186/258] powerpc/uaccess: fix warning/error with access_ok()

2019-01-28 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit 05a4ab823983d9136a460b7b5e0d49ee709a6f86 ] With the following piece of code, the following compilation warning is encountered: if (_IOC_DIR(ioc) != _IOC_NONE) { int verify = _IOC_DIR(ioc) & _IOC_READ ? VERIFY_WRITE :

[PATCH AUTOSEL 4.14 134/170] powerpc/mm: Fix reporting of kernel execute faults on the 8xx

2019-01-28 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit ffca395b11c4a5a6df6d6345f794b0e3d578e2d0 ] On the 8xx, no-execute is set via PPP bits in the PTE. Therefore a no-exec fault generates DSISR_PROTFAULT error bits, not DSISR_NOEXEC_OR_G. This patch adds DSISR_PROTFAULT in the test mask. Fixes:

[PATCH AUTOSEL 4.9 011/107] powerpc/pseries: add of_node_put() in dlpar_detach_node()

2019-01-28 Thread Sasha Levin
From: Frank Rowand [ Upstream commit 5b3f5c408d8cc59b87e47f1ab9803dbd006e4a91 ] The previous commit, "of: overlay: add missing of_node_get() in __of_attach_node_sysfs" added a missing of_node_get() to __of_attach_node_sysfs(). This results in a refcount imbalance for nodes attached with

[PATCH AUTOSEL 4.4 10/80] powerpc/pseries: add of_node_put() in dlpar_detach_node()

2019-01-28 Thread Sasha Levin
From: Frank Rowand [ Upstream commit 5b3f5c408d8cc59b87e47f1ab9803dbd006e4a91 ] The previous commit, "of: overlay: add missing of_node_get() in __of_attach_node_sysfs" added a missing of_node_get() to __of_attach_node_sysfs(). This results in a refcount imbalance for nodes attached with

Re: [PATCH 05/19] KVM: PPC: Book3S HV: add a new KVM device for the XIVE native exploitation mode

2019-01-28 Thread Cédric Le Goater
On 1/22/19 6:05 AM, Paul Mackerras wrote: > On Mon, Jan 07, 2019 at 07:43:17PM +0100, Cédric Le Goater wrote: >> This is the basic framework for the new KVM device supporting the XIVE >> native exploitation mode. The user interface exposes a new capability >> and a new KVM device to be used by

[PATCH AUTOSEL 4.14 122/170] powerpc/perf: Fix thresholding counter data for unknown type

2019-01-28 Thread Sasha Levin
From: Madhavan Srinivasan [ Upstream commit 17cfccc91545682513541924245abb876d296063 ] MMCRA[34:36] and MMCRA[38:44] expose the thresholding counter value. Thresholding counter can be used to count latency cycles such as load miss to reload. But threshold counter value is not relevant when the

[PATCH AUTOSEL 4.14 159/170] block/swim3: Fix -EBUSY error when re-opening device after unmount

2019-01-28 Thread Sasha Levin
From: Finn Thain [ Upstream commit 296dcc40f2f2e402facf7cd26cf3f2c8f4b17d47 ] When the block device is opened with FMODE_EXCL, ref_count is set to -1. This value doesn't get reset when the device is closed which means the device cannot be opened again. Fix this by checking for refcount <= 0 in

[PATCH AUTOSEL 4.4 48/80] powerpc/uaccess: fix warning/error with access_ok()

2019-01-28 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit 05a4ab823983d9136a460b7b5e0d49ee709a6f86 ] With the following piece of code, the following compilation warning is encountered: if (_IOC_DIR(ioc) != _IOC_NONE) { int verify = _IOC_DIR(ioc) & _IOC_READ ? VERIFY_WRITE :

[PATCH AUTOSEL 4.19 197/258] powerpc/powernv/ioda: Allocate indirect TCE levels of cached userspace addresses on demand

2019-01-28 Thread Sasha Levin
From: Alexey Kardashevskiy [ Upstream commit bdbf649efe21173cae63b4b71db84176420f9039 ] The powernv platform maintains 2 TCE tables for VFIO - a hardware TCE table and a table with userspace addresses; the latter is used for marking pages dirty when corresponging TCEs are unmapped from the

[PATCH AUTOSEL 4.19 216/258] powerpc/fadump: Do not allow hot-remove memory from fadump reserved area.

2019-01-28 Thread Sasha Levin
From: Mahesh Salgaonkar [ Upstream commit 0db6896ff6332ba694f1e61b93ae3b2640317633 ] For fadump to work successfully there should not be any holes in reserved memory ranges where kernel has asked firmware to move the content of old kernel memory in event of crash. Now that fadump uses CMA for

[PATCH AUTOSEL 4.14 138/170] powerpc/fadump: Do not allow hot-remove memory from fadump reserved area.

2019-01-28 Thread Sasha Levin
From: Mahesh Salgaonkar [ Upstream commit 0db6896ff6332ba694f1e61b93ae3b2640317633 ] For fadump to work successfully there should not be any holes in reserved memory ranges where kernel has asked firmware to move the content of old kernel memory in event of crash. Now that fadump uses CMA for

[PATCH AUTOSEL 4.9 100/107] block/swim3: Fix -EBUSY error when re-opening device after unmount

2019-01-28 Thread Sasha Levin
From: Finn Thain [ Upstream commit 296dcc40f2f2e402facf7cd26cf3f2c8f4b17d47 ] When the block device is opened with FMODE_EXCL, ref_count is set to -1. This value doesn't get reset when the device is closed which means the device cannot be opened again. Fix this by checking for refcount <= 0 in

Re: [RFC PATCH 1/2] powerpc/powernv: Add support for CXL mode switch that need PHB reset

2019-01-28 Thread christophe lombard
On 25/01/2019 06:11, Vaibhav Jain wrote: Recent updates to OPAL [1] have provided support for new CXL modes on PHB that need to force a cold reset on the bridge (CRESET). However PHB CRESET is a multi step process and cannot be completed synchronously as expected by current kernel implementation

[PATCH AUTOSEL 4.14 016/170] powerpc/pseries: add of_node_put() in dlpar_detach_node()

2019-01-28 Thread Sasha Levin
From: Frank Rowand [ Upstream commit 5b3f5c408d8cc59b87e47f1ab9803dbd006e4a91 ] The previous commit, "of: overlay: add missing of_node_get() in __of_attach_node_sysfs" added a missing of_node_get() to __of_attach_node_sysfs(). This results in a refcount imbalance for nodes attached with

[PATCH AUTOSEL 4.14 113/170] powerpc/uaccess: fix warning/error with access_ok()

2019-01-28 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit 05a4ab823983d9136a460b7b5e0d49ee709a6f86 ] With the following piece of code, the following compilation warning is encountered: if (_IOC_DIR(ioc) != _IOC_NONE) { int verify = _IOC_DIR(ioc) & _IOC_READ ? VERIFY_WRITE :

Re: use generic DMA mapping code in powerpc V4

2019-01-28 Thread Christoph Hellwig
On Mon, Jan 28, 2019 at 08:04:22AM +0100, Christoph Hellwig wrote: > On Sun, Jan 27, 2019 at 02:13:09PM +0100, Christian Zigotzky wrote: > > Christoph, > > > > What shall I do next? > > I'll need to figure out what went wrong with the new zone selection > on powerpc and give you another branch to

[PATCH AUTOSEL 4.4 76/80] block/swim3: Fix -EBUSY error when re-opening device after unmount

2019-01-28 Thread Sasha Levin
From: Finn Thain [ Upstream commit 296dcc40f2f2e402facf7cd26cf3f2c8f4b17d47 ] When the block device is opened with FMODE_EXCL, ref_count is set to -1. This value doesn't get reset when the device is closed which means the device cannot be opened again. Fix this by checking for refcount <= 0 in

[PATCH AUTOSEL 3.18 36/61] powerpc/uaccess: fix warning/error with access_ok()

2019-01-28 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit 05a4ab823983d9136a460b7b5e0d49ee709a6f86 ] With the following piece of code, the following compilation warning is encountered: if (_IOC_DIR(ioc) != _IOC_NONE) { int verify = _IOC_DIR(ioc) & _IOC_READ ? VERIFY_WRITE :

[PATCH AUTOSEL 3.18 58/61] block/swim3: Fix -EBUSY error when re-opening device after unmount

2019-01-28 Thread Sasha Levin
From: Finn Thain [ Upstream commit 296dcc40f2f2e402facf7cd26cf3f2c8f4b17d47 ] When the block device is opened with FMODE_EXCL, ref_count is set to -1. This value doesn't get reset when the device is closed which means the device cannot be opened again. Fix this by checking for refcount <= 0 in

Re: use generic DMA mapping code in powerpc V4

2019-01-28 Thread Christian Zigotzky
Thanks a lot! I will test it tomorrow. — Christian Sent from my iPhone > On 28. Jan 2019, at 17:22, Christoph Hellwig wrote: > >> On Mon, Jan 28, 2019 at 08:04:22AM +0100, Christoph Hellwig wrote: >>> On Sun, Jan 27, 2019 at 02:13:09PM +0100, Christian Zigotzky wrote: >>> Christoph, >>> >>>

What is CONFIG_RTAS ? Which CPUs are concerned

2019-01-28 Thread Christophe Leroy
Hello All, I'm wondering what CONFIG_RTAS is. It makes use of one of the SPRN_SPRG, ie SPRN_SPRG2. What are the CPUs concerned by RTAS ? Is there any of the old CPUs which have only 4 SPRGs (eg the 601), or could we use one in SPRG4-7 for it and reuse SPRG2 for something else ? The idea

Re: [PATCH 18/19] KVM: PPC: Book3S HV: add passthrough support

2019-01-28 Thread Cédric Le Goater
On 1/28/19 7:13 AM, Paul Mackerras wrote: > On Wed, Jan 23, 2019 at 12:07:19PM +0100, Cédric Le Goater wrote: >> On 1/23/19 11:30 AM, Paul Mackerras wrote: >>> On Wed, Jan 23, 2019 at 05:45:24PM +1100, Benjamin Herrenschmidt wrote: On Tue, 2019-01-22 at 16:26 +1100, Paul Mackerras wrote:

Re: [PATCH v2 1/5] drivers/accel: Introduce subsystem

2019-01-28 Thread Frederic Barrat
Le 27/01/2019 à 05:31, Andrew Donnellan a écrit : [+ linuxppc-dev, because cxl/ocxl are handled through powerpc - please cc on future versions of this series] On 26/1/19 8:13 am, Olof Johansson wrote: We're starting to see more of these kind of devices, the current upcoming wave will

[PATCH] configs: Get rid of obsolete CONFIG_ENABLE_WARN_DEPRECATED

2019-01-28 Thread Alexey Brodkin
This Kconfig option was removed during v4.19 development in commit 771c035372a0 ("deprecate the '__deprecated' attribute warnings entirely and for good") so there's no point to keep it in defconfigs any longer. FWIW defconfigs were patched with:

[RFC PATCH] powerpc: fix get_arch_dma_ops() for NTB devices

2019-01-28 Thread Alexander Fomichev
get_dma_ops() falls into arch-dependant get_arch_dma_ops(), which historically returns NULL on PowerPC. Therefore dma_set_mask() fails. This affects Switchtec (and probably other) NTB devices, that they fail to initialize. The proposed patch should fix the issue. ---

[PATCH] powerpc/kernel/time: Remove duplicate header

2019-01-28 Thread Brajeswar Ghosh
Remove linux/rtc.h which is included more than once Signed-off-by: Brajeswar Ghosh --- arch/powerpc/kernel/time.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c index 3646affae963..bc0503ef9c9c 100644 --- a/arch/powerpc/kernel/time.c

Re: [PATCH] ucc_geth: Reset BQL queue when stopping device

2019-01-28 Thread Li Yang
On Mon, Jan 28, 2019 at 8:37 AM Mathias Thore wrote: > > Hi, > > > This is what we observed: there was a storm on the medium so that our > controller could not do its TX, resulting in timeout. When timeout occurs, > the driver clears all descriptors from the TX queue. The function called in >

Re: [PATCH] powerpc/kernel/time: Remove duplicate header

2019-01-28 Thread Souptick Joarder
On Mon, Jan 28, 2019 at 9:41 PM Brajeswar Ghosh wrote: > > Remove linux/rtc.h which is included more than once > > Signed-off-by: Brajeswar Ghosh Acked-by: Souptick Joarder > --- > arch/powerpc/kernel/time.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/arch/powerpc/kernel/time.c

Re: [PATCH] powerpc/mm: Add _PAGE_SAO to _PAGE_CACHE_CTL mask

2019-01-28 Thread Alexey Kardashevskiy
On 29/01/2019 04:31, Reza Arbab wrote: > In htab_convert_pte_flags(), _PAGE_CACHE_CTL is used to check for the > _PAGE_SAO flag: > > else if ((pteflags & _PAGE_CACHE_CTL) == _PAGE_SAO) > rflags |= (HPTE_R_W | HPTE_R_I | HPTE_R_M); > > But, it isn't defined to include that flag: >

[patch-next] KVM: PPC: Book3S HV: Use kzalloc_node

2019-01-28 Thread Christopher Diaz Riveros
Fixes coccinelle warning: /arch/powerpc/kvm/book3s_hv.c:5345:3-15: WARNING: kzalloc_node should be used for sibling_subcore_state, instead of kmalloc_node/memset Signed-off-by: Christopher Diaz Riveros --- arch/powerpc/kvm/book3s_hv.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-)

Re: [PATCH 18/19] KVM: PPC: Book3S HV: add passthrough support

2019-01-28 Thread Paul Mackerras
On Mon, Jan 28, 2019 at 07:26:00PM +0100, Cédric Le Goater wrote: > On 1/28/19 7:13 AM, Paul Mackerras wrote: > > Would we end up with too many VMAs if we just used mmap() to > > change the mappings from the software-generated pages to the > > hardware-generated interrupt pages? > The sPAPR IRQ

Re: [PATCH 18/19] KVM: PPC: Book3S HV: add passthrough support

2019-01-28 Thread Paul Mackerras
On Mon, Jan 28, 2019 at 07:26:00PM +0100, Cédric Le Goater wrote: > > Is clearing the PTEs and repopulating the VMA unsafe ? Actually, now that I come to think of it, there could be any number of VMAs (well, up to almost 64k of them), since once you have a file descriptor you can call mmap on

Re: [PATCH v2] cxl: Wrap iterations over afu slices inside 'afu_list_lock'

2019-01-28 Thread Vaibhav Jain
Thanks for reviewing this patch Fred. I have addressed all your review comments in v3 of this patch. -- Vaibhav Jain Linux Technology Center, IBM India Pvt. Ltd.

Re: [RFC PATCH 1/2] powerpc/powernv: Add support for CXL mode switch that need PHB reset

2019-01-28 Thread Vaibhav Jain
Thanks for reviewing this patch Christophe, christophe lombard writes: >> >> pe = pnv_ioda_get_pe(dev); >> if (!pe) >> -return -ENODEV; >> +return -ENOENT; > > The return code of pnv_phb_to_cxl_mode() is also returned by an api in > the cxllib librarie. So,

Re: [RFC PATCH 1/2] powerpc/powernv: Add support for CXL mode switch that need PHB reset

2019-01-28 Thread Vaibhav Jain
Frederic Barrat writes: >> +opal_poll_events(NULL); > > Why is a call to opal_poll_events() needed? Trying to make sure that opal pollers are run on the current CPU and any opal timer are executed. -- Vaibhav Jain Linux Technology Center, IBM India Pvt. Ltd.

[PATCH v3] cxl: Wrap iterations over afu slices inside 'afu_list_lock'

2019-01-28 Thread Vaibhav Jain
Within cxl module, iteration over array 'adapter->slices' may be racy at few points as it might be simultaneously read during an EEH and its contents being set to NULL while driver is being unloaded or unbound from the adapter. This might result in a NULL pointer to 'struct afu' being

Re: [PATCH v3] cxl: Wrap iterations over afu slices inside 'afu_list_lock'

2019-01-28 Thread Andrew Donnellan
On 29/1/19 5:15 pm, Vaibhav Jain wrote: Within cxl module, iteration over array 'adapter->slices' may be racy adapter->slices isn't an array, adapter->afu is the array. at few points as it might be simultaneously read during an EEH and its contents being set to NULL while driver is being

[PATCH 07/11] powerpc/40x: Don't use SPRN_SPRG_SCRATCH2 in EXCEPTION_PROLOG

2019-01-28 Thread Christophe Leroy
Unlike said in the comment, r1 is not reused by the critical exception handler, as it uses a dedicated critirq_ctx stack. Decrementing r1 early is then unneeded. Should the above be valid, the code is crap buggy anyway as r1 gets some intermediate values that would jeopardise the whole process

[PATCH 09/11] powerpc/40x: Split and rename NORMAL_EXCEPTION_PROLOG

2019-01-28 Thread Christophe Leroy
This patch splits NORMAL_EXCEPTION_PROLOG in the same way as in head_8xx.S and head_32.S and renames it EXCEPTION_PROLOG() as well to match head_32.h Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/head_40x.S | 26 -- 1 file changed, 16 insertions(+), 10

[PATCH 08/11] powerpc/40x: add exception frame marker

2019-01-28 Thread Christophe Leroy
This patch adds STACK_FRAME_REGS_MARKER in the stack at exception entry in order to see interrupts in call traces as below: [0.013964] Call Trace: [0.014014] [c0745db0] [c007a9d4] tick_periodic.constprop.5+0xd8/0x104 (unreliable) [0.014086] [c0745dc0] [c007aa20]

[PATCH 10/11] powerpc/40x: Add EXC_XFER_TEMPLATE_CRITICAL()

2019-01-28 Thread Christophe Leroy
This patch adds EXC_XFER_TEMPLATE_CRITICAL() for handling transfer to critical exception handler. This will allow to move the normal exception to using the standard EXC_XFER_TEMPLATE() defined in head_32.h Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/head_40x.S | 21

[PATCH 11/11] powerpc/40x: Refactor exception entry macros by using head_32.h

2019-01-28 Thread Christophe Leroy
Refactor exception entry macros by using the ones defined in head_32.h Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/head_40x.S | 94 -- 1 file changed, 8 insertions(+), 86 deletions(-) diff --git a/arch/powerpc/kernel/head_40x.S

[PATCH v1] PCI/AER: use match_string() helper to simplify the code

2019-01-28 Thread Andy Shevchenko
match_string() returns the index of an array for a matching string, which can be used intead of open coded implementation. Signed-off-by: Andy Shevchenko --- drivers/pci/pcie/aer.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/pci/pcie/aer.c

Re: [PATCH] perf mem/c2c: Fix perf_mem_events to support powerpc

2019-01-28 Thread Jiri Olsa
On Mon, Jan 14, 2019 at 09:44:02AM +0530, Ravi Bangoria wrote: SNIP > diff --git a/tools/perf/arch/x86/util/mem-events.c > b/tools/perf/arch/x86/util/mem-events.c > new file mode 100644 > index 000..5b4dcfe > --- /dev/null > +++ b/tools/perf/arch/x86/util/mem-events.c > @@ -0,0 +1,25 @@ >

[PATCH 00/11] Refactor exception entry on 40x/6xx/8xx

2019-01-28 Thread Christophe Leroy
This serie refactors exception entry macros for 40x, 6xx and 8xx This serie will benefit to the implementation of CONFIG_VMAP, and also to Ben's serie on MSR_EE. First patch of this serie is a part of the CONFIG_THREAD_INFO_IN_TASK serie. This avoids a conflict between the two series.

[PATCH 01/11] powerpc/32: Rename THREAD_INFO to TASK_STACK

2019-01-28 Thread Christophe Leroy
This patch renames THREAD_INFO to TASK_STACK, because it is in fact the offset of the pointer to the stack in task_struct so this pointer will not be impacted by the move of THREAD_INFO. Signed-off-by: Christophe Leroy Reviewed-by: Nicholas Piggin --- arch/powerpc/kernel/asm-offsets.c| 2

[PATCH 02/11] powerpc/32: Refactor EXCEPTION entry macros for head_8xx.S and head_32.S

2019-01-28 Thread Christophe Leroy
EXCEPTION_PROLOG is similar in head_8xx.S and head_32.S This patch creates head_32.h and moves EXCEPTION_PROLOG macro into it. It also moves EXCEPTION() and EXC_XFER_() macros which are also similar. For that, the 8xx needs to define a dummy DO_KVM asm macro. Signed-off-by: Christophe Leroy

[PATCH 03/11] powerpc/32: Add a macro for setting MSR_RI in EXCEPTION_PROLOG_2

2019-01-28 Thread Christophe Leroy
Setting MSR_RI applies to head_32 and head_8xx, but not to head_40x. So in order to refactor EXCEPTION_PROLOG for 40x too, this patch adds a macro for setting MSR_RI. In the meantime, this gives the opportunity to make it simpler on the 8xx as writing in SPRN_EID sets MSR_RI. Signed-off-by:

[PATCH 04/11] powerpc/32: add CLR_MSR_WE() in EXCEPTION_PROLOG in head_32.h

2019-01-28 Thread Christophe Leroy
Add CLR_MSR_WE() macro to allow 40x to clear that bit from the register containing msr value. This is the only difference between common EXCEPTION_PROLOG and 40x one. This patch will allow 40x to use the common one. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/head_32.h | 5 + 1

[PATCH 05/11] powerpc/32: add START_EXCEPTION() in head_32.h

2019-01-28 Thread Christophe Leroy
Add START_EXCEPTION() in head_32.h for preparing the use of head_32.h in head_40x.S Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/head_32.h | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kernel/head_32.h b/arch/powerpc/kernel/head_32.h index

[PATCH 06/11] powerpc/32: move LOAD_MSR_KERNEL() into head_32.h and use it

2019-01-28 Thread Christophe Leroy
As preparation for using head_32.h for head_40x.S, move LOAD_MSR_KERNEL() there and use it to load r10 with MSR_KERNEL value. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/entry_32.S | 9 + arch/powerpc/kernel/head_32.h | 11 ++- 2 files changed, 11 insertions(+), 9

[PATCH] ucc_geth: Reset BQL queue when stopping device

2019-01-28 Thread Mathias Thore
After a timeout event caused by for example a broadcast storm, when the MAC and PHY are reset, the BQL TX queue needs to be reset as well. Otherwise, the device will exhibit severe performance issues even after the storm has ended. Co-authored-by: David Gounaris Signed-off-by: Mathias Thore ---

Re: [PATCH v4] kbuild: Add support for DT binding schema checks

2019-01-28 Thread Geert Uytterhoeven
Hi Rob, On Tue, Dec 11, 2018 at 9:24 PM Rob Herring wrote: > This adds the build infrastructure for checking DT binding schema > documents and validating dts files using the binding schema. > > Check DT binding schema documents: > make dt_binding_check > > Build dts files and check using DT

Re: [PATCH] perf mem/c2c: Fix perf_mem_events to support powerpc

2019-01-28 Thread Ravi Bangoria
On 1/14/19 9:44 AM, Ravi Bangoria wrote: > Powerpc hw does not have inbuilt latency filter (--ldlat) for mem-load > event and, perf_mem_events by default includes ldlat=30 which is > causing failure on powerpc. Refactor code to support perf mem/c2c on > powerpc. > > This patch depends on

Re: [PATCH] ucc_geth: Reset BQL queue when stopping device

2019-01-28 Thread Christophe Leroy
Hi, Le 28/01/2019 à 10:07, Mathias Thore a écrit : After a timeout event caused by for example a broadcast storm, when the MAC and PHY are reset, the BQL TX queue needs to be reset as well. Otherwise, the device will exhibit severe performance issues even after the storm has ended. What are