Re: [PATCH v6 0/5] powerpc/bpf: use BPF prog pack allocator

2023-10-16 Thread Daniel Borkmann
On 10/12/23 10:03 PM, Hari Bathini wrote: Most BPF programs are small, but they consume a page each. For systems with busy traffic and many BPF programs, this may also add significant pressure on instruction TLB. High iTLB pressure usually slows down the whole system causing visible performance

[PATCH 3/6] powerpc/qspinlock: propagate owner preemptedness rather than CPU number

2023-10-16 Thread Nicholas Piggin
Rather than propagating the CPU number of the preempted lock owner, just propagate whether the owner was preempted. Waiters must read the lock value when yielding to it to prevent races anyway, so might as well always load the owner CPU from the lock. To further simplify the code, also don't

Re: Re: [PATCH v3 1/2] ASoC: dt-bindings: sound-card-common: List DAPM endpoints ignoring system suspend

2023-10-16 Thread Mark Brown
On Mon, Oct 16, 2023 at 12:08:56PM +, Chancel Liu wrote: > Thanks Mark and Rob for your advice. In fact, it's common use case. We can see > many drivers set widgets ignoring suspend. I will remove the linux specifics > and focus on the key concept. How about the modification on the property

Re: [RFC PATCH v6 11/11] media: viaudm2m: add virtual driver for audio memory to memory

2023-10-16 Thread Hans Verkuil
On 13/10/2023 10:31, Shengjiu Wang wrote: > Audio memory to memory virtual driver use video memory to memory > virtual driver vim2m.c as example. The main difference is > device type is VFL_TYPE_AUDIO and device cap type is V4L2_CAP_AUDIO_M2M. > > The device_run function is a dummy function,

Re: [PATCH v2 9/9] iommu/dart: Remove the force_bypass variable

2023-10-16 Thread Janne Grunau
Hej, On Thu, Sep 28, 2023, at 01:47, Jason Gunthorpe wrote: > This flag just caches if the IO page size is larger than the CPU > PAGE_SIZE. This only needs to be checked in two places so remove the > confusingly named cache. > > dart would like to not support paging domains at all if the IO page

[PATCH 0/6] powerpc/qspinlock: Fix yield latency bug and other

2023-10-16 Thread Nicholas Piggin
This fixes a long-standing latency bug in the powerpc qspinlock implementation that quite a few people have reported and helped out with debugging. The first patch is a minimal fix that avoids the problem. The other patches are streamlining and improvements after the fix. Thanks, Nick Nicholas

Re: [RFC PATCH v6 09/11] media: uapi: Add audio rate controls support

2023-10-16 Thread Hans Verkuil
Hi Shengjiu, On 13/10/2023 10:31, Shengjiu Wang wrote: > Fixed point controls are used by the user to configure > the audio sample rate to driver. > > Add V4L2_CID_ASRC_SOURCE_RATE and V4L2_CID_ASRC_DEST_RATE > new IDs for ASRC rate control. > > Signed-off-by: Shengjiu Wang > --- >

Re: [RFC PATCH v6 07/11] media: v4l2: Add audio capture and output support

2023-10-16 Thread Hans Verkuil
On 13/10/2023 10:31, Shengjiu Wang wrote: > Audio signal processing has the requirement for memory to > memory similar as Video. > > This patch is to add this support in v4l2 framework, defined > new buffer type V4L2_BUF_TYPE_AUDIO_CAPTURE and > V4L2_BUF_TYPE_AUDIO_OUTPUT, defined new format

Re: [PATCH 2/3] PCI: layerscape: add suspend/resume for ls1021a

2023-10-16 Thread Frank Li
On Mon, Oct 16, 2023 at 10:22:11AM -0500, Bjorn Helgaas wrote: > On Mon, Oct 16, 2023 at 10:45:25AM -0400, Frank Li wrote: > > On Tue, Oct 10, 2023 at 06:02:36PM +0200, Lorenzo Pieralisi wrote: > > > On Tue, Oct 10, 2023 at 10:20:12AM -0400, Frank Li wrote: > > > > > Ping > > > > > > Read and

