LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Nicholas Piggin <npiggin@gmail.com>
To: Joel Stanley <joel@jms.id.au>, linuxppc-dev@lists.ozlabs.org
Cc: Paul Mackerras <paulus@samba.org>
Subject: Re: [PATCH] powerpc/microwatt: Add mmu bits to device tree
Date: Fri, 20 May 2022 10:06:06 +1000	[thread overview]
Message-ID: <1653005064.mw8ywmb8ft.astroid@bobo.none> (raw)
In-Reply-To: <20220519125706.593532-1-joel@jms.id.au>

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 Microwatt
> wasn't covered as has the unusual configuration of being both !HV and bare
> metal.
> 
> Set the values in the device tree to avoid having to add a special case.
> The lpid value is the only one required, but add both for completeness.
> 
> Fixes: 5402e239d09f ("powerpc/64s: Get LPID bit width from device tree")
> Signed-off-by: Joel Stanley <joel@jms.id.au>

LGTM... does Microwatt actually need 12 lpid bits, or does it just need 
the LPID 0 partition table entry? I wonder if you set it to 1. That's
a minor nit though.

Acked-by: Nicholas Piggin <npiggin@gmail.com>

> ---
>  arch/powerpc/boot/dts/microwatt.dts | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/arch/powerpc/boot/dts/microwatt.dts b/arch/powerpc/boot/dts/microwatt.dts
> index 65b270a90f94..b69db1d275cd 100644
> --- a/arch/powerpc/boot/dts/microwatt.dts
> +++ b/arch/powerpc/boot/dts/microwatt.dts
> @@ -90,6 +90,8 @@ PowerPC,Microwatt@0 {
>  			64-bit;
>  			d-cache-size = <0x1000>;
>  			ibm,chip-id = <0>;
> +			ibm,mmu-lpid-bits = <12>;
> +			ibm,mmu-pid-bits = <20>;
>  		};
>  	};
>  
> -- 
> 2.35.1
> 
> 

  reply	other threads:[~2022-05-20  0:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-19 12:57 [PATCH] powerpc/microwatt: Add mmu bits to device tree Joel Stanley
2022-05-20  0:06 ` Nicholas Piggin [this message]
2022-05-23  7:59   ` Michael Neuling
2022-05-23  8:01   ` Joel Stanley
2022-05-24 11:09 ` Michael Ellerman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1653005064.mw8ywmb8ft.astroid@bobo.none \
    --to=npiggin@gmail.com \
    --cc=joel@jms.id.au \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox