From patchwork Thu Nov 9 19:28:04 2023 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: 742605 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:110f:b0:32d:baff:b0ca with SMTP id z15csp1019817wrw; Thu, 9 Nov 2023 11:34:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IGY5GYAg9+YHZ8tl5IIT/mIeiMdpwop0v05Ju50NQ23aRz9ZXTqQPYDjgj7ZOj4kMv83e1f X-Received: by 2002:a05:6214:2e05:b0:677:9248:5a1c with SMTP id mx5-20020a0562142e0500b0067792485a1cmr395416qvb.3.1699558444192; Thu, 09 Nov 2023 11:34:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699558444; cv=none; d=google.com; s=arc-20160816; b=pYmKL7SwjAkEPvkW9dUoXCyuElKfUbmRQtwBcBPTlqLqLIr5mhbEKHlWwf/5y5SWLg z2f3IkqTRE/CrNGxmnpKM2PNQJRlqWXaaf3O7hUAZTXy7UluD1fR5Y2zMMK+epFeNRs2 pVxk9vcsOtxjTG1d1nzAiLuGQXsyGGzwAaxfZR42pRivW3FWAZKwMOiu5Vcp3QV41dEd giD3jq3ID1PMpT/qDjWH4/RhPZURmnXGS8SmUMRmritvPh1XyCGSoPHtNPJlnDfKLyWH sBMEwVf4oKpXr38XhJPgIX5JqfzUYGSSoefHbS1CB43hTB3iAp7jripZNtqOEMewtzfS GxTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=n5b+3846yd1OEZUDu5Pn1q6hKrxR7/QT62gd89N3lm8=; fh=DIg4VbvV6UsIVtjymVavUODq0hsDWu0+XvIrfuGsGdI=; b=de5bl/YPhMneDW+RnY7qHSG4keFCV67lVLjv8w0Mj3XxJq1sGetX5VLc8dTaLjfoQ6 nDry/EggnG/l6CFARyAdT87rxzVWSLTGwb4zzQ2LGKrKARfjmjbygatnAoSBqGckt4my C33tTS4knQKkmwWqyXWpYjBqL02crS1ek9dgk5AUz7c5GHPDA8D4pBFV4vIoyOC1YSvZ aUgT6EJgkrAMMEyFjwQZQ2QFnp/IMuBhvXihe0DEvN5+lWK7aIRNT6PHv56FzAzAkc7C 1zClSXj1bQ7E7eH7SR7VnWzUlaN0eaqIRxye8+wOjEIhvLXrkcXUaIFQ4b/VAcE1vA29 UsQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="qc7R//tZ"; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d13-20020a0ce70d000000b006498a534c79si3407149qvn.57.2023.11.09.11.34.03 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 09 Nov 2023 11:34:04 -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="qc7R//tZ"; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r1AhT-0004kn-RN; Thu, 09 Nov 2023 14:28:23 -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 1r1AhS-0004kP-5t for qemu-devel@nongnu.org; Thu, 09 Nov 2023 14:28:22 -0500 Received: from mail-ed1-x531.google.com ([2a00:1450:4864:20::531]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r1AhP-0005D5-Jt for qemu-devel@nongnu.org; Thu, 09 Nov 2023 14:28:21 -0500 Received: by mail-ed1-x531.google.com with SMTP id 4fb4d7f45d1cf-53ed4688b9fso1969770a12.0 for ; Thu, 09 Nov 2023 11:28:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699558097; x=1700162897; 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=n5b+3846yd1OEZUDu5Pn1q6hKrxR7/QT62gd89N3lm8=; b=qc7R//tZUMXW+34fWzHHpY8rQTW5k1jbRY9Ep4HVRVgmurSxVLkv2NWq7q5p7OfW1Y 5NZ5lxg69TVyHBHKCDZ7WysGlSE5/d3R1AmIFZCw9hMkOWvRzYZpsyG5u+/QWRy1/rtS sHeP5V6AYuh+Wcvh8QiZrK1IOSfpMhA5mMWJeuEqxG9Gh5rH/ZLi5qWbA1mN7SvGcvK5 nQHvf7KkhUXM7PxYw668k45pXfSf6dXEyPSoJzJbueeRbPtGL8oNc1FeHOXgk6ROjVbx TfjgxjJduWvakqOv4A28TIY0dtyzBcKCVJlUZ7hhyP9jg6GpaO282FJw6cDm75v4l3Q5 i2ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699558097; x=1700162897; 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=n5b+3846yd1OEZUDu5Pn1q6hKrxR7/QT62gd89N3lm8=; b=HXk3EimxHQ/3vLaNULsaFoMdyTMQr+yCFmDiLxZECnHD9DHBTPElzisZAtkQ/It+SS 7DB/Z7eC8CA9r8TaPeddeeXVN8DoFjLQnaqMRyjBVPpphK138yevFrvSz0u9oAhXMtDx +YpwvhjDuGrll86yBXpYz+LwJRtWHiC9tCMap6PJPvjhNuXU9CKy1IimTjjzcMIeA2Bz jweNwjYDWovZ8BJ2iudV1agPCPQl/GrkOiB88JSJVxc6IOfh+sctfRlb9AZ/ZfN3yPs/ cg3D0x+XRAubxlVXBDN3sRuWbAvXRVLNwfWJIybm6mfCI+ZAFW9k1WvPaqXcDxYFat+8 uPfw== X-Gm-Message-State: AOJu0YwzzWwJh1I0s/3sDdCkwHgPFTGk3fPU+VQWg/OjL9zu36x0q6qX +od7Zw6SNisJQGxbm8Sk6XBvUWUjh6+t/oSDdou62Q== X-Received: by 2002:a50:d098:0:b0:544:92f1:83d0 with SMTP id v24-20020a50d098000000b0054492f183d0mr5291281edd.0.1699558097729; Thu, 09 Nov 2023 11:28:17 -0800 (PST) Received: from m1x-phil.lan ([176.187.199.161]) by smtp.gmail.com with ESMTPSA id q18-20020a50cc92000000b0052ff9bae873sm190257edi.5.2023.11.09.11.28.16 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 09 Nov 2023 11:28:17 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Alex_Benn=C3=A9e?= , Gavin Shan , Paolo Bonzini , Mark Cave-Ayland , Peter Maydell , Evgeny Iakovlev , qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH-for-8.2 v4 00/10] hw/char/pl011: Implement TX (async) FIFO to avoid blocking the main loop Date: Thu, 9 Nov 2023 20:28:04 +0100 Message-ID: <20231109192814.95977-1-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::531; envelope-from=philmd@linaro.org; helo=mail-ed1-x531.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham 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 Missing review: #10 Hi, This series add support for (async) FIFO on the transmit path of the PL011 UART. Since v3: - Document migration bits (Alex, Richard) - Just check FIFO is not empty in pl011_xmit_fifo_state_needed (rth) - In pl011_xmit check TX enabled first, and ignore < 8-bit TX (rth) Since v2: - Added R-b tags - Addressed Richard comments on migration Since v1: - Restrict pl011_ops[] impl access_size, - Do not check transmitter is enabled (Peter), - Addressed Alex's review comments, - Simplified migration trying to care about backward compat, but still unsure... Philippe Mathieu-Daudé (10): util/fifo8: Allow fifo8_pop_buf() to not populate popped length util/fifo8: Introduce fifo8_peek_buf() hw/char/pl011: Split RX/TX path of pl011_reset_fifo() hw/char/pl011: Extract pl011_write_txdata() from pl011_write() hw/char/pl011: Extract pl011_read_rxdata() from pl011_read() hw/char/pl011: Warn when using disabled transmitter hw/char/pl011: Check if receiver is enabled hw/char/pl011: Rename RX FIFO methods hw/char/pl011: Add transmit FIFO to PL011State hw/char/pl011: Implement TX FIFO include/hw/char/pl011.h | 2 + include/qemu/fifo8.h | 37 ++++++- hw/char/pl011.c | 239 +++++++++++++++++++++++++++++++++------- util/fifo8.c | 28 ++++- hw/char/trace-events | 8 +- 5 files changed, 263 insertions(+), 51 deletions(-) Tested-by: Alex Bennée