Re: [PATCH 2/3] PCI: layerscape: add suspend/resume for ls1021a

2023-10-16 Thread Lorenzo Pieralisi
On Mon, Oct 16, 2023 at 10:22:11AM -0500, Bjorn Helgaas wrote: > On Mon, Oct 16, 2023 at 10:45:25AM -0400, Frank Li wrote: > > On Tue, Oct 10, 2023 at 06:02:36PM +0200, Lorenzo Pieralisi wrote: > > > On Tue, Oct 10, 2023 at 10:20:12AM -0400, Frank Li wrote: > > > > > Ping > > > > > > Read and

RE: Re: [PATCH v3 1/2] ASoC: dt-bindings: sound-card-common: List DAPM endpoints ignoring system suspend

2023-10-16 Thread Chancel Liu
> > I think the key thing > > here is that these are endpoints that can be active over suspend of > > the main application processor that the current operating system is > > running (system DT stuff is an interesting corner case here...), and > > the example is probably a bit specific. Other

[PATCH 2/6] powerpc/qspinlock: stop queued waiters trying to set lock sleepy

2023-10-16 Thread Nicholas Piggin
If a queued waiter notices the lock owner or the previous waiter has been preempted, it attempts to mark the lock sleepy, but it does this as a try-set operation using the original lock value it got when queueing, which will become stale as the queue progresses, and the try-set will fail. Drop

[PATCH 1/6] powerpc/qspinlock: Fix stale propagated yield_cpu

2023-10-16 Thread Nicholas Piggin
yield_cpu is a sample of a preempted lock holder that gets propagated back through the queue. Queued waiters use this to yield to the preempted lock holder without continually sampling the lock word (which would defeat the purpose of MCS queueing by bouncing the cache line). The problem is that

Re: [PATCH v2 3/7] powerpc/rtas: serialize ibm,get-vpd service with papr-vpd sequences

2023-10-16 Thread Nathan Lynch
> Take the papr-vpd driver's internal mutex when sys_rtas performs > ibm,get-vpd calls. This prevents sys_rtas(ibm,get-vpd) calls from > interleaving with sequences performed by the driver, ensuring that > such sequences are not disrupted. > @@ -1861,6 +1862,28 @@ SYSCALL_DEFINE1(rtas,

[PATCH v2 3/3] PCI: layerscape: Add suspend/resume for ls1043a

2023-10-16 Thread Frank Li
ls1043a add suspend/resume support. Signed-off-by: Frank Li --- Notes: Change from v1 to v2 - Change subject 'a' to 'A' drivers/pci/controller/dwc/pci-layerscape.c | 91 - 1 file changed, 90 insertions(+), 1 deletion(-) diff --git

[PATCH 5/6] powerpc/qspinlock: Propagate sleepy if previous waiter is preempted

2023-10-16 Thread Nicholas Piggin
The sleepy (aka lock-owner-is-preempted) condition is propagated down the queue by each waiter. If a waiter becomes preempted, it can no longer propagate sleepy. To allow subsequent waiters to yield to the lock owner, also check the lock owner in this case. Signed-off-by: Nicholas Piggin ---

[PATCH v2 2/3] PCI: layerscape: Add suspend/resume for ls1021a

2023-10-16 Thread Frank Li
ls1021a add suspend/resume support. Signed-off-by: Frank Li --- Notes: change from v1 to v2 - change subject 'a' to 'A' drivers/pci/controller/dwc/pci-layerscape.c | 88 - 1 file changed, 87 insertions(+), 1 deletion(-) diff --git

Re: [RFC PATCH v6 08/11] media: uapi: define audio sample format fourcc type

