[PATCH 3/3] PCI/DPC: Disable DPC service on suspend

2023-08-23 Thread Kai-Heng Feng
When the power rail gets cut off, the hardware can create some electric noise on the link that triggers AER. If IRQ is shared between AER with PME, such AER noise will cause a spurious wakeup on system suspend. When the power rail gets back, the firmware of the device resets itself and can create

[PATCH 2/3] PCI/AER: Disable AER service on suspend

2023-08-23 Thread Kai-Heng Feng
When the power rail gets cut off, the hardware can create some electric noise on the link that triggers AER. If IRQ is shared between AER with PME, such AER noise will cause a spurious wakeup on system suspend. When the power rail gets back, the firmware of the device resets itself and can create

Re: [PATCH v7 01/24] iommu: Add iommu_ops->identity_domain

2023-08-23 Thread Jerry Snitselaar
On Wed, Aug 23, 2023 at 01:47:15PM -0300, Jason Gunthorpe wrote: > This allows a driver to set a global static to an IDENTITY domain and > the core code will automatically use it whenever an IDENTITY domain > is requested. > > By making it always available it means the IDENTITY can be used in

Re: [PATCH RFC] rcu: torture: shorten the time between forward-progress tests

2023-08-23 Thread Zhouyi Zhou
On Thu, Aug 24, 2023 at 5:15 AM Paul E. McKenney wrote: > > On Tue, May 02, 2023 at 11:06:02PM +0800, zhouzho...@gmail.com wrote: > > From: Zhouyi Zhou > > > > Currently, default time between rcu torture forward-progress tests is 60HZ, > > Under this configuration, false positive caused by

Re: KASAN debug kernel fails to boot at early stage when CONFIG_SMP=y is set (kernel 6.5-rc5, PowerMac G4 3,6)

2023-08-23 Thread Erhard Furtner
On Tue, 22 Aug 2023 07:31:54 + Christophe Leroy wrote: > Le 18/08/2023 à 18:23, Erhard Furtner a écrit : > > On Fri, 18 Aug 2023 15:47:38 + > > Christophe Leroy wrote: > > > >> I'm wondering if the problem is just linked to the kernel being built > >> with CONFIG_SMP or if it is the

Re: [PATCH treewide 0/9] Remove obsolete IDE headers

2023-08-23 Thread Damien Le Moal
On 8/18/23 01:07, Geert Uytterhoeven wrote: > Hi all, > > This patch series removes all unused headers and > . was still included by 3 PATA > drivers for m68k platforms, but without any real need. > > The first 5 patches have no dependencies. > The last patch depends on the 3 pata

Re: [PATCH RFC] rcu: torture: shorten the time between forward-progress tests

