xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: Shawn Anastasio <shawn@anastas.io>
Cc: tpearson@raptorengineering.com,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	George Dunlap <george.dunlap@citrix.com>,
	Julien Grall <julien@xen.org>,
	Stefano Stabellini <sstabellini@kernel.org>, Wei Liu <wl@xen.org>,
	Shawn Anastasio <shawnanastasio@raptorengineering.com>,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH 2/3] xen/ppc: Implement early serial printk on PaPR/pseries
Date: Fri, 9 Jun 2023 11:22:21 +0200	[thread overview]
Message-ID: <0c0a19de-dde3-8b98-4354-6d3d2019179b@suse.com> (raw)
In-Reply-To: <e9a4878544d264688578d7899867df7e8207aba5.1686148363.git.shawn@anastas.io>

On 07.06.2023 17:06, Shawn Anastasio wrote:
> On typical Power VMs (e.g. QEMU's -M pseries), a variety of services
> are provided by OpenFirmware, including an early serial console.
> Implement the required interfaces to call into OpenFirmware and write
> to the serial console.
> 
> Since OpenFirmware runs in 32-bit Big Endian mode and Xen runs in
> 64-bit Little Endian mode, a thunk is required to save/restore
> any potentially-clobbered registers as well as to perform the
> required endianness switch. Thankfully, linux already has such
> a routine, which was imported into head.S.
> 
> Support for bare metal (PowerNV) will be implemented in a future
> patch.
> 
> Signed-off-by: Shawn Anastasio <shawnanastasio@raptorengineering.com>

Just a couple of nits:

>  xen/arch/ppc/Kconfig.debug               |   5 +
>  xen/arch/ppc/Makefile                    |   3 +-
>  xen/arch/ppc/boot_of.c                   | 122 +++++++++++++++++++++++
>  xen/arch/ppc/configs/openpower_defconfig |   1 +
>  xen/arch/ppc/early_printk.c              |  36 +++++++
>  xen/arch/ppc/include/asm/boot.h          |  31 ++++++
>  xen/arch/ppc/include/asm/bug.h           |   6 ++
>  xen/arch/ppc/include/asm/byteorder.h     |  74 ++++++++++++++
>  xen/arch/ppc/include/asm/cache.h         |   6 ++
>  xen/arch/ppc/include/asm/config.h        |   3 +
>  xen/arch/ppc/include/asm/early_printk.h  |  14 +++
>  xen/arch/ppc/include/asm/processor.h     |  54 +++++++++-
>  xen/arch/ppc/include/asm/string.h        |   6 ++
>  xen/arch/ppc/include/asm/types.h         |  64 ++++++++++++
>  xen/arch/ppc/ppc64/asm-offsets.c         |  55 ++++++++++
>  xen/arch/ppc/ppc64/head.S                |  59 +++++++++++
>  xen/arch/ppc/setup.c                     |  20 +++-
>  17 files changed, 555 insertions(+), 4 deletions(-)
>  create mode 100644 xen/arch/ppc/boot_of.c

Unless required, in new additions we tend to prefer dashes over
underscores. In filenames it is pretty rare that dashes really need
avoiding.

> --- a/xen/arch/ppc/Kconfig.debug
> +++ b/xen/arch/ppc/Kconfig.debug
> @@ -0,0 +1,5 @@
> +config EARLY_PRINTK
> +    bool "Enable early printk"
> +    default DEBUG
> +    help
> +      Enables early printk debug messages
> \ No newline at end of file

There are many examples of this throughout the patch, which you want to
take care of.

> --- /dev/null
> +++ b/xen/arch/ppc/boot_of.c
> @@ -0,0 +1,122 @@
> +/* SPDX-License-Identifier: GPL-2.0-or-later */

By default we mean to use ...

> --- /dev/null
> +++ b/xen/arch/ppc/early_printk.c
> @@ -0,0 +1,36 @@
> +/* SPDX-License-Identifier: GPL-2.0 */

... the more modern form of this (GPL-2.0-only). Anything deviating from
that may want justifying in the description.

Jan


  reply	other threads:[~2023-06-09  9:23 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-07 15:06 [PATCH 0/3] Initial support for Power Shawn Anastasio
2023-06-07 15:06 ` [PATCH 1/3] xen: Add files needed for minimal Power build Shawn Anastasio
2023-06-09  9:15   ` Jan Beulich
2023-06-09 15:34     ` Shawn Anastasio
2023-06-07 15:06 ` [PATCH 2/3] xen/ppc: Implement early serial printk on PaPR/pseries Shawn Anastasio
2023-06-09  9:22   ` Jan Beulich [this message]
2023-06-09  9:29     ` Andrew Cooper
2023-06-09  9:38       ` Jan Beulich
2023-06-09  9:43         ` Julien Grall
2023-06-09  9:43         ` Andrew Cooper
2023-06-09  9:46           ` Julien Grall
2023-06-09  9:54             ` Andrew Cooper
2023-06-09 10:12               ` Julien Grall
2023-06-09 15:01                 ` Shawn Anastasio
2023-06-09 16:07                   ` Julien Grall
2023-06-09 16:20                     ` Shawn Anastasio
2023-06-12 15:19                     ` George Dunlap
2023-06-12 15:31                       ` Julien Grall
2023-06-13 14:59                       ` Shawn Anastasio
2023-06-09 15:36     ` Shawn Anastasio
2023-06-07 15:06 ` [PATCH 3/3] maintainers: Add PPC64 maintainer Shawn Anastasio
2023-06-09  9:04   ` Jan Beulich
2023-06-09 15:40     ` Shawn Anastasio
2023-06-07 18:07 ` [PATCH 0/3] Initial support for Power Andrew Cooper
2023-06-07 19:01   ` Shawn Anastasio
2023-06-07 19:30     ` Andrew Cooper
2023-06-08 15:19       ` Shawn Anastasio

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=0c0a19de-dde3-8b98-4354-6d3d2019179b@suse.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=george.dunlap@citrix.com \
    --cc=julien@xen.org \
    --cc=shawn@anastas.io \
    --cc=shawnanastasio@raptorengineering.com \
    --cc=sstabellini@kernel.org \
    --cc=tpearson@raptorengineering.com \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.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;
as well as URLs for NNTP newsgroup(s).