[RFC PATCH 3/5] powerpc/smp: Lookup avail once per device tree node

2023-12-29 Thread Michael Ellerman
The of_device_is_available() check only needs to be done once per device node, there's no need to repeat it for each thread. Move it out of the loop. Signed-off-by: Michael Ellerman --- arch/powerpc/kernel/setup-common.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff

Re: [PATCH v2 02/10] ARM: dts: ls1021a: add TQ-Systems MBLS102xA device tree

2023-01-26 Thread Alexander Stein
Hi Shawn, thanks for your feedback. Am Donnerstag, 26. Januar 2023, 10:44:21 CET schrieb Shawn Guo: > On Fri, Jan 20, 2023 at 02:34:47PM +0100, Alexander Stein wrote: > > Add device tree for the MBLS102xA mainboard with TQMLS1021A SoM. > > > > Signed-off-by: Alexander Stein

Re: [PATCH v2 02/10] ARM: dts: ls1021a: add TQ-Systems MBLS102xA device tree

2023-01-26 Thread Shawn Guo
On Fri, Jan 20, 2023 at 02:34:47PM +0100, Alexander Stein wrote: > Add device tree for the MBLS102xA mainboard with TQMLS1021A SoM. > > Signed-off-by: Alexander Stein > --- > Changes in v2: > * Remove unnecessary status = "okay" > * Remove underscore from node

[PATCH v3 02/10] ARM: dts: ls1021a: add TQ-Systems MBLS102xA device tree

2023-01-24 Thread Alexander Stein
Add device tree for the MBLS102xA mainboard with TQMLS1021A SoM. Signed-off-by: Alexander Stein --- Changes in v3: * None Changes in v2: * Remove unnecessary status = "okay" * Remove underscore from node names * Move reg direct below compatiblefor i2c devices * Remove i2c device nod

[PATCH v2 02/10] ARM: dts: ls1021a: add TQ-Systems MBLS102xA device tree

2023-01-20 Thread Alexander Stein
Add device tree for the MBLS102xA mainboard with TQMLS1021A SoM. Signed-off-by: Alexander Stein --- Changes in v2: * Remove unnecessary status = "okay" * Remove underscore from node names * Move reg direct below compatiblefor i2c devices * Remove i2c device nodes without software sup

[PATCH AUTOSEL 4.14 1/4] powerpc/rtas: avoid device tree lookups in rtas_os_term()

2022-12-27 Thread Sasha Levin
From: Nathan Lynch [ Upstream commit ed2213bfb192ab51f09f12e9b49b5d482c6493f3 ] rtas_os_term() is called during panic. Its behavior depends on a couple of conditions in the /rtas node of the device tree, the traversal of which entails locking and local IRQ state changes. If the kernel panics

[PATCH AUTOSEL 4.19 1/4] powerpc/rtas: avoid device tree lookups in rtas_os_term()

2022-12-27 Thread Sasha Levin
From: Nathan Lynch [ Upstream commit ed2213bfb192ab51f09f12e9b49b5d482c6493f3 ] rtas_os_term() is called during panic. Its behavior depends on a couple of conditions in the /rtas node of the device tree, the traversal of which entails locking and local IRQ state changes. If the kernel panics

[PATCH AUTOSEL 5.4 3/7] powerpc/rtas: avoid device tree lookups in rtas_os_term()

2022-12-27 Thread Sasha Levin
From: Nathan Lynch [ Upstream commit ed2213bfb192ab51f09f12e9b49b5d482c6493f3 ] rtas_os_term() is called during panic. Its behavior depends on a couple of conditions in the /rtas node of the device tree, the traversal of which entails locking and local IRQ state changes. If the kernel panics

[PATCH AUTOSEL 5.10 3/7] powerpc/rtas: avoid device tree lookups in rtas_os_term()

2022-12-27 Thread Sasha Levin
From: Nathan Lynch [ Upstream commit ed2213bfb192ab51f09f12e9b49b5d482c6493f3 ] rtas_os_term() is called during panic. Its behavior depends on a couple of conditions in the /rtas node of the device tree, the traversal of which entails locking and local IRQ state changes. If the kernel panics

[PATCH AUTOSEL 5.15 18/22] powerpc/rtas: avoid device tree lookups in rtas_os_term()

2022-12-27 Thread Sasha Levin
From: Nathan Lynch [ Upstream commit ed2213bfb192ab51f09f12e9b49b5d482c6493f3 ] rtas_os_term() is called during panic. Its behavior depends on a couple of conditions in the /rtas node of the device tree, the traversal of which entails locking and local IRQ state changes. If the kernel panics

[PATCH AUTOSEL 6.0 21/27] powerpc/rtas: avoid device tree lookups in rtas_os_term()

2022-12-27 Thread Sasha Levin
From: Nathan Lynch [ Upstream commit ed2213bfb192ab51f09f12e9b49b5d482c6493f3 ] rtas_os_term() is called during panic. Its behavior depends on a couple of conditions in the /rtas node of the device tree, the traversal of which entails locking and local IRQ state changes. If the kernel panics

[PATCH AUTOSEL 6.1 21/28] powerpc/rtas: avoid device tree lookups in rtas_os_term()

