Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp320443rwj; Fri, 23 Dec 2022 01:44:07 -0800 (PST) X-Google-Smtp-Source: AMrXdXsLzbs18xsq3nYrEWT1MSW/+EUbHsmmAbtK6QJ2iw8s5myfF5lj0SKXCVpfywvrOd5BO2OF X-Received: by 2002:a17:90b:2747:b0:21a:1b9b:139e with SMTP id qi7-20020a17090b274700b0021a1b9b139emr10149463pjb.8.1671788647352; Fri, 23 Dec 2022 01:44:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671788647; cv=none; d=google.com; s=arc-20160816; b=Jc5NoBmzSyoQllyQHNLjZ/0mjlOGnLRUUE3clqgON/A9R5Uzku/8PQSU0eYTzrsVaD cxSbAd0UaxpbCOgXalZTGMJ4lDcSi7scWwLBJs7cjYHysYyDWw4ykdYcjXFbIqUK2rlH /X+WF40YEQC6bHU0zzEpUGTAmx3yx0siYHlL7u9MROetaV5JmNwGXix8dAL0o9GmTWWi qdkHc8iPJ/r3BGDds+F8eZPEC9jDUnnLZEIe+P2qFTUkssrldBS9tP50HFxDNcoCsafO qccSk3JBgoroZCsHy8edOH/2MALWs7+I831B1t5uVTWrdAL9VZFzoVcUEn1ujgcuY2bj NE9w== 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:user-agent:reply-to:references:in-reply-to:message-id :date:cc:subject:to:from; bh=BKdHyFPOWNgw2N8u64+QvS37oVx85HkntrrIq+xv0A0=; b=kTBhI6bD6Jqp6RpQHI8KMgycaG5xEViLhIK+Q57IkFqnpgSv64dmpu1IS62PgmRoLw luSntV5xMu5g1yDdm0L9pD+YN2QNmKQ2LOMBZRgToucXbitOjscvz/5sZPtu4LNTytz6 Z8zTiAQ9iu5n8S1iaBkh1ce9JPog5Rn+9ymbZ1xjO3T7aURkyJk7T+ZQ/cH5+PL9aQCx iS5djxusdd3j7zscKsJAqgKu7JgRlw4F+pJic2G148qyQtnMAD3qnI5o8+qG5AxTdhUi hZ5BykBa+vd1AfXs70IncIgaci8BsT8+pJv+P8obBRrEWqNu70iZbtx56U77RU4sujua uydA== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ob3-20020a17090b390300b00205f1a25a31si3232816pjb.161.2022.12.23.01.43.57; Fri, 23 Dec 2022 01:44:07 -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 S236080AbiLWJMe convert rfc822-to-8bit (ORCPT + 68 others); Fri, 23 Dec 2022 04:12:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46918 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236051AbiLWJM3 (ORCPT ); Fri, 23 Dec 2022 04:12:29 -0500 Received: from bg4.exmail.qq.com (bg4.exmail.qq.com [43.154.221.58]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8CADF3137A; Fri, 23 Dec 2022 01:12:26 -0800 (PST) X-QQ-mid: bizesmtp81t1671786703twus74c8 Received: from [192.168.3.2] ( [111.196.135.79]) by bizesmtp.qq.com (ESMTP) with id ; Fri, 23 Dec 2022 17:11:41 +0800 (CST) X-QQ-SSF: 01200000002000C0C000B00A0000000 X-QQ-FEAT: Qawnk02X7V/3XgZ2fM/jaE0BV64IhsybXxGbCgGgdSjq/pQgCE9fY4YxKS69I lDjwVxohnmpJtxN9bWL0Y5nR8nj2NtA0rw4Hxb2AjPqO+R1Ck65jLpoRASyyBBuqOjhXI0o bTNSgmMn0vS6HN5AfKKREc1jChYjO1pBJLE+Z+29XjVr6DbqivZoWNsZ3UnLf5XQmr+G/ft w3snpVgKBYGtqmYA7Lcs59ndbseq90J9dRVcaemaRNSJpOS1ZsP0pNwvMTtinmQwH+D4iPu DImOuCqmvDV8VsLzo0SNgk2vHCJ+rWdoJ0rWrZxXQjIBDZj9nk9VxKe9JxFz33/o/8KDYiV MsY1vptl+ym8KpBypAMM+t6v7Jf46ypq+O+WNkK X-QQ-GoodBg: 0 From: "Bin Meng" To: "Sergey Matyukevich" Subject: Re: [PATCH v3 0/3] serial: Add RISC-V support to the earlycon semihost driver Cc: linux-kernel , linux-riscv , linux-serial , aou , "catalin.marinas" , gregkh , jirislaby , palmer , "paul.walmsley" , linux , will , linux-arm-kernel Date: Fri, 23 Dec 2022 09:11:42 +0000 Message-Id: In-Reply-To: References: <20221209150437.795918-1-bmeng@tinylab.org> Reply-To: "Bin Meng" User-Agent: eM_Client/9.2.1222.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed 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: X-Mailing-List: linux-kernel@vger.kernel.org Hi Sergey, On 2022/12/23 4:06:23, "Sergey Matyukevich" 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 > >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