[PATCH] powerpc/embedded6xx/ls_uart: Add missing of_node_put()

2022-06-20 Thread Liang He
In ls_uarts_init(), we need to add a of_node_put() to keep refcount balance. Signed-off-by: Liang He --- arch/powerpc/platforms/embedded6xx/ls_uart.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/powerpc/platforms/embedded6xx/ls_uart.c b/arch/powerpc/platforms/embedded6xx/ls_uart.c

[PATCH v5 0/5] In kernel handling of CPU hotplug events for crash kernel

2022-06-20 Thread Sourabh Jain
This patch series implements the crash hotplug handler on PowerPC introduced by https://lkml.org/lkml/2022/6/13/3382 patch series. The Problem: Post hotplug/DLPAR events the capture kernel holds stale information about the system. Dump collection with stale capture kernel might end u

[PATCH v5 2/5] powerpc/crash hp: update kimage_arch struct

2022-06-20 Thread Sourabh Jain
Once the kimage is prepared the only way to identify which kexec segment holds FDT is by looping through all kexec segments. To avoid this a new member "fdt_index" is added to kimage_arch struct. The new member holds the index of FDT segment in the kexec segment array which gives direct access to F

[PATCH v5 1/5] powerpc/kexec: make update_cpus_node non-static

2022-06-20 Thread Sourabh Jain
Make the update_cpus_node function non-static and export it for usage in other kexec components. The update_cpus_node definition is moved to core_64.c so that it can be used with both kexec_load and kexec_file_load system calls. No functional change intended. Signed-off-by: Sourabh Jain --- ar

[PATCH v5 3/5] powerpc/crash hp: add crash hotplug support for kexec_file_load

2022-06-20 Thread Sourabh Jain
Two major changes are done to enable the crash CPU hotplug handler. Firstly, updated the kexec load path to prepare kimage for hotplug changes, and secondly, implemented the arch specific crash hotplug handler. On the kexec load path, the memsz allocation for the crash FDT segment is updated to en

[PATCH v5 4/5] powerpc/crash hp: add crash hotplug support for kexec_load

2022-06-20 Thread Sourabh Jain
A common crash hotplug handler is used for both kexec_load and kexec_file_load, which is already implemented in earlier patches while adding support for kexec_file_load. To enable the crash hotplug handler to work for kexec_load case the fdt_index attribute of kimage_arch needs to be populated wit

[PATCH v5 5/5] powerpc/crash hp: add crash page helper functions

2022-06-20 Thread Sourabh Jain
Define arch_[un]map_crash_pages functions to avoid build issues due to undefined arch specific function to access crash memory pages. A temporary patch to avoid build issues may need some changes in generic code to avoid this. The issue is under discussion: https://lkml.org/lkml/2022/6/20/22 Sig

Re: [PATCH -next v5 2/8] arm64: extable: make uaaccess helper use extable type EX_TYPE_UACCESS_ERR_ZERO

2022-06-20 Thread Mark Rutland
On Mon, Jun 20, 2022 at 10:59:12AM +0800, Tong Tiangen wrote: > 在 2022/6/18 20:40, Mark Rutland 写道: > > On Sat, Jun 18, 2022 at 04:42:06PM +0800, Tong Tiangen wrote: > > > > > > diff --git a/arch/arm64/include/asm/asm-extable.h > > > > > > b/arch/arm64/include/asm/asm-extable.h > > > > > > index 56

Re:Re: [PATCH] powerpc: kernel: Change the order of of_node_put()

2022-06-20 Thread Liang He
At 2022-06-18 16:48:26, "Christophe Leroy" wrote: > > >Le 18/06/2022 à 10:03, Liang He a écrit : >> >> >> >> >> >> 在 2022-06-18 15:13:13,"Christophe Leroy" 写道: >>> >>> >>> Le 17/06/2022 à 13:26, Liang He a écrit : In add_pcspkr(), it is better to call of_node_put() after the 'if

Re: [PATCH] powerpc: kernel: Change the order of of_node_put()

2022-06-20 Thread Christophe Leroy
Hi, Le 20/06/2022 à 11:23, Liang He a écrit : > > Hi, Christophe. > > Sorry to trobule you again. > > Now I have found other bugs in same directories (i.e., arch/powerpc/sysdev), > with the ones I have sent but not recieved acked-by or confirmed email. > > So I need to merge the old ones into

Re:Re: [PATCH] powerpc: kernel: Change the order of of_node_put()

2022-06-20 Thread Liang He
At 2022-06-20 19:11:33, "Christophe Leroy" wrote: >Hi, > >Le 20/06/2022 à 11:23, Liang He a écrit : >> >> Hi, Christophe. >> >> Sorry to trobule you again. >> >> Now I have found other bugs in same directories (i.e., arch/powerpc/sysdev), >> with the ones I have sent but not recieved acked-b

[PATCH v4] powerpc/powernv: wire up rng during setup_arch

2022-06-20 Thread Jason A. Donenfeld
The platform's RNG must be available before random_init() in order to be useful for initial seeding, which in turn means that it needs to be called from setup_arch(), rather than from an init call. Fortunately, each platform already has a setup_arch function pointer, which means we can wire it up t

