From patchwork Mon Feb 20 09:13:48 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: 655060 Delivered-To: patch@linaro.org Received: by 2002:adf:9bcd:0:0:0:0:0 with SMTP id e13csp1294790wrc; Mon, 20 Feb 2023 01:24:58 -0800 (PST) X-Google-Smtp-Source: AK7set8lnuhMK8F216/3CYosO44k88yDB96E/7oSXvA8VQ+m+Gze+5tQKZHjtADuxXkhTEmZPUlZ X-Received: by 2002:ac8:5742:0:b0:3b8:6dc8:a9b5 with SMTP id 2-20020ac85742000000b003b86dc8a9b5mr24052595qtx.34.1676885098279; Mon, 20 Feb 2023 01:24:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676885098; cv=none; d=google.com; s=arc-20160816; b=SRX3uB2jc4snQ7yoXYOgXdiLnlGEIoql+dfVk2gyGg08sfEq3sZDDmMXVLCrfY2I6g RfsXK07+cOtXUPyfO9WHwlfF6adCfae7ggocH1wu3dPCV0Rm9DAVAwj45d+AULvK9uwA A0TQG5OTvXgaYoxXeaqyj+h5DhF1zVORhuFzn9IRWuB6Tv7ra+NaGcMc10RUifdL+uli jtG5aCwi+TaKJxL3aFxkZXeYGZwIBTc9T3TzAW7aLe4C5up/VYPWYz+QMrrmDe60IjXW UFuiNurZ4j5vxtvzZJzenjZwQWtelEgORJjPb/luh7nigxmM730rBIOw0fpwpdCP/q47 jmXA== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ASv37aA7sKpH0SiC90y10yVDUKs+omkkQozWOU0yUgc=; b=EuncGZV2p3tEcQPo1bnYbEHGiOTMpApvjDqa9vooeil8N0FqbkN+q6cNqk8GZGNGtu iEw4V/lhOCpjSWdFE/xsqaWB4U4Fs5e3QYYYOhJmzutjevjNZWCm8aCmJGhhPgOAeBTx GKIdsBhxAc8o9uGzCVExfBqbSBTXT8balfez5XXfC2XJtcJVT13bVWMjYHy4Y/bCQqFd PE9uw9bEa66w23meyAbS97uZ4gPE2p5nENU7Yfg8PlSamsFEqZ3v+H9LX1RKrVcVh0SF yeHjbfuRoDEVhxJ6cr3dNrqKH2WW6FTXrvHcv3x1J8/cpob5cKvHj3pJLO9eTHNJ2tLP MNLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cP2VdLny; 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 m17-20020a05622a055100b003bd0e7e288bsi8813317qtx.553.2023.02.20.01.24.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 20 Feb 2023 01:24:58 -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=cP2VdLny; 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 1pU2H5-0007LX-DU; Mon, 20 Feb 2023 04:15:55 -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 1pU2GR-0006fM-LA for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:15:15 -0500 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pU2GP-00048C-Bm for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:15:15 -0500 Received: by mail-wm1-x32f.google.com with SMTP id j2-20020a05600c1c0200b003e1e754657aso449056wms.2 for ; Mon, 20 Feb 2023 01:15:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=ASv37aA7sKpH0SiC90y10yVDUKs+omkkQozWOU0yUgc=; b=cP2VdLnyazYynhs8JhILPzR/RjhnqJ45T5QWbihxAeY4iHAfYFLgYN59+R+7J6sLha g/2tiWt6UGdjk2t7J5NQ5IDTRo1OM5au8swo4svbLJfF9i8uhMSOP8uqkeS1VLe4+OQ3 kFxkQN2sSfN8mOX2U+NMPwdLNSfKJlJjkqTTHZ4b75jxQT6OCbA7TxyuIVfoCAQQ0CyF jJQrJozvV22PzQfsblNUCNbXvMtQvmPfYc0fqvcBb/0zQZu0TQHIYFhfdAKxkQCYaSum 1ZJOCkT14TUUerI/fClO/BTxiomfzed7j7mKCaYGLyaWUHWyVbjDxrvyleHTUHsIuJSz QZgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=ASv37aA7sKpH0SiC90y10yVDUKs+omkkQozWOU0yUgc=; b=uqKYBL9QVFdHb9WDPy4qcyEhZQk42e1MIBrKPN9wrf1MNTdTVk2Zd3T+ID5wp0mxe2 +hXgP0s8J/uuncRKRogK/KQJmuDPSl2LPZ47LzJFURdMCnyVrhfxdv9A4r7Zq1BeKUKj 3ihE9Oi0uwPr1pBIr3r3DOcIFi1JtfPt1Ix61PTKDfn13LzR1dF4mAe3+SnLkK2vofax EhJwl1eVIN/DeUvuKN3MKXYNHZE8KiBGmwsKGjhC3h7W20SuVqX05cI56x0kW+tqH3/+ ktqsW9osgtQrOypuC3aHSb5RKJ1ffrJ7gcoxou7T+B5wWqI4HcfiwCWdeThRptxpkCZn X0+g== X-Gm-Message-State: AO0yUKWTZ8hGQI5xwlqufys7EO83bszC73HY0NMlgVgpjnh0G8hvPWIc lF00jDNs1YrkjTsYbgjvUBxBkXk5CjrayMDm X-Received: by 2002:a05:600c:4393:b0:3e2:8f1:7684 with SMTP id e19-20020a05600c439300b003e208f17684mr11281360wmn.33.1676884511504; Mon, 20 Feb 2023 01:15:11 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id t20-20020a1c7714000000b003dc3f3d77e3sm507650wmi.7.2023.02.20.01.15.10 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 20 Feb 2023 01:15:11 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, John Snow , qemu-block@nongnu.org, qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson Subject: [PATCH v2 14/24] hw/ide: Rename ide_exec_cmd() -> ide_bus_exec_cmd() Date: Mon, 20 Feb 2023 10:13:48 +0100 Message-Id: <20230220091358.17038-15-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230220091358.17038-1-philmd@linaro.org> References: <20230220091358.17038-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=philmd@linaro.org; helo=mail-wm1-x32f.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 ide_exec_cmd() operates on a IDEBus; rename it as ide_bus_exec_cmd() to emphasize its first argument is a IDEBus. Mechanical change using: $ sed -i -e 's/ide_exec_cmd/ide_bus_exec_cmd/g' \ $(git grep -wl ide_exec_cmd) Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20230215112712.23110-14-philmd@linaro.org> Reviewed-by: Richard Henderson --- hw/ide/ahci.c | 2 +- hw/ide/core.c | 6 +++--- hw/ide/trace-events | 2 +- include/hw/ide/internal.h | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index 430961d73b..7f67fb3119 100644 --- a/hw/ide/ahci.c +++ b/hw/ide/ahci.c @@ -1269,7 +1269,7 @@ static void handle_reg_h2d_fis(AHCIState *s, int port, cmd->status = 0; /* We're ready to process the command in FIS byte 2. */ - ide_exec_cmd(&s->dev[port].port, cmd_fis[2]); + ide_bus_exec_cmd(&s->dev[port].port, cmd_fis[2]); } static int handle_cmd(AHCIState *s, int port, uint8_t slot) diff --git a/hw/ide/core.c b/hw/ide/core.c index 5897411b95..1be0731d1a 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -1327,7 +1327,7 @@ void ide_ioport_write(void *opaque, uint32_t addr, uint32_t val) case ATA_IOPORT_WR_COMMAND: ide_clear_hob(bus); qemu_irq_lower(bus->irq); - ide_exec_cmd(bus, val); + ide_bus_exec_cmd(bus, val); break; } } @@ -2123,13 +2123,13 @@ static bool ide_cmd_permitted(IDEState *s, uint32_t cmd) && (ide_cmd_table[cmd].flags & (1u << s->drive_kind)); } -void ide_exec_cmd(IDEBus *bus, uint32_t val) +void ide_bus_exec_cmd(IDEBus *bus, uint32_t val) { IDEState *s; bool complete; s = idebus_active_if(bus); - trace_ide_exec_cmd(bus, s, val); + trace_ide_bus_exec_cmd(bus, s, val); /* ignore commands to non existent slave */ if (s != bus->ifs && !s->blk) { diff --git a/hw/ide/trace-events b/hw/ide/trace-events index 15d7921f15..a394c05710 100644 --- a/hw/ide/trace-events +++ b/hw/ide/trace-events @@ -12,7 +12,7 @@ ide_data_writew(uint32_t addr, uint32_t val, void *bus, void *s) ide_data_readl(uint32_t addr, uint32_t val, void *bus, void *s) "IDE PIO rd @ 0x%"PRIx32" (Data: Long); val 0x%08"PRIx32"; bus %p; IDEState %p" ide_data_writel(uint32_t addr, uint32_t val, void *bus, void *s) "IDE PIO wr @ 0x%"PRIx32" (Data: Long); val 0x%08"PRIx32"; bus %p; IDEState %p" # misc -ide_exec_cmd(void *bus, void *state, uint32_t cmd) "IDE exec cmd: bus %p; state %p; cmd 0x%02x" +ide_bus_exec_cmd(void *bus, void *state, uint32_t cmd) "IDE exec cmd: bus %p; state %p; cmd 0x%02x" ide_cancel_dma_sync_buffered(void *fn, void *req) "invoking cb %p of buffered request %p with -ECANCELED" ide_cancel_dma_sync_remaining(void) "draining all remaining requests" ide_sector_read(int64_t sector_num, int nsectors) "sector=%"PRId64" nsectors=%d" diff --git a/include/hw/ide/internal.h b/include/hw/ide/internal.h index cc95cd47a0..11a4931ef9 100644 --- a/include/hw/ide/internal.h +++ b/include/hw/ide/internal.h @@ -622,7 +622,7 @@ int ide_init_ioport(IDEBus *bus, ISADevice *isa, int iobase, int iobase2); void ide_bus_set_irq(IDEBus *bus); void ide_bus_register_restart_cb(IDEBus *bus); -void ide_exec_cmd(IDEBus *bus, uint32_t val); +void ide_bus_exec_cmd(IDEBus *bus, uint32_t val); void ide_transfer_start(IDEState *s, uint8_t *buf, int size, EndTransferFunc *end_transfer_func);