2022-12-27 Thread Sasha Levin
From: Nathan Lynch [ Upstream commit ed2213bfb192ab51f09f12e9b49b5d482c6493f3 ] rtas_os_term() is called during panic. Its behavior depends on a couple of conditions in the /rtas node of the device tree, the traversal of which entails locking and local IRQ state changes. If the kernel panics

Re: [PATCH 03/13] powerpc/rtas: avoid device tree lookups in rtas_os_term()

2022-11-29 Thread Nathan Lynch
on a >> >> couple of conditions in the /rtas node of the device tree, the >> >> traversal of which entails locking and local IRQ state changes. If the >> >> kernel panics while devtree_lock is held, rtas_os_term() as currently >> >> written could hang.

Re: [PATCH 03/13] powerpc/rtas: avoid device tree lookups in rtas_os_term()

2022-11-28 Thread Nicholas Piggin
On Tue Nov 29, 2022 at 4:26 AM AEST, Nathan Lynch wrote: > "Nicholas Piggin" writes: > > On Sat Nov 19, 2022 at 1:07 AM AEST, Nathan Lynch wrote: > >> rtas_os_term() is called during panic. Its behavior depends on a > >> couple of conditions

Re: [PATCH 03/13] powerpc/rtas: avoid device tree lookups in rtas_os_term()

2022-11-28 Thread Nathan Lynch
"Nicholas Piggin" writes: > On Sat Nov 19, 2022 at 1:07 AM AEST, Nathan Lynch wrote: >> rtas_os_term() is called during panic. Its behavior depends on a >> couple of conditions in the /rtas node of the device tree, the >> traversal of which entails lock

Re: [PATCH 03/13] powerpc/rtas: avoid device tree lookups in rtas_os_term()

2022-11-28 Thread Nathan Lynch
es where we cache various tokens. Right... I think it's better practice to use an explicitly sized type where the data is directly derived from the device tree and ultimately passed to the firmware call interface. Gradually enacting this while tolerating some cosmetic inconsistency in the code seems OK to me, but I'm open to other opinions.

Re: [PATCH 03/13] powerpc/rtas: avoid device tree lookups in rtas_os_term()

2022-11-27 Thread Nicholas Piggin
On Sat Nov 19, 2022 at 1:07 AM AEST, Nathan Lynch wrote: > rtas_os_term() is called during panic. Its behavior depends on a > couple of conditions in the /rtas node of the device tree, the > traversal of which entails locking and local IRQ state changes. If the > kernel panics while

Re: [PATCH 03/13] powerpc/rtas: avoid device tree lookups in rtas_os_term()

2022-11-21 Thread Andrew Donnellan
On Fri, 2022-11-18 at 09:07 -0600, Nathan Lynch wrote: > rtas_os_term() is called during panic. Its behavior depends on a > couple of conditions in the /rtas node of the device tree, the > traversal of which entails locking and local IRQ state changes. If > the > kernel panics whi

[PATCH v4 02/11] powerpc: wiiu: device tree

2022-11-19 Thread Ash Logan
Add a device tree source file for the Nintendo Wii U video game console. Signed-off-by: Ash Logan Co-developed-by: Roberto Van Eeden Signed-off-by: Roberto Van Eeden Co-developed-by: Emmanuel Gil Peyrot Signed-off-by: Emmanuel Gil Peyrot --- v1->v2: Style and formatting changes sugges

[PATCH 03/13] powerpc/rtas: avoid device tree lookups in rtas_os_term()

2022-11-18 Thread Nathan Lynch
rtas_os_term() is called during panic. Its behavior depends on a couple of conditions in the /rtas node of the device tree, the traversal of which entails locking and local IRQ state changes. If the kernel panics while devtree_lock is held, rtas_os_term() as currently written could hang. Instead

[PATCH v3 4/6] powerpc: Add device-tree model to the hardware description

2022-09-30 Thread Michael Ellerman
(!early_init_dt_verify(params)) panic("BUG: Failed verifying flat device tree, bad version?"); + of_scan_flat_dt(early_init_dt_scan_model, NULL); + #ifdef CONFIG_PPC_RTAS /* Some machines might need RTAS info for debugging, grab it now. */ of_scan_flat_dt(early_init_dt_scan_rtas, NULL); -- 2.37.3

[PATCH v2 4/6] powerpc: Add device-tree model to the hardware description

2022-09-29 Thread Michael Ellerman
panic("BUG: Failed verifying flat device tree, bad version?"); + of_scan_flat_dt(early_init_dt_scan_model, NULL); + #ifdef CONFIG_PPC_RTAS /* Some machines might need RTAS info for debugging, grab it now. */ of_scan_flat_dt(early_init_dt_scan_rtas, NULL); -- 2.37.3

[PATCH v2 4/6] powerpc: Add device-tree model to the hardware description

2022-09-29 Thread Michael Ellerman
panic("BUG: Failed verifying flat device tree, bad version?"); + of_scan_flat_dt(early_init_dt_scan_model, NULL); + #ifdef CONFIG_PPC_RTAS /* Some machines might need RTAS info for debugging, grab it now. */ of_scan_flat_dt(early_init_dt_scan_rtas, NULL); -- 2.37.3