2023-10-16 Thread Hans Verkuil
On 13/10/2023 10:31, Shengjiu Wang wrote: > The audio sample format definition is from alsa, > the header file is include/uapi/sound/asound.h, but > don't include this header file directly, because in > user space, there is another copy in alsa-lib. > There will be conflict in userspace for

Re: [PATCH] arch: powerpc: net: bpf_jit_comp32.c: Fixed 'instead' typo

2023-10-16 Thread Daniel Borkmann
On 10/13/23 7:31 AM, Muhammad Muzammil wrote: Fixed 'instead' typo Signed-off-by: Muhammad Muzammil Michael, I presume you'll pick it up? Thanks, Daniel --- arch/powerpc/net/bpf_jit_comp32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 6/6] powerpc/qspinlock: Rename yield_propagate_owner tunable

2023-10-16 Thread Nicholas Piggin
Rename yield_propagate_owner to yield_sleepy_owner, which better describes what it does (what, not how). Signed-off-by: Nicholas Piggin --- arch/powerpc/lib/qspinlock.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/arch/powerpc/lib/qspinlock.c

[PATCH v2 1/3] PCI: layerscape: Add function pointer for exit_from_l2()

2023-10-16 Thread Frank Li
Difference layerscape chip have not difference exit_from_l2() method. Using function pointer for ls1028. It prepare for other layerscape suspend/resume support. Signed-off-by: Frank Li --- Notes: Change from v1 to v2 - change subject 'a' to 'A'

[PATCH 4/6] powerpc/qspinlock: don't propagate the not-sleepy state

2023-10-16 Thread Nicholas Piggin
To simplify things, don't propagate the not-sleepy condition back down the queue. Instead, have the waiters clear their own node->sleepy when finding the lock owner is not preempted. Signed-off-by: Nicholas Piggin --- arch/powerpc/lib/qspinlock.c | 26 -- 1 file changed,

Re: [RFC PATCH v6 10/11] media: imx-asrc: Add memory to memory driver

2023-10-16 Thread Hans Verkuil
On 13/10/2023 10:31, Shengjiu Wang wrote: > Implement the ASRC memory to memory function using > the v4l2 framework, user can use this function with > v4l2 ioctl interface. > > User send the output and capture buffer to driver and > driver store the converted data to the capture buffer. > > This

Re: [PATCH 2/3] PCI: layerscape: add suspend/resume for ls1021a

2023-10-16 Thread Bjorn Helgaas
On Mon, Oct 16, 2023 at 10:45:25AM -0400, Frank Li wrote: > On Tue, Oct 10, 2023 at 06:02:36PM +0200, Lorenzo Pieralisi wrote: > > On Tue, Oct 10, 2023 at 10:20:12AM -0400, Frank Li wrote: > > > Ping > > > > Read and follow please (and then ping us): > >

Re: [PATCH 2/3] PCI: layerscape: add suspend/resume for ls1021a

2023-10-16 Thread Frank Li
On Tue, Oct 10, 2023 at 06:02:36PM +0200, Lorenzo Pieralisi wrote: > On Tue, Oct 10, 2023 at 10:20:12AM -0400, Frank Li wrote: > > On Wed, Oct 04, 2023 at 10:23:51AM -0400, Frank Li wrote: > > > On Fri, Sep 15, 2023 at 02:43:05PM -0400, Frank Li wrote: > > > > ls1021a add suspend/resume support. >

Re: [PATCH 1/3] PCI: layerscape: add function pointer for exit_from_l2()

2023-10-16 Thread Manivannan Sadhasivam
On Fri, Sep 15, 2023 at 02:43:04PM -0400, Frank Li wrote: > Difference layerscape chip have not difference exit_from_l2() method. > Using function pointer for ls1028. It prepare for other layerscape > suspend/resume support. > How about: Since difference SoCs require different sequence for

Re: [PATCH 2/3] PCI: layerscape: add suspend/resume for ls1021a