[PATCH v2] powerpc/sysdev: Fix refcount leak bugs

2022-06-20 Thread Liang He
We need add corresponding of_node_put() to keep refcount balance in sysdev. Signed-off-by: Liang He --- changelog: v2: (1) merge all sysdev related bug into one commit (2) find new bugs in spapr.c and mpic_msgr.c v1: find missing of_node_put() in each file arch/powerpc/sysdev/fsl_pci.

[PATCH v3] powerpc/powernv: Fix refcount leak bugs

2022-06-20 Thread Liang He
In these driver init functions, there are two kinds of errors: (1) missing of_put_node() for of_find_compatible_node()'s returned pointer (refcount incremented) in fail path or when it is not used anymore. (2) missing of_put_node() for 'for_each_xxx' loop's break These bugs are similar w

Re: [PATCH -next v5 2/8] arm64: extable: make uaaccess helper use extable type EX_TYPE_UACCESS_ERR_ZERO

2022-06-20 Thread Mark Rutland
On Mon, Jun 20, 2022 at 10:13:41PM +0800, Tong Tiangen wrote: > > > 在 2022/6/20 17:10, Mark Rutland 写道: > > On Mon, Jun 20, 2022 at 10:59:12AM +0800, Tong Tiangen wrote: > > > 在 2022/6/18 20:40, Mark Rutland 写道: > > > The following errors are reported during compilation: > > > [...] > > > arch/ar

Re: [PATCH 4/4] ASoC: wm8904: add DMIC support

2022-06-20 Thread Mark Brown
On Mon, Jun 20, 2022 at 02:49:51PM +, Pierluigi Passaro wrote: > > > +static const char *cin_text[] = { > > > + "ADC", "DMIC" > > > +}; > > > +static SOC_ENUM_SINGLE_DECL(cin_enum, > > > + WM8904_DIGITAL_MICROPHONE_0, 12, cin_text); > > Why would this be runtime s

[PATCH] powerpc/powermac: Fix refcount leak bug

2022-06-20 Thread Liang He
In smp_core99_setup(), we need to add of_node_put() to keep refcount balance. Signed-off-by: Liang He --- arch/powerpc/platforms/powermac/smp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/platforms/powermac/smp.c b/arch/powerpc/platforms/powermac/smp.c index d9df45741ece..5

Re: [PATCH 4/4] ASoC: wm8904: add DMIC support

2022-06-20 Thread Mark Brown
On Mon, Jun 20, 2022 at 03:03:50PM +, Pierluigi Passaro wrote: > > Via firmware description. > Can you please provide any reference approach in the kernel code ? git grep of_ git grep fwnode_ and I don't immediately remember what the prefix is for ACPI functions. signature.asc Description

Re: [PATCH 3/4] ASoC: wm8904: extend device tree support

2022-06-20 Thread Mark Brown
On Mon, Jun 20, 2022 at 02:32:17PM +, Pierluigi Passaro wrote: > > > +  - drc-cfg-regs: Default registers value for R40/41/42/43 (DRC) > > > +    The list must be (4 x num-drc-cfgs) entries long. > > > +    If absent or incomplete, DRC is disabled. > > What is the purpose of having num-drc-cf

[PATCH] powerpc/pasemi: Fix refcount leak bug

2022-06-20 Thread Liang He
In pas_pci_init(), we need one of_node_put() for of_find_node_by_path() to keep refcount balance. Signed-off-by: Liang He --- arch/powerpc/platforms/pasemi/pci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/platforms/pasemi/pci.c b/arch/powerpc/platforms/pasemi/pci.c index 5

Re: [PATCH 4/4] ASoC: wm8904: add DMIC support

2022-06-20 Thread Mark Brown
On Mon, Jun 20, 2022 at 03:30:45PM +, Pierluigi Passaro wrote: > Just for my understanding, are you suggesting to set a device tree property > to force a fixed behavior in the driver ? Yes. > WM8904 allows using both a DMIC and LINEIN, switching between one or the > other and this is how w

Re: [PATCH 4/4] ASoC: wm8904: add DMIC support

2022-06-20 Thread Mark Brown
On Mon, Jun 20, 2022 at 05:52:43PM +, Pierluigi Passaro wrote: > > > Just for my understanding, are you suggesting to set a device tree > > > property to force a fixed behavior in the driver ? > > Yes. > Why should we use a fixed behavior ? The things that are fixed by the design should be f

Re: [PATCH 1/4] video: fbdev: offb: Include missing linux/platform_device.h

