From patchwork Thu Feb 20 09:28:53 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 866724 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:1f85:b0:38f:210b:807b with SMTP id hj5csp106836wrb; Thu, 20 Feb 2025 01:30:08 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWJqNnsO5VAombVoPPV7C/OZtz8rRsUMe3FAvkuHZvpida1MDn03uLpVoGp/mJmANmXXSpmug==@linaro.org X-Google-Smtp-Source: AGHT+IGSWGuEKA0c0S1kz5yxNO3MJSuPDT4nHDms3vjRMd4FqK68+qT1n1xY4y1dcClorg7gLanv X-Received: by 2002:ac8:7f8a:0:b0:471:bd5e:d5e3 with SMTP id d75a77b69052e-472082ba15emr106099401cf.38.1740043808464; Thu, 20 Feb 2025 01:30:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1740043808; cv=none; d=google.com; s=arc-20240605; b=HGDnBG4DmBb953r9c2NxigLr9aPQX0YUJy6FAGofOorfiFOSHSk4QC/psfBL3uUGpP hpx/EdFpWBwqO7L7G9VaTmVE461i99Dcb+PWT2/y2bwvxa0jiJqhRvmLiJr3lXlgZsOQ td7uyPk6nHCh2IaIDWg6QSU6wVtsmr6NoHJITMjN/66teIg1F63utGO0mnz5KzrkWXU9 BRVuGZUNH6x84W9fzMdMLWAPwve/TcoPf9bKWYWwR/vq6Sq6Enz6tbqVrBuYEMpPAR7i MkQfzzOLD8K0ztRCpuXUn74vLwDhy6Gh0tKij1+uA4Tk1y4ybbiFHkKI/I8GRy0MRx9K KZ6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=f7n0sYwrB8IT7jhirk9RyIiTw/ke91kLSgIHGTYFSYs=; fh=SmfC3sO/Je+MRtxTrJqoqGWQJjYliq56u/HVO0sNWv8=; b=aIUoRaxNeFRG7bqiA5S3kQy/dAa0ingOMguSngx+QlkT+RSivzaCzwfI9PqZW64PLF zluV6gkMu9NVbmfQ+XbdF7xjE8uyDzulboVyhQ9a/nTJss97KlujR4lCB+gDYuaw7Bl1 umRQafMJfGzRqr+qqIlJRGBHYcwWnBQ5ECZjMMNWsskWXHEDZ6qLv91tAiB0mymXMpvM YrIW8tCYAD0GbBdCVQKDJHxX5Os3KNQ1NJuoJkisgpDNJqY3GDIyS73RhqX5h/1l7Urb S6AWmwGB8tfhMH4CkQpDMMhbq0YNxm6M86ttAHLNoWanlrTKc9lF6v12rAlkIEBGtFdv F4KA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=V1NNQNCT; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-472072e50b5si36545641cf.235.2025.02.20.01.30.08 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 20 Feb 2025 01:30:08 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=V1NNQNCT; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tl2rw-000800-MW; Thu, 20 Feb 2025 04:29:20 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tl2ru-0007zG-Si for qemu-devel@nongnu.org; Thu, 20 Feb 2025 04:29:18 -0500 Received: from mail-pj1-x102f.google.com ([2607:f8b0:4864:20::102f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tl2rt-0003Od-Dx for qemu-devel@nongnu.org; Thu, 20 Feb 2025 04:29:18 -0500 Received: by mail-pj1-x102f.google.com with SMTP id 98e67ed59e1d1-2fc33aef343so1461025a91.1 for ; Thu, 20 Feb 2025 01:29:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1740043756; x=1740648556; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=f7n0sYwrB8IT7jhirk9RyIiTw/ke91kLSgIHGTYFSYs=; b=V1NNQNCTK6RAuJ0CHJVLVb8oVSoESYTMVsBWFJNu0LGyxsVnXy2GB2ppo2Ale433jt ki8bTReOFywM4UQC6Kd8URDpR3Kxu1vFW/stlua4KmG/Pw2L7KXMR7mMpnfUft1jNFm5 kjUefrtJfLMCRh7RVz7o1f05CvabBpiBXpsJ5syT+w/QUO1GMjARMavr9htnviOAhHmg USemh6XeL0Bvb2nytGdLhQSRyKFoq6b1P7t9QFsXf3JOR9suX0fa9VBvWk0UW/a4xVWG YFY+H0t8UqcBTL/T5tPYniBy/je1pPAorivb/tRvo1oyRWC9d0l4Q9LuLT5PErsJztcV kwZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740043756; x=1740648556; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=f7n0sYwrB8IT7jhirk9RyIiTw/ke91kLSgIHGTYFSYs=; b=i/wM4EhZJuGFvO1aLwnsoUvDtFk7Qxlc7MFlicnf/y0z1hVnYinfFlK40EFuCHAoia HXO+YYT4jERxySOpP04AK48+SZ8BaG+HNpUKNAcFeQ+oQBXgUvRmnGxbwE6K8y0FZCxm JFyJ5rT5EIlX4hC5uq/cu3jWenHmZE1FGtgAGo9zRGNS5GRlFFgsWUSlXmp7wRnXTsLq MifW6DyprdwcfGPS2ABP3sAZlKrpdFiclbO6jW91wTlLvcasy5sUC4prGOBc7SeSYMNK EZ7YmqJ5uo02NRk9WkIAZYK1wBVga40+q2XNFjdR3Cz63lKdfvoJ5owEtKTTkdYm+F2a uZig== X-Gm-Message-State: AOJu0YwwfJZdyIyJc2fYRwrJSKv4huNBjsPSRO1KUT09gvVXpdzoqF0O Vuz45ELQJBe7KQKN06jyHMVQWGomGlChuA1Owf6N5qNUYE/B2I09IC+upG56MeCLSIr/wWGsUZP a1Fw= X-Gm-Gg: ASbGnctNWzPQmQtUFWsZgZRR9pCm645+zz585MzJ5pyX/I6sLCKaewBNvPnhs9WIwVD CYg8b4FPuHzU8Byw5ey6hVMKXPBfTl5ZdlxwPnrnb8BTl75QAfRJjLawu4Y+ePi7+usK5RjSkJm ms0Y3Ow1GlfTGZ1vGL20Sv6dKWypBKOVklk5+qFk71wNmlyA6g/rWb6MAUZjWwXxqpD1crTIg3C GHS9964hs02TIbtZotW1KFQhaqPPHJLjFhU63fspZ3GDYZv7vD1c081ioTgXwe305zk04CuA0F8 dRLfw5ykX/l1OtSkDxJD15xN1dNSaJOVH2RkfWKL1rhZxpK9sXHAPAQqpN0XhWmNgg== X-Received: by 2002:a17:90b:180a:b0:2f6:be57:49d2 with SMTP id 98e67ed59e1d1-2fcb5a36812mr12484165a91.17.1740043755174; Thu, 20 Feb 2025 01:29:15 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2fbf98f6965sm15329037a91.29.2025.02.20.01.29.08 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 20 Feb 2025 01:29:14 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?A?= =?utf-8?q?lex_Benn=C3=A9e?= , Magnus Damm , Thomas Huth , Shin'ichiro Kawasaki , Rayhan Faizel , qemu-arm@nongnu.org, Evgeny Iakovlev , Paolo Bonzini , Peter Maydell , Luc Michel , Yoshinori Sato Subject: [PATCH v2 0/9] hw/char: Improve RX FIFO depth uses Date: Thu, 20 Feb 2025 10:28:53 +0100 Message-ID: <20250220092903.3726-1-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::102f; envelope-from=philmd@linaro.org; helo=mail-pj1-x102f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Since v1: - Fixed typos (Luc) Some UART devices implement a RX FIFO but their code (via IOCanReadHandler) only return a size of 1 element, while we can receive more chars. This series takes advantage of the full depth. Inspired by pm215 chat comment on yesterday's community meeting on the PL011 Rust implementation description by Paolo :) Philippe Mathieu-Daudé (9): hw/char/pl011: Warn when using disabled receiver hw/char/pl011: Simplify a bit pl011_can_receive() hw/char/pl011: Improve RX flow tracing events hw/char/pl011: Really use RX FIFO depth hw/char/bcm2835_aux: Really use RX FIFO depth hw/char/imx_serial: Really use RX FIFO depth hw/char/mcf_uart: Use FIFO_DEPTH definition instead of magic values hw/char/mcf_uart: Really use RX FIFO depth hw/char/sh_serial: Return correct number of empty RX FIFO elements hw/char/bcm2835_aux.c | 6 ++++-- hw/char/imx_serial.c | 8 ++++++-- hw/char/mcf_uart.c | 16 +++++++++++----- hw/char/pl011.c | 30 ++++++++++++++++++++++-------- hw/char/sh_serial.c | 30 ++++++++++++++---------------- hw/char/trace-events | 7 ++++--- 6 files changed, 61 insertions(+), 36 deletions(-)