2023-10-16 Thread Bjorn Helgaas
On Mon, Oct 16, 2023 at 12:11:04PM -0400, Frank Li wrote: > On Mon, Oct 16, 2023 at 10:22:11AM -0500, Bjorn Helgaas wrote: > > Obviously Lorenzo *could* edit all your subject lines on your behalf, > > but it makes everybody's life easier if people look at the existing > > code and follow the

Re: [PATCH 2/3] PCI: layerscape: add suspend/resume for ls1021a

2023-10-16 Thread Frank Li
On Mon, Oct 16, 2023 at 10:28:24PM +0530, Manivannan Sadhasivam wrote: > On Fri, Sep 15, 2023 at 02:43:05PM -0400, Frank Li wrote: > > ls1021a add suspend/resume support. > > > > Please add what the driver is doing during suspend/resume. > > > Signed-off-by: Frank Li > > --- > >

Re: [PATCH 3/3] PCI: layerscape: add suspend/resume for ls1043a

2023-10-16 Thread Manivannan Sadhasivam
On Fri, Sep 15, 2023 at 02:43:06PM -0400, Frank Li wrote: > ls1043a add suspend/resume support. > Same comment as previous patch for patch description. > Signed-off-by: Frank Li > --- > drivers/pci/controller/dwc/pci-layerscape.c | 91 - > 1 file changed, 90 insertions(+),

Re: [PATCH] powerpc/pseries/vas: Migration suspend waits for no in-progress open windows

2023-10-16 Thread Nathan Lynch
Nathan Lynch writes: > Haren Myneni writes: >>> Haren Myneni writes: The hypervisor returns migration failure if all VAS windows are not closed. During pre-migration stage, vas_migration_handler() sets migration_in_progress flag and closes all windows from the list. The

Re: [PATCH] powerpc/pseries/vas: Migration suspend waits for no in-progress open windows

2023-10-16 Thread Haren Myneni
On 10/16/23 1:30 PM, Nathan Lynch wrote: Nathan Lynch writes: Haren Myneni writes: Haren Myneni writes: The hypervisor returns migration failure if all VAS windows are not closed. During pre-migration stage, vas_migration_handler() sets migration_in_progress flag and closes all windows

Re: [PATCH 2/3] PCI: layerscape: add suspend/resume for ls1021a

2023-10-16 Thread Manivannan Sadhasivam
On Fri, Sep 15, 2023 at 02:43:05PM -0400, Frank Li wrote: > ls1021a add suspend/resume support. > Please add what the driver is doing during suspend/resume. > Signed-off-by: Frank Li > --- > drivers/pci/controller/dwc/pci-layerscape.c | 88 - > 1 file changed, 87

Re: [PATCH 2/3] PCI: layerscape: add suspend/resume for ls1021a

2023-10-16 Thread Lorenzo Pieralisi
On Mon, Oct 16, 2023 at 12:11:04PM -0400, Frank Li wrote: > On Mon, Oct 16, 2023 at 10:22:11AM -0500, Bjorn Helgaas wrote: > > On Mon, Oct 16, 2023 at 10:45:25AM -0400, Frank Li wrote: > > > On Tue, Oct 10, 2023 at 06:02:36PM +0200, Lorenzo Pieralisi wrote: > > > > On Tue, Oct 10, 2023 at

Re: [PATCH 2/3] PCI: layerscape: add suspend/resume for ls1021a

2023-10-16 Thread Frank Li
On Mon, Oct 16, 2023 at 11:25:12AM -0500, Bjorn Helgaas wrote: > On Mon, Oct 16, 2023 at 12:11:04PM -0400, Frank Li wrote: > > On Mon, Oct 16, 2023 at 10:22:11AM -0500, Bjorn Helgaas wrote: > > > > Obviously Lorenzo *could* edit all your subject lines on your behalf, > > > but it makes

[PATCHv9 2/2] powerpc/setup: Loosen the mapping between cpu logical id and its seq in dt