2023-08-23 Thread Paul E. McKenney
On Tue, May 02, 2023 at 11:06:02PM +0800, zhouzho...@gmail.com wrote: > From: Zhouyi Zhou > > Currently, default time between rcu torture forward-progress tests is 60HZ, > Under this configuration, false positive caused by __stack_chk_fail [1] is > difficult to reproduce (needs average 5*420

Re: [PATCH] cpufreq: pmac32: Use of_property_read_reg() to parse "reg"

2023-08-23 Thread Rob Herring
On Sun, Jul 2, 2023 at 10:01 PM Viresh Kumar wrote: > > On 09-06-23, 12:31, Rob Herring wrote: > > Use the recently added of_property_read_reg() helper to get the > > untranslated "reg" address value. > > > > Signed-off-by: Rob Herring > > --- > > drivers/cpufreq/pmac32-cpufreq.c | 5 ++--- > >

[PATCH v7 09/24] iommu: Allow an IDENTITY domain as the default_domain in ARM32

2023-08-23 Thread Jason Gunthorpe
Even though dma-iommu.c and CONFIG_ARM_DMA_USE_IOMMU do approximately the same stuff, the way they relate to the IOMMU core is quiet different. dma-iommu.c expects the core code to setup an UNMANAGED domain (of type IOMMU_DOMAIN_DMA) and then configures itself to use that domain. This becomes the

[PATCH v7 19/24] iommu/sun50i: Add an IOMMU_IDENTITIY_DOMAIN

2023-08-23 Thread Jason Gunthorpe
Prior to commit 1b932ceddd19 ("iommu: Remove detach_dev callbacks") the sun50i_iommu_detach_device() function was being called by ops->detach_dev(). This is an IDENTITY domain so convert sun50i_iommu_detach_device() into sun50i_iommu_identity_attach() and a full IDENTITY domain and thus hook it

[PATCH v7 23/24] iommu: Convert simple drivers with DOMAIN_DMA to domain_alloc_paging()

2023-08-23 Thread Jason Gunthorpe
These drivers are all trivially converted since the function is only called if the domain type is going to be IOMMU_DOMAIN_UNMANAGED/DMA. Tested-by: Heiko Stuebner Tested-by: Steven Price Tested-by: Marek Szyprowski Tested-by: Nicolin Chen Reviewed-by: Lu Baolu Signed-off-by: Jason Gunthorpe

[PATCH v7 10/24] iommu/exynos: Implement an IDENTITY domain

2023-08-23 Thread Jason Gunthorpe
What exynos calls exynos_iommu_detach_device is actually putting the iommu into identity mode. Move to the new core support for ARM_DMA_USE_IOMMU by defining ops->identity_domain. Tested-by: Marek Szyprowski Acked-by: Marek Szyprowski Signed-off-by: Jason Gunthorpe ---

[PATCH v7 07/24] iommu/mtk_iommu_v1: Implement an IDENTITY domain

2023-08-23 Thread Jason Gunthorpe
What mtk does during mtk_iommu_v1_set_platform_dma() is actually putting the iommu into identity mode. Make this available as a proper IDENTITY domain. The mtk_iommu_v1_def_domain_type() from commit 8bbe13f52cb7 ("iommu/mediatek-v1: Add def_domain_type") explains this was needed to allow

[PATCH v7 11/24] iommu/tegra-smmu: Implement an IDENTITY domain

2023-08-23 Thread Jason Gunthorpe
What tegra-smmu does during tegra_smmu_set_platform_dma() is actually putting the iommu into identity mode. Move to the new core support for ARM_DMA_USE_IOMMU by defining ops->identity_domain. Reviewed-by: Lu Baolu Signed-off-by: Jason Gunthorpe --- drivers/iommu/tegra-smmu.c | 37

[PATCH v7 22/24] iommu: Add ops->domain_alloc_paging()

2023-08-23 Thread Jason Gunthorpe
This callback requests the driver to create only a __IOMMU_DOMAIN_PAGING domain, so it saves a few lines in a lot of drivers needlessly checking the type. More critically, this allows us to sweep out all the IOMMU_DOMAIN_UNMANAGED and IOMMU_DOMAIN_DMA checks from a lot of the drivers, simplifying

[PATCH v7 12/24] iommu/tegra-smmu: Support DMA domains in tegra

2023-08-23 Thread Jason Gunthorpe
All ARM64 iommu drivers should support IOMMU_DOMAIN_DMA to enable dma-iommu.c. tegra is blocking dma-iommu usage, and also default_domain's, because it wants an identity translation. This is needed for some device quirk. The correct way to do this is to support IDENTITY domains and use

[PATCH v7 06/24] iommu/tegra-gart: Remove tegra-gart

2023-08-23 Thread Jason Gunthorpe
Thierry says this is not used anymore, and doesn't think it makes sense as an iommu driver. The HW it supports is about 10 years old now and newer HW uses different IOMMU drivers. As this is the only driver with a GART approach, and it doesn't really meet the driver expectations from the IOMMU

[PATCH v7 20/24] iommu: Require a default_domain for all iommu drivers

2023-08-23 Thread Jason Gunthorpe
At this point every iommu driver will cause a default_domain to be selected, so we can finally remove this gap from the core code. The following table explains what each driver supports and what the resulting default_domain will be: ops->defaut_domain

[PATCH v7 00/24] iommu: Make default_domain's mandatory

2023-08-23 Thread Jason Gunthorpe
It has been a long time coming, this series completes the default_domain transition and makes it so that the core IOMMU code will always have a non-NULL default_domain for every driver on every platform. set_platform_dma_ops() turned out to be a bad idea, and so completely remove it. This is

[PATCH v7 08/24] iommu: Reorganize iommu_get_default_domain_type() to respect def_domain_type()

2023-08-23 Thread Jason Gunthorpe
Except for dart (which forces IOMMU_DOMAIN_DMA) every driver returns 0 or IDENTITY from ops->def_domain_type(). The drivers that return IDENTITY have some kind of good reason, typically that quirky hardware really can't support anything other than IDENTITY. Arrange things so that if the driver

[PATCH v7 15/24] iommu: Remove ops->set_platform_dma_ops()

2023-08-23 Thread Jason Gunthorpe
All drivers are now using IDENTITY or PLATFORM domains for what this did, we can remove it now. It is no longer possible to attach to a NULL domain. Tested-by: Heiko Stuebner Tested-by: Niklas Schnelle Tested-by: Steven Price Tested-by: Marek Szyprowski Tested-by: Nicolin Chen Reviewed-by:

[PATCH v7 21/24] iommu: Add __iommu_group_domain_alloc()

2023-08-23 Thread Jason Gunthorpe
Allocate a domain from a group. Automatically obtains the iommu_ops to use from the device list of the group. Convert the internal callers to use it. Tested-by: Steven Price Tested-by: Marek Szyprowski Tested-by: Nicolin Chen Reviewed-by: Lu Baolu Signed-off-by: Jason Gunthorpe ---

[PATCH v7 04/24] iommu: Add IOMMU_DOMAIN_PLATFORM for S390

2023-08-23 Thread Jason Gunthorpe
The PLATFORM domain will be set as the default domain and attached as normal during probe. The driver will ignore the initial attach from a NULL domain to the PLATFORM domain. After this, the PLATFORM domain's attach_dev will be called whenever we detach from an UNMANAGED domain (eg for VFIO).

[PATCH v7 17/24] iommu/ipmmu: Add an IOMMU_IDENTITIY_DOMAIN

2023-08-23 Thread Jason Gunthorpe
This brings back the ops->detach_dev() code that commit 1b932ceddd19 ("iommu: Remove detach_dev callbacks") deleted and turns it into an IDENTITY domain. Also reverts commit 584d334b1393 ("iommu/ipmmu-vmsa: Remove ipmmu_utlb_disable()") Reviewed-by: Lu Baolu Signed-off-by: Jason Gunthorpe ---

[PATCH v7 13/24] iommu/omap: Implement an IDENTITY domain

2023-08-23 Thread Jason Gunthorpe
What omap does during omap_iommu_set_platform_dma() is actually putting the iommu into identity mode. Move to the new core support for ARM_DMA_USE_IOMMU by defining ops->identity_domain. This driver does not support IOMMU_DOMAIN_DMA, however it cannot be compiled on ARM64 either. Most likely it

[PATCH v7 14/24] iommu/msm: Implement an IDENTITY domain

2023-08-23 Thread Jason Gunthorpe
What msm does during msm_iommu_set_platform_dma() is actually putting the iommu into identity mode. Move to the new core support for ARM_DMA_USE_IOMMU by defining ops->identity_domain. This driver does not support IOMMU_DOMAIN_DMA, however it cannot be compiled on ARM64 either. Most likely it is

[PATCH v7 24/24] iommu: Convert remaining simple drivers to domain_alloc_paging()

2023-08-23 Thread Jason Gunthorpe
These drivers don't support IOMMU_DOMAIN_DMA, so this commit effectively allows them to support that mode. The prior work to require default_domains makes this safe because every one of these drivers is either compilation incompatible with dma-iommu.c, or already establishing a default_domain. In

[PATCH v7 01/24] iommu: Add iommu_ops->identity_domain

2023-08-23 Thread Jason Gunthorpe
This allows a driver to set a global static to an IDENTITY domain and the core code will automatically use it whenever an IDENTITY domain is requested. By making it always available it means the IDENTITY can be used in error handling paths to force the iommu driver into a known state. Devices

[PATCH v7 05/24] iommu/fsl_pamu: Implement a PLATFORM domain

2023-08-23 Thread Jason Gunthorpe
This driver is nonsensical. To not block migrating the core API away from NULL default_domains give it a hacky of a PLATFORM domain that keeps it working exactly as it always did. Leave some comments around to warn away any future people looking at this. Reviewed-by: Lu Baolu Signed-off-by:

[PATCH v7 02/24] iommu: Add IOMMU_DOMAIN_PLATFORM

2023-08-23 Thread Jason Gunthorpe
This is used when the iommu driver is taking control of the dma_ops, currently only on S390 and power spapr. It is designed to preserve the original ops->detach_dev() semantic that these S390 was built around. Provide an opaque domain type and a 'default_domain' ops value that allows the driver

[PATCH v7 18/24] iommu/mtk_iommu: Add an IOMMU_IDENTITIY_DOMAIN

2023-08-23 Thread Jason Gunthorpe
This brings back the ops->detach_dev() code that commit 1b932ceddd19 ("iommu: Remove detach_dev callbacks") deleted and turns it into an IDENTITY domain. Reviewed-by: Lu Baolu Signed-off-by: Jason Gunthorpe --- drivers/iommu/mtk_iommu.c | 23 +++ 1 file changed, 23

[PATCH v7 16/24] iommu/qcom_iommu: Add an IOMMU_IDENTITIY_DOMAIN

2023-08-23 Thread Jason Gunthorpe
This brings back the ops->detach_dev() code that commit 1b932ceddd19 ("iommu: Remove detach_dev callbacks") deleted and turns it into an IDENTITY domain. Reviewed-by: Lu Baolu Signed-off-by: Jason Gunthorpe --- drivers/iommu/arm/arm-smmu/qcom_iommu.c | 39 + 1 file

[PATCH v7 03/24] powerpc/iommu: Setup a default domain and remove set_platform_dma_ops

2023-08-23 Thread Jason Gunthorpe
POWER is using the set_platform_dma_ops() callback to hook up its private dma_ops, but this is buired under some indirection and is weirdly happening for a BLOCKED domain as well. For better documentation create a PLATFORM domain to manage the dma_ops, since that is what it is for, and make the

Re: [PATCH v3] powerpc: Use shared font data

2023-08-23 Thread Dr. David Alan Gilbert
* li...@treblig.org (li...@treblig.org) wrote: > From: "Dr. David Alan Gilbert" > > PowerPC has a 'btext' font used for the console which is almost identical > to the shared font_sun8x16, so use it rather than duplicating the data. > > They were actually identical until about a decade ago when

Re: [PATCH v4 1/2] PCI: layerscape: Add support for Link down notification

2023-08-23 Thread Lorenzo Pieralisi
On Wed, Aug 16, 2023 at 11:53:16AM -0400, Frank Li wrote: > On Mon, Jul 31, 2023 at 11:06:31AM -0400, Frank Li wrote: > > On Thu, Jul 20, 2023 at 09:58:33AM -0400, Frank Li wrote: > > > Add support to pass Link down notification to Endpoint function driver > > > so that the LINK_DOWN event can be

Re: [PATCH v4 1/2] PCI: layerscape: Add support for Link down notification

2023-08-23 Thread Frank Li
On Wed, Aug 16, 2023 at 11:53:16AM -0400, Frank Li wrote: > On Mon, Jul 31, 2023 at 11:06:31AM -0400, Frank Li wrote: > > On Thu, Jul 20, 2023 at 09:58:33AM -0400, Frank Li wrote: > > > Add support to pass Link down notification to Endpoint function driver > > > so that the LINK_DOWN event can be

Re: [RFC PATCH v2 0/7] Add audio support in v4l2 framework

2023-08-23 Thread Shengjiu Wang
On Fri, Aug 11, 2023 at 7:05 PM Shengjiu Wang wrote: > > Hi Mark, Takashi > > On Thu, Aug 3, 2023 at 9:11 PM Shengjiu Wang wrote: > > > > On Thu, Aug 3, 2023 at 1:28 AM Mark Brown wrote: > > > > > > On Wed, Aug 02, 2023 at 10:41:43PM +0800, Shengjiu Wang wrote: > > > > > > > Currently the ASRC

[PATCH net-next] kunit: Fix checksum tests on big endian CPUs

2023-08-23 Thread Christophe Leroy
On powerpc64le checksum kunit tests work: [2.011457][T1] KTAP version 1 [2.011662][T1] # Subtest: checksum [2.011848][T1] 1..3 [2.034710][T1] ok 1 test_csum_fixed_random_inputs [2.079325][T1] ok 2 test_csum_all_carry_inputs [

Re: [PATCH] perf test: Skip perf bench breakpoint run if no breakpoints available

2023-08-23 Thread Disha Goel
On 23/08/23 1:21 pm, Kajol Jain wrote: Based on commit 7d54a4acd8c1 ("perf test: Skip watchpoint tests if no watchpoints available"), hardware breakpoints are not available for power9 platform and because of that perf bench breakpoint run fails on power9 platform. Add code to check for the

Re: [PATCH] ocxl: Use pci_dev_id() to simplify the code

2023-08-23 Thread Michael Ellerman
On Fri, 11 Aug 2023 18:20:39 +0800, Zheng Zengkai wrote: > PCI core API pci_dev_id() can be used to get the BDF number for a pci > device. We don't need to compose it mannually. Use pci_dev_id() to > simplify the code a little bit. > > Applied to powerpc/next. [1/1] ocxl: Use pci_dev_id() to

Re: [RFC PATCH] cxl: Use pci_find_vsec_capability() to simplify the code

2023-08-23 Thread Michael Ellerman
On Fri, 04 Aug 2023 15:56:30 +0800, Xiongfeng Wang wrote: > PCI core add pci_find_vsec_capability() to query VSEC. We can use that > core API to simplify the code. > > The only logical change is that pci_find_vsec_capability check the > Vendor ID before finding the VSEC. > > PCI spec rev 5.0

Re: [PATCH] powerpc/powernv/pci: use pci_dev_id() to simplify the code

2023-08-23 Thread Michael Ellerman
On Fri, 04 Aug 2023 16:04:35 +0800, Xiongfeng Wang wrote: > PCI core API pci_dev_id() can be used to get the BDF number for a pci > device. We don't need to compose it mannually. Use pci_dev_id() to > simplify the code a little bit. > > Applied to powerpc/next. [1/1] powerpc/powernv/pci: use

Re: [PATCH] powerpc: Enable generic cpu idle-loop

2023-08-23 Thread Michael Ellerman
On Fri, 18 Aug 2023 10:37:37 +0530, Vaibhav Jain wrote: > This minor patch enables config option GENERIC_IDLE_POLL_SETUP for arch > powerpc. This should add support for kernel param 'nohlt'. > > Powerpc kernel also supports another kernel boot-time param called > 'powersave' which can also be

Re: (subset) [PATCH v3 0/4] general defconfig cleanups

2023-08-23 Thread Michael Ellerman
On Thu, 17 Aug 2023 07:50:10 -0400, Trevor Woerner wrote: > Drop config options from defconfigs whose code has been removed. > > v3: > While reorganizing the patches, I put the wrong commit message with the > CONFIG_IP_NF_TARGET_CLUSTERIP option. > > v2: > Generate arch-specific patches. In v1 I

Re: [PATCH] powerpc: pmac32: enable serial options by default in defconfig

2023-08-23 Thread Michael Ellerman
On Wed, 02 Aug 2023 21:41:30 +0800, Yuan Tan wrote: > Serial is a critical feature for logging and debuging, and the other > architectures enable serial by default. > > Let's enable CONFIG_SERIAL_PMACZILOG and CONFIG_SERIAL_PMACZILOG_CONSOLE > by default. > > > [...] Applied to powerpc/next.

Re: [PATCH v2] powerpc/fadump: reset dump area size if fadump memory reserve fails

2023-08-23 Thread Michael Ellerman
On Tue, 04 Jul 2023 10:37:15 +0530, Sourabh Jain wrote: > In case fadump_reserve_mem() fails to reserve memory, the > reserve_dump_area_size variable will retain the reserve area size. This > will lead to /sys/kernel/fadump/mem_reserved node displaying an incorrect > memory reserved by fadump. >

Re: [PATCH] powerpc/pseries: fix possible memory leak in ibmebus_bus_init()

2023-08-23 Thread Michael Ellerman
On Thu, 10 Nov 2022 09:19:29 +0800, ruanjinjie wrote: > If device_register() returns error in ibmebus_bus_init(), name of kobject > which is allocated in dev_set_name() called in device_add() is leaked. > > As comment of device_add() says, it should call put_device() to drop > the reference count

Re: [PATCH] powerpc/pseries: PLPKS: undo kernel-doc comment notation

2023-08-23 Thread Michael Ellerman
On Wed, 09 Aug 2023 17:07:40 -0700, Randy Dunlap wrote: > Don't use kernel-doc "/**" comment format for non-kernel-doc comments. > This prevents a kernel-doc warning: > > arch/powerpc/platforms/pseries/plpks.c:186: warning: This comment starts > with '/**', but isn't a kernel-doc comment.

Re: [PATCH v3] powerpc/inst: add PPC_TLBILX_LPID

2023-08-23 Thread Michael Ellerman
On Thu, 03 Aug 2023 11:33:52 -0700, Nick Desaulniers wrote: > Clang didn't recognize the instruction tlbilxlpid. This was fixed in > clang-18 [0] then backported to clang-17 [1]. To support clang-16 and > older, rather than using that instruction bare in inline asm, add it to > ppc-opcode.h and

Re: [PATCH] Revert "powerpc/xmon: Relax frame size for clang"

2023-08-23 Thread Michael Ellerman
On Thu, 17 Aug 2023 11:11:56 -0700, ndesaulni...@google.com wrote: > This reverts commit 9c87156cce5a63735d1218f0096a65c50a7a32aa. > > I have not been able to reproduce the reported -Wframe-larger-than= > warning (or disassembly) with clang-11 or clang-18. > > I don't know precisely when this

Re: [PATCH 00/17] powerpc/ftrace: refactor and add support for -fpatchable-function-entry

2023-08-23 Thread Michael Ellerman
On Mon, 19 Jun 2023 15:17:18 +0530, Naveen N Rao wrote: > Since RFC (*): > - Patches 1 and 17 have been included in this series due to > dependencies. Both had been posted out separately. > - Patch 10 has a small change to not throw errors when checking > instruction sequence generated by

Re: [PATCH 0/2] powerpc/selftests: miscellaneous improvements

2023-08-23 Thread Michael Ellerman
On Thu, 17 Aug 2023 11:21:51 -0500, Nathan Lynch wrote: > Just some minor things to tidy up I noticed when adding tests. > Applied to powerpc/next. [1/2] powerpc/selftests: sort mm/.gitignore, add exec_prot https://git.kernel.org/powerpc/c/ae3a8cc292d01a1558dff837bb485712dfaeb9c6 [2/2]

Re: [PATCH] powerpc: Move DMA64_PROPNAME define to a header

2023-08-23 Thread Michael Ellerman
On Thu, 17 Aug 2023 18:24:08 +0200, Michal Suchanek wrote: > Avoid redefining the same value in multiple source. > > Applied to powerpc/next. [1/1] powerpc: Move DMA64_PROPNAME define to a header https://git.kernel.org/powerpc/c/89c9ce1c99df553029fc4503506ff5a1793f3eaf cheers

Re: [PATCH 1/3] powerpc: remove unneeded #include

2023-08-23 Thread Michael Ellerman
On Mon, 07 Aug 2023 00:09:52 +0900, Masahiro Yamada wrote: > There is no EXPORT_SYMBOL line there, hence #include > is unneeded. > > Applied to powerpc/next. [1/3] powerpc: remove unneeded #include https://git.kernel.org/powerpc/c/3eb3f168e83aa7a7b8477507cf4b08b9515b4b13 [2/3] powerpc:

Re: [PATCH v9 1/2] powerpc/rtas: export rtas_error_rc() for reuse.

2023-08-23 Thread Michael Ellerman
On Fri, 18 Aug 2023 16:59:07 +0530, Mahesh Salgaonkar wrote: > Also, #define descriptive names for common rtas return codes and use it > instead of numeric values. > > Applied to powerpc/next. [1/2] powerpc/rtas: export rtas_error_rc() for reuse.

Re: [PATCH] powerpc: Make virt_to_pfn() a static inline

2023-08-23 Thread Michael Ellerman
On Wed, 09 Aug 2023 10:07:13 +0200, Linus Walleij wrote: > Making virt_to_pfn() a static inline taking a strongly typed > (const void *) makes the contract of a passing a pointer of that > type to the function explicit and exposes any misuse of the > macro virt_to_pfn() acting polymorphic and

Re: [PATCH v4 00/10] Add sysfs interface files to hv_gpci device to expose system information

2023-08-23 Thread Michael Ellerman
On Sat, 29 Jul 2023 13:04:45 +0530, Kajol Jain wrote: > The hcall H_GET_PERF_COUNTER_INFO can be used to get data related to > chips, dimms and system topology, by passing different counter request > values. > Patchset adds sysfs files to "/sys/devices/hv_gpci/interface/" > of hv_gpci pmu driver,

Re: [PATCH] powerpc/ps3: refactor strncpy usage

2023-08-23 Thread Michael Ellerman
On Wed, 16 Aug 2023 21:39:24 +, Justin Stitt wrote: > `strncpy` is deprecated for use on NUL-terminated destination strings [1]. > > `make_first_field()` should use similar implementation to `make_field()` > due to memcpy having more obvious behavior here. The end result yields > the same

Re: [PATCH v2] powerpc/fadump: invoke ibm,os-term with rtas_call_unlocked()

2023-08-23 Thread Michael Ellerman
On Fri, 09 Jun 2023 12:44:04 +0530, Hari Bathini wrote: > Invoke ibm,os-term call with rtas_call_unlocked(), without using the > RTAS spinlock, to avoid deadlock in the unlikely event of a machine > crash while making an RTAS call. > > Applied to powerpc/next. [1/1] powerpc/fadump: invoke

Re: [PATCH v2] arch/powerpc: Remove unnecessary endian conversion code in XICS

2023-08-23 Thread Michael Ellerman
On Mon, 31 Jul 2023 17:25:39 +0530, Gautam Menghani wrote: > Remove an unnecessary piece of code that does an endianness conversion but > does not use the result. The following warning was reported by Clang's > static analyzer: > > arch/powerpc/sysdev/xics/ics-opal.c:114:2: warning: Value stored

Re: [PATCH v2] powerpc/ptrace: Split gpr32_set_common

2023-08-23 Thread Michael Ellerman
On Thu, 22 Jun 2023 12:01:23 +0200, Christophe Leroy wrote: > objtool report the following warning: > > arch/powerpc/kernel/ptrace/ptrace-view.o: warning: objtool: > gpr32_set_common+0x23c (.text+0x860): redundant UACCESS disable > > gpr32_set_common() conditionnaly opens and closes

Re: [PATCH v2] powerpc/512x: Make mpc512x_select_reset_compat() static

2023-08-23 Thread Michael Ellerman
On Fri, 18 Aug 2023 08:51:48 +0200, Christophe Leroy wrote: > mpc512x_select_reset_compat() is only used in the file it > is defined. > > Make it static. > > Move mpc512x_restart_init() after mpc512x_select_reset_compat(). > > [...] Applied to powerpc/next. [1/1] powerpc/512x: Make

Re: [PATCH v2] powerpc/47x: Remove early_init_mmu_47x() to fix no previous prototype

2023-08-23 Thread Michael Ellerman
On Thu, 17 Aug 2023 16:26:44 +0200, Christophe Leroy wrote: > 4xx/iss476-smp_defconfig leads to: > > CC arch/powerpc/mm/nohash/tlb.o > arch/powerpc/mm/nohash/tlb.c:322:13: error: no previous prototype for > 'early_init_mmu_47x' [-Werror=missing-prototypes] > 322 | void __init

Re: [PATCH v2] powerpc/32s: Cleanup the mess in __set_pte_at()

2023-08-23 Thread Michael Ellerman
On Tue, 15 Aug 2023 19:42:40 +0200, Christophe Leroy wrote: > __set_pte_at() handles 3 main cases with #ifdefs plus the 'percpu' > subcase which leads to code duplication. > > Rewrite the function using IS_ENABLED() to minimise the total number > of cases and remove duplicated code. > > > [...]

Re: [PATCH v1 1/6] powerpc/include: Remove unneeded #include

2023-08-23 Thread Michael Ellerman
On Tue, 08 Aug 2023 08:04:38 +0200, Christophe Leroy wrote: > tqm8xx_setup.c and fs_enet.h don't use any items provided by fs_pd.h > > Remove unneeded #include > > Applied to powerpc/next. [1/6] powerpc/include: Remove unneeded #include

Re: [PATCH] powerpc/step: Mark __copy_mem_out() and __emulate_dcbz() __always_inline

2023-08-23 Thread Michael Ellerman
On Wed, 21 Jun 2023 12:38:10 +0200, Christophe Leroy wrote: > objtool reports two folliwng warnings: > arch/powerpc/lib/sstep.o: warning: objtool: copy_mem_out+0x3c > (.text+0x30c): call to __copy_mem_out() with UACCESS enabled > arch/powerpc/lib/sstep.o: warning: objtool:

Re: [PATCH] powerpc/reg: Remove #ifdef around mtspr macro

2023-08-23 Thread Michael Ellerman
On Wed, 21 Jun 2023 12:40:50 +0200, Christophe Leroy wrote: > That ifdef was introduced by commit 1458dd951f7c ("powerpc/8xx: > Handle CPU6 ERRATA directly in mtspr() macro") and left over by > commit 2a45addd21de ("powerpc/8xx: Remove CPU6 ERRATA Workaround") > > Remove it. > > > [...]

Re: [PATCH] powerpc/radix: Move some functions into #ifdef CONFIG_KVM_BOOK3S_HV_POSSIBLE

2023-08-23 Thread Michael Ellerman
On Wed, 09 Aug 2023 10:01:43 +0200, Christophe Leroy wrote: > With skiboot_defconfig, Clang reports: > > CC arch/powerpc/mm/book3s64/radix_tlb.o > arch/powerpc/mm/book3s64/radix_tlb.c:419:20: error: unused function > '_tlbie_pid_lpid' [-Werror,-Wunused-function] > static inline void

Re: [PATCH] powerpc/perf: Convert fsl_emb notifier to state machine callbacks

2023-08-23 Thread Michael Ellerman
On Fri, 18 Aug 2023 10:59:44 +0200, Christophe Leroy wrote: > CC arch/powerpc/perf/core-fsl-emb.o > arch/powerpc/perf/core-fsl-emb.c:675:6: error: no previous prototype for > 'hw_perf_event_setup' [-Werror=missing-prototypes] > 675 | void hw_perf_event_setup(int cpu) > |

Re: [PATCH] powerpc/fsl_pci: Make fsl_add_bridge() static

2023-08-23 Thread Michael Ellerman
On Wed, 16 Aug 2023 17:19:54 +0200, Christophe Leroy wrote: > Since commit 905e75c46dba ("powerpc/fsl-pci: Unify pci/pcie initialization > code") > fsl_add_bridge() is not used anymore outside of fsl_pci.c > > Make it static. > > Applied to powerpc/next. [1/1] powerpc/fsl_pci: Make

Re: [PATCH] powerpc/8xx: Remove init_internal_rtc() to fix no previous prototype error

2023-08-23 Thread Michael Ellerman
On Thu, 17 Aug 2023 14:26:45 +0200, Christophe Leroy wrote: > A W=1 build of mpc885_ads_defconfig throws the following error: > > CC arch/powerpc/platforms/8xx/m8xx_setup.o > arch/powerpc/platforms/8xx/m8xx_setup.c:41:1: error: no previous prototype > for 'init_internal_rtc'

Re: [PATCH] powerpc/82xx: Remove pq2_init_pci

2023-08-23 Thread Michael Ellerman
On Thu, 17 Aug 2023 10:05:08 +0200, Christophe Leroy wrote: > Commit 859b21a008eb ("powerpc: drop PowerQUICC II Family ADS platform > support") removed last user of pq2_init_pci. > > Remove it. > > Applied to powerpc/next. [1/1] powerpc/82xx: Remove pq2_init_pci

Re: [PATCH] powerpc/82xx: Remove CONFIG_8260 and CONFIG_8272

2023-08-23 Thread Michael Ellerman
On Thu, 17 Aug 2023 10:05:49 +0200, Christophe Leroy wrote: > CONFIG_8272 is never used, remove it. > > CONFIG_8260 is redundant with CONFIG_PPC_82xx, remove it. > > Applied to powerpc/next. [1/1] powerpc/82xx: Remove CONFIG_8260 and CONFIG_8272

Re: [PATCH] powerpc/4xx: Remove WatchdogHandler() to fix no previous prototype error

2023-08-23 Thread Michael Ellerman
On Thu, 17 Aug 2023 14:40:49 +0200, Christophe Leroy wrote: > Building ppc40x_defconfig throws the following error: > > CC arch/powerpc/kernel/traps.o > arch/powerpc/kernel/traps.c:2232:29: warning: no previous prototype for > 'WatchdogHandler' [-Wmissing-prototypes] > 2232 | void

Re: [PATCH] powerpc/4xx: Remove pika_dtm_[un]register_shutdown() to fix no previous prototype

2023-08-23 Thread Michael Ellerman
On Thu, 17 Aug 2023 15:44:26 +0200, Christophe Leroy wrote: > ppc4xx_defconfig with W=1 results in: > > CC arch/powerpc/platforms/44x/warp.o > arch/powerpc/platforms/44x/warp.c:369:5: error: no previous prototype for > 'pika_dtm_register_shutdown' [-Werror=missing-prototypes] > 369 |

Re: [PATCH] powerpc/4xx: Add missing includes to fix no previous prototype errors

2023-08-23 Thread Michael Ellerman
On Thu, 17 Aug 2023 16:27:23 +0200, Christophe Leroy wrote: > A W=1 build of ppc40x_defconfig throws the followings errors: > > CC arch/powerpc/platforms/4xx/uic.o > arch/powerpc/platforms/4xx/uic.c:274:13: warning: no previous prototype for > 'uic_init_tree' [-Wmissing-prototypes] >

Re: [PATCH] powerpc/47x: Add prototype for mmu_init_secondary()

2023-08-23 Thread Michael Ellerman
On Thu, 17 Aug 2023 16:25:49 +0200, Christophe Leroy wrote: > A W=1 build of 44x/iss476-smp_defconfig gives: > > arch/powerpc/mm/nohash/44x.c:220:13: error: no previous prototype for > 'mmu_init_secondary' [-Werror=missing-prototypes] > 220 | void __init mmu_init_secondary(int cpu) > |

Re: [PATCH 1/2] powerpc/83xx: Fix style problems in usb.c and remove unneccessary includes from mpc83xx.h

2023-08-23 Thread Michael Ellerman
On Wed, 16 Aug 2023 17:22:16 +0200, Christophe Leroy wrote: > Replace printk(KERN_WARN with pr_warn( > > Remove a couple of blank lines > > Re-align multi-line code. > > Replace asm/io.h by linux/io.h > > [...] Applied to powerpc/next. [1/2] powerpc/83xx: Fix style problems in usb.c and

Re: (subset) [PATCH v1 0/4] Improve ptrace selftest usability

2023-08-23 Thread Michael Ellerman
On Tue, 25 Jul 2023 10:58:37 +1000, Benjamin Gray wrote: > While trying to test changes to the breakpoint implementation in the kernel, I > tried to run the ptrace tests and met many unexplained skips and failures. > > This series addresses the pain points of trying to run these tests and learn >

Re: [PATCH 0/7] Rework perf and ptrace watchpoint tracking

2023-08-23 Thread Michael Ellerman
On Tue, 01 Aug 2023 11:17:37 +1000, Benjamin Gray wrote: > Syzkaller triggered a null pointer dereference in the > arch_unregister_hw_breakpoint() hook. This is due to accessing > the bp->ctx->task field changing to -1 while we iterate the breakpoints. > > This series refactors the breakpoint

Re: [PATCH 1/2] powerpc: mark more local variables as volatile

2023-08-23 Thread Michael Ellerman
On Wed, 09 Aug 2023 15:10:08 +0200, Arnd Bergmann wrote: > A while ago I created a2305e3de8193 ("powerpc: mark local variables > around longjmp as volatile") in order to allow building powerpc with > -Wextra enabled on gcc-11. > > I tried this again with gcc-13 and found two more of the same

Re: (subset) [PATCH v4 1/2] powerpc/mm: Cleanup memory block size probing

2023-08-23 Thread Michael Ellerman
On Tue, 01 Aug 2023 10:14:46 +0530, Aneesh Kumar K.V wrote: > Parse the device tree in early init to find the memory block size to be > used by the kernel. Consolidate the memory block size device tree parsing > to one helper and use that on both powernv and pseries. We still want to > use

Re: (subset) [PATCH 00/17] -Wmissing-prototype warning fixes

2023-08-23 Thread Michael Ellerman
On Thu, 10 Aug 2023 16:19:18 +0200, Arnd Bergmann wrote: > Most of the patches I sent so far for the -Wmissing-prototype warnings > have made it into linux-next now. There are a few that I'm resending > now as nobody has picked them up, and then a number of fixes that I > found while test-building

Re: [PATCH] perf test: Skip perf bench breakpoint run if no breakpoints available

2023-08-23 Thread Arnaldo Carvalho de Melo
Em Wed, Aug 23, 2023 at 01:21:03PM +0530, Kajol Jain escreveu: > Based on commit 7d54a4acd8c1 ("perf test: Skip watchpoint > tests if no watchpoints available"), hardware breakpoints > are not available for power9 platform and because of that > perf bench breakpoint run fails on power9 platform. >

Re: [PATCH] ibmveth: Use dcbf rather than dcbfl

2023-08-23 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (main) by David S. Miller : On Wed, 23 Aug 2023 14:51:39 +1000 you wrote: > When building for power4, newer binutils don't recognise the "dcbfl" > extended mnemonic. > > dcbfl RA, RB is equivalent to dcbf RA, RB, 1. > > Switch to "dcbf" to avoid

Re: [PATCH] perf test: Skip perf bench breakpoint run if no breakpoints available

2023-08-23 Thread Naveen N Rao
Hi Kajol, On Wed Aug 23, 2023 at 1:21 PM IST, Kajol Jain wrote: > Based on commit 7d54a4acd8c1 ("perf test: Skip watchpoint > tests if no watchpoints available"), hardware breakpoints > are not available for power9 platform and because of that > perf bench breakpoint run fails on power9 platform.

Re: [PATCH v3 3/4] arch/mips/configs/*_defconfig cleanup

2023-08-23 Thread Thomas Bogendoerfer
On Thu, Aug 17, 2023 at 07:50:13AM -0400, Trevor Woerner wrote: > Drop CONFIG_IP_NF_TARGET_CLUSTERIP from any remaining mips defconfigs as it > was removed in commit 9db5d918e2c0 ("netfilter: ip_tables: remove clusterip > target"). > > Signed-off-by: Trevor Woerner > --- >

[PATCH 2/2] perf vendor events: Update metric events for power10 platform

2023-08-23 Thread Kajol Jain
Update JSON/events for power10 platform with additional metrics. Signed-off-by: Kajol Jain --- .../arch/powerpc/power10/metrics.json | 388 ++ 1 file changed, 388 insertions(+) diff --git a/tools/perf/pmu-events/arch/powerpc/power10/metrics.json

[PATCH 1/2] perf vendor events: Update JSON/events for power10 platform

2023-08-23 Thread Kajol Jain
Update JSON/Events list with data-source events for power10 platform. Signed-off-by: Kajol Jain --- .../arch/powerpc/power10/datasource.json | 1787 + .../arch/powerpc/power10/others.json | 10 - .../arch/powerpc/power10/translation.json |5 - 3 files

[PATCH] perf test: Skip perf bench breakpoint run if no breakpoints available

2023-08-23 Thread Kajol Jain
Based on commit 7d54a4acd8c1 ("perf test: Skip watchpoint tests if no watchpoints available"), hardware breakpoints are not available for power9 platform and because of that perf bench breakpoint run fails on power9 platform. Add code to check for the return value of perf_event_open() in

Re: linux-next: manual merge of the tty tree with the powerpc tree

2023-08-23 Thread Michael Ellerman
Greg KH writes: > On Fri, Aug 18, 2023 at 02:58:26PM +1000, Stephen Rothwell wrote: >> Hi all, >> >> Today's linux-next merge of the tty tree got a conflict in: >> >> arch/powerpc/include/asm/fs_pd.h >> >> between commits: >> >> e6e077cb2aa4 ("powerpc/include: Declare mpc8xx_immr in

Re: [PATCH] powerpc: Drop zalloc_maybe_bootmem()

2023-08-23 Thread Christophe Leroy
Le 23/08/2023 à 07:54, Michael Ellerman a écrit : > The only callers of zalloc_maybe_bootmem() are PCI setup routines. These > used to be called early during boot before slab setup, and also during > runtime due to hotplug. > > But commit 5537fcb319d0 ("powerpc/pci: Add ppc_md.discover_phbs()")