[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 4/4] xen/ppc: Implement early serial console on PowerNV


  • To: Shawn Anastasio <sanastasio@xxxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 7 Aug 2023 17:05:04 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=LCpIa/iskW6jITbUOFS8+hhzk/xiY6ob/s6idhQe1J0=; b=THaRbgwsukvrVu1w7U4OTI5QQDSshP+OsV+Mvjv+vZh2lFZGKNCRmZBqtcH4lCS9KyCBLDuwa0KogjRDwDG0aU0AeBLUbBZ94x3OlNBE+77OhV8YPGy8CxMqsFWU/WhvWULWA4lOSso2uKqF22QgYMWaZlHGVE19KK+1P6qK/v0Rjxcwy0yo8oM6baob/QlaOPP05No6wkY4GsLe1tDNRMM0EkrTdUzB8TM8ykqiJGFCwVN/8R7799ZpyS1n8I/BGpuX4QGFz/fXi2xLp5UzZ6BVKLYMguVichlhZAkjp570YMYTj438G7ojP94Rmo4E2xieYUrT1ow7koMtTaDxLg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XLOpJuZSrPeDdmo7PsXy3rIX6DUynsldbsKsu6f+DLcoYyd8ms38IEpDMtbv9RvtPwzQleE2YT4QdFYLZD+6v4bGmiSriwQv4nmhTjFK1z/NqEJTd41/swNebUa1kAIoyb5mY7dqQafUyU/zfUJEENjjjH76GQkb0M8CtEJUHDDtF1OFe8BuEEC8IvdpOvnahvIFYsa3QgbSw+Y/nTWb7K66bVEwHOKA+LQCM4OqsxIkWfMaGpkD2i7A7a36XH98mL7YWSXmMAzhMJbxOAXHHIqQQlgcCJCOoq3TEvA+1oJfTaDdU0OBcJoTPDm9GJ0ZQ7iZdvi77j0XYX90/bdNtQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Timothy Pearson <tpearson@xxxxxxxxxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Mon, 07 Aug 2023 15:05:42 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 02.08.2023 02:11, Shawn Anastasio wrote:
> Implement the OPAL firmware calls required to write to the serial
> console on PowerNV systems. Unlike pseries/Open Firmware, the OPAL
> firmware interface can be used past early boot and as such the relevant
> functions are not marked as __init.
> 
> Signed-off-by: Shawn Anastasio <sanastasio@xxxxxxxxxxxxxxxxxxxxx>

Constraint as before and with two nits
Acked-by: Jan Beulich <jbeulich@xxxxxxxx>

> @@ -20,8 +22,20 @@
>   * Load the address of a symbol from the TOC into the specified GPR.
>   */
>  #define LOAD_REG_ADDR(reg,name)                                              
> \
> -    addis reg,%r2,name@toc@ha;                                               
> \
> -    addi  reg,reg,name@toc@l
> +    addis reg, %r2, name@toc@ha;                                             
> \
> +    addi  reg, reg, name@toc@l
> +
> +/*
> + * Declare a global assembly function with a proper TOC setup prologue
> + */
> +#define _GLOBAL_TOC(name)                                                   \
> +    .balign 4;                                                              \
> +    .type name, @function;                                                  \
> +    .globl name;                                                            \
> +name:                                                                       \
> +0:  addis %r2, %r12, (.TOC.-0b)@ha;                                         \
> +    addi  %r2, %r2, (.TOC.-0b)@l;                                           \

Strictly speaking the - want surrounding by blanks, but I wonder whether
to PPC eyes these constructs look more natural without. Please clarify.

> --- /dev/null
> +++ b/xen/arch/ppc/ppc64/opal-calls.S
> @@ -0,0 +1,81 @@
> +/* SPDX-License-Identifier: GPL-2.0-or-later */
> +/*
> + * Adapted from Linux's arch/powerpc/boot/opal-calls.S
> + *
> + * Copyright (c) 2016 IBM Corporation.
> + * Copyright Raptor Engineering, LLC
> + */
> +
> +#include <asm/asm-defns.h>
> +#include <asm/opal-api.h>
> +#include <asm/msr.h>
> +
> +    .text
> +
> +#define OPAL_CALL(name, token)  \
> +    .globl name;                \
> +name:                           \
> +    li      %r0, token;         \
> +    b       opal_call
> +
> + _GLOBAL_TOC(opal_call)

Any reason for the leading blank here?

Where necessary I again think these small items can be taken care of
while committing.

Jan



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.