2023-10-16 Thread Pingfan Liu
*** Idea *** For kexec -p, the boot cpu can be not the cpu0, this causes the problem of allocating memory for paca_ptrs[]. However, in theory, there is no requirement to assign cpu's logical id as its present sequence in the device tree. But there is something like cpu_first_thread_sibling(),

[PATCHv9 1/2] powerpc/setup : Enable boot_cpu_hwid for PPC32

2023-10-16 Thread Pingfan Liu
In order to identify the boot cpu, its intserv[] should be recorded and checked in smp_setup_cpu_maps(). smp_setup_cpu_maps() is shared between PPC64 and PPC32. Since PPC64 has already used boot_cpu_hwid to carry that information, enabling this variable on PPC32 so later it can also be used to

[PATCHv9 0/2] enable nr_cpus for powerpc

2023-10-16 Thread Pingfan Liu
From: Pingfan Liu Since my last v4 [1], the code has undergone great changes. The paca[] array has been reorganized and indexed by paca_ptrs[], which dramatically decreases the memory consumption even if there are many unpresent cpus in the middle. However, reordering the logical cpu numbers

Re: [PATCHv8 1/5] powerpc/setup : Enable boot_cpu_hwid for PPC32

2023-10-16 Thread Pingfan Liu
On Mon, Oct 16, 2023 at 12:13:53PM +0530, Sourabh Jain wrote: > Hello Pingfan, > > > > > > > With this patch series applied, the kdump kernel fails to boot on > > > > > > powerpc with nr_cpus=1. > > > > > > > > > > > > Console logs: > > > > > > --- > > > > > > [root]# echo c >

Re: [PATCH V2 0/3] Fix for shellcheck issues with latest scripts in tests/shell

2023-10-16 Thread Namhyung Kim
Hello, On Fri, Oct 13, 2023 at 12:31 AM Athira Rajeev wrote: > > shellcheck was run on perf tool shell scripts as a pre-requisite > to include a build option for shellcheck discussed here: > https://www.spinics.net/lists/linux-perf-users/msg25553.html > > And fixes were added for the

Re: [Bisected] PowerMac G5 fails booting kernel 6.6-rc3 (BUG: Unable to handle kernel data access at 0xfeffbb62ffec65fe)

2023-10-16 Thread Michael Ellerman
Erhard Furtner writes: > On Thu, 12 Oct 2023 22:41:56 +1100 > Michael Ellerman wrote: > >> Can you checkout the exact commit that crash is from and do: >> >> $ make arch/powerpc/mm/book3s64/hash_utils.lst >> >> And paste/attach the content of that file. >> >> cheers > > Ok, attached the

Re: [PATCH] scsi: ibmvfc: Use 'unsigned int' for single-bit bitfields in 'struct ibmvfc_host'

2023-10-16 Thread Martin K. Petersen
On Tue, 10 Oct 2023 13:32:37 -0700, Nathan Chancellor wrote: > Clang warns (or errors with CONFIG_WERROR=y) several times along the > lines of: > > drivers/scsi/ibmvscsi/ibmvfc.c:650:17: warning: implicit truncation from > 'int' to a one-bit wide bit-field changes value from 1 to -1 >

Re: [PATCHv8 1/5] powerpc/setup : Enable boot_cpu_hwid for PPC32

2023-10-16 Thread Sourabh Jain
Hello Pingfan, With this patch series applied, the kdump kernel fails to boot on powerpc with nr_cpus=1. Console logs: --- [root]# echo c > /proc/sysrq-trigger [ 74.783235] sysrq: Trigger a crash [ 74.783244] Kernel panic - not syncing: sysrq triggered crash [ 74.783252]

Re: [PATCH 06/20] mtd: powernv_flash: Convert to platform remove callback returning void

2023-10-16 Thread Miquel Raynal
On Sun, 2023-10-08 at 20:01:29 UTC, =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= wrote: > The .remove() callback for a platform driver returns an int which makes > many driver authors wrongly assume it's possible to do error handling by > returning an error code. However the value returned is ignored (apart