2022-06-20 Thread Helge Deller
On 6/11/22 18:50, Christophe Leroy wrote: > A lot of drivers were getting platform and of headers > indirectly via headers like asm/pci.h or asm/prom.h > > Most of them were fixed during 5.19 cycle but a newissue was > introduced by commit 52b1b46c39ae ("of: Create platform devices > for OF framebu

Re: [PATCH 3/4] ASoC: wm8904: extend device tree support

2022-06-20 Thread Pierluigi Passaro
Hi All, > > +  - num-drc-cfgs: Number of available DRC modes from drc-cfg-regs property > > + > > +  - drc-cfg-regs: Default registers value for R40/41/42/43 (DRC) > > +    The list must be (4 x num-drc-cfgs) entries long. > > +    If absent or incomplete, DRC is disabled. > > What is the purpose

Re: [PATCH 3/4] ASoC: wm8904: extend device tree support

2022-06-20 Thread Pierluigi Passaro
> > The platform_data structure is not populated when using device trees. > > This patch adds optional dts properties to allow populating it: > > - gpio-cfg > > - mic-cfg > > - num-drc-cfgs > > - drc-cfg-regs > > - drc-cfg-names > > - num-retune-mobile-cfgs > > - retune-mobile-cfg-regs > > - retune

Re: [PATCH 4/4] ASoC: wm8904: add DMIC support

2022-06-20 Thread Pierluigi Passaro
Hi All, > > +static const char *cin_text[] = { > > + "ADC", "DMIC" > > +}; > > + > > +static SOC_ENUM_SINGLE_DECL(cin_enum, > > + WM8904_DIGITAL_MICROPHONE_0, 12, cin_text); > > Why would this be runtime selectable?  I'd expect the decision to use > an analogue or digi

Re: [PATCH 4/4] ASoC: wm8904: add DMIC support

2022-06-20 Thread Pierluigi Passaro
> > > > +static const char *cin_text[] = { > > > > + "ADC", "DMIC" > > > > +}; > > > > +static SOC_ENUM_SINGLE_DECL(cin_enum, > > > > + WM8904_DIGITAL_MICROPHONE_0, 12, cin_text); > > > Why would this be runtime selectable?  I'd expect the decision to use > > > an anal

Re: [PATCH 4/4] ASoC: wm8904: add DMIC support

2022-06-20 Thread Pierluigi Passaro
> > > Via firmware description. > > Can you please provide any reference approach in the kernel code ? > git grep of_ > git grep fwnode_ > and I don't immediately remember what the prefix is for ACPI functions. Just for my understanding, are you suggesting to set a device tree property to forc

Re: [PATCH 4/4] ASoC: wm8904: add DMIC support

2022-06-20 Thread Pierluigi Passaro
> > Just for my understanding, are you suggesting to set a device tree > > property to force a fixed behavior in the driver ? > Yes. Why should we use a fixed behavior ? > > WM8904 allows using both a DMIC and LINEIN, switching between one or > > the other and this is how we currently use it. >

Re: [PATCH 4/4] ASoC: wm8904: add DMIC support

2022-06-20 Thread Pierluigi Passaro
> > > > Just for my understanding, are you suggesting to set a device tree > > > > property to force a fixed behavior in the driver ? > > > Yes. > > Why should we use a fixed behavior ? > The things that are fixed by the design should be fixed. > > > The device shares pins between the line inpu

[Bug 216156] New: kmemleak: Not scanning unknown object at 0xc00000007f000000

2022-06-20 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=216156 Bug ID: 216156 Summary: kmemleak: Not scanning unknown object at 0xc0007f00 Product: Platform Specific/Hardware Version: 2.5 Kernel Version: 5.19-rc3 Hardware:

[Bug 216156] kmemleak: Not scanning unknown object at 0xc00000007f000000

2022-06-20 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=216156 --- Comment #1 from Erhard F. (erhar...@mailbox.org) --- Created attachment 301231 --> https://bugzilla.kernel.org/attachment.cgi?id=301231&action=edit kernel .config (5.19-rc3, PowerMac G5 11,2) -- You may reply to this email to add a comment

[Bug 216156] kmemleak: Not scanning unknown object at 0xc00000007f000000

2022-06-20 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=216156 --- Comment #2 from Erhard F. (erhar...@mailbox.org) --- Created attachment 301232 --> https://bugzilla.kernel.org/attachment.cgi?id=301232&action=edit cat /sys/kernel/debug/kmemleak Apart from that kmemleak shows a lot of hits. Only this pat

[Bug 216156] kmemleak: Not scanning unknown object at 0xc00000007f000000

2022-06-20 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=216156 --- Comment #3 from Erhard F. (erhar...@mailbox.org) --- For the "WARNING: CPU: 0 PID: 232 at include/linux/skbuff.h:2911 .rtl8169_features_check+0x290/0x4f0" later in the dmesg I openend bug #216157 in doubt whether this is ppc64 specific. -- Y

Re: [PATCH v4 2/2] PCI/DPC: Disable DPC service when link is in L2/L3 ready, L2 and L3 state

2022-06-20 Thread Kai-Heng Feng
On Mon, Apr 18, 2022 at 10:41 AM Sathyanarayanan Kuppuswamy wrote: > > > > On 4/8/22 8:31 AM, Kai-Heng Feng wrote: > > On Intel Alder Lake platforms, Thunderbolt entering D3cold can cause > > some errors reported by AER: > > [ 30.100211] pcieport :00:1d.0: AER: Uncorrected (Non-Fatal) error