Message ID | 20221209150437.795918-1-bmeng@tinylab.org |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp831594wrr; Fri, 9 Dec 2022 07:11:29 -0800 (PST) X-Google-Smtp-Source: AA0mqf6wYMOaK2XWWeQMNIS6Ap+hBDEWZ7WtiabKR5AHTsuz+L0PJupNYbh7fkNxMrHN6GmjrNfd X-Received: by 2002:a17:902:ce08:b0:189:d2e4:9829 with SMTP id k8-20020a170902ce0800b00189d2e49829mr9924993plg.15.1670598689694; Fri, 09 Dec 2022 07:11:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670598689; cv=none; d=google.com; s=arc-20160816; b=msHUqqI9UTb7hQupu9WBCYtVWO+sdnRDVhwUC0217PDDfRGlOvaDev8S4GAY54JzR/ DxR3tmDgsIBpvNllriQuqCKBGUQbJ3fht8nm1pU2YfOVKoBJCodFf4ntmL2NUaoTE6TM Tk0SAsuKDTe3m4Akoqau33kQolYd+gMsMvyCVbZLoW0LUhIPwX4KxLewjUpB5rxo21Sg MNBuPBqVkgfkb8bcH2IU/YfmWLTZxHt5L3zeR5HdoRabvp91fjoKnFNXnXxirMFBVX1p k2WIlAj3KheyiQkWRIvdpdJ5E2EDMMyLpt0QYafgEft9QGR29RHDK4sZ0Yk/w0F1T5Y5 FveA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:feedback-id:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from; bh=FchcXR5XwSExPrMURnDheySGbr2xAmdIFE1XLe78mxc=; b=hMWjpDx9lc7EAdvUPjTcY738cAxOGB+cMBGHYoWRMXTk/Vw5GU4GDxErp/DZ+OPbIk 0W261AaSXUWZneUaTXLFrZlbuOIlp/pxkCdUM3BBL8kYYfDeMBnm40xae3ig1ggbWkp9 dXhd9EFDj8qTlm5JSu+tlAxuBaPGfQCh3jt7iFkU+4iPEW75DSockqCkge+6Y9Y1ZqE0 AEtL3HuEKRIjQCk/yWioTvlrlAbLSdpvPvnyFLPVVUr5jPuOwKqF0aKsLh772XrFl0v/ bYI00DZg4KNmf3FmuIWDg1JTrCjUnJKDWb5CdKmacVtHl/cLl70epuNy/wePoWrQ+824 gfcw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jx10-20020a170903138a00b001897919de28si1716992plb.546.2022.12.09.07.11.16; Fri, 09 Dec 2022 07:11:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230165AbiLIPF0 (ORCPT <rfc822;sophiezhao968@gmail.com> + 99 others); Fri, 9 Dec 2022 10:05:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55370 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230019AbiLIPFO (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 9 Dec 2022 10:05:14 -0500 Received: from bg4.exmail.qq.com (bg4.exmail.qq.com [43.155.67.158]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D591E2189C; Fri, 9 Dec 2022 07:05:12 -0800 (PST) X-QQ-mid: bizesmtp89t1670598279tf8ekbj4 Received: from ubuntu.. ( [111.196.135.79]) by bizesmtp.qq.com (ESMTP) with id ; Fri, 09 Dec 2022 23:04:37 +0800 (CST) X-QQ-SSF: 01200000002000B0C000B00A0000000 X-QQ-FEAT: 7bD38UErqBMse/wQvkTTMEyob1uRl85oGpxpBEZmiEMslPZLCL+kkKP6NtbX2 gPc0PSkUeyw56O8ET95uXwx6vMo+BhrnioINwoXo4H2tTnglrQ/7WRNrtlQxK7ZQxSzw4ba ZeYLrpHEC9pG4k7/gbKQgezfWTytqnhFV+jA16UgOb0XV+eGbyAAhyEZQ7gB/3fFm0ivwFx bdP+CFTqDOLadz2kycFslFhdoxQFI4FDYuWQVzMVw3ReGwgKnFOt8f3+eihWRjuFqXfIje2 KdVb9RsMmhoL4ikneZlRSDmfernerWgzDol1vR6cutPf4eSN8cTqRMCFNRjhWwlE0OvFo4z hbLJM6xeg60PoRG+FB96PPSALEiAg== X-QQ-GoodBg: 0 From: Bin Meng <bmeng@tinylab.org> To: linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, linux-serial@vger.kernel.org Cc: Albert Ou <aou@eecs.berkeley.edu>, Catalin Marinas <catalin.marinas@arm.com>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Jiri Slaby <jirislaby@kernel.org>, Palmer Dabbelt <palmer@dabbelt.com>, Paul Walmsley <paul.walmsley@sifive.com>, Russell King <linux@armlinux.org.uk>, Will Deacon <will@kernel.org>, linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 0/3] serial: Add RISC-V support to the earlycon semihost driver Date: Fri, 9 Dec 2022 23:04:34 +0800 Message-Id: <20221209150437.795918-1-bmeng@tinylab.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:tinylab.org:qybglogicsvr:qybglogicsvr3 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751749691616203503?= X-GMAIL-MSGID: =?utf-8?q?1751749691616203503?= |
Series |
serial: Add RISC-V support to the earlycon semihost driver
|
|
Message
Bin Meng
Dec. 9, 2022, 3:04 p.m. UTC
RISC-V semihosting spec [1] is built on top of the existing Arm one; we can add RISC-V earlycon semihost driver easily. This series refactors the existing driver a little bit, to move smh_putc() variants in respective arch's semihost.h, then we can implement RISC-V's version in the riscv arch directory. Link: https://github.com/riscv/riscv-semihosting-spec/blob/main/riscv-semihosting-spec.adoc [1] Changes in v3: - add #ifdef in the header to prevent from multiple inclusion - add forward-declare struct uart_port - add a Link tag in the commit message Changes in v2: - new patch: "serial: earlycon-arm-semihost: Move smh_putc() variants in respective arch's semihost.h" - Move the RISC-V implementation to semihost.h Bin Meng (3): serial: earlycon-arm-semihost: Move smh_putc() variants in respective arch's semihost.h riscv: Implement semihost.h for earlycon semihost driver serial: Rename earlycon semihost driver arch/arm/include/asm/semihost.h | 30 +++++++++++++++++++ arch/arm64/include/asm/semihost.h | 24 +++++++++++++++ arch/riscv/include/asm/semihost.h | 26 ++++++++++++++++ drivers/tty/serial/Kconfig | 14 ++++----- drivers/tty/serial/Makefile | 2 +- ...con-arm-semihost.c => earlycon-semihost.c} | 25 +--------------- 6 files changed, 89 insertions(+), 32 deletions(-) create mode 100644 arch/arm/include/asm/semihost.h create mode 100644 arch/arm64/include/asm/semihost.h create mode 100644 arch/riscv/include/asm/semihost.h rename drivers/tty/serial/{earlycon-arm-semihost.c => earlycon-semihost.c} (57%)
Comments
On 2022/12/9 23:04:34, "Bin Meng" <bmeng@tinylab.org> wrote: >RISC-V semihosting spec [1] is built on top of the existing Arm one; >we can add RISC-V earlycon semihost driver easily. > >This series refactors the existing driver a little bit, to move smh_putc() >variants in respective arch's semihost.h, then we can implement RISC-V's >version in the riscv arch directory. > >Link: https://github.com/riscv/riscv-semihosting-spec/blob/main/riscv-semihosting-spec.adoc [1] > >Changes in v3: >- add #ifdef in the header to prevent from multiple inclusion >- add forward-declare struct uart_port >- add a Link tag in the commit message > Ping? Regards, Bin
On Wed, Dec 21, 2022 at 03:51:59PM +0000, Bin Meng wrote: > On 2022/12/9 23:04:34, "Bin Meng" <bmeng@tinylab.org> wrote: > > > RISC-V semihosting spec [1] is built on top of the existing Arm one; > > we can add RISC-V earlycon semihost driver easily. > > > > This series refactors the existing driver a little bit, to move smh_putc() > > variants in respective arch's semihost.h, then we can implement RISC-V's > > version in the riscv arch directory. > > > > Link: https://github.com/riscv/riscv-semihosting-spec/blob/main/riscv-semihosting-spec.adoc [1] > > > > Changes in v3: > > - add #ifdef in the header to prevent from multiple inclusion > > - add forward-declare struct uart_port > > - add a Link tag in the commit message > > > Ping? It is the middle of the merge window, we can not do anything until after 6.2-rc1 is out, please be patient. While you wait, please take the time to review other patches on the mailing list to help with the workload of the maintainers. thanks, greg k-h
Hi Bin, > RISC-V semihosting spec [1] is built on top of the existing Arm one; > we can add RISC-V earlycon semihost driver easily. > > This series refactors the existing driver a little bit, to move smh_putc() > variants in respective arch's semihost.h, then we can implement RISC-V's > version in the riscv arch directory. > > Link: https://github.com/riscv/riscv-semihosting-spec/blob/main/riscv-semihosting-spec.adoc [1] > > Changes in v3: > - add #ifdef in the header to prevent from multiple inclusion > - add forward-declare struct uart_port > - add a Link tag in the commit message > > Changes in v2: > - new patch: "serial: earlycon-arm-semihost: Move smh_putc() variants in respective arch's semihost.h" > - Move the RISC-V implementation to semihost.h > > Bin Meng (3): > serial: earlycon-arm-semihost: Move smh_putc() variants in respective > arch's semihost.h > riscv: Implement semihost.h for earlycon semihost driver > serial: Rename earlycon semihost driver > > arch/arm/include/asm/semihost.h | 30 +++++++++++++++++++ > arch/arm64/include/asm/semihost.h | 24 +++++++++++++++ > arch/riscv/include/asm/semihost.h | 26 ++++++++++++++++ > drivers/tty/serial/Kconfig | 14 ++++----- > drivers/tty/serial/Makefile | 2 +- > ...con-arm-semihost.c => earlycon-semihost.c} | 25 +--------------- > 6 files changed, 89 insertions(+), 32 deletions(-) > create mode 100644 arch/arm/include/asm/semihost.h > create mode 100644 arch/arm64/include/asm/semihost.h > create mode 100644 arch/riscv/include/asm/semihost.h > rename drivers/tty/serial/{earlycon-arm-semihost.c => earlycon-semihost.c} (57%) Tested-by: Sergey Matyukevich <sergey.matyukevich@syntacore.com> Applied the patches on top of Linux 6.1 and tested earlycon logs from RISC-V target in OpenOCD. Regards, Sergey
Hi Sergey, On 2022/12/23 4:06:23, "Sergey Matyukevich" <geomatsi@gmail.com> wrote: >Hi Bin, > >> RISC-V semihosting spec [1] is built on top of the existing Arm one; >> we can add RISC-V earlycon semihost driver easily. >> >> This series refactors the existing driver a little bit, to move smh_putc() >> variants in respective arch's semihost.h, then we can implement RISC-V's >> version in the riscv arch directory. >> >> Link: https://github.com/riscv/riscv-semihosting-spec/blob/main/riscv-semihosting-spec.adoc [1] >> >> Changes in v3: >> - add #ifdef in the header to prevent from multiple inclusion >> - add forward-declare struct uart_port >> - add a Link tag in the commit message >> >> Changes in v2: >> - new patch: "serial: earlycon-arm-semihost: Move smh_putc() variants in respective arch's semihost.h" >> - Move the RISC-V implementation to semihost.h >> >> Bin Meng (3): >> serial: earlycon-arm-semihost: Move smh_putc() variants in respective >> arch's semihost.h >> riscv: Implement semihost.h for earlycon semihost driver >> serial: Rename earlycon semihost driver >> >> arch/arm/include/asm/semihost.h | 30 +++++++++++++++++++ >> arch/arm64/include/asm/semihost.h | 24 +++++++++++++++ >> arch/riscv/include/asm/semihost.h | 26 ++++++++++++++++ >> drivers/tty/serial/Kconfig | 14 ++++----- >> drivers/tty/serial/Makefile | 2 +- >> ...con-arm-semihost.c => earlycon-semihost.c} | 25 +--------------- >> 6 files changed, 89 insertions(+), 32 deletions(-) >> create mode 100644 arch/arm/include/asm/semihost.h >> create mode 100644 arch/arm64/include/asm/semihost.h >> create mode 100644 arch/riscv/include/asm/semihost.h >> rename drivers/tty/serial/{earlycon-arm-semihost.c => earlycon-semihost.c} (57%) > >Tested-by: Sergey Matyukevich <sergey.matyukevich@syntacore.com> > >Applied the patches on top of Linux 6.1 and tested earlycon logs from >RISC-V target in OpenOCD. > Thanks for your testing! Regards, Bin
On Fri, 09 Dec 2022 07:04:34 PST (-0800), bmeng@tinylab.org wrote: > > RISC-V semihosting spec [1] is built on top of the existing Arm one; > we can add RISC-V earlycon semihost driver easily. > > This series refactors the existing driver a little bit, to move smh_putc() > variants in respective arch's semihost.h, then we can implement RISC-V's > version in the riscv arch directory. > > Link: https://github.com/riscv/riscv-semihosting-spec/blob/main/riscv-semihosting-spec.adoc [1] > > Changes in v3: > - add #ifdef in the header to prevent from multiple inclusion > - add forward-declare struct uart_port > - add a Link tag in the commit message > > Changes in v2: > - new patch: "serial: earlycon-arm-semihost: Move smh_putc() variants in respective arch's semihost.h" > - Move the RISC-V implementation to semihost.h > > Bin Meng (3): > serial: earlycon-arm-semihost: Move smh_putc() variants in respective > arch's semihost.h > riscv: Implement semihost.h for earlycon semihost driver > serial: Rename earlycon semihost driver > > arch/arm/include/asm/semihost.h | 30 +++++++++++++++++++ > arch/arm64/include/asm/semihost.h | 24 +++++++++++++++ > arch/riscv/include/asm/semihost.h | 26 ++++++++++++++++ > drivers/tty/serial/Kconfig | 14 ++++----- > drivers/tty/serial/Makefile | 2 +- > ...con-arm-semihost.c => earlycon-semihost.c} | 25 +--------------- > 6 files changed, 89 insertions(+), 32 deletions(-) > create mode 100644 arch/arm/include/asm/semihost.h > create mode 100644 arch/arm64/include/asm/semihost.h > create mode 100644 arch/riscv/include/asm/semihost.h > rename drivers/tty/serial/{earlycon-arm-semihost.c => earlycon-semihost.c} (57%) Acked-by: Palmer Dabbelt <palmer@rivosinc.com>