[PATCH 4/6] powerpc: Add device-tree model to dump stack arch description

2022-09-28 Thread Michael Ellerman
panic("BUG: Failed verifying flat device tree, bad version?"); + of_scan_flat_dt(early_init_dt_scan_model, NULL); + #ifdef CONFIG_PPC_RTAS /* Some machines might need RTAS info for debugging, grab it now. */ of_scan_flat_dt(early_init_dt_scan_rtas, NULL); -- 2.37.3

Re: [PATCH v2 1/2] powerpc/pseries: block untrusted device tree changes when locked down

2022-09-28 Thread Andrew Donnellan
On Mon, 2022-09-26 at 08:16 -0500, Nathan Lynch wrote: > The /proc/powerpc/ofdt interface allows the root user to freely alter > the in-kernel device tree, enabling arbitrary physical address writes > via drivers that could bind to malicious device nodes, thus making it > possibl

Re: [PATCH v2 1/2] powerpc/pseries: block untrusted device tree changes when locked down

2022-09-26 Thread Paul Moore
On Mon, Sep 26, 2022 at 9:17 AM Nathan Lynch wrote: > > The /proc/powerpc/ofdt interface allows the root user to freely alter > the in-kernel device tree, enabling arbitrary physical address writes > via drivers that could bind to malicious device nodes, thus making it > poss

[PATCH v2 1/2] powerpc/pseries: block untrusted device tree changes when locked down

2022-09-26 Thread Nathan Lynch
The /proc/powerpc/ofdt interface allows the root user to freely alter the in-kernel device tree, enabling arbitrary physical address writes via drivers that could bind to malicious device nodes, thus making it possible to disable lockdown. Historically this interface has been used on the pseries

Re: [PATCH 1/2] powerpc/pseries: block untrusted device tree changes when locked down

