mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Palmer Dabbelt <palmer@sifive.com>
Cc: jslaby@suse.com, patches@groups.riscv.org,
	linux-kernel@vger.kernel.org, Palmer Dabbelt <palmer@dabbelt.com>
Subject: Re: [PATCH] tty: New RISC-V SBI console driver
Date: Fri, 8 Dec 2017 08:37:18 +0100	[thread overview]
Message-ID: <20171208073718.GA14027@kroah.com> (raw)
In-Reply-To: <20171208001015.27735-1-palmer@sifive.com>

On Thu, Dec 07, 2017 at 04:10:15PM -0800, Palmer Dabbelt wrote:
> From: Palmer Dabbelt <palmer@dabbelt.com>
> 
> The RISC-V ISA defines a simple console that is availiable via SBI calls
> on all systems.  This patch adds a driver for this console interface
> that can act as both a target for early printk and as the system
> console.  The core arch code already enables the early printk support
> when CONFIG_HVC_RISCV_SBI is defined.
> 
> There is one checkpatch.pl warning here: to check the MAINTAINERS file.
> They're all matched by the "K: riscv" line.
> 
> Signed-off-by: Palmer Dabbelt <palmer@dabbelt.com>
> ---
>  arch/riscv/include/asm/hvc_riscv_sbi.h | 12 ++++++
>  drivers/tty/hvc/Kconfig                | 11 +++++
>  drivers/tty/hvc/Makefile               |  1 +
>  drivers/tty/hvc/hvc_riscv_sbi.c        | 75 ++++++++++++++++++++++++++++++++++
>  4 files changed, 99 insertions(+)
>  create mode 100644 arch/riscv/include/asm/hvc_riscv_sbi.h
>  create mode 100644 drivers/tty/hvc/hvc_riscv_sbi.c
> 
> diff --git a/arch/riscv/include/asm/hvc_riscv_sbi.h b/arch/riscv/include/asm/hvc_riscv_sbi.h
> new file mode 100644
> index 000000000000..41723ed7bd97
> --- /dev/null
> +++ b/arch/riscv/include/asm/hvc_riscv_sbi.h
> @@ -0,0 +1,12 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +
> +#ifndef _ASM_RISCV_HVC_RISCV_SBI_H
> +#define _ASM_RISCV_HVC_RISCV_SBI_H
> +
> +/*
> + * We always support CONFIG_EARLY_PRINTK via the SBI console driver because it
> + * works well enough that there's no penalty to doing so.
> + */
> +extern struct console riscv_sbi_early_console_dev __initdata;

Are you sure that __initdata should go into a .h file with an extern?

And why do you need this .h file?  Nothing in this patch uses it.

> +config HVC_RISCV_SBI
> +	bool "RISC-V SBI console support"
> +	depends on RISCV
> +	select HVC_DRIVER
> +	default y

Unless you can not boot your machine without this, you do not need 'y'.

thanks,

greg k-h

  reply	other threads:[~2017-12-08  7:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-08  0:10 Palmer Dabbelt
2017-12-08  7:37 ` Greg KH [this message]
2017-12-08 19:46   ` Palmer Dabbelt
2017-12-08 16:22 ` Karsten Merker
2017-12-08 16:59   ` Philippe Ombredanne
  -- strict thread matches above, loose matches on Subject: below --
2017-06-27  4:53 Palmer Dabbelt

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=20171208073718.GA14027@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=palmer@dabbelt.com \
    --cc=palmer@sifive.com \
    --cc=patches@groups.riscv.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

Powered by JetHome