Message ID | 20250220092903.3726-6-philmd@linaro.org |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a05:6000:1f85:b0:38f:210b:807b with SMTP id hj5csp107594wrb; Thu, 20 Feb 2025 01:32:12 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWQdzIXRBomP73RRi1ZM/Lr04c3pzHw9t40KkKUSwsWJixsCWXJl/I9OVm6iT4cU5DS6+WZxA==@linaro.org X-Google-Smtp-Source: AGHT+IEh6Jffae4KOA4BHFuR2rAUzK7bj8PG8f5whlaya2V2iYPC9OLzP1kIaCXbaE/XTXsAm8ap X-Received: by 2002:a05:620a:1a9f:b0:7c0:ae97:7fa0 with SMTP id af79cd13be357-7c0c434cc87mr173940085a.45.1740043932069; Thu, 20 Feb 2025 01:32:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1740043932; cv=none; d=google.com; s=arc-20240605; b=SiTagDmr1CV9F8kRbvNf4e7cCHE5PuPDYUzfkuZP/XgsNVglhDt6X7+YkkFtSxivhp S8SDySojjR/uBe4khy6CEsmMNWNH2mPfl8Vi9grNKZC+AnBMyxVFFq/FE3X1Nf9EOUV2 6q4O6xL8XGhD6q62HmN8DgQ1BrkaRCa0XHmwBurKg/XGYjXRlqk9Yfkv8ioKVko9oxYj R53aPMfhkAyHVUxFuZD5T+EUO9MeIof1BwkOCebEOnwN5x2EdoRo94gna8ezif7KM4R2 7GycYbHbsoGL9/TLXeQMdeUeQN4VLfIPFPP0mmD0/IQoXjRYLIC0t8wPz1QniS+beiuM l7RQ== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=GNUu0QLM1jJD6vp7svI4zxOCu3a+5YIL+dQ3Ih3Jc18=; fh=SmfC3sO/Je+MRtxTrJqoqGWQJjYliq56u/HVO0sNWv8=; b=jN3sSPdP4cSFydSQlAlmwHSLHUqFaa0duyOv12/71cB5X3Wm/tEgDzIZ0a+EGXTlPo Jxuh0dcNDaNTEEWu2JxWwLR4VEY20NIQlE12D2CPaF2J9520MWvWZ/u4Z3bAiwL+GwwB NQcjf9j/ZTS1grSC3aFYqyuq4AE513kfn19YYlMnYBuokfzBCoIirpSm10p+d/6k4l4I X26Vg5wj2o9sWvRYNtftpriRIwis0GFJJKXlCfzOVdv2xQakma7KYfd2a/lxRbAeP80b 2/uyegeR60ikiWqmPQ8OTO6uK16DN29k/xT5aAEb6g3RXY9Ys9uCqfZMes9FB+ipUQen KTgg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="ccJG7RB/"; 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: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c0a630b86esi589638085a.588.2025.02.20.01.32.11 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 20 Feb 2025 01:32:12 -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="ccJG7RB/"; 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 <qemu-devel-bounces@nongnu.org>) id 1tl2tN-0001KJ-7a; Thu, 20 Feb 2025 04:30:49 -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 <philmd@linaro.org>) id 1tl2tC-00018w-Hc for qemu-devel@nongnu.org; Thu, 20 Feb 2025 04:30:40 -0500 Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <philmd@linaro.org>) id 1tl2t9-0003nq-Ik for qemu-devel@nongnu.org; Thu, 20 Feb 2025 04:30:38 -0500 Received: by mail-pl1-x634.google.com with SMTP id d9443c01a7336-220d39a5627so10011875ad.1 for <qemu-devel@nongnu.org>; Thu, 20 Feb 2025 01:30:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1740043834; x=1740648634; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=GNUu0QLM1jJD6vp7svI4zxOCu3a+5YIL+dQ3Ih3Jc18=; b=ccJG7RB/NrTPd4A8fwkC2nq6Of9c6sb9+p/yQVWN96xxDew2qKj+P+uVtGMnVq8TYH Rxjs1mNByDoR8ze1hOedHRN8Hoe1t1pmLeafIPHWjMYiO+fVN6IPiqFNV22UGuiJ2I/2 v2Iw27Cr9iQQJK4w2U3V5JmQ+QdXLvykSd9leyP8S8a9FtJoZhVl8qKm1QQnTPMBYCLr 19rhS2v3B85+F0Pz18FfgvSiFOoCMFHeBuRUlRBRzPoo/6bmGpF2KV/DhWRRHpmpXTrK BTushJ+NIfwABfK35YQMZF/g0FG5DsOovewhJytWeVR2q7nZptjJ+rLr40izusOxoGCM HJpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740043834; x=1740648634; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GNUu0QLM1jJD6vp7svI4zxOCu3a+5YIL+dQ3Ih3Jc18=; b=CL0fAvBbzebOpmFUT8Mi8lBOI7mP00gbbiJLc9/yqEKxS49DJxMgca7Zh11AN3U6gb KcuqRbJ+UkjyxdhsoZeAEWz4gPmW38bha1ViPeu1PzfIte7cEqwKuxuJLFyyQiaVZ4Ei t7AqlXpgHN+S2/89RL70tXQO2tEYGFV0KqOhNp5bcE2tMvAaW9I/gTuUlZQr8EaZM37B DcMZlLwLzHdlPK7A7W9W++52yV/W5cRFgYSbg3Kgghj65urwvZl05T5CUuG9Ypp15gZY p+zafHeQRqR/tzapvg+yinw+0o9I1wxOgf21/VTeO1XZZaR7REoRgliVJ7HHVsa22nF0 IGtQ== X-Gm-Message-State: AOJu0YyBmpmAikHXPMaudwLvkgGTdDvpceBCQmzffFMeRwWnCLJuluf8 iIFnU7qvN++ZgGkzD9IqRGhIAdiNYr+RPNmuvNnKkScIYVeFVreiteKXx3XOEziAv8oqpujH7lY fIxM= X-Gm-Gg: ASbGncvWFUEzv0Af5aqxq+UsnwYx2qm6TBSrm8tH7qTI3a44cTFUqK9R03gntF6SwNG iQSRbTHCC85RwlOjK0e+opGomke3GVgeIi93Xd1NO5CqOObyeSbLcfVY9DVnIclE1NA14hTh6bV bntmnKmKqx3tz1peIK39UZOGEJD95wk9tjN7DHPysgokVNzP4/Qilr9V7t8b07c/a9vkUCZUb3w V6VUECt4rSj4BialE9YffxeaP4rUdMM2nqL5hqErIlxPUcAHdZe43pmh0UuN/ZDdJYpUwteZdWY gZWxETCTo5xEnrj8xZ0iULMkWSK2GrR0ScQKK7lIgq8jSdHqX9jmcs58W3pKUClESg== X-Received: by 2002:a05:6a00:21cc:b0:730:4c55:4fdf with SMTP id d2e1a72fcca58-7341725faf9mr2898714b3a.7.1740043833647; Thu, 20 Feb 2025 01:30:33 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7324273c8a4sm13283568b3a.85.2025.02.20.01.30.26 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 20 Feb 2025 01:30:33 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org> To: qemu-devel@nongnu.org, =?utf-8?q?Marc-Andr=C3=A9_Lureau?= <marcandre.lureau@redhat.com> Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org>, =?utf-8?q?A?= =?utf-8?q?lex_Benn=C3=A9e?= <alex.bennee@linaro.org>, Magnus Damm <magnus.damm@gmail.com>, Thomas Huth <huth@tuxfamily.org>, Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>, Rayhan Faizel <rayhan.faizel@gmail.com>, qemu-arm@nongnu.org, Evgeny Iakovlev <eiakovlev@linux.microsoft.com>, Paolo Bonzini <pbonzini@redhat.com>, Peter Maydell <peter.maydell@linaro.org>, Luc Michel <luc.michel@amd.com>, Yoshinori Sato <ysato@users.sourceforge.jp> Subject: [PATCH v2 5/9] hw/char/bcm2835_aux: Really use RX FIFO depth Date: Thu, 20 Feb 2025 10:28:58 +0100 Message-ID: <20250220092903.3726-6-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250220092903.3726-1-philmd@linaro.org> References: <20250220092903.3726-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::634; envelope-from=philmd@linaro.org; helo=mail-pl1-x634.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: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org |
Series |
hw/char: Improve RX FIFO depth uses
|
expand
|
diff --git a/hw/char/bcm2835_aux.c b/hw/char/bcm2835_aux.c index 73ad5934067..c6e7eccf7dd 100644 --- a/hw/char/bcm2835_aux.c +++ b/hw/char/bcm2835_aux.c @@ -221,7 +221,7 @@ static int bcm2835_aux_can_receive(void *opaque) { BCM2835AuxState *s = opaque; - return s->read_count < BCM2835_AUX_RX_FIFO_LEN; + return BCM2835_AUX_RX_FIFO_LEN - s->read_count; } static void bcm2835_aux_put_fifo(void *opaque, uint8_t value) @@ -243,7 +243,9 @@ static void bcm2835_aux_put_fifo(void *opaque, uint8_t value) static void bcm2835_aux_receive(void *opaque, const uint8_t *buf, int size) { - bcm2835_aux_put_fifo(opaque, *buf); + for (int i = 0; i < size; i++) { + bcm2835_aux_put_fifo(opaque, buf[i]); + } } static const MemoryRegionOps bcm2835_aux_ops = {