2022-09-23 Thread Nathan Lynch
urity/security.c >> +++ b/security/security.c >> @@ -60,6 +60,7 @@ const char *const >> lockdown_reasons[LOCKDOWN_CONFIDENTIALITY_MAX+1] = { >> [LOCKDOWN_XMON_WR] = "xmon write access", >> [LOCKDOWN_BPF_WRITE_USER] = "use of bpf to write user RAM", >

Re: [PATCH 1/2] powerpc/pseries: block untrusted device tree changes when locked down

2022-09-23 Thread Michael Ellerman
Paul Moore writes: > On Thu, Sep 22, 2022 at 3:38 PM Nathan Lynch wrote: >> >> The /proc/powerpc/ofdt interface allows the root user to freely alter >> the in-kernel device tree, enabling arbitrary physical address writes >> via drivers that could bind to maliciou

Re: [PATCH 1/2] powerpc/pseries: block untrusted device tree changes when locked down

2022-09-22 Thread Paul Moore
On Thu, Sep 22, 2022 at 3:38 PM Nathan Lynch wrote: > > The /proc/powerpc/ofdt interface allows the root user to freely alter > the in-kernel device tree, enabling arbitrary physical address writes > via drivers that could bind to malicious device nodes, thus making it > poss

[PATCH 1/2] powerpc/pseries: block untrusted device tree changes when locked down

2022-09-22 Thread Nathan Lynch
The /proc/powerpc/ofdt interface allows the root user to freely alter the in-kernel device tree, enabling arbitrary physical address writes via drivers that could bind to malicious device nodes, thus making it possible to disable lockdown. Historically this interface has been used on the pseries

Re: [PATCH] powerpc/prom: move the device tree to the right space

2022-09-07 Thread Christophe Leroy
Le 03/03/2021 à 06:00, Youlin Song a écrit : > If the device tree has been allocated memory and it will > be in the memblock reserved space.Obviously it is in a > valid memory declaration and will be mapped by the kernel. Could you please provide clearer explanation ? I don't unders

Re: [PATCH v3 02/12] powerpc: wiiu: device tree

2022-06-29 Thread Segher Boessenkool
On Wed, Jun 29, 2022 at 08:13:13PM +0200, Krzysztof Kozlowski wrote: > On 29/06/2022 18:13, Segher Boessenkool wrote: > > On Wed, Jun 29, 2022 at 11:58:18AM +0200, Krzysztof Kozlowski wrote: > >>> + /* TODO: Add SMP */ > >>> + PowerPC,espresso@0 { > >> > >> Node name should be

Re: [PATCH v3 02/12] powerpc: wiiu: device tree

2022-06-29 Thread Krzysztof Kozlowski
On 29/06/2022 18:13, Segher Boessenkool wrote: > On Wed, Jun 29, 2022 at 11:58:18AM +0200, Krzysztof Kozlowski wrote: >> On 28/06/2022 15:31, Ash Logan wrote: >>> + model = "nintendo,wiiu"; >> >> It's not compatible, but user-visible string, e.g. "Nintendo Wii U" > > The "model" property in OF

Re: [PATCH v3 02/12] powerpc: wiiu: device tree

2022-06-29 Thread Segher Boessenkool
On Wed, Jun 29, 2022 at 11:58:18AM +0200, Krzysztof Kozlowski wrote: > On 28/06/2022 15:31, Ash Logan wrote: > > + model = "nintendo,wiiu"; > > It's not compatible, but user-visible string, e.g. "Nintendo Wii U" The "model" property in OF is documented as: --- “model”

Re: [PATCH v3 02/12] powerpc: wiiu: device tree

2022-06-29 Thread Krzysztof Kozlowski
On 28/06/2022 15:31, Ash Logan wrote: > Add a device tree source file for the Nintendo Wii U video game console. > > Signed-off-by: Ash Logan > Co-developed-by: Roberto Van Eeden > Signed-off-by: Roberto Van Eeden > Co-developed-by: Emmanuel Gil Peyrot > Signed-off-by

[PATCH v3 02/12] powerpc: wiiu: device tree

2022-06-28 Thread Ash Logan
Add a device tree source file for the Nintendo Wii U video game console. Signed-off-by: Ash Logan Co-developed-by: Roberto Van Eeden Signed-off-by: Roberto Van Eeden Co-developed-by: Emmanuel Gil Peyrot Signed-off-by: Emmanuel Gil Peyrot --- v1->v2: Style and formatting changes sugges

Re: [PATCH 2/2] powerpc/numa: Return the first online node if device tree mapping returns a not online node

2022-06-26 Thread Aneesh Kumar K.V
(vphn_get_nid()) to mark >> nodes online (setup_node_data()). Hence NUMA nodes we find during >> lookup in numa_setup_cpu() will always be found online. >> >> To keep logic simpler/correct, make sure that if the hypervisor >> or device tree returned a not online node,

Re: [PATCH 2/2] powerpc/numa: Return the first online node if device tree mapping returns a not online node

2022-06-24 Thread Srikar Dronamraju
up_node_data()). Hence NUMA nodes we find during > lookup in numa_setup_cpu() will always be found online. > > To keep logic simpler/correct, make sure that if the hypervisor > or device tree returned a not online node, don't use that to build > the map table. Instead, use the fir

[PATCH 2/2] powerpc/numa: Return the first online node if device tree mapping returns a not online node

2022-06-23 Thread Aneesh Kumar K.V
in numa_setup_cpu() will always be found online. To keep logic simpler/correct, make sure that if the hypervisor or device tree returned a not online node, don't use that to build the map table. Instead, use the first_online_node. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/mm/numa.c | 2 +- 1 file

[PATCH v2 02/12] powerpc: wiiu: device tree

2022-06-22 Thread Ash Logan
Add a device tree source file for the Nintendo Wii U video game console. Signed-off-by: Ash Logan Co-developed-by: Roberto Van Eeden Signed-off-by: Roberto Van Eeden Co-developed-by: Emmanuel Gil Peyrot Signed-off-by: Emmanuel Gil Peyrot --- v1->v2: Style and formatting changes sugges

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 > > -

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

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

Re: [PATCH v2 1/2] powerpc/powernv: Get L1D flush requirements from device-tree

2022-05-24 Thread Michael Ellerman
On Mon, 4 Apr 2022 20:15:35 +1000, Russell Currey wrote: > The device-tree properties no-need-l1d-flush-msr-pr-1-to-0 and > no-need-l1d-flush-kernel-on-user-access are the equivalents of > H_CPU_BEHAV_NO_L1D_FLUSH_ENTRY and H_CPU_BEHAV_NO_L1D_FLUSH_UACCESS > from the H_GET_CPU_CHA

Re: [PATCH] powerpc/microwatt: Add mmu bits to device tree

2022-05-24 Thread Michael Ellerman
On Thu, 19 May 2022 22:27:06 +0930, Joel Stanley wrote: > In commit 5402e239d09f ("powerpc/64s: Get LPID bit width from device > tree") the kernel tried to determine the pid and lpid bits from the > device tree. If they are not found, there is a fallback, but Microwatt >

[RFC PATCH] powerpc/numa: Return the first online node if device tree mapping returns a not online node

2022-05-23 Thread Aneesh Kumar K.V
numa_setup_cpu can return nodes that are not online. But setup_node_data() only initialize NODE_DATA for only online numa nodes. Hence avoid returning nodes that are not online. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/mm/numa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

Re: [PATCH] powerpc/microwatt: Add mmu bits to device tree

2022-05-23 Thread Joel Stanley
On Fri, 20 May 2022 at 00:06, Nicholas Piggin wrote: > > Excerpts from Joel Stanley's message of May 19, 2022 10:57 pm: > > In commit 5402e239d09f ("powerpc/64s: Get LPID bit width from device > > tree") the kernel tried to determine the pid and lpid b

Re: [PATCH] powerpc/microwatt: Add mmu bits to device tree

2022-05-23 Thread Michael Neuling
On Fri, 2022-05-20 at 10:06 +1000, Nicholas Piggin wrote: > Excerpts from Joel Stanley's message of May 19, 2022 10:57 pm: > > In commit 5402e239d09f ("powerpc/64s: Get LPID bit width from device > > tree") the kernel tried to determine the pid and lpid bits

Re: [PATCH] powerpc/microwatt: Add mmu bits to device tree

2022-05-19 Thread Nicholas Piggin
Excerpts from Joel Stanley's message of May 19, 2022 10:57 pm: > In commit 5402e239d09f ("powerpc/64s: Get LPID bit width from device > tree") the kernel tried to determine the pid and lpid bits from the > device tree. If they are not found, there is a fallback, but Microwa

[PATCH] powerpc/microwatt: Add mmu bits to device tree

2022-05-19 Thread Joel Stanley
In commit 5402e239d09f ("powerpc/64s: Get LPID bit width from device tree") the kernel tried to determine the pid and lpid bits from the device tree. If they are not found, there is a fallback, but Microwatt wasn't covered as has the unusual configuration of being both !HV and bare m

Re: [PATCH v2 1/2] powerpc/powernv: Get L1D flush requirements from device-tree

2022-04-10 Thread Michael Ellerman
Joel Stanley writes: > On Tue, 5 Apr 2022 at 06:13, Michael Ellerman wrote: >> >> Joel Stanley writes: >> > On Mon, 4 Apr 2022 at 10:15, Russell Currey wrote: >> >> >> >> The device-tree properties no-need-l1d-flush-msr-pr-1-to-0 a

Re: [PATCH v2 1/2] powerpc/powernv: Get L1D flush requirements from device-tree

2022-04-05 Thread Russell Currey
On Tue, 2022-04-05 at 02:49 +, Joel Stanley wrote: > I booted both patches in this series on a power10 powernv machine, > applied on top of v5.18-rc1: > > $ dmesg |grep -i flush > [    0.00] rfi-flush: fallback displacement flush available > [    0.00] rfi-flush: patched 12 locations

Re: [PATCH v2 1/2] powerpc/powernv: Get L1D flush requirements from device-tree

2022-04-05 Thread Joel Stanley
On Tue, 5 Apr 2022 at 06:13, Michael Ellerman wrote: > > Joel Stanley writes: > > On Mon, 4 Apr 2022 at 10:15, Russell Currey wrote: > >> > >> The device-tree properties no-need-l1d-flush-msr-pr-1-to-0 and > >> no-need-l1d-flush-ke

Re: [PATCH v2 1/2] powerpc/powernv: Get L1D flush requirements from device-tree

2022-04-05 Thread Michael Ellerman
Joel Stanley writes: > On Mon, 4 Apr 2022 at 10:15, Russell Currey wrote: >> >> The device-tree properties no-need-l1d-flush-msr-pr-1-to-0 and >> no-need-l1d-flush-kernel-on-user-access are the equivalents of >> H_CPU_BEHAV_NO_L1D_FLUSH_ENTRY and H_CPU_BEHAV_N

Re: [PATCH v2 1/2] powerpc/powernv: Get L1D flush requirements from device-tree

2022-04-04 Thread Joel Stanley
On Mon, 4 Apr 2022 at 10:15, Russell Currey wrote: > > The device-tree properties no-need-l1d-flush-msr-pr-1-to-0 and > no-need-l1d-flush-kernel-on-user-access are the equivalents of > H_CPU_BEHAV_NO_L1D_FLUSH_ENTRY and H_CPU_BEHAV_NO_L1D_FLUSH_UACCESS > from the H_GET_CPU_CHARAC

Re: [PATCH] powerpc/powernv: Get more flushing requirements from device-tree

2022-04-04 Thread Russell Currey
On Wed, 2022-03-23 at 16:26 -0300, Murilo Opsfelder Araújo wrote: > Hi, Russell. > > I think this patch could have been split in half with their > corresponding Fixes: tag. > > This may sound nitpicking but doing this would certainly help distros > doing their backports. Hi Murilo, I didn't

[PATCH v2 1/2] powerpc/powernv: Get L1D flush requirements from device-tree

2022-04-04 Thread Russell Currey
The device-tree properties no-need-l1d-flush-msr-pr-1-to-0 and no-need-l1d-flush-kernel-on-user-access are the equivalents of H_CPU_BEHAV_NO_L1D_FLUSH_ENTRY and H_CPU_BEHAV_NO_L1D_FLUSH_UACCESS from the H_GET_CPU_CHARACTERISTICS hcall on pseries respectively. In commit d02fa40d759f ("po

[PATCH v2 2/2] powerpc/powernv: Get STF barrier requirements from device-tree

2022-04-04 Thread Russell Currey
The device-tree property no-need-store-drain-on-priv-state-switch is equivalent to H_CPU_BEHAV_NO_STF_BARRIER from the H_CPU_GET_CHARACTERISTICS hcall on pseries. Since commit 84ed26fd00c5 ("powerpc/security: Add a security feature for STF barrier") powernv systems with this device-tre

Re: [PATCH] powerpc/powernv: Get more flushing requirements from device-tree

2022-03-23 Thread Murilo Opsfelder Araújo
Hi, Russell. I think this patch could have been split in half with their corresponding Fixes: tag. This may sound nitpicking but doing this would certainly help distros doing their backports. More comments below. On 3/22/22 04:47, Russell Currey wrote: The device-tree properties no-need

[PATCH] powerpc/powernv: Get more flushing requirements from device-tree

2022-03-22 Thread Russell Currey
The device-tree properties no-need-l1d-flush-msr-pr-1-to-0, no-need-l1d-flush-kernel-on-user-access and no-need-store-drain-on-priv-state-switch are the equivalents of H_CPU_BEHAV_NO_L1D_FLUSH_ENTRY, H_CPU_BEHAV_NO_L1D_FLUSH_UACCESS and H_CPU_BEHAV_NO_STF_BARRIER from the H_GET_CPU_CHARACTERISTICS

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

2022-03-10 Thread Rob Herring
On Mon, Mar 07, 2022 at 11:10:40AM -0300, Alifer Moraes wrote: > From: 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 > -

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

2022-03-07 Thread Alifer Moraes
From: 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 -

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

2022-03-07 Thread Mark Brown
On Mon, Mar 07, 2022 at 11:10:40AM -0300, Alifer Moraes wrote: > + - 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

Re: [PATCH 02/12] powerpc: wiiu: device tree

2022-03-02 Thread Ash Logan
Hi Rob, Thanks for the review. On 3/3/22 00:36, Rob Herring wrote: On Tue, Mar 1, 2022 at 10:44 PM Ash Logan wrote: Add a device tree source file for the Nintendo Wii U video game console. Test this with 'make W=1 dtbs_checks'. Does make W=1 ARCH=powerpc wiiu_defconfig dtbs_check seem

Re: [PATCH 02/12] powerpc: wiiu: device tree

2022-03-02 Thread Rob Herring
On Tue, Mar 1, 2022 at 10:44 PM Ash Logan wrote: > > Add a device tree source file for the Nintendo Wii U video game console. Test this with 'make W=1 dtbs_checks'. > > Signed-off-by: Ash Logan > Co-developed-by: Roberto Van Eeden > Signed-off-by: Roberto Van Eed

[PATCH 02/12] powerpc: wiiu: device tree

2022-03-01 Thread Ash Logan
Add a device tree source file for the Nintendo Wii U video game console. Signed-off-by: Ash Logan Co-developed-by: Roberto Van Eeden Signed-off-by: Roberto Van Eeden Co-developed-by: Emmanuel Gil Peyrot Signed-off-by: Emmanuel Gil Peyrot --- arch/powerpc/boot/dts/wiiu.dts | 327

Re: [PATCH] powerpc: dts: add device tree for T1040RDB-REV-A

2022-01-11 Thread Vladimir Oltean
Hi Maxim, On Tue, Jan 11, 2022 at 06:22:04PM +0300, Maxim Kiselev wrote: > On board rev A, the network interface labels for the switch ports > written on the front panel are different than on rev B and later. > > This patch introduces a separate device tree for rev A. > The m

[PATCH] powerpc: dts: add device tree for T1040RDB-REV-A

2022-01-11 Thread Maxim Kiselev
On board rev A, the network interface labels for the switch ports written on the front panel are different than on rev B and later. This patch introduces a separate device tree for rev A. The main device tree is supposed to cover rev B and later. Signed-off-by: Maxim Kiselev --- arch/powerpc

Re: [PATCH v3] powerpc/64s: Get LPID bit width from device tree

2021-12-07 Thread Michael Ellerman
On Mon, 29 Nov 2021 13:09:15 +1000, Nicholas Piggin wrote: > Allow the LPID bit width and partition table size to be set at runtime > from the device tree. > > Move the PID bit width detection into the same place. > > KVM does not support using the extra bits yet, this

[PATCH v3] powerpc/64s: Get LPID bit width from device tree

2021-11-28 Thread Nicholas Piggin
Allow the LPID bit width and partition table size to be set at runtime from the device tree. Move the PID bit width detection into the same place. KVM does not support using the extra bits yet, this is mainly required to get the PTCR register values correct (so KVM will run

Re: [PATCH v2] powerpc/64s: Get LPID bit width from device tree

2021-11-15 Thread kernel test robot
in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Nicholas-Piggin/powerpc-64s-Get-LPID-bit-width-from-device-tree/2020-160038 base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next config: powerpc64-randconfig-c024-2025

Re: [PATCH v2] powerpc/64s: Get LPID bit width from device tree

2021-11-11 Thread kernel test robot
to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Nicholas-Piggin/powerpc-64s-Get-LPID-bit-width-from-device-tree/2020-160038 base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next config

Re: [PATCH v2] powerpc/64s: Get LPID bit width from device tree

2021-11-10 Thread Fabiano Rosas
Nicholas Piggin writes: > Allow the LPID bit width and partition table size to be set at runtime > from the device tree. > > Move the PID bit width detection into the same place. > > KVM does not support using different sizes yet, this is mainly required > to get the PTCR re

[PATCH v2] powerpc/64s: Get LPID bit width from device tree

2021-11-10 Thread Nicholas Piggin
Allow the LPID bit width and partition table size to be set at runtime from the device tree. Move the PID bit width detection into the same place. KVM does not support using different sizes yet, this is mainly required to get the PTCR register values correct. Signed-off-by: Nicholas Piggin

Re: [PATCH v1] powerpc/64s: Get LPID bit width from device tree

2021-11-09 Thread Nicholas Piggin
Excerpts from Fabiano Rosas's message of November 10, 2021 7:19 am: > Nicholas Piggin writes: > >> Allow the LPID bit width and partition table size to be set at runtime >> from the device tree. >> >> Move the PID bit width detection into the same place. &g

Re: [PATCH v1] powerpc/64s: Get LPID bit width from device tree

2021-11-09 Thread Fabiano Rosas
Nicholas Piggin writes: > Allow the LPID bit width and partition table size to be set at runtime > from the device tree. > > Move the PID bit width detection into the same place. > > KVM does not support using the extra bits yet, this is mainly required > to get the PTCR re

[PATCH v1] powerpc/64s: Get LPID bit width from device tree

2021-11-08 Thread Nicholas Piggin
Allow the LPID bit width and partition table size to be set at runtime from the device tree. Move the PID bit width detection into the same place. KVM does not support using the extra bits yet, this is mainly required to get the PTCR register values correct. Signed-off-by: Nicholas Piggin

Re: [PATCH 0/3] powerpc/microwatt: Device tree and config updates

2021-08-31 Thread Michael Ellerman
nley (3): > powerpc/microwatt: Add Ethernet to device tree > powerpc/configs/microwattt: Enable Liteeth > powerpc/configs/microwatt: Enable options for systemd > > [...] Applied to powerpc/next. [1/3] powerpc/microwatt: Add Ethernet to device tree

[PATCH 1/3] powerpc/microwatt: Add Ethernet to device tree

2021-08-26 Thread Joel Stanley
The liteeth network device is used in the Microwatt soc. Signed-off-by: Joel Stanley --- arch/powerpc/boot/dts/microwatt.dts | 12 1 file changed, 12 insertions(+) diff --git a/arch/powerpc/boot/dts/microwatt.dts b/arch/powerpc/boot/dts/microwatt.dts index

[PATCH 0/3] powerpc/microwatt: Device tree and config updates

2021-08-26 Thread Joel Stanley
This enables the liteeth network device for microwatt which will be merged in v5.15. It also turns on some options so the microwatt defconfig can be used to boot a userspace with systemd. Joel Stanley (3): powerpc/microwatt: Add Ethernet to device tree powerpc/configs/microwattt: Enable

[PATCH AUTOSEL 4.4 19/23] powerpc/boot: Fixup device-tree on little endian

2021-07-09 Thread Sasha Levin
From: Benjamin Herrenschmidt [ Upstream commit c93f80849bdd9b45d834053ae1336e28f0026c84 ] This fixes the core devtree.c functions and the ns16550 UART backend. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Paul Mackerras Reviewed-by: Segher Boessenkool Acked-by: Nicholas Piggin

[PATCH AUTOSEL 4.9 21/26] powerpc/boot: Fixup device-tree on little endian

2021-07-09 Thread Sasha Levin
From: Benjamin Herrenschmidt [ Upstream commit c93f80849bdd9b45d834053ae1336e28f0026c84 ] This fixes the core devtree.c functions and the ns16550 UART backend. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Paul Mackerras Reviewed-by: Segher Boessenkool Acked-by: Nicholas Piggin

[PATCH AUTOSEL 4.14 26/33] powerpc/boot: Fixup device-tree on little endian

2021-07-09 Thread Sasha Levin
From: Benjamin Herrenschmidt [ Upstream commit c93f80849bdd9b45d834053ae1336e28f0026c84 ] This fixes the core devtree.c functions and the ns16550 UART backend. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Paul Mackerras Reviewed-by: Segher Boessenkool Acked-by: Nicholas Piggin

[PATCH AUTOSEL 4.19 32/39] powerpc/boot: Fixup device-tree on little endian

2021-07-09 Thread Sasha Levin
From: Benjamin Herrenschmidt [ Upstream commit c93f80849bdd9b45d834053ae1336e28f0026c84 ] This fixes the core devtree.c functions and the ns16550 UART backend. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Paul Mackerras Reviewed-by: Segher Boessenkool Acked-by: Nicholas Piggin

[PATCH AUTOSEL 5.4 54/63] powerpc/boot: Fixup device-tree on little endian

2021-07-09 Thread Sasha Levin
From: Benjamin Herrenschmidt [ Upstream commit c93f80849bdd9b45d834053ae1336e28f0026c84 ] This fixes the core devtree.c functions and the ns16550 UART backend. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Paul Mackerras Reviewed-by: Segher Boessenkool Acked-by: Nicholas Piggin

[PATCH AUTOSEL 5.10 80/93] powerpc/boot: Fixup device-tree on little endian

2021-07-09 Thread Sasha Levin
From: Benjamin Herrenschmidt [ Upstream commit c93f80849bdd9b45d834053ae1336e28f0026c84 ] This fixes the core devtree.c functions and the ns16550 UART backend. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Paul Mackerras Reviewed-by: Segher Boessenkool Acked-by: Nicholas Piggin

[PATCH AUTOSEL 5.12 090/104] powerpc/boot: Fixup device-tree on little endian

2021-07-09 Thread Sasha Levin
From: Benjamin Herrenschmidt [ Upstream commit c93f80849bdd9b45d834053ae1336e28f0026c84 ] This fixes the core devtree.c functions and the ns16550 UART backend. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Paul Mackerras Reviewed-by: Segher Boessenkool Acked-by: Nicholas Piggin

Re: [PATCH v2 2/9] powerpc: Add Microwatt device tree

2021-06-21 Thread Segher Boessenkool
On Sun, Jun 20, 2021 at 10:08:58PM +1000, Paul Mackerras wrote: > On Sat, Jun 19, 2021 at 09:26:16AM -0500, Segher Boessenkool wrote: > > On Fri, Jun 18, 2021 at 01:44:16PM +1000, Paul Mackerras wrote: > > > Microwatt currently runs with MSR[HV] = 0, > > > > That isn't compliant though? If your

Re: [PATCH v2 2/9] powerpc: Add Microwatt device tree

2021-06-20 Thread Paul Mackerras
On Sat, Jun 19, 2021 at 09:26:16AM -0500, Segher Boessenkool wrote: > On Fri, Jun 18, 2021 at 01:44:16PM +1000, Paul Mackerras wrote: > > Microwatt currently runs with MSR[HV] = 0, > > That isn't compliant though? If your implementation does not have LPAR > it must set MSR[HV]=1 always. True -

Re: [PATCH v2 2/9] powerpc: Add Microwatt device tree

2021-06-19 Thread Segher Boessenkool
On Fri, Jun 18, 2021 at 01:44:16PM +1000, Paul Mackerras wrote: > Microwatt currently runs with MSR[HV] = 0, That isn't compliant though? If your implementation does not have LPAR it must set MSR[HV]=1 always. Segher

Re: [PATCH v2 8/9] powerpc/boot: Fixup device-tree on little endian

2021-06-18 Thread Nicholas Piggin
Excerpts from Paul Mackerras's message of June 18, 2021 1:49 pm: > From: Benjamin Herrenschmidt > > This fixes the core devtree.c functions and the ns16550 UART backend. Looks okay. Can sparse be run on arch/powerpc/boot? Would be nice to get that working and endian annotations at some point.

[PATCH v2 3/9] powerpc/microwatt: Populate platform bus from device-tree

2021-06-17 Thread Paul Mackerras
From: Benjamin Herrenschmidt Just like any other embedded platform. Add an empty soc node. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Paul Mackerras --- arch/powerpc/boot/dts/microwatt.dts | 7 +++ arch/powerpc/platforms/microwatt/setup.c | 8 2 files changed, 15

[PATCH v2 8/9] powerpc/boot: Fixup device-tree on little endian

2021-06-17 Thread Paul Mackerras
From: Benjamin Herrenschmidt This fixes the core devtree.c functions and the ns16550 UART backend. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Paul Mackerras --- arch/powerpc/boot/devtree.c | 59 + arch/powerpc/boot/ns16550.c | 9 -- 2 files

[PATCH v2 2/9] powerpc: Add Microwatt device tree

2021-06-17 Thread Paul Mackerras
Microwatt currently runs with MSR[HV] = 0, hence the usable-privilege properties don't have bit 2 (for HV support) set, and we need the /chosen/ibm,architecture-vec-5 property. Signed-off-by: Paul Mackerras --- arch/powerpc/boot/dts/microwatt.dts | 98 + 1 file

Re: [PATCH 02/11] powerpc: Add Microwatt device tree

2021-06-17 Thread Paul Mackerras
On Thu, Jun 17, 2021 at 02:41:28PM +1000, Michael Ellerman wrote: > Paul Mackerras writes: > > > > Little bit of change log never hurts :) > > > Signed-off-by: Paul Mackerras > > --- > > arch/powerpc/boot/dts/microwatt.dts | 105 > > 1 file changed, 105

Re: [PATCH 02/11] powerpc: Add Microwatt device tree

2021-06-16 Thread Michael Ellerman
Paul Mackerras writes: > Little bit of change log never hurts :) > Signed-off-by: Paul Mackerras > --- > arch/powerpc/boot/dts/microwatt.dts | 105 > 1 file changed, 105 insertions(+) > create mode 100644 arch/powerpc/boot/dts/microwatt.dts > > diff --git

[PATCH 04/11] powerpc/microwatt: Populate platform bus from device-tree

2021-06-14 Thread Paul Mackerras
From: Benjamin Herrenschmidt Just like any other embedded platform. Add an empty soc node. Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/boot/dts/microwatt.dts | 7 +++ arch/powerpc/platforms/microwatt/setup.c | 8 2 files changed, 15 insertions(+) diff --git

[PATCH 09/11] powerpc: boot: Fixup device-tree on little endian

2021-06-14 Thread Paul Mackerras
From: Benjamin Herrenschmidt This fixes the core devtree.c functions and the ns16550 UART backend. Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/boot/devtree.c | 59 + arch/powerpc/boot/ns16550.c | 9 -- 2 files changed, 41 insertions(+), 27

[PATCH 02/11] powerpc: Add Microwatt device tree

2021-06-14 Thread Paul Mackerras
Signed-off-by: Paul Mackerras --- arch/powerpc/boot/dts/microwatt.dts | 105 1 file changed, 105 insertions(+) create mode 100644 arch/powerpc/boot/dts/microwatt.dts diff --git a/arch/powerpc/boot/dts/microwatt.dts b/arch/powerpc/boot/dts/microwatt.dts new file

  1   2   3   4   5   6   7   8   9   10   >