grub-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v2 0/8] serial: Add MMIO & SPCR support


From: Benjamin Herrenschmidt
Subject: Re: [PATCH v2 0/8] serial: Add MMIO & SPCR support
Date: Fri, 20 Jan 2023 17:15:48 +1100
User-agent: Evolution 3.44.4-0ubuntu1

On Thu, 2023-01-19 at 18:31 +0100, Daniel Kiper wrote:
> 
> Sadly your patch set broke various builds including x86-ieee1275 one. I had
> to do some tweaks to make it work again. You can find most important ones
> below. Please double check I have not messed up something.

Oh, sorry about that. I didn't know there even was such a thing as x86-
ieee1275. Is there an easy way to run / test all those builds ? A
script or service somewhere ?

> Daniel
> 
> diff --git a/grub-core/term/ieee1275/serial.c 
> b/grub-core/term/ieee1275/serial.c
> index afbe8dcda..0e4cac4c4 100644
> --- a/grub-core/term/ieee1275/serial.c
> +++ b/grub-core/term/ieee1275/serial.c
> @@ -228,7 +228,7 @@ add_port (struct ofserial_hash_ent *ent)
>      return NULL;
>  
>    FOR_SERIAL_PORTS (port)
> -    if (port->ent == ent)
> +    if (port->elem == ent)
>        return port;

Right.

>    port = grub_zalloc (sizeof (*port));
> @@ -252,7 +252,7 @@ add_port (struct ofserial_hash_ent *ent)
>    return port;
>  }
>  
> -const struct grub_serial_port *
> +struct grub_serial_port *
>  grub_ofserial_add_port (const char *path)
>  {
>    struct ofserial_hash_ent *ent;
> diff --git a/grub-core/term/ns8250-spcr.c b/grub-core/term/ns8250-spcr.c
> index 01533d969..d101bffb5 100644
> --- a/grub-core/term/ns8250-spcr.c
> +++ b/grub-core/term/ns8250-spcr.c
> @@ -16,6 +16,8 @@
>   *  along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
>   */
>  
> +#if !defined(GRUB_MACHINE_IEEE1275) && !defined(GRUB_MACHINE_QEMU)
> +
>  #include <grub/serial.h>
>  #include <grub/ns8250.h>
>  #include <grub/types.h>
> @@ -82,3 +84,5 @@ grub_ns8250_spcr_init (void)
>          return NULL;
>      };
>  }

This is the rule for ACPI ? Or is something else problematic ? No
particular objection here, just wondering.

> +
> +#endif
> diff --git a/grub-core/term/serial.c b/grub-core/term/serial.c
> index 81abd570c..c65ffc63c 100644
> --- a/grub-core/term/serial.c
> +++ b/grub-core/term/serial.c
> @@ -209,6 +209,8 @@ grub_serial_find (const char *name)
>        if (port != NULL)
>          return port;
>      }
> +
> +#if (defined(__i386__) || defined(__x86_64__)) && 
> !defined(GRUB_MACHINE_IEEE1275) && !defined(GRUB_MACHINE_QEMU)

Ok.

>    if (grub_strcmp (name, "auto") == 0)
>      {
>        /* Look for an SPCR if any. If not, default to com0. */
> @@ -220,6 +222,7 @@ grub_serial_find (const char *name)
>            return port;
>      }
>  #endif
> +#endif
>  
>  #ifdef GRUB_MACHINE_IEEE1275
>    if (grub_strncmp (name, "ieee1275/", sizeof ("ieee1275/") - 1) == 0)
> diff --git a/include/grub/ieee1275/console.h b/include/grub/ieee1275/console.h
> index bdd98fe06..a8094d381 100644
> --- a/include/grub/ieee1275/console.h
> +++ b/include/grub/ieee1275/console.h
> @@ -28,7 +28,7 @@ void grub_console_init_lately (void);
>  /* Finish the console system.  */
>  void grub_console_fini (void);
>  
> -const char *
> +struct grub_serial_port *
>  grub_ofserial_add_port (const char *name);
> 
Yeah, I didn't try building ieee1275, my fault. Sorry about that. Your
changes seem fine to me.

Cheers,